aclocal.m4 revision 25b89263
125b89263Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2a253d6aeSmrg 3a253d6aeSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4ea133fd7Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5a253d6aeSmrg# This file is free software; the Free Software Foundation 6a253d6aeSmrg# gives unlimited permission to copy and/or distribute it, 7a253d6aeSmrg# with or without modifications, as long as this notice is preserved. 8a253d6aeSmrg 9a253d6aeSmrg# This program is distributed in the hope that it will be useful, 10a253d6aeSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11a253d6aeSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12a253d6aeSmrg# PARTICULAR PURPOSE. 13a253d6aeSmrg 14ea133fd7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15ea133fd7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1625b89263Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 1725b89263Smrg[m4_warning([this file was generated for autoconf 2.68. 18ea133fd7SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19ea133fd7SmrgIf you have problems, you may need to regenerate the build system entirely. 20ea133fd7SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21a253d6aeSmrg 2225b89263Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23a253d6aeSmrg# 2425b89263Smrg# This file is free software; the Free Software Foundation 2525b89263Smrg# gives unlimited permission to copy and/or distribute it, 2625b89263Smrg# with or without modifications, as long as this notice is preserved. 2725b89263Smrg 2825b89263Smrg# AM_AUTOMAKE_VERSION(VERSION) 2925b89263Smrg# ---------------------------- 3025b89263Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3125b89263Smrg# generated from the m4 files accompanying Automake X.Y. 3225b89263Smrg# (This private macro should not be called outside this file.) 3325b89263SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3425b89263Smrg[am__api_version='1.11' 3525b89263Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3625b89263Smrgdnl require some minimum version. Point them to the right macro. 3725b89263Smrgm4_if([$1], [1.11.1], [], 3825b89263Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 3925b89263Smrg]) 4025b89263Smrg 4125b89263Smrg# _AM_AUTOCONF_VERSION(VERSION) 4225b89263Smrg# ----------------------------- 4325b89263Smrg# aclocal traces this macro to find the Autoconf version. 4425b89263Smrg# This is a private macro too. Using m4_define simplifies 4525b89263Smrg# the logic in aclocal, which can simply ignore this definition. 4625b89263Smrgm4_define([_AM_AUTOCONF_VERSION], []) 4725b89263Smrg 4825b89263Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 4925b89263Smrg# ------------------------------- 5025b89263Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5125b89263Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5225b89263SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5325b89263Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 5425b89263Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5525b89263Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5625b89263Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5725b89263Smrg 5825b89263Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 5925b89263Smrg 6025b89263Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61a253d6aeSmrg# 6225b89263Smrg# This file is free software; the Free Software Foundation 6325b89263Smrg# gives unlimited permission to copy and/or distribute it, 6425b89263Smrg# with or without modifications, as long as this notice is preserved. 65ea133fd7Smrg 6625b89263Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6725b89263Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6825b89263Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69a253d6aeSmrg# 7025b89263Smrg# Of course, Automake must honor this variable whenever it calls a 7125b89263Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7225b89263Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7325b89263Smrg# depending on how configure is run. This is pretty annoying, since 7425b89263Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7525b89263Smrg# source directory, any form will work fine, but in subdirectories a 7625b89263Smrg# relative path needs to be adjusted first. 77a253d6aeSmrg# 7825b89263Smrg# $ac_aux_dir/missing 7925b89263Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8025b89263Smrg# $top_srcdir/$ac_aux_dir/missing 8125b89263Smrg# fails if $ac_aux_dir is absolute, 8225b89263Smrg# fails when called from a subdirectory in a VPATH build with 8325b89263Smrg# a relative $ac_aux_dir 84a253d6aeSmrg# 8525b89263Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8625b89263Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8725b89263Smrg# harmless because $srcdir is `.', but things will broke when you 8825b89263Smrg# start a VPATH build or use an absolute $srcdir. 89a253d6aeSmrg# 9025b89263Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9125b89263Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9225b89263Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9325b89263Smrg# and then we would define $MISSING as 9425b89263Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9525b89263Smrg# This will work as long as MISSING is not called from configure, because 9625b89263Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9725b89263Smrg# However there are other variables, like CC, which are often used in 9825b89263Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99a253d6aeSmrg# 10025b89263Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10125b89263Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10225b89263Smrg# configured tree to be moved without reconfiguration. 103a253d6aeSmrg 10425b89263SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10525b89263Smrg[dnl Rely on autoconf to set up CDPATH properly. 10625b89263SmrgAC_PREREQ([2.50])dnl 10725b89263Smrg# expand $ac_aux_dir to an absolute path 10825b89263Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 109ea133fd7Smrg]) 110a253d6aeSmrg 11125b89263Smrg# AM_CONDITIONAL -*- Autoconf -*- 112a253d6aeSmrg 11325b89263Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 11425b89263Smrg# Free Software Foundation, Inc. 11525b89263Smrg# 11625b89263Smrg# This file is free software; the Free Software Foundation 11725b89263Smrg# gives unlimited permission to copy and/or distribute it, 11825b89263Smrg# with or without modifications, as long as this notice is preserved. 119a253d6aeSmrg 12025b89263Smrg# serial 9 121a253d6aeSmrg 12225b89263Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12325b89263Smrg# ------------------------------------- 12425b89263Smrg# Define a conditional. 12525b89263SmrgAC_DEFUN([AM_CONDITIONAL], 12625b89263Smrg[AC_PREREQ(2.52)dnl 12725b89263Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12825b89263Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12925b89263SmrgAC_SUBST([$1_TRUE])dnl 13025b89263SmrgAC_SUBST([$1_FALSE])dnl 13125b89263Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13225b89263Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13325b89263Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13425b89263Smrgif $2; then 13525b89263Smrg $1_TRUE= 13625b89263Smrg $1_FALSE='#' 13725b89263Smrgelse 13825b89263Smrg $1_TRUE='#' 13925b89263Smrg $1_FALSE= 14025b89263Smrgfi 14125b89263SmrgAC_CONFIG_COMMANDS_PRE( 14225b89263Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14325b89263Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14425b89263SmrgUsually this means the macro was only invoked conditionally.]]) 14525b89263Smrgfi])]) 146a253d6aeSmrg 14725b89263Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 14825b89263Smrg# Free Software Foundation, Inc. 14925b89263Smrg# 15025b89263Smrg# This file is free software; the Free Software Foundation 15125b89263Smrg# gives unlimited permission to copy and/or distribute it, 15225b89263Smrg# with or without modifications, as long as this notice is preserved. 153a253d6aeSmrg 15425b89263Smrg# serial 10 155a253d6aeSmrg 15625b89263Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 15725b89263Smrg# written in clear, in which case automake, when reading aclocal.m4, 15825b89263Smrg# will think it sees a *use*, and therefore will trigger all it's 15925b89263Smrg# C support machinery. Also note that it means that autoscan, seeing 16025b89263Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161ea133fd7Smrg 162ea133fd7Smrg 16325b89263Smrg# _AM_DEPENDENCIES(NAME) 164ea133fd7Smrg# ---------------------- 16525b89263Smrg# See how the compiler implements dependency checking. 16625b89263Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 16725b89263Smrg# We try a few techniques and use that to set a single cache variable. 16825b89263Smrg# 16925b89263Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 17025b89263Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 17125b89263Smrg# dependency, and given that the user is not expected to run this macro, 17225b89263Smrg# just rely on AC_PROG_CC. 17325b89263SmrgAC_DEFUN([_AM_DEPENDENCIES], 17425b89263Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17525b89263SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17625b89263SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17725b89263SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178ea133fd7Smrg 17925b89263Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 18025b89263Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 18125b89263Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18225b89263Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 18325b89263Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18425b89263Smrg [depcc="$$1" am_compiler_list=]) 185ea133fd7Smrg 18625b89263SmrgAC_CACHE_CHECK([dependency style of $depcc], 18725b89263Smrg [am_cv_$1_dependencies_compiler_type], 18825b89263Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18925b89263Smrg # We make a subdir and do the tests there. Otherwise we can end up 19025b89263Smrg # making bogus files that we don't know about and never remove. For 19125b89263Smrg # instance it was reported that on HP-UX the gcc test will end up 19225b89263Smrg # making a dummy file named `D' -- because `-MD' means `put the output 19325b89263Smrg # in D'. 19425b89263Smrg mkdir conftest.dir 19525b89263Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19625b89263Smrg # using a relative directory. 19725b89263Smrg cp "$am_depcomp" conftest.dir 19825b89263Smrg cd conftest.dir 19925b89263Smrg # We will build objects and dependencies in a subdirectory because 20025b89263Smrg # it helps to detect inapplicable dependency modes. For instance 20125b89263Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20225b89263Smrg # side effect of compilation, but ICC will put the dependencies in 20325b89263Smrg # the current directory while Tru64 will put them in the object 20425b89263Smrg # directory. 20525b89263Smrg mkdir sub 206a253d6aeSmrg 20725b89263Smrg am_cv_$1_dependencies_compiler_type=none 20825b89263Smrg if test "$am_compiler_list" = ""; then 20925b89263Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210ea133fd7Smrg fi 21125b89263Smrg am__universal=false 21225b89263Smrg m4_case([$1], [CC], 21325b89263Smrg [case " $depcc " in #( 21425b89263Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21525b89263Smrg esac], 21625b89263Smrg [CXX], 21725b89263Smrg [case " $depcc " in #( 21825b89263Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21925b89263Smrg esac]) 220a253d6aeSmrg 22125b89263Smrg for depmode in $am_compiler_list; do 22225b89263Smrg # Setup a source with many dependencies, because some compilers 22325b89263Smrg # like to wrap large dependency lists on column 80 (with \), and 22425b89263Smrg # we should not choose a depcomp mode which is confused by this. 22525b89263Smrg # 22625b89263Smrg # We need to recreate these files for each test, as the compiler may 22725b89263Smrg # overwrite some of them when testing with obscure command lines. 22825b89263Smrg # This happens at least with the AIX C compiler. 22925b89263Smrg : > sub/conftest.c 23025b89263Smrg for i in 1 2 3 4 5 6; do 23125b89263Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23225b89263Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 23325b89263Smrg # Solaris 8's {/usr,}/bin/sh. 23425b89263Smrg touch sub/conftst$i.h 23525b89263Smrg done 23625b89263Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237a253d6aeSmrg 23825b89263Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23925b89263Smrg # mode. It turns out that the SunPro C++ compiler does not properly 24025b89263Smrg # handle `-M -o', and we need to detect this. Also, some Intel 24125b89263Smrg # versions had trouble with output in subdirs 24225b89263Smrg am__obj=sub/conftest.${OBJEXT-o} 24325b89263Smrg am__minus_obj="-o $am__obj" 24425b89263Smrg case $depmode in 24525b89263Smrg gcc) 24625b89263Smrg # This depmode causes a compiler race in universal mode. 24725b89263Smrg test "$am__universal" = false || continue 24825b89263Smrg ;; 24925b89263Smrg nosideeffect) 25025b89263Smrg # after this tag, mechanisms are not by side-effect, so they'll 25125b89263Smrg # only be used when explicitly requested 25225b89263Smrg if test "x$enable_dependency_tracking" = xyes; then 25325b89263Smrg continue 25425b89263Smrg else 25525b89263Smrg break 25625b89263Smrg fi 25725b89263Smrg ;; 25825b89263Smrg msvisualcpp | msvcmsys) 25925b89263Smrg # This compiler won't grok `-c -o', but also, the minuso test has 26025b89263Smrg # not run yet. These depmodes are late enough in the game, and 26125b89263Smrg # so weak that their functioning should not be impacted. 26225b89263Smrg am__obj=conftest.${OBJEXT-o} 26325b89263Smrg am__minus_obj= 26425b89263Smrg ;; 26525b89263Smrg none) break ;; 26625b89263Smrg esac 26725b89263Smrg if depmode=$depmode \ 26825b89263Smrg source=sub/conftest.c object=$am__obj \ 26925b89263Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27025b89263Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 27125b89263Smrg >/dev/null 2>conftest.err && 27225b89263Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27325b89263Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27425b89263Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27525b89263Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27625b89263Smrg # icc doesn't choke on unknown options, it will just issue warnings 27725b89263Smrg # or remarks (even with -Werror). So we grep stderr for any message 27825b89263Smrg # that says an option was ignored or not supported. 27925b89263Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28025b89263Smrg # icc: Command line warning: ignoring option '-M'; no argument required 28125b89263Smrg # The diagnosis changed in icc 8.0: 28225b89263Smrg # icc: Command line remark: option '-MP' not supported 28325b89263Smrg if (grep 'ignoring option' conftest.err || 28425b89263Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28525b89263Smrg am_cv_$1_dependencies_compiler_type=$depmode 28625b89263Smrg break 28725b89263Smrg fi 28825b89263Smrg fi 28925b89263Smrg done 290a253d6aeSmrg 29125b89263Smrg cd .. 29225b89263Smrg rm -rf conftest.dir 29325b89263Smrgelse 29425b89263Smrg am_cv_$1_dependencies_compiler_type=none 29525b89263Smrgfi 29625b89263Smrg]) 29725b89263SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29825b89263SmrgAM_CONDITIONAL([am__fastdep$1], [ 29925b89263Smrg test "x$enable_dependency_tracking" != xno \ 30025b89263Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 30125b89263Smrg]) 302a253d6aeSmrg 303a253d6aeSmrg 30425b89263Smrg# AM_SET_DEPDIR 30525b89263Smrg# ------------- 30625b89263Smrg# Choose a directory name for dependency files. 30725b89263Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 30825b89263SmrgAC_DEFUN([AM_SET_DEPDIR], 30925b89263Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 31025b89263SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 31125b89263Smrg]) 312a253d6aeSmrg 313a253d6aeSmrg 31425b89263Smrg# AM_DEP_TRACK 31525b89263Smrg# ------------ 31625b89263SmrgAC_DEFUN([AM_DEP_TRACK], 31725b89263Smrg[AC_ARG_ENABLE(dependency-tracking, 31825b89263Smrg[ --disable-dependency-tracking speeds up one-time build 31925b89263Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 32025b89263Smrgif test "x$enable_dependency_tracking" != xno; then 32125b89263Smrg am_depcomp="$ac_aux_dir/depcomp" 32225b89263Smrg AMDEPBACKSLASH='\' 32325b89263Smrgfi 32425b89263SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32525b89263SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32625b89263Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32725b89263Smrg]) 328a253d6aeSmrg 32925b89263Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330a253d6aeSmrg 33125b89263Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 33225b89263Smrg# Free Software Foundation, Inc. 33325b89263Smrg# 33425b89263Smrg# This file is free software; the Free Software Foundation 33525b89263Smrg# gives unlimited permission to copy and/or distribute it, 33625b89263Smrg# with or without modifications, as long as this notice is preserved. 337a253d6aeSmrg 33825b89263Smrg#serial 5 339ea133fd7Smrg 34025b89263Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341ea133fd7Smrg# ------------------------------ 34225b89263SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34325b89263Smrg[{ 34425b89263Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34525b89263Smrg # are listed without --file. Let's play safe and only enable the eval 34625b89263Smrg # if we detect the quoting. 34725b89263Smrg case $CONFIG_FILES in 34825b89263Smrg *\'*) eval set x "$CONFIG_FILES" ;; 34925b89263Smrg *) set x $CONFIG_FILES ;; 35025b89263Smrg esac 35125b89263Smrg shift 35225b89263Smrg for mf 35325b89263Smrg do 35425b89263Smrg # Strip MF so we end up with the name of the file. 35525b89263Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35625b89263Smrg # Check whether this is an Automake generated Makefile or not. 35725b89263Smrg # We used to match only the files named `Makefile.in', but 35825b89263Smrg # some people rename them; so instead we look at the file content. 35925b89263Smrg # Grep'ing the first line is not enough: some people post-process 36025b89263Smrg # each Makefile.in and add a new line on top of each file to say so. 36125b89263Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36225b89263Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36325b89263Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36425b89263Smrg dirpart=`AS_DIRNAME("$mf")` 36525b89263Smrg else 36625b89263Smrg continue 36725b89263Smrg fi 36825b89263Smrg # Extract the definition of DEPDIR, am__include, and am__quote 36925b89263Smrg # from the Makefile without running `make'. 37025b89263Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37125b89263Smrg test -z "$DEPDIR" && continue 37225b89263Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37325b89263Smrg test -z "am__include" && continue 37425b89263Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37525b89263Smrg # When using ansi2knr, U may be empty or an underscore; expand it 37625b89263Smrg U=`sed -n 's/^U = //p' < "$mf"` 37725b89263Smrg # Find all dependency output files, they are included files with 37825b89263Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37925b89263Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38025b89263Smrg # expansion. 38125b89263Smrg for file in `sed -n " 38225b89263Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38325b89263Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38425b89263Smrg # Make sure the directory exists. 38525b89263Smrg test -f "$dirpart/$file" && continue 38625b89263Smrg fdir=`AS_DIRNAME(["$file"])` 38725b89263Smrg AS_MKDIR_P([$dirpart/$fdir]) 38825b89263Smrg # echo "creating $dirpart/$file" 38925b89263Smrg echo '# dummy' > "$dirpart/$file" 39025b89263Smrg done 39125b89263Smrg done 39225b89263Smrg} 39325b89263Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394ea133fd7Smrg 395ea133fd7Smrg 39625b89263Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39725b89263Smrg# ----------------------------- 39825b89263Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 39925b89263Smrg# 40025b89263Smrg# This code is only required when automatic dependency tracking 40125b89263Smrg# is enabled. FIXME. This creates each `.P' file that we will 40225b89263Smrg# need in order to bootstrap the dependency handling code. 40325b89263SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40425b89263Smrg[AC_CONFIG_COMMANDS([depfiles], 40525b89263Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40625b89263Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407a253d6aeSmrg]) 408ea133fd7Smrg 40925b89263Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 41025b89263Smrg# Free Software Foundation, Inc. 41125b89263Smrg# 41225b89263Smrg# This file is free software; the Free Software Foundation 41325b89263Smrg# gives unlimited permission to copy and/or distribute it, 41425b89263Smrg# with or without modifications, as long as this notice is preserved. 415ea133fd7Smrg 41625b89263Smrg# serial 8 417ea133fd7Smrg 41825b89263Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 41925b89263SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420ea133fd7Smrg 42125b89263Smrg# Do all the work for Automake. -*- Autoconf -*- 422ea133fd7Smrg 42325b89263Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42425b89263Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 42525b89263Smrg# 42625b89263Smrg# This file is free software; the Free Software Foundation 42725b89263Smrg# gives unlimited permission to copy and/or distribute it, 42825b89263Smrg# with or without modifications, as long as this notice is preserved. 429ea133fd7Smrg 43025b89263Smrg# serial 16 431a253d6aeSmrg 43225b89263Smrg# This macro actually does too much. Some checks are only needed if 43325b89263Smrg# your package does certain things. But this isn't really a big deal. 434a253d6aeSmrg 43525b89263Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 43625b89263Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 43725b89263Smrg# ----------------------------------------------- 43825b89263Smrg# The call with PACKAGE and VERSION arguments is the old style 43925b89263Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 44025b89263Smrg# and VERSION should now be passed to AC_INIT and removed from 44125b89263Smrg# the call to AM_INIT_AUTOMAKE. 44225b89263Smrg# We support both call styles for the transition. After 44325b89263Smrg# the next Automake release, Autoconf can make the AC_INIT 44425b89263Smrg# arguments mandatory, and then we can depend on a new Autoconf 44525b89263Smrg# release and drop the old call support. 44625b89263SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 44725b89263Smrg[AC_PREREQ([2.62])dnl 44825b89263Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 44925b89263Smrgdnl the ones we care about. 45025b89263Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 45125b89263SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 45225b89263SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 45325b89263Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 45425b89263Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 45525b89263Smrg # is not polluted with repeated "-I." 45625b89263Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 45725b89263Smrg # test to see if srcdir already configured 45825b89263Smrg if test -f $srcdir/config.status; then 45925b89263Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 46025b89263Smrg fi 46125b89263Smrgfi 462a253d6aeSmrg 46325b89263Smrg# test whether we have cygpath 46425b89263Smrgif test -z "$CYGPATH_W"; then 46525b89263Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 46625b89263Smrg CYGPATH_W='cygpath -w' 46725b89263Smrg else 46825b89263Smrg CYGPATH_W=echo 46925b89263Smrg fi 47025b89263Smrgfi 47125b89263SmrgAC_SUBST([CYGPATH_W]) 472a253d6aeSmrg 47325b89263Smrg# Define the identity of the package. 47425b89263Smrgdnl Distinguish between old-style and new-style calls. 47525b89263Smrgm4_ifval([$2], 47625b89263Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 47725b89263Smrg AC_SUBST([PACKAGE], [$1])dnl 47825b89263Smrg AC_SUBST([VERSION], [$2])], 47925b89263Smrg[_AM_SET_OPTIONS([$1])dnl 48025b89263Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 48125b89263Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 48225b89263Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 48325b89263Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 48425b89263Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 485a253d6aeSmrg 48625b89263Smrg_AM_IF_OPTION([no-define],, 48725b89263Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 48825b89263Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 489a253d6aeSmrg 49025b89263Smrg# Some tools Automake needs. 49125b89263SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 49225b89263SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 49325b89263SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 49425b89263SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 49525b89263SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 49625b89263SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 49725b89263SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 49825b89263SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49925b89263SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 50025b89263SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 50125b89263Smrg# We need awk for the "check" target. The system "awk" is bad on 50225b89263Smrg# some platforms. 50325b89263SmrgAC_REQUIRE([AC_PROG_AWK])dnl 50425b89263SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50525b89263SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50625b89263Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50725b89263Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50825b89263Smrg [_AM_PROG_TAR([v7])])]) 50925b89263Smrg_AM_IF_OPTION([no-dependencies],, 51025b89263Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 51125b89263Smrg [_AM_DEPENDENCIES(CC)], 51225b89263Smrg [define([AC_PROG_CC], 51325b89263Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 51425b89263SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51525b89263Smrg [_AM_DEPENDENCIES(CXX)], 51625b89263Smrg [define([AC_PROG_CXX], 51725b89263Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 51825b89263SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51925b89263Smrg [_AM_DEPENDENCIES(OBJC)], 52025b89263Smrg [define([AC_PROG_OBJC], 52125b89263Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 52225b89263Smrg]) 52325b89263Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 52425b89263Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 52525b89263Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 52625b89263Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 52725b89263SmrgAC_CONFIG_COMMANDS_PRE(dnl 52825b89263Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52925b89263Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 530ea133fd7Smrg]) 531a253d6aeSmrg 53225b89263Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53325b89263Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53425b89263Smrgdnl mangled by Autoconf and run in a shell conditional statement. 53525b89263Smrgm4_define([_AC_COMPILER_EXEEXT], 53625b89263Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 537a253d6aeSmrg 538a253d6aeSmrg 53925b89263Smrg# When config.status generates a header, we must update the stamp-h file. 54025b89263Smrg# This file resides in the same directory as the config header 54125b89263Smrg# that is generated. The stamp files are numbered to have different names. 542a253d6aeSmrg 54325b89263Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 54425b89263Smrg# loop where config.status creates the headers, so we can generate 54525b89263Smrg# our stamp files there. 54625b89263SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 54725b89263Smrg[# Compute $1's index in $config_headers. 54825b89263Smrg_am_arg=$1 54925b89263Smrg_am_stamp_count=1 55025b89263Smrgfor _am_header in $config_headers :; do 55125b89263Smrg case $_am_header in 55225b89263Smrg $_am_arg | $_am_arg:* ) 55325b89263Smrg break ;; 55425b89263Smrg * ) 55525b89263Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 55625b89263Smrg esac 55725b89263Smrgdone 55825b89263Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 559a253d6aeSmrg 56025b89263Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 56125b89263Smrg# 56225b89263Smrg# This file is free software; the Free Software Foundation 56325b89263Smrg# gives unlimited permission to copy and/or distribute it, 56425b89263Smrg# with or without modifications, as long as this notice is preserved. 565a253d6aeSmrg 56625b89263Smrg# AM_PROG_INSTALL_SH 56725b89263Smrg# ------------------ 56825b89263Smrg# Define $install_sh. 56925b89263SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 57025b89263Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57125b89263Smrgif test x"${install_sh}" != xset; then 57225b89263Smrg case $am_aux_dir in 57325b89263Smrg *\ * | *\ *) 57425b89263Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57525b89263Smrg *) 57625b89263Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57725b89263Smrg esac 57825b89263Smrgfi 57925b89263SmrgAC_SUBST(install_sh)]) 580a253d6aeSmrg 58125b89263Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 58225b89263Smrg# 58325b89263Smrg# This file is free software; the Free Software Foundation 58425b89263Smrg# gives unlimited permission to copy and/or distribute it, 58525b89263Smrg# with or without modifications, as long as this notice is preserved. 586a253d6aeSmrg 58725b89263Smrg# serial 2 588a253d6aeSmrg 58925b89263Smrg# Check whether the underlying file-system supports filenames 59025b89263Smrg# with a leading dot. For instance MS-DOS doesn't. 59125b89263SmrgAC_DEFUN([AM_SET_LEADING_DOT], 59225b89263Smrg[rm -rf .tst 2>/dev/null 59325b89263Smrgmkdir .tst 2>/dev/null 59425b89263Smrgif test -d .tst; then 59525b89263Smrg am__leading_dot=. 59625b89263Smrgelse 59725b89263Smrg am__leading_dot=_ 59825b89263Smrgfi 59925b89263Smrgrmdir .tst 2>/dev/null 60025b89263SmrgAC_SUBST([am__leading_dot])]) 601a253d6aeSmrg 60225b89263Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 60325b89263Smrg# From Jim Meyering 604ea133fd7Smrg 60525b89263Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 60625b89263Smrg# Free Software Foundation, Inc. 607ea133fd7Smrg# 60825b89263Smrg# This file is free software; the Free Software Foundation 60925b89263Smrg# gives unlimited permission to copy and/or distribute it, 61025b89263Smrg# with or without modifications, as long as this notice is preserved. 611ea133fd7Smrg 61225b89263Smrg# serial 5 613ea133fd7Smrg 61425b89263Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 61525b89263Smrg# ---------------------------------- 61625b89263Smrg# Control maintainer-specific portions of Makefiles. 61725b89263Smrg# Default is to disable them, unless `enable' is passed literally. 61825b89263Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 61925b89263Smrg# can override the default with the --enable/--disable switch. 62025b89263SmrgAC_DEFUN([AM_MAINTAINER_MODE], 62125b89263Smrg[m4_case(m4_default([$1], [disable]), 62225b89263Smrg [enable], [m4_define([am_maintainer_other], [disable])], 62325b89263Smrg [disable], [m4_define([am_maintainer_other], [enable])], 62425b89263Smrg [m4_define([am_maintainer_other], [enable]) 62525b89263Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 62625b89263SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 62725b89263Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 62825b89263Smrg AC_ARG_ENABLE([maintainer-mode], 62925b89263Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 63025b89263Smrg (and sometimes confusing) to the casual installer], 63125b89263Smrg [USE_MAINTAINER_MODE=$enableval], 63225b89263Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 63325b89263Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 63425b89263Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 63525b89263Smrg MAINT=$MAINTAINER_MODE_TRUE 63625b89263Smrg AC_SUBST([MAINT])dnl 63725b89263Smrg] 63825b89263Smrg) 639a253d6aeSmrg 64025b89263SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 641a253d6aeSmrg 64225b89263Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 64325b89263Smrg 64425b89263Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 645a253d6aeSmrg# 64625b89263Smrg# This file is free software; the Free Software Foundation 64725b89263Smrg# gives unlimited permission to copy and/or distribute it, 64825b89263Smrg# with or without modifications, as long as this notice is preserved. 649a253d6aeSmrg 65025b89263Smrg# serial 4 651a253d6aeSmrg 65225b89263Smrg# AM_MAKE_INCLUDE() 65325b89263Smrg# ----------------- 65425b89263Smrg# Check to see how make treats includes. 65525b89263SmrgAC_DEFUN([AM_MAKE_INCLUDE], 65625b89263Smrg[am_make=${MAKE-make} 65725b89263Smrgcat > confinc << 'END' 65825b89263Smrgam__doit: 65925b89263Smrg @echo this is the am__doit target 66025b89263Smrg.PHONY: am__doit 66125b89263SmrgEND 66225b89263Smrg# If we don't find an include directive, just comment out the code. 66325b89263SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 66425b89263Smrgam__include="#" 66525b89263Smrgam__quote= 66625b89263Smrg_am_result=none 66725b89263Smrg# First try GNU make style include. 66825b89263Smrgecho "include confinc" > confmf 66925b89263Smrg# Ignore all kinds of additional output from `make'. 67025b89263Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 67125b89263Smrg*the\ am__doit\ target*) 67225b89263Smrg am__include=include 67325b89263Smrg am__quote= 67425b89263Smrg _am_result=GNU 67525b89263Smrg ;; 67625b89263Smrgesac 67725b89263Smrg# Now try BSD make style include. 67825b89263Smrgif test "$am__include" = "#"; then 67925b89263Smrg echo '.include "confinc"' > confmf 68025b89263Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 68125b89263Smrg *the\ am__doit\ target*) 68225b89263Smrg am__include=.include 68325b89263Smrg am__quote="\"" 68425b89263Smrg _am_result=BSD 68525b89263Smrg ;; 68625b89263Smrg esac 68725b89263Smrgfi 68825b89263SmrgAC_SUBST([am__include]) 68925b89263SmrgAC_SUBST([am__quote]) 69025b89263SmrgAC_MSG_RESULT([$_am_result]) 69125b89263Smrgrm -f confinc confmf 69225b89263Smrg]) 693ea133fd7Smrg 69425b89263Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695ea133fd7Smrg 69625b89263Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 69725b89263Smrg# Free Software Foundation, Inc. 69825b89263Smrg# 69925b89263Smrg# This file is free software; the Free Software Foundation 70025b89263Smrg# gives unlimited permission to copy and/or distribute it, 70125b89263Smrg# with or without modifications, as long as this notice is preserved. 702ea133fd7Smrg 70325b89263Smrg# serial 6 704ea133fd7Smrg 70525b89263Smrg# AM_MISSING_PROG(NAME, PROGRAM) 706a253d6aeSmrg# ------------------------------ 70725b89263SmrgAC_DEFUN([AM_MISSING_PROG], 70825b89263Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 70925b89263Smrg$1=${$1-"${am_missing_run}$2"} 71025b89263SmrgAC_SUBST($1)]) 711ea133fd7Smrg 712ea133fd7Smrg 71325b89263Smrg# AM_MISSING_HAS_RUN 71425b89263Smrg# ------------------ 71525b89263Smrg# Define MISSING if not defined so far and test if it supports --run. 71625b89263Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 71725b89263SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 71825b89263Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 71925b89263SmrgAC_REQUIRE_AUX_FILE([missing])dnl 72025b89263Smrgif test x"${MISSING+set}" != xset; then 72125b89263Smrg case $am_aux_dir in 72225b89263Smrg *\ * | *\ *) 72325b89263Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 72425b89263Smrg *) 72525b89263Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 72625b89263Smrg esac 72725b89263Smrgfi 72825b89263Smrg# Use eval to expand $SHELL 72925b89263Smrgif eval "$MISSING --run true"; then 73025b89263Smrg am_missing_run="$MISSING --run " 73125b89263Smrgelse 73225b89263Smrg am_missing_run= 73325b89263Smrg AC_MSG_WARN([`missing' script is too old or missing]) 73425b89263Smrgfi 73525b89263Smrg]) 736ea133fd7Smrg 73725b89263Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 73825b89263Smrg# 73925b89263Smrg# This file is free software; the Free Software Foundation 74025b89263Smrg# gives unlimited permission to copy and/or distribute it, 74125b89263Smrg# with or without modifications, as long as this notice is preserved. 742ea133fd7Smrg 74325b89263Smrg# AM_PROG_MKDIR_P 74425b89263Smrg# --------------- 74525b89263Smrg# Check for `mkdir -p'. 74625b89263SmrgAC_DEFUN([AM_PROG_MKDIR_P], 74725b89263Smrg[AC_PREREQ([2.60])dnl 74825b89263SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 74925b89263Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 75025b89263Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 75125b89263Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 75225b89263Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 75325b89263Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 75425b89263Smrgdnl adjustment using top_builddir (which is defined more often than 75525b89263Smrgdnl MKDIR_P). 75625b89263SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 75725b89263Smrgcase $mkdir_p in 75825b89263Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 75925b89263Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 760a253d6aeSmrgesac 761a253d6aeSmrg]) 762a253d6aeSmrg 76325b89263Smrg# Helper functions for option handling. -*- Autoconf -*- 764a253d6aeSmrg 76525b89263Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 76625b89263Smrg# 76725b89263Smrg# This file is free software; the Free Software Foundation 76825b89263Smrg# gives unlimited permission to copy and/or distribute it, 76925b89263Smrg# with or without modifications, as long as this notice is preserved. 770ea133fd7Smrg 77125b89263Smrg# serial 4 772ea133fd7Smrg 77325b89263Smrg# _AM_MANGLE_OPTION(NAME) 77425b89263Smrg# ----------------------- 77525b89263SmrgAC_DEFUN([_AM_MANGLE_OPTION], 77625b89263Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 777a253d6aeSmrg 77825b89263Smrg# _AM_SET_OPTION(NAME) 77925b89263Smrg# ------------------------------ 78025b89263Smrg# Set option NAME. Presently that only means defining a flag for this option. 78125b89263SmrgAC_DEFUN([_AM_SET_OPTION], 78225b89263Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 783a253d6aeSmrg 78425b89263Smrg# _AM_SET_OPTIONS(OPTIONS) 78525b89263Smrg# ---------------------------------- 78625b89263Smrg# OPTIONS is a space-separated list of Automake options. 78725b89263SmrgAC_DEFUN([_AM_SET_OPTIONS], 78825b89263Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 789a253d6aeSmrg 79025b89263Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 79125b89263Smrg# ------------------------------------------- 79225b89263Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 79325b89263SmrgAC_DEFUN([_AM_IF_OPTION], 79425b89263Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 795a253d6aeSmrg 79625b89263Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 797a253d6aeSmrg 79825b89263Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 79925b89263Smrg# Free Software Foundation, Inc. 80025b89263Smrg# 80125b89263Smrg# This file is free software; the Free Software Foundation 80225b89263Smrg# gives unlimited permission to copy and/or distribute it, 80325b89263Smrg# with or without modifications, as long as this notice is preserved. 804a253d6aeSmrg 80525b89263Smrg# serial 5 806a253d6aeSmrg 80725b89263Smrg# AM_SANITY_CHECK 80825b89263Smrg# --------------- 80925b89263SmrgAC_DEFUN([AM_SANITY_CHECK], 81025b89263Smrg[AC_MSG_CHECKING([whether build environment is sane]) 81125b89263Smrg# Just in case 81225b89263Smrgsleep 1 81325b89263Smrgecho timestamp > conftest.file 81425b89263Smrg# Reject unsafe characters in $srcdir or the absolute working directory 81525b89263Smrg# name. Accept space and tab only in the latter. 81625b89263Smrgam_lf=' 81725b89263Smrg' 81825b89263Smrgcase `pwd` in 81925b89263Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 82025b89263Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 82125b89263Smrgesac 82225b89263Smrgcase $srcdir in 82325b89263Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 82425b89263Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 82525b89263Smrgesac 826ea133fd7Smrg 82725b89263Smrg# Do `set' in a subshell so we don't clobber the current shell's 82825b89263Smrg# arguments. Must try -L first in case configure is actually a 82925b89263Smrg# symlink; some systems play weird games with the mod time of symlinks 83025b89263Smrg# (eg FreeBSD returns the mod time of the symlink's containing 83125b89263Smrg# directory). 83225b89263Smrgif ( 83325b89263Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 83425b89263Smrg if test "$[*]" = "X"; then 83525b89263Smrg # -L didn't work. 83625b89263Smrg set X `ls -t "$srcdir/configure" conftest.file` 83725b89263Smrg fi 83825b89263Smrg rm -f conftest.file 83925b89263Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 84025b89263Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 841ea133fd7Smrg 84225b89263Smrg # If neither matched, then we have a broken ls. This can happen 84325b89263Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 84425b89263Smrg # broken ls alias from the environment. This has actually 84525b89263Smrg # happened. Such a system could not be considered "sane". 84625b89263Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 84725b89263Smrgalias in your environment]) 84825b89263Smrg fi 849a253d6aeSmrg 85025b89263Smrg test "$[2]" = conftest.file 85125b89263Smrg ) 85225b89263Smrgthen 85325b89263Smrg # Ok. 85425b89263Smrg : 85525b89263Smrgelse 85625b89263Smrg AC_MSG_ERROR([newly created file is older than distributed files! 85725b89263SmrgCheck your system clock]) 858ea133fd7Smrgfi 85925b89263SmrgAC_MSG_RESULT(yes)]) 860ea133fd7Smrg 86125b89263Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 86225b89263Smrg# 86325b89263Smrg# This file is free software; the Free Software Foundation 86425b89263Smrg# gives unlimited permission to copy and/or distribute it, 86525b89263Smrg# with or without modifications, as long as this notice is preserved. 866a253d6aeSmrg 86725b89263Smrg# serial 1 868ea133fd7Smrg 86925b89263Smrg# AM_SILENT_RULES([DEFAULT]) 87025b89263Smrg# -------------------------- 87125b89263Smrg# Enable less verbose build rules; with the default set to DEFAULT 87225b89263Smrg# (`yes' being less verbose, `no' or empty being verbose). 87325b89263SmrgAC_DEFUN([AM_SILENT_RULES], 87425b89263Smrg[AC_ARG_ENABLE([silent-rules], 87525b89263Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 87625b89263Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 87725b89263Smrgcase $enable_silent_rules in 87825b89263Smrgyes) AM_DEFAULT_VERBOSITY=0;; 87925b89263Smrgno) AM_DEFAULT_VERBOSITY=1;; 88025b89263Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 88125b89263Smrgesac 88225b89263SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 88325b89263SmrgAM_BACKSLASH='\' 88425b89263SmrgAC_SUBST([AM_BACKSLASH])dnl 88525b89263Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 88625b89263Smrg]) 887a253d6aeSmrg 88825b89263Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889a253d6aeSmrg# 89025b89263Smrg# This file is free software; the Free Software Foundation 89125b89263Smrg# gives unlimited permission to copy and/or distribute it, 89225b89263Smrg# with or without modifications, as long as this notice is preserved. 893ea133fd7Smrg 89425b89263Smrg# AM_PROG_INSTALL_STRIP 89525b89263Smrg# --------------------- 89625b89263Smrg# One issue with vendor `install' (even GNU) is that you can't 89725b89263Smrg# specify the program used to strip binaries. This is especially 89825b89263Smrg# annoying in cross-compiling environments, where the build's strip 89925b89263Smrg# is unlikely to handle the host's binaries. 90025b89263Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 90125b89263Smrg# always use install-sh in `make install-strip', and initialize 90225b89263Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 90325b89263SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 90425b89263Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 90525b89263Smrg# Installed binaries are usually stripped using `strip' when the user 90625b89263Smrg# run `make install-strip'. However `strip' might not be the right 90725b89263Smrg# tool to use in cross-compilation environments, therefore Automake 90825b89263Smrg# will honor the `STRIP' environment variable to overrule this program. 90925b89263Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 91025b89263Smrgif test "$cross_compiling" != no; then 91125b89263Smrg AC_CHECK_TOOL([STRIP], [strip], :) 912a253d6aeSmrgfi 91325b89263SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 91425b89263SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 915a253d6aeSmrg 91625b89263Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 91725b89263Smrg# 91825b89263Smrg# This file is free software; the Free Software Foundation 91925b89263Smrg# gives unlimited permission to copy and/or distribute it, 92025b89263Smrg# with or without modifications, as long as this notice is preserved. 921a253d6aeSmrg 92225b89263Smrg# serial 2 923a253d6aeSmrg 92425b89263Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 92525b89263Smrg# --------------------------- 92625b89263Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 92725b89263Smrg# This macro is traced by Automake. 92825b89263SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 929a253d6aeSmrg 93025b89263Smrg# AM_SUBST_NOTMAKE(VARIABLE) 93125b89263Smrg# --------------------------- 93225b89263Smrg# Public sister of _AM_SUBST_NOTMAKE. 93325b89263SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 934a253d6aeSmrg 93525b89263Smrg# Check how to create a tarball. -*- Autoconf -*- 936a253d6aeSmrg 93725b89263Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 93825b89263Smrg# 93925b89263Smrg# This file is free software; the Free Software Foundation 94025b89263Smrg# gives unlimited permission to copy and/or distribute it, 94125b89263Smrg# with or without modifications, as long as this notice is preserved. 942a253d6aeSmrg 94325b89263Smrg# serial 2 944a253d6aeSmrg 94525b89263Smrg# _AM_PROG_TAR(FORMAT) 94625b89263Smrg# -------------------- 94725b89263Smrg# Check how to create a tarball in format FORMAT. 94825b89263Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 94925b89263Smrg# 95025b89263Smrg# Substitute a variable $(am__tar) that is a command 95125b89263Smrg# writing to stdout a FORMAT-tarball containing the directory 95225b89263Smrg# $tardir. 95325b89263Smrg# tardir=directory && $(am__tar) > result.tar 95425b89263Smrg# 95525b89263Smrg# Substitute a variable $(am__untar) that extract such 95625b89263Smrg# a tarball read from stdin. 95725b89263Smrg# $(am__untar) < result.tar 95825b89263SmrgAC_DEFUN([_AM_PROG_TAR], 95925b89263Smrg[# Always define AMTAR for backward compatibility. 96025b89263SmrgAM_MISSING_PROG([AMTAR], [tar]) 96125b89263Smrgm4_if([$1], [v7], 96225b89263Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 96325b89263Smrg [m4_case([$1], [ustar],, [pax],, 96425b89263Smrg [m4_fatal([Unknown tar format])]) 96525b89263SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 96625b89263Smrg# Loop over all known methods to create a tar archive until one works. 96725b89263Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 96825b89263Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 96925b89263Smrg# Do not fold the above two line into one, because Tru64 sh and 97025b89263Smrg# Solaris sh will not grok spaces in the rhs of `-'. 97125b89263Smrgfor _am_tool in $_am_tools 97225b89263Smrgdo 97325b89263Smrg case $_am_tool in 97425b89263Smrg gnutar) 97525b89263Smrg for _am_tar in tar gnutar gtar; 97625b89263Smrg do 97725b89263Smrg AM_RUN_LOG([$_am_tar --version]) && break 97825b89263Smrg done 97925b89263Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98025b89263Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98125b89263Smrg am__untar="$_am_tar -xf -" 98225b89263Smrg ;; 98325b89263Smrg plaintar) 98425b89263Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 98525b89263Smrg # ustar tarball either. 98625b89263Smrg (tar --version) >/dev/null 2>&1 && continue 98725b89263Smrg am__tar='tar chf - "$$tardir"' 98825b89263Smrg am__tar_='tar chf - "$tardir"' 98925b89263Smrg am__untar='tar xf -' 99025b89263Smrg ;; 99125b89263Smrg pax) 99225b89263Smrg am__tar='pax -L -x $1 -w "$$tardir"' 99325b89263Smrg am__tar_='pax -L -x $1 -w "$tardir"' 99425b89263Smrg am__untar='pax -r' 99525b89263Smrg ;; 99625b89263Smrg cpio) 99725b89263Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 99825b89263Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 99925b89263Smrg am__untar='cpio -i -H $1 -d' 100025b89263Smrg ;; 100125b89263Smrg none) 100225b89263Smrg am__tar=false 100325b89263Smrg am__tar_=false 100425b89263Smrg am__untar=false 100525b89263Smrg ;; 100625b89263Smrg esac 1007a253d6aeSmrg 100825b89263Smrg # If the value was cached, stop now. We just wanted to have am__tar 100925b89263Smrg # and am__untar set. 101025b89263Smrg test -n "${am_cv_prog_tar_$1}" && break 1011a253d6aeSmrg 101225b89263Smrg # tar/untar a dummy directory, and stop if the command works 101325b89263Smrg rm -rf conftest.dir 101425b89263Smrg mkdir conftest.dir 101525b89263Smrg echo GrepMe > conftest.dir/file 101625b89263Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 101725b89263Smrg rm -rf conftest.dir 101825b89263Smrg if test -s conftest.tar; then 101925b89263Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 102025b89263Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102125b89263Smrg fi 102225b89263Smrgdone 102325b89263Smrgrm -rf conftest.dir 1024a253d6aeSmrg 102525b89263SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 102625b89263SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 102725b89263SmrgAC_SUBST([am__tar]) 102825b89263SmrgAC_SUBST([am__untar]) 102925b89263Smrg]) # _AM_PROG_TAR 1030ea133fd7Smrg 103125b89263Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 103225b89263Smrgdnl 103325b89263Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 103425b89263Smrgdnl 103525b89263Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 103625b89263Smrgdnl copy of this software and associated documentation files (the "Software"), 103725b89263Smrgdnl to deal in the Software without restriction, including without limitation 103825b89263Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 103925b89263Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 104025b89263Smrgdnl Software is furnished to do so, subject to the following conditions: 104125b89263Smrgdnl 104225b89263Smrgdnl The above copyright notice and this permission notice (including the next 104325b89263Smrgdnl paragraph) shall be included in all copies or substantial portions of the 104425b89263Smrgdnl Software. 104525b89263Smrgdnl 104625b89263Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 104725b89263Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 104825b89263Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 104925b89263Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 105025b89263Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 105125b89263Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 105225b89263Smrgdnl DEALINGS IN THE SOFTWARE. 1053ea133fd7Smrg 105425b89263Smrg# XORG_MACROS_VERSION(required-version) 105525b89263Smrg# ------------------------------------- 105625b89263Smrg# Minimum version: 1.1.0 105725b89263Smrg# 105825b89263Smrg# If you're using a macro added in Version 1.1 or newer, include this in 105925b89263Smrg# your configure.ac with the minimum required version, such as: 106025b89263Smrg# XORG_MACROS_VERSION(1.1) 106125b89263Smrg# 106225b89263Smrg# To ensure that this macro is defined, also add: 106325b89263Smrg# m4_ifndef([XORG_MACROS_VERSION], 106425b89263Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 106525b89263Smrg# 106625b89263Smrg# 106725b89263Smrg# See the "minimum version" comment for each macro you use to see what 106825b89263Smrg# version you require. 106925b89263Smrgm4_defun([XORG_MACROS_VERSION],[ 107025b89263Smrgm4_define([vers_have], [1.10.1]) 107125b89263Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 107225b89263Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 107325b89263Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 107425b89263Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 107525b89263Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 107625b89263Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 107725b89263Smrgm4_undefine([vers_have]) 107825b89263Smrgm4_undefine([maj_have]) 107925b89263Smrgm4_undefine([maj_needed]) 108025b89263Smrg]) # XORG_MACROS_VERSION 1081a253d6aeSmrg 108225b89263Smrg# XORG_PROG_RAWCPP() 108325b89263Smrg# ------------------ 108425b89263Smrg# Minimum version: 1.0.0 108525b89263Smrg# 108625b89263Smrg# Find cpp program and necessary flags for use in pre-processing text files 108725b89263Smrg# such as man pages and config files 108825b89263SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 108925b89263SmrgAC_REQUIRE([AC_PROG_CPP]) 109025b89263SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 109125b89263Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1092a253d6aeSmrg 109325b89263Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 109425b89263Smrg# which is not the best choice for supporting other OS'es, but covers most 109525b89263Smrg# of the ones we need for now. 109625b89263SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 109725b89263SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 109825b89263Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 109925b89263Smrg AC_MSG_RESULT([no]) 110025b89263Smrgelse 110125b89263Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110225b89263Smrg RAWCPPFLAGS=-undef 110325b89263Smrg AC_MSG_RESULT([yes]) 110425b89263Smrg # under Cygwin unix is still defined even with -undef 110525b89263Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110625b89263Smrg RAWCPPFLAGS="-undef -ansi" 110725b89263Smrg AC_MSG_RESULT([yes, with -ansi]) 110825b89263Smrg else 110925b89263Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 111025b89263Smrg fi 111125b89263Smrgfi 111225b89263Smrgrm -f conftest.$ac_ext 1113ea133fd7Smrg 111425b89263SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 111525b89263SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 111625b89263Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 111725b89263Smrg AC_MSG_RESULT([no]) 111825b89263Smrgelse 111925b89263Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 112025b89263Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 112125b89263Smrg AC_MSG_RESULT([yes]) 112225b89263Smrg else 112325b89263Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 112425b89263Smrg fi 112525b89263Smrgfi 112625b89263Smrgrm -f conftest.$ac_ext 112725b89263SmrgAC_SUBST(RAWCPPFLAGS) 112825b89263Smrg]) # XORG_PROG_RAWCPP 1129ea133fd7Smrg 113025b89263Smrg# XORG_MANPAGE_SECTIONS() 113125b89263Smrg# ----------------------- 113225b89263Smrg# Minimum version: 1.0.0 113325b89263Smrg# 113425b89263Smrg# Determine which sections man pages go in for the different man page types 113525b89263Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 113625b89263Smrg# Not sure if there's any better way than just hardcoding by OS name. 113725b89263Smrg# Override default settings by setting environment variables 113825b89263Smrg# Added MAN_SUBSTS in version 1.8 113925b89263Smrg# Added AC_PROG_SED in version 1.8 1140ea133fd7Smrg 114125b89263SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 114225b89263SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 114325b89263SmrgAC_REQUIRE([AC_PROG_SED]) 1144ea133fd7Smrg 114525b89263Smrgif test x$APP_MAN_SUFFIX = x ; then 114625b89263Smrg APP_MAN_SUFFIX=1 114725b89263Smrgfi 114825b89263Smrgif test x$APP_MAN_DIR = x ; then 114925b89263Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 115025b89263Smrgfi 1151ea133fd7Smrg 115225b89263Smrgif test x$LIB_MAN_SUFFIX = x ; then 115325b89263Smrg LIB_MAN_SUFFIX=3 115425b89263Smrgfi 115525b89263Smrgif test x$LIB_MAN_DIR = x ; then 115625b89263Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 115725b89263Smrgfi 1158ea133fd7Smrg 115925b89263Smrgif test x$FILE_MAN_SUFFIX = x ; then 116025b89263Smrg case $host_os in 116125b89263Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 116225b89263Smrg *) FILE_MAN_SUFFIX=5 ;; 116325b89263Smrg esac 116425b89263Smrgfi 116525b89263Smrgif test x$FILE_MAN_DIR = x ; then 116625b89263Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 116725b89263Smrgfi 1168ea133fd7Smrg 116925b89263Smrgif test x$MISC_MAN_SUFFIX = x ; then 117025b89263Smrg case $host_os in 117125b89263Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 117225b89263Smrg *) MISC_MAN_SUFFIX=7 ;; 117325b89263Smrg esac 117425b89263Smrgfi 117525b89263Smrgif test x$MISC_MAN_DIR = x ; then 117625b89263Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 117725b89263Smrgfi 1178a253d6aeSmrg 117925b89263Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 118025b89263Smrg case $host_os in 118125b89263Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 118225b89263Smrg *) DRIVER_MAN_SUFFIX=4 ;; 118325b89263Smrg esac 118425b89263Smrgfi 118525b89263Smrgif test x$DRIVER_MAN_DIR = x ; then 118625b89263Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 118725b89263Smrgfi 1188a253d6aeSmrg 118925b89263Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 119025b89263Smrg case $host_os in 119125b89263Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 119225b89263Smrg *) ADMIN_MAN_SUFFIX=8 ;; 119325b89263Smrg esac 119425b89263Smrgfi 119525b89263Smrgif test x$ADMIN_MAN_DIR = x ; then 119625b89263Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 119725b89263Smrgfi 1198a253d6aeSmrg 1199a253d6aeSmrg 120025b89263SmrgAC_SUBST([APP_MAN_SUFFIX]) 120125b89263SmrgAC_SUBST([LIB_MAN_SUFFIX]) 120225b89263SmrgAC_SUBST([FILE_MAN_SUFFIX]) 120325b89263SmrgAC_SUBST([MISC_MAN_SUFFIX]) 120425b89263SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 120525b89263SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 120625b89263SmrgAC_SUBST([APP_MAN_DIR]) 120725b89263SmrgAC_SUBST([LIB_MAN_DIR]) 120825b89263SmrgAC_SUBST([FILE_MAN_DIR]) 120925b89263SmrgAC_SUBST([MISC_MAN_DIR]) 121025b89263SmrgAC_SUBST([DRIVER_MAN_DIR]) 121125b89263SmrgAC_SUBST([ADMIN_MAN_DIR]) 1212a253d6aeSmrg 121325b89263SmrgXORG_MAN_PAGE="X Version 11" 121425b89263SmrgAC_SUBST([XORG_MAN_PAGE]) 121525b89263SmrgMAN_SUBSTS="\ 121625b89263Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 121725b89263Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 121825b89263Smrg -e 's|__xservername__|Xorg|g' \ 121925b89263Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 122025b89263Smrg -e 's|__projectroot__|\$(prefix)|g' \ 122125b89263Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 122225b89263Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 122325b89263Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 122425b89263Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 122525b89263Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 122625b89263Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 122725b89263Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 122825b89263SmrgAC_SUBST([MAN_SUBSTS]) 1229a253d6aeSmrg 123025b89263Smrg]) # XORG_MANPAGE_SECTIONS 123125b89263Smrg 123225b89263Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1233ea133fd7Smrg# ------------------------ 123425b89263Smrg# Minimum version: 1.7.0 123525b89263Smrg# 123625b89263Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 123725b89263Smrg# provided by xorg-sgml-doctools, if installed. 123825b89263SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 123925b89263SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 124025b89263SmrgXORG_SGML_PATH= 124125b89263SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 124225b89263Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 124325b89263Smrg [m4_ifval([$1],[:], 124425b89263Smrg [if test x"$cross_compiling" != x"yes" ; then 124525b89263Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 124625b89263Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 124725b89263Smrg fi]) 124825b89263Smrg ]) 1249a253d6aeSmrg 125025b89263Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 125125b89263Smrg# the path and the name of the doc stylesheet 125225b89263Smrgif test "x$XORG_SGML_PATH" != "x" ; then 125325b89263Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 125425b89263Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 125525b89263Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 125625b89263Smrgelse 125725b89263Smrg AC_MSG_RESULT([no]) 125825b89263Smrgfi 1259ea133fd7Smrg 126025b89263SmrgAC_SUBST(XORG_SGML_PATH) 126125b89263SmrgAC_SUBST(STYLESHEET_SRCDIR) 126225b89263SmrgAC_SUBST(XSL_STYLESHEET) 126325b89263SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 126425b89263Smrg]) # XORG_CHECK_SGML_DOCTOOLS 1265ea133fd7Smrg 126625b89263Smrg# XORG_CHECK_LINUXDOC 126725b89263Smrg# ------------------- 126825b89263Smrg# Minimum version: 1.0.0 126925b89263Smrg# 127025b89263Smrg# Defines the variable MAKE_TEXT if the necessary tools and 127125b89263Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 127225b89263Smrg# Whether or not the necessary tools and files are found can be checked 127325b89263Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 127425b89263SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 127525b89263SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 127625b89263SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1277ea133fd7Smrg 127825b89263SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1279a253d6aeSmrg 128025b89263SmrgAC_MSG_CHECKING([whether to build documentation]) 1281a253d6aeSmrg 128225b89263Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 128325b89263Smrg BUILDDOC=yes 128425b89263Smrgelse 128525b89263Smrg BUILDDOC=no 128625b89263Smrgfi 1287a253d6aeSmrg 128825b89263SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1289a253d6aeSmrg 129025b89263SmrgAC_MSG_RESULT([$BUILDDOC]) 1291a253d6aeSmrg 129225b89263SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1293a253d6aeSmrg 129425b89263Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 129525b89263Smrg BUILDPDFDOC=yes 1296a253d6aeSmrgelse 129725b89263Smrg BUILDPDFDOC=no 1298a253d6aeSmrgfi 1299a253d6aeSmrg 130025b89263SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1301a253d6aeSmrg 130225b89263SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1303a253d6aeSmrg 130425b89263SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 130525b89263SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 130625b89263SmrgMAKE_PDF="$PS2PDF" 130725b89263SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1308a253d6aeSmrg 130925b89263SmrgAC_SUBST(MAKE_TEXT) 131025b89263SmrgAC_SUBST(MAKE_PS) 131125b89263SmrgAC_SUBST(MAKE_PDF) 131225b89263SmrgAC_SUBST(MAKE_HTML) 131325b89263Smrg]) # XORG_CHECK_LINUXDOC 1314a253d6aeSmrg 131525b89263Smrg# XORG_CHECK_DOCBOOK 131625b89263Smrg# ------------------- 131725b89263Smrg# Minimum version: 1.0.0 131825b89263Smrg# 131925b89263Smrg# Checks for the ability to build output formats from SGML DocBook source. 132025b89263Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 132125b89263Smrg# indicates whether the necessary tools and files are found and, if set, 132225b89263Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 132325b89263SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 132425b89263SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1325a253d6aeSmrg 132625b89263SmrgBUILDTXTDOC=no 132725b89263SmrgBUILDPDFDOC=no 132825b89263SmrgBUILDPSDOC=no 132925b89263SmrgBUILDHTMLDOC=no 1330a253d6aeSmrg 133125b89263SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 133225b89263SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 133325b89263SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 133425b89263SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1335a253d6aeSmrg 133625b89263SmrgAC_MSG_CHECKING([whether to build text documentation]) 133725b89263Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 133825b89263Smrg test x$BUILD_TXTDOC != xno; then 133925b89263Smrg BUILDTXTDOC=yes 1340a253d6aeSmrgfi 134125b89263SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 134225b89263SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1343a253d6aeSmrg 134425b89263SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 134525b89263Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 134625b89263Smrg test x$BUILD_PDFDOC != xno; then 134725b89263Smrg BUILDPDFDOC=yes 1348a253d6aeSmrgfi 134925b89263SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 135025b89263SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1351a253d6aeSmrg 135225b89263SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 135325b89263Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 135425b89263Smrg test x$BUILD_PSDOC != xno; then 135525b89263Smrg BUILDPSDOC=yes 135625b89263Smrgfi 135725b89263SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 135825b89263SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1359a253d6aeSmrg 136025b89263SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 136125b89263Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 136225b89263Smrg test x$BUILD_HTMLDOC != xno; then 136325b89263Smrg BUILDHTMLDOC=yes 136425b89263Smrgfi 136525b89263SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 136625b89263SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1367a253d6aeSmrg 136825b89263SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 136925b89263SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 137025b89263SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 137125b89263SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1372a253d6aeSmrg 137325b89263SmrgAC_SUBST(MAKE_TEXT) 137425b89263SmrgAC_SUBST(MAKE_PS) 137525b89263SmrgAC_SUBST(MAKE_PDF) 137625b89263SmrgAC_SUBST(MAKE_HTML) 137725b89263Smrg]) # XORG_CHECK_DOCBOOK 1378a253d6aeSmrg 137925b89263Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 138025b89263Smrg# ---------------- 138125b89263Smrg# Minimum version: 1.5.0 138225b89263Smrg# 138325b89263Smrg# Documentation tools are not always available on all platforms and sometimes 138425b89263Smrg# not at the appropriate level. This macro enables a module to test for the 138525b89263Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 138625b89263Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 138725b89263Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 138825b89263Smrg# --with-xmlto assumes 'auto'. 138925b89263Smrg# 139025b89263Smrg# Interface to module: 139125b89263Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 139225b89263Smrg# XMLTO: returns the path of the xmlto program found 139325b89263Smrg# returns the path set by the user in the environment 139425b89263Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 139525b89263Smrg# 'no' user instructs the module not to use xmlto 139625b89263Smrg# 139725b89263Smrg# Added in version 1.10.0 139825b89263Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 139925b89263Smrg# xmlto for text output requires either lynx, links, or w3m browsers 140025b89263Smrg# 140125b89263Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 140225b89263Smrg# 140325b89263SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 140425b89263SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 140525b89263Smrgm4_define([_defopt], m4_default([$2], [auto])) 140625b89263SmrgAC_ARG_WITH(xmlto, 140725b89263Smrg AS_HELP_STRING([--with-xmlto], 140825b89263Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 140925b89263Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 141025b89263Smrgm4_undefine([_defopt]) 141125b89263Smrg 141225b89263Smrgif test "x$use_xmlto" = x"auto"; then 141325b89263Smrg AC_PATH_PROG([XMLTO], [xmlto]) 141425b89263Smrg if test "x$XMLTO" = "x"; then 141525b89263Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 141625b89263Smrg have_xmlto=no 141725b89263Smrg else 141825b89263Smrg have_xmlto=yes 141925b89263Smrg fi 142025b89263Smrgelif test "x$use_xmlto" = x"yes" ; then 142125b89263Smrg AC_PATH_PROG([XMLTO], [xmlto]) 142225b89263Smrg if test "x$XMLTO" = "x"; then 142325b89263Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 142425b89263Smrg fi 142525b89263Smrg have_xmlto=yes 142625b89263Smrgelif test "x$use_xmlto" = x"no" ; then 142725b89263Smrg if test "x$XMLTO" != "x"; then 142825b89263Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 142925b89263Smrg fi 143025b89263Smrg have_xmlto=no 143125b89263Smrgelse 143225b89263Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 143325b89263Smrgfi 1434a253d6aeSmrg 143525b89263Smrg# Test for a minimum version of xmlto, if provided. 143625b89263Smrgm4_ifval([$1], 143725b89263Smrg[if test "$have_xmlto" = yes; then 143825b89263Smrg # scrape the xmlto version 143925b89263Smrg AC_MSG_CHECKING([the xmlto version]) 144025b89263Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 144125b89263Smrg AC_MSG_RESULT([$xmlto_version]) 144225b89263Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 144325b89263Smrg [if test "x$use_xmlto" = xauto; then 144425b89263Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 144525b89263Smrg have_xmlto=no 144625b89263Smrg else 144725b89263Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 144825b89263Smrg fi]) 144925b89263Smrgfi]) 1450a253d6aeSmrg 145125b89263Smrg# Test for the ability of xmlto to generate a text target 145225b89263Smrghave_xmlto_text=no 145325b89263Smrgcat > conftest.xml << "EOF" 145425b89263SmrgEOF 145525b89263SmrgAS_IF([test "$have_xmlto" = yes], 145625b89263Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 145725b89263Smrg [have_xmlto_text=yes], 145825b89263Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 145925b89263Smrgrm -f conftest.xml 146025b89263SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 146125b89263SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 146225b89263Smrg]) # XORG_WITH_XMLTO 146325b89263Smrg 146425b89263Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 146525b89263Smrg# ---------------- 146625b89263Smrg# Minimum version: 1.5.0 146725b89263Smrg# 146825b89263Smrg# Documentation tools are not always available on all platforms and sometimes 146925b89263Smrg# not at the appropriate level. This macro enables a module to test for the 147025b89263Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 147125b89263Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 147225b89263Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 147325b89263Smrg# --with-asciidoc assumes 'auto'. 147425b89263Smrg# 147525b89263Smrg# Interface to module: 147625b89263Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 147725b89263Smrg# ASCIIDOC: returns the path of the asciidoc program found 147825b89263Smrg# returns the path set by the user in the environment 147925b89263Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 148025b89263Smrg# 'no' user instructs the module not to use asciidoc 148125b89263Smrg# 148225b89263Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 148325b89263Smrg# 148425b89263SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 148525b89263SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 148625b89263Smrgm4_define([_defopt], m4_default([$2], [auto])) 148725b89263SmrgAC_ARG_WITH(asciidoc, 148825b89263Smrg AS_HELP_STRING([--with-asciidoc], 148925b89263Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 149025b89263Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 149125b89263Smrgm4_undefine([_defopt]) 149225b89263Smrg 149325b89263Smrgif test "x$use_asciidoc" = x"auto"; then 149425b89263Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 149525b89263Smrg if test "x$ASCIIDOC" = "x"; then 149625b89263Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 149725b89263Smrg have_asciidoc=no 149825b89263Smrg else 149925b89263Smrg have_asciidoc=yes 150025b89263Smrg fi 150125b89263Smrgelif test "x$use_asciidoc" = x"yes" ; then 150225b89263Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 150325b89263Smrg if test "x$ASCIIDOC" = "x"; then 150425b89263Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 150525b89263Smrg fi 150625b89263Smrg have_asciidoc=yes 150725b89263Smrgelif test "x$use_asciidoc" = x"no" ; then 150825b89263Smrg if test "x$ASCIIDOC" != "x"; then 150925b89263Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 151025b89263Smrg fi 151125b89263Smrg have_asciidoc=no 151225b89263Smrgelse 151325b89263Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 151425b89263Smrgfi 151525b89263Smrgm4_ifval([$1], 151625b89263Smrg[if test "$have_asciidoc" = yes; then 151725b89263Smrg # scrape the asciidoc version 151825b89263Smrg AC_MSG_CHECKING([the asciidoc version]) 151925b89263Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 152025b89263Smrg AC_MSG_RESULT([$asciidoc_version]) 152125b89263Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 152225b89263Smrg [if test "x$use_asciidoc" = xauto; then 152325b89263Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 152425b89263Smrg have_asciidoc=no 152525b89263Smrg else 152625b89263Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 152725b89263Smrg fi]) 152825b89263Smrgfi]) 152925b89263SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 153025b89263Smrg]) # XORG_WITH_ASCIIDOC 1531a253d6aeSmrg 153225b89263Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 153325b89263Smrg# -------------------------------- 153425b89263Smrg# Minimum version: 1.5.0 153525b89263Smrg# 153625b89263Smrg# Documentation tools are not always available on all platforms and sometimes 153725b89263Smrg# not at the appropriate level. This macro enables a module to test for the 153825b89263Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 153925b89263Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 154025b89263Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 154125b89263Smrg# --with-doxygen assumes 'auto'. 154225b89263Smrg# 154325b89263Smrg# Interface to module: 154425b89263Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 154525b89263Smrg# DOXYGEN: returns the path of the doxygen program found 154625b89263Smrg# returns the path set by the user in the environment 154725b89263Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 154825b89263Smrg# 'no' user instructs the module not to use doxygen 154925b89263Smrg# 155025b89263Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 155125b89263Smrg# 155225b89263SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 155325b89263SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 155425b89263Smrgm4_define([_defopt], m4_default([$2], [auto])) 155525b89263SmrgAC_ARG_WITH(doxygen, 155625b89263Smrg AS_HELP_STRING([--with-doxygen], 155725b89263Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 155825b89263Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 155925b89263Smrgm4_undefine([_defopt]) 156025b89263Smrg 156125b89263Smrgif test "x$use_doxygen" = x"auto"; then 156225b89263Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 156325b89263Smrg if test "x$DOXYGEN" = "x"; then 156425b89263Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 156525b89263Smrg have_doxygen=no 156625b89263Smrg else 156725b89263Smrg have_doxygen=yes 156825b89263Smrg fi 156925b89263Smrgelif test "x$use_doxygen" = x"yes" ; then 157025b89263Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 157125b89263Smrg if test "x$DOXYGEN" = "x"; then 157225b89263Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 157325b89263Smrg fi 157425b89263Smrg have_doxygen=yes 157525b89263Smrgelif test "x$use_doxygen" = x"no" ; then 157625b89263Smrg if test "x$DOXYGEN" != "x"; then 157725b89263Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 157825b89263Smrg fi 157925b89263Smrg have_doxygen=no 158025b89263Smrgelse 158125b89263Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 158225b89263Smrgfi 158325b89263Smrgm4_ifval([$1], 158425b89263Smrg[if test "$have_doxygen" = yes; then 158525b89263Smrg # scrape the doxygen version 158625b89263Smrg AC_MSG_CHECKING([the doxygen version]) 158725b89263Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 158825b89263Smrg AC_MSG_RESULT([$doxygen_version]) 158925b89263Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 159025b89263Smrg [if test "x$use_doxygen" = xauto; then 159125b89263Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 159225b89263Smrg have_doxygen=no 159325b89263Smrg else 159425b89263Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 159525b89263Smrg fi]) 159625b89263Smrgfi]) 159725b89263SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 159825b89263Smrg]) # XORG_WITH_DOXYGEN 1599a253d6aeSmrg 160025b89263Smrg# XORG_WITH_GROFF([DEFAULT]) 160125b89263Smrg# ---------------- 160225b89263Smrg# Minimum version: 1.6.0 160325b89263Smrg# 160425b89263Smrg# Documentation tools are not always available on all platforms and sometimes 160525b89263Smrg# not at the appropriate level. This macro enables a module to test for the 160625b89263Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 160725b89263Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 160825b89263Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 160925b89263Smrg# --with-groff assumes 'auto'. 161025b89263Smrg# 161125b89263Smrg# Interface to module: 161225b89263Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 161325b89263Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 161425b89263Smrg# HAVE_GROFF_MS: the -ms macros package 161525b89263Smrg# GROFF: returns the path of the groff program found 161625b89263Smrg# returns the path set by the user in the environment 161725b89263Smrg# --with-groff: 'yes' user instructs the module to use groff 161825b89263Smrg# 'no' user instructs the module not to use groff 161925b89263Smrg# 162025b89263Smrg# Added in version 1.9.0: 162125b89263Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 162225b89263Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 162325b89263Smrg# psselect from the psutils package. 162425b89263Smrg# the ghostcript package. Refer to the grohtml man pages 162525b89263Smrg# 162625b89263Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 162725b89263Smrg# 162825b89263Smrg# OS and distros often splits groff in a basic and full package, the former 162925b89263Smrg# having the groff program and the later having devices, fonts and macros 163025b89263Smrg# Checking for the groff executable is not enough. 163125b89263Smrg# 163225b89263Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 163325b89263Smrg# unset HAVE_GROFF or GROFF env variables. 163425b89263Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 163525b89263Smrg# 163625b89263SmrgAC_DEFUN([XORG_WITH_GROFF],[ 163725b89263SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 163825b89263Smrgm4_define([_defopt], m4_default([$1], [auto])) 163925b89263SmrgAC_ARG_WITH(groff, 164025b89263Smrg AS_HELP_STRING([--with-groff], 164125b89263Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 164225b89263Smrg [use_groff=$withval], [use_groff=]_defopt) 164325b89263Smrgm4_undefine([_defopt]) 164425b89263Smrg 164525b89263Smrgif test "x$use_groff" = x"auto"; then 164625b89263Smrg AC_PATH_PROG([GROFF], [groff]) 164725b89263Smrg if test "x$GROFF" = "x"; then 164825b89263Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 164925b89263Smrg have_groff=no 165025b89263Smrg else 165125b89263Smrg have_groff=yes 165225b89263Smrg fi 165325b89263Smrgelif test "x$use_groff" = x"yes" ; then 165425b89263Smrg AC_PATH_PROG([GROFF], [groff]) 165525b89263Smrg if test "x$GROFF" = "x"; then 165625b89263Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 165725b89263Smrg fi 165825b89263Smrg have_groff=yes 165925b89263Smrgelif test "x$use_groff" = x"no" ; then 166025b89263Smrg if test "x$GROFF" != "x"; then 166125b89263Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 166225b89263Smrg fi 166325b89263Smrg have_groff=no 166425b89263Smrgelse 166525b89263Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 166625b89263Smrgfi 1667a253d6aeSmrg 166825b89263Smrg# We have groff, test for the presence of the macro packages 166925b89263Smrgif test "x$have_groff" = x"yes"; then 167025b89263Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 167125b89263Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 167225b89263Smrg groff_ms_works=yes 167325b89263Smrg else 167425b89263Smrg groff_ms_works=no 167525b89263Smrg fi 167625b89263Smrg AC_MSG_RESULT([$groff_ms_works]) 167725b89263Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 167825b89263Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 167925b89263Smrg groff_mm_works=yes 168025b89263Smrg else 168125b89263Smrg groff_mm_works=no 168225b89263Smrg fi 168325b89263Smrg AC_MSG_RESULT([$groff_mm_works]) 168425b89263Smrgfi 1685a253d6aeSmrg 168625b89263Smrg# We have groff, test for HTML dependencies, one command per package 168725b89263Smrgif test "x$have_groff" = x"yes"; then 168825b89263Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 168925b89263Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 169025b89263Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 169125b89263Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 169225b89263Smrg have_groff_html=yes 169325b89263Smrg else 169425b89263Smrg have_groff_html=no 169525b89263Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 169625b89263Smrg fi 1697a253d6aeSmrgfi 1698a253d6aeSmrg 169925b89263Smrg# Set Automake conditionals for Makefiles 170025b89263SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 170125b89263SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 170225b89263SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 170325b89263SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 170425b89263Smrg]) # XORG_WITH_GROFF 1705a253d6aeSmrg 170625b89263Smrg# XORG_WITH_FOP([DEFAULT]) 170725b89263Smrg# ---------------- 170825b89263Smrg# Minimum version: 1.6.0 170925b89263Smrg# 171025b89263Smrg# Documentation tools are not always available on all platforms and sometimes 171125b89263Smrg# not at the appropriate level. This macro enables a module to test for the 171225b89263Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 171325b89263Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 171425b89263Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 171525b89263Smrg# --with-fop assumes 'auto'. 171625b89263Smrg# 171725b89263Smrg# Interface to module: 171825b89263Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 171925b89263Smrg# FOP: returns the path of the fop program found 172025b89263Smrg# returns the path set by the user in the environment 172125b89263Smrg# --with-fop: 'yes' user instructs the module to use fop 172225b89263Smrg# 'no' user instructs the module not to use fop 172325b89263Smrg# 172425b89263Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 172525b89263Smrg# 172625b89263SmrgAC_DEFUN([XORG_WITH_FOP],[ 172725b89263SmrgAC_ARG_VAR([FOP], [Path to fop command]) 172825b89263Smrgm4_define([_defopt], m4_default([$1], [auto])) 172925b89263SmrgAC_ARG_WITH(fop, 173025b89263Smrg AS_HELP_STRING([--with-fop], 173125b89263Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 173225b89263Smrg [use_fop=$withval], [use_fop=]_defopt) 173325b89263Smrgm4_undefine([_defopt]) 173425b89263Smrg 173525b89263Smrgif test "x$use_fop" = x"auto"; then 173625b89263Smrg AC_PATH_PROG([FOP], [fop]) 173725b89263Smrg if test "x$FOP" = "x"; then 173825b89263Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 173925b89263Smrg have_fop=no 174025b89263Smrg else 174125b89263Smrg have_fop=yes 1742ea133fd7Smrg fi 174325b89263Smrgelif test "x$use_fop" = x"yes" ; then 174425b89263Smrg AC_PATH_PROG([FOP], [fop]) 174525b89263Smrg if test "x$FOP" = "x"; then 174625b89263Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 174725b89263Smrg fi 174825b89263Smrg have_fop=yes 174925b89263Smrgelif test "x$use_fop" = x"no" ; then 175025b89263Smrg if test "x$FOP" != "x"; then 175125b89263Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 175225b89263Smrg fi 175325b89263Smrg have_fop=no 1754ea133fd7Smrgelse 175525b89263Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1756ea133fd7Smrgfi 175725b89263SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 175825b89263Smrg]) # XORG_WITH_FOP 1759a253d6aeSmrg 176025b89263Smrg# XORG_WITH_PS2PDF([DEFAULT]) 176125b89263Smrg# ---------------- 176225b89263Smrg# Minimum version: 1.6.0 176325b89263Smrg# 176425b89263Smrg# Documentation tools are not always available on all platforms and sometimes 176525b89263Smrg# not at the appropriate level. This macro enables a module to test for the 176625b89263Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 176725b89263Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 176825b89263Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 176925b89263Smrg# --with-ps2pdf assumes 'auto'. 177025b89263Smrg# 177125b89263Smrg# Interface to module: 177225b89263Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 177325b89263Smrg# PS2PDF: returns the path of the ps2pdf program found 177425b89263Smrg# returns the path set by the user in the environment 177525b89263Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 177625b89263Smrg# 'no' user instructs the module not to use ps2pdf 177725b89263Smrg# 177825b89263Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 177925b89263Smrg# 178025b89263SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 178125b89263SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 178225b89263Smrgm4_define([_defopt], m4_default([$1], [auto])) 178325b89263SmrgAC_ARG_WITH(ps2pdf, 178425b89263Smrg AS_HELP_STRING([--with-ps2pdf], 178525b89263Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 178625b89263Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 178725b89263Smrgm4_undefine([_defopt]) 178825b89263Smrg 178925b89263Smrgif test "x$use_ps2pdf" = x"auto"; then 179025b89263Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 179125b89263Smrg if test "x$PS2PDF" = "x"; then 179225b89263Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 179325b89263Smrg have_ps2pdf=no 179425b89263Smrg else 179525b89263Smrg have_ps2pdf=yes 1796ea133fd7Smrg fi 179725b89263Smrgelif test "x$use_ps2pdf" = x"yes" ; then 179825b89263Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 179925b89263Smrg if test "x$PS2PDF" = "x"; then 180025b89263Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 180125b89263Smrg fi 180225b89263Smrg have_ps2pdf=yes 180325b89263Smrgelif test "x$use_ps2pdf" = x"no" ; then 180425b89263Smrg if test "x$PS2PDF" != "x"; then 180525b89263Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 180625b89263Smrg fi 180725b89263Smrg have_ps2pdf=no 1808ea133fd7Smrgelse 180925b89263Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1810ea133fd7Smrgfi 181125b89263SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 181225b89263Smrg]) # XORG_WITH_PS2PDF 1813a253d6aeSmrg 181425b89263Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 181525b89263Smrg# ---------------- 181625b89263Smrg# Minimum version: 1.6.0 181725b89263Smrg# 181825b89263Smrg# Documentation tools are not always available on all platforms and sometimes 181925b89263Smrg# not at the appropriate level. This macro enables a builder to skip all 182025b89263Smrg# documentation targets except traditional man pages. 182125b89263Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 182225b89263Smrg# maximum flexibilty in controlling documentation building. 182325b89263Smrg# Refer to: 182425b89263Smrg# XORG_WITH_XMLTO --with-xmlto 182525b89263Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 182625b89263Smrg# XORG_WITH_DOXYGEN --with-doxygen 182725b89263Smrg# XORG_WITH_FOP --with-fop 182825b89263Smrg# XORG_WITH_GROFF --with-groff 182925b89263Smrg# XORG_WITH_PS2PDF --with-ps2pdf 183025b89263Smrg# 183125b89263Smrg# Interface to module: 183225b89263Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 183325b89263Smrg# --enable-docs: 'yes' user instructs the module to generate docs 183425b89263Smrg# 'no' user instructs the module not to generate docs 183525b89263Smrg# parm1: specify the default value, yes or no. 183625b89263Smrg# 183725b89263SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 183825b89263Smrgm4_define([default], m4_default([$1], [yes])) 183925b89263SmrgAC_ARG_ENABLE(docs, 184025b89263Smrg AS_HELP_STRING([--enable-docs], 184125b89263Smrg [Enable building the documentation (default: ]default[)]), 184225b89263Smrg [build_docs=$enableval], [build_docs=]default) 184325b89263Smrgm4_undefine([default]) 184425b89263SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 184525b89263SmrgAC_MSG_CHECKING([whether to build documentation]) 184625b89263SmrgAC_MSG_RESULT([$build_docs]) 184725b89263Smrg]) # XORG_ENABLE_DOCS 184825b89263Smrg 184925b89263Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 185025b89263Smrg# ---------------- 185125b89263Smrg# Minimum version: 1.6.0 185225b89263Smrg# 185325b89263Smrg# This macro enables a builder to skip all developer documentation. 185425b89263Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 185525b89263Smrg# maximum flexibilty in controlling documentation building. 185625b89263Smrg# Refer to: 185725b89263Smrg# XORG_WITH_XMLTO --with-xmlto 185825b89263Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 185925b89263Smrg# XORG_WITH_DOXYGEN --with-doxygen 186025b89263Smrg# XORG_WITH_FOP --with-fop 186125b89263Smrg# XORG_WITH_GROFF --with-groff 186225b89263Smrg# XORG_WITH_PS2PDF --with-ps2pdf 186325b89263Smrg# 186425b89263Smrg# Interface to module: 186525b89263Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 186625b89263Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 186725b89263Smrg# 'no' user instructs the module not to generate developer docs 186825b89263Smrg# parm1: specify the default value, yes or no. 186925b89263Smrg# 187025b89263SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 187125b89263Smrgm4_define([devel_default], m4_default([$1], [yes])) 187225b89263SmrgAC_ARG_ENABLE(devel-docs, 187325b89263Smrg AS_HELP_STRING([--enable-devel-docs], 187425b89263Smrg [Enable building the developer documentation (default: ]devel_default[)]), 187525b89263Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 187625b89263Smrgm4_undefine([devel_default]) 187725b89263SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 187825b89263SmrgAC_MSG_CHECKING([whether to build developer documentation]) 187925b89263SmrgAC_MSG_RESULT([$build_devel_docs]) 188025b89263Smrg]) # XORG_ENABLE_DEVEL_DOCS 188125b89263Smrg 188225b89263Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 188325b89263Smrg# ---------------- 188425b89263Smrg# Minimum version: 1.6.0 188525b89263Smrg# 188625b89263Smrg# This macro enables a builder to skip all functional specification targets. 188725b89263Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 188825b89263Smrg# maximum flexibilty in controlling documentation building. 188925b89263Smrg# Refer to: 189025b89263Smrg# XORG_WITH_XMLTO --with-xmlto 189125b89263Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 189225b89263Smrg# XORG_WITH_DOXYGEN --with-doxygen 189325b89263Smrg# XORG_WITH_FOP --with-fop 189425b89263Smrg# XORG_WITH_GROFF --with-groff 189525b89263Smrg# XORG_WITH_PS2PDF --with-ps2pdf 189625b89263Smrg# 189725b89263Smrg# Interface to module: 189825b89263Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 189925b89263Smrg# --enable-specs: 'yes' user instructs the module to generate specs 190025b89263Smrg# 'no' user instructs the module not to generate specs 190125b89263Smrg# parm1: specify the default value, yes or no. 190225b89263Smrg# 190325b89263SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 190425b89263Smrgm4_define([spec_default], m4_default([$1], [yes])) 190525b89263SmrgAC_ARG_ENABLE(specs, 190625b89263Smrg AS_HELP_STRING([--enable-specs], 190725b89263Smrg [Enable building the specs (default: ]spec_default[)]), 190825b89263Smrg [build_specs=$enableval], [build_specs=]spec_default) 190925b89263Smrgm4_undefine([spec_default]) 191025b89263SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 191125b89263SmrgAC_MSG_CHECKING([whether to build functional specifications]) 191225b89263SmrgAC_MSG_RESULT([$build_specs]) 191325b89263Smrg]) # XORG_ENABLE_SPECS 1914a253d6aeSmrg 191525b89263Smrg# XORG_CHECK_MALLOC_ZERO 191625b89263Smrg# ---------------------- 191725b89263Smrg# Minimum version: 1.0.0 191825b89263Smrg# 191925b89263Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 192025b89263Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 192125b89263Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 192225b89263SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 192325b89263SmrgAC_ARG_ENABLE(malloc0returnsnull, 192425b89263Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 192525b89263Smrg [malloc(0) returns NULL (default: auto)]), 192625b89263Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 192725b89263Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1928a253d6aeSmrg 192925b89263SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 193025b89263Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 193125b89263Smrg AC_RUN_IFELSE([ 193225b89263Smrgchar *malloc(); 193325b89263Smrgchar *realloc(); 193425b89263Smrgchar *calloc(); 193525b89263Smrgmain() { 193625b89263Smrg char *m0, *r0, *c0, *p; 193725b89263Smrg m0 = malloc(0); 193825b89263Smrg p = malloc(10); 193925b89263Smrg r0 = realloc(p,0); 194025b89263Smrg c0 = calloc(0); 194125b89263Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 194225b89263Smrg}], 194325b89263Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 194425b89263Smrg [MALLOC_ZERO_RETURNS_NULL=no], 194525b89263Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 194625b89263Smrgfi 194725b89263SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1948a253d6aeSmrg 194925b89263Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 195025b89263Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 195125b89263Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 195225b89263Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 195325b89263Smrgelse 195425b89263Smrg MALLOC_ZERO_CFLAGS="" 195525b89263Smrg XMALLOC_ZERO_CFLAGS="" 195625b89263Smrg XTMALLOC_ZERO_CFLAGS="" 195725b89263Smrgfi 1958a253d6aeSmrg 195925b89263SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 196025b89263SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 196125b89263SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 196225b89263Smrg]) # XORG_CHECK_MALLOC_ZERO 1963a253d6aeSmrg 196425b89263Smrg# XORG_WITH_LINT() 196525b89263Smrg# ---------------- 196625b89263Smrg# Minimum version: 1.1.0 196725b89263Smrg# 196825b89263Smrg# This macro enables the use of a tool that flags some suspicious and 196925b89263Smrg# non-portable constructs (likely to be bugs) in C language source code. 197025b89263Smrg# It will attempt to locate the tool and use appropriate options. 197125b89263Smrg# There are various lint type tools on different platforms. 197225b89263Smrg# 197325b89263Smrg# Interface to module: 197425b89263Smrg# LINT: returns the path to the tool found on the platform 197525b89263Smrg# or the value set to LINT on the configure cmd line 197625b89263Smrg# also an Automake conditional 197725b89263Smrg# LINT_FLAGS: an Automake variable with appropriate flags 197825b89263Smrg# 197925b89263Smrg# --with-lint: 'yes' user instructs the module to use lint 198025b89263Smrg# 'no' user instructs the module not to use lint (default) 198125b89263Smrg# 198225b89263Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 198325b89263Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 198425b89263Smrg# 198525b89263SmrgAC_DEFUN([XORG_WITH_LINT],[ 1986a253d6aeSmrg 198725b89263SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 198825b89263SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 198925b89263SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 199025b89263Smrg [Use a lint-style source code checker (default: disabled)])], 199125b89263Smrg [use_lint=$withval], [use_lint=no]) 1992a253d6aeSmrg 199325b89263Smrg# Obtain platform specific info like program name and options 199425b89263Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 199525b89263Smrgcase $host_os in 199625b89263Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 199725b89263Smrg lint_name=splint 199825b89263Smrg lint_options="-badflag" 199925b89263Smrg ;; 200025b89263Smrg *freebsd* | *netbsd*) 200125b89263Smrg lint_name=lint 200225b89263Smrg lint_options="-u -b" 200325b89263Smrg ;; 200425b89263Smrg *solaris*) 200525b89263Smrg lint_name=lint 200625b89263Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 200725b89263Smrg ;; 200825b89263Smrgesac 2009a253d6aeSmrg 201025b89263Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 201125b89263Smrgif test "x$use_lint" = x"yes" ; then 201225b89263Smrg AC_PATH_PROG([LINT], [$lint_name]) 201325b89263Smrg if test "x$LINT" = "x"; then 201425b89263Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 201525b89263Smrg fi 201625b89263Smrgelif test "x$use_lint" = x"no" ; then 201725b89263Smrg if test "x$LINT" != "x"; then 201825b89263Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 201925b89263Smrg fi 2020ea133fd7Smrgelse 202125b89263Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2022a253d6aeSmrgfi 2023a253d6aeSmrg 202425b89263Smrg# User supplied flags override default flags 202525b89263Smrgif test "x$LINT_FLAGS" != "x"; then 202625b89263Smrg lint_options=$LINT_FLAGS 202725b89263Smrgfi 2028a253d6aeSmrg 202925b89263SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 203025b89263SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2031a253d6aeSmrg 203225b89263Smrg]) # XORG_WITH_LINT 2033a253d6aeSmrg 203425b89263Smrg# XORG_LINT_LIBRARY(LIBNAME) 203525b89263Smrg# -------------------------- 203625b89263Smrg# Minimum version: 1.1.0 203725b89263Smrg# 203825b89263Smrg# Sets up flags for building lint libraries for checking programs that call 203925b89263Smrg# functions in the library. 204025b89263Smrg# 204125b89263Smrg# Interface to module: 204225b89263Smrg# LINTLIB - Automake variable with the name of lint library file to make 204325b89263Smrg# MAKE_LINT_LIB - Automake conditional 204425b89263Smrg# 204525b89263Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 204625b89263Smrg# - 'no' user instructs the module not to create a lint library (default) 2047a253d6aeSmrg 204825b89263SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 204925b89263SmrgAC_REQUIRE([XORG_WITH_LINT]) 205025b89263SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 205125b89263Smrg [Create lint library (default: disabled)])], 205225b89263Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2053a253d6aeSmrg 205425b89263Smrgif test "x$make_lint_lib" = x"yes" ; then 205525b89263Smrg LINTLIB=llib-l$1.ln 205625b89263Smrg if test "x$LINT" = "x"; then 205725b89263Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 205825b89263Smrg fi 205925b89263Smrgelif test "x$make_lint_lib" != x"no" ; then 206025b89263Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 206125b89263Smrgfi 2062a253d6aeSmrg 206325b89263SmrgAC_SUBST(LINTLIB) 206425b89263SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2065a253d6aeSmrg 206625b89263Smrg]) # XORG_LINT_LIBRARY 2067a253d6aeSmrg 206825b89263Smrg# XORG_CWARNFLAGS 206925b89263Smrg# --------------- 207025b89263Smrg# Minimum version: 1.2.0 207125b89263Smrg# 207225b89263Smrg# Defines CWARNFLAGS to enable C compiler warnings. 207325b89263Smrg# 207425b89263SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 207525b89263SmrgAC_REQUIRE([AC_PROG_CC_C99]) 207625b89263Smrgif test "x$GCC" = xyes ; then 207725b89263Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 207825b89263Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 207925b89263Smrg-Wbad-function-cast -Wformat=2" 208025b89263Smrg case `$CC -dumpversion` in 208125b89263Smrg 3.4.* | 4.*) 208225b89263Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 208325b89263Smrg ;; 2084ea133fd7Smrg esac 208525b89263Smrgelse 208625b89263Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 208725b89263Smrg if test "x$SUNCC" = "xyes"; then 208825b89263Smrg CWARNFLAGS="-v" 208925b89263Smrg fi 2090ea133fd7Smrgfi 209125b89263SmrgAC_SUBST(CWARNFLAGS) 209225b89263Smrg]) # XORG_CWARNFLAGS 2093a253d6aeSmrg 209425b89263Smrg# XORG_STRICT_OPTION 209525b89263Smrg# ----------------------- 209625b89263Smrg# Minimum version: 1.3.0 209725b89263Smrg# 209825b89263Smrg# Add configure option to enable strict compilation 209925b89263SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 210025b89263Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 210125b89263SmrgAC_REQUIRE([AC_PROG_CC_C99]) 210225b89263SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 2103a253d6aeSmrg 210425b89263SmrgAC_ARG_ENABLE(strict-compilation, 210525b89263Smrg AS_HELP_STRING([--enable-strict-compilation], 210625b89263Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 210725b89263Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 210825b89263Smrgif test "x$STRICT_COMPILE" = "xyes"; then 210925b89263Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 211025b89263Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 211125b89263Smrg if test "x$GCC" = xyes ; then 211225b89263Smrg STRICT_CFLAGS="-pedantic -Werror" 211325b89263Smrg elif test "x$SUNCC" = "xyes"; then 211425b89263Smrg STRICT_CFLAGS="-errwarn" 211525b89263Smrg elif test "x$INTELCC" = "xyes"; then 211625b89263Smrg STRICT_CFLAGS="-Werror" 211725b89263Smrg fi 211825b89263Smrgfi 211925b89263SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 212025b89263SmrgAC_SUBST([CWARNFLAGS]) 212125b89263Smrg]) # XORG_STRICT_OPTION 2122a253d6aeSmrg 212325b89263Smrg# XORG_DEFAULT_OPTIONS 212425b89263Smrg# -------------------- 212525b89263Smrg# Minimum version: 1.3.0 212625b89263Smrg# 212725b89263Smrg# Defines default options for X.Org modules. 212825b89263Smrg# 212925b89263SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 213025b89263SmrgAC_REQUIRE([AC_PROG_INSTALL]) 213125b89263SmrgXORG_CWARNFLAGS 213225b89263SmrgXORG_STRICT_OPTION 213325b89263SmrgXORG_RELEASE_VERSION 213425b89263SmrgXORG_CHANGELOG 213525b89263SmrgXORG_INSTALL 213625b89263SmrgXORG_MANPAGE_SECTIONS 213725b89263Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 213825b89263Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 213925b89263Smrg]) # XORG_DEFAULT_OPTIONS 2140a253d6aeSmrg 214125b89263Smrg# XORG_INSTALL() 214225b89263Smrg# ---------------- 214325b89263Smrg# Minimum version: 1.4.0 214425b89263Smrg# 214525b89263Smrg# Defines the variable INSTALL_CMD as the command to copy 214625b89263Smrg# INSTALL from $prefix/share/util-macros. 214725b89263Smrg# 214825b89263SmrgAC_DEFUN([XORG_INSTALL], [ 214925b89263SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 215025b89263Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 215125b89263SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 215225b89263Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 215325b89263Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 215425b89263Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 215525b89263SmrgAC_SUBST([INSTALL_CMD]) 215625b89263Smrg]) # XORG_INSTALL 215725b89263Smrgdnl Copyright 2005 Red Hat, Inc 215825b89263Smrgdnl 215925b89263Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 216025b89263Smrgdnl documentation for any purpose is hereby granted without fee, provided that 216125b89263Smrgdnl the above copyright notice appear in all copies and that both that 216225b89263Smrgdnl copyright notice and this permission notice appear in supporting 216325b89263Smrgdnl documentation. 216425b89263Smrgdnl 216525b89263Smrgdnl The above copyright notice and this permission notice shall be included 216625b89263Smrgdnl in all copies or substantial portions of the Software. 216725b89263Smrgdnl 216825b89263Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 216925b89263Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 217025b89263Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 217125b89263Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 217225b89263Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 217325b89263Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 217425b89263Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 217525b89263Smrgdnl 217625b89263Smrgdnl Except as contained in this notice, the name of the copyright holders shall 217725b89263Smrgdnl not be used in advertising or otherwise to promote the sale, use or 217825b89263Smrgdnl other dealings in this Software without prior written authorization 217925b89263Smrgdnl from the copyright holders. 218025b89263Smrgdnl 2181a253d6aeSmrg 218225b89263Smrg# XORG_RELEASE_VERSION 218325b89263Smrg# -------------------- 218425b89263Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 218525b89263Smrg 218625b89263SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 218725b89263Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 218825b89263Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 218925b89263Smrg [Major version of this package]) 219025b89263Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 219125b89263Smrg if test "x$PVM" = "x"; then 219225b89263Smrg PVM="0" 219325b89263Smrg fi 219425b89263Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 219525b89263Smrg [$PVM], 219625b89263Smrg [Minor version of this package]) 219725b89263Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 219825b89263Smrg if test "x$PVP" = "x"; then 219925b89263Smrg PVP="0" 220025b89263Smrg fi 220125b89263Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 220225b89263Smrg [$PVP], 220325b89263Smrg [Patch version of this package]) 220425b89263Smrg]) 2205a253d6aeSmrg 220625b89263Smrg# XORG_CHANGELOG() 220725b89263Smrg# ---------------- 220825b89263Smrg# Minimum version: 1.2.0 220925b89263Smrg# 221025b89263Smrg# Defines the variable CHANGELOG_CMD as the command to generate 221125b89263Smrg# ChangeLog from git. 221225b89263Smrg# 221325b89263Smrg# 221425b89263SmrgAC_DEFUN([XORG_CHANGELOG], [ 221525b89263SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 221625b89263Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 221725b89263Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 221825b89263Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 221925b89263SmrgAC_SUBST([CHANGELOG_CMD]) 222025b89263Smrg]) # XORG_CHANGELOG 2221a253d6aeSmrg 222225b89263Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 222325b89263Smrg# 222425b89263Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 222525b89263Smrg# 222625b89263Smrg# This program is free software; you can redistribute it and/or modify 222725b89263Smrg# it under the terms of the GNU General Public License as published by 222825b89263Smrg# the Free Software Foundation; either version 2 of the License, or 222925b89263Smrg# (at your option) any later version. 223025b89263Smrg# 223125b89263Smrg# This program is distributed in the hope that it will be useful, but 223225b89263Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 223325b89263Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 223425b89263Smrg# General Public License for more details. 223525b89263Smrg# 223625b89263Smrg# You should have received a copy of the GNU General Public License 223725b89263Smrg# along with this program; if not, write to the Free Software 223825b89263Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 223925b89263Smrg# 224025b89263Smrg# As a special exception to the GNU General Public License, if you 224125b89263Smrg# distribute this file as part of a program that contains a 224225b89263Smrg# configuration script generated by Autoconf, you may include it under 224325b89263Smrg# the same distribution terms that you use for the rest of that program. 2244a253d6aeSmrg 224525b89263Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 224625b89263Smrg# ---------------------------------- 224725b89263SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 224825b89263Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 224925b89263Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 225025b89263SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 225125b89263Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 225225b89263Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 225325b89263Smrgfi 225425b89263Smrgif test -n "$PKG_CONFIG"; then 225525b89263Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 225625b89263Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 225725b89263Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 225825b89263Smrg AC_MSG_RESULT([yes]) 225925b89263Smrg else 226025b89263Smrg AC_MSG_RESULT([no]) 226125b89263Smrg PKG_CONFIG="" 226225b89263Smrg fi 226325b89263Smrg 226425b89263Smrgfi[]dnl 226525b89263Smrg])# PKG_PROG_PKG_CONFIG 2266a253d6aeSmrg 226725b89263Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 226825b89263Smrg# 226925b89263Smrg# Check to see whether a particular set of modules exists. Similar 227025b89263Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 227125b89263Smrg# 227225b89263Smrg# 227325b89263Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 227425b89263Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 227525b89263Smrg# PKG_CHECK_EXISTS manually 227625b89263Smrg# -------------------------------------------------------------- 227725b89263SmrgAC_DEFUN([PKG_CHECK_EXISTS], 227825b89263Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 227925b89263Smrgif test -n "$PKG_CONFIG" && \ 228025b89263Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 228125b89263Smrg m4_ifval([$2], [$2], [:]) 228225b89263Smrgm4_ifvaln([$3], [else 228325b89263Smrg $3])dnl 228425b89263Smrgfi]) 2285a253d6aeSmrg 2286a253d6aeSmrg 228725b89263Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 228825b89263Smrg# --------------------------------------------- 228925b89263Smrgm4_define([_PKG_CONFIG], 229025b89263Smrg[if test -n "$$1"; then 229125b89263Smrg pkg_cv_[]$1="$$1" 229225b89263Smrg elif test -n "$PKG_CONFIG"; then 229325b89263Smrg PKG_CHECK_EXISTS([$3], 229425b89263Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 229525b89263Smrg [pkg_failed=yes]) 229625b89263Smrg else 229725b89263Smrg pkg_failed=untried 229825b89263Smrgfi[]dnl 229925b89263Smrg])# _PKG_CONFIG 2300a253d6aeSmrg 230125b89263Smrg# _PKG_SHORT_ERRORS_SUPPORTED 230225b89263Smrg# ----------------------------- 230325b89263SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 230425b89263Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 230525b89263Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 230625b89263Smrg _pkg_short_errors_supported=yes 230725b89263Smrgelse 230825b89263Smrg _pkg_short_errors_supported=no 230925b89263Smrgfi[]dnl 231025b89263Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 2311a253d6aeSmrg 2312a253d6aeSmrg 231325b89263Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 231425b89263Smrg# [ACTION-IF-NOT-FOUND]) 231525b89263Smrg# 231625b89263Smrg# 231725b89263Smrg# Note that if there is a possibility the first call to 231825b89263Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 231925b89263Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 232025b89263Smrg# 232125b89263Smrg# 232225b89263Smrg# -------------------------------------------------------------- 232325b89263SmrgAC_DEFUN([PKG_CHECK_MODULES], 232425b89263Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 232525b89263SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 232625b89263SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 2327a253d6aeSmrg 232825b89263Smrgpkg_failed=no 232925b89263SmrgAC_MSG_CHECKING([for $1]) 2330a253d6aeSmrg 233125b89263Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 233225b89263Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 2333a253d6aeSmrg 233425b89263Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 233525b89263Smrgand $1[]_LIBS to avoid the need to call pkg-config. 233625b89263SmrgSee the pkg-config man page for more details.]) 2337a253d6aeSmrg 233825b89263Smrgif test $pkg_failed = yes; then 233925b89263Smrg _PKG_SHORT_ERRORS_SUPPORTED 234025b89263Smrg if test $_pkg_short_errors_supported = yes; then 234125b89263Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 234225b89263Smrg else 234325b89263Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 234425b89263Smrg fi 234525b89263Smrg # Put the nasty error message in config.log where it belongs 234625b89263Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 2347a253d6aeSmrg 234825b89263Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 234925b89263Smrg[Package requirements ($2) were not met: 2350a253d6aeSmrg 235125b89263Smrg$$1_PKG_ERRORS 2352a253d6aeSmrg 235325b89263SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 235425b89263Smrginstalled software in a non-standard prefix. 2355ea133fd7Smrg 235625b89263Smrg_PKG_TEXT 235725b89263Smrg])], 235825b89263Smrg [AC_MSG_RESULT([no]) 235925b89263Smrg $4]) 236025b89263Smrgelif test $pkg_failed = untried; then 236125b89263Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 236225b89263Smrg[The pkg-config script could not be found or is too old. Make sure it 236325b89263Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 236425b89263Smrgpath to pkg-config. 2365ea133fd7Smrg 236625b89263Smrg_PKG_TEXT 236725b89263Smrg 236825b89263SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 236925b89263Smrg [$4]) 2370ea133fd7Smrgelse 237125b89263Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 237225b89263Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 237325b89263Smrg AC_MSG_RESULT([yes]) 237425b89263Smrg ifelse([$3], , :, [$3]) 237525b89263Smrgfi[]dnl 237625b89263Smrg])# PKG_CHECK_MODULES 2377a253d6aeSmrg 237825b89263Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 237925b89263Smrg# 238025b89263Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 238125b89263Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 238225b89263Smrg# Inc. 238325b89263Smrg# Written by Gordon Matzigkeit, 1996 238425b89263Smrg# 238525b89263Smrg# This file is free software; the Free Software Foundation gives 238625b89263Smrg# unlimited permission to copy and/or distribute it, with or without 238725b89263Smrg# modifications, as long as this notice is preserved. 2388ea133fd7Smrg 238925b89263Smrgm4_define([_LT_COPYING], [dnl 239025b89263Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 239125b89263Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 239225b89263Smrg# Inc. 239325b89263Smrg# Written by Gordon Matzigkeit, 1996 239425b89263Smrg# 239525b89263Smrg# This file is part of GNU Libtool. 239625b89263Smrg# 239725b89263Smrg# GNU Libtool is free software; you can redistribute it and/or 239825b89263Smrg# modify it under the terms of the GNU General Public License as 239925b89263Smrg# published by the Free Software Foundation; either version 2 of 240025b89263Smrg# the License, or (at your option) any later version. 240125b89263Smrg# 240225b89263Smrg# As a special exception to the GNU General Public License, 240325b89263Smrg# if you distribute this file as part of a program or library that 240425b89263Smrg# is built using GNU Libtool, you may include this file under the 240525b89263Smrg# same distribution terms that you use for the rest of that program. 240625b89263Smrg# 240725b89263Smrg# GNU Libtool is distributed in the hope that it will be useful, 240825b89263Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 240925b89263Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 241025b89263Smrg# GNU General Public License for more details. 241125b89263Smrg# 241225b89263Smrg# You should have received a copy of the GNU General Public License 241325b89263Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 241425b89263Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 241525b89263Smrg# obtained by writing to the Free Software Foundation, Inc., 241625b89263Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 241725b89263Smrg]) 2418a253d6aeSmrg 241925b89263Smrg# serial 57 LT_INIT 2420a253d6aeSmrg 2421a253d6aeSmrg 242225b89263Smrg# LT_PREREQ(VERSION) 242325b89263Smrg# ------------------ 242425b89263Smrg# Complain and exit if this libtool version is less that VERSION. 242525b89263Smrgm4_defun([LT_PREREQ], 242625b89263Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 242725b89263Smrg [m4_default([$3], 242825b89263Smrg [m4_fatal([Libtool version $1 or higher is required], 242925b89263Smrg 63)])], 243025b89263Smrg [$2])]) 2431a253d6aeSmrg 2432ea133fd7Smrg 243325b89263Smrg# _LT_CHECK_BUILDDIR 243425b89263Smrg# ------------------ 243525b89263Smrg# Complain if the absolute build directory name contains unusual characters 243625b89263Smrgm4_defun([_LT_CHECK_BUILDDIR], 243725b89263Smrg[case `pwd` in 243825b89263Smrg *\ * | *\ *) 243925b89263Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 244025b89263Smrgesac 244125b89263Smrg]) 2442ea133fd7Smrg 2443ea133fd7Smrg 244425b89263Smrg# LT_INIT([OPTIONS]) 244525b89263Smrg# ------------------ 244625b89263SmrgAC_DEFUN([LT_INIT], 244725b89263Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 244825b89263SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 244925b89263SmrgAC_BEFORE([$0], [LT_LANG])dnl 245025b89263SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 245125b89263SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 245225b89263Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 2453ea133fd7Smrg 245425b89263Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 245525b89263Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 245625b89263Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 245725b89263Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 245825b89263Smrgdnl unless we require an AC_DEFUNed macro: 245925b89263SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 246025b89263SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 246125b89263SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 246225b89263SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 246325b89263Smrgm4_require([_LT_PROG_LTMAIN])dnl 2464ea133fd7Smrg 246525b89263Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 2466ea133fd7Smrg 246725b89263Smrgdnl Parse OPTIONS 246825b89263Smrg_LT_SET_OPTIONS([$0], [$1]) 2469ea133fd7Smrg 247025b89263Smrg# This can be used to rebuild libtool when needed 247125b89263SmrgLIBTOOL_DEPS="$ltmain" 2472a253d6aeSmrg 247325b89263Smrg# Always use our own libtool. 247425b89263SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 247525b89263SmrgAC_SUBST(LIBTOOL)dnl 2476a253d6aeSmrg 247725b89263Smrg_LT_SETUP 247825b89263Smrg 247925b89263Smrg# Only expand once: 248025b89263Smrgm4_define([LT_INIT]) 248125b89263Smrg])# LT_INIT 248225b89263Smrg 248325b89263Smrg# Old names: 248425b89263SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 248525b89263SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 248625b89263Smrgdnl aclocal-1.4 backwards compatibility: 248725b89263Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 248825b89263Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 248925b89263Smrg 249025b89263Smrg 249125b89263Smrg# _LT_CC_BASENAME(CC) 249225b89263Smrg# ------------------- 249325b89263Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 249425b89263Smrgm4_defun([_LT_CC_BASENAME], 249525b89263Smrg[for cc_temp in $1""; do 249625b89263Smrg case $cc_temp in 249725b89263Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 249825b89263Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 249925b89263Smrg \-*) ;; 250025b89263Smrg *) break;; 2501ea133fd7Smrg esac 250225b89263Smrgdone 250325b89263Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 250425b89263Smrg]) 2505ea133fd7Smrg 2506a253d6aeSmrg 250725b89263Smrg# _LT_FILEUTILS_DEFAULTS 250825b89263Smrg# ---------------------- 250925b89263Smrg# It is okay to use these file commands and assume they have been set 251025b89263Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 251125b89263Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 251225b89263Smrg[: ${CP="cp -f"} 251325b89263Smrg: ${MV="mv -f"} 251425b89263Smrg: ${RM="rm -f"} 251525b89263Smrg])# _LT_FILEUTILS_DEFAULTS 2516a253d6aeSmrg 2517a253d6aeSmrg 251825b89263Smrg# _LT_SETUP 251925b89263Smrg# --------- 252025b89263Smrgm4_defun([_LT_SETUP], 252125b89263Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 252225b89263SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 252325b89263SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 252425b89263SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 2525a253d6aeSmrg 252625b89263Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 252725b89263Smrg_LT_DECL([], [host], [0])dnl 252825b89263Smrg_LT_DECL([], [host_os], [0])dnl 252925b89263Smrgdnl 253025b89263Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 253125b89263Smrg_LT_DECL([], [build], [0])dnl 253225b89263Smrg_LT_DECL([], [build_os], [0])dnl 253325b89263Smrgdnl 253425b89263SmrgAC_REQUIRE([AC_PROG_CC])dnl 253525b89263SmrgAC_REQUIRE([LT_PATH_LD])dnl 253625b89263SmrgAC_REQUIRE([LT_PATH_NM])dnl 253725b89263Smrgdnl 253825b89263SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 253925b89263Smrgtest -z "$LN_S" && LN_S="ln -s" 254025b89263Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 254125b89263Smrgdnl 254225b89263SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 254325b89263Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 254425b89263Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 254525b89263Smrgdnl 254625b89263Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 254725b89263Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 254825b89263Smrgm4_require([_LT_CMD_RELOAD])dnl 254925b89263Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 255025b89263Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 255125b89263Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2552a253d6aeSmrg 255325b89263Smrg_LT_CONFIG_LIBTOOL_INIT([ 255425b89263Smrg# See if we are running on zsh, and set the options which allow our 255525b89263Smrg# commands through without removal of \ escapes INIT. 255625b89263Smrgif test -n "\${ZSH_VERSION+set}" ; then 255725b89263Smrg setopt NO_GLOB_SUBST 255825b89263Smrgfi 255925b89263Smrg]) 256025b89263Smrgif test -n "${ZSH_VERSION+set}" ; then 256125b89263Smrg setopt NO_GLOB_SUBST 256225b89263Smrgfi 2563a253d6aeSmrg 256425b89263Smrg_LT_CHECK_OBJDIR 2565a253d6aeSmrg 256625b89263Smrgm4_require([_LT_TAG_COMPILER])dnl 2567a253d6aeSmrg 256825b89263Smrgcase $host_os in 256925b89263Smrgaix3*) 257025b89263Smrg # AIX sometimes has problems with the GCC collect2 program. For some 257125b89263Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 257225b89263Smrg # vanish in a puff of smoke. 257325b89263Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 257425b89263Smrg COLLECT_NAMES= 257525b89263Smrg export COLLECT_NAMES 257625b89263Smrg fi 2577ea133fd7Smrg ;; 257825b89263Smrgesac 2579a253d6aeSmrg 258025b89263Smrg# Global variables: 258125b89263Smrgofile=libtool 258225b89263Smrgcan_build_shared=yes 2583a253d6aeSmrg 258425b89263Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 258525b89263Smrg# which needs '.lib'). 258625b89263Smrglibext=a 2587a253d6aeSmrg 258825b89263Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2589a253d6aeSmrg 259025b89263Smrgold_CC="$CC" 259125b89263Smrgold_CFLAGS="$CFLAGS" 2592a253d6aeSmrg 259325b89263Smrg# Set sane defaults for various variables 259425b89263Smrgtest -z "$CC" && CC=cc 259525b89263Smrgtest -z "$LTCC" && LTCC=$CC 259625b89263Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 259725b89263Smrgtest -z "$LD" && LD=ld 259825b89263Smrgtest -z "$ac_objext" && ac_objext=o 2599a253d6aeSmrg 260025b89263Smrg_LT_CC_BASENAME([$compiler]) 260125b89263Smrg 260225b89263Smrg# Only perform the check for file, if the check method requires it 260325b89263Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 260425b89263Smrgcase $deplibs_check_method in 260525b89263Smrgfile_magic*) 260625b89263Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 260725b89263Smrg _LT_PATH_MAGIC 260825b89263Smrg fi 2609ea133fd7Smrg ;; 261025b89263Smrgesac 2611a253d6aeSmrg 261225b89263Smrg# Use C for the default configuration in the libtool script 261325b89263SmrgLT_SUPPORTED_TAG([CC]) 261425b89263Smrg_LT_LANG_C_CONFIG 261525b89263Smrg_LT_LANG_DEFAULT_CONFIG 261625b89263Smrg_LT_CONFIG_COMMANDS 261725b89263Smrg])# _LT_SETUP 2618a253d6aeSmrg 2619a253d6aeSmrg 262025b89263Smrg# _LT_PREPARE_SED_QUOTE_VARS 262125b89263Smrg# -------------------------- 262225b89263Smrg# Define a few sed substitution that help us do robust quoting. 262325b89263Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 262425b89263Smrg[# Backslashify metacharacters that are still active within 262525b89263Smrg# double-quoted strings. 262625b89263Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2627a253d6aeSmrg 262825b89263Smrg# Same as above, but do not quote variable references. 262925b89263Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2630a253d6aeSmrg 263125b89263Smrg# Sed substitution to delay expansion of an escaped shell variable in a 263225b89263Smrg# double_quote_subst'ed string. 263325b89263Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2634a253d6aeSmrg 263525b89263Smrg# Sed substitution to delay expansion of an escaped single quote. 263625b89263Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2637a253d6aeSmrg 263825b89263Smrg# Sed substitution to avoid accidental globbing in evaled expressions 263925b89263Smrgno_glob_subst='s/\*/\\\*/g' 264025b89263Smrg]) 2641a253d6aeSmrg 264225b89263Smrg# _LT_PROG_LTMAIN 264325b89263Smrg# --------------- 264425b89263Smrg# Note that this code is called both from `configure', and `config.status' 264525b89263Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 264625b89263Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 264725b89263Smrg# so we pass a copy along to make sure it has a sensible value anyway. 264825b89263Smrgm4_defun([_LT_PROG_LTMAIN], 264925b89263Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 265025b89263Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 265125b89263Smrgltmain="$ac_aux_dir/ltmain.sh" 265225b89263Smrg])# _LT_PROG_LTMAIN 2653a253d6aeSmrg 2654a253d6aeSmrg 2655a253d6aeSmrg 265625b89263Smrg# So that we can recreate a full libtool script including additional 265725b89263Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 265825b89263Smrg# in macros and then make a single call at the end using the `libtool' 265925b89263Smrg# label. 2660a253d6aeSmrg 2661a253d6aeSmrg 266225b89263Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 266325b89263Smrg# ---------------------------------------- 266425b89263Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 266525b89263Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 266625b89263Smrg[m4_ifval([$1], 266725b89263Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 266825b89263Smrg [$1 266925b89263Smrg])])]) 2670a253d6aeSmrg 267125b89263Smrg# Initialize. 267225b89263Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 2673a253d6aeSmrg 2674a253d6aeSmrg 267525b89263Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 267625b89263Smrg# ------------------------------ 267725b89263Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 267825b89263Smrgm4_define([_LT_CONFIG_LIBTOOL], 267925b89263Smrg[m4_ifval([$1], 268025b89263Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 268125b89263Smrg [$1 268225b89263Smrg])])]) 2683a253d6aeSmrg 268425b89263Smrg# Initialize. 268525b89263Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 2686a253d6aeSmrg 2687a253d6aeSmrg 268825b89263Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 268925b89263Smrg# ----------------------------------------------------- 269025b89263Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 269125b89263Smrg[_LT_CONFIG_LIBTOOL([$1]) 269225b89263Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 269325b89263Smrg]) 2694a253d6aeSmrg 2695a253d6aeSmrg 269625b89263Smrg# _LT_FORMAT_COMMENT([COMMENT]) 269725b89263Smrg# ----------------------------- 269825b89263Smrg# Add leading comment marks to the start of each line, and a trailing 269925b89263Smrg# full-stop to the whole comment if one is not present already. 270025b89263Smrgm4_define([_LT_FORMAT_COMMENT], 270125b89263Smrg[m4_ifval([$1], [ 270225b89263Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 270325b89263Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 270425b89263Smrg)]) 2705a253d6aeSmrg 2706ea133fd7Smrg 2707ea133fd7Smrg 2708ea133fd7Smrg 2709a253d6aeSmrg 271025b89263Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 271125b89263Smrg# ------------------------------------------------------------------- 271225b89263Smrg# CONFIGNAME is the name given to the value in the libtool script. 271325b89263Smrg# VARNAME is the (base) name used in the configure script. 271425b89263Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 271525b89263Smrg# VARNAME. Any other value will be used directly. 271625b89263Smrgm4_define([_LT_DECL], 271725b89263Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 271825b89263Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 271925b89263Smrg [m4_ifval([$1], [$1], [$2])]) 272025b89263Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 272125b89263Smrg m4_ifval([$4], 272225b89263Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 272325b89263Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 272425b89263Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 272525b89263Smrg]) 2726a253d6aeSmrg 2727a253d6aeSmrg 272825b89263Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 272925b89263Smrg# -------------------------------------------------------- 273025b89263Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 2731a253d6aeSmrg 2732a253d6aeSmrg 273325b89263Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 273425b89263Smrg# ------------------------------------------------ 273525b89263Smrgm4_define([lt_decl_tag_varnames], 273625b89263Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 2737a253d6aeSmrg 2738a253d6aeSmrg 273925b89263Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 274025b89263Smrg# --------------------------------------------------------- 274125b89263Smrgm4_define([_lt_decl_filter], 274225b89263Smrg[m4_case([$#], 274325b89263Smrg [0], [m4_fatal([$0: too few arguments: $#])], 274425b89263Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 274525b89263Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 274625b89263Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 274725b89263Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 274825b89263Smrg]) 2749a253d6aeSmrg 2750a253d6aeSmrg 275125b89263Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 275225b89263Smrg# -------------------------------------------------- 275325b89263Smrgm4_define([lt_decl_quote_varnames], 275425b89263Smrg[_lt_decl_filter([value], [1], $@)]) 2755a253d6aeSmrg 2756a253d6aeSmrg 275725b89263Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 275825b89263Smrg# --------------------------------------------------- 275925b89263Smrgm4_define([lt_decl_dquote_varnames], 276025b89263Smrg[_lt_decl_filter([value], [2], $@)]) 2761ea133fd7Smrg 2762a253d6aeSmrg 276325b89263Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 276425b89263Smrg# --------------------------------------------------- 276525b89263Smrgm4_define([lt_decl_varnames_tagged], 276625b89263Smrg[m4_assert([$# <= 2])dnl 276725b89263Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 276825b89263Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 276925b89263Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 277025b89263Smrgm4_define([_lt_decl_varnames_tagged], 277125b89263Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 2772ea133fd7Smrg 2773a253d6aeSmrg 277425b89263Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 277525b89263Smrg# ------------------------------------------------ 277625b89263Smrgm4_define([lt_decl_all_varnames], 277725b89263Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 277825b89263Smrg m4_if([$2], [], 277925b89263Smrg m4_quote(lt_decl_varnames), 278025b89263Smrg m4_quote(m4_shift($@))))[]dnl 278125b89263Smrg]) 278225b89263Smrgm4_define([_lt_decl_all_varnames], 278325b89263Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 278425b89263Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 278525b89263Smrg]) 2786ea133fd7Smrg 2787ea133fd7Smrg 278825b89263Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 278925b89263Smrg# ------------------------------------ 279025b89263Smrg# Quote a variable value, and forward it to `config.status' so that its 279125b89263Smrg# declaration there will have the same value as in `configure'. VARNAME 279225b89263Smrg# must have a single quote delimited value for this to work. 279325b89263Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 279425b89263Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 2795a253d6aeSmrg 2796a253d6aeSmrg 279725b89263Smrg# _LT_CONFIG_STATUS_DECLARATIONS 279825b89263Smrg# ------------------------------ 279925b89263Smrg# We delimit libtool config variables with single quotes, so when 280025b89263Smrg# we write them to config.status, we have to be sure to quote all 280125b89263Smrg# embedded single quotes properly. In configure, this macro expands 280225b89263Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 280325b89263Smrg# 280425b89263Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 280525b89263Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 280625b89263Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 280725b89263Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 2808a253d6aeSmrg 2809a253d6aeSmrg 281025b89263Smrg# _LT_LIBTOOL_TAGS 281125b89263Smrg# ---------------- 281225b89263Smrg# Output comment and list of tags supported by the script 281325b89263Smrgm4_defun([_LT_LIBTOOL_TAGS], 281425b89263Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 281525b89263Smrgavailable_tags="_LT_TAGS"dnl 281625b89263Smrg]) 2817a253d6aeSmrg 2818a253d6aeSmrg 281925b89263Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 282025b89263Smrg# ----------------------------------- 282125b89263Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 282225b89263Smrg# expand to a commented shell variable setting: 282325b89263Smrg# 282425b89263Smrg# # Some comment about what VAR is for. 282525b89263Smrg# visible_name=$lt_internal_name 282625b89263Smrgm4_define([_LT_LIBTOOL_DECLARE], 282725b89263Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 282825b89263Smrg [description])))[]dnl 282925b89263Smrgm4_pushdef([_libtool_name], 283025b89263Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 283125b89263Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 283225b89263Smrg [0], [_libtool_name=[$]$1], 283325b89263Smrg [1], [_libtool_name=$lt_[]$1], 283425b89263Smrg [2], [_libtool_name=$lt_[]$1], 283525b89263Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 283625b89263Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 283725b89263Smrg]) 2838a253d6aeSmrg 2839a253d6aeSmrg 284025b89263Smrg# _LT_LIBTOOL_CONFIG_VARS 284125b89263Smrg# ----------------------- 284225b89263Smrg# Produce commented declarations of non-tagged libtool config variables 284325b89263Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 284425b89263Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 284525b89263Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 284625b89263Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 284725b89263Smrg[m4_foreach([_lt_var], 284825b89263Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 284925b89263Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 2850a253d6aeSmrg 2851a253d6aeSmrg 285225b89263Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 285325b89263Smrg# ------------------------- 285425b89263Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 285525b89263Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 285625b89263Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 2857a253d6aeSmrg 2858a253d6aeSmrg 285925b89263Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 286025b89263Smrg# ------------------------------ 286125b89263Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 2862a253d6aeSmrg 2863a253d6aeSmrg 286425b89263Smrg# _LT_CONFIG_COMMANDS 286525b89263Smrg# ------------------- 286625b89263Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 286725b89263Smrg# variables for single and double quote escaping we saved from calls 286825b89263Smrg# to _LT_DECL, we can put quote escaped variables declarations 286925b89263Smrg# into `config.status', and then the shell code to quote escape them in 287025b89263Smrg# for loops in `config.status'. Finally, any additional code accumulated 287125b89263Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 287225b89263Smrgm4_defun([_LT_CONFIG_COMMANDS], 287325b89263Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 287425b89263Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 287525b89263Smrg dnl instead of duplicating it all over again into config.status, 287625b89263Smrg dnl then we will have config.status run $CONFIG_LT later, so it 287725b89263Smrg dnl needs to know what name is stored there: 287825b89263Smrg [AC_CONFIG_COMMANDS([libtool], 287925b89263Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 288025b89263Smrg dnl If the libtool generation code is destined for config.status, 288125b89263Smrg dnl expand the accumulated commands and init code now: 288225b89263Smrg [AC_CONFIG_COMMANDS([libtool], 288325b89263Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 288425b89263Smrg])#_LT_CONFIG_COMMANDS 2885a253d6aeSmrg 2886a253d6aeSmrg 288725b89263Smrg# Initialize. 288825b89263Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 288925b89263Smrg[ 2890a253d6aeSmrg 289125b89263Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 289225b89263Smrg# if CDPATH is set. 289325b89263Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 2894a253d6aeSmrg 289525b89263Smrgsed_quote_subst='$sed_quote_subst' 289625b89263Smrgdouble_quote_subst='$double_quote_subst' 289725b89263Smrgdelay_variable_subst='$delay_variable_subst' 289825b89263Smrg_LT_CONFIG_STATUS_DECLARATIONS 289925b89263SmrgLTCC='$LTCC' 290025b89263SmrgLTCFLAGS='$LTCFLAGS' 290125b89263Smrgcompiler='$compiler_DEFAULT' 2902a253d6aeSmrg 290325b89263Smrg# A function that is used when there is no print builtin or printf. 290425b89263Smrgfunc_fallback_echo () 290525b89263Smrg{ 290625b89263Smrg eval 'cat <<_LTECHO_EOF 290725b89263Smrg\$[]1 290825b89263Smrg_LTECHO_EOF' 290925b89263Smrg} 2910a253d6aeSmrg 291125b89263Smrg# Quote evaled strings. 291225b89263Smrgfor var in lt_decl_all_varnames([[ \ 291325b89263Smrg]], lt_decl_quote_varnames); do 291425b89263Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 291525b89263Smrg *[[\\\\\\\`\\"\\\$]]*) 291625b89263Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 291725b89263Smrg ;; 291825b89263Smrg *) 291925b89263Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 292025b89263Smrg ;; 292125b89263Smrg esac 292225b89263Smrgdone 2923a253d6aeSmrg 292425b89263Smrg# Double-quote double-evaled strings. 292525b89263Smrgfor var in lt_decl_all_varnames([[ \ 292625b89263Smrg]], lt_decl_dquote_varnames); do 292725b89263Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 292825b89263Smrg *[[\\\\\\\`\\"\\\$]]*) 292925b89263Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 293025b89263Smrg ;; 293125b89263Smrg *) 293225b89263Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 293325b89263Smrg ;; 293425b89263Smrg esac 293525b89263Smrgdone 2936a253d6aeSmrg 293725b89263Smrg_LT_OUTPUT_LIBTOOL_INIT 2938ea133fd7Smrg]) 2939a253d6aeSmrg 294025b89263Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 294125b89263Smrg# ------------------------------------ 294225b89263Smrg# Generate a child script FILE with all initialization necessary to 294325b89263Smrg# reuse the environment learned by the parent script, and make the 294425b89263Smrg# file executable. If COMMENT is supplied, it is inserted after the 294525b89263Smrg# `#!' sequence but before initialization text begins. After this 294625b89263Smrg# macro, additional text can be appended to FILE to form the body of 294725b89263Smrg# the child script. The macro ends with non-zero status if the 294825b89263Smrg# file could not be fully written (such as if the disk is full). 294925b89263Smrgm4_ifdef([AS_INIT_GENERATED], 295025b89263Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 295125b89263Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 295225b89263Smrg[m4_require([AS_PREPARE])]dnl 295325b89263Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 295425b89263Smrg[lt_write_fail=0 295525b89263Smrgcat >$1 <<_ASEOF || lt_write_fail=1 295625b89263Smrg#! $SHELL 295725b89263Smrg# Generated by $as_me. 295825b89263Smrg$2 295925b89263SmrgSHELL=\${CONFIG_SHELL-$SHELL} 296025b89263Smrgexport SHELL 296125b89263Smrg_ASEOF 296225b89263Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 296325b89263SmrgAS_SHELL_SANITIZE 296425b89263Smrg_AS_PREPARE 296525b89263Smrgexec AS_MESSAGE_FD>&1 296625b89263Smrg_ASEOF 296725b89263Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 296825b89263Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 2969ea133fd7Smrg 297025b89263Smrg# LT_OUTPUT 297125b89263Smrg# --------- 297225b89263Smrg# This macro allows early generation of the libtool script (before 297325b89263Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 297425b89263Smrg# tests. 297525b89263SmrgAC_DEFUN([LT_OUTPUT], 297625b89263Smrg[: ${CONFIG_LT=./config.lt} 297725b89263SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 297825b89263Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 297925b89263Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 2980ea133fd7Smrg 298125b89263Smrgcat >>"$CONFIG_LT" <<\_LTEOF 298225b89263Smrglt_cl_silent=false 298325b89263Smrgexec AS_MESSAGE_LOG_FD>>config.log 298425b89263Smrg{ 298525b89263Smrg echo 298625b89263Smrg AS_BOX([Running $as_me.]) 298725b89263Smrg} >&AS_MESSAGE_LOG_FD 2988ea133fd7Smrg 298925b89263Smrglt_cl_help="\ 299025b89263Smrg\`$as_me' creates a local libtool stub from the current configuration, 299125b89263Smrgfor use in further configure time tests before the real libtool is 299225b89263Smrggenerated. 2993ea133fd7Smrg 299425b89263SmrgUsage: $[0] [[OPTIONS]] 2995a253d6aeSmrg 299625b89263Smrg -h, --help print this help, then exit 299725b89263Smrg -V, --version print version number, then exit 299825b89263Smrg -q, --quiet do not print progress messages 299925b89263Smrg -d, --debug don't remove temporary files 3000a253d6aeSmrg 300125b89263SmrgReport bugs to <bug-libtool@gnu.org>." 3002a253d6aeSmrg 300325b89263Smrglt_cl_version="\ 300425b89263Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 300525b89263Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 300625b89263Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 3007a253d6aeSmrg 300825b89263SmrgCopyright (C) 2010 Free Software Foundation, Inc. 300925b89263SmrgThis config.lt script is free software; the Free Software Foundation 301025b89263Smrggives unlimited permision to copy, distribute and modify it." 3011a253d6aeSmrg 301225b89263Smrgwhile test $[#] != 0 301325b89263Smrgdo 301425b89263Smrg case $[1] in 301525b89263Smrg --version | --v* | -V ) 301625b89263Smrg echo "$lt_cl_version"; exit 0 ;; 301725b89263Smrg --help | --h* | -h ) 301825b89263Smrg echo "$lt_cl_help"; exit 0 ;; 301925b89263Smrg --debug | --d* | -d ) 302025b89263Smrg debug=: ;; 302125b89263Smrg --quiet | --q* | --silent | --s* | -q ) 302225b89263Smrg lt_cl_silent=: ;; 3023a253d6aeSmrg 302425b89263Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 302525b89263SmrgTry \`$[0] --help' for more information.]) ;; 3026a253d6aeSmrg 302725b89263Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 302825b89263SmrgTry \`$[0] --help' for more information.]) ;; 302925b89263Smrg esac 303025b89263Smrg shift 303125b89263Smrgdone 3032a253d6aeSmrg 303325b89263Smrgif $lt_cl_silent; then 303425b89263Smrg exec AS_MESSAGE_FD>/dev/null 3035ea133fd7Smrgfi 303625b89263Smrg_LTEOF 3037a253d6aeSmrg 303825b89263Smrgcat >>"$CONFIG_LT" <<_LTEOF 303925b89263Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 304025b89263Smrg_LTEOF 3041a253d6aeSmrg 304225b89263Smrgcat >>"$CONFIG_LT" <<\_LTEOF 304325b89263SmrgAC_MSG_NOTICE([creating $ofile]) 304425b89263Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 304525b89263SmrgAS_EXIT(0) 304625b89263Smrg_LTEOF 304725b89263Smrgchmod +x "$CONFIG_LT" 3048a253d6aeSmrg 304925b89263Smrg# configure is writing to config.log, but config.lt does its own redirection, 305025b89263Smrg# appending to config.log, which fails on DOS, as config.log is still kept 305125b89263Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 305225b89263Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 305325b89263Smrglt_cl_success=: 305425b89263Smrgtest "$silent" = yes && 305525b89263Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 305625b89263Smrgexec AS_MESSAGE_LOG_FD>/dev/null 305725b89263Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 305825b89263Smrgexec AS_MESSAGE_LOG_FD>>config.log 305925b89263Smrg$lt_cl_success || AS_EXIT(1) 306025b89263Smrg])# LT_OUTPUT 3061a253d6aeSmrg 3062a253d6aeSmrg 306325b89263Smrg# _LT_CONFIG(TAG) 306425b89263Smrg# --------------- 306525b89263Smrg# If TAG is the built-in tag, create an initial libtool script with a 306625b89263Smrg# default configuration from the untagged config vars. Otherwise add code 306725b89263Smrg# to config.status for appending the configuration named by TAG from the 306825b89263Smrg# matching tagged config vars. 306925b89263Smrgm4_defun([_LT_CONFIG], 307025b89263Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 307125b89263Smrg_LT_CONFIG_SAVE_COMMANDS([ 307225b89263Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 307325b89263Smrg m4_if(_LT_TAG, [C], [ 307425b89263Smrg # See if we are running on zsh, and set the options which allow our 307525b89263Smrg # commands through without removal of \ escapes. 307625b89263Smrg if test -n "${ZSH_VERSION+set}" ; then 307725b89263Smrg setopt NO_GLOB_SUBST 307825b89263Smrg fi 3079a253d6aeSmrg 308025b89263Smrg cfgfile="${ofile}T" 308125b89263Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 308225b89263Smrg $RM "$cfgfile" 3083a253d6aeSmrg 308425b89263Smrg cat <<_LT_EOF >> "$cfgfile" 308525b89263Smrg#! $SHELL 3086a253d6aeSmrg 308725b89263Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 308825b89263Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 308925b89263Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 309025b89263Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 309125b89263Smrg# 309225b89263Smrg_LT_COPYING 309325b89263Smrg_LT_LIBTOOL_TAGS 3094a253d6aeSmrg 309525b89263Smrg# ### BEGIN LIBTOOL CONFIG 309625b89263Smrg_LT_LIBTOOL_CONFIG_VARS 309725b89263Smrg_LT_LIBTOOL_TAG_VARS 309825b89263Smrg# ### END LIBTOOL CONFIG 3099a253d6aeSmrg 310025b89263Smrg_LT_EOF 3101a253d6aeSmrg 310225b89263Smrg case $host_os in 310325b89263Smrg aix3*) 310425b89263Smrg cat <<\_LT_EOF >> "$cfgfile" 310525b89263Smrg# AIX sometimes has problems with the GCC collect2 program. For some 310625b89263Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 310725b89263Smrg# vanish in a puff of smoke. 310825b89263Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 310925b89263Smrg COLLECT_NAMES= 311025b89263Smrg export COLLECT_NAMES 311125b89263Smrgfi 311225b89263Smrg_LT_EOF 311325b89263Smrg ;; 311425b89263Smrg esac 3115a253d6aeSmrg 311625b89263Smrg _LT_PROG_LTMAIN 3117a253d6aeSmrg 311825b89263Smrg # We use sed instead of cat because bash on DJGPP gets confused if 311925b89263Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 312025b89263Smrg # text mode, it properly converts lines to CR/LF. This bash problem 312125b89263Smrg # is reportedly fixed, but why not run on old versions too? 312225b89263Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 312325b89263Smrg || (rm -f "$cfgfile"; exit 1) 3124a253d6aeSmrg 312525b89263Smrg _LT_PROG_XSI_SHELLFNS 3126a253d6aeSmrg 312725b89263Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 312825b89263Smrg || (rm -f "$cfgfile"; exit 1) 3129a253d6aeSmrg 313025b89263Smrg mv -f "$cfgfile" "$ofile" || 313125b89263Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 313225b89263Smrg chmod +x "$ofile" 313325b89263Smrg], 313425b89263Smrg[cat <<_LT_EOF >> "$ofile" 3135a253d6aeSmrg 313625b89263Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 313725b89263Smrgdnl in a comment (ie after a #). 313825b89263Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 313925b89263Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 314025b89263Smrg# ### END LIBTOOL TAG CONFIG: $1 3141ea133fd7Smrg_LT_EOF 314225b89263Smrg])dnl /m4_if 314325b89263Smrg], 314425b89263Smrg[m4_if([$1], [], [ 314525b89263Smrg PACKAGE='$PACKAGE' 314625b89263Smrg VERSION='$VERSION' 314725b89263Smrg TIMESTAMP='$TIMESTAMP' 314825b89263Smrg RM='$RM' 314925b89263Smrg ofile='$ofile'], []) 315025b89263Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 315125b89263Smrg])# _LT_CONFIG 3152a253d6aeSmrg 3153a253d6aeSmrg 315425b89263Smrg# LT_SUPPORTED_TAG(TAG) 315525b89263Smrg# --------------------- 315625b89263Smrg# Trace this macro to discover what tags are supported by the libtool 315725b89263Smrg# --tag option, using: 315825b89263Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 315925b89263SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 3160a253d6aeSmrg 3161a253d6aeSmrg 316225b89263Smrg# C support is built-in for now 316325b89263Smrgm4_define([_LT_LANG_C_enabled], []) 316425b89263Smrgm4_define([_LT_TAGS], []) 3165a253d6aeSmrg 3166a253d6aeSmrg 316725b89263Smrg# LT_LANG(LANG) 316825b89263Smrg# ------------- 316925b89263Smrg# Enable libtool support for the given language if not already enabled. 317025b89263SmrgAC_DEFUN([LT_LANG], 317125b89263Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 317225b89263Smrgm4_case([$1], 317325b89263Smrg [C], [_LT_LANG(C)], 317425b89263Smrg [C++], [_LT_LANG(CXX)], 317525b89263Smrg [Java], [_LT_LANG(GCJ)], 317625b89263Smrg [Fortran 77], [_LT_LANG(F77)], 317725b89263Smrg [Fortran], [_LT_LANG(FC)], 317825b89263Smrg [Windows Resource], [_LT_LANG(RC)], 317925b89263Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 318025b89263Smrg [_LT_LANG($1)], 318125b89263Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 318225b89263Smrg])# LT_LANG 3183a253d6aeSmrg 3184a253d6aeSmrg 318525b89263Smrg# _LT_LANG(LANGNAME) 318625b89263Smrg# ------------------ 318725b89263Smrgm4_defun([_LT_LANG], 318825b89263Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 318925b89263Smrg [LT_SUPPORTED_TAG([$1])dnl 319025b89263Smrg m4_append([_LT_TAGS], [$1 ])dnl 319125b89263Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 319225b89263Smrg _LT_LANG_$1_CONFIG($1)])dnl 319325b89263Smrg])# _LT_LANG 3194a253d6aeSmrg 3195a253d6aeSmrg 319625b89263Smrg# _LT_LANG_DEFAULT_CONFIG 319725b89263Smrg# ----------------------- 319825b89263Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 319925b89263Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 320025b89263Smrg [LT_LANG(CXX)], 320125b89263Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3202a253d6aeSmrg 320325b89263SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 320425b89263Smrg [LT_LANG(F77)], 320525b89263Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3206a253d6aeSmrg 320725b89263SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 320825b89263Smrg [LT_LANG(FC)], 320925b89263Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 321025b89263Smrg 321125b89263Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 321225b89263Smrgdnl pulling things in needlessly. 321325b89263SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 321425b89263Smrg [LT_LANG(GCJ)], 321525b89263Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 321625b89263Smrg [LT_LANG(GCJ)], 321725b89263Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 321825b89263Smrg [LT_LANG(GCJ)], 321925b89263Smrg [m4_ifdef([AC_PROG_GCJ], 322025b89263Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 322125b89263Smrg m4_ifdef([A][M_PROG_GCJ], 322225b89263Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 322325b89263Smrg m4_ifdef([LT_PROG_GCJ], 322425b89263Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 322525b89263Smrg 322625b89263SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 322725b89263Smrg [LT_LANG(RC)], 322825b89263Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 322925b89263Smrg])# _LT_LANG_DEFAULT_CONFIG 323025b89263Smrg 323125b89263Smrg# Obsolete macros: 323225b89263SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 323325b89263SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 323425b89263SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 323525b89263SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 323625b89263SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 323725b89263Smrgdnl aclocal-1.4 backwards compatibility: 323825b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 323925b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 324025b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 324125b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 324225b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 324325b89263Smrg 324425b89263Smrg 324525b89263Smrg# _LT_TAG_COMPILER 324625b89263Smrg# ---------------- 324725b89263Smrgm4_defun([_LT_TAG_COMPILER], 324825b89263Smrg[AC_REQUIRE([AC_PROG_CC])dnl 324925b89263Smrg 325025b89263Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 325125b89263Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 325225b89263Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 325325b89263Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 325425b89263Smrg 325525b89263Smrg# If no C compiler was specified, use CC. 325625b89263SmrgLTCC=${LTCC-"$CC"} 325725b89263Smrg 325825b89263Smrg# If no C compiler flags were specified, use CFLAGS. 325925b89263SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 326025b89263Smrg 326125b89263Smrg# Allow CC to be a program name with arguments. 326225b89263Smrgcompiler=$CC 326325b89263Smrg])# _LT_TAG_COMPILER 326425b89263Smrg 326525b89263Smrg 326625b89263Smrg# _LT_COMPILER_BOILERPLATE 326725b89263Smrg# ------------------------ 326825b89263Smrg# Check for compiler boilerplate output or warnings with 326925b89263Smrg# the simple compiler test code. 327025b89263Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 327125b89263Smrg[m4_require([_LT_DECL_SED])dnl 327225b89263Smrgac_outfile=conftest.$ac_objext 327325b89263Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 327425b89263Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 327525b89263Smrg_lt_compiler_boilerplate=`cat conftest.err` 327625b89263Smrg$RM conftest* 327725b89263Smrg])# _LT_COMPILER_BOILERPLATE 327825b89263Smrg 327925b89263Smrg 328025b89263Smrg# _LT_LINKER_BOILERPLATE 328125b89263Smrg# ---------------------- 328225b89263Smrg# Check for linker boilerplate output or warnings with 328325b89263Smrg# the simple link test code. 328425b89263Smrgm4_defun([_LT_LINKER_BOILERPLATE], 328525b89263Smrg[m4_require([_LT_DECL_SED])dnl 328625b89263Smrgac_outfile=conftest.$ac_objext 328725b89263Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 328825b89263Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 328925b89263Smrg_lt_linker_boilerplate=`cat conftest.err` 329025b89263Smrg$RM -r conftest* 329125b89263Smrg])# _LT_LINKER_BOILERPLATE 329225b89263Smrg 329325b89263Smrg# _LT_REQUIRED_DARWIN_CHECKS 329425b89263Smrg# ------------------------- 329525b89263Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 329625b89263Smrg case $host_os in 329725b89263Smrg rhapsody* | darwin*) 329825b89263Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 329925b89263Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 330025b89263Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 330125b89263Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 330225b89263Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 330325b89263Smrg _LT_DECL([], [DSYMUTIL], [1], 330425b89263Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 330525b89263Smrg _LT_DECL([], [NMEDIT], [1], 330625b89263Smrg [Tool to change global to local symbols on Mac OS X]) 330725b89263Smrg _LT_DECL([], [LIPO], [1], 330825b89263Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 330925b89263Smrg _LT_DECL([], [OTOOL], [1], 331025b89263Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 331125b89263Smrg _LT_DECL([], [OTOOL64], [1], 331225b89263Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 331325b89263Smrg 331425b89263Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 331525b89263Smrg [lt_cv_apple_cc_single_mod=no 331625b89263Smrg if test -z "${LT_MULTI_MODULE}"; then 331725b89263Smrg # By default we will add the -single_module flag. You can override 331825b89263Smrg # by either setting the environment variable LT_MULTI_MODULE 331925b89263Smrg # non-empty at configure time, or by adding -multi_module to the 332025b89263Smrg # link flags. 332125b89263Smrg rm -rf libconftest.dylib* 332225b89263Smrg echo "int foo(void){return 1;}" > conftest.c 332325b89263Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 332425b89263Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 332525b89263Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 332625b89263Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 332725b89263Smrg _lt_result=$? 332825b89263Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 332925b89263Smrg lt_cv_apple_cc_single_mod=yes 3330ea133fd7Smrg else 333125b89263Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3332ea133fd7Smrg fi 333325b89263Smrg rm -rf libconftest.dylib* 333425b89263Smrg rm -f conftest.* 333525b89263Smrg fi]) 333625b89263Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 333725b89263Smrg [lt_cv_ld_exported_symbols_list], 333825b89263Smrg [lt_cv_ld_exported_symbols_list=no 333925b89263Smrg save_LDFLAGS=$LDFLAGS 334025b89263Smrg echo "_main" > conftest.sym 334125b89263Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 334225b89263Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 334325b89263Smrg [lt_cv_ld_exported_symbols_list=yes], 334425b89263Smrg [lt_cv_ld_exported_symbols_list=no]) 334525b89263Smrg LDFLAGS="$save_LDFLAGS" 334625b89263Smrg ]) 334725b89263Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 334825b89263Smrg [lt_cv_ld_force_load=no 334925b89263Smrg cat > conftest.c << _LT_EOF 335025b89263Smrgint forced_loaded() { return 2;} 335125b89263Smrg_LT_EOF 335225b89263Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 335325b89263Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 335425b89263Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 335525b89263Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 335625b89263Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 335725b89263Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 335825b89263Smrg cat > conftest.c << _LT_EOF 335925b89263Smrgint main() { return 0;} 336025b89263Smrg_LT_EOF 336125b89263Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 336225b89263Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 336325b89263Smrg _lt_result=$? 336425b89263Smrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 336525b89263Smrg lt_cv_ld_force_load=yes 336625b89263Smrg else 336725b89263Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 336825b89263Smrg fi 336925b89263Smrg rm -f conftest.err libconftest.a conftest conftest.c 337025b89263Smrg rm -rf conftest.dSYM 337125b89263Smrg ]) 337225b89263Smrg case $host_os in 337325b89263Smrg rhapsody* | darwin1.[[012]]) 337425b89263Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 337525b89263Smrg darwin1.*) 337625b89263Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 337725b89263Smrg darwin*) # darwin 5.x on 337825b89263Smrg # if running on 10.5 or later, the deployment target defaults 337925b89263Smrg # to the OS version, if on x86, and 10.4, the deployment 338025b89263Smrg # target defaults to 10.4. Don't you love it? 338125b89263Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 338225b89263Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 338325b89263Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 338425b89263Smrg 10.[[012]]*) 338525b89263Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 338625b89263Smrg 10.*) 338725b89263Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 338825b89263Smrg esac 338925b89263Smrg ;; 339025b89263Smrg esac 339125b89263Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 339225b89263Smrg _lt_dar_single_mod='$single_module' 339325b89263Smrg fi 339425b89263Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 339525b89263Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 339625b89263Smrg else 339725b89263Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 339825b89263Smrg fi 339925b89263Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 340025b89263Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 340125b89263Smrg else 340225b89263Smrg _lt_dsymutil= 340325b89263Smrg fi 340425b89263Smrg ;; 340525b89263Smrg esac 340625b89263Smrg]) 340725b89263Smrg 340825b89263Smrg 340925b89263Smrg# _LT_DARWIN_LINKER_FEATURES 341025b89263Smrg# -------------------------- 341125b89263Smrg# Checks for linker and compiler features on darwin 341225b89263Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 341325b89263Smrg[ 341425b89263Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 341525b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 341625b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 341725b89263Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 341825b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 341925b89263Smrg if test "$lt_cv_ld_force_load" = "yes"; then 342025b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 342125b89263Smrg else 342225b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 342325b89263Smrg fi 342425b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 342525b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 342625b89263Smrg case $cc_basename in 342725b89263Smrg ifort*) _lt_dar_can_shared=yes ;; 342825b89263Smrg *) _lt_dar_can_shared=$GCC ;; 342925b89263Smrg esac 343025b89263Smrg if test "$_lt_dar_can_shared" = "yes"; then 343125b89263Smrg output_verbose_link_cmd=func_echo_all 343225b89263Smrg _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" 343325b89263Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 343425b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" 343525b89263Smrg _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" 343625b89263Smrg m4_if([$1], [CXX], 343725b89263Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 343825b89263Smrg _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" 343925b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" 344025b89263Smrg fi 344125b89263Smrg],[]) 344225b89263Smrg else 344325b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 344425b89263Smrg fi 344525b89263Smrg]) 344625b89263Smrg 344725b89263Smrg# _LT_SYS_MODULE_PATH_AIX 344825b89263Smrg# ----------------------- 344925b89263Smrg# Links a minimal program and checks the executable 345025b89263Smrg# for the system default hardcoded library path. In most cases, 345125b89263Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 345225b89263Smrg# the location of the communication and MPI libs are included too. 345325b89263Smrg# If we don't find anything, use the default library path according 345425b89263Smrg# to the aix ld manual. 345525b89263Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 345625b89263Smrg[m4_require([_LT_DECL_SED])dnl 345725b89263SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 345825b89263Smrglt_aix_libpath_sed=' 345925b89263Smrg /Import File Strings/,/^$/ { 346025b89263Smrg /^0/ { 346125b89263Smrg s/^0 *\(.*\)$/\1/ 346225b89263Smrg p 346325b89263Smrg } 346425b89263Smrg }' 346525b89263Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 346625b89263Smrg# Check for a 64-bit object if we didn't find anything. 346725b89263Smrgif test -z "$aix_libpath"; then 346825b89263Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 346925b89263Smrgfi],[]) 347025b89263Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 347125b89263Smrg])# _LT_SYS_MODULE_PATH_AIX 347225b89263Smrg 347325b89263Smrg 347425b89263Smrg# _LT_SHELL_INIT(ARG) 347525b89263Smrg# ------------------- 347625b89263Smrgm4_define([_LT_SHELL_INIT], 347725b89263Smrg[m4_divert_text([M4SH-INIT], [$1 347825b89263Smrg])])# _LT_SHELL_INIT 347925b89263Smrg 348025b89263Smrg 348125b89263Smrg 348225b89263Smrg# _LT_PROG_ECHO_BACKSLASH 348325b89263Smrg# ----------------------- 348425b89263Smrg# Find how we can fake an echo command that does not interpret backslash. 348525b89263Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 348625b89263Smrg# of the generated configure script which will find a shell with a builtin 348725b89263Smrg# printf (which we can use as an echo command). 348825b89263Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 348925b89263Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 349025b89263SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 349125b89263SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 349225b89263Smrg 349325b89263SmrgAC_MSG_CHECKING([how to print strings]) 349425b89263Smrg# Test print first, because it will be a builtin if present. 349525b89263Smrgif test "X`print -r -- -n 2>/dev/null`" = X-n && \ 349625b89263Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 349725b89263Smrg ECHO='print -r --' 349825b89263Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 349925b89263Smrg ECHO='printf %s\n' 350025b89263Smrgelse 350125b89263Smrg # Use this function as a fallback that always works. 350225b89263Smrg func_fallback_echo () 350325b89263Smrg { 350425b89263Smrg eval 'cat <<_LTECHO_EOF 350525b89263Smrg$[]1 350625b89263Smrg_LTECHO_EOF' 350725b89263Smrg } 350825b89263Smrg ECHO='func_fallback_echo' 350925b89263Smrgfi 351025b89263Smrg 351125b89263Smrg# func_echo_all arg... 351225b89263Smrg# Invoke $ECHO with all args, space-separated. 351325b89263Smrgfunc_echo_all () 351425b89263Smrg{ 351525b89263Smrg $ECHO "$*" 351625b89263Smrg} 351725b89263Smrg 351825b89263Smrgcase "$ECHO" in 351925b89263Smrg printf*) AC_MSG_RESULT([printf]) ;; 352025b89263Smrg print*) AC_MSG_RESULT([print -r]) ;; 352125b89263Smrg *) AC_MSG_RESULT([cat]) ;; 352225b89263Smrgesac 352325b89263Smrg 352425b89263Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 352525b89263Smrg[_AS_DETECT_SUGGESTED([ 352625b89263Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 352725b89263Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 352825b89263Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 352925b89263Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 353025b89263Smrg PATH=/empty FPATH=/empty; export PATH FPATH 353125b89263Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 353225b89263Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 353325b89263Smrg 353425b89263Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 353525b89263Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 353625b89263Smrg])# _LT_PROG_ECHO_BACKSLASH 353725b89263Smrg 353825b89263Smrg 353925b89263Smrg# _LT_ENABLE_LOCK 354025b89263Smrg# --------------- 354125b89263Smrgm4_defun([_LT_ENABLE_LOCK], 354225b89263Smrg[AC_ARG_ENABLE([libtool-lock], 354325b89263Smrg [AS_HELP_STRING([--disable-libtool-lock], 354425b89263Smrg [avoid locking (might break parallel builds)])]) 354525b89263Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 354625b89263Smrg 354725b89263Smrg# Some flags need to be propagated to the compiler or linker for good 354825b89263Smrg# libtool support. 354925b89263Smrgcase $host in 355025b89263Smrgia64-*-hpux*) 355125b89263Smrg # Find out which ABI we are using. 355225b89263Smrg echo 'int i;' > conftest.$ac_ext 355325b89263Smrg if AC_TRY_EVAL(ac_compile); then 355425b89263Smrg case `/usr/bin/file conftest.$ac_objext` in 355525b89263Smrg *ELF-32*) 355625b89263Smrg HPUX_IA64_MODE="32" 3557ea133fd7Smrg ;; 355825b89263Smrg *ELF-64*) 355925b89263Smrg HPUX_IA64_MODE="64" 356025b89263Smrg ;; 356125b89263Smrg esac 356225b89263Smrg fi 356325b89263Smrg rm -rf conftest* 356425b89263Smrg ;; 356525b89263Smrg*-*-irix6*) 356625b89263Smrg # Find out which ABI we are using. 356725b89263Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 356825b89263Smrg if AC_TRY_EVAL(ac_compile); then 356925b89263Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 357025b89263Smrg case `/usr/bin/file conftest.$ac_objext` in 357125b89263Smrg *32-bit*) 357225b89263Smrg LD="${LD-ld} -melf32bsmip" 357325b89263Smrg ;; 357425b89263Smrg *N32*) 357525b89263Smrg LD="${LD-ld} -melf32bmipn32" 357625b89263Smrg ;; 357725b89263Smrg *64-bit*) 357825b89263Smrg LD="${LD-ld} -melf64bmip" 357925b89263Smrg ;; 358025b89263Smrg esac 358125b89263Smrg else 358225b89263Smrg case `/usr/bin/file conftest.$ac_objext` in 358325b89263Smrg *32-bit*) 358425b89263Smrg LD="${LD-ld} -32" 358525b89263Smrg ;; 358625b89263Smrg *N32*) 358725b89263Smrg LD="${LD-ld} -n32" 358825b89263Smrg ;; 358925b89263Smrg *64-bit*) 359025b89263Smrg LD="${LD-ld} -64" 359125b89263Smrg ;; 359225b89263Smrg esac 359325b89263Smrg fi 359425b89263Smrg fi 359525b89263Smrg rm -rf conftest* 359625b89263Smrg ;; 359725b89263Smrg 359825b89263Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 359925b89263Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 360025b89263Smrg # Find out which ABI we are using. 360125b89263Smrg echo 'int i;' > conftest.$ac_ext 360225b89263Smrg if AC_TRY_EVAL(ac_compile); then 360325b89263Smrg case `/usr/bin/file conftest.o` in 360425b89263Smrg *32-bit*) 360525b89263Smrg case $host in 360625b89263Smrg x86_64-*kfreebsd*-gnu) 360725b89263Smrg LD="${LD-ld} -m elf_i386_fbsd" 3608ea133fd7Smrg ;; 360925b89263Smrg x86_64-*linux*) 361025b89263Smrg LD="${LD-ld} -m elf_i386" 3611ea133fd7Smrg ;; 361225b89263Smrg ppc64-*linux*|powerpc64-*linux*) 361325b89263Smrg LD="${LD-ld} -m elf32ppclinux" 3614ea133fd7Smrg ;; 361525b89263Smrg s390x-*linux*) 361625b89263Smrg LD="${LD-ld} -m elf_s390" 3617ea133fd7Smrg ;; 361825b89263Smrg sparc64-*linux*) 361925b89263Smrg LD="${LD-ld} -m elf32_sparc" 3620ea133fd7Smrg ;; 3621ea133fd7Smrg esac 3622ea133fd7Smrg ;; 362325b89263Smrg *64-bit*) 362425b89263Smrg case $host in 362525b89263Smrg x86_64-*kfreebsd*-gnu) 362625b89263Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 3627ea133fd7Smrg ;; 362825b89263Smrg x86_64-*linux*) 362925b89263Smrg LD="${LD-ld} -m elf_x86_64" 3630ea133fd7Smrg ;; 363125b89263Smrg ppc*-*linux*|powerpc*-*linux*) 363225b89263Smrg LD="${LD-ld} -m elf64ppc" 3633ea133fd7Smrg ;; 363425b89263Smrg s390*-*linux*|s390*-*tpf*) 363525b89263Smrg LD="${LD-ld} -m elf64_s390" 3636ea133fd7Smrg ;; 363725b89263Smrg sparc*-*linux*) 363825b89263Smrg LD="${LD-ld} -m elf64_sparc" 3639ea133fd7Smrg ;; 3640ea133fd7Smrg esac 3641ea133fd7Smrg ;; 364225b89263Smrg esac 364325b89263Smrg fi 364425b89263Smrg rm -rf conftest* 364525b89263Smrg ;; 364625b89263Smrg 364725b89263Smrg*-*-sco3.2v5*) 364825b89263Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 364925b89263Smrg SAVE_CFLAGS="$CFLAGS" 365025b89263Smrg CFLAGS="$CFLAGS -belf" 365125b89263Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 365225b89263Smrg [AC_LANG_PUSH(C) 365325b89263Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 365425b89263Smrg AC_LANG_POP]) 365525b89263Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 365625b89263Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 365725b89263Smrg CFLAGS="$SAVE_CFLAGS" 365825b89263Smrg fi 365925b89263Smrg ;; 366025b89263Smrgsparc*-*solaris*) 366125b89263Smrg # Find out which ABI we are using. 366225b89263Smrg echo 'int i;' > conftest.$ac_ext 366325b89263Smrg if AC_TRY_EVAL(ac_compile); then 366425b89263Smrg case `/usr/bin/file conftest.o` in 366525b89263Smrg *64-bit*) 366625b89263Smrg case $lt_cv_prog_gnu_ld in 366725b89263Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 3668ea133fd7Smrg *) 366925b89263Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 367025b89263Smrg LD="${LD-ld} -64" 367125b89263Smrg fi 3672ea133fd7Smrg ;; 367325b89263Smrg esac 367425b89263Smrg ;; 367525b89263Smrg esac 367625b89263Smrg fi 367725b89263Smrg rm -rf conftest* 367825b89263Smrg ;; 367925b89263Smrgesac 368025b89263Smrg 368125b89263Smrgneed_locks="$enable_libtool_lock" 368225b89263Smrg])# _LT_ENABLE_LOCK 368325b89263Smrg 368425b89263Smrg 368525b89263Smrg# _LT_CMD_OLD_ARCHIVE 368625b89263Smrg# ------------------- 368725b89263Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 368825b89263Smrg[AC_CHECK_TOOL(AR, ar, false) 368925b89263Smrgtest -z "$AR" && AR=ar 369025b89263Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 369125b89263Smrg_LT_DECL([], [AR], [1], [The archiver]) 369225b89263Smrg_LT_DECL([], [AR_FLAGS], [1]) 369325b89263Smrg 369425b89263SmrgAC_CHECK_TOOL(STRIP, strip, :) 369525b89263Smrgtest -z "$STRIP" && STRIP=: 369625b89263Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 369725b89263Smrg 369825b89263SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 369925b89263Smrgtest -z "$RANLIB" && RANLIB=: 370025b89263Smrg_LT_DECL([], [RANLIB], [1], 370125b89263Smrg [Commands used to install an old-style archive]) 370225b89263Smrg 370325b89263Smrg# Determine commands to create old-style static archives. 370425b89263Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 370525b89263Smrgold_postinstall_cmds='chmod 644 $oldlib' 370625b89263Smrgold_postuninstall_cmds= 370725b89263Smrg 370825b89263Smrgif test -n "$RANLIB"; then 370925b89263Smrg case $host_os in 371025b89263Smrg openbsd*) 371125b89263Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 371225b89263Smrg ;; 371325b89263Smrg *) 371425b89263Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 371525b89263Smrg ;; 371625b89263Smrg esac 371725b89263Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 371825b89263Smrgfi 371925b89263Smrg 372025b89263Smrgcase $host_os in 372125b89263Smrg darwin*) 372225b89263Smrg lock_old_archive_extraction=yes ;; 372325b89263Smrg *) 372425b89263Smrg lock_old_archive_extraction=no ;; 372525b89263Smrgesac 372625b89263Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 372725b89263Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 372825b89263Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 372925b89263Smrg [Commands used to build an old-style archive]) 373025b89263Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 373125b89263Smrg [Whether to use a lock for old archive extraction]) 373225b89263Smrg])# _LT_CMD_OLD_ARCHIVE 373325b89263Smrg 373425b89263Smrg 373525b89263Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 373625b89263Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 373725b89263Smrg# ---------------------------------------------------------------- 373825b89263Smrg# Check whether the given compiler option works 373925b89263SmrgAC_DEFUN([_LT_COMPILER_OPTION], 374025b89263Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 374125b89263Smrgm4_require([_LT_DECL_SED])dnl 374225b89263SmrgAC_CACHE_CHECK([$1], [$2], 374325b89263Smrg [$2=no 374425b89263Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 374525b89263Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 374625b89263Smrg lt_compiler_flag="$3" 374725b89263Smrg # Insert the option either (1) after the last *FLAGS variable, or 374825b89263Smrg # (2) before a word containing "conftest.", or (3) at the end. 374925b89263Smrg # Note that $ac_compile itself does not contain backslashes and begins 375025b89263Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 375125b89263Smrg # The option is referenced via a variable to avoid confusing sed. 375225b89263Smrg lt_compile=`echo "$ac_compile" | $SED \ 375325b89263Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 375425b89263Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 375525b89263Smrg -e 's:$: $lt_compiler_flag:'` 375625b89263Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 375725b89263Smrg (eval "$lt_compile" 2>conftest.err) 375825b89263Smrg ac_status=$? 375925b89263Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 376025b89263Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 376125b89263Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 376225b89263Smrg # The compiler can only warn and ignore the option if not recognized 376325b89263Smrg # So say no if there are warnings other than the usual output. 376425b89263Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 376525b89263Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 376625b89263Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 376725b89263Smrg $2=yes 376825b89263Smrg fi 376925b89263Smrg fi 377025b89263Smrg $RM conftest* 377125b89263Smrg]) 377225b89263Smrg 377325b89263Smrgif test x"[$]$2" = xyes; then 377425b89263Smrg m4_if([$5], , :, [$5]) 377525b89263Smrgelse 377625b89263Smrg m4_if([$6], , :, [$6]) 377725b89263Smrgfi 377825b89263Smrg])# _LT_COMPILER_OPTION 377925b89263Smrg 378025b89263Smrg# Old name: 378125b89263SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 378225b89263Smrgdnl aclocal-1.4 backwards compatibility: 378325b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 378425b89263Smrg 378525b89263Smrg 378625b89263Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 378725b89263Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 378825b89263Smrg# ---------------------------------------------------- 378925b89263Smrg# Check whether the given linker option works 379025b89263SmrgAC_DEFUN([_LT_LINKER_OPTION], 379125b89263Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 379225b89263Smrgm4_require([_LT_DECL_SED])dnl 379325b89263SmrgAC_CACHE_CHECK([$1], [$2], 379425b89263Smrg [$2=no 379525b89263Smrg save_LDFLAGS="$LDFLAGS" 379625b89263Smrg LDFLAGS="$LDFLAGS $3" 379725b89263Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 379825b89263Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 379925b89263Smrg # The linker can only warn and ignore the option if not recognized 380025b89263Smrg # So say no if there are warnings 380125b89263Smrg if test -s conftest.err; then 380225b89263Smrg # Append any errors to the config.log. 380325b89263Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 380425b89263Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 380525b89263Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 380625b89263Smrg if diff conftest.exp conftest.er2 >/dev/null; then 380725b89263Smrg $2=yes 380825b89263Smrg fi 380925b89263Smrg else 381025b89263Smrg $2=yes 381125b89263Smrg fi 381225b89263Smrg fi 381325b89263Smrg $RM -r conftest* 381425b89263Smrg LDFLAGS="$save_LDFLAGS" 381525b89263Smrg]) 381625b89263Smrg 381725b89263Smrgif test x"[$]$2" = xyes; then 381825b89263Smrg m4_if([$4], , :, [$4]) 381925b89263Smrgelse 382025b89263Smrg m4_if([$5], , :, [$5]) 382125b89263Smrgfi 382225b89263Smrg])# _LT_LINKER_OPTION 382325b89263Smrg 382425b89263Smrg# Old name: 382525b89263SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 382625b89263Smrgdnl aclocal-1.4 backwards compatibility: 382725b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 382825b89263Smrg 382925b89263Smrg 383025b89263Smrg# LT_CMD_MAX_LEN 383125b89263Smrg#--------------- 383225b89263SmrgAC_DEFUN([LT_CMD_MAX_LEN], 383325b89263Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 383425b89263Smrg# find the maximum length of command line arguments 383525b89263SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 383625b89263SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 383725b89263Smrg i=0 383825b89263Smrg teststring="ABCD" 383925b89263Smrg 384025b89263Smrg case $build_os in 384125b89263Smrg msdosdjgpp*) 384225b89263Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 384325b89263Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 384425b89263Smrg # during glob expansion). Even if it were fixed, the result of this 384525b89263Smrg # check would be larger than it should be. 384625b89263Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 384725b89263Smrg ;; 384825b89263Smrg 384925b89263Smrg gnu*) 385025b89263Smrg # Under GNU Hurd, this test is not required because there is 385125b89263Smrg # no limit to the length of command line arguments. 385225b89263Smrg # Libtool will interpret -1 as no limit whatsoever 385325b89263Smrg lt_cv_sys_max_cmd_len=-1; 385425b89263Smrg ;; 385525b89263Smrg 385625b89263Smrg cygwin* | mingw* | cegcc*) 385725b89263Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 385825b89263Smrg # about 5 minutes as the teststring grows exponentially. 385925b89263Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 386025b89263Smrg # you end up with a "frozen" computer, even though with patience 386125b89263Smrg # the test eventually succeeds (with a max line length of 256k). 386225b89263Smrg # Instead, let's just punt: use the minimum linelength reported by 386325b89263Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 386425b89263Smrg lt_cv_sys_max_cmd_len=8192; 386525b89263Smrg ;; 386625b89263Smrg 386725b89263Smrg mint*) 386825b89263Smrg # On MiNT this can take a long time and run out of memory. 386925b89263Smrg lt_cv_sys_max_cmd_len=8192; 387025b89263Smrg ;; 387125b89263Smrg 387225b89263Smrg amigaos*) 387325b89263Smrg # On AmigaOS with pdksh, this test takes hours, literally. 387425b89263Smrg # So we just punt and use a minimum line length of 8192. 387525b89263Smrg lt_cv_sys_max_cmd_len=8192; 387625b89263Smrg ;; 387725b89263Smrg 387825b89263Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 387925b89263Smrg # This has been around since 386BSD, at least. Likely further. 388025b89263Smrg if test -x /sbin/sysctl; then 388125b89263Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 388225b89263Smrg elif test -x /usr/sbin/sysctl; then 388325b89263Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 388425b89263Smrg else 388525b89263Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 388625b89263Smrg fi 388725b89263Smrg # And add a safety zone 388825b89263Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 388925b89263Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 389025b89263Smrg ;; 389125b89263Smrg 389225b89263Smrg interix*) 389325b89263Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 389425b89263Smrg lt_cv_sys_max_cmd_len=196608 389525b89263Smrg ;; 389625b89263Smrg 389725b89263Smrg osf*) 389825b89263Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 389925b89263Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 390025b89263Smrg # nice to cause kernel panics so lets avoid the loop below. 390125b89263Smrg # First set a reasonable default. 390225b89263Smrg lt_cv_sys_max_cmd_len=16384 390325b89263Smrg # 390425b89263Smrg if test -x /sbin/sysconfig; then 390525b89263Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 390625b89263Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 390725b89263Smrg esac 390825b89263Smrg fi 390925b89263Smrg ;; 391025b89263Smrg sco3.2v5*) 391125b89263Smrg lt_cv_sys_max_cmd_len=102400 391225b89263Smrg ;; 391325b89263Smrg sysv5* | sco5v6* | sysv4.2uw2*) 391425b89263Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 391525b89263Smrg if test -n "$kargmax"; then 391625b89263Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 391725b89263Smrg else 391825b89263Smrg lt_cv_sys_max_cmd_len=32768 391925b89263Smrg fi 392025b89263Smrg ;; 392125b89263Smrg *) 392225b89263Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 392325b89263Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 392425b89263Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 392525b89263Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 392625b89263Smrg else 392725b89263Smrg # Make teststring a little bigger before we do anything with it. 392825b89263Smrg # a 1K string should be a reasonable start. 392925b89263Smrg for i in 1 2 3 4 5 6 7 8 ; do 393025b89263Smrg teststring=$teststring$teststring 393125b89263Smrg done 393225b89263Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 393325b89263Smrg # If test is not a shell built-in, we'll probably end up computing a 393425b89263Smrg # maximum length that is only half of the actual maximum length, but 393525b89263Smrg # we can't tell. 393625b89263Smrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 393725b89263Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 393825b89263Smrg test $i != 17 # 1/2 MB should be enough 393925b89263Smrg do 394025b89263Smrg i=`expr $i + 1` 394125b89263Smrg teststring=$teststring$teststring 394225b89263Smrg done 394325b89263Smrg # Only check the string length outside the loop. 394425b89263Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 394525b89263Smrg teststring= 394625b89263Smrg # Add a significant safety factor because C++ compilers can tack on 394725b89263Smrg # massive amounts of additional arguments before passing them to the 394825b89263Smrg # linker. It appears as though 1/2 is a usable value. 394925b89263Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 395025b89263Smrg fi 395125b89263Smrg ;; 395225b89263Smrg esac 395325b89263Smrg]) 395425b89263Smrgif test -n $lt_cv_sys_max_cmd_len ; then 395525b89263Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 395625b89263Smrgelse 395725b89263Smrg AC_MSG_RESULT(none) 395825b89263Smrgfi 395925b89263Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 396025b89263Smrg_LT_DECL([], [max_cmd_len], [0], 396125b89263Smrg [What is the maximum length of a command?]) 396225b89263Smrg])# LT_CMD_MAX_LEN 396325b89263Smrg 396425b89263Smrg# Old name: 396525b89263SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 396625b89263Smrgdnl aclocal-1.4 backwards compatibility: 396725b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 396825b89263Smrg 396925b89263Smrg 397025b89263Smrg# _LT_HEADER_DLFCN 397125b89263Smrg# ---------------- 397225b89263Smrgm4_defun([_LT_HEADER_DLFCN], 397325b89263Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 397425b89263Smrg])# _LT_HEADER_DLFCN 397525b89263Smrg 397625b89263Smrg 397725b89263Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 397825b89263Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 397925b89263Smrg# ---------------------------------------------------------------- 398025b89263Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 398125b89263Smrg[m4_require([_LT_HEADER_DLFCN])dnl 398225b89263Smrgif test "$cross_compiling" = yes; then : 398325b89263Smrg [$4] 398425b89263Smrgelse 398525b89263Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 398625b89263Smrg lt_status=$lt_dlunknown 398725b89263Smrg cat > conftest.$ac_ext <<_LT_EOF 398825b89263Smrg[#line $LINENO "configure" 398925b89263Smrg#include "confdefs.h" 399025b89263Smrg 399125b89263Smrg#if HAVE_DLFCN_H 399225b89263Smrg#include <dlfcn.h> 399325b89263Smrg#endif 399425b89263Smrg 399525b89263Smrg#include <stdio.h> 399625b89263Smrg 399725b89263Smrg#ifdef RTLD_GLOBAL 399825b89263Smrg# define LT_DLGLOBAL RTLD_GLOBAL 399925b89263Smrg#else 400025b89263Smrg# ifdef DL_GLOBAL 400125b89263Smrg# define LT_DLGLOBAL DL_GLOBAL 400225b89263Smrg# else 400325b89263Smrg# define LT_DLGLOBAL 0 400425b89263Smrg# endif 400525b89263Smrg#endif 400625b89263Smrg 400725b89263Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 400825b89263Smrg find out it does not work in some platform. */ 400925b89263Smrg#ifndef LT_DLLAZY_OR_NOW 401025b89263Smrg# ifdef RTLD_LAZY 401125b89263Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 401225b89263Smrg# else 401325b89263Smrg# ifdef DL_LAZY 401425b89263Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 401525b89263Smrg# else 401625b89263Smrg# ifdef RTLD_NOW 401725b89263Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 401825b89263Smrg# else 401925b89263Smrg# ifdef DL_NOW 402025b89263Smrg# define LT_DLLAZY_OR_NOW DL_NOW 402125b89263Smrg# else 402225b89263Smrg# define LT_DLLAZY_OR_NOW 0 402325b89263Smrg# endif 402425b89263Smrg# endif 402525b89263Smrg# endif 402625b89263Smrg# endif 402725b89263Smrg#endif 402825b89263Smrg 402925b89263Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 403025b89263Smrg correspondingly for the symbols needed. */ 403125b89263Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 403225b89263Smrgvoid fnord () __attribute__((visibility("default"))); 403325b89263Smrg#endif 403425b89263Smrg 403525b89263Smrgvoid fnord () { int i=42; } 403625b89263Smrgint main () 403725b89263Smrg{ 403825b89263Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 403925b89263Smrg int status = $lt_dlunknown; 404025b89263Smrg 404125b89263Smrg if (self) 404225b89263Smrg { 404325b89263Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 404425b89263Smrg else 404525b89263Smrg { 404625b89263Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 404725b89263Smrg else puts (dlerror ()); 404825b89263Smrg } 404925b89263Smrg /* dlclose (self); */ 405025b89263Smrg } 405125b89263Smrg else 405225b89263Smrg puts (dlerror ()); 405325b89263Smrg 405425b89263Smrg return status; 405525b89263Smrg}] 405625b89263Smrg_LT_EOF 405725b89263Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 405825b89263Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 405925b89263Smrg lt_status=$? 406025b89263Smrg case x$lt_status in 406125b89263Smrg x$lt_dlno_uscore) $1 ;; 406225b89263Smrg x$lt_dlneed_uscore) $2 ;; 406325b89263Smrg x$lt_dlunknown|x*) $3 ;; 4064ea133fd7Smrg esac 406525b89263Smrg else : 406625b89263Smrg # compilation failed 406725b89263Smrg $3 4068ea133fd7Smrg fi 406925b89263Smrgfi 407025b89263Smrgrm -fr conftest* 407125b89263Smrg])# _LT_TRY_DLOPEN_SELF 4072a253d6aeSmrg 4073a253d6aeSmrg 407425b89263Smrg# LT_SYS_DLOPEN_SELF 407525b89263Smrg# ------------------ 407625b89263SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 407725b89263Smrg[m4_require([_LT_HEADER_DLFCN])dnl 407825b89263Smrgif test "x$enable_dlopen" != xyes; then 407925b89263Smrg enable_dlopen=unknown 408025b89263Smrg enable_dlopen_self=unknown 408125b89263Smrg enable_dlopen_self_static=unknown 408225b89263Smrgelse 408325b89263Smrg lt_cv_dlopen=no 408425b89263Smrg lt_cv_dlopen_libs= 4085a253d6aeSmrg 408625b89263Smrg case $host_os in 408725b89263Smrg beos*) 408825b89263Smrg lt_cv_dlopen="load_add_on" 408925b89263Smrg lt_cv_dlopen_libs= 409025b89263Smrg lt_cv_dlopen_self=yes 409125b89263Smrg ;; 4092a253d6aeSmrg 409325b89263Smrg mingw* | pw32* | cegcc*) 409425b89263Smrg lt_cv_dlopen="LoadLibrary" 409525b89263Smrg lt_cv_dlopen_libs= 409625b89263Smrg ;; 4097a253d6aeSmrg 409825b89263Smrg cygwin*) 409925b89263Smrg lt_cv_dlopen="dlopen" 410025b89263Smrg lt_cv_dlopen_libs= 410125b89263Smrg ;; 4102a253d6aeSmrg 410325b89263Smrg darwin*) 410425b89263Smrg # if libdl is installed we need to link against it 410525b89263Smrg AC_CHECK_LIB([dl], [dlopen], 410625b89263Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 410725b89263Smrg lt_cv_dlopen="dyld" 410825b89263Smrg lt_cv_dlopen_libs= 410925b89263Smrg lt_cv_dlopen_self=yes 411025b89263Smrg ]) 411125b89263Smrg ;; 4112a253d6aeSmrg 411325b89263Smrg *) 411425b89263Smrg AC_CHECK_FUNC([shl_load], 411525b89263Smrg [lt_cv_dlopen="shl_load"], 411625b89263Smrg [AC_CHECK_LIB([dld], [shl_load], 411725b89263Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 411825b89263Smrg [AC_CHECK_FUNC([dlopen], 411925b89263Smrg [lt_cv_dlopen="dlopen"], 412025b89263Smrg [AC_CHECK_LIB([dl], [dlopen], 412125b89263Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 412225b89263Smrg [AC_CHECK_LIB([svld], [dlopen], 412325b89263Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 412425b89263Smrg [AC_CHECK_LIB([dld], [dld_link], 412525b89263Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 412625b89263Smrg ]) 412725b89263Smrg ]) 412825b89263Smrg ]) 412925b89263Smrg ]) 413025b89263Smrg ]) 413125b89263Smrg ;; 413225b89263Smrg esac 4133a253d6aeSmrg 413425b89263Smrg if test "x$lt_cv_dlopen" != xno; then 413525b89263Smrg enable_dlopen=yes 413625b89263Smrg else 413725b89263Smrg enable_dlopen=no 413825b89263Smrg fi 4139a253d6aeSmrg 414025b89263Smrg case $lt_cv_dlopen in 414125b89263Smrg dlopen) 414225b89263Smrg save_CPPFLAGS="$CPPFLAGS" 414325b89263Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 4144a253d6aeSmrg 414525b89263Smrg save_LDFLAGS="$LDFLAGS" 414625b89263Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 4147a253d6aeSmrg 414825b89263Smrg save_LIBS="$LIBS" 414925b89263Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 4150a253d6aeSmrg 415125b89263Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 415225b89263Smrg lt_cv_dlopen_self, [dnl 415325b89263Smrg _LT_TRY_DLOPEN_SELF( 415425b89263Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 415525b89263Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 415625b89263Smrg ]) 4157a253d6aeSmrg 415825b89263Smrg if test "x$lt_cv_dlopen_self" = xyes; then 415925b89263Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 416025b89263Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 416125b89263Smrg lt_cv_dlopen_self_static, [dnl 416225b89263Smrg _LT_TRY_DLOPEN_SELF( 416325b89263Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 416425b89263Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 416525b89263Smrg ]) 416625b89263Smrg fi 4167a253d6aeSmrg 416825b89263Smrg CPPFLAGS="$save_CPPFLAGS" 416925b89263Smrg LDFLAGS="$save_LDFLAGS" 417025b89263Smrg LIBS="$save_LIBS" 417125b89263Smrg ;; 417225b89263Smrg esac 4173a253d6aeSmrg 417425b89263Smrg case $lt_cv_dlopen_self in 417525b89263Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 417625b89263Smrg *) enable_dlopen_self=unknown ;; 417725b89263Smrg esac 4178a253d6aeSmrg 417925b89263Smrg case $lt_cv_dlopen_self_static in 418025b89263Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 418125b89263Smrg *) enable_dlopen_self_static=unknown ;; 418225b89263Smrg esac 418325b89263Smrgfi 418425b89263Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 418525b89263Smrg [Whether dlopen is supported]) 418625b89263Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 418725b89263Smrg [Whether dlopen of programs is supported]) 418825b89263Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 418925b89263Smrg [Whether dlopen of statically linked programs is supported]) 419025b89263Smrg])# LT_SYS_DLOPEN_SELF 4191a253d6aeSmrg 419225b89263Smrg# Old name: 419325b89263SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 419425b89263Smrgdnl aclocal-1.4 backwards compatibility: 419525b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 4196a253d6aeSmrg 4197a253d6aeSmrg 419825b89263Smrg# _LT_COMPILER_C_O([TAGNAME]) 419925b89263Smrg# --------------------------- 420025b89263Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 420125b89263Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 420225b89263Smrgm4_defun([_LT_COMPILER_C_O], 420325b89263Smrg[m4_require([_LT_DECL_SED])dnl 420425b89263Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 420525b89263Smrgm4_require([_LT_TAG_COMPILER])dnl 420625b89263SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 420725b89263Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 420825b89263Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 420925b89263Smrg $RM -r conftest 2>/dev/null 421025b89263Smrg mkdir conftest 421125b89263Smrg cd conftest 421225b89263Smrg mkdir out 421325b89263Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4214a253d6aeSmrg 421525b89263Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 421625b89263Smrg # Insert the option either (1) after the last *FLAGS variable, or 421725b89263Smrg # (2) before a word containing "conftest.", or (3) at the end. 421825b89263Smrg # Note that $ac_compile itself does not contain backslashes and begins 421925b89263Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 422025b89263Smrg lt_compile=`echo "$ac_compile" | $SED \ 422125b89263Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 422225b89263Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 422325b89263Smrg -e 's:$: $lt_compiler_flag:'` 422425b89263Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 422525b89263Smrg (eval "$lt_compile" 2>out/conftest.err) 422625b89263Smrg ac_status=$? 422725b89263Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 422825b89263Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 422925b89263Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 423025b89263Smrg then 423125b89263Smrg # The compiler can only warn and ignore the option if not recognized 423225b89263Smrg # So say no if there are warnings 423325b89263Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 423425b89263Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 423525b89263Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 423625b89263Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 423725b89263Smrg fi 423825b89263Smrg fi 423925b89263Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 424025b89263Smrg $RM conftest* 424125b89263Smrg # SGI C++ compiler will create directory out/ii_files/ for 424225b89263Smrg # template instantiation 424325b89263Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 424425b89263Smrg $RM out/* && rmdir out 424525b89263Smrg cd .. 424625b89263Smrg $RM -r conftest 424725b89263Smrg $RM conftest* 424825b89263Smrg]) 424925b89263Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 425025b89263Smrg [Does compiler simultaneously support -c and -o options?]) 425125b89263Smrg])# _LT_COMPILER_C_O 4252a253d6aeSmrg 4253a253d6aeSmrg 425425b89263Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 425525b89263Smrg# ---------------------------------- 425625b89263Smrg# Check to see if we can do hard links to lock some files if needed 425725b89263Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 425825b89263Smrg[m4_require([_LT_ENABLE_LOCK])dnl 425925b89263Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 426025b89263Smrg_LT_COMPILER_C_O([$1]) 4261a253d6aeSmrg 426225b89263Smrghard_links="nottested" 426325b89263Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 426425b89263Smrg # do not overwrite the value of need_locks provided by the user 426525b89263Smrg AC_MSG_CHECKING([if we can lock with hard links]) 426625b89263Smrg hard_links=yes 426725b89263Smrg $RM conftest* 426825b89263Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 426925b89263Smrg touch conftest.a 427025b89263Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 427125b89263Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 427225b89263Smrg AC_MSG_RESULT([$hard_links]) 427325b89263Smrg if test "$hard_links" = no; then 427425b89263Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 427525b89263Smrg need_locks=warn 427625b89263Smrg fi 427725b89263Smrgelse 427825b89263Smrg need_locks=no 427925b89263Smrgfi 428025b89263Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 428125b89263Smrg])# _LT_COMPILER_FILE_LOCKS 4282a253d6aeSmrg 4283a253d6aeSmrg 428425b89263Smrg# _LT_CHECK_OBJDIR 428525b89263Smrg# ---------------- 428625b89263Smrgm4_defun([_LT_CHECK_OBJDIR], 428725b89263Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 428825b89263Smrg[rm -f .libs 2>/dev/null 428925b89263Smrgmkdir .libs 2>/dev/null 429025b89263Smrgif test -d .libs; then 429125b89263Smrg lt_cv_objdir=.libs 429225b89263Smrgelse 429325b89263Smrg # MS-DOS does not allow filenames that begin with a dot. 429425b89263Smrg lt_cv_objdir=_libs 429525b89263Smrgfi 429625b89263Smrgrmdir .libs 2>/dev/null]) 429725b89263Smrgobjdir=$lt_cv_objdir 429825b89263Smrg_LT_DECL([], [objdir], [0], 429925b89263Smrg [The name of the directory that contains temporary libtool files])dnl 430025b89263Smrgm4_pattern_allow([LT_OBJDIR])dnl 430125b89263SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 430225b89263Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 430325b89263Smrg])# _LT_CHECK_OBJDIR 4304a253d6aeSmrg 4305a253d6aeSmrg 430625b89263Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 430725b89263Smrg# -------------------------------------- 430825b89263Smrg# Check hardcoding attributes. 430925b89263Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 431025b89263Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 431125b89263Smrg_LT_TAGVAR(hardcode_action, $1)= 431225b89263Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 431325b89263Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 431425b89263Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 4315a253d6aeSmrg 431625b89263Smrg # We can hardcode non-existent directories. 431725b89263Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 431825b89263Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 431925b89263Smrg # have to relink, otherwise we might link with an installed library 432025b89263Smrg # when we should be linking with a yet-to-be-installed one 432125b89263Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 432225b89263Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 432325b89263Smrg # Linking always hardcodes the temporary library directory. 432425b89263Smrg _LT_TAGVAR(hardcode_action, $1)=relink 432525b89263Smrg else 432625b89263Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 432725b89263Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 432825b89263Smrg fi 432925b89263Smrgelse 433025b89263Smrg # We cannot hardcode anything, or else we can only hardcode existing 433125b89263Smrg # directories. 433225b89263Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 4333ea133fd7Smrgfi 433425b89263SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 4335a253d6aeSmrg 433625b89263Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 433725b89263Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 433825b89263Smrg # Fast installation is not supported 433925b89263Smrg enable_fast_install=no 434025b89263Smrgelif test "$shlibpath_overrides_runpath" = yes || 434125b89263Smrg test "$enable_shared" = no; then 434225b89263Smrg # Fast installation is not necessary 434325b89263Smrg enable_fast_install=needless 434425b89263Smrgfi 434525b89263Smrg_LT_TAGDECL([], [hardcode_action], [0], 434625b89263Smrg [How to hardcode a shared library path into an executable]) 434725b89263Smrg])# _LT_LINKER_HARDCODE_LIBPATH 4348a253d6aeSmrg 4349a253d6aeSmrg 435025b89263Smrg# _LT_CMD_STRIPLIB 435125b89263Smrg# ---------------- 435225b89263Smrgm4_defun([_LT_CMD_STRIPLIB], 435325b89263Smrg[m4_require([_LT_DECL_EGREP]) 435425b89263Smrgstriplib= 435525b89263Smrgold_striplib= 435625b89263SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 435725b89263Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 435825b89263Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 435925b89263Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 436025b89263Smrg AC_MSG_RESULT([yes]) 436125b89263Smrgelse 436225b89263Smrg# FIXME - insert some real tests, host_os isn't really good enough 4363ea133fd7Smrg case $host_os in 436425b89263Smrg darwin*) 436525b89263Smrg if test -n "$STRIP" ; then 436625b89263Smrg striplib="$STRIP -x" 436725b89263Smrg old_striplib="$STRIP -S" 436825b89263Smrg AC_MSG_RESULT([yes]) 436925b89263Smrg else 437025b89263Smrg AC_MSG_RESULT([no]) 4371ea133fd7Smrg fi 4372ea133fd7Smrg ;; 437325b89263Smrg *) 437425b89263Smrg AC_MSG_RESULT([no]) 4375ea133fd7Smrg ;; 4376ea133fd7Smrg esac 437725b89263Smrgfi 437825b89263Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 437925b89263Smrg_LT_DECL([], [striplib], [1]) 438025b89263Smrg])# _LT_CMD_STRIPLIB 4381a253d6aeSmrg 4382a253d6aeSmrg 438325b89263Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 438425b89263Smrg# ----------------------------- 438525b89263Smrg# PORTME Fill in your ld.so characteristics 438625b89263Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 438725b89263Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 438825b89263Smrgm4_require([_LT_DECL_EGREP])dnl 438925b89263Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 439025b89263Smrgm4_require([_LT_DECL_OBJDUMP])dnl 439125b89263Smrgm4_require([_LT_DECL_SED])dnl 439225b89263Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 439325b89263SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 439425b89263Smrgm4_if([$1], 439525b89263Smrg [], [ 439625b89263Smrgif test "$GCC" = yes; then 439725b89263Smrg case $host_os in 439825b89263Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 439925b89263Smrg *) lt_awk_arg="/^libraries:/" ;; 440025b89263Smrg esac 440125b89263Smrg case $host_os in 440225b89263Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 440325b89263Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 440425b89263Smrg esac 440525b89263Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 440625b89263Smrg case $lt_search_path_spec in 440725b89263Smrg *\;*) 440825b89263Smrg # if the path contains ";" then we assume it to be the separator 440925b89263Smrg # otherwise default to the standard path separator (i.e. ":") - it is 441025b89263Smrg # assumed that no part of a normal pathname contains ";" but that should 441125b89263Smrg # okay in the real world where ";" in dirpaths is itself problematic. 441225b89263Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 441325b89263Smrg ;; 441425b89263Smrg *) 441525b89263Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 441625b89263Smrg ;; 441725b89263Smrg esac 441825b89263Smrg # Ok, now we have the path, separated by spaces, we can step through it 441925b89263Smrg # and add multilib dir if necessary. 442025b89263Smrg lt_tmp_lt_search_path_spec= 442125b89263Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 442225b89263Smrg for lt_sys_path in $lt_search_path_spec; do 442325b89263Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 442425b89263Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 4425a253d6aeSmrg else 442625b89263Smrg test -d "$lt_sys_path" && \ 442725b89263Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 4428a253d6aeSmrg fi 442925b89263Smrg done 443025b89263Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 443125b89263SmrgBEGIN {RS=" "; FS="/|\n";} { 443225b89263Smrg lt_foo=""; 443325b89263Smrg lt_count=0; 443425b89263Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 443525b89263Smrg if ($lt_i != "" && $lt_i != ".") { 443625b89263Smrg if ($lt_i == "..") { 443725b89263Smrg lt_count++; 443825b89263Smrg } else { 443925b89263Smrg if (lt_count == 0) { 444025b89263Smrg lt_foo="/" $lt_i lt_foo; 444125b89263Smrg } else { 444225b89263Smrg lt_count--; 444325b89263Smrg } 444425b89263Smrg } 444525b89263Smrg } 444625b89263Smrg } 444725b89263Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 444825b89263Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 444925b89263Smrg}'` 445025b89263Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 445125b89263Smrg # for these hosts. 445225b89263Smrg case $host_os in 445325b89263Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 445425b89263Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 445525b89263Smrg esac 445625b89263Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 445725b89263Smrgelse 445825b89263Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 445925b89263Smrgfi]) 446025b89263Smrglibrary_names_spec= 446125b89263Smrglibname_spec='lib$name' 446225b89263Smrgsoname_spec= 446325b89263Smrgshrext_cmds=".so" 446425b89263Smrgpostinstall_cmds= 446525b89263Smrgpostuninstall_cmds= 446625b89263Smrgfinish_cmds= 446725b89263Smrgfinish_eval= 446825b89263Smrgshlibpath_var= 446925b89263Smrgshlibpath_overrides_runpath=unknown 447025b89263Smrgversion_type=none 447125b89263Smrgdynamic_linker="$host_os ld.so" 447225b89263Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 447325b89263Smrgneed_lib_prefix=unknown 447425b89263Smrghardcode_into_libs=no 4475ea133fd7Smrg 447625b89263Smrg# when you set need_version to no, make sure it does not cause -set_version 447725b89263Smrg# flags to be left without arguments 447825b89263Smrgneed_version=unknown 4479a253d6aeSmrg 448025b89263Smrgcase $host_os in 448125b89263Smrgaix3*) 448225b89263Smrg version_type=linux 448325b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 448425b89263Smrg shlibpath_var=LIBPATH 448525b89263Smrg 448625b89263Smrg # AIX 3 has no versioning support, so we append a major version to the name. 448725b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 448825b89263Smrg ;; 448925b89263Smrg 449025b89263Smrgaix[[4-9]]*) 449125b89263Smrg version_type=linux 449225b89263Smrg need_lib_prefix=no 449325b89263Smrg need_version=no 449425b89263Smrg hardcode_into_libs=yes 449525b89263Smrg if test "$host_cpu" = ia64; then 449625b89263Smrg # AIX 5 supports IA64 449725b89263Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 449825b89263Smrg shlibpath_var=LD_LIBRARY_PATH 449925b89263Smrg else 450025b89263Smrg # With GCC up to 2.95.x, collect2 would create an import file 450125b89263Smrg # for dependence libraries. The import file would start with 450225b89263Smrg # the line `#! .'. This would cause the generated library to 450325b89263Smrg # depend on `.', always an invalid library. This was fixed in 450425b89263Smrg # development snapshots of GCC prior to 3.0. 450525b89263Smrg case $host_os in 450625b89263Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 450725b89263Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 450825b89263Smrg echo ' yes ' 450925b89263Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 451025b89263Smrg : 4511a253d6aeSmrg else 451225b89263Smrg can_build_shared=no 4513a253d6aeSmrg fi 4514ea133fd7Smrg ;; 451525b89263Smrg esac 451625b89263Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 451725b89263Smrg # soname into executable. Probably we can add versioning support to 451825b89263Smrg # collect2, so additional links can be useful in future. 451925b89263Smrg if test "$aix_use_runtimelinking" = yes; then 452025b89263Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 452125b89263Smrg # instead of lib<name>.a to let people know that these are not 452225b89263Smrg # typical AIX shared libraries. 452325b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 452425b89263Smrg else 452525b89263Smrg # We preserve .a as extension for shared libraries through AIX4.2 452625b89263Smrg # and later when we are not doing run time linking. 452725b89263Smrg library_names_spec='${libname}${release}.a $libname.a' 452825b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 452925b89263Smrg fi 453025b89263Smrg shlibpath_var=LIBPATH 453125b89263Smrg fi 453225b89263Smrg ;; 4533a253d6aeSmrg 453425b89263Smrgamigaos*) 453525b89263Smrg case $host_cpu in 453625b89263Smrg powerpc) 453725b89263Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 453825b89263Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 453925b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 454025b89263Smrg ;; 454125b89263Smrg m68k) 454225b89263Smrg library_names_spec='$libname.ixlibrary $libname.a' 454325b89263Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 454425b89263Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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' 454525b89263Smrg ;; 454625b89263Smrg esac 454725b89263Smrg ;; 4548a253d6aeSmrg 454925b89263Smrgbeos*) 455025b89263Smrg library_names_spec='${libname}${shared_ext}' 455125b89263Smrg dynamic_linker="$host_os ld.so" 455225b89263Smrg shlibpath_var=LIBRARY_PATH 455325b89263Smrg ;; 4554a253d6aeSmrg 455525b89263Smrgbsdi[[45]]*) 455625b89263Smrg version_type=linux 455725b89263Smrg need_version=no 455825b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 455925b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 456025b89263Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 456125b89263Smrg shlibpath_var=LD_LIBRARY_PATH 456225b89263Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 456325b89263Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 456425b89263Smrg # the default ld.so.conf also contains /usr/contrib/lib and 456525b89263Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 456625b89263Smrg # libtool to hard-code these into programs 456725b89263Smrg ;; 456825b89263Smrg 456925b89263Smrgcygwin* | mingw* | pw32* | cegcc*) 457025b89263Smrg version_type=windows 457125b89263Smrg shrext_cmds=".dll" 457225b89263Smrg need_version=no 457325b89263Smrg need_lib_prefix=no 457425b89263Smrg 457525b89263Smrg case $GCC,$host_os in 457625b89263Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 457725b89263Smrg library_names_spec='$libname.dll.a' 457825b89263Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 457925b89263Smrg postinstall_cmds='base_file=`basename \${file}`~ 458025b89263Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 458125b89263Smrg dldir=$destdir/`dirname \$dlpath`~ 458225b89263Smrg test -d \$dldir || mkdir -p \$dldir~ 458325b89263Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 458425b89263Smrg chmod a+x \$dldir/$dlname~ 458525b89263Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 458625b89263Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 458725b89263Smrg fi' 458825b89263Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 458925b89263Smrg dlpath=$dir/\$dldll~ 459025b89263Smrg $RM \$dlpath' 459125b89263Smrg shlibpath_overrides_runpath=yes 459225b89263Smrg 459325b89263Smrg case $host_os in 459425b89263Smrg cygwin*) 459525b89263Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 459625b89263Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 459725b89263Smrgm4_if([$1], [],[ 459825b89263Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 459925b89263Smrg ;; 460025b89263Smrg mingw* | cegcc*) 460125b89263Smrg # MinGW DLLs use traditional 'lib' prefix 460225b89263Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 460325b89263Smrg ;; 460425b89263Smrg pw32*) 460525b89263Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 460625b89263Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4607ea133fd7Smrg ;; 460825b89263Smrg esac 460925b89263Smrg ;; 4610a253d6aeSmrg 461125b89263Smrg *) 461225b89263Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 461325b89263Smrg ;; 461425b89263Smrg esac 461525b89263Smrg dynamic_linker='Win32 ld.exe' 461625b89263Smrg # FIXME: first we should search . and the directory the executable is in 461725b89263Smrg shlibpath_var=PATH 461825b89263Smrg ;; 4619ea133fd7Smrg 462025b89263Smrgdarwin* | rhapsody*) 462125b89263Smrg dynamic_linker="$host_os dyld" 462225b89263Smrg version_type=darwin 462325b89263Smrg need_lib_prefix=no 462425b89263Smrg need_version=no 462525b89263Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 462625b89263Smrg soname_spec='${libname}${release}${major}$shared_ext' 462725b89263Smrg shlibpath_overrides_runpath=yes 462825b89263Smrg shlibpath_var=DYLD_LIBRARY_PATH 462925b89263Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 463025b89263Smrgm4_if([$1], [],[ 463125b89263Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 463225b89263Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 463325b89263Smrg ;; 4634ea133fd7Smrg 463525b89263Smrgdgux*) 463625b89263Smrg version_type=linux 463725b89263Smrg need_lib_prefix=no 463825b89263Smrg need_version=no 463925b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 464025b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 464125b89263Smrg shlibpath_var=LD_LIBRARY_PATH 464225b89263Smrg ;; 464325b89263Smrg 464425b89263Smrgfreebsd1*) 464525b89263Smrg dynamic_linker=no 464625b89263Smrg ;; 464725b89263Smrg 464825b89263Smrgfreebsd* | dragonfly*) 464925b89263Smrg # DragonFly does not have aout. When/if they implement a new 465025b89263Smrg # versioning mechanism, adjust this. 465125b89263Smrg if test -x /usr/bin/objformat; then 465225b89263Smrg objformat=`/usr/bin/objformat` 465325b89263Smrg else 465425b89263Smrg case $host_os in 465525b89263Smrg freebsd[[123]]*) objformat=aout ;; 465625b89263Smrg *) objformat=elf ;; 465725b89263Smrg esac 465825b89263Smrg fi 465925b89263Smrg version_type=freebsd-$objformat 466025b89263Smrg case $version_type in 466125b89263Smrg freebsd-elf*) 466225b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 466325b89263Smrg need_version=no 466425b89263Smrg need_lib_prefix=no 4665a253d6aeSmrg ;; 466625b89263Smrg freebsd-*) 466725b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 466825b89263Smrg need_version=yes 466925b89263Smrg ;; 467025b89263Smrg esac 467125b89263Smrg shlibpath_var=LD_LIBRARY_PATH 467225b89263Smrg case $host_os in 467325b89263Smrg freebsd2*) 467425b89263Smrg shlibpath_overrides_runpath=yes 467525b89263Smrg ;; 467625b89263Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 467725b89263Smrg shlibpath_overrides_runpath=yes 467825b89263Smrg hardcode_into_libs=yes 467925b89263Smrg ;; 468025b89263Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 468125b89263Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 468225b89263Smrg shlibpath_overrides_runpath=no 468325b89263Smrg hardcode_into_libs=yes 468425b89263Smrg ;; 468525b89263Smrg *) # from 4.6 on, and DragonFly 468625b89263Smrg shlibpath_overrides_runpath=yes 468725b89263Smrg hardcode_into_libs=yes 468825b89263Smrg ;; 468925b89263Smrg esac 469025b89263Smrg ;; 469125b89263Smrg 469225b89263Smrggnu*) 469325b89263Smrg version_type=linux 469425b89263Smrg need_lib_prefix=no 469525b89263Smrg need_version=no 469625b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 469725b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 469825b89263Smrg shlibpath_var=LD_LIBRARY_PATH 469925b89263Smrg hardcode_into_libs=yes 470025b89263Smrg ;; 4701ea133fd7Smrg 470225b89263Smrghaiku*) 470325b89263Smrg version_type=linux 470425b89263Smrg need_lib_prefix=no 470525b89263Smrg need_version=no 470625b89263Smrg dynamic_linker="$host_os runtime_loader" 470725b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 470825b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 470925b89263Smrg shlibpath_var=LIBRARY_PATH 471025b89263Smrg shlibpath_overrides_runpath=yes 471125b89263Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 471225b89263Smrg hardcode_into_libs=yes 471325b89263Smrg ;; 471425b89263Smrg 471525b89263Smrghpux9* | hpux10* | hpux11*) 471625b89263Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 471725b89263Smrg # link against other versions. 471825b89263Smrg version_type=sunos 471925b89263Smrg need_lib_prefix=no 472025b89263Smrg need_version=no 472125b89263Smrg case $host_cpu in 472225b89263Smrg ia64*) 472325b89263Smrg shrext_cmds='.so' 472425b89263Smrg hardcode_into_libs=yes 472525b89263Smrg dynamic_linker="$host_os dld.so" 472625b89263Smrg shlibpath_var=LD_LIBRARY_PATH 472725b89263Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 472825b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 472925b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 473025b89263Smrg if test "X$HPUX_IA64_MODE" = X32; then 473125b89263Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 473225b89263Smrg else 473325b89263Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 473425b89263Smrg fi 473525b89263Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 473625b89263Smrg ;; 473725b89263Smrg hppa*64*) 473825b89263Smrg shrext_cmds='.sl' 473925b89263Smrg hardcode_into_libs=yes 474025b89263Smrg dynamic_linker="$host_os dld.sl" 474125b89263Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 474225b89263Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 474325b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 474425b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 474525b89263Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 474625b89263Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 474725b89263Smrg ;; 474825b89263Smrg *) 474925b89263Smrg shrext_cmds='.sl' 475025b89263Smrg dynamic_linker="$host_os dld.sl" 475125b89263Smrg shlibpath_var=SHLIB_PATH 475225b89263Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 475325b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 475425b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 475525b89263Smrg ;; 475625b89263Smrg esac 475725b89263Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 475825b89263Smrg postinstall_cmds='chmod 555 $lib' 475925b89263Smrg # or fails outright, so override atomically: 476025b89263Smrg install_override_mode=555 476125b89263Smrg ;; 476225b89263Smrg 476325b89263Smrginterix[[3-9]]*) 476425b89263Smrg version_type=linux 476525b89263Smrg need_lib_prefix=no 476625b89263Smrg need_version=no 476725b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 476825b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 476925b89263Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 477025b89263Smrg shlibpath_var=LD_LIBRARY_PATH 477125b89263Smrg shlibpath_overrides_runpath=no 477225b89263Smrg hardcode_into_libs=yes 477325b89263Smrg ;; 4774ea133fd7Smrg 477525b89263Smrgirix5* | irix6* | nonstopux*) 477625b89263Smrg case $host_os in 477725b89263Smrg nonstopux*) version_type=nonstopux ;; 4778a253d6aeSmrg *) 477925b89263Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 478025b89263Smrg version_type=linux 478125b89263Smrg else 478225b89263Smrg version_type=irix 478325b89263Smrg fi ;; 478425b89263Smrg esac 478525b89263Smrg need_lib_prefix=no 478625b89263Smrg need_version=no 478725b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 478825b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 478925b89263Smrg case $host_os in 479025b89263Smrg irix5* | nonstopux*) 479125b89263Smrg libsuff= shlibsuff= 479225b89263Smrg ;; 479325b89263Smrg *) 479425b89263Smrg case $LD in # libtool.m4 will add one of these switches to LD 479525b89263Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 479625b89263Smrg libsuff= shlibsuff= libmagic=32-bit;; 479725b89263Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 479825b89263Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 479925b89263Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 480025b89263Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 480125b89263Smrg *) libsuff= shlibsuff= libmagic=never-match;; 4802a253d6aeSmrg esac 480325b89263Smrg ;; 480425b89263Smrg esac 480525b89263Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 480625b89263Smrg shlibpath_overrides_runpath=no 480725b89263Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 480825b89263Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 480925b89263Smrg hardcode_into_libs=yes 481025b89263Smrg ;; 4811a253d6aeSmrg 481225b89263Smrg# No shared lib support for Linux oldld, aout, or coff. 481325b89263Smrglinux*oldld* | linux*aout* | linux*coff*) 481425b89263Smrg dynamic_linker=no 481525b89263Smrg ;; 4816a253d6aeSmrg 481725b89263Smrg# This must be Linux ELF. 481825b89263Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 481925b89263Smrg version_type=linux 482025b89263Smrg need_lib_prefix=no 482125b89263Smrg need_version=no 482225b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 482325b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 482425b89263Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 482525b89263Smrg shlibpath_var=LD_LIBRARY_PATH 482625b89263Smrg shlibpath_overrides_runpath=no 4827ea133fd7Smrg 482825b89263Smrg # Some binutils ld are patched to set DT_RUNPATH 482925b89263Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 483025b89263Smrg [lt_cv_shlibpath_overrides_runpath=no 483125b89263Smrg save_LDFLAGS=$LDFLAGS 483225b89263Smrg save_libdir=$libdir 483325b89263Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 483425b89263Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 483525b89263Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 483625b89263Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 483725b89263Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 483825b89263Smrg LDFLAGS=$save_LDFLAGS 483925b89263Smrg libdir=$save_libdir 484025b89263Smrg ]) 484125b89263Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 4842a253d6aeSmrg 484325b89263Smrg # This implies no fast_install, which is unacceptable. 484425b89263Smrg # Some rework will be needed to allow for fast_install 484525b89263Smrg # before this can be enabled. 484625b89263Smrg hardcode_into_libs=yes 4847a253d6aeSmrg 484825b89263Smrg # Append ld.so.conf contents to the search path 484925b89263Smrg if test -f /etc/ld.so.conf; then 485025b89263Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 485125b89263Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 485225b89263Smrg fi 4853a253d6aeSmrg 485425b89263Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 485525b89263Smrg # powerpc, because MkLinux only supported shared libraries with the 485625b89263Smrg # GNU dynamic linker. Since this was broken with cross compilers, 485725b89263Smrg # most powerpc-linux boxes support dynamic linking these days and 485825b89263Smrg # people can always --disable-shared, the test was removed, and we 485925b89263Smrg # assume the GNU/Linux dynamic linker is in use. 486025b89263Smrg dynamic_linker='GNU/Linux ld.so' 486125b89263Smrg ;; 4862a253d6aeSmrg 486325b89263Smrgnetbsd*) 486425b89263Smrg version_type=sunos 486525b89263Smrg need_lib_prefix=no 486625b89263Smrg need_version=no 486725b89263Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 486825b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 486925b89263Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 487025b89263Smrg dynamic_linker='NetBSD (a.out) ld.so' 487125b89263Smrg else 487225b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 487325b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 487425b89263Smrg dynamic_linker='NetBSD ld.elf_so' 487525b89263Smrg fi 487625b89263Smrg shlibpath_var=LD_LIBRARY_PATH 487725b89263Smrg shlibpath_overrides_runpath=yes 487825b89263Smrg hardcode_into_libs=yes 487925b89263Smrg ;; 4880a253d6aeSmrg 488125b89263Smrgnewsos6) 488225b89263Smrg version_type=linux 488325b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 488425b89263Smrg shlibpath_var=LD_LIBRARY_PATH 488525b89263Smrg shlibpath_overrides_runpath=yes 488625b89263Smrg ;; 4887a253d6aeSmrg 488825b89263Smrg*nto* | *qnx*) 488925b89263Smrg version_type=qnx 489025b89263Smrg need_lib_prefix=no 489125b89263Smrg need_version=no 489225b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 489325b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 489425b89263Smrg shlibpath_var=LD_LIBRARY_PATH 489525b89263Smrg shlibpath_overrides_runpath=no 489625b89263Smrg hardcode_into_libs=yes 489725b89263Smrg dynamic_linker='ldqnx.so' 489825b89263Smrg ;; 489925b89263Smrg 490025b89263Smrgopenbsd*) 490125b89263Smrg version_type=sunos 490225b89263Smrg sys_lib_dlsearch_path_spec="/usr/lib" 490325b89263Smrg need_lib_prefix=no 490425b89263Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 490525b89263Smrg case $host_os in 490625b89263Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 490725b89263Smrg *) need_version=no ;; 490825b89263Smrg esac 490925b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 491025b89263Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 491125b89263Smrg shlibpath_var=LD_LIBRARY_PATH 491225b89263Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 491325b89263Smrg case $host_os in 491425b89263Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 491525b89263Smrg shlibpath_overrides_runpath=no 491625b89263Smrg ;; 491725b89263Smrg *) 491825b89263Smrg shlibpath_overrides_runpath=yes 491925b89263Smrg ;; 4920ea133fd7Smrg esac 492125b89263Smrg else 492225b89263Smrg shlibpath_overrides_runpath=yes 492325b89263Smrg fi 492425b89263Smrg ;; 4925a253d6aeSmrg 492625b89263Smrgos2*) 492725b89263Smrg libname_spec='$name' 492825b89263Smrg shrext_cmds=".dll" 492925b89263Smrg need_lib_prefix=no 493025b89263Smrg library_names_spec='$libname${shared_ext} $libname.a' 493125b89263Smrg dynamic_linker='OS/2 ld.exe' 493225b89263Smrg shlibpath_var=LIBPATH 493325b89263Smrg ;; 4934a253d6aeSmrg 493525b89263Smrgosf3* | osf4* | osf5*) 493625b89263Smrg version_type=osf 493725b89263Smrg need_lib_prefix=no 493825b89263Smrg need_version=no 493925b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 494025b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 494125b89263Smrg shlibpath_var=LD_LIBRARY_PATH 494225b89263Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 494325b89263Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 494425b89263Smrg ;; 4945a253d6aeSmrg 494625b89263Smrgrdos*) 494725b89263Smrg dynamic_linker=no 494825b89263Smrg ;; 4949a253d6aeSmrg 495025b89263Smrgsolaris*) 495125b89263Smrg version_type=linux 495225b89263Smrg need_lib_prefix=no 495325b89263Smrg need_version=no 495425b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 495525b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 495625b89263Smrg shlibpath_var=LD_LIBRARY_PATH 495725b89263Smrg shlibpath_overrides_runpath=yes 495825b89263Smrg hardcode_into_libs=yes 495925b89263Smrg # ldd complains unless libraries are executable 496025b89263Smrg postinstall_cmds='chmod +x $lib' 496125b89263Smrg ;; 4962a253d6aeSmrg 496325b89263Smrgsunos4*) 496425b89263Smrg version_type=sunos 496525b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 496625b89263Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 496725b89263Smrg shlibpath_var=LD_LIBRARY_PATH 496825b89263Smrg shlibpath_overrides_runpath=yes 496925b89263Smrg if test "$with_gnu_ld" = yes; then 497025b89263Smrg need_lib_prefix=no 497125b89263Smrg fi 497225b89263Smrg need_version=yes 497325b89263Smrg ;; 4974a253d6aeSmrg 497525b89263Smrgsysv4 | sysv4.3*) 497625b89263Smrg version_type=linux 497725b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 497825b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 497925b89263Smrg shlibpath_var=LD_LIBRARY_PATH 498025b89263Smrg case $host_vendor in 498125b89263Smrg sni) 498225b89263Smrg shlibpath_overrides_runpath=no 498325b89263Smrg need_lib_prefix=no 498425b89263Smrg runpath_var=LD_RUN_PATH 4985ea133fd7Smrg ;; 498625b89263Smrg siemens) 498725b89263Smrg need_lib_prefix=no 4988ea133fd7Smrg ;; 498925b89263Smrg motorola) 499025b89263Smrg need_lib_prefix=no 499125b89263Smrg need_version=no 499225b89263Smrg shlibpath_overrides_runpath=no 499325b89263Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 4994ea133fd7Smrg ;; 499525b89263Smrg esac 499625b89263Smrg ;; 4997a253d6aeSmrg 499825b89263Smrgsysv4*MP*) 499925b89263Smrg if test -d /usr/nec ;then 500025b89263Smrg version_type=linux 500125b89263Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 500225b89263Smrg soname_spec='$libname${shared_ext}.$major' 500325b89263Smrg shlibpath_var=LD_LIBRARY_PATH 500425b89263Smrg fi 500525b89263Smrg ;; 5006a253d6aeSmrg 500725b89263Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 500825b89263Smrg version_type=freebsd-elf 500925b89263Smrg need_lib_prefix=no 501025b89263Smrg need_version=no 501125b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 501225b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 501325b89263Smrg shlibpath_var=LD_LIBRARY_PATH 501425b89263Smrg shlibpath_overrides_runpath=yes 501525b89263Smrg hardcode_into_libs=yes 501625b89263Smrg if test "$with_gnu_ld" = yes; then 501725b89263Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 501825b89263Smrg else 501925b89263Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 502025b89263Smrg case $host_os in 502125b89263Smrg sco3.2v5*) 502225b89263Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 502325b89263Smrg ;; 502425b89263Smrg esac 502525b89263Smrg fi 502625b89263Smrg sys_lib_dlsearch_path_spec='/usr/lib' 502725b89263Smrg ;; 5028a253d6aeSmrg 502925b89263Smrgtpf*) 503025b89263Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 503125b89263Smrg version_type=linux 503225b89263Smrg need_lib_prefix=no 503325b89263Smrg need_version=no 503425b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 503525b89263Smrg shlibpath_var=LD_LIBRARY_PATH 503625b89263Smrg shlibpath_overrides_runpath=no 503725b89263Smrg hardcode_into_libs=yes 503825b89263Smrg ;; 5039a253d6aeSmrg 504025b89263Smrguts4*) 504125b89263Smrg version_type=linux 504225b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 504325b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 504425b89263Smrg shlibpath_var=LD_LIBRARY_PATH 504525b89263Smrg ;; 5046a253d6aeSmrg 504725b89263Smrg*) 504825b89263Smrg dynamic_linker=no 504925b89263Smrg ;; 505025b89263Smrgesac 505125b89263SmrgAC_MSG_RESULT([$dynamic_linker]) 505225b89263Smrgtest "$dynamic_linker" = no && can_build_shared=no 5053a253d6aeSmrg 505425b89263Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 505525b89263Smrgif test "$GCC" = yes; then 505625b89263Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 505725b89263Smrgfi 5058a253d6aeSmrg 505925b89263Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 506025b89263Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 506125b89263Smrgfi 506225b89263Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 506325b89263Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 506425b89263Smrgfi 5065a253d6aeSmrg 506625b89263Smrg_LT_DECL([], [variables_saved_for_relink], [1], 506725b89263Smrg [Variables whose values should be saved in libtool wrapper scripts and 506825b89263Smrg restored at link time]) 506925b89263Smrg_LT_DECL([], [need_lib_prefix], [0], 507025b89263Smrg [Do we need the "lib" prefix for modules?]) 507125b89263Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 507225b89263Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 507325b89263Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 507425b89263Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 507525b89263Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 507625b89263Smrg [Is shlibpath searched before the hard-coded library search path?]) 507725b89263Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 507825b89263Smrg_LT_DECL([], [library_names_spec], [1], 507925b89263Smrg [[List of archive names. First name is the real one, the rest are links. 508025b89263Smrg The last name is the one that the linker finds with -lNAME]]) 508125b89263Smrg_LT_DECL([], [soname_spec], [1], 508225b89263Smrg [[The coded name of the library, if different from the real name]]) 508325b89263Smrg_LT_DECL([], [install_override_mode], [1], 508425b89263Smrg [Permission mode override for installation of shared libraries]) 508525b89263Smrg_LT_DECL([], [postinstall_cmds], [2], 508625b89263Smrg [Command to use after installation of a shared archive]) 508725b89263Smrg_LT_DECL([], [postuninstall_cmds], [2], 508825b89263Smrg [Command to use after uninstallation of a shared archive]) 508925b89263Smrg_LT_DECL([], [finish_cmds], [2], 509025b89263Smrg [Commands used to finish a libtool library installation in a directory]) 509125b89263Smrg_LT_DECL([], [finish_eval], [1], 509225b89263Smrg [[As "finish_cmds", except a single script fragment to be evaled but 509325b89263Smrg not shown]]) 509425b89263Smrg_LT_DECL([], [hardcode_into_libs], [0], 509525b89263Smrg [Whether we should hardcode library paths into libraries]) 509625b89263Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 509725b89263Smrg [Compile-time system search path for libraries]) 509825b89263Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 509925b89263Smrg [Run-time system search path for libraries]) 510025b89263Smrg])# _LT_SYS_DYNAMIC_LINKER 5101a253d6aeSmrg 5102a253d6aeSmrg 510325b89263Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 510425b89263Smrg# -------------------------- 510525b89263Smrg# find a file program which can recognize shared library 510625b89263SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 510725b89263Smrg[m4_require([_LT_DECL_EGREP])dnl 510825b89263SmrgAC_MSG_CHECKING([for $1]) 510925b89263SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 511025b89263Smrg[case $MAGIC_CMD in 511125b89263Smrg[[\\/*] | ?:[\\/]*]) 511225b89263Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 511325b89263Smrg ;; 511425b89263Smrg*) 511525b89263Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 511625b89263Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 511725b89263Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 511825b89263Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 511925b89263Smrgdnl not every word. This closes a longstanding sh security hole. 512025b89263Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 512125b89263Smrg for ac_dir in $ac_dummy; do 512225b89263Smrg IFS="$lt_save_ifs" 512325b89263Smrg test -z "$ac_dir" && ac_dir=. 512425b89263Smrg if test -f $ac_dir/$1; then 512525b89263Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 512625b89263Smrg if test -n "$file_magic_test_file"; then 512725b89263Smrg case $deplibs_check_method in 512825b89263Smrg "file_magic "*) 512925b89263Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 513025b89263Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 513125b89263Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 513225b89263Smrg $EGREP "$file_magic_regex" > /dev/null; then 513325b89263Smrg : 513425b89263Smrg else 513525b89263Smrg cat <<_LT_EOF 1>&2 5136a253d6aeSmrg 513725b89263Smrg*** Warning: the command libtool uses to detect shared libraries, 513825b89263Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 513925b89263Smrg*** The result is that libtool may fail to recognize shared libraries 514025b89263Smrg*** as such. This will affect the creation of libtool libraries that 514125b89263Smrg*** depend on shared libraries, but programs linked with such libtool 514225b89263Smrg*** libraries will work regardless of this problem. Nevertheless, you 514325b89263Smrg*** may want to report the problem to your system manager and/or to 514425b89263Smrg*** bug-libtool@gnu.org 514525b89263Smrg 514625b89263Smrg_LT_EOF 514725b89263Smrg fi ;; 514825b89263Smrg esac 5149ea133fd7Smrg fi 515025b89263Smrg break 515125b89263Smrg fi 515225b89263Smrg done 515325b89263Smrg IFS="$lt_save_ifs" 515425b89263Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 515525b89263Smrg ;; 515625b89263Smrgesac]) 515725b89263SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 515825b89263Smrgif test -n "$MAGIC_CMD"; then 515925b89263Smrg AC_MSG_RESULT($MAGIC_CMD) 516025b89263Smrgelse 516125b89263Smrg AC_MSG_RESULT(no) 516225b89263Smrgfi 516325b89263Smrg_LT_DECL([], [MAGIC_CMD], [0], 516425b89263Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 516525b89263Smrg])# _LT_PATH_TOOL_PREFIX 516625b89263Smrg 516725b89263Smrg# Old name: 516825b89263SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 516925b89263Smrgdnl aclocal-1.4 backwards compatibility: 517025b89263Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 5171a253d6aeSmrg 5172a253d6aeSmrg 517325b89263Smrg# _LT_PATH_MAGIC 517425b89263Smrg# -------------- 517525b89263Smrg# find a file program which can recognize a shared library 517625b89263Smrgm4_defun([_LT_PATH_MAGIC], 517725b89263Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 517825b89263Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 517925b89263Smrg if test -n "$ac_tool_prefix"; then 518025b89263Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 518125b89263Smrg else 518225b89263Smrg MAGIC_CMD=: 518325b89263Smrg fi 518425b89263Smrgfi 518525b89263Smrg])# _LT_PATH_MAGIC 5186a253d6aeSmrg 5187a253d6aeSmrg 518825b89263Smrg# LT_PATH_LD 518925b89263Smrg# ---------- 519025b89263Smrg# find the pathname to the GNU or non-GNU linker 519125b89263SmrgAC_DEFUN([LT_PATH_LD], 519225b89263Smrg[AC_REQUIRE([AC_PROG_CC])dnl 519325b89263SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 519425b89263SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 519525b89263Smrgm4_require([_LT_DECL_SED])dnl 519625b89263Smrgm4_require([_LT_DECL_EGREP])dnl 519725b89263Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 5198a253d6aeSmrg 519925b89263SmrgAC_ARG_WITH([gnu-ld], 520025b89263Smrg [AS_HELP_STRING([--with-gnu-ld], 520125b89263Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 520225b89263Smrg [test "$withval" = no || with_gnu_ld=yes], 520325b89263Smrg [with_gnu_ld=no])dnl 5204a253d6aeSmrg 520525b89263Smrgac_prog=ld 520625b89263Smrgif test "$GCC" = yes; then 520725b89263Smrg # Check if gcc -print-prog-name=ld gives a path. 520825b89263Smrg AC_MSG_CHECKING([for ld used by $CC]) 520925b89263Smrg case $host in 521025b89263Smrg *-*-mingw*) 521125b89263Smrg # gcc leaves a trailing carriage return which upsets mingw 521225b89263Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 521325b89263Smrg *) 521425b89263Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 521525b89263Smrg esac 521625b89263Smrg case $ac_prog in 521725b89263Smrg # Accept absolute paths. 521825b89263Smrg [[\\/]]* | ?:[[\\/]]*) 521925b89263Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 522025b89263Smrg # Canonicalize the pathname of ld 522125b89263Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 522225b89263Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 522325b89263Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 522425b89263Smrg done 522525b89263Smrg test -z "$LD" && LD="$ac_prog" 5226ea133fd7Smrg ;; 522725b89263Smrg "") 522825b89263Smrg # If it fails, then pretend we aren't using GCC. 522925b89263Smrg ac_prog=ld 523025b89263Smrg ;; 523125b89263Smrg *) 523225b89263Smrg # If it is relative, then search for the first ld in PATH. 523325b89263Smrg with_gnu_ld=unknown 523425b89263Smrg ;; 523525b89263Smrg esac 523625b89263Smrgelif test "$with_gnu_ld" = yes; then 523725b89263Smrg AC_MSG_CHECKING([for GNU ld]) 523825b89263Smrgelse 523925b89263Smrg AC_MSG_CHECKING([for non-GNU ld]) 524025b89263Smrgfi 524125b89263SmrgAC_CACHE_VAL(lt_cv_path_LD, 524225b89263Smrg[if test -z "$LD"; then 524325b89263Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 524425b89263Smrg for ac_dir in $PATH; do 524525b89263Smrg IFS="$lt_save_ifs" 524625b89263Smrg test -z "$ac_dir" && ac_dir=. 524725b89263Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 524825b89263Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 524925b89263Smrg # Check to see if the program is GNU ld. I'd rather use --version, 525025b89263Smrg # but apparently some variants of GNU ld only accept -v. 525125b89263Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 525225b89263Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 525325b89263Smrg *GNU* | *'with BFD'*) 525425b89263Smrg test "$with_gnu_ld" != no && break 5255ea133fd7Smrg ;; 525625b89263Smrg *) 525725b89263Smrg test "$with_gnu_ld" != yes && break 5258ea133fd7Smrg ;; 5259ea133fd7Smrg esac 526025b89263Smrg fi 526125b89263Smrg done 526225b89263Smrg IFS="$lt_save_ifs" 526325b89263Smrgelse 526425b89263Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 526525b89263Smrgfi]) 526625b89263SmrgLD="$lt_cv_path_LD" 526725b89263Smrgif test -n "$LD"; then 526825b89263Smrg AC_MSG_RESULT($LD) 526925b89263Smrgelse 527025b89263Smrg AC_MSG_RESULT(no) 527125b89263Smrgfi 527225b89263Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 527325b89263Smrg_LT_PATH_LD_GNU 527425b89263SmrgAC_SUBST([LD]) 5275a253d6aeSmrg 527625b89263Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 527725b89263Smrg])# LT_PATH_LD 5278a253d6aeSmrg 527925b89263Smrg# Old names: 528025b89263SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 528125b89263SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 528225b89263Smrgdnl aclocal-1.4 backwards compatibility: 528325b89263Smrgdnl AC_DEFUN([AM_PROG_LD], []) 528425b89263Smrgdnl AC_DEFUN([AC_PROG_LD], []) 528525b89263Smrg 528625b89263Smrg 528725b89263Smrg# _LT_PATH_LD_GNU 528825b89263Smrg#- -------------- 528925b89263Smrgm4_defun([_LT_PATH_LD_GNU], 529025b89263Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 529125b89263Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 529225b89263Smrgcase `$LD -v 2>&1 </dev/null` in 529325b89263Smrg*GNU* | *'with BFD'*) 529425b89263Smrg lt_cv_prog_gnu_ld=yes 529525b89263Smrg ;; 529625b89263Smrg*) 529725b89263Smrg lt_cv_prog_gnu_ld=no 529825b89263Smrg ;; 529925b89263Smrgesac]) 530025b89263Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 530125b89263Smrg])# _LT_PATH_LD_GNU 530225b89263Smrg 530325b89263Smrg 530425b89263Smrg# _LT_CMD_RELOAD 530525b89263Smrg# -------------- 530625b89263Smrg# find reload flag for linker 530725b89263Smrg# -- PORTME Some linkers may need a different reload flag. 530825b89263Smrgm4_defun([_LT_CMD_RELOAD], 530925b89263Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 531025b89263Smrg lt_cv_ld_reload_flag, 531125b89263Smrg [lt_cv_ld_reload_flag='-r']) 531225b89263Smrgreload_flag=$lt_cv_ld_reload_flag 531325b89263Smrgcase $reload_flag in 531425b89263Smrg"" | " "*) ;; 531525b89263Smrg*) reload_flag=" $reload_flag" ;; 531625b89263Smrgesac 531725b89263Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 531825b89263Smrgcase $host_os in 531925b89263Smrg darwin*) 532025b89263Smrg if test "$GCC" = yes; then 532125b89263Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 532225b89263Smrg else 532325b89263Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 532425b89263Smrg fi 532525b89263Smrg ;; 532625b89263Smrgesac 532725b89263Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 532825b89263Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 532925b89263Smrg])# _LT_CMD_RELOAD 5330a253d6aeSmrg 5331a253d6aeSmrg 533225b89263Smrg# _LT_CHECK_MAGIC_METHOD 533325b89263Smrg# ---------------------- 533425b89263Smrg# how to check for library dependencies 533525b89263Smrg# -- PORTME fill in with the dynamic library characteristics 533625b89263Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 533725b89263Smrg[m4_require([_LT_DECL_EGREP]) 533825b89263Smrgm4_require([_LT_DECL_OBJDUMP]) 533925b89263SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 534025b89263Smrglt_cv_deplibs_check_method, 534125b89263Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 534225b89263Smrglt_cv_file_magic_test_file= 534325b89263Smrglt_cv_deplibs_check_method='unknown' 534425b89263Smrg# Need to set the preceding variable on all platforms that support 534525b89263Smrg# interlibrary dependencies. 534625b89263Smrg# 'none' -- dependencies not supported. 534725b89263Smrg# `unknown' -- same as none, but documents that we really don't know. 534825b89263Smrg# 'pass_all' -- all dependencies passed with no checks. 534925b89263Smrg# 'test_compile' -- check by making test program. 535025b89263Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 535125b89263Smrg# which responds to the $file_magic_cmd with a given extended regex. 535225b89263Smrg# If you have `file' or equivalent on your system and you're not sure 535325b89263Smrg# whether `pass_all' will *always* work, you probably want this one. 5354a253d6aeSmrg 535525b89263Smrgcase $host_os in 535625b89263Smrgaix[[4-9]]*) 535725b89263Smrg lt_cv_deplibs_check_method=pass_all 535825b89263Smrg ;; 5359a253d6aeSmrg 536025b89263Smrgbeos*) 536125b89263Smrg lt_cv_deplibs_check_method=pass_all 536225b89263Smrg ;; 5363a253d6aeSmrg 536425b89263Smrgbsdi[[45]]*) 536525b89263Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 536625b89263Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 536725b89263Smrg lt_cv_file_magic_test_file=/shlib/libc.so 536825b89263Smrg ;; 5369a253d6aeSmrg 537025b89263Smrgcygwin*) 537125b89263Smrg # func_win32_libid is a shell function defined in ltmain.sh 537225b89263Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 537325b89263Smrg lt_cv_file_magic_cmd='func_win32_libid' 537425b89263Smrg ;; 5375a253d6aeSmrg 537625b89263Smrgmingw* | pw32*) 537725b89263Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 537825b89263Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 537925b89263Smrg # unless we find 'file', for example because we are cross-compiling. 538025b89263Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 538125b89263Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 538225b89263Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 538325b89263Smrg lt_cv_file_magic_cmd='func_win32_libid' 538425b89263Smrg else 538525b89263Smrg # Keep this pattern in sync with the one in func_win32_libid. 538625b89263Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 538725b89263Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5388a253d6aeSmrg fi 538925b89263Smrg ;; 5390a253d6aeSmrg 539125b89263Smrgcegcc*) 539225b89263Smrg # use the weaker test based on 'objdump'. See mingw*. 539325b89263Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 539425b89263Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 539525b89263Smrg ;; 5396a253d6aeSmrg 539725b89263Smrgdarwin* | rhapsody*) 539825b89263Smrg lt_cv_deplibs_check_method=pass_all 539925b89263Smrg ;; 5400a253d6aeSmrg 540125b89263Smrgfreebsd* | dragonfly*) 540225b89263Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 540325b89263Smrg case $host_cpu in 540425b89263Smrg i*86 ) 540525b89263Smrg # Not sure whether the presence of OpenBSD here was a mistake. 540625b89263Smrg # Let's accept both of them until this is cleared up. 540725b89263Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 540825b89263Smrg lt_cv_file_magic_cmd=/usr/bin/file 540925b89263Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 5410ea133fd7Smrg ;; 5411ea133fd7Smrg esac 541225b89263Smrg else 541325b89263Smrg lt_cv_deplibs_check_method=pass_all 5414ea133fd7Smrg fi 5415ea133fd7Smrg ;; 5416a253d6aeSmrg 541725b89263Smrggnu*) 541825b89263Smrg lt_cv_deplibs_check_method=pass_all 541925b89263Smrg ;; 5420ea133fd7Smrg 542125b89263Smrghaiku*) 542225b89263Smrg lt_cv_deplibs_check_method=pass_all 542325b89263Smrg ;; 5424ea133fd7Smrg 542525b89263Smrghpux10.20* | hpux11*) 542625b89263Smrg lt_cv_file_magic_cmd=/usr/bin/file 542725b89263Smrg case $host_cpu in 542825b89263Smrg ia64*) 542925b89263Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 543025b89263Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 543125b89263Smrg ;; 543225b89263Smrg hppa*64*) 543325b89263Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 543425b89263Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 543525b89263Smrg ;; 543625b89263Smrg *) 543725b89263Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 543825b89263Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 543925b89263Smrg ;; 544025b89263Smrg esac 544125b89263Smrg ;; 5442a253d6aeSmrg 544325b89263Smrginterix[[3-9]]*) 544425b89263Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 544525b89263Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 544625b89263Smrg ;; 5447a253d6aeSmrg 544825b89263Smrgirix5* | irix6* | nonstopux*) 544925b89263Smrg case $LD in 545025b89263Smrg *-32|*"-32 ") libmagic=32-bit;; 545125b89263Smrg *-n32|*"-n32 ") libmagic=N32;; 545225b89263Smrg *-64|*"-64 ") libmagic=64-bit;; 545325b89263Smrg *) libmagic=never-match;; 545425b89263Smrg esac 545525b89263Smrg lt_cv_deplibs_check_method=pass_all 545625b89263Smrg ;; 5457a253d6aeSmrg 545825b89263Smrg# This must be Linux ELF. 545925b89263Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 546025b89263Smrg lt_cv_deplibs_check_method=pass_all 546125b89263Smrg ;; 5462a253d6aeSmrg 546325b89263Smrgnetbsd*) 546425b89263Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 546525b89263Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 546625b89263Smrg else 546725b89263Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 546825b89263Smrg fi 546925b89263Smrg ;; 5470a253d6aeSmrg 547125b89263Smrgnewos6*) 547225b89263Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 547325b89263Smrg lt_cv_file_magic_cmd=/usr/bin/file 547425b89263Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 547525b89263Smrg ;; 5476a253d6aeSmrg 547725b89263Smrg*nto* | *qnx*) 547825b89263Smrg lt_cv_deplibs_check_method=pass_all 547925b89263Smrg ;; 5480a253d6aeSmrg 548125b89263Smrgopenbsd*) 548225b89263Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 548325b89263Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 548425b89263Smrg else 548525b89263Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 548625b89263Smrg fi 548725b89263Smrg ;; 5488ea133fd7Smrg 548925b89263Smrgosf3* | osf4* | osf5*) 549025b89263Smrg lt_cv_deplibs_check_method=pass_all 549125b89263Smrg ;; 5492ea133fd7Smrg 549325b89263Smrgrdos*) 549425b89263Smrg lt_cv_deplibs_check_method=pass_all 549525b89263Smrg ;; 5496ea133fd7Smrg 549725b89263Smrgsolaris*) 549825b89263Smrg lt_cv_deplibs_check_method=pass_all 549925b89263Smrg ;; 5500a253d6aeSmrg 550125b89263Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 550225b89263Smrg lt_cv_deplibs_check_method=pass_all 550325b89263Smrg ;; 550425b89263Smrg 550525b89263Smrgsysv4 | sysv4.3*) 550625b89263Smrg case $host_vendor in 550725b89263Smrg motorola) 550825b89263Smrg 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]]' 550925b89263Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 551025b89263Smrg ;; 551125b89263Smrg ncr) 551225b89263Smrg lt_cv_deplibs_check_method=pass_all 551325b89263Smrg ;; 551425b89263Smrg sequent) 551525b89263Smrg lt_cv_file_magic_cmd='/bin/file' 551625b89263Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 551725b89263Smrg ;; 551825b89263Smrg sni) 551925b89263Smrg lt_cv_file_magic_cmd='/bin/file' 552025b89263Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 552125b89263Smrg lt_cv_file_magic_test_file=/lib/libc.so 552225b89263Smrg ;; 552325b89263Smrg siemens) 552425b89263Smrg lt_cv_deplibs_check_method=pass_all 552525b89263Smrg ;; 552625b89263Smrg pc) 552725b89263Smrg lt_cv_deplibs_check_method=pass_all 5528ea133fd7Smrg ;; 5529ea133fd7Smrg esac 553025b89263Smrg ;; 5531a253d6aeSmrg 553225b89263Smrgtpf*) 553325b89263Smrg lt_cv_deplibs_check_method=pass_all 553425b89263Smrg ;; 553525b89263Smrgesac 553625b89263Smrg]) 553725b89263Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 553825b89263Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 553925b89263Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 5540a253d6aeSmrg 554125b89263Smrg_LT_DECL([], [deplibs_check_method], [1], 554225b89263Smrg [Method to check whether dependent libraries are shared objects]) 554325b89263Smrg_LT_DECL([], [file_magic_cmd], [1], 554425b89263Smrg [Command to use when deplibs_check_method == "file_magic"]) 554525b89263Smrg])# _LT_CHECK_MAGIC_METHOD 5546a253d6aeSmrg 5547a253d6aeSmrg 554825b89263Smrg# LT_PATH_NM 554925b89263Smrg# ---------- 555025b89263Smrg# find the pathname to a BSD- or MS-compatible name lister 555125b89263SmrgAC_DEFUN([LT_PATH_NM], 555225b89263Smrg[AC_REQUIRE([AC_PROG_CC])dnl 555325b89263SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 555425b89263Smrg[if test -n "$NM"; then 555525b89263Smrg # Let the user override the test. 555625b89263Smrg lt_cv_path_NM="$NM" 5557ea133fd7Smrgelse 555825b89263Smrg lt_nm_to_check="${ac_tool_prefix}nm" 555925b89263Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 556025b89263Smrg lt_nm_to_check="$lt_nm_to_check nm" 556125b89263Smrg fi 556225b89263Smrg for lt_tmp_nm in $lt_nm_to_check; do 556325b89263Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 556425b89263Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 556525b89263Smrg IFS="$lt_save_ifs" 556625b89263Smrg test -z "$ac_dir" && ac_dir=. 556725b89263Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 556825b89263Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 556925b89263Smrg # Check to see if the nm accepts a BSD-compat flag. 557025b89263Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 557125b89263Smrg # nm: unknown option "B" ignored 557225b89263Smrg # Tru64's nm complains that /dev/null is an invalid object file 557325b89263Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 557425b89263Smrg */dev/null* | *'Invalid file or object type'*) 557525b89263Smrg lt_cv_path_NM="$tmp_nm -B" 557625b89263Smrg break 557725b89263Smrg ;; 557825b89263Smrg *) 557925b89263Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 558025b89263Smrg */dev/null*) 558125b89263Smrg lt_cv_path_NM="$tmp_nm -p" 558225b89263Smrg break 558325b89263Smrg ;; 558425b89263Smrg *) 558525b89263Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 558625b89263Smrg continue # so that we can try to find one that supports BSD flags 558725b89263Smrg ;; 558825b89263Smrg esac 558925b89263Smrg ;; 559025b89263Smrg esac 559125b89263Smrg fi 559225b89263Smrg done 559325b89263Smrg IFS="$lt_save_ifs" 559425b89263Smrg done 559525b89263Smrg : ${lt_cv_path_NM=no} 559625b89263Smrgfi]) 559725b89263Smrgif test "$lt_cv_path_NM" != "no"; then 559825b89263Smrg NM="$lt_cv_path_NM" 559925b89263Smrgelse 560025b89263Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 560125b89263Smrg if test -n "$DUMPBIN"; then : 560225b89263Smrg # Let the user override the test. 560325b89263Smrg else 560425b89263Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 560525b89263Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 560625b89263Smrg *COFF*) 560725b89263Smrg DUMPBIN="$DUMPBIN -symbols" 560825b89263Smrg ;; 560925b89263Smrg *) 561025b89263Smrg DUMPBIN=: 561125b89263Smrg ;; 561225b89263Smrg esac 561325b89263Smrg fi 561425b89263Smrg AC_SUBST([DUMPBIN]) 561525b89263Smrg if test "$DUMPBIN" != ":"; then 561625b89263Smrg NM="$DUMPBIN" 561725b89263Smrg fi 5618ea133fd7Smrgfi 561925b89263Smrgtest -z "$NM" && NM=nm 562025b89263SmrgAC_SUBST([NM]) 562125b89263Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 562225b89263Smrg 562325b89263SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 562425b89263Smrg [lt_cv_nm_interface="BSD nm" 562525b89263Smrg echo "int some_variable = 0;" > conftest.$ac_ext 562625b89263Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 562725b89263Smrg (eval "$ac_compile" 2>conftest.err) 562825b89263Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 562925b89263Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 563025b89263Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 563125b89263Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 563225b89263Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 563325b89263Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 563425b89263Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 563525b89263Smrg lt_cv_nm_interface="MS dumpbin" 563625b89263Smrg fi 563725b89263Smrg rm -f conftest*]) 563825b89263Smrg])# LT_PATH_NM 5639a253d6aeSmrg 564025b89263Smrg# Old names: 564125b89263SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 564225b89263SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 5643ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 564425b89263Smrgdnl AC_DEFUN([AM_PROG_NM], []) 564525b89263Smrgdnl AC_DEFUN([AC_PROG_NM], []) 5646a253d6aeSmrg 5647a253d6aeSmrg 564825b89263Smrg# LT_LIB_M 564925b89263Smrg# -------- 565025b89263Smrg# check for math library 565125b89263SmrgAC_DEFUN([LT_LIB_M], 565225b89263Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 565325b89263SmrgLIBM= 565425b89263Smrgcase $host in 565525b89263Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 565625b89263Smrg # These system don't have libm, or don't need it 565725b89263Smrg ;; 565825b89263Smrg*-ncr-sysv4.3*) 565925b89263Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 566025b89263Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 566125b89263Smrg ;; 566225b89263Smrg*) 566325b89263Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 566425b89263Smrg ;; 566525b89263Smrgesac 566625b89263SmrgAC_SUBST([LIBM]) 566725b89263Smrg])# LT_LIB_M 566825b89263Smrg 566925b89263Smrg# Old name: 567025b89263SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 567125b89263Smrgdnl aclocal-1.4 backwards compatibility: 567225b89263Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 5673ea133fd7Smrg 5674a253d6aeSmrg 567525b89263Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 567625b89263Smrg# ------------------------------- 567725b89263Smrgm4_defun([_LT_COMPILER_NO_RTTI], 567825b89263Smrg[m4_require([_LT_TAG_COMPILER])dnl 5679a253d6aeSmrg 568025b89263Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5681ea133fd7Smrg 568225b89263Smrgif test "$GCC" = yes; then 568325b89263Smrg case $cc_basename in 568425b89263Smrg nvcc*) 568525b89263Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 568625b89263Smrg *) 568725b89263Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 568825b89263Smrg esac 5689ea133fd7Smrg 569025b89263Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 569125b89263Smrg lt_cv_prog_compiler_rtti_exceptions, 569225b89263Smrg [-fno-rtti -fno-exceptions], [], 569325b89263Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 569425b89263Smrgfi 569525b89263Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 569625b89263Smrg [Compiler flag to turn off builtin functions]) 569725b89263Smrg])# _LT_COMPILER_NO_RTTI 5698ea133fd7Smrg 5699ea133fd7Smrg 570025b89263Smrg# _LT_CMD_GLOBAL_SYMBOLS 570125b89263Smrg# ---------------------- 570225b89263Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 570325b89263Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 570425b89263SmrgAC_REQUIRE([AC_PROG_CC])dnl 570525b89263SmrgAC_REQUIRE([AC_PROG_AWK])dnl 570625b89263SmrgAC_REQUIRE([LT_PATH_NM])dnl 570725b89263SmrgAC_REQUIRE([LT_PATH_LD])dnl 570825b89263Smrgm4_require([_LT_DECL_SED])dnl 570925b89263Smrgm4_require([_LT_DECL_EGREP])dnl 571025b89263Smrgm4_require([_LT_TAG_COMPILER])dnl 5711ea133fd7Smrg 571225b89263Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 571325b89263SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 571425b89263SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 571525b89263Smrg[ 571625b89263Smrg# These are sane defaults that work on at least a few old systems. 571725b89263Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 5718a253d6aeSmrg 571925b89263Smrg# Character class describing NM global symbol codes. 572025b89263Smrgsymcode='[[BCDEGRST]]' 5721a253d6aeSmrg 572225b89263Smrg# Regexp to match symbols that can be accessed directly from C. 572325b89263Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 5724a253d6aeSmrg 572525b89263Smrg# Define system-specific variables. 572625b89263Smrgcase $host_os in 572725b89263Smrgaix*) 572825b89263Smrg symcode='[[BCDT]]' 572925b89263Smrg ;; 573025b89263Smrgcygwin* | mingw* | pw32* | cegcc*) 573125b89263Smrg symcode='[[ABCDGISTW]]' 573225b89263Smrg ;; 573325b89263Smrghpux*) 573425b89263Smrg if test "$host_cpu" = ia64; then 573525b89263Smrg symcode='[[ABCDEGRST]]' 573625b89263Smrg fi 573725b89263Smrg ;; 573825b89263Smrgirix* | nonstopux*) 573925b89263Smrg symcode='[[BCDEGRST]]' 574025b89263Smrg ;; 574125b89263Smrgosf*) 574225b89263Smrg symcode='[[BCDEGQRST]]' 574325b89263Smrg ;; 574425b89263Smrgsolaris*) 574525b89263Smrg symcode='[[BDRT]]' 574625b89263Smrg ;; 574725b89263Smrgsco3.2v5*) 574825b89263Smrg symcode='[[DT]]' 574925b89263Smrg ;; 575025b89263Smrgsysv4.2uw2*) 575125b89263Smrg symcode='[[DT]]' 575225b89263Smrg ;; 575325b89263Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 575425b89263Smrg symcode='[[ABDT]]' 575525b89263Smrg ;; 575625b89263Smrgsysv4) 575725b89263Smrg symcode='[[DFNSTU]]' 575825b89263Smrg ;; 575925b89263Smrgesac 5760a253d6aeSmrg 576125b89263Smrg# If we're using GNU nm, then use its standard symbol codes. 576225b89263Smrgcase `$NM -V 2>&1` in 576325b89263Smrg*GNU* | *'with BFD'*) 576425b89263Smrg symcode='[[ABCDGIRSTW]]' ;; 576525b89263Smrgesac 5766a253d6aeSmrg 576725b89263Smrg# Transform an extracted symbol line into a proper C declaration. 576825b89263Smrg# Some systems (esp. on ia64) link data and code symbols differently, 576925b89263Smrg# so use this general approach. 577025b89263Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 5771a253d6aeSmrg 577225b89263Smrg# Transform an extracted symbol line into symbol name and symbol address 577325b89263Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 577425b89263Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 5775a253d6aeSmrg 577625b89263Smrg# Handle CRLF in mingw tool chain 577725b89263Smrgopt_cr= 577825b89263Smrgcase $build_os in 577925b89263Smrgmingw*) 578025b89263Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 578125b89263Smrg ;; 578225b89263Smrgesac 5783ea133fd7Smrg 578425b89263Smrg# Try without a prefix underscore, then with it. 578525b89263Smrgfor ac_symprfx in "" "_"; do 5786a253d6aeSmrg 578725b89263Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 578825b89263Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 5789a253d6aeSmrg 579025b89263Smrg # Write the raw and C identifiers. 579125b89263Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 579225b89263Smrg # Fake it for dumpbin and say T for any non-static function 579325b89263Smrg # and D for any global variable. 579425b89263Smrg # Also find C++ and __fastcall symbols from MSVC++, 579525b89263Smrg # which start with @ or ?. 579625b89263Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 579725b89263Smrg" {last_section=section; section=\$ 3};"\ 579825b89263Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 579925b89263Smrg" \$ 0!~/External *\|/{next};"\ 580025b89263Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 580125b89263Smrg" {if(hide[section]) next};"\ 580225b89263Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 580325b89263Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 580425b89263Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 580525b89263Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 580625b89263Smrg" ' prfx=^$ac_symprfx]" 580725b89263Smrg else 580825b89263Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 580925b89263Smrg fi 5810a253d6aeSmrg 581125b89263Smrg # Check to see that the pipe works correctly. 581225b89263Smrg pipe_works=no 5813ea133fd7Smrg 581425b89263Smrg rm -f conftest* 581525b89263Smrg cat > conftest.$ac_ext <<_LT_EOF 581625b89263Smrg#ifdef __cplusplus 581725b89263Smrgextern "C" { 581825b89263Smrg#endif 581925b89263Smrgchar nm_test_var; 582025b89263Smrgvoid nm_test_func(void); 582125b89263Smrgvoid nm_test_func(void){} 582225b89263Smrg#ifdef __cplusplus 582325b89263Smrg} 582425b89263Smrg#endif 582525b89263Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 582625b89263Smrg_LT_EOF 5827a253d6aeSmrg 582825b89263Smrg if AC_TRY_EVAL(ac_compile); then 582925b89263Smrg # Now try to grab the symbols. 583025b89263Smrg nlist=conftest.nm 583125b89263Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 583225b89263Smrg # Try sorting and uniquifying the output. 583325b89263Smrg if sort "$nlist" | uniq > "$nlist"T; then 583425b89263Smrg mv -f "$nlist"T "$nlist" 583525b89263Smrg else 583625b89263Smrg rm -f "$nlist"T 583725b89263Smrg fi 5838a253d6aeSmrg 583925b89263Smrg # Make sure that we snagged all the symbols we need. 584025b89263Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 584125b89263Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 584225b89263Smrg cat <<_LT_EOF > conftest.$ac_ext 584325b89263Smrg#ifdef __cplusplus 584425b89263Smrgextern "C" { 584525b89263Smrg#endif 5846ea133fd7Smrg 584725b89263Smrg_LT_EOF 584825b89263Smrg # Now generate the symbol file. 584925b89263Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 5850ea133fd7Smrg 585125b89263Smrg cat <<_LT_EOF >> conftest.$ac_ext 5852a253d6aeSmrg 585325b89263Smrg/* The mapping between symbol names and symbols. */ 585425b89263Smrgconst struct { 585525b89263Smrg const char *name; 585625b89263Smrg void *address; 585725b89263Smrg} 585825b89263Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 585925b89263Smrg{ 586025b89263Smrg { "@PROGRAM@", (void *) 0 }, 586125b89263Smrg_LT_EOF 586225b89263Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 586325b89263Smrg cat <<\_LT_EOF >> conftest.$ac_ext 586425b89263Smrg {0, (void *) 0} 586525b89263Smrg}; 5866ea133fd7Smrg 586725b89263Smrg/* This works around a problem in FreeBSD linker */ 586825b89263Smrg#ifdef FREEBSD_WORKAROUND 586925b89263Smrgstatic const void *lt_preloaded_setup() { 587025b89263Smrg return lt__PROGRAM__LTX_preloaded_symbols; 587125b89263Smrg} 587225b89263Smrg#endif 5873a253d6aeSmrg 587425b89263Smrg#ifdef __cplusplus 587525b89263Smrg} 587625b89263Smrg#endif 587725b89263Smrg_LT_EOF 587825b89263Smrg # Now try linking the two files. 587925b89263Smrg mv conftest.$ac_objext conftstm.$ac_objext 588025b89263Smrg lt_save_LIBS="$LIBS" 588125b89263Smrg lt_save_CFLAGS="$CFLAGS" 588225b89263Smrg LIBS="conftstm.$ac_objext" 588325b89263Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 588425b89263Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 588525b89263Smrg pipe_works=yes 588625b89263Smrg fi 588725b89263Smrg LIBS="$lt_save_LIBS" 588825b89263Smrg CFLAGS="$lt_save_CFLAGS" 5889ea133fd7Smrg else 589025b89263Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 5891ea133fd7Smrg fi 589225b89263Smrg else 589325b89263Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 589425b89263Smrg fi 589525b89263Smrg else 589625b89263Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 589725b89263Smrg fi 589825b89263Smrg else 589925b89263Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 590025b89263Smrg cat conftest.$ac_ext >&5 590125b89263Smrg fi 590225b89263Smrg rm -rf conftest* conftst* 5903a253d6aeSmrg 590425b89263Smrg # Do not use the global_symbol_pipe unless it works. 590525b89263Smrg if test "$pipe_works" = yes; then 590625b89263Smrg break 590725b89263Smrg else 590825b89263Smrg lt_cv_sys_global_symbol_pipe= 590925b89263Smrg fi 591025b89263Smrgdone 591125b89263Smrg]) 591225b89263Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 591325b89263Smrg lt_cv_sys_global_symbol_to_cdecl= 591425b89263Smrgfi 591525b89263Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 591625b89263Smrg AC_MSG_RESULT(failed) 591725b89263Smrgelse 591825b89263Smrg AC_MSG_RESULT(ok) 591925b89263Smrgfi 5920a253d6aeSmrg 592125b89263Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 592225b89263Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 592325b89263Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 592425b89263Smrg [Transform the output of nm in a proper C declaration]) 592525b89263Smrg_LT_DECL([global_symbol_to_c_name_address], 592625b89263Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 592725b89263Smrg [Transform the output of nm in a C name address pair]) 592825b89263Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 592925b89263Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 593025b89263Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 593125b89263Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 5932a253d6aeSmrg 5933a253d6aeSmrg 593425b89263Smrg# _LT_COMPILER_PIC([TAGNAME]) 593525b89263Smrg# --------------------------- 593625b89263Smrgm4_defun([_LT_COMPILER_PIC], 593725b89263Smrg[m4_require([_LT_TAG_COMPILER])dnl 593825b89263Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 593925b89263Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 594025b89263Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 5941a253d6aeSmrg 594225b89263SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 594325b89263Smrgm4_if([$1], [CXX], [ 594425b89263Smrg # C++ specific cases for pic, static, wl, etc. 594525b89263Smrg if test "$GXX" = yes; then 594625b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 594725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5948a253d6aeSmrg 594925b89263Smrg case $host_os in 595025b89263Smrg aix*) 595125b89263Smrg # All AIX code is PIC. 595225b89263Smrg if test "$host_cpu" = ia64; then 595325b89263Smrg # AIX 5 now supports IA64 processor 595425b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 595525b89263Smrg fi 595625b89263Smrg ;; 5957ea133fd7Smrg 595825b89263Smrg amigaos*) 595925b89263Smrg case $host_cpu in 596025b89263Smrg powerpc) 596125b89263Smrg # see comment about AmigaOS4 .so support 596225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5963ea133fd7Smrg ;; 596425b89263Smrg m68k) 596525b89263Smrg # FIXME: we need at least 68020 code to build shared libraries, but 596625b89263Smrg # adding the `-m68020' flag to GCC prevents building anything better, 596725b89263Smrg # like `-m68040'. 596825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5969ea133fd7Smrg ;; 597025b89263Smrg esac 597125b89263Smrg ;; 5972a253d6aeSmrg 597325b89263Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 597425b89263Smrg # PIC is the default for these OSes. 597525b89263Smrg ;; 597625b89263Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 597725b89263Smrg # This hack is so that the source file can tell whether it is being 597825b89263Smrg # built for inclusion in a dll (and should export symbols for example). 597925b89263Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 598025b89263Smrg # (--disable-auto-import) libraries 598125b89263Smrg m4_if([$1], [GCJ], [], 598225b89263Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 598325b89263Smrg ;; 598425b89263Smrg darwin* | rhapsody*) 598525b89263Smrg # PIC is the default on this platform 598625b89263Smrg # Common symbols not allowed in MH_DYLIB files 598725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 598825b89263Smrg ;; 598925b89263Smrg *djgpp*) 599025b89263Smrg # DJGPP does not support shared libraries at all 599125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 599225b89263Smrg ;; 599325b89263Smrg haiku*) 599425b89263Smrg # PIC is the default for Haiku. 599525b89263Smrg # The "-static" flag exists, but is broken. 599625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 599725b89263Smrg ;; 599825b89263Smrg interix[[3-9]]*) 599925b89263Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 600025b89263Smrg # Instead, we relocate shared libraries at runtime. 600125b89263Smrg ;; 600225b89263Smrg sysv4*MP*) 600325b89263Smrg if test -d /usr/nec; then 600425b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 600525b89263Smrg fi 600625b89263Smrg ;; 600725b89263Smrg hpux*) 600825b89263Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 600925b89263Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 601025b89263Smrg # sets the default TLS model and affects inlining. 601125b89263Smrg case $host_cpu in 601225b89263Smrg hppa*64*) 6013ea133fd7Smrg ;; 601425b89263Smrg *) 601525b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 601625b89263Smrg ;; 601725b89263Smrg esac 601825b89263Smrg ;; 601925b89263Smrg *qnx* | *nto*) 602025b89263Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 602125b89263Smrg # it will coredump. 602225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 602325b89263Smrg ;; 602425b89263Smrg *) 602525b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 602625b89263Smrg ;; 602725b89263Smrg esac 602825b89263Smrg else 602925b89263Smrg case $host_os in 603025b89263Smrg aix[[4-9]]*) 603125b89263Smrg # All AIX code is PIC. 603225b89263Smrg if test "$host_cpu" = ia64; then 603325b89263Smrg # AIX 5 now supports IA64 processor 603425b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 603525b89263Smrg else 603625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 603725b89263Smrg fi 603825b89263Smrg ;; 603925b89263Smrg chorus*) 604025b89263Smrg case $cc_basename in 604125b89263Smrg cxch68*) 604225b89263Smrg # Green Hills C++ Compiler 604325b89263Smrg # _LT_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" 604425b89263Smrg ;; 604525b89263Smrg esac 604625b89263Smrg ;; 604725b89263Smrg dgux*) 604825b89263Smrg case $cc_basename in 604925b89263Smrg ec++*) 605025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6051ea133fd7Smrg ;; 605225b89263Smrg ghcx*) 605325b89263Smrg # Green Hills C++ Compiler 605425b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6055ea133fd7Smrg ;; 605625b89263Smrg *) 6057ea133fd7Smrg ;; 605825b89263Smrg esac 605925b89263Smrg ;; 606025b89263Smrg freebsd* | dragonfly*) 606125b89263Smrg # FreeBSD uses GNU C++ 606225b89263Smrg ;; 606325b89263Smrg hpux9* | hpux10* | hpux11*) 606425b89263Smrg case $cc_basename in 606525b89263Smrg CC*) 606625b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 606725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 606825b89263Smrg if test "$host_cpu" != ia64; then 606925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 607025b89263Smrg fi 6071ea133fd7Smrg ;; 607225b89263Smrg aCC*) 607325b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 607425b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 607525b89263Smrg case $host_cpu in 607625b89263Smrg hppa*64*|ia64*) 607725b89263Smrg # +Z the default 6078ea133fd7Smrg ;; 607925b89263Smrg *) 608025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6081ea133fd7Smrg ;; 6082ea133fd7Smrg esac 608325b89263Smrg ;; 608425b89263Smrg *) 608525b89263Smrg ;; 608625b89263Smrg esac 608725b89263Smrg ;; 608825b89263Smrg interix*) 608925b89263Smrg # This is c89, which is MS Visual C++ (no shared libs) 609025b89263Smrg # Anyone wants to do a port? 609125b89263Smrg ;; 609225b89263Smrg irix5* | irix6* | nonstopux*) 609325b89263Smrg case $cc_basename in 609425b89263Smrg CC*) 609525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 609625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 609725b89263Smrg # CC pic flag -KPIC is the default. 609825b89263Smrg ;; 609925b89263Smrg *) 610025b89263Smrg ;; 610125b89263Smrg esac 610225b89263Smrg ;; 610325b89263Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 610425b89263Smrg case $cc_basename in 610525b89263Smrg KCC*) 610625b89263Smrg # KAI C++ Compiler 610725b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 610825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 610925b89263Smrg ;; 611025b89263Smrg ecpc* ) 611125b89263Smrg # old Intel C++ for x86_64 which still supported -KPIC. 611225b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 611325b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 611425b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 611525b89263Smrg ;; 611625b89263Smrg icpc* ) 611725b89263Smrg # Intel C++, used to be incompatible with GCC. 611825b89263Smrg # ICC 10 doesn't accept -KPIC any more. 611925b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 612025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 612125b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 612225b89263Smrg ;; 612325b89263Smrg pgCC* | pgcpp*) 612425b89263Smrg # Portland Group C++ compiler 612525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 612625b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 612725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 612825b89263Smrg ;; 6129ea133fd7Smrg cxx*) 6130ea133fd7Smrg # Compaq C++ 613125b89263Smrg # Make sure the PIC flag is empty. It appears that all Alpha 613225b89263Smrg # Linux and Compaq Tru64 Unix objects are PIC. 613325b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 613425b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6135ea133fd7Smrg ;; 613625b89263Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 613725b89263Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 613825b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 613925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 614025b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6141ea133fd7Smrg ;; 6142ea133fd7Smrg *) 6143ea133fd7Smrg case `$CC -V 2>&1 | sed 5q` in 6144ea133fd7Smrg *Sun\ C*) 6145ea133fd7Smrg # Sun C++ 5.9 614625b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 614725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 614825b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6149ea133fd7Smrg ;; 6150ea133fd7Smrg esac 6151ea133fd7Smrg ;; 6152ea133fd7Smrg esac 6153ea133fd7Smrg ;; 615425b89263Smrg lynxos*) 615525b89263Smrg ;; 615625b89263Smrg m88k*) 615725b89263Smrg ;; 615825b89263Smrg mvs*) 615925b89263Smrg case $cc_basename in 616025b89263Smrg cxx*) 616125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 616225b89263Smrg ;; 616325b89263Smrg *) 616425b89263Smrg ;; 616525b89263Smrg esac 616625b89263Smrg ;; 616725b89263Smrg netbsd*) 616825b89263Smrg ;; 616925b89263Smrg *qnx* | *nto*) 617025b89263Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 617125b89263Smrg # it will coredump. 617225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 617325b89263Smrg ;; 617425b89263Smrg osf3* | osf4* | osf5*) 617525b89263Smrg case $cc_basename in 617625b89263Smrg KCC*) 617725b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 617825b89263Smrg ;; 617925b89263Smrg RCC*) 618025b89263Smrg # Rational C++ 2.4.1 618125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 618225b89263Smrg ;; 618325b89263Smrg cxx*) 618425b89263Smrg # Digital/Compaq C++ 618525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 618625b89263Smrg # Make sure the PIC flag is empty. It appears that all Alpha 618725b89263Smrg # Linux and Compaq Tru64 Unix objects are PIC. 618825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 618925b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 619025b89263Smrg ;; 619125b89263Smrg *) 619225b89263Smrg ;; 619325b89263Smrg esac 619425b89263Smrg ;; 619525b89263Smrg psos*) 6196ea133fd7Smrg ;; 619725b89263Smrg solaris*) 619825b89263Smrg case $cc_basename in 619925b89263Smrg CC* | sunCC*) 620025b89263Smrg # Sun C++ 4.2, 5.x and Centerline C++ 620125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 620225b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 620325b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 620425b89263Smrg ;; 620525b89263Smrg gcx*) 620625b89263Smrg # Green Hills C++ Compiler 620725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 620825b89263Smrg ;; 620925b89263Smrg *) 621025b89263Smrg ;; 621125b89263Smrg esac 6212ea133fd7Smrg ;; 621325b89263Smrg sunos4*) 621425b89263Smrg case $cc_basename in 621525b89263Smrg CC*) 621625b89263Smrg # Sun C++ 4.x 621725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 621825b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 621925b89263Smrg ;; 622025b89263Smrg lcc*) 622125b89263Smrg # Lucid 622225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6223ea133fd7Smrg ;; 6224ea133fd7Smrg *) 6225ea133fd7Smrg ;; 6226ea133fd7Smrg esac 6227ea133fd7Smrg ;; 622825b89263Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 622925b89263Smrg case $cc_basename in 623025b89263Smrg CC*) 623125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 623225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 623325b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 623425b89263Smrg ;; 623525b89263Smrg esac 6236ea133fd7Smrg ;; 623725b89263Smrg tandem*) 623825b89263Smrg case $cc_basename in 623925b89263Smrg NCC*) 624025b89263Smrg # NonStop-UX NCC 3.20 624125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 624225b89263Smrg ;; 624325b89263Smrg *) 624425b89263Smrg ;; 624525b89263Smrg esac 6246ea133fd7Smrg ;; 624725b89263Smrg vxworks*) 6248ea133fd7Smrg ;; 624925b89263Smrg *) 625025b89263Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6251ea133fd7Smrg ;; 625225b89263Smrg esac 625325b89263Smrg fi 625425b89263Smrg], 625525b89263Smrg[ 625625b89263Smrg if test "$GCC" = yes; then 625725b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 625825b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6259a253d6aeSmrg 626025b89263Smrg case $host_os in 626125b89263Smrg aix*) 626225b89263Smrg # All AIX code is PIC. 626325b89263Smrg if test "$host_cpu" = ia64; then 626425b89263Smrg # AIX 5 now supports IA64 processor 626525b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 626625b89263Smrg fi 626725b89263Smrg ;; 6268a253d6aeSmrg 626925b89263Smrg amigaos*) 627025b89263Smrg case $host_cpu in 627125b89263Smrg powerpc) 627225b89263Smrg # see comment about AmigaOS4 .so support 627325b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 627425b89263Smrg ;; 627525b89263Smrg m68k) 627625b89263Smrg # FIXME: we need at least 68020 code to build shared libraries, but 627725b89263Smrg # adding the `-m68020' flag to GCC prevents building anything better, 627825b89263Smrg # like `-m68040'. 627925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 628025b89263Smrg ;; 628125b89263Smrg esac 628225b89263Smrg ;; 6283ea133fd7Smrg 628425b89263Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 628525b89263Smrg # PIC is the default for these OSes. 628625b89263Smrg ;; 6287ea133fd7Smrg 628825b89263Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 628925b89263Smrg # This hack is so that the source file can tell whether it is being 629025b89263Smrg # built for inclusion in a dll (and should export symbols for example). 629125b89263Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 629225b89263Smrg # (--disable-auto-import) libraries 629325b89263Smrg m4_if([$1], [GCJ], [], 629425b89263Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 629525b89263Smrg ;; 6296ea133fd7Smrg 629725b89263Smrg darwin* | rhapsody*) 629825b89263Smrg # PIC is the default on this platform 629925b89263Smrg # Common symbols not allowed in MH_DYLIB files 630025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 630125b89263Smrg ;; 6302a253d6aeSmrg 630325b89263Smrg haiku*) 630425b89263Smrg # PIC is the default for Haiku. 630525b89263Smrg # The "-static" flag exists, but is broken. 630625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 630725b89263Smrg ;; 6308a253d6aeSmrg 630925b89263Smrg hpux*) 631025b89263Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 631125b89263Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 631225b89263Smrg # sets the default TLS model and affects inlining. 631325b89263Smrg case $host_cpu in 631425b89263Smrg hppa*64*) 631525b89263Smrg # +Z the default 631625b89263Smrg ;; 631725b89263Smrg *) 631825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 631925b89263Smrg ;; 632025b89263Smrg esac 632125b89263Smrg ;; 6322a253d6aeSmrg 632325b89263Smrg interix[[3-9]]*) 632425b89263Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 632525b89263Smrg # Instead, we relocate shared libraries at runtime. 632625b89263Smrg ;; 6327ea133fd7Smrg 632825b89263Smrg msdosdjgpp*) 632925b89263Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 633025b89263Smrg # on systems that don't support them. 633125b89263Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 633225b89263Smrg enable_shared=no 633325b89263Smrg ;; 6334a253d6aeSmrg 633525b89263Smrg *nto* | *qnx*) 633625b89263Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 633725b89263Smrg # it will coredump. 633825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 633925b89263Smrg ;; 6340a253d6aeSmrg 634125b89263Smrg sysv4*MP*) 634225b89263Smrg if test -d /usr/nec; then 634325b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 634425b89263Smrg fi 634525b89263Smrg ;; 6346a253d6aeSmrg 634725b89263Smrg *) 634825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 634925b89263Smrg ;; 635025b89263Smrg esac 6351ea133fd7Smrg 635225b89263Smrg case $cc_basename in 635325b89263Smrg nvcc*) # Cuda Compiler Driver 2.2 635425b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 635525b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 635625b89263Smrg ;; 635725b89263Smrg esac 635825b89263Smrg else 635925b89263Smrg # PORTME Check for flag to pass linker flags through the system compiler. 636025b89263Smrg case $host_os in 636125b89263Smrg aix*) 636225b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 636325b89263Smrg if test "$host_cpu" = ia64; then 636425b89263Smrg # AIX 5 now supports IA64 processor 636525b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 636625b89263Smrg else 636725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 636825b89263Smrg fi 636925b89263Smrg ;; 6370ea133fd7Smrg 637125b89263Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 637225b89263Smrg # This hack is so that the source file can tell whether it is being 637325b89263Smrg # built for inclusion in a dll (and should export symbols for example). 637425b89263Smrg m4_if([$1], [GCJ], [], 637525b89263Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 637625b89263Smrg ;; 6377ea133fd7Smrg 637825b89263Smrg hpux9* | hpux10* | hpux11*) 637925b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 638025b89263Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 638125b89263Smrg # not for PA HP-UX. 638225b89263Smrg case $host_cpu in 638325b89263Smrg hppa*64*|ia64*) 638425b89263Smrg # +Z the default 638525b89263Smrg ;; 638625b89263Smrg *) 638725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 638825b89263Smrg ;; 638925b89263Smrg esac 639025b89263Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 639125b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 639225b89263Smrg ;; 6393a253d6aeSmrg 639425b89263Smrg irix5* | irix6* | nonstopux*) 639525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 639625b89263Smrg # PIC (with -KPIC) is the default. 639725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 639825b89263Smrg ;; 6399a253d6aeSmrg 640025b89263Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6401ea133fd7Smrg case $cc_basename in 640225b89263Smrg # old Intel for x86_64 which still supported -KPIC. 640325b89263Smrg ecc*) 640425b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 640525b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 640625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 640725b89263Smrg ;; 640825b89263Smrg # icc used to be incompatible with GCC. 640925b89263Smrg # ICC 10 doesn't accept -KPIC any more. 641025b89263Smrg icc* | ifort*) 641125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 641225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 641325b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 641425b89263Smrg ;; 641525b89263Smrg # Lahey Fortran 8.1. 641625b89263Smrg lf95*) 641725b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 641825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 641925b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 642025b89263Smrg ;; 642125b89263Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 642225b89263Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 642325b89263Smrg # which looks to be a dead project) 642425b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 642525b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 642625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 642725b89263Smrg ;; 642825b89263Smrg ccc*) 642925b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 643025b89263Smrg # All Alpha code is PIC. 643125b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 643225b89263Smrg ;; 643325b89263Smrg xl* | bgxl* | bgf* | mpixl*) 643425b89263Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 643525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 643625b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 643725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 643825b89263Smrg ;; 643925b89263Smrg *) 644025b89263Smrg case `$CC -V 2>&1 | sed 5q` in 644125b89263Smrg *Sun\ F* | *Sun*Fortran*) 644225b89263Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 644325b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 644425b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 644525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 6446ea133fd7Smrg ;; 644725b89263Smrg *Sun\ C*) 644825b89263Smrg # Sun C 5.9 644925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 645025b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 645125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6452ea133fd7Smrg ;; 645325b89263Smrg esac 645425b89263Smrg ;; 6455ea133fd7Smrg esac 6456ea133fd7Smrg ;; 6457a253d6aeSmrg 645825b89263Smrg newsos6) 645925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 646025b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 646125b89263Smrg ;; 6462a253d6aeSmrg 646325b89263Smrg *nto* | *qnx*) 646425b89263Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 646525b89263Smrg # it will coredump. 646625b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6467ea133fd7Smrg ;; 6468a253d6aeSmrg 646925b89263Smrg osf3* | osf4* | osf5*) 647025b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 647125b89263Smrg # All OSF/1 code is PIC. 647225b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 647325b89263Smrg ;; 6474a253d6aeSmrg 647525b89263Smrg rdos*) 647625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 647725b89263Smrg ;; 6478a253d6aeSmrg 647925b89263Smrg solaris*) 648025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 648125b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 648225b89263Smrg case $cc_basename in 648325b89263Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 648425b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6485ea133fd7Smrg *) 648625b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 648725b89263Smrg esac 648825b89263Smrg ;; 6489a253d6aeSmrg 649025b89263Smrg sunos4*) 649125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 649225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 649325b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 649425b89263Smrg ;; 6495ea133fd7Smrg 649625b89263Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 649725b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 649825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 649925b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 650025b89263Smrg ;; 6501ea133fd7Smrg 650225b89263Smrg sysv4*MP*) 650325b89263Smrg if test -d /usr/nec ;then 650425b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 650525b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 650625b89263Smrg fi 650725b89263Smrg ;; 6508ea133fd7Smrg 650925b89263Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 651025b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 651125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 651225b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 651325b89263Smrg ;; 6514ea133fd7Smrg 651525b89263Smrg unicos*) 651625b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 651725b89263Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 651825b89263Smrg ;; 6519a253d6aeSmrg 652025b89263Smrg uts4*) 652125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 652225b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 652325b89263Smrg ;; 6524a253d6aeSmrg 652525b89263Smrg *) 652625b89263Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 652725b89263Smrg ;; 652825b89263Smrg esac 652925b89263Smrg fi 653025b89263Smrg]) 653125b89263Smrgcase $host_os in 653225b89263Smrg # For platforms which do not support PIC, -DPIC is meaningless: 653325b89263Smrg *djgpp*) 653425b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 653525b89263Smrg ;; 653625b89263Smrg *) 653725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 653825b89263Smrg ;; 653925b89263Smrgesac 654025b89263SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 654125b89263Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 654225b89263Smrg [How to pass a linker flag through the compiler]) 6543a253d6aeSmrg 654425b89263Smrg# 654525b89263Smrg# Check to make sure the PIC flag actually works. 654625b89263Smrg# 654725b89263Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 654825b89263Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 654925b89263Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 655025b89263Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 655125b89263Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 655225b89263Smrg "" | " "*) ;; 655325b89263Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 655425b89263Smrg esac], 655525b89263Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 655625b89263Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 655725b89263Smrgfi 655825b89263Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 655925b89263Smrg [Additional compiler flags for building library objects]) 6560a253d6aeSmrg 656125b89263Smrg# 656225b89263Smrg# Check to make sure the static flag actually works. 656325b89263Smrg# 656425b89263Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 656525b89263Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 656625b89263Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 656725b89263Smrg $lt_tmp_static_flag, 656825b89263Smrg [], 656925b89263Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 657025b89263Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 657125b89263Smrg [Compiler flag to prevent dynamic linking]) 657225b89263Smrg])# _LT_COMPILER_PIC 6573a253d6aeSmrg 6574a253d6aeSmrg 657525b89263Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 657625b89263Smrg# ---------------------------- 657725b89263Smrg# See if the linker supports building shared libraries. 657825b89263Smrgm4_defun([_LT_LINKER_SHLIBS], 657925b89263Smrg[AC_REQUIRE([LT_PATH_LD])dnl 658025b89263SmrgAC_REQUIRE([LT_PATH_NM])dnl 658125b89263Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 658225b89263Smrgm4_require([_LT_DECL_EGREP])dnl 658325b89263Smrgm4_require([_LT_DECL_SED])dnl 658425b89263Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 658525b89263Smrgm4_require([_LT_TAG_COMPILER])dnl 658625b89263SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 658725b89263Smrgm4_if([$1], [CXX], [ 658825b89263Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 658925b89263Smrg case $host_os in 659025b89263Smrg aix[[4-9]]*) 659125b89263Smrg # If we're using GNU nm, then we don't want the "-C" option. 659225b89263Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 659325b89263Smrg # Also, AIX nm treats weak defined symbols like other global defined 659425b89263Smrg # symbols, whereas GNU nm marks them as "W". 659525b89263Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 659625b89263Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 659725b89263Smrg else 659825b89263Smrg _LT_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' 659925b89263Smrg fi 660025b89263Smrg ;; 660125b89263Smrg pw32*) 660225b89263Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 660325b89263Smrg ;; 660425b89263Smrg cygwin* | mingw* | cegcc*) 660525b89263Smrg _LT_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' 660625b89263Smrg ;; 660725b89263Smrg *) 660825b89263Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 660925b89263Smrg ;; 661025b89263Smrg esac 661125b89263Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 661225b89263Smrg], [ 661325b89263Smrg runpath_var= 661425b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 661525b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=no 661625b89263Smrg _LT_TAGVAR(archive_cmds, $1)= 661725b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 661825b89263Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 661925b89263Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 662025b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 662125b89263Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 662225b89263Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 662325b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 662425b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 662525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 662625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 662725b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 662825b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 662925b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 663025b89263Smrg _LT_TAGVAR(inherit_rpath, $1)=no 663125b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 663225b89263Smrg _LT_TAGVAR(module_cmds, $1)= 663325b89263Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 663425b89263Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 663525b89263Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 663625b89263Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 663725b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 663825b89263Smrg # include_expsyms should be a list of space-separated symbols to be *always* 663925b89263Smrg # included in the symbol list 664025b89263Smrg _LT_TAGVAR(include_expsyms, $1)= 664125b89263Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 664225b89263Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 664325b89263Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 664425b89263Smrg # as well as any symbol that contains `d'. 664525b89263Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 664625b89263Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 664725b89263Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 664825b89263Smrg # the symbol is explicitly referenced. Since portable code cannot 664925b89263Smrg # rely on this symbol name, it's probably fine to never include it in 665025b89263Smrg # preloaded symbol tables. 665125b89263Smrg # Exclude shared library initialization/finalization symbols. 665225b89263Smrgdnl Note also adjust exclude_expsyms for C++ above. 665325b89263Smrg extract_expsyms_cmds= 665425b89263Smrg 665525b89263Smrg case $host_os in 665625b89263Smrg cygwin* | mingw* | pw32* | cegcc*) 665725b89263Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 665825b89263Smrg # When not using gcc, we currently assume that we are using 665925b89263Smrg # Microsoft Visual C++. 666025b89263Smrg if test "$GCC" != yes; then 666125b89263Smrg with_gnu_ld=no 666225b89263Smrg fi 666325b89263Smrg ;; 666425b89263Smrg interix*) 666525b89263Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 666625b89263Smrg with_gnu_ld=yes 666725b89263Smrg ;; 666825b89263Smrg openbsd*) 666925b89263Smrg with_gnu_ld=no 667025b89263Smrg ;; 667125b89263Smrg esac 6672a253d6aeSmrg 667325b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6674a253d6aeSmrg 667525b89263Smrg # On some targets, GNU ld is compatible enough with the native linker 667625b89263Smrg # that we're better off using the native interface for both. 667725b89263Smrg lt_use_gnu_ld_interface=no 667825b89263Smrg if test "$with_gnu_ld" = yes; then 667925b89263Smrg case $host_os in 668025b89263Smrg aix*) 668125b89263Smrg # The AIX port of GNU ld has always aspired to compatibility 668225b89263Smrg # with the native linker. However, as the warning in the GNU ld 668325b89263Smrg # block says, versions before 2.19.5* couldn't really create working 668425b89263Smrg # shared libraries, regardless of the interface used. 668525b89263Smrg case `$LD -v 2>&1` in 668625b89263Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 668725b89263Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 668825b89263Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 668925b89263Smrg *) 669025b89263Smrg lt_use_gnu_ld_interface=yes 669125b89263Smrg ;; 669225b89263Smrg esac 669325b89263Smrg ;; 669425b89263Smrg *) 669525b89263Smrg lt_use_gnu_ld_interface=yes 669625b89263Smrg ;; 669725b89263Smrg esac 669825b89263Smrg fi 6699a253d6aeSmrg 670025b89263Smrg if test "$lt_use_gnu_ld_interface" = yes; then 670125b89263Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 670225b89263Smrg wlarc='${wl}' 6703a253d6aeSmrg 670425b89263Smrg # Set some defaults for GNU ld with shared library support. These 670525b89263Smrg # are reset later if shared libraries are not supported. Putting them 670625b89263Smrg # here allows them to be overridden if necessary. 670725b89263Smrg runpath_var=LD_RUN_PATH 670825b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 670925b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 671025b89263Smrg # ancient GNU ld didn't support --whole-archive et. al. 671125b89263Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 671225b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 671325b89263Smrg else 671425b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 671525b89263Smrg fi 671625b89263Smrg supports_anon_versioning=no 671725b89263Smrg case `$LD -v 2>&1` in 671825b89263Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 671925b89263Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 672025b89263Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 672125b89263Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 672225b89263Smrg *\ 2.11.*) ;; # other 2.11 versions 672325b89263Smrg *) supports_anon_versioning=yes ;; 672425b89263Smrg esac 6725a253d6aeSmrg 672625b89263Smrg # See if GNU ld supports shared libraries. 672725b89263Smrg case $host_os in 672825b89263Smrg aix[[3-9]]*) 672925b89263Smrg # On AIX/PPC, the GNU linker is very broken 673025b89263Smrg if test "$host_cpu" != ia64; then 673125b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 673225b89263Smrg cat <<_LT_EOF 1>&2 6733a253d6aeSmrg 673425b89263Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 673525b89263Smrg*** to be unable to reliably create shared libraries on AIX. 673625b89263Smrg*** Therefore, libtool is disabling shared libraries support. If you 673725b89263Smrg*** really care for shared libraries, you may want to install binutils 673825b89263Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 673925b89263Smrg*** You will then need to restart the configuration process. 6740a253d6aeSmrg 674125b89263Smrg_LT_EOF 674225b89263Smrg fi 674325b89263Smrg ;; 6744a253d6aeSmrg 674525b89263Smrg amigaos*) 674625b89263Smrg case $host_cpu in 674725b89263Smrg powerpc) 674825b89263Smrg # see comment about AmigaOS4 .so support 674925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 675025b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 675125b89263Smrg ;; 675225b89263Smrg m68k) 675325b89263Smrg _LT_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)' 675425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 675525b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 675625b89263Smrg ;; 675725b89263Smrg esac 675825b89263Smrg ;; 6759a253d6aeSmrg 676025b89263Smrg beos*) 676125b89263Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 676225b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 676325b89263Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 676425b89263Smrg # support --undefined. This deserves some investigation. FIXME 676525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 676625b89263Smrg else 676725b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 676825b89263Smrg fi 676925b89263Smrg ;; 6770a253d6aeSmrg 677125b89263Smrg cygwin* | mingw* | pw32* | cegcc*) 677225b89263Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 677325b89263Smrg # as there is no search path for DLLs. 677425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 677525b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 677625b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 677725b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=no 677825b89263Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 677925b89263Smrg _LT_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' 6780ea133fd7Smrg 678125b89263Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 678225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 678325b89263Smrg # If the export-symbols file already is a .def file (1st line 678425b89263Smrg # is EXPORTS), use it as is; otherwise, prepend... 678525b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 678625b89263Smrg cp $export_symbols $output_objdir/$soname.def; 678725b89263Smrg else 678825b89263Smrg echo EXPORTS > $output_objdir/$soname.def; 678925b89263Smrg cat $export_symbols >> $output_objdir/$soname.def; 679025b89263Smrg fi~ 679125b89263Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 679225b89263Smrg else 679325b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 679425b89263Smrg fi 6795ea133fd7Smrg ;; 6796a253d6aeSmrg 679725b89263Smrg haiku*) 679825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 679925b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 680025b89263Smrg ;; 6801a253d6aeSmrg 680225b89263Smrg interix[[3-9]]*) 680325b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 680425b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 680525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 680625b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 680725b89263Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 680825b89263Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 680925b89263Smrg # default) and relocated if they conflict, which is a slow very memory 681025b89263Smrg # consuming and fragmenting process. To avoid this, we pick a random, 681125b89263Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 681225b89263Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 681325b89263Smrg _LT_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' 681425b89263Smrg _LT_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' 6815ea133fd7Smrg ;; 6816a253d6aeSmrg 681725b89263Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 681825b89263Smrg tmp_diet=no 681925b89263Smrg if test "$host_os" = linux-dietlibc; then 682025b89263Smrg case $cc_basename in 682125b89263Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 682225b89263Smrg esac 682325b89263Smrg fi 682425b89263Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 682525b89263Smrg && test "$tmp_diet" = no 682625b89263Smrg then 682725b89263Smrg tmp_addflag= 682825b89263Smrg tmp_sharedflag='-shared' 682925b89263Smrg case $cc_basename,$host_cpu in 683025b89263Smrg pgcc*) # Portland Group C compiler 683125b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 683225b89263Smrg tmp_addflag=' $pic_flag' 683325b89263Smrg ;; 683425b89263Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 683525b89263Smrg # Portland Group f77 and f90 compilers 683625b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 683725b89263Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 683825b89263Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 683925b89263Smrg tmp_addflag=' -i_dynamic' ;; 684025b89263Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 684125b89263Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 684225b89263Smrg ifc* | ifort*) # Intel Fortran compiler 684325b89263Smrg tmp_addflag=' -nofor_main' ;; 684425b89263Smrg lf95*) # Lahey Fortran 8.1 684525b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 684625b89263Smrg tmp_sharedflag='--shared' ;; 684725b89263Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 684825b89263Smrg tmp_sharedflag='-qmkshrobj' 684925b89263Smrg tmp_addflag= ;; 685025b89263Smrg nvcc*) # Cuda Compiler Driver 2.2 685125b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 685225b89263Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 685325b89263Smrg ;; 685425b89263Smrg esac 685525b89263Smrg case `$CC -V 2>&1 | sed 5q` in 685625b89263Smrg *Sun\ C*) # Sun C 5.9 685725b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 685825b89263Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 685925b89263Smrg tmp_sharedflag='-G' ;; 686025b89263Smrg *Sun\ F*) # Sun Fortran 8.3 686125b89263Smrg tmp_sharedflag='-G' ;; 686225b89263Smrg esac 686325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6864a253d6aeSmrg 686525b89263Smrg if test "x$supports_anon_versioning" = xyes; then 686625b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 686725b89263Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 686825b89263Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 686925b89263Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 687025b89263Smrg fi 6871ea133fd7Smrg 687225b89263Smrg case $cc_basename in 687325b89263Smrg xlf* | bgf* | bgxlf* | mpixlf*) 687425b89263Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 687525b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 687625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 687725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 687825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 687925b89263Smrg if test "x$supports_anon_versioning" = xyes; then 688025b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 688125b89263Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 688225b89263Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 688325b89263Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 688425b89263Smrg fi 688525b89263Smrg ;; 688625b89263Smrg esac 688725b89263Smrg else 688825b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 688925b89263Smrg fi 689025b89263Smrg ;; 6891ea133fd7Smrg 689225b89263Smrg netbsd*) 689325b89263Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 689425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 689525b89263Smrg wlarc= 689625b89263Smrg else 689725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 689825b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 689925b89263Smrg fi 690025b89263Smrg ;; 6901a253d6aeSmrg 690225b89263Smrg solaris*) 690325b89263Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 690425b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 690525b89263Smrg cat <<_LT_EOF 1>&2 6906a253d6aeSmrg 690725b89263Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 690825b89263Smrg*** create shared libraries on Solaris systems. Therefore, libtool 690925b89263Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 691025b89263Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 691125b89263Smrg*** your PATH or compiler configuration so that the native linker is 691225b89263Smrg*** used, and then restart. 6913a253d6aeSmrg 691425b89263Smrg_LT_EOF 691525b89263Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 691625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 691725b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 691825b89263Smrg else 691925b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 692025b89263Smrg fi 692125b89263Smrg ;; 6922a253d6aeSmrg 692325b89263Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 692425b89263Smrg case `$LD -v 2>&1` in 692525b89263Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 692625b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 692725b89263Smrg cat <<_LT_EOF 1>&2 6928a253d6aeSmrg 692925b89263Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 693025b89263Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 693125b89263Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 693225b89263Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 693325b89263Smrg*** your PATH or compiler configuration so that the native linker is 693425b89263Smrg*** used, and then restart. 6935a253d6aeSmrg 693625b89263Smrg_LT_EOF 693725b89263Smrg ;; 693825b89263Smrg *) 693925b89263Smrg # For security reasons, it is highly recommended that you always 694025b89263Smrg # use absolute paths for naming shared libraries, and exclude the 694125b89263Smrg # DT_RUNPATH tag from executables and libraries. But doing so 694225b89263Smrg # requires that you compile everything twice, which is a pain. 694325b89263Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 694425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 694525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 694625b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 694725b89263Smrg else 694825b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 694925b89263Smrg fi 695025b89263Smrg ;; 695125b89263Smrg esac 695225b89263Smrg ;; 6953ea133fd7Smrg 695425b89263Smrg sunos4*) 695525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 695625b89263Smrg wlarc= 695725b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 695825b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 695925b89263Smrg ;; 6960a253d6aeSmrg 696125b89263Smrg *) 696225b89263Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 696325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 696425b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 696525b89263Smrg else 696625b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 696725b89263Smrg fi 696825b89263Smrg ;; 696925b89263Smrg esac 6970a253d6aeSmrg 697125b89263Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 697225b89263Smrg runpath_var= 697325b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 697425b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 697525b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 697625b89263Smrg fi 697725b89263Smrg else 697825b89263Smrg # PORTME fill in a description of your system's linker (not GNU ld) 697925b89263Smrg case $host_os in 698025b89263Smrg aix3*) 698125b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 698225b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 698325b89263Smrg _LT_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' 698425b89263Smrg # Note: this linker hardcodes the directories in LIBPATH if there 698525b89263Smrg # are no directories specified by -L. 698625b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 698725b89263Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 698825b89263Smrg # Neither direct hardcoding nor static linking is supported with a 698925b89263Smrg # broken collect2. 699025b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 699125b89263Smrg fi 699225b89263Smrg ;; 6993a253d6aeSmrg 699425b89263Smrg aix[[4-9]]*) 699525b89263Smrg if test "$host_cpu" = ia64; then 699625b89263Smrg # On IA64, the linker does run time linking by default, so we don't 699725b89263Smrg # have to do anything special. 699825b89263Smrg aix_use_runtimelinking=no 699925b89263Smrg exp_sym_flag='-Bexport' 700025b89263Smrg no_entry_flag="" 700125b89263Smrg else 700225b89263Smrg # If we're using GNU nm, then we don't want the "-C" option. 700325b89263Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 700425b89263Smrg # Also, AIX nm treats weak defined symbols like other global 700525b89263Smrg # defined symbols, whereas GNU nm marks them as "W". 700625b89263Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 700725b89263Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 700825b89263Smrg else 700925b89263Smrg _LT_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' 701025b89263Smrg fi 701125b89263Smrg aix_use_runtimelinking=no 7012a253d6aeSmrg 701325b89263Smrg # Test if we are trying to use run time linking or normal 701425b89263Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 701525b89263Smrg # need to do runtime linking. 701625b89263Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 701725b89263Smrg for ld_flag in $LDFLAGS; do 701825b89263Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 701925b89263Smrg aix_use_runtimelinking=yes 702025b89263Smrg break 702125b89263Smrg fi 702225b89263Smrg done 702325b89263Smrg ;; 702425b89263Smrg esac 7025a253d6aeSmrg 702625b89263Smrg exp_sym_flag='-bexport' 702725b89263Smrg no_entry_flag='-bnoentry' 702825b89263Smrg fi 7029a253d6aeSmrg 703025b89263Smrg # When large executables or shared objects are built, AIX ld can 703125b89263Smrg # have problems creating the table of contents. If linking a library 703225b89263Smrg # or program results in "error TOC overflow" add -mminimal-toc to 703325b89263Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 703425b89263Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7035ea133fd7Smrg 703625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='' 703725b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 703825b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 703925b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 704025b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 704125b89263Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7042ea133fd7Smrg 704325b89263Smrg if test "$GCC" = yes; then 704425b89263Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 704525b89263Smrg # We only want to do this on AIX 4.2 and lower, the check 704625b89263Smrg # below for broken collect2 doesn't work under 4.3+ 704725b89263Smrg collect2name=`${CC} -print-prog-name=collect2` 704825b89263Smrg if test -f "$collect2name" && 704925b89263Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 705025b89263Smrg then 705125b89263Smrg # We have reworked collect2 705225b89263Smrg : 705325b89263Smrg else 705425b89263Smrg # We have old collect2 705525b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 705625b89263Smrg # It fails to find uninstalled libraries when the uninstalled 705725b89263Smrg # path is not listed in the libpath. Setting hardcode_minus_L 705825b89263Smrg # to unsupported forces relinking 705925b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 706025b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 706125b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 706225b89263Smrg fi 706325b89263Smrg ;; 706425b89263Smrg esac 706525b89263Smrg shared_flag='-shared' 706625b89263Smrg if test "$aix_use_runtimelinking" = yes; then 706725b89263Smrg shared_flag="$shared_flag "'${wl}-G' 706825b89263Smrg fi 706925b89263Smrg else 707025b89263Smrg # not using gcc 707125b89263Smrg if test "$host_cpu" = ia64; then 707225b89263Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 707325b89263Smrg # chokes on -Wl,-G. The following line is correct: 707425b89263Smrg shared_flag='-G' 707525b89263Smrg else 707625b89263Smrg if test "$aix_use_runtimelinking" = yes; then 707725b89263Smrg shared_flag='${wl}-G' 707825b89263Smrg else 707925b89263Smrg shared_flag='${wl}-bM:SRE' 708025b89263Smrg fi 708125b89263Smrg fi 708225b89263Smrg fi 7083ea133fd7Smrg 708425b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 708525b89263Smrg # It seems that -bexpall does not export symbols beginning with 708625b89263Smrg # underscore (_), so it is better to generate a list of symbols to export. 708725b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 708825b89263Smrg if test "$aix_use_runtimelinking" = yes; then 708925b89263Smrg # Warning - without using the other runtime loading flags (-brtl), 709025b89263Smrg # -berok will link without error, but may produce a broken library. 709125b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 709225b89263Smrg # Determine the default libpath from the value encoded in an 709325b89263Smrg # empty executable. 709425b89263Smrg _LT_SYS_MODULE_PATH_AIX 709525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 709625b89263Smrg _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 709725b89263Smrg else 709825b89263Smrg if test "$host_cpu" = ia64; then 709925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 710025b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 710125b89263Smrg _LT_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" 710225b89263Smrg else 710325b89263Smrg # Determine the default libpath from the value encoded in an 710425b89263Smrg # empty executable. 710525b89263Smrg _LT_SYS_MODULE_PATH_AIX 710625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 710725b89263Smrg # Warning - without using the other run time loading flags, 710825b89263Smrg # -berok will link without error, but may produce a broken library. 710925b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 711025b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 711125b89263Smrg if test "$with_gnu_ld" = yes; then 711225b89263Smrg # We only use this code for GNU lds that support --whole-archive. 711325b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 711425b89263Smrg else 711525b89263Smrg # Exported symbols can be pulled into shared objects from archives 711625b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 711725b89263Smrg fi 711825b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 711925b89263Smrg # This is similar to how AIX traditionally builds its shared libraries. 712025b89263Smrg _LT_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' 712125b89263Smrg fi 712225b89263Smrg fi 712325b89263Smrg ;; 7124ea133fd7Smrg 712525b89263Smrg amigaos*) 712625b89263Smrg case $host_cpu in 712725b89263Smrg powerpc) 712825b89263Smrg # see comment about AmigaOS4 .so support 712925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 713025b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 713125b89263Smrg ;; 713225b89263Smrg m68k) 713325b89263Smrg _LT_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)' 713425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 713525b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 713625b89263Smrg ;; 713725b89263Smrg esac 713825b89263Smrg ;; 7139ea133fd7Smrg 714025b89263Smrg bsdi[[45]]*) 714125b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 714225b89263Smrg ;; 7143a253d6aeSmrg 714425b89263Smrg cygwin* | mingw* | pw32* | cegcc*) 714525b89263Smrg # When not using gcc, we currently assume that we are using 714625b89263Smrg # Microsoft Visual C++. 714725b89263Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 714825b89263Smrg # no search path for DLLs. 714925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 715025b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 715125b89263Smrg # Tell ltmain to make .lib files, not .a files. 715225b89263Smrg libext=lib 715325b89263Smrg # Tell ltmain to make .dll files, not .so files. 715425b89263Smrg shrext_cmds=".dll" 715525b89263Smrg # FIXME: Setting linknames here is a bad hack. 715625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 715725b89263Smrg # The linker will automatically build a .lib file if we build a DLL. 715825b89263Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 715925b89263Smrg # FIXME: Should let the user specify the lib program. 716025b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 716125b89263Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 716225b89263Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 716325b89263Smrg ;; 7164a253d6aeSmrg 716525b89263Smrg darwin* | rhapsody*) 716625b89263Smrg _LT_DARWIN_LINKER_FEATURES($1) 716725b89263Smrg ;; 7168a253d6aeSmrg 716925b89263Smrg dgux*) 717025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 717125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 717225b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 717325b89263Smrg ;; 7174a253d6aeSmrg 717525b89263Smrg freebsd1*) 717625b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 717725b89263Smrg ;; 7178a253d6aeSmrg 717925b89263Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 718025b89263Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 718125b89263Smrg # does not break anything, and helps significantly (at the cost of a little 718225b89263Smrg # extra space). 718325b89263Smrg freebsd2.2*) 718425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 718525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 718625b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 718725b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 718825b89263Smrg ;; 7189a253d6aeSmrg 719025b89263Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 719125b89263Smrg freebsd2*) 719225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 719325b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 719425b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 719525b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 719625b89263Smrg ;; 7197ea133fd7Smrg 719825b89263Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 719925b89263Smrg freebsd* | dragonfly*) 720025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 720125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 720225b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 720325b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 720425b89263Smrg ;; 7205ea133fd7Smrg 720625b89263Smrg hpux9*) 720725b89263Smrg if test "$GCC" = yes; then 720825b89263Smrg _LT_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' 720925b89263Smrg else 721025b89263Smrg _LT_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' 721125b89263Smrg fi 721225b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 721325b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 721425b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7215ea133fd7Smrg 721625b89263Smrg # hardcode_minus_L: Not really in the search PATH, 721725b89263Smrg # but as the default location of the library. 721825b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 721925b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 722025b89263Smrg ;; 7221ea133fd7Smrg 722225b89263Smrg hpux10*) 722325b89263Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 722425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 722525b89263Smrg else 722625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 722725b89263Smrg fi 722825b89263Smrg if test "$with_gnu_ld" = no; then 722925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 723025b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 723125b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 723225b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 723325b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 723425b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 723525b89263Smrg # hardcode_minus_L: Not really in the search PATH, 723625b89263Smrg # but as the default location of the library. 723725b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 723825b89263Smrg fi 723925b89263Smrg ;; 7240a253d6aeSmrg 724125b89263Smrg hpux11*) 724225b89263Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 724325b89263Smrg case $host_cpu in 724425b89263Smrg hppa*64*) 724525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 724625b89263Smrg ;; 724725b89263Smrg ia64*) 724825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 724925b89263Smrg ;; 725025b89263Smrg *) 725125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 725225b89263Smrg ;; 725325b89263Smrg esac 725425b89263Smrg else 725525b89263Smrg case $host_cpu in 725625b89263Smrg hppa*64*) 725725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 725825b89263Smrg ;; 725925b89263Smrg ia64*) 726025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 726125b89263Smrg ;; 726225b89263Smrg *) 726325b89263Smrg m4_if($1, [], [ 726425b89263Smrg # Older versions of the 11.00 compiler do not understand -b yet 726525b89263Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 726625b89263Smrg _LT_LINKER_OPTION([if $CC understands -b], 726725b89263Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 726825b89263Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 726925b89263Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 727025b89263Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 727125b89263Smrg ;; 727225b89263Smrg esac 727325b89263Smrg fi 727425b89263Smrg if test "$with_gnu_ld" = no; then 727525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 727625b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7277a253d6aeSmrg 727825b89263Smrg case $host_cpu in 727925b89263Smrg hppa*64*|ia64*) 728025b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 728125b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 728225b89263Smrg ;; 728325b89263Smrg *) 728425b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 728525b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 728625b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7287a253d6aeSmrg 728825b89263Smrg # hardcode_minus_L: Not really in the search PATH, 728925b89263Smrg # but as the default location of the library. 729025b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 729125b89263Smrg ;; 729225b89263Smrg esac 729325b89263Smrg fi 729425b89263Smrg ;; 7295a253d6aeSmrg 729625b89263Smrg irix5* | irix6* | nonstopux*) 729725b89263Smrg if test "$GCC" = yes; then 729825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 729925b89263Smrg # Try to use the -exported_symbol ld option, if it does not 730025b89263Smrg # work, assume that -exports_file does not work either and 730125b89263Smrg # implicitly export all symbols. 730225b89263Smrg save_LDFLAGS="$LDFLAGS" 730325b89263Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 730425b89263Smrg AC_LINK_IFELSE(int foo(void) {}, 730525b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 730625b89263Smrg ) 730725b89263Smrg LDFLAGS="$save_LDFLAGS" 730825b89263Smrg else 730925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 731025b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 731125b89263Smrg fi 731225b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 731325b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 731425b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 731525b89263Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 731625b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 731725b89263Smrg ;; 7318a253d6aeSmrg 731925b89263Smrg netbsd*) 732025b89263Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 732125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 732225b89263Smrg else 732325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 732425b89263Smrg fi 732525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 732625b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 732725b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 732825b89263Smrg ;; 7329a253d6aeSmrg 733025b89263Smrg newsos6) 733125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 733225b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 733325b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 733425b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 733525b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 733625b89263Smrg ;; 7337a253d6aeSmrg 733825b89263Smrg *nto* | *qnx*) 733925b89263Smrg ;; 7340a253d6aeSmrg 734125b89263Smrg openbsd*) 734225b89263Smrg if test -f /usr/libexec/ld.so; then 734325b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 734425b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 734525b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 734625b89263Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 734725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 734825b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 734925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 735025b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 735125b89263Smrg else 735225b89263Smrg case $host_os in 735325b89263Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 735425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 735525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 735625b89263Smrg ;; 735725b89263Smrg *) 735825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 735925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 736025b89263Smrg ;; 736125b89263Smrg esac 7362ea133fd7Smrg fi 736325b89263Smrg else 736425b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 736525b89263Smrg fi 736625b89263Smrg ;; 7367ea133fd7Smrg 736825b89263Smrg os2*) 736925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 737025b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 737125b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 737225b89263Smrg _LT_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' 737325b89263Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 737425b89263Smrg ;; 7375ea133fd7Smrg 737625b89263Smrg osf3*) 737725b89263Smrg if test "$GCC" = yes; then 737825b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 737925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 738025b89263Smrg else 738125b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 738225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 738325b89263Smrg fi 738425b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 738525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 738625b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 738725b89263Smrg ;; 7388ea133fd7Smrg 738925b89263Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 739025b89263Smrg if test "$GCC" = yes; then 739125b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 739225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 739325b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 739425b89263Smrg else 739525b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 739625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 739725b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ 739825b89263Smrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 7399ea133fd7Smrg 740025b89263Smrg # Both c and cxx compiler support -rpath directly 740125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 740225b89263Smrg fi 740325b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 740425b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 740525b89263Smrg ;; 7406ea133fd7Smrg 740725b89263Smrg solaris*) 740825b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 740925b89263Smrg if test "$GCC" = yes; then 741025b89263Smrg wlarc='${wl}' 741125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 741225b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 741325b89263Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 741425b89263Smrg else 741525b89263Smrg case `$CC -V 2>&1` in 741625b89263Smrg *"Compilers 5.0"*) 741725b89263Smrg wlarc='' 741825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 741925b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 742025b89263Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 742125b89263Smrg ;; 742225b89263Smrg *) 742325b89263Smrg wlarc='${wl}' 742425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 742525b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 742625b89263Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 742725b89263Smrg ;; 742825b89263Smrg esac 742925b89263Smrg fi 743025b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 743125b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 743225b89263Smrg case $host_os in 743325b89263Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 743425b89263Smrg *) 743525b89263Smrg # The compiler driver will combine and reorder linker options, 743625b89263Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 743725b89263Smrg # but is careful enough not to reorder. 743825b89263Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 743925b89263Smrg if test "$GCC" = yes; then 744025b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 744125b89263Smrg else 744225b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 744325b89263Smrg fi 744425b89263Smrg ;; 744525b89263Smrg esac 744625b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 744725b89263Smrg ;; 7448a253d6aeSmrg 744925b89263Smrg sunos4*) 745025b89263Smrg if test "x$host_vendor" = xsequent; then 745125b89263Smrg # Use $CC to link under sequent, because it throws in some extra .o 745225b89263Smrg # files that make .init and .fini sections work. 745325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 745425b89263Smrg else 745525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 745625b89263Smrg fi 745725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 745825b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 745925b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 746025b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 746125b89263Smrg ;; 7462a253d6aeSmrg 746325b89263Smrg sysv4) 746425b89263Smrg case $host_vendor in 746525b89263Smrg sni) 746625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 746725b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 746825b89263Smrg ;; 746925b89263Smrg siemens) 747025b89263Smrg ## LD is ld it makes a PLAMLIB 747125b89263Smrg ## CC just makes a GrossModule. 747225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 747325b89263Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 747425b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 747525b89263Smrg ;; 747625b89263Smrg motorola) 747725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 747825b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 747925b89263Smrg ;; 748025b89263Smrg esac 748125b89263Smrg runpath_var='LD_RUN_PATH' 748225b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 748325b89263Smrg ;; 7484a253d6aeSmrg 748525b89263Smrg sysv4.3*) 748625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 748725b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 748825b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 748925b89263Smrg ;; 7490a253d6aeSmrg 749125b89263Smrg sysv4*MP*) 749225b89263Smrg if test -d /usr/nec; then 749325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 749425b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 749525b89263Smrg runpath_var=LD_RUN_PATH 749625b89263Smrg hardcode_runpath_var=yes 749725b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 749825b89263Smrg fi 749925b89263Smrg ;; 7500ea133fd7Smrg 750125b89263Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 750225b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 750325b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 750425b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 750525b89263Smrg runpath_var='LD_RUN_PATH' 7506a253d6aeSmrg 750725b89263Smrg if test "$GCC" = yes; then 750825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 750925b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 751025b89263Smrg else 751125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 751225b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 751325b89263Smrg fi 751425b89263Smrg ;; 7515a253d6aeSmrg 751625b89263Smrg sysv5* | sco3.2v5* | sco5v6*) 751725b89263Smrg # Note: We can NOT use -z defs as we might desire, because we do not 751825b89263Smrg # link with -lc, and that would cause any symbols used from libc to 751925b89263Smrg # always be unresolved, which means just about no library would 752025b89263Smrg # ever link correctly. If we're not using GNU ld we use -z text 752125b89263Smrg # though, which does catch some bad symbols but isn't as heavy-handed 752225b89263Smrg # as -z defs. 752325b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 752425b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 752525b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 752625b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 752725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 752825b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 752925b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 753025b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 753125b89263Smrg runpath_var='LD_RUN_PATH' 7532a253d6aeSmrg 753325b89263Smrg if test "$GCC" = yes; then 753425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 753525b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 753625b89263Smrg else 753725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 753825b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 753925b89263Smrg fi 754025b89263Smrg ;; 7541a253d6aeSmrg 754225b89263Smrg uts4*) 754325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 754425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 754525b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 754625b89263Smrg ;; 7547a253d6aeSmrg 754825b89263Smrg *) 754925b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 755025b89263Smrg ;; 755125b89263Smrg esac 7552ea133fd7Smrg 755325b89263Smrg if test x$host_vendor = xsni; then 755425b89263Smrg case $host in 755525b89263Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 755625b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 755725b89263Smrg ;; 755825b89263Smrg esac 755925b89263Smrg fi 756025b89263Smrg fi 756125b89263Smrg]) 756225b89263SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 756325b89263Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7564ea133fd7Smrg 756525b89263Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 7566ea133fd7Smrg 756725b89263Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 756825b89263Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 756925b89263Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 757025b89263Smrg [The commands to extract the exported symbol list from a shared archive]) 7571ea133fd7Smrg 757225b89263Smrg# 757325b89263Smrg# Do we need to explicitly link libc? 757425b89263Smrg# 757525b89263Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 757625b89263Smrgx|xyes) 757725b89263Smrg # Assume -lc should be added 757825b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7579a253d6aeSmrg 758025b89263Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 758125b89263Smrg case $_LT_TAGVAR(archive_cmds, $1) in 758225b89263Smrg *'~'*) 758325b89263Smrg # FIXME: we may have to deal with multi-command sequences. 758425b89263Smrg ;; 758525b89263Smrg '$CC '*) 758625b89263Smrg # Test whether the compiler implicitly links with -lc since on some 758725b89263Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 758825b89263Smrg # to ld, don't add -lc before -lgcc. 758925b89263Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 759025b89263Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 759125b89263Smrg [$RM conftest* 759225b89263Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 759325b89263Smrg 759425b89263Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 759525b89263Smrg soname=conftest 759625b89263Smrg lib=conftest 759725b89263Smrg libobjs=conftest.$ac_objext 759825b89263Smrg deplibs= 759925b89263Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 760025b89263Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 760125b89263Smrg compiler_flags=-v 760225b89263Smrg linker_flags=-v 760325b89263Smrg verstring= 760425b89263Smrg output_objdir=. 760525b89263Smrg libname=conftest 760625b89263Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 760725b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 760825b89263Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 760925b89263Smrg then 761025b89263Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 761125b89263Smrg else 761225b89263Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 761325b89263Smrg fi 761425b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 761525b89263Smrg else 761625b89263Smrg cat conftest.err 1>&5 761725b89263Smrg fi 761825b89263Smrg $RM conftest* 761925b89263Smrg ]) 762025b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 762125b89263Smrg ;; 762225b89263Smrg esac 762325b89263Smrg fi 762425b89263Smrg ;; 762525b89263Smrgesac 7626a253d6aeSmrg 762725b89263Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 762825b89263Smrg [Whether or not to add -lc for building shared libraries]) 762925b89263Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 763025b89263Smrg [enable_shared_with_static_runtimes], [0], 763125b89263Smrg [Whether or not to disallow shared libs when runtime libs are static]) 763225b89263Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 763325b89263Smrg [Compiler flag to allow reflexive dlopens]) 763425b89263Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 763525b89263Smrg [Compiler flag to generate shared objects directly from archives]) 763625b89263Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 763725b89263Smrg [Whether the compiler copes with passing no objects directly]) 763825b89263Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 763925b89263Smrg [Create an old-style archive from a shared archive]) 764025b89263Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 764125b89263Smrg [Create a temporary old-style archive to link instead of a shared archive]) 764225b89263Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 764325b89263Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 764425b89263Smrg_LT_TAGDECL([], [module_cmds], [2], 764525b89263Smrg [Commands used to build a loadable module if different from building 764625b89263Smrg a shared archive.]) 764725b89263Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 764825b89263Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 764925b89263Smrg [Whether we are building with GNU ld or not]) 765025b89263Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 765125b89263Smrg [Flag that allows shared libraries with undefined symbols to be built]) 765225b89263Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 765325b89263Smrg [Flag that enforces no undefined symbols]) 765425b89263Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 765525b89263Smrg [Flag to hardcode $libdir into a binary during linking. 765625b89263Smrg This must work even if $libdir does not exist]) 765725b89263Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 765825b89263Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 765925b89263Smrg during linking. This must work even if $libdir does not exist]]) 766025b89263Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 766125b89263Smrg [Whether we need a single "-rpath" flag with a separated argument]) 766225b89263Smrg_LT_TAGDECL([], [hardcode_direct], [0], 766325b89263Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 766425b89263Smrg DIR into the resulting binary]) 766525b89263Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 766625b89263Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 766725b89263Smrg DIR into the resulting binary and the resulting library dependency is 766825b89263Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 766925b89263Smrg library is relocated]) 767025b89263Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 767125b89263Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 767225b89263Smrg into the resulting binary]) 767325b89263Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 767425b89263Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 767525b89263Smrg into the resulting binary]) 767625b89263Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 767725b89263Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 767825b89263Smrg into the library and all subsequent libraries and executables linked 767925b89263Smrg against it]) 768025b89263Smrg_LT_TAGDECL([], [inherit_rpath], [0], 768125b89263Smrg [Set to yes if linker adds runtime paths of dependent libraries 768225b89263Smrg to runtime path list]) 768325b89263Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 768425b89263Smrg [Whether libtool must link a program against all its dependency libraries]) 768525b89263Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 768625b89263Smrg [Fix the shell variable $srcfile for the compiler]) 768725b89263Smrg_LT_TAGDECL([], [always_export_symbols], [0], 768825b89263Smrg [Set to "yes" if exported symbols are required]) 768925b89263Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 769025b89263Smrg [The commands to list exported symbols]) 769125b89263Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 769225b89263Smrg [Symbols that should not be listed in the preloaded symbols]) 769325b89263Smrg_LT_TAGDECL([], [include_expsyms], [1], 769425b89263Smrg [Symbols that must always be exported]) 769525b89263Smrg_LT_TAGDECL([], [prelink_cmds], [2], 769625b89263Smrg [Commands necessary for linking programs (against libraries) with templates]) 769725b89263Smrg_LT_TAGDECL([], [file_list_spec], [1], 769825b89263Smrg [Specify filename containing input files]) 769925b89263Smrgdnl FIXME: Not yet implemented 770025b89263Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 770125b89263Smrgdnl [Compiler flag to generate thread safe objects]) 770225b89263Smrg])# _LT_LINKER_SHLIBS 7703a253d6aeSmrg 7704a253d6aeSmrg 770525b89263Smrg# _LT_LANG_C_CONFIG([TAG]) 770625b89263Smrg# ------------------------ 770725b89263Smrg# Ensure that the configuration variables for a C compiler are suitably 770825b89263Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 770925b89263Smrg# the compiler configuration to `libtool'. 771025b89263Smrgm4_defun([_LT_LANG_C_CONFIG], 771125b89263Smrg[m4_require([_LT_DECL_EGREP])dnl 771225b89263Smrglt_save_CC="$CC" 771325b89263SmrgAC_LANG_PUSH(C) 7714a253d6aeSmrg 771525b89263Smrg# Source file extension for C test sources. 771625b89263Smrgac_ext=c 7717a253d6aeSmrg 771825b89263Smrg# Object file extension for compiled C test sources. 7719ea133fd7Smrgobjext=o 7720ea133fd7Smrg_LT_TAGVAR(objext, $1)=$objext 7721a253d6aeSmrg 7722ea133fd7Smrg# Code to be used in simple compile tests 772325b89263Smrglt_simple_compile_test_code="int some_variable = 0;" 7724a253d6aeSmrg 7725ea133fd7Smrg# Code to be used in simple link tests 772625b89263Smrglt_simple_link_test_code='int main(){return(0);}' 7727a253d6aeSmrg 7728ea133fd7Smrg_LT_TAG_COMPILER 772925b89263Smrg# Save the default compiler, since it gets overwritten when the other 773025b89263Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 773125b89263Smrgcompiler_DEFAULT=$CC 7732a253d6aeSmrg 7733ea133fd7Smrg# save warnings/boilerplate of simple test code 7734ea133fd7Smrg_LT_COMPILER_BOILERPLATE 7735ea133fd7Smrg_LT_LINKER_BOILERPLATE 7736a253d6aeSmrg 7737ea133fd7Smrgif test -n "$compiler"; then 773825b89263Smrg _LT_COMPILER_NO_RTTI($1) 773925b89263Smrg _LT_COMPILER_PIC($1) 774025b89263Smrg _LT_COMPILER_C_O($1) 774125b89263Smrg _LT_COMPILER_FILE_LOCKS($1) 774225b89263Smrg _LT_LINKER_SHLIBS($1) 774325b89263Smrg _LT_SYS_DYNAMIC_LINKER($1) 774425b89263Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 774525b89263Smrg LT_SYS_DLOPEN_SELF 774625b89263Smrg _LT_CMD_STRIPLIB 7747ea133fd7Smrg 774825b89263Smrg # Report which library types will actually be built 774925b89263Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 775025b89263Smrg AC_MSG_RESULT([$can_build_shared]) 7751ea133fd7Smrg 775225b89263Smrg AC_MSG_CHECKING([whether to build shared libraries]) 775325b89263Smrg test "$can_build_shared" = "no" && enable_shared=no 7754ea133fd7Smrg 775525b89263Smrg # On AIX, shared libraries and static libraries use the same namespace, and 775625b89263Smrg # are all built from PIC. 775725b89263Smrg case $host_os in 775825b89263Smrg aix3*) 775925b89263Smrg test "$enable_shared" = yes && enable_static=no 776025b89263Smrg if test -n "$RANLIB"; then 776125b89263Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 776225b89263Smrg postinstall_cmds='$RANLIB $lib' 776325b89263Smrg fi 776425b89263Smrg ;; 7765ea133fd7Smrg 776625b89263Smrg aix[[4-9]]*) 776725b89263Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 776825b89263Smrg test "$enable_shared" = yes && enable_static=no 776925b89263Smrg fi 777025b89263Smrg ;; 7771ea133fd7Smrg esac 777225b89263Smrg AC_MSG_RESULT([$enable_shared]) 7773ea133fd7Smrg 777425b89263Smrg AC_MSG_CHECKING([whether to build static libraries]) 777525b89263Smrg # Make sure either enable_shared or enable_static is yes. 777625b89263Smrg test "$enable_shared" = yes || enable_static=yes 777725b89263Smrg AC_MSG_RESULT([$enable_static]) 7778ea133fd7Smrg 777925b89263Smrg _LT_CONFIG($1) 778025b89263Smrgfi 778125b89263SmrgAC_LANG_POP 778225b89263SmrgCC="$lt_save_CC" 778325b89263Smrg])# _LT_LANG_C_CONFIG 7784ea133fd7Smrg 7785ea133fd7Smrg 778625b89263Smrg# _LT_LANG_CXX_CONFIG([TAG]) 778725b89263Smrg# -------------------------- 778825b89263Smrg# Ensure that the configuration variables for a C++ compiler are suitably 778925b89263Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 779025b89263Smrg# the compiler configuration to `libtool'. 779125b89263Smrgm4_defun([_LT_LANG_CXX_CONFIG], 779225b89263Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 779325b89263Smrgm4_require([_LT_DECL_EGREP])dnl 779425b89263Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 779525b89263Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 779625b89263Smrg (test "X$CXX" != "Xg++"))) ; then 779725b89263Smrg AC_PROG_CXXCPP 779825b89263Smrgelse 779925b89263Smrg _lt_caught_CXX_error=yes 780025b89263Smrgfi 7801ea133fd7Smrg 780225b89263SmrgAC_LANG_PUSH(C++) 780325b89263Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 780425b89263Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 780525b89263Smrg_LT_TAGVAR(always_export_symbols, $1)=no 780625b89263Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 780725b89263Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 780825b89263Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 780925b89263Smrg_LT_TAGVAR(hardcode_direct, $1)=no 781025b89263Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 781125b89263Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 781225b89263Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 781325b89263Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 781425b89263Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 781525b89263Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 781625b89263Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 781725b89263Smrg_LT_TAGVAR(inherit_rpath, $1)=no 781825b89263Smrg_LT_TAGVAR(module_cmds, $1)= 781925b89263Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 782025b89263Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 782125b89263Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 782225b89263Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 782325b89263Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 782425b89263Smrg_LT_TAGVAR(no_undefined_flag, $1)= 782525b89263Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 782625b89263Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7827ea133fd7Smrg 782825b89263Smrg# Source file extension for C++ test sources. 782925b89263Smrgac_ext=cpp 7830ea133fd7Smrg 783125b89263Smrg# Object file extension for compiled C++ test sources. 783225b89263Smrgobjext=o 783325b89263Smrg_LT_TAGVAR(objext, $1)=$objext 7834ea133fd7Smrg 783525b89263Smrg# No sense in running all these tests if we already determined that 783625b89263Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 783725b89263Smrg# are currently assumed to apply to all compilers on this platform, 783825b89263Smrg# and will be corrupted by setting them based on a non-working compiler. 783925b89263Smrgif test "$_lt_caught_CXX_error" != yes; then 784025b89263Smrg # Code to be used in simple compile tests 784125b89263Smrg lt_simple_compile_test_code="int some_variable = 0;" 7842ea133fd7Smrg 784325b89263Smrg # Code to be used in simple link tests 784425b89263Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7845ea133fd7Smrg 784625b89263Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 784725b89263Smrg _LT_TAG_COMPILER 7848ea133fd7Smrg 784925b89263Smrg # save warnings/boilerplate of simple test code 785025b89263Smrg _LT_COMPILER_BOILERPLATE 785125b89263Smrg _LT_LINKER_BOILERPLATE 7852ea133fd7Smrg 785325b89263Smrg # Allow CC to be a program name with arguments. 785425b89263Smrg lt_save_CC=$CC 785525b89263Smrg lt_save_LD=$LD 785625b89263Smrg lt_save_GCC=$GCC 785725b89263Smrg GCC=$GXX 785825b89263Smrg lt_save_with_gnu_ld=$with_gnu_ld 785925b89263Smrg lt_save_path_LD=$lt_cv_path_LD 786025b89263Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 786125b89263Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 786225b89263Smrg else 786325b89263Smrg $as_unset lt_cv_prog_gnu_ld 786425b89263Smrg fi 786525b89263Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 786625b89263Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 786725b89263Smrg else 786825b89263Smrg $as_unset lt_cv_path_LD 786925b89263Smrg fi 787025b89263Smrg test -z "${LDCXX+set}" || LD=$LDCXX 787125b89263Smrg CC=${CXX-"c++"} 787225b89263Smrg compiler=$CC 787325b89263Smrg _LT_TAGVAR(compiler, $1)=$CC 787425b89263Smrg _LT_CC_BASENAME([$compiler]) 7875ea133fd7Smrg 787625b89263Smrg if test -n "$compiler"; then 787725b89263Smrg # We don't want -fno-exception when compiling C++ code, so set the 787825b89263Smrg # no_builtin_flag separately 787925b89263Smrg if test "$GXX" = yes; then 788025b89263Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 788125b89263Smrg else 788225b89263Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 788325b89263Smrg fi 7884ea133fd7Smrg 788525b89263Smrg if test "$GXX" = yes; then 788625b89263Smrg # Set up default GNU C++ configuration 7887ea133fd7Smrg 788825b89263Smrg LT_PATH_LD 7889ea133fd7Smrg 789025b89263Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 789125b89263Smrg # archiving commands below assume that GNU ld is being used. 789225b89263Smrg if test "$with_gnu_ld" = yes; then 789325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 789425b89263Smrg _LT_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' 7895ea133fd7Smrg 789625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 789725b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7898ea133fd7Smrg 789925b89263Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 790025b89263Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 790125b89263Smrg # investigate it a little bit more. (MM) 790225b89263Smrg wlarc='${wl}' 7903ea133fd7Smrg 790425b89263Smrg # ancient GNU ld didn't support --whole-archive et. al. 790525b89263Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 790625b89263Smrg $GREP 'no-whole-archive' > /dev/null; then 790725b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 790825b89263Smrg else 790925b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 791025b89263Smrg fi 791125b89263Smrg else 791225b89263Smrg with_gnu_ld=no 791325b89263Smrg wlarc= 7914ea133fd7Smrg 791525b89263Smrg # A generic and very simple default shared library creation 791625b89263Smrg # command for GNU C++ for the case where it uses the native 791725b89263Smrg # linker, instead of GNU ld. If possible, this setting should 791825b89263Smrg # overridden to take advantage of the native linker features on 791925b89263Smrg # the platform it is being used on. 792025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 792125b89263Smrg fi 7922ea133fd7Smrg 792325b89263Smrg # Commands to make compiler produce verbose output that lists 792425b89263Smrg # what "hidden" libraries, object files and flags are used when 792525b89263Smrg # linking a shared library. 792625b89263Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7927ea133fd7Smrg 792825b89263Smrg else 792925b89263Smrg GXX=no 793025b89263Smrg with_gnu_ld=no 793125b89263Smrg wlarc= 793225b89263Smrg fi 7933ea133fd7Smrg 793425b89263Smrg # PORTME: fill in a description of your system's C++ link characteristics 793525b89263Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 793625b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 793725b89263Smrg case $host_os in 793825b89263Smrg aix3*) 793925b89263Smrg # FIXME: insert proper C++ library support 794025b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 794125b89263Smrg ;; 794225b89263Smrg aix[[4-9]]*) 794325b89263Smrg if test "$host_cpu" = ia64; then 794425b89263Smrg # On IA64, the linker does run time linking by default, so we don't 794525b89263Smrg # have to do anything special. 794625b89263Smrg aix_use_runtimelinking=no 794725b89263Smrg exp_sym_flag='-Bexport' 794825b89263Smrg no_entry_flag="" 794925b89263Smrg else 795025b89263Smrg aix_use_runtimelinking=no 7951ea133fd7Smrg 795225b89263Smrg # Test if we are trying to use run time linking or normal 795325b89263Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 795425b89263Smrg # need to do runtime linking. 795525b89263Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 795625b89263Smrg for ld_flag in $LDFLAGS; do 795725b89263Smrg case $ld_flag in 795825b89263Smrg *-brtl*) 795925b89263Smrg aix_use_runtimelinking=yes 796025b89263Smrg break 796125b89263Smrg ;; 796225b89263Smrg esac 796325b89263Smrg done 796425b89263Smrg ;; 796525b89263Smrg esac 7966ea133fd7Smrg 796725b89263Smrg exp_sym_flag='-bexport' 796825b89263Smrg no_entry_flag='-bnoentry' 796925b89263Smrg fi 7970ea133fd7Smrg 797125b89263Smrg # When large executables or shared objects are built, AIX ld can 797225b89263Smrg # have problems creating the table of contents. If linking a library 797325b89263Smrg # or program results in "error TOC overflow" add -mminimal-toc to 797425b89263Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 797525b89263Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7976ea133fd7Smrg 797725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='' 797825b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 797925b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 798025b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 798125b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 798225b89263Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7983ea133fd7Smrg 798425b89263Smrg if test "$GXX" = yes; then 798525b89263Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 798625b89263Smrg # We only want to do this on AIX 4.2 and lower, the check 798725b89263Smrg # below for broken collect2 doesn't work under 4.3+ 798825b89263Smrg collect2name=`${CC} -print-prog-name=collect2` 798925b89263Smrg if test -f "$collect2name" && 799025b89263Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 799125b89263Smrg then 799225b89263Smrg # We have reworked collect2 799325b89263Smrg : 799425b89263Smrg else 799525b89263Smrg # We have old collect2 799625b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 799725b89263Smrg # It fails to find uninstalled libraries when the uninstalled 799825b89263Smrg # path is not listed in the libpath. Setting hardcode_minus_L 799925b89263Smrg # to unsupported forces relinking 800025b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 800125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 800225b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 800325b89263Smrg fi 800425b89263Smrg esac 800525b89263Smrg shared_flag='-shared' 800625b89263Smrg if test "$aix_use_runtimelinking" = yes; then 800725b89263Smrg shared_flag="$shared_flag "'${wl}-G' 800825b89263Smrg fi 800925b89263Smrg else 801025b89263Smrg # not using gcc 801125b89263Smrg if test "$host_cpu" = ia64; then 801225b89263Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 801325b89263Smrg # chokes on -Wl,-G. The following line is correct: 801425b89263Smrg shared_flag='-G' 801525b89263Smrg else 801625b89263Smrg if test "$aix_use_runtimelinking" = yes; then 801725b89263Smrg shared_flag='${wl}-G' 801825b89263Smrg else 801925b89263Smrg shared_flag='${wl}-bM:SRE' 802025b89263Smrg fi 802125b89263Smrg fi 802225b89263Smrg fi 8023ea133fd7Smrg 802425b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 802525b89263Smrg # It seems that -bexpall does not export symbols beginning with 802625b89263Smrg # underscore (_), so it is better to generate a list of symbols to 802725b89263Smrg # export. 802825b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 802925b89263Smrg if test "$aix_use_runtimelinking" = yes; then 803025b89263Smrg # Warning - without using the other runtime loading flags (-brtl), 803125b89263Smrg # -berok will link without error, but may produce a broken library. 803225b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 803325b89263Smrg # Determine the default libpath from the value encoded in an empty 803425b89263Smrg # executable. 803525b89263Smrg _LT_SYS_MODULE_PATH_AIX 803625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8037ea133fd7Smrg 803825b89263Smrg _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 803925b89263Smrg else 804025b89263Smrg if test "$host_cpu" = ia64; then 804125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 804225b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 804325b89263Smrg _LT_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" 804425b89263Smrg else 804525b89263Smrg # Determine the default libpath from the value encoded in an 804625b89263Smrg # empty executable. 804725b89263Smrg _LT_SYS_MODULE_PATH_AIX 804825b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 804925b89263Smrg # Warning - without using the other run time loading flags, 805025b89263Smrg # -berok will link without error, but may produce a broken library. 805125b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 805225b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 805325b89263Smrg if test "$with_gnu_ld" = yes; then 805425b89263Smrg # We only use this code for GNU lds that support --whole-archive. 805525b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 805625b89263Smrg else 805725b89263Smrg # Exported symbols can be pulled into shared objects from archives 805825b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 805925b89263Smrg fi 806025b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 806125b89263Smrg # This is similar to how AIX traditionally builds its shared 806225b89263Smrg # libraries. 806325b89263Smrg _LT_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' 806425b89263Smrg fi 806525b89263Smrg fi 806625b89263Smrg ;; 8067ea133fd7Smrg 806825b89263Smrg beos*) 806925b89263Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 807025b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 807125b89263Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 807225b89263Smrg # support --undefined. This deserves some investigation. FIXME 807325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 807425b89263Smrg else 807525b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 807625b89263Smrg fi 807725b89263Smrg ;; 8078ea133fd7Smrg 807925b89263Smrg chorus*) 808025b89263Smrg case $cc_basename in 808125b89263Smrg *) 808225b89263Smrg # FIXME: insert proper C++ library support 808325b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 808425b89263Smrg ;; 808525b89263Smrg esac 808625b89263Smrg ;; 8087ea133fd7Smrg 808825b89263Smrg cygwin* | mingw* | pw32* | cegcc*) 808925b89263Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 809025b89263Smrg # as there is no search path for DLLs. 809125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 809225b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 809325b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 809425b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=no 809525b89263Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8096ea133fd7Smrg 809725b89263Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 809825b89263Smrg _LT_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' 809925b89263Smrg # If the export-symbols file already is a .def file (1st line 810025b89263Smrg # is EXPORTS), use it as is; otherwise, prepend... 810125b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 810225b89263Smrg cp $export_symbols $output_objdir/$soname.def; 810325b89263Smrg else 810425b89263Smrg echo EXPORTS > $output_objdir/$soname.def; 810525b89263Smrg cat $export_symbols >> $output_objdir/$soname.def; 810625b89263Smrg fi~ 810725b89263Smrg $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' 810825b89263Smrg else 810925b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 811025b89263Smrg fi 811125b89263Smrg ;; 811225b89263Smrg darwin* | rhapsody*) 811325b89263Smrg _LT_DARWIN_LINKER_FEATURES($1) 811425b89263Smrg ;; 8115ea133fd7Smrg 811625b89263Smrg dgux*) 811725b89263Smrg case $cc_basename in 811825b89263Smrg ec++*) 811925b89263Smrg # FIXME: insert proper C++ library support 812025b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 812125b89263Smrg ;; 812225b89263Smrg ghcx*) 812325b89263Smrg # Green Hills C++ Compiler 812425b89263Smrg # FIXME: insert proper C++ library support 812525b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 812625b89263Smrg ;; 812725b89263Smrg *) 812825b89263Smrg # FIXME: insert proper C++ library support 812925b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 813025b89263Smrg ;; 813125b89263Smrg esac 813225b89263Smrg ;; 8133ea133fd7Smrg 813425b89263Smrg freebsd[[12]]*) 813525b89263Smrg # C++ shared libraries reported to be fairly broken before 813625b89263Smrg # switch to ELF 813725b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 813825b89263Smrg ;; 8139ea133fd7Smrg 814025b89263Smrg freebsd-elf*) 814125b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 814225b89263Smrg ;; 8143ea133fd7Smrg 814425b89263Smrg freebsd* | dragonfly*) 814525b89263Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 814625b89263Smrg # conventions 814725b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 814825b89263Smrg ;; 8149ea133fd7Smrg 815025b89263Smrg gnu*) 815125b89263Smrg ;; 8152ea133fd7Smrg 815325b89263Smrg haiku*) 815425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 815525b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 815625b89263Smrg ;; 8157ea133fd7Smrg 815825b89263Smrg hpux9*) 815925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 816025b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 816125b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 816225b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 816325b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 816425b89263Smrg # but as the default 816525b89263Smrg # location of the library. 8166ea133fd7Smrg 816725b89263Smrg case $cc_basename in 816825b89263Smrg CC*) 816925b89263Smrg # FIXME: insert proper C++ library support 817025b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 817125b89263Smrg ;; 817225b89263Smrg aCC*) 817325b89263Smrg _LT_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' 817425b89263Smrg # Commands to make compiler produce verbose output that lists 817525b89263Smrg # what "hidden" libraries, object files and flags are used when 817625b89263Smrg # linking a shared library. 817725b89263Smrg # 817825b89263Smrg # There doesn't appear to be a way to prevent this compiler from 817925b89263Smrg # explicitly linking system object files so we need to strip them 818025b89263Smrg # from the output so that they don't get included in the library 818125b89263Smrg # dependencies. 818225b89263Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 818325b89263Smrg ;; 818425b89263Smrg *) 818525b89263Smrg if test "$GXX" = yes; then 818625b89263Smrg _LT_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' 818725b89263Smrg else 818825b89263Smrg # FIXME: insert proper C++ library support 818925b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 819025b89263Smrg fi 819125b89263Smrg ;; 819225b89263Smrg esac 819325b89263Smrg ;; 8194ea133fd7Smrg 819525b89263Smrg hpux10*|hpux11*) 819625b89263Smrg if test $with_gnu_ld = no; then 819725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 819825b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8199ea133fd7Smrg 820025b89263Smrg case $host_cpu in 820125b89263Smrg hppa*64*|ia64*) 820225b89263Smrg ;; 820325b89263Smrg *) 820425b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 820525b89263Smrg ;; 820625b89263Smrg esac 820725b89263Smrg fi 820825b89263Smrg case $host_cpu in 820925b89263Smrg hppa*64*|ia64*) 821025b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 821125b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 821225b89263Smrg ;; 821325b89263Smrg *) 821425b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 821525b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 821625b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 821725b89263Smrg # but as the default 821825b89263Smrg # location of the library. 821925b89263Smrg ;; 822025b89263Smrg esac 8221ea133fd7Smrg 822225b89263Smrg case $cc_basename in 822325b89263Smrg CC*) 822425b89263Smrg # FIXME: insert proper C++ library support 822525b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 822625b89263Smrg ;; 822725b89263Smrg aCC*) 822825b89263Smrg case $host_cpu in 822925b89263Smrg hppa*64*) 823025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 823125b89263Smrg ;; 823225b89263Smrg ia64*) 823325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 823425b89263Smrg ;; 823525b89263Smrg *) 823625b89263Smrg _LT_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' 823725b89263Smrg ;; 823825b89263Smrg esac 823925b89263Smrg # Commands to make compiler produce verbose output that lists 824025b89263Smrg # what "hidden" libraries, object files and flags are used when 824125b89263Smrg # linking a shared library. 824225b89263Smrg # 824325b89263Smrg # There doesn't appear to be a way to prevent this compiler from 824425b89263Smrg # explicitly linking system object files so we need to strip them 824525b89263Smrg # from the output so that they don't get included in the library 824625b89263Smrg # dependencies. 824725b89263Smrg 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; func_echo_all "$list"' 824825b89263Smrg ;; 824925b89263Smrg *) 825025b89263Smrg if test "$GXX" = yes; then 825125b89263Smrg if test $with_gnu_ld = no; then 825225b89263Smrg case $host_cpu in 825325b89263Smrg hppa*64*) 825425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 825525b89263Smrg ;; 825625b89263Smrg ia64*) 825725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 825825b89263Smrg ;; 825925b89263Smrg *) 826025b89263Smrg _LT_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' 826125b89263Smrg ;; 826225b89263Smrg esac 826325b89263Smrg fi 826425b89263Smrg else 826525b89263Smrg # FIXME: insert proper C++ library support 826625b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 826725b89263Smrg fi 826825b89263Smrg ;; 826925b89263Smrg esac 827025b89263Smrg ;; 8271ea133fd7Smrg 827225b89263Smrg interix[[3-9]]*) 827325b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 827425b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 827525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 827625b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 827725b89263Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 827825b89263Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 827925b89263Smrg # default) and relocated if they conflict, which is a slow very memory 828025b89263Smrg # consuming and fragmenting process. To avoid this, we pick a random, 828125b89263Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 828225b89263Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 828325b89263Smrg _LT_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' 828425b89263Smrg _LT_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' 828525b89263Smrg ;; 828625b89263Smrg irix5* | irix6*) 828725b89263Smrg case $cc_basename in 828825b89263Smrg CC*) 828925b89263Smrg # SGI C++ 829025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 8291ea133fd7Smrg 829225b89263Smrg # Archives containing C++ object files must be created using 829325b89263Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 829425b89263Smrg # necessary to make sure instantiated templates are included 829525b89263Smrg # in the archive. 829625b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 829725b89263Smrg ;; 829825b89263Smrg *) 829925b89263Smrg if test "$GXX" = yes; then 830025b89263Smrg if test "$with_gnu_ld" = no; then 830125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 830225b89263Smrg else 830325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 830425b89263Smrg fi 830525b89263Smrg fi 830625b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 830725b89263Smrg ;; 830825b89263Smrg esac 830925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 831025b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 831125b89263Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 831225b89263Smrg ;; 8313ea133fd7Smrg 831425b89263Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 831525b89263Smrg case $cc_basename in 831625b89263Smrg KCC*) 831725b89263Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8318ea133fd7Smrg 831925b89263Smrg # KCC will only create a shared library if the output file 832025b89263Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 832125b89263Smrg # to its proper name (with version) after linking. 832225b89263Smrg _LT_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' 832325b89263Smrg _LT_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' 832425b89263Smrg # Commands to make compiler produce verbose output that lists 832525b89263Smrg # what "hidden" libraries, object files and flags are used when 832625b89263Smrg # linking a shared library. 832725b89263Smrg # 832825b89263Smrg # There doesn't appear to be a way to prevent this compiler from 832925b89263Smrg # explicitly linking system object files so we need to strip them 833025b89263Smrg # from the output so that they don't get included in the library 833125b89263Smrg # dependencies. 833225b89263Smrg 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; func_echo_all "$list"' 8333ea133fd7Smrg 833425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 833525b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8336ea133fd7Smrg 833725b89263Smrg # Archives containing C++ object files must be created using 833825b89263Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 833925b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 834025b89263Smrg ;; 834125b89263Smrg icpc* | ecpc* ) 834225b89263Smrg # Intel C++ 834325b89263Smrg with_gnu_ld=yes 834425b89263Smrg # version 8.0 and above of icpc choke on multiply defined symbols 834525b89263Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 834625b89263Smrg # earlier do not add the objects themselves. 834725b89263Smrg case `$CC -V 2>&1` in 834825b89263Smrg *"Version 7."*) 834925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 835025b89263Smrg _LT_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' 835125b89263Smrg ;; 835225b89263Smrg *) # Version 8.0 or newer 835325b89263Smrg tmp_idyn= 835425b89263Smrg case $host_cpu in 835525b89263Smrg ia64*) tmp_idyn=' -i_dynamic';; 835625b89263Smrg esac 835725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 835825b89263Smrg _LT_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' 835925b89263Smrg ;; 836025b89263Smrg esac 836125b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 836225b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 836325b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 836425b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 836525b89263Smrg ;; 836625b89263Smrg pgCC* | pgcpp*) 836725b89263Smrg # Portland Group C++ compiler 836825b89263Smrg case `$CC -V` in 836925b89263Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 837025b89263Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 837125b89263Smrg rm -rf $tpldir~ 837225b89263Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 837325b89263Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 837425b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 837525b89263Smrg rm -rf $tpldir~ 837625b89263Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 837725b89263Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 837825b89263Smrg $RANLIB $oldlib' 837925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 838025b89263Smrg rm -rf $tpldir~ 838125b89263Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 838225b89263Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 838325b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 838425b89263Smrg rm -rf $tpldir~ 838525b89263Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 838625b89263Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 838725b89263Smrg ;; 838825b89263Smrg *) # Version 6 and above use weak symbols 838925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 839025b89263Smrg _LT_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' 839125b89263Smrg ;; 839225b89263Smrg esac 8393ea133fd7Smrg 839425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 839525b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 839625b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 839725b89263Smrg ;; 839825b89263Smrg cxx*) 839925b89263Smrg # Compaq C++ 840025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 840125b89263Smrg _LT_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' 8402ea133fd7Smrg 840325b89263Smrg runpath_var=LD_RUN_PATH 840425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 840525b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8406ea133fd7Smrg 840725b89263Smrg # Commands to make compiler produce verbose output that lists 840825b89263Smrg # what "hidden" libraries, object files and flags are used when 840925b89263Smrg # linking a shared library. 841025b89263Smrg # 841125b89263Smrg # There doesn't appear to be a way to prevent this compiler from 841225b89263Smrg # explicitly linking system object files so we need to strip them 841325b89263Smrg # from the output so that they don't get included in the library 841425b89263Smrg # dependencies. 841525b89263Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed' 841625b89263Smrg ;; 841725b89263Smrg xl* | mpixl* | bgxl*) 841825b89263Smrg # IBM XL 8.0 on PPC, with GNU ld 841925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 842025b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 842125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 842225b89263Smrg if test "x$supports_anon_versioning" = xyes; then 842325b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 842425b89263Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 842525b89263Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 842625b89263Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 842725b89263Smrg fi 842825b89263Smrg ;; 842925b89263Smrg *) 843025b89263Smrg case `$CC -V 2>&1 | sed 5q` in 843125b89263Smrg *Sun\ C*) 843225b89263Smrg # Sun C++ 5.9 843325b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 843425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 843525b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' 843625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 843725b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 843825b89263Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8439ea133fd7Smrg 844025b89263Smrg # Not sure whether something based on 844125b89263Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 844225b89263Smrg # would be better. 844325b89263Smrg output_verbose_link_cmd='func_echo_all' 8444ea133fd7Smrg 844525b89263Smrg # Archives containing C++ object files must be created using 844625b89263Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 844725b89263Smrg # necessary to make sure instantiated templates are included 844825b89263Smrg # in the archive. 844925b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 845025b89263Smrg ;; 845125b89263Smrg esac 845225b89263Smrg ;; 845325b89263Smrg esac 845425b89263Smrg ;; 8455ea133fd7Smrg 845625b89263Smrg lynxos*) 845725b89263Smrg # FIXME: insert proper C++ library support 845825b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 845925b89263Smrg ;; 8460ea133fd7Smrg 846125b89263Smrg m88k*) 846225b89263Smrg # FIXME: insert proper C++ library support 846325b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 846425b89263Smrg ;; 8465ea133fd7Smrg 846625b89263Smrg mvs*) 846725b89263Smrg case $cc_basename in 846825b89263Smrg cxx*) 846925b89263Smrg # FIXME: insert proper C++ library support 847025b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 847125b89263Smrg ;; 847225b89263Smrg *) 847325b89263Smrg # FIXME: insert proper C++ library support 847425b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 847525b89263Smrg ;; 847625b89263Smrg esac 847725b89263Smrg ;; 8478ea133fd7Smrg 847925b89263Smrg netbsd*) 848025b89263Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 848125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 848225b89263Smrg wlarc= 848325b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 848425b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 848525b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 848625b89263Smrg fi 848725b89263Smrg # Workaround some broken pre-1.5 toolchains 848825b89263Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 848925b89263Smrg ;; 8490ea133fd7Smrg 849125b89263Smrg *nto* | *qnx*) 849225b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 849325b89263Smrg ;; 8494ea133fd7Smrg 849525b89263Smrg openbsd2*) 849625b89263Smrg # C++ shared libraries are fairly broken 849725b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 849825b89263Smrg ;; 8499ea133fd7Smrg 850025b89263Smrg openbsd*) 850125b89263Smrg if test -f /usr/libexec/ld.so; then 850225b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 850325b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 850425b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 850525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 850625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 850725b89263Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 850825b89263Smrg _LT_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' 850925b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 851025b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 851125b89263Smrg fi 851225b89263Smrg output_verbose_link_cmd=func_echo_all 851325b89263Smrg else 851425b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8515ea133fd7Smrg fi 851625b89263Smrg ;; 8517ea133fd7Smrg 851825b89263Smrg osf3* | osf4* | osf5*) 851925b89263Smrg case $cc_basename in 852025b89263Smrg KCC*) 852125b89263Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8522ea133fd7Smrg 852325b89263Smrg # KCC will only create a shared library if the output file 852425b89263Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 852525b89263Smrg # to its proper name (with version) after linking. 852625b89263Smrg _LT_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' 8527ea133fd7Smrg 852825b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 852925b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8530ea133fd7Smrg 853125b89263Smrg # Archives containing C++ object files must be created using 853225b89263Smrg # the KAI C++ compiler. 853325b89263Smrg case $host in 853425b89263Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 853525b89263Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 853625b89263Smrg esac 853725b89263Smrg ;; 853825b89263Smrg RCC*) 853925b89263Smrg # Rational C++ 2.4.1 854025b89263Smrg # FIXME: insert proper C++ library support 854125b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 854225b89263Smrg ;; 854325b89263Smrg cxx*) 854425b89263Smrg case $host in 854525b89263Smrg osf3*) 854625b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 854725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 854825b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 854925b89263Smrg ;; 855025b89263Smrg *) 855125b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 855225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 855325b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 855425b89263Smrg echo "-hidden">> $lib.exp~ 855525b89263Smrg $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~ 855625b89263Smrg $RM $lib.exp' 855725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 855825b89263Smrg ;; 855925b89263Smrg esac 8560ea133fd7Smrg 856125b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8562ea133fd7Smrg 856325b89263Smrg # Commands to make compiler produce verbose output that lists 856425b89263Smrg # what "hidden" libraries, object files and flags are used when 856525b89263Smrg # linking a shared library. 856625b89263Smrg # 856725b89263Smrg # There doesn't appear to be a way to prevent this compiler from 856825b89263Smrg # explicitly linking system object files so we need to strip them 856925b89263Smrg # from the output so that they don't get included in the library 857025b89263Smrg # dependencies. 857125b89263Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"' 857225b89263Smrg ;; 857325b89263Smrg *) 857425b89263Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 857525b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 857625b89263Smrg case $host in 857725b89263Smrg osf3*) 857825b89263Smrg _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 857925b89263Smrg ;; 858025b89263Smrg *) 858125b89263Smrg _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 858225b89263Smrg ;; 858325b89263Smrg esac 8584ea133fd7Smrg 858525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 858625b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8587ea133fd7Smrg 858825b89263Smrg # Commands to make compiler produce verbose output that lists 858925b89263Smrg # what "hidden" libraries, object files and flags are used when 859025b89263Smrg # linking a shared library. 859125b89263Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8592ea133fd7Smrg 859325b89263Smrg else 859425b89263Smrg # FIXME: insert proper C++ library support 859525b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 859625b89263Smrg fi 859725b89263Smrg ;; 859825b89263Smrg esac 859925b89263Smrg ;; 8600ea133fd7Smrg 860125b89263Smrg psos*) 860225b89263Smrg # FIXME: insert proper C++ library support 860325b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 860425b89263Smrg ;; 8605ea133fd7Smrg 860625b89263Smrg sunos4*) 860725b89263Smrg case $cc_basename in 860825b89263Smrg CC*) 860925b89263Smrg # Sun C++ 4.x 861025b89263Smrg # FIXME: insert proper C++ library support 861125b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 861225b89263Smrg ;; 861325b89263Smrg lcc*) 861425b89263Smrg # Lucid 861525b89263Smrg # FIXME: insert proper C++ library support 861625b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 861725b89263Smrg ;; 861825b89263Smrg *) 861925b89263Smrg # FIXME: insert proper C++ library support 862025b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 862125b89263Smrg ;; 862225b89263Smrg esac 862325b89263Smrg ;; 8624ea133fd7Smrg 862525b89263Smrg solaris*) 862625b89263Smrg case $cc_basename in 862725b89263Smrg CC* | sunCC*) 862825b89263Smrg # Sun C++ 4.2, 5.x and Centerline C++ 862925b89263Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 863025b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 863125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 863225b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 863325b89263Smrg $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' 8634ea133fd7Smrg 863525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 863625b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 863725b89263Smrg case $host_os in 863825b89263Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 863925b89263Smrg *) 864025b89263Smrg # The compiler driver will combine and reorder linker options, 864125b89263Smrg # but understands `-z linker_flag'. 864225b89263Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 864325b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 864425b89263Smrg ;; 864525b89263Smrg esac 864625b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8647ea133fd7Smrg 864825b89263Smrg output_verbose_link_cmd='func_echo_all' 8649ea133fd7Smrg 865025b89263Smrg # Archives containing C++ object files must be created using 865125b89263Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 865225b89263Smrg # necessary to make sure instantiated templates are included 865325b89263Smrg # in the archive. 865425b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 865525b89263Smrg ;; 865625b89263Smrg gcx*) 865725b89263Smrg # Green Hills C++ Compiler 865825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8659ea133fd7Smrg 866025b89263Smrg # The C++ compiler must be used to create the archive. 866125b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 866225b89263Smrg ;; 866325b89263Smrg *) 866425b89263Smrg # GNU C++ compiler with Solaris linker 866525b89263Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 866625b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 866725b89263Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 866825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 866925b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 867025b89263Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8671ea133fd7Smrg 867225b89263Smrg # Commands to make compiler produce verbose output that lists 867325b89263Smrg # what "hidden" libraries, object files and flags are used when 867425b89263Smrg # linking a shared library. 867525b89263Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 867625b89263Smrg else 867725b89263Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 867825b89263Smrg # platform. 867925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 868025b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 868125b89263Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8682ea133fd7Smrg 868325b89263Smrg # Commands to make compiler produce verbose output that lists 868425b89263Smrg # what "hidden" libraries, object files and flags are used when 868525b89263Smrg # linking a shared library. 868625b89263Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 868725b89263Smrg fi 8688ea133fd7Smrg 868925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 869025b89263Smrg case $host_os in 869125b89263Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 869225b89263Smrg *) 869325b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 869425b89263Smrg ;; 869525b89263Smrg esac 869625b89263Smrg fi 869725b89263Smrg ;; 869825b89263Smrg esac 869925b89263Smrg ;; 8700ea133fd7Smrg 870125b89263Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 870225b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 870325b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 870425b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 870525b89263Smrg runpath_var='LD_RUN_PATH' 8706ea133fd7Smrg 870725b89263Smrg case $cc_basename in 870825b89263Smrg CC*) 870925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 871025b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 871125b89263Smrg ;; 871225b89263Smrg *) 871325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 871425b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 871525b89263Smrg ;; 871625b89263Smrg esac 871725b89263Smrg ;; 8718ea133fd7Smrg 871925b89263Smrg sysv5* | sco3.2v5* | sco5v6*) 872025b89263Smrg # Note: We can NOT use -z defs as we might desire, because we do not 872125b89263Smrg # link with -lc, and that would cause any symbols used from libc to 872225b89263Smrg # always be unresolved, which means just about no library would 872325b89263Smrg # ever link correctly. If we're not using GNU ld we use -z text 872425b89263Smrg # though, which does catch some bad symbols but isn't as heavy-handed 872525b89263Smrg # as -z defs. 872625b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 872725b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 872825b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 872925b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 873025b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 873125b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 873225b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 873325b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 873425b89263Smrg runpath_var='LD_RUN_PATH' 8735ea133fd7Smrg 873625b89263Smrg case $cc_basename in 873725b89263Smrg CC*) 873825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 873925b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 874025b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 874125b89263Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 874225b89263Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 874325b89263Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 874425b89263Smrg ;; 874525b89263Smrg *) 874625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 874725b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 874825b89263Smrg ;; 874925b89263Smrg esac 875025b89263Smrg ;; 8751ea133fd7Smrg 875225b89263Smrg tandem*) 875325b89263Smrg case $cc_basename in 875425b89263Smrg NCC*) 875525b89263Smrg # NonStop-UX NCC 3.20 875625b89263Smrg # FIXME: insert proper C++ library support 875725b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 875825b89263Smrg ;; 875925b89263Smrg *) 876025b89263Smrg # FIXME: insert proper C++ library support 876125b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 876225b89263Smrg ;; 876325b89263Smrg esac 876425b89263Smrg ;; 8765ea133fd7Smrg 876625b89263Smrg vxworks*) 876725b89263Smrg # FIXME: insert proper C++ library support 876825b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 876925b89263Smrg ;; 8770ea133fd7Smrg 877125b89263Smrg *) 877225b89263Smrg # FIXME: insert proper C++ library support 877325b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 877425b89263Smrg ;; 877525b89263Smrg esac 8776ea133fd7Smrg 877725b89263Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 877825b89263Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8779ea133fd7Smrg 878025b89263Smrg _LT_TAGVAR(GCC, $1)="$GXX" 878125b89263Smrg _LT_TAGVAR(LD, $1)="$LD" 8782ea133fd7Smrg 878325b89263Smrg ## CAVEAT EMPTOR: 878425b89263Smrg ## There is no encapsulation within the following macros, do not change 878525b89263Smrg ## the running order or otherwise move them around unless you know exactly 878625b89263Smrg ## what you are doing... 878725b89263Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 878825b89263Smrg _LT_COMPILER_PIC($1) 878925b89263Smrg _LT_COMPILER_C_O($1) 879025b89263Smrg _LT_COMPILER_FILE_LOCKS($1) 879125b89263Smrg _LT_LINKER_SHLIBS($1) 879225b89263Smrg _LT_SYS_DYNAMIC_LINKER($1) 879325b89263Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8794ea133fd7Smrg 879525b89263Smrg _LT_CONFIG($1) 879625b89263Smrg fi # test -n "$compiler" 8797ea133fd7Smrg 879825b89263Smrg CC=$lt_save_CC 879925b89263Smrg LDCXX=$LD 880025b89263Smrg LD=$lt_save_LD 880125b89263Smrg GCC=$lt_save_GCC 880225b89263Smrg with_gnu_ld=$lt_save_with_gnu_ld 880325b89263Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 880425b89263Smrg lt_cv_path_LD=$lt_save_path_LD 880525b89263Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 880625b89263Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 880725b89263Smrgfi # test "$_lt_caught_CXX_error" != yes 8808ea133fd7Smrg 880925b89263SmrgAC_LANG_POP 881025b89263Smrg])# _LT_LANG_CXX_CONFIG 8811ea133fd7Smrg 8812ea133fd7Smrg 881325b89263Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 881425b89263Smrg# --------------------------------- 881525b89263Smrg# Figure out "hidden" library dependencies from verbose 881625b89263Smrg# compiler output when linking a shared library. 881725b89263Smrg# Parse the compiler output and extract the necessary 881825b89263Smrg# objects, libraries and library flags. 881925b89263Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 882025b89263Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 882125b89263Smrg# Dependencies to place before and after the object being linked: 882225b89263Smrg_LT_TAGVAR(predep_objects, $1)= 882325b89263Smrg_LT_TAGVAR(postdep_objects, $1)= 882425b89263Smrg_LT_TAGVAR(predeps, $1)= 882525b89263Smrg_LT_TAGVAR(postdeps, $1)= 882625b89263Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 8827ea133fd7Smrg 882825b89263Smrgdnl we can't use the lt_simple_compile_test_code here, 882925b89263Smrgdnl because it contains code intended for an executable, 883025b89263Smrgdnl not a library. It's possible we should let each 883125b89263Smrgdnl tag define a new lt_????_link_test_code variable, 883225b89263Smrgdnl but it's only used here... 883325b89263Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 883425b89263Smrgint a; 883525b89263Smrgvoid foo (void) { a = 0; } 883625b89263Smrg_LT_EOF 883725b89263Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 883825b89263Smrgclass Foo 883925b89263Smrg{ 884025b89263Smrgpublic: 884125b89263Smrg Foo (void) { a = 0; } 884225b89263Smrgprivate: 884325b89263Smrg int a; 884425b89263Smrg}; 884525b89263Smrg_LT_EOF 884625b89263Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 884725b89263Smrg subroutine foo 884825b89263Smrg implicit none 884925b89263Smrg integer*4 a 885025b89263Smrg a=0 885125b89263Smrg return 885225b89263Smrg end 885325b89263Smrg_LT_EOF 885425b89263Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 885525b89263Smrg subroutine foo 885625b89263Smrg implicit none 885725b89263Smrg integer a 885825b89263Smrg a=0 885925b89263Smrg return 886025b89263Smrg end 886125b89263Smrg_LT_EOF 886225b89263Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 886325b89263Smrgpublic class foo { 886425b89263Smrg private int a; 886525b89263Smrg public void bar (void) { 886625b89263Smrg a = 0; 886725b89263Smrg } 886825b89263Smrg}; 886925b89263Smrg_LT_EOF 887025b89263Smrg]) 887125b89263Smrgdnl Parse the compiler output and extract the necessary 887225b89263Smrgdnl objects, libraries and library flags. 887325b89263Smrgif AC_TRY_EVAL(ac_compile); then 887425b89263Smrg # Parse the compiler output and extract the necessary 887525b89263Smrg # objects, libraries and library flags. 8876ea133fd7Smrg 887725b89263Smrg # Sentinel used to keep track of whether or not we are before 887825b89263Smrg # the conftest object file. 887925b89263Smrg pre_test_object_deps_done=no 8880ea133fd7Smrg 888125b89263Smrg for p in `eval "$output_verbose_link_cmd"`; do 888225b89263Smrg case $p in 8883ea133fd7Smrg 888425b89263Smrg -L* | -R* | -l*) 888525b89263Smrg # Some compilers place space between "-{L,R}" and the path. 888625b89263Smrg # Remove the space. 888725b89263Smrg if test $p = "-L" || 888825b89263Smrg test $p = "-R"; then 888925b89263Smrg prev=$p 889025b89263Smrg continue 889125b89263Smrg else 889225b89263Smrg prev= 889325b89263Smrg fi 8894ea133fd7Smrg 889525b89263Smrg if test "$pre_test_object_deps_done" = no; then 889625b89263Smrg case $p in 889725b89263Smrg -L* | -R*) 889825b89263Smrg # Internal compiler library paths should come after those 889925b89263Smrg # provided the user. The postdeps already come after the 890025b89263Smrg # user supplied libs so there is no need to process them. 890125b89263Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 890225b89263Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 890325b89263Smrg else 890425b89263Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 890525b89263Smrg fi 890625b89263Smrg ;; 890725b89263Smrg # The "-l" case would never come before the object being 890825b89263Smrg # linked, so don't bother handling this case. 890925b89263Smrg esac 891025b89263Smrg else 891125b89263Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 891225b89263Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 891325b89263Smrg else 891425b89263Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 891525b89263Smrg fi 891625b89263Smrg fi 891725b89263Smrg ;; 8918ea133fd7Smrg 891925b89263Smrg *.$objext) 892025b89263Smrg # This assumes that the test object file only shows up 892125b89263Smrg # once in the compiler output. 892225b89263Smrg if test "$p" = "conftest.$objext"; then 892325b89263Smrg pre_test_object_deps_done=yes 892425b89263Smrg continue 892525b89263Smrg fi 8926ea133fd7Smrg 892725b89263Smrg if test "$pre_test_object_deps_done" = no; then 892825b89263Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 892925b89263Smrg _LT_TAGVAR(predep_objects, $1)="$p" 893025b89263Smrg else 893125b89263Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 893225b89263Smrg fi 893325b89263Smrg else 893425b89263Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 893525b89263Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 893625b89263Smrg else 893725b89263Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 893825b89263Smrg fi 893925b89263Smrg fi 894025b89263Smrg ;; 8941ea133fd7Smrg 894225b89263Smrg *) ;; # Ignore the rest. 8943ea133fd7Smrg 894425b89263Smrg esac 894525b89263Smrg done 8946ea133fd7Smrg 894725b89263Smrg # Clean up. 894825b89263Smrg rm -f a.out a.exe 894925b89263Smrgelse 895025b89263Smrg echo "libtool.m4: error: problem compiling $1 test program" 895125b89263Smrgfi 8952ea133fd7Smrg 895325b89263Smrg$RM -f confest.$objext 8954ea133fd7Smrg 895525b89263Smrg# PORTME: override above test on systems where it is broken 895625b89263Smrgm4_if([$1], [CXX], 895725b89263Smrg[case $host_os in 895825b89263Smrginterix[[3-9]]*) 895925b89263Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 896025b89263Smrg # hack all around it, let's just trust "g++" to DTRT. 896125b89263Smrg _LT_TAGVAR(predep_objects,$1)= 896225b89263Smrg _LT_TAGVAR(postdep_objects,$1)= 896325b89263Smrg _LT_TAGVAR(postdeps,$1)= 896425b89263Smrg ;; 8965ea133fd7Smrg 896625b89263Smrglinux*) 896725b89263Smrg case `$CC -V 2>&1 | sed 5q` in 896825b89263Smrg *Sun\ C*) 896925b89263Smrg # Sun C++ 5.9 8970ea133fd7Smrg 897125b89263Smrg # The more standards-conforming stlport4 library is 897225b89263Smrg # incompatible with the Cstd library. Avoid specifying 897325b89263Smrg # it if it's in CXXFLAGS. Ignore libCrun as 897425b89263Smrg # -library=stlport4 depends on it. 897525b89263Smrg case " $CXX $CXXFLAGS " in 897625b89263Smrg *" -library=stlport4 "*) 897725b89263Smrg solaris_use_stlport4=yes 897825b89263Smrg ;; 897925b89263Smrg esac 8980ea133fd7Smrg 898125b89263Smrg if test "$solaris_use_stlport4" != yes; then 898225b89263Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 898325b89263Smrg fi 898425b89263Smrg ;; 898525b89263Smrg esac 898625b89263Smrg ;; 8987ea133fd7Smrg 898825b89263Smrgsolaris*) 898925b89263Smrg case $cc_basename in 899025b89263Smrg CC* | sunCC*) 899125b89263Smrg # The more standards-conforming stlport4 library is 899225b89263Smrg # incompatible with the Cstd library. Avoid specifying 899325b89263Smrg # it if it's in CXXFLAGS. Ignore libCrun as 899425b89263Smrg # -library=stlport4 depends on it. 899525b89263Smrg case " $CXX $CXXFLAGS " in 899625b89263Smrg *" -library=stlport4 "*) 899725b89263Smrg solaris_use_stlport4=yes 899825b89263Smrg ;; 899925b89263Smrg esac 9000ea133fd7Smrg 900125b89263Smrg # Adding this requires a known-good setup of shared libraries for 900225b89263Smrg # Sun compiler versions before 5.6, else PIC objects from an old 900325b89263Smrg # archive will be linked into the output, leading to subtle bugs. 900425b89263Smrg if test "$solaris_use_stlport4" != yes; then 900525b89263Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 900625b89263Smrg fi 900725b89263Smrg ;; 900825b89263Smrg esac 900925b89263Smrg ;; 901025b89263Smrgesac 901125b89263Smrg]) 9012ea133fd7Smrg 901325b89263Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 901425b89263Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 901525b89263Smrgesac 901625b89263Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 901725b89263Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 901825b89263Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 901925b89263Smrgfi 902025b89263Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 902125b89263Smrg [The directories searched by this compiler when creating a shared library]) 902225b89263Smrg_LT_TAGDECL([], [predep_objects], [1], 902325b89263Smrg [Dependencies to place before and after the objects being linked to 902425b89263Smrg create a shared library]) 902525b89263Smrg_LT_TAGDECL([], [postdep_objects], [1]) 902625b89263Smrg_LT_TAGDECL([], [predeps], [1]) 902725b89263Smrg_LT_TAGDECL([], [postdeps], [1]) 902825b89263Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 902925b89263Smrg [The library search path used internally by the compiler when linking 903025b89263Smrg a shared library]) 903125b89263Smrg])# _LT_SYS_HIDDEN_LIBDEPS 9032ea133fd7Smrg 9033ea133fd7Smrg 903425b89263Smrg# _LT_LANG_F77_CONFIG([TAG]) 903525b89263Smrg# -------------------------- 903625b89263Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 903725b89263Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 903825b89263Smrg# to write the compiler configuration to `libtool'. 903925b89263Smrgm4_defun([_LT_LANG_F77_CONFIG], 904025b89263Smrg[AC_LANG_PUSH(Fortran 77) 904125b89263Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 904225b89263Smrg _lt_disable_F77=yes 904325b89263Smrgfi 9044ea133fd7Smrg 904525b89263Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 904625b89263Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 904725b89263Smrg_LT_TAGVAR(always_export_symbols, $1)=no 904825b89263Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 904925b89263Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 905025b89263Smrg_LT_TAGVAR(hardcode_direct, $1)=no 905125b89263Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 905225b89263Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 905325b89263Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 905425b89263Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 905525b89263Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 905625b89263Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 905725b89263Smrg_LT_TAGVAR(inherit_rpath, $1)=no 905825b89263Smrg_LT_TAGVAR(module_cmds, $1)= 905925b89263Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 906025b89263Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 906125b89263Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 906225b89263Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 906325b89263Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 906425b89263Smrg_LT_TAGVAR(no_undefined_flag, $1)= 906525b89263Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 906625b89263Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9067ea133fd7Smrg 906825b89263Smrg# Source file extension for f77 test sources. 906925b89263Smrgac_ext=f 9070ea133fd7Smrg 907125b89263Smrg# Object file extension for compiled f77 test sources. 907225b89263Smrgobjext=o 907325b89263Smrg_LT_TAGVAR(objext, $1)=$objext 9074ea133fd7Smrg 907525b89263Smrg# No sense in running all these tests if we already determined that 907625b89263Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 907725b89263Smrg# are currently assumed to apply to all compilers on this platform, 907825b89263Smrg# and will be corrupted by setting them based on a non-working compiler. 907925b89263Smrgif test "$_lt_disable_F77" != yes; then 908025b89263Smrg # Code to be used in simple compile tests 908125b89263Smrg lt_simple_compile_test_code="\ 908225b89263Smrg subroutine t 908325b89263Smrg return 908425b89263Smrg end 908525b89263Smrg" 9086ea133fd7Smrg 908725b89263Smrg # Code to be used in simple link tests 908825b89263Smrg lt_simple_link_test_code="\ 908925b89263Smrg program t 909025b89263Smrg end 909125b89263Smrg" 9092ea133fd7Smrg 909325b89263Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 909425b89263Smrg _LT_TAG_COMPILER 909525b89263Smrg 909625b89263Smrg # save warnings/boilerplate of simple test code 909725b89263Smrg _LT_COMPILER_BOILERPLATE 909825b89263Smrg _LT_LINKER_BOILERPLATE 909925b89263Smrg 910025b89263Smrg # Allow CC to be a program name with arguments. 910125b89263Smrg lt_save_CC="$CC" 910225b89263Smrg lt_save_GCC=$GCC 910325b89263Smrg CC=${F77-"f77"} 910425b89263Smrg compiler=$CC 910525b89263Smrg _LT_TAGVAR(compiler, $1)=$CC 910625b89263Smrg _LT_CC_BASENAME([$compiler]) 910725b89263Smrg GCC=$G77 910825b89263Smrg if test -n "$compiler"; then 910925b89263Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 911025b89263Smrg AC_MSG_RESULT([$can_build_shared]) 911125b89263Smrg 911225b89263Smrg AC_MSG_CHECKING([whether to build shared libraries]) 911325b89263Smrg test "$can_build_shared" = "no" && enable_shared=no 911425b89263Smrg 911525b89263Smrg # On AIX, shared libraries and static libraries use the same namespace, and 911625b89263Smrg # are all built from PIC. 911725b89263Smrg case $host_os in 911825b89263Smrg aix3*) 911925b89263Smrg test "$enable_shared" = yes && enable_static=no 912025b89263Smrg if test -n "$RANLIB"; then 912125b89263Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 912225b89263Smrg postinstall_cmds='$RANLIB $lib' 912325b89263Smrg fi 912425b89263Smrg ;; 912525b89263Smrg aix[[4-9]]*) 912625b89263Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 912725b89263Smrg test "$enable_shared" = yes && enable_static=no 9128ea133fd7Smrg fi 912925b89263Smrg ;; 913025b89263Smrg esac 913125b89263Smrg AC_MSG_RESULT([$enable_shared]) 9132ea133fd7Smrg 913325b89263Smrg AC_MSG_CHECKING([whether to build static libraries]) 913425b89263Smrg # Make sure either enable_shared or enable_static is yes. 913525b89263Smrg test "$enable_shared" = yes || enable_static=yes 913625b89263Smrg AC_MSG_RESULT([$enable_static]) 9137ea133fd7Smrg 913825b89263Smrg _LT_TAGVAR(GCC, $1)="$G77" 913925b89263Smrg _LT_TAGVAR(LD, $1)="$LD" 9140ea133fd7Smrg 914125b89263Smrg ## CAVEAT EMPTOR: 914225b89263Smrg ## There is no encapsulation within the following macros, do not change 914325b89263Smrg ## the running order or otherwise move them around unless you know exactly 914425b89263Smrg ## what you are doing... 914525b89263Smrg _LT_COMPILER_PIC($1) 914625b89263Smrg _LT_COMPILER_C_O($1) 914725b89263Smrg _LT_COMPILER_FILE_LOCKS($1) 914825b89263Smrg _LT_LINKER_SHLIBS($1) 914925b89263Smrg _LT_SYS_DYNAMIC_LINKER($1) 915025b89263Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9151ea133fd7Smrg 915225b89263Smrg _LT_CONFIG($1) 915325b89263Smrg fi # test -n "$compiler" 9154ea133fd7Smrg 915525b89263Smrg GCC=$lt_save_GCC 915625b89263Smrg CC="$lt_save_CC" 915725b89263Smrgfi # test "$_lt_disable_F77" != yes 9158ea133fd7Smrg 915925b89263SmrgAC_LANG_POP 916025b89263Smrg])# _LT_LANG_F77_CONFIG 9161ea133fd7Smrg 9162ea133fd7Smrg 916325b89263Smrg# _LT_LANG_FC_CONFIG([TAG]) 916425b89263Smrg# ------------------------- 916525b89263Smrg# Ensure that the configuration variables for a Fortran compiler are 916625b89263Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 916725b89263Smrg# to write the compiler configuration to `libtool'. 916825b89263Smrgm4_defun([_LT_LANG_FC_CONFIG], 916925b89263Smrg[AC_LANG_PUSH(Fortran) 9170ea133fd7Smrg 917125b89263Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 917225b89263Smrg _lt_disable_FC=yes 917325b89263Smrgfi 9174ea133fd7Smrg 917525b89263Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 917625b89263Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 917725b89263Smrg_LT_TAGVAR(always_export_symbols, $1)=no 917825b89263Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 917925b89263Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 918025b89263Smrg_LT_TAGVAR(hardcode_direct, $1)=no 918125b89263Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 918225b89263Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 918325b89263Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 918425b89263Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 918525b89263Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 918625b89263Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 918725b89263Smrg_LT_TAGVAR(inherit_rpath, $1)=no 918825b89263Smrg_LT_TAGVAR(module_cmds, $1)= 918925b89263Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 919025b89263Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 919125b89263Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 919225b89263Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 919325b89263Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 919425b89263Smrg_LT_TAGVAR(no_undefined_flag, $1)= 919525b89263Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 919625b89263Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9197ea133fd7Smrg 919825b89263Smrg# Source file extension for fc test sources. 919925b89263Smrgac_ext=${ac_fc_srcext-f} 9200ea133fd7Smrg 920125b89263Smrg# Object file extension for compiled fc test sources. 920225b89263Smrgobjext=o 920325b89263Smrg_LT_TAGVAR(objext, $1)=$objext 9204ea133fd7Smrg 920525b89263Smrg# No sense in running all these tests if we already determined that 920625b89263Smrg# the FC compiler isn't working. Some variables (like enable_shared) 920725b89263Smrg# are currently assumed to apply to all compilers on this platform, 920825b89263Smrg# and will be corrupted by setting them based on a non-working compiler. 920925b89263Smrgif test "$_lt_disable_FC" != yes; then 921025b89263Smrg # Code to be used in simple compile tests 921125b89263Smrg lt_simple_compile_test_code="\ 921225b89263Smrg subroutine t 921325b89263Smrg return 921425b89263Smrg end 921525b89263Smrg" 9216ea133fd7Smrg 921725b89263Smrg # Code to be used in simple link tests 921825b89263Smrg lt_simple_link_test_code="\ 921925b89263Smrg program t 922025b89263Smrg end 922125b89263Smrg" 9222ea133fd7Smrg 922325b89263Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 922425b89263Smrg _LT_TAG_COMPILER 922525b89263Smrg 922625b89263Smrg # save warnings/boilerplate of simple test code 922725b89263Smrg _LT_COMPILER_BOILERPLATE 922825b89263Smrg _LT_LINKER_BOILERPLATE 9229ea133fd7Smrg 923025b89263Smrg # Allow CC to be a program name with arguments. 923125b89263Smrg lt_save_CC="$CC" 923225b89263Smrg lt_save_GCC=$GCC 923325b89263Smrg CC=${FC-"f95"} 923425b89263Smrg compiler=$CC 923525b89263Smrg GCC=$ac_cv_fc_compiler_gnu 9236ea133fd7Smrg 923725b89263Smrg _LT_TAGVAR(compiler, $1)=$CC 923825b89263Smrg _LT_CC_BASENAME([$compiler]) 9239ea133fd7Smrg 924025b89263Smrg if test -n "$compiler"; then 924125b89263Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 924225b89263Smrg AC_MSG_RESULT([$can_build_shared]) 9243ea133fd7Smrg 924425b89263Smrg AC_MSG_CHECKING([whether to build shared libraries]) 924525b89263Smrg test "$can_build_shared" = "no" && enable_shared=no 9246ea133fd7Smrg 924725b89263Smrg # On AIX, shared libraries and static libraries use the same namespace, and 924825b89263Smrg # are all built from PIC. 924925b89263Smrg case $host_os in 925025b89263Smrg aix3*) 925125b89263Smrg test "$enable_shared" = yes && enable_static=no 925225b89263Smrg if test -n "$RANLIB"; then 925325b89263Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 925425b89263Smrg postinstall_cmds='$RANLIB $lib' 925525b89263Smrg fi 925625b89263Smrg ;; 925725b89263Smrg aix[[4-9]]*) 925825b89263Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 925925b89263Smrg test "$enable_shared" = yes && enable_static=no 926025b89263Smrg fi 926125b89263Smrg ;; 926225b89263Smrg esac 926325b89263Smrg AC_MSG_RESULT([$enable_shared]) 9264ea133fd7Smrg 926525b89263Smrg AC_MSG_CHECKING([whether to build static libraries]) 926625b89263Smrg # Make sure either enable_shared or enable_static is yes. 926725b89263Smrg test "$enable_shared" = yes || enable_static=yes 926825b89263Smrg AC_MSG_RESULT([$enable_static]) 9269ea133fd7Smrg 927025b89263Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 927125b89263Smrg _LT_TAGVAR(LD, $1)="$LD" 9272ea133fd7Smrg 927325b89263Smrg ## CAVEAT EMPTOR: 927425b89263Smrg ## There is no encapsulation within the following macros, do not change 927525b89263Smrg ## the running order or otherwise move them around unless you know exactly 927625b89263Smrg ## what you are doing... 927725b89263Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 927825b89263Smrg _LT_COMPILER_PIC($1) 927925b89263Smrg _LT_COMPILER_C_O($1) 928025b89263Smrg _LT_COMPILER_FILE_LOCKS($1) 928125b89263Smrg _LT_LINKER_SHLIBS($1) 928225b89263Smrg _LT_SYS_DYNAMIC_LINKER($1) 928325b89263Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9284ea133fd7Smrg 928525b89263Smrg _LT_CONFIG($1) 928625b89263Smrg fi # test -n "$compiler" 9287ea133fd7Smrg 928825b89263Smrg GCC=$lt_save_GCC 928925b89263Smrg CC="$lt_save_CC" 929025b89263Smrgfi # test "$_lt_disable_FC" != yes 9291ea133fd7Smrg 929225b89263SmrgAC_LANG_POP 929325b89263Smrg])# _LT_LANG_FC_CONFIG 9294ea133fd7Smrg 9295ea133fd7Smrg 929625b89263Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 929725b89263Smrg# -------------------------- 929825b89263Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 929925b89263Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 930025b89263Smrg# to write the compiler configuration to `libtool'. 930125b89263Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 930225b89263Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 930325b89263SmrgAC_LANG_SAVE 9304a253d6aeSmrg 930525b89263Smrg# Source file extension for Java test sources. 930625b89263Smrgac_ext=java 9307a253d6aeSmrg 930825b89263Smrg# Object file extension for compiled Java test sources. 930925b89263Smrgobjext=o 931025b89263Smrg_LT_TAGVAR(objext, $1)=$objext 9311a253d6aeSmrg 931225b89263Smrg# Code to be used in simple compile tests 931325b89263Smrglt_simple_compile_test_code="class foo {}" 9314a253d6aeSmrg 931525b89263Smrg# Code to be used in simple link tests 931625b89263Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 9317a253d6aeSmrg 931825b89263Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 931925b89263Smrg_LT_TAG_COMPILER 9320a253d6aeSmrg 932125b89263Smrg# save warnings/boilerplate of simple test code 932225b89263Smrg_LT_COMPILER_BOILERPLATE 932325b89263Smrg_LT_LINKER_BOILERPLATE 9324a253d6aeSmrg 932525b89263Smrg# Allow CC to be a program name with arguments. 932625b89263Smrglt_save_CC="$CC" 932725b89263Smrglt_save_GCC=$GCC 932825b89263SmrgGCC=yes 932925b89263SmrgCC=${GCJ-"gcj"} 933025b89263Smrgcompiler=$CC 933125b89263Smrg_LT_TAGVAR(compiler, $1)=$CC 933225b89263Smrg_LT_TAGVAR(LD, $1)="$LD" 933325b89263Smrg_LT_CC_BASENAME([$compiler]) 9334a253d6aeSmrg 933525b89263Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 933625b89263Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9337a253d6aeSmrg 933825b89263Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 933925b89263Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 934025b89263Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9341a253d6aeSmrg 934225b89263Smrgif test -n "$compiler"; then 934325b89263Smrg _LT_COMPILER_NO_RTTI($1) 934425b89263Smrg _LT_COMPILER_PIC($1) 934525b89263Smrg _LT_COMPILER_C_O($1) 934625b89263Smrg _LT_COMPILER_FILE_LOCKS($1) 934725b89263Smrg _LT_LINKER_SHLIBS($1) 934825b89263Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9349a253d6aeSmrg 935025b89263Smrg _LT_CONFIG($1) 9351ea133fd7Smrgfi 9352a253d6aeSmrg 935325b89263SmrgAC_LANG_RESTORE 9354a253d6aeSmrg 935525b89263SmrgGCC=$lt_save_GCC 935625b89263SmrgCC="$lt_save_CC" 935725b89263Smrg])# _LT_LANG_GCJ_CONFIG 9358ea133fd7Smrg 9359ea133fd7Smrg 936025b89263Smrg# _LT_LANG_RC_CONFIG([TAG]) 936125b89263Smrg# ------------------------- 936225b89263Smrg# Ensure that the configuration variables for the Windows resource compiler 936325b89263Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 936425b89263Smrg# to write the compiler configuration to `libtool'. 936525b89263Smrgm4_defun([_LT_LANG_RC_CONFIG], 936625b89263Smrg[AC_REQUIRE([LT_PROG_RC])dnl 936725b89263SmrgAC_LANG_SAVE 9368ea133fd7Smrg 936925b89263Smrg# Source file extension for RC test sources. 937025b89263Smrgac_ext=rc 9371ea133fd7Smrg 937225b89263Smrg# Object file extension for compiled RC test sources. 937325b89263Smrgobjext=o 937425b89263Smrg_LT_TAGVAR(objext, $1)=$objext 9375ea133fd7Smrg 937625b89263Smrg# Code to be used in simple compile tests 937725b89263Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 9378ea133fd7Smrg 937925b89263Smrg# Code to be used in simple link tests 938025b89263Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 9381ea133fd7Smrg 938225b89263Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 938325b89263Smrg_LT_TAG_COMPILER 9384ea133fd7Smrg 938525b89263Smrg# save warnings/boilerplate of simple test code 938625b89263Smrg_LT_COMPILER_BOILERPLATE 938725b89263Smrg_LT_LINKER_BOILERPLATE 938825b89263Smrg 938925b89263Smrg# Allow CC to be a program name with arguments. 939025b89263Smrglt_save_CC="$CC" 939125b89263Smrglt_save_GCC=$GCC 939225b89263SmrgGCC= 939325b89263SmrgCC=${RC-"windres"} 939425b89263Smrgcompiler=$CC 939525b89263Smrg_LT_TAGVAR(compiler, $1)=$CC 939625b89263Smrg_LT_CC_BASENAME([$compiler]) 939725b89263Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 939825b89263Smrg 939925b89263Smrgif test -n "$compiler"; then 940025b89263Smrg : 940125b89263Smrg _LT_CONFIG($1) 940225b89263Smrgfi 940325b89263Smrg 940425b89263SmrgGCC=$lt_save_GCC 940525b89263SmrgAC_LANG_RESTORE 940625b89263SmrgCC="$lt_save_CC" 940725b89263Smrg])# _LT_LANG_RC_CONFIG 940825b89263Smrg 940925b89263Smrg 941025b89263Smrg# LT_PROG_GCJ 941125b89263Smrg# ----------- 941225b89263SmrgAC_DEFUN([LT_PROG_GCJ], 941325b89263Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 941425b89263Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 941525b89263Smrg [AC_CHECK_TOOL(GCJ, gcj,) 941625b89263Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 941725b89263Smrg AC_SUBST(GCJFLAGS)])])[]dnl 9418ea133fd7Smrg]) 9419ea133fd7Smrg 942025b89263Smrg# Old name: 942125b89263SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 942225b89263Smrgdnl aclocal-1.4 backwards compatibility: 942325b89263Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 9424ea133fd7Smrg 9425a253d6aeSmrg 942625b89263Smrg# LT_PROG_RC 942725b89263Smrg# ---------- 942825b89263SmrgAC_DEFUN([LT_PROG_RC], 942925b89263Smrg[AC_CHECK_TOOL(RC, windres,) 943025b89263Smrg]) 9431a253d6aeSmrg 943225b89263Smrg# Old name: 943325b89263SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 943425b89263Smrgdnl aclocal-1.4 backwards compatibility: 943525b89263Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 9436a253d6aeSmrg 9437a253d6aeSmrg 943825b89263Smrg# _LT_DECL_EGREP 943925b89263Smrg# -------------- 944025b89263Smrg# If we don't have a new enough Autoconf to choose the best grep 944125b89263Smrg# available, choose the one first in the user's PATH. 944225b89263Smrgm4_defun([_LT_DECL_EGREP], 944325b89263Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 944425b89263SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 944525b89263Smrgtest -z "$GREP" && GREP=grep 944625b89263Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 944725b89263Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 944825b89263Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 944925b89263Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 945025b89263SmrgAC_SUBST([GREP]) 945125b89263Smrg]) 9452a253d6aeSmrg 9453a253d6aeSmrg 945425b89263Smrg# _LT_DECL_OBJDUMP 945525b89263Smrg# -------------- 945625b89263Smrg# If we don't have a new enough Autoconf to choose the best objdump 945725b89263Smrg# available, choose the one first in the user's PATH. 945825b89263Smrgm4_defun([_LT_DECL_OBJDUMP], 945925b89263Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 946025b89263Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 946125b89263Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 946225b89263SmrgAC_SUBST([OBJDUMP]) 946325b89263Smrg]) 9464a253d6aeSmrg 9465a253d6aeSmrg 946625b89263Smrg# _LT_DECL_SED 946725b89263Smrg# ------------ 946825b89263Smrg# Check for a fully-functional sed program, that truncates 946925b89263Smrg# as few characters as possible. Prefer GNU sed if found. 947025b89263Smrgm4_defun([_LT_DECL_SED], 947125b89263Smrg[AC_PROG_SED 947225b89263Smrgtest -z "$SED" && SED=sed 947325b89263SmrgXsed="$SED -e 1s/^X//" 947425b89263Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 947525b89263Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 947625b89263Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 947725b89263Smrg])# _LT_DECL_SED 9478a253d6aeSmrg 947925b89263Smrgm4_ifndef([AC_PROG_SED], [ 948025b89263Smrg# NOTE: This macro has been submitted for inclusion into # 948125b89263Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 948225b89263Smrg# a released version of Autoconf we should remove this # 948325b89263Smrg# macro and use it instead. # 9484a253d6aeSmrg 948525b89263Smrgm4_defun([AC_PROG_SED], 948625b89263Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 948725b89263SmrgAC_CACHE_VAL(lt_cv_path_SED, 948825b89263Smrg[# Loop through the user's path and test for sed and gsed. 948925b89263Smrg# Then use that list of sed's as ones to test for truncation. 949025b89263Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 949125b89263Smrgfor as_dir in $PATH 949225b89263Smrgdo 949325b89263Smrg IFS=$as_save_IFS 949425b89263Smrg test -z "$as_dir" && as_dir=. 949525b89263Smrg for lt_ac_prog in sed gsed; do 949625b89263Smrg for ac_exec_ext in '' $ac_executable_extensions; do 949725b89263Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 949825b89263Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 949925b89263Smrg fi 950025b89263Smrg done 950125b89263Smrg done 950225b89263Smrgdone 950325b89263SmrgIFS=$as_save_IFS 950425b89263Smrglt_ac_max=0 950525b89263Smrglt_ac_count=0 950625b89263Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 950725b89263Smrg# along with /bin/sed that truncates output. 950825b89263Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 950925b89263Smrg test ! -f $lt_ac_sed && continue 951025b89263Smrg cat /dev/null > conftest.in 951125b89263Smrg lt_ac_count=0 951225b89263Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 951325b89263Smrg # Check for GNU sed and select it if it is found. 951425b89263Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 951525b89263Smrg lt_cv_path_SED=$lt_ac_sed 951625b89263Smrg break 951725b89263Smrg fi 951825b89263Smrg while true; do 951925b89263Smrg cat conftest.in conftest.in >conftest.tmp 952025b89263Smrg mv conftest.tmp conftest.in 952125b89263Smrg cp conftest.in conftest.nl 952225b89263Smrg echo >>conftest.nl 952325b89263Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 952425b89263Smrg cmp -s conftest.out conftest.nl || break 952525b89263Smrg # 10000 chars as input seems more than enough 952625b89263Smrg test $lt_ac_count -gt 10 && break 952725b89263Smrg lt_ac_count=`expr $lt_ac_count + 1` 952825b89263Smrg if test $lt_ac_count -gt $lt_ac_max; then 952925b89263Smrg lt_ac_max=$lt_ac_count 953025b89263Smrg lt_cv_path_SED=$lt_ac_sed 953125b89263Smrg fi 953225b89263Smrg done 953325b89263Smrgdone 9534a253d6aeSmrg]) 953525b89263SmrgSED=$lt_cv_path_SED 953625b89263SmrgAC_SUBST([SED]) 953725b89263SmrgAC_MSG_RESULT([$SED]) 953825b89263Smrg])#AC_PROG_SED 953925b89263Smrg])#m4_ifndef 9540a253d6aeSmrg 954125b89263Smrg# Old name: 954225b89263SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 954325b89263Smrgdnl aclocal-1.4 backwards compatibility: 954425b89263Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 9545ea133fd7Smrg 9546ea133fd7Smrg 954725b89263Smrg# _LT_CHECK_SHELL_FEATURES 954825b89263Smrg# ------------------------ 954925b89263Smrg# Find out whether the shell is Bourne or XSI compatible, 955025b89263Smrg# or has some other useful features. 955125b89263Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 955225b89263Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 955325b89263Smrg# Try some XSI features 955425b89263Smrgxsi_shell=no 955525b89263Smrg( _lt_dummy="a/b/c" 955625b89263Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 955725b89263Smrg = c,a/b,, \ 955825b89263Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 955925b89263Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 956025b89263Smrg && xsi_shell=yes 956125b89263SmrgAC_MSG_RESULT([$xsi_shell]) 956225b89263Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 9563ea133fd7Smrg 956425b89263SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 956525b89263Smrglt_shell_append=no 956625b89263Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 956725b89263Smrg >/dev/null 2>&1 \ 956825b89263Smrg && lt_shell_append=yes 956925b89263SmrgAC_MSG_RESULT([$lt_shell_append]) 957025b89263Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 9571ea133fd7Smrg 957225b89263Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 957325b89263Smrg lt_unset=unset 957425b89263Smrgelse 957525b89263Smrg lt_unset=false 9576ea133fd7Smrgfi 957725b89263Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 9578a253d6aeSmrg 957925b89263Smrg# test EBCDIC or ASCII 958025b89263Smrgcase `echo X|tr X '\101'` in 958125b89263Smrg A) # ASCII based system 958225b89263Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 958325b89263Smrg lt_SP2NL='tr \040 \012' 958425b89263Smrg lt_NL2SP='tr \015\012 \040\040' 958525b89263Smrg ;; 958625b89263Smrg *) # EBCDIC based system 958725b89263Smrg lt_SP2NL='tr \100 \n' 958825b89263Smrg lt_NL2SP='tr \r\n \100\100' 958925b89263Smrg ;; 959025b89263Smrgesac 959125b89263Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 959225b89263Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 959325b89263Smrg])# _LT_CHECK_SHELL_FEATURES 9594ea133fd7Smrg 9595ea133fd7Smrg 959625b89263Smrg# _LT_PROG_XSI_SHELLFNS 959725b89263Smrg# --------------------- 959825b89263Smrg# Bourne and XSI compatible variants of some useful shell functions. 959925b89263Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 960025b89263Smrg[case $xsi_shell in 960125b89263Smrg yes) 960225b89263Smrg cat << \_LT_EOF >> "$cfgfile" 9603ea133fd7Smrg 960425b89263Smrg# func_dirname file append nondir_replacement 960525b89263Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 960625b89263Smrg# otherwise set result to NONDIR_REPLACEMENT. 960725b89263Smrgfunc_dirname () 960825b89263Smrg{ 960925b89263Smrg case ${1} in 961025b89263Smrg */*) func_dirname_result="${1%/*}${2}" ;; 961125b89263Smrg * ) func_dirname_result="${3}" ;; 961225b89263Smrg esac 961325b89263Smrg} 9614ea133fd7Smrg 961525b89263Smrg# func_basename file 961625b89263Smrgfunc_basename () 961725b89263Smrg{ 961825b89263Smrg func_basename_result="${1##*/}" 961925b89263Smrg} 9620a253d6aeSmrg 962125b89263Smrg# func_dirname_and_basename file append nondir_replacement 962225b89263Smrg# perform func_basename and func_dirname in a single function 962325b89263Smrg# call: 962425b89263Smrg# dirname: Compute the dirname of FILE. If nonempty, 962525b89263Smrg# add APPEND to the result, otherwise set result 962625b89263Smrg# to NONDIR_REPLACEMENT. 962725b89263Smrg# value returned in "$func_dirname_result" 962825b89263Smrg# basename: Compute filename of FILE. 962925b89263Smrg# value retuned in "$func_basename_result" 963025b89263Smrg# Implementation must be kept synchronized with func_dirname 963125b89263Smrg# and func_basename. For efficiency, we do not delegate to 963225b89263Smrg# those functions but instead duplicate the functionality here. 963325b89263Smrgfunc_dirname_and_basename () 963425b89263Smrg{ 963525b89263Smrg case ${1} in 963625b89263Smrg */*) func_dirname_result="${1%/*}${2}" ;; 963725b89263Smrg * ) func_dirname_result="${3}" ;; 963825b89263Smrg esac 963925b89263Smrg func_basename_result="${1##*/}" 964025b89263Smrg} 9641a253d6aeSmrg 964225b89263Smrg# func_stripname prefix suffix name 964325b89263Smrg# strip PREFIX and SUFFIX off of NAME. 964425b89263Smrg# PREFIX and SUFFIX must not contain globbing or regex special 964525b89263Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 964625b89263Smrg# dot (in which case that matches only a dot). 964725b89263Smrgfunc_stripname () 964825b89263Smrg{ 964925b89263Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 965025b89263Smrg # positional parameters, so assign one to ordinary parameter first. 965125b89263Smrg func_stripname_result=${3} 965225b89263Smrg func_stripname_result=${func_stripname_result#"${1}"} 965325b89263Smrg func_stripname_result=${func_stripname_result%"${2}"} 965425b89263Smrg} 9655a253d6aeSmrg 965625b89263Smrg# func_opt_split 965725b89263Smrgfunc_opt_split () 965825b89263Smrg{ 965925b89263Smrg func_opt_split_opt=${1%%=*} 966025b89263Smrg func_opt_split_arg=${1#*=} 966125b89263Smrg} 9662ea133fd7Smrg 966325b89263Smrg# func_lo2o object 966425b89263Smrgfunc_lo2o () 966525b89263Smrg{ 966625b89263Smrg case ${1} in 966725b89263Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 966825b89263Smrg *) func_lo2o_result=${1} ;; 966925b89263Smrg esac 967025b89263Smrg} 9671ea133fd7Smrg 967225b89263Smrg# func_xform libobj-or-source 967325b89263Smrgfunc_xform () 967425b89263Smrg{ 967525b89263Smrg func_xform_result=${1%.*}.lo 967625b89263Smrg} 9677a253d6aeSmrg 967825b89263Smrg# func_arith arithmetic-term... 967925b89263Smrgfunc_arith () 968025b89263Smrg{ 968125b89263Smrg func_arith_result=$(( $[*] )) 968225b89263Smrg} 9683a253d6aeSmrg 968425b89263Smrg# func_len string 968525b89263Smrg# STRING may not start with a hyphen. 968625b89263Smrgfunc_len () 968725b89263Smrg{ 968825b89263Smrg func_len_result=${#1} 968925b89263Smrg} 969025b89263Smrg 969125b89263Smrg_LT_EOF 969225b89263Smrg ;; 969325b89263Smrg *) # Bourne compatible functions. 969425b89263Smrg cat << \_LT_EOF >> "$cfgfile" 969525b89263Smrg 969625b89263Smrg# func_dirname file append nondir_replacement 969725b89263Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 969825b89263Smrg# otherwise set result to NONDIR_REPLACEMENT. 969925b89263Smrgfunc_dirname () 970025b89263Smrg{ 970125b89263Smrg # Extract subdirectory from the argument. 970225b89263Smrg func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` 970325b89263Smrg if test "X$func_dirname_result" = "X${1}"; then 970425b89263Smrg func_dirname_result="${3}" 970525b89263Smrg else 970625b89263Smrg func_dirname_result="$func_dirname_result${2}" 970725b89263Smrg fi 970825b89263Smrg} 9709a253d6aeSmrg 971025b89263Smrg# func_basename file 971125b89263Smrgfunc_basename () 971225b89263Smrg{ 971325b89263Smrg func_basename_result=`$ECHO "${1}" | $SED "$basename"` 971425b89263Smrg} 9715a253d6aeSmrg 971625b89263Smrgdnl func_dirname_and_basename 971725b89263Smrgdnl A portable version of this function is already defined in general.m4sh 971825b89263Smrgdnl so there is no need for it here. 9719a253d6aeSmrg 972025b89263Smrg# func_stripname prefix suffix name 972125b89263Smrg# strip PREFIX and SUFFIX off of NAME. 972225b89263Smrg# PREFIX and SUFFIX must not contain globbing or regex special 972325b89263Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 972425b89263Smrg# dot (in which case that matches only a dot). 972525b89263Smrg# func_strip_suffix prefix name 972625b89263Smrgfunc_stripname () 972725b89263Smrg{ 972825b89263Smrg case ${2} in 972925b89263Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 973025b89263Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 973125b89263Smrg esac 973225b89263Smrg} 9733a253d6aeSmrg 973425b89263Smrg# sed scripts: 973525b89263Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 973625b89263Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 9737a253d6aeSmrg 973825b89263Smrg# func_opt_split 973925b89263Smrgfunc_opt_split () 974025b89263Smrg{ 974125b89263Smrg func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` 974225b89263Smrg func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` 974325b89263Smrg} 9744a253d6aeSmrg 974525b89263Smrg# func_lo2o object 974625b89263Smrgfunc_lo2o () 974725b89263Smrg{ 974825b89263Smrg func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 974925b89263Smrg} 975025b89263Smrg 975125b89263Smrg# func_xform libobj-or-source 975225b89263Smrgfunc_xform () 975325b89263Smrg{ 975425b89263Smrg func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` 975525b89263Smrg} 975625b89263Smrg 975725b89263Smrg# func_arith arithmetic-term... 975825b89263Smrgfunc_arith () 975925b89263Smrg{ 976025b89263Smrg func_arith_result=`expr "$[@]"` 976125b89263Smrg} 976225b89263Smrg 976325b89263Smrg# func_len string 976425b89263Smrg# STRING may not start with a hyphen. 976525b89263Smrgfunc_len () 976625b89263Smrg{ 976725b89263Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 976825b89263Smrg} 976925b89263Smrg 977025b89263Smrg_LT_EOF 977125b89263Smrgesac 977225b89263Smrg 977325b89263Smrgcase $lt_shell_append in 977425b89263Smrg yes) 977525b89263Smrg cat << \_LT_EOF >> "$cfgfile" 977625b89263Smrg 977725b89263Smrg# func_append var value 977825b89263Smrg# Append VALUE to the end of shell variable VAR. 977925b89263Smrgfunc_append () 978025b89263Smrg{ 978125b89263Smrg eval "$[1]+=\$[2]" 978225b89263Smrg} 978325b89263Smrg_LT_EOF 978425b89263Smrg ;; 9785ea133fd7Smrg *) 978625b89263Smrg cat << \_LT_EOF >> "$cfgfile" 978725b89263Smrg 978825b89263Smrg# func_append var value 978925b89263Smrg# Append VALUE to the end of shell variable VAR. 979025b89263Smrgfunc_append () 979125b89263Smrg{ 979225b89263Smrg eval "$[1]=\$$[1]\$[2]" 979325b89263Smrg} 979425b89263Smrg 979525b89263Smrg_LT_EOF 979625b89263Smrg ;; 9797ea133fd7Smrg esac 9798ea133fd7Smrg]) 9799a253d6aeSmrg 980025b89263Smrg# Helper functions for option handling. -*- Autoconf -*- 9801ea133fd7Smrg# 980225b89263Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 980325b89263Smrg# Inc. 980425b89263Smrg# Written by Gary V. Vaughan, 2004 980525b89263Smrg# 980625b89263Smrg# This file is free software; the Free Software Foundation gives 980725b89263Smrg# unlimited permission to copy and/or distribute it, with or without 980825b89263Smrg# modifications, as long as this notice is preserved. 9809a253d6aeSmrg 981025b89263Smrg# serial 7 ltoptions.m4 9811a253d6aeSmrg 981225b89263Smrg# This is to help aclocal find these macros, as it can't see m4_define. 981325b89263SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9814a253d6aeSmrg 9815a253d6aeSmrg 981625b89263Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 981725b89263Smrg# ------------------------------------------ 981825b89263Smrgm4_define([_LT_MANGLE_OPTION], 981925b89263Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9820a253d6aeSmrg 9821a253d6aeSmrg 982225b89263Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 982325b89263Smrg# --------------------------------------- 982425b89263Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 982525b89263Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 982625b89263Smrg# saved as a flag. 982725b89263Smrgm4_define([_LT_SET_OPTION], 982825b89263Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 982925b89263Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 983025b89263Smrg _LT_MANGLE_DEFUN([$1], [$2]), 983125b89263Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 983225b89263Smrg]) 9833a253d6aeSmrg 9834a253d6aeSmrg 983525b89263Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 983625b89263Smrg# ------------------------------------------------------------ 9837ea133fd7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 983825b89263Smrgm4_define([_LT_IF_OPTION], 983925b89263Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9840a253d6aeSmrg 9841a253d6aeSmrg 984225b89263Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 984325b89263Smrg# ------------------------------------------------------- 984425b89263Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 984525b89263Smrg# are set. 984625b89263Smrgm4_define([_LT_UNLESS_OPTIONS], 984725b89263Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 984825b89263Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 984925b89263Smrg [m4_define([$0_found])])])[]dnl 985025b89263Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 985125b89263Smrg])[]dnl 985225b89263Smrg]) 9853a253d6aeSmrg 9854a253d6aeSmrg 985525b89263Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 985625b89263Smrg# ---------------------------------------- 985725b89263Smrg# OPTION-LIST is a space-separated list of Libtool options associated 985825b89263Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 985925b89263Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 986025b89263Smrg# the unknown option and exit. 986125b89263Smrgm4_defun([_LT_SET_OPTIONS], 986225b89263Smrg[# Set options 986325b89263Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 986425b89263Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 9865a253d6aeSmrg 986625b89263Smrgm4_if([$1],[LT_INIT],[ 986725b89263Smrg dnl 986825b89263Smrg dnl Simply set some default values (i.e off) if boolean options were not 986925b89263Smrg dnl specified: 987025b89263Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 987125b89263Smrg ]) 987225b89263Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 987325b89263Smrg ]) 987425b89263Smrg dnl 987525b89263Smrg dnl If no reference was made to various pairs of opposing options, then 987625b89263Smrg dnl we run the default mode handler for the pair. For example, if neither 987725b89263Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 987825b89263Smrg dnl archives by default: 987925b89263Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 988025b89263Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 988125b89263Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 988225b89263Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 988325b89263Smrg [_LT_ENABLE_FAST_INSTALL]) 988425b89263Smrg ]) 988525b89263Smrg])# _LT_SET_OPTIONS 9886a253d6aeSmrg 9887a253d6aeSmrg 9888a253d6aeSmrg 988925b89263Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 989025b89263Smrg# ----------------------------------------- 989125b89263Smrgm4_define([_LT_MANGLE_DEFUN], 989225b89263Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9893a253d6aeSmrg 9894a253d6aeSmrg 989525b89263Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 989625b89263Smrg# ----------------------------------------------- 989725b89263Smrgm4_define([LT_OPTION_DEFINE], 989825b89263Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 989925b89263Smrg])# LT_OPTION_DEFINE 990025b89263Smrg 990125b89263Smrg 990225b89263Smrg# dlopen 990325b89263Smrg# ------ 990425b89263SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9905ea133fd7Smrg]) 9906a253d6aeSmrg 990725b89263SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 990825b89263Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 990925b89263SmrgAC_DIAGNOSE([obsolete], 991025b89263Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 991125b89263Smrgput the `dlopen' option into LT_INIT's first parameter.]) 991225b89263Smrg]) 9913a253d6aeSmrg 991425b89263Smrgdnl aclocal-1.4 backwards compatibility: 991525b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9916a253d6aeSmrg 9917a253d6aeSmrg 991825b89263Smrg# win32-dll 991925b89263Smrg# --------- 992025b89263Smrg# Declare package support for building win32 dll's. 992125b89263SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 992225b89263Smrg[enable_win32_dll=yes 9923a253d6aeSmrg 992425b89263Smrgcase $host in 992525b89263Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 992625b89263Smrg AC_CHECK_TOOL(AS, as, false) 992725b89263Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 992825b89263Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 992925b89263Smrg ;; 993025b89263Smrgesac 9931a253d6aeSmrg 993225b89263Smrgtest -z "$AS" && AS=as 993325b89263Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9934a253d6aeSmrg 993525b89263Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 993625b89263Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9937a253d6aeSmrg 993825b89263Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 993925b89263Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 994025b89263Smrg])# win32-dll 9941a253d6aeSmrg 994225b89263SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 994325b89263Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 994425b89263Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 994525b89263SmrgAC_DIAGNOSE([obsolete], 994625b89263Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 994725b89263Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 994825b89263Smrg]) 9949a253d6aeSmrg 995025b89263Smrgdnl aclocal-1.4 backwards compatibility: 995125b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9952a253d6aeSmrg 9953a253d6aeSmrg 995425b89263Smrg# _LT_ENABLE_SHARED([DEFAULT]) 995525b89263Smrg# ---------------------------- 995625b89263Smrg# implement the --enable-shared flag, and supports the `shared' and 995725b89263Smrg# `disable-shared' LT_INIT options. 995825b89263Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 995925b89263Smrgm4_define([_LT_ENABLE_SHARED], 996025b89263Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 996125b89263SmrgAC_ARG_ENABLE([shared], 996225b89263Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 996325b89263Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 996425b89263Smrg [p=${PACKAGE-default} 996525b89263Smrg case $enableval in 996625b89263Smrg yes) enable_shared=yes ;; 996725b89263Smrg no) enable_shared=no ;; 996825b89263Smrg *) 996925b89263Smrg enable_shared=no 997025b89263Smrg # Look at the argument we got. We use all the common list separators. 997125b89263Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 997225b89263Smrg for pkg in $enableval; do 997325b89263Smrg IFS="$lt_save_ifs" 997425b89263Smrg if test "X$pkg" = "X$p"; then 997525b89263Smrg enable_shared=yes 997625b89263Smrg fi 997725b89263Smrg done 997825b89263Smrg IFS="$lt_save_ifs" 997925b89263Smrg ;; 998025b89263Smrg esac], 998125b89263Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 998225b89263Smrg 998325b89263Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 998425b89263Smrg [Whether or not to build shared libraries]) 998525b89263Smrg])# _LT_ENABLE_SHARED 998625b89263Smrg 998725b89263SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 998825b89263SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 998925b89263Smrg 999025b89263Smrg# Old names: 999125b89263SmrgAC_DEFUN([AC_ENABLE_SHARED], 999225b89263Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 999325b89263Smrg]) 9994a253d6aeSmrg 999525b89263SmrgAC_DEFUN([AC_DISABLE_SHARED], 999625b89263Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 999725b89263Smrg]) 9998a253d6aeSmrg 999925b89263SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 1000025b89263SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 10001a253d6aeSmrg 1000225b89263Smrgdnl aclocal-1.4 backwards compatibility: 1000325b89263Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 1000425b89263Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 10005a253d6aeSmrg 10006a253d6aeSmrg 10007a253d6aeSmrg 1000825b89263Smrg# _LT_ENABLE_STATIC([DEFAULT]) 1000925b89263Smrg# ---------------------------- 1001025b89263Smrg# implement the --enable-static flag, and support the `static' and 1001125b89263Smrg# `disable-static' LT_INIT options. 1001225b89263Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1001325b89263Smrgm4_define([_LT_ENABLE_STATIC], 1001425b89263Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 1001525b89263SmrgAC_ARG_ENABLE([static], 1001625b89263Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 1001725b89263Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 1001825b89263Smrg [p=${PACKAGE-default} 1001925b89263Smrg case $enableval in 1002025b89263Smrg yes) enable_static=yes ;; 1002125b89263Smrg no) enable_static=no ;; 1002225b89263Smrg *) 1002325b89263Smrg enable_static=no 1002425b89263Smrg # Look at the argument we got. We use all the common list separators. 1002525b89263Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1002625b89263Smrg for pkg in $enableval; do 1002725b89263Smrg IFS="$lt_save_ifs" 1002825b89263Smrg if test "X$pkg" = "X$p"; then 1002925b89263Smrg enable_static=yes 10030ea133fd7Smrg fi 1003125b89263Smrg done 1003225b89263Smrg IFS="$lt_save_ifs" 1003325b89263Smrg ;; 1003425b89263Smrg esac], 1003525b89263Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 10036a253d6aeSmrg 1003725b89263Smrg _LT_DECL([build_old_libs], [enable_static], [0], 1003825b89263Smrg [Whether or not to build static libraries]) 1003925b89263Smrg])# _LT_ENABLE_STATIC 10040a253d6aeSmrg 1004125b89263SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 1004225b89263SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 10043a253d6aeSmrg 1004425b89263Smrg# Old names: 1004525b89263SmrgAC_DEFUN([AC_ENABLE_STATIC], 1004625b89263Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 1004725b89263Smrg]) 10048a253d6aeSmrg 1004925b89263SmrgAC_DEFUN([AC_DISABLE_STATIC], 1005025b89263Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 1005125b89263Smrg]) 10052a253d6aeSmrg 1005325b89263SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 1005425b89263SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 10055a253d6aeSmrg 1005625b89263Smrgdnl aclocal-1.4 backwards compatibility: 1005725b89263Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 1005825b89263Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 10059a253d6aeSmrg 10060a253d6aeSmrg 10061a253d6aeSmrg 1006225b89263Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 1006325b89263Smrg# ---------------------------------- 1006425b89263Smrg# implement the --enable-fast-install flag, and support the `fast-install' 1006525b89263Smrg# and `disable-fast-install' LT_INIT options. 1006625b89263Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1006725b89263Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 1006825b89263Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 1006925b89263SmrgAC_ARG_ENABLE([fast-install], 1007025b89263Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 1007125b89263Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 1007225b89263Smrg [p=${PACKAGE-default} 1007325b89263Smrg case $enableval in 1007425b89263Smrg yes) enable_fast_install=yes ;; 1007525b89263Smrg no) enable_fast_install=no ;; 1007625b89263Smrg *) 1007725b89263Smrg enable_fast_install=no 1007825b89263Smrg # Look at the argument we got. We use all the common list separators. 1007925b89263Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1008025b89263Smrg for pkg in $enableval; do 1008125b89263Smrg IFS="$lt_save_ifs" 1008225b89263Smrg if test "X$pkg" = "X$p"; then 1008325b89263Smrg enable_fast_install=yes 1008425b89263Smrg fi 1008525b89263Smrg done 1008625b89263Smrg IFS="$lt_save_ifs" 1008725b89263Smrg ;; 1008825b89263Smrg esac], 1008925b89263Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 1009025b89263Smrg 1009125b89263Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 1009225b89263Smrg [Whether or not to optimize for fast installation])dnl 1009325b89263Smrg])# _LT_ENABLE_FAST_INSTALL 10094a253d6aeSmrg 1009525b89263SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 1009625b89263SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 10097a253d6aeSmrg 1009825b89263Smrg# Old names: 1009925b89263SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 1010025b89263Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 1010125b89263SmrgAC_DIAGNOSE([obsolete], 1010225b89263Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 1010325b89263Smrgthe `fast-install' option into LT_INIT's first parameter.]) 1010425b89263Smrg]) 10105a253d6aeSmrg 1010625b89263SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 1010725b89263Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 1010825b89263SmrgAC_DIAGNOSE([obsolete], 1010925b89263Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 1011025b89263Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 1011125b89263Smrg]) 10112a253d6aeSmrg 1011325b89263Smrgdnl aclocal-1.4 backwards compatibility: 1011425b89263Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 1011525b89263Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 10116a253d6aeSmrg 10117a253d6aeSmrg 1011825b89263Smrg# _LT_WITH_PIC([MODE]) 1011925b89263Smrg# -------------------- 1012025b89263Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 1012125b89263Smrg# LT_INIT options. 1012225b89263Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 1012325b89263Smrgm4_define([_LT_WITH_PIC], 1012425b89263Smrg[AC_ARG_WITH([pic], 1012525b89263Smrg [AS_HELP_STRING([--with-pic], 1012625b89263Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 1012725b89263Smrg [pic_mode="$withval"], 1012825b89263Smrg [pic_mode=default]) 10129a253d6aeSmrg 1013025b89263Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 10131a253d6aeSmrg 1013225b89263Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 1013325b89263Smrg])# _LT_WITH_PIC 10134a253d6aeSmrg 1013525b89263SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 1013625b89263SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 10137a253d6aeSmrg 1013825b89263Smrg# Old name: 1013925b89263SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 1014025b89263Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 1014125b89263SmrgAC_DIAGNOSE([obsolete], 1014225b89263Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1014325b89263Smrgput the `pic-only' option into LT_INIT's first parameter.]) 1014425b89263Smrg]) 10145a253d6aeSmrg 1014625b89263Smrgdnl aclocal-1.4 backwards compatibility: 1014725b89263Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 10148a253d6aeSmrg 10149ea133fd7Smrg 1015025b89263Smrgm4_define([_LTDL_MODE], []) 1015125b89263SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 1015225b89263Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 1015325b89263SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 1015425b89263Smrg [m4_define([_LTDL_MODE], [recursive])]) 1015525b89263SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 1015625b89263Smrg [m4_define([_LTDL_MODE], [subproject])]) 10157a253d6aeSmrg 1015825b89263Smrgm4_define([_LTDL_TYPE], []) 1015925b89263SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 1016025b89263Smrg [m4_define([_LTDL_TYPE], [installable])]) 1016125b89263SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 1016225b89263Smrg [m4_define([_LTDL_TYPE], [convenience])]) 10163a253d6aeSmrg 1016425b89263Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 10165a253d6aeSmrg# 1016625b89263Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 1016725b89263Smrg# Written by Gary V. Vaughan, 2004 1016825b89263Smrg# 1016925b89263Smrg# This file is free software; the Free Software Foundation gives 1017025b89263Smrg# unlimited permission to copy and/or distribute it, with or without 1017125b89263Smrg# modifications, as long as this notice is preserved. 10172a253d6aeSmrg 1017325b89263Smrg# serial 6 ltsugar.m4 10174a253d6aeSmrg 1017525b89263Smrg# This is to help aclocal find these macros, as it can't see m4_define. 1017625b89263SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 10177a253d6aeSmrg 10178a253d6aeSmrg 1017925b89263Smrg# lt_join(SEP, ARG1, [ARG2...]) 1018025b89263Smrg# ----------------------------- 1018125b89263Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 1018225b89263Smrg# associated separator. 1018325b89263Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 1018425b89263Smrg# versions in m4sugar had bugs. 1018525b89263Smrgm4_define([lt_join], 1018625b89263Smrg[m4_if([$#], [1], [], 1018725b89263Smrg [$#], [2], [[$2]], 1018825b89263Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 1018925b89263Smrgm4_define([_lt_join], 1019025b89263Smrg[m4_if([$#$2], [2], [], 1019125b89263Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 10192a253d6aeSmrg 10193a253d6aeSmrg 1019425b89263Smrg# lt_car(LIST) 1019525b89263Smrg# lt_cdr(LIST) 1019625b89263Smrg# ------------ 1019725b89263Smrg# Manipulate m4 lists. 1019825b89263Smrg# These macros are necessary as long as will still need to support 1019925b89263Smrg# Autoconf-2.59 which quotes differently. 1020025b89263Smrgm4_define([lt_car], [[$1]]) 1020125b89263Smrgm4_define([lt_cdr], 1020225b89263Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 1020325b89263Smrg [$#], 1, [], 1020425b89263Smrg [m4_dquote(m4_shift($@))])]) 1020525b89263Smrgm4_define([lt_unquote], $1) 10206a253d6aeSmrg 10207a253d6aeSmrg 1020825b89263Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 1020925b89263Smrg# ------------------------------------------ 1021025b89263Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 1021125b89263Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 1021225b89263Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 1021325b89263Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 1021425b89263Smrg# than defined and empty). 10215a253d6aeSmrg# 1021625b89263Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 1021725b89263Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 1021825b89263Smrgm4_define([lt_append], 1021925b89263Smrg[m4_define([$1], 1022025b89263Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 10221a253d6aeSmrg 10222a253d6aeSmrg 10223ea133fd7Smrg 1022425b89263Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 1022525b89263Smrg# ---------------------------------------------------------- 1022625b89263Smrg# Produce a SEP delimited list of all paired combinations of elements of 1022725b89263Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 1022825b89263Smrg# has the form PREFIXmINFIXSUFFIXn. 1022925b89263Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 1023025b89263Smrgm4_define([lt_combine], 1023125b89263Smrg[m4_if(m4_eval([$# > 3]), [1], 1023225b89263Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 1023325b89263Smrg[[m4_foreach([_Lt_prefix], [$2], 1023425b89263Smrg [m4_foreach([_Lt_suffix], 1023525b89263Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 1023625b89263Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 10237ea133fd7Smrg 10238a253d6aeSmrg 1023925b89263Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 1024025b89263Smrg# ----------------------------------------------------------------------- 1024125b89263Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 1024225b89263Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 1024325b89263Smrgm4_define([lt_if_append_uniq], 1024425b89263Smrg[m4_ifdef([$1], 1024525b89263Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 1024625b89263Smrg [lt_append([$1], [$2], [$3])$4], 1024725b89263Smrg [$5])], 1024825b89263Smrg [lt_append([$1], [$2], [$3])$4])]) 1024925b89263Smrg 1025025b89263Smrg 1025125b89263Smrg# lt_dict_add(DICT, KEY, VALUE) 1025225b89263Smrg# ----------------------------- 1025325b89263Smrgm4_define([lt_dict_add], 1025425b89263Smrg[m4_define([$1($2)], [$3])]) 1025525b89263Smrg 10256a253d6aeSmrg 1025725b89263Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 1025825b89263Smrg# -------------------------------------------- 1025925b89263Smrgm4_define([lt_dict_add_subkey], 1026025b89263Smrg[m4_define([$1($2:$3)], [$4])]) 10261ea133fd7Smrg 10262ea133fd7Smrg 1026325b89263Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 1026425b89263Smrg# ---------------------------------- 1026525b89263Smrgm4_define([lt_dict_fetch], 1026625b89263Smrg[m4_ifval([$3], 1026725b89263Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 1026825b89263Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 10269a253d6aeSmrg 10270a253d6aeSmrg 1027125b89263Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 1027225b89263Smrg# ----------------------------------------------------------------- 1027325b89263Smrgm4_define([lt_if_dict_fetch], 1027425b89263Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 1027525b89263Smrg [$5], 1027625b89263Smrg [$6])]) 10277a253d6aeSmrg 1027825b89263Smrg 1027925b89263Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 1028025b89263Smrg# -------------------------------------------------------------- 1028125b89263Smrgm4_define([lt_dict_filter], 1028225b89263Smrg[m4_if([$5], [], [], 1028325b89263Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 1028425b89263Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 1028525b89263Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 1028625b89263Smrg]) 1028725b89263Smrg 1028825b89263Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 10289ea133fd7Smrg# 1029025b89263Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 1029125b89263Smrg# Written by Scott James Remnant, 2004 10292ea133fd7Smrg# 1029325b89263Smrg# This file is free software; the Free Software Foundation gives 1029425b89263Smrg# unlimited permission to copy and/or distribute it, with or without 1029525b89263Smrg# modifications, as long as this notice is preserved. 10296a253d6aeSmrg 1029725b89263Smrg# Generated from ltversion.in. 10298ea133fd7Smrg 1029925b89263Smrg# serial 3175 ltversion.m4 1030025b89263Smrg# This file is part of GNU Libtool 10301a253d6aeSmrg 1030225b89263Smrgm4_define([LT_PACKAGE_VERSION], [2.2.10]) 1030325b89263Smrgm4_define([LT_PACKAGE_REVISION], [1.3175]) 1030425b89263Smrg 1030525b89263SmrgAC_DEFUN([LTVERSION_VERSION], 1030625b89263Smrg[macro_version='2.2.10' 1030725b89263Smrgmacro_revision='1.3175' 1030825b89263Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 1030925b89263Smrg_LT_DECL(, macro_revision, 0) 1031025b89263Smrg]) 1031125b89263Smrg 1031225b89263Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 10313ea133fd7Smrg# 1031425b89263Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 1031525b89263Smrg# Written by Scott James Remnant, 2004. 10316ea133fd7Smrg# 1031725b89263Smrg# This file is free software; the Free Software Foundation gives 1031825b89263Smrg# unlimited permission to copy and/or distribute it, with or without 1031925b89263Smrg# modifications, as long as this notice is preserved. 10320a253d6aeSmrg 1032125b89263Smrg# serial 5 lt~obsolete.m4 10322a253d6aeSmrg 1032325b89263Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 10324ea133fd7Smrg# 1032525b89263Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 1032625b89263Smrg# which have later been changed to m4_define as they aren't part of the 1032725b89263Smrg# exported API, or moved to Autoconf or Automake where they belong. 10328ea133fd7Smrg# 1032925b89263Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 1033025b89263Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 1033125b89263Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 1033225b89263Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 1033325b89263Smrg# and doesn't know about Autoconf macros at all.) 10334ea133fd7Smrg# 1033525b89263Smrg# So we provide this file, which has a silly filename so it's always 1033625b89263Smrg# included after everything else. This provides aclocal with the 1033725b89263Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 1033825b89263Smrg# because those macros already exist, or will be overwritten later. 1033925b89263Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 1034025b89263Smrg# 1034125b89263Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 1034225b89263Smrg# Yes, that means every name once taken will need to remain here until 1034325b89263Smrg# we give up compatibility with versions before 1.7, at which point 1034425b89263Smrg# we need to keep only those names which we still refer to. 1034525b89263Smrg 1034625b89263Smrg# This is to help aclocal find these macros, as it can't see m4_define. 1034725b89263SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 1034825b89263Smrg 1034925b89263Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 1035025b89263Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 1035125b89263Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 1035225b89263Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 1035325b89263Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 1035425b89263Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 1035525b89263Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 1035625b89263Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 1035725b89263Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 1035825b89263Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 1035925b89263Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 1036025b89263Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 1036125b89263Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 1036225b89263Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 1036325b89263Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 1036425b89263Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 1036525b89263Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 1036625b89263Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 1036725b89263Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 1036825b89263Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 1036925b89263Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 1037025b89263Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 1037125b89263Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 1037225b89263Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 1037325b89263Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 1037425b89263Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 1037525b89263Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 1037625b89263Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 1037725b89263Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 1037825b89263Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 1037925b89263Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 1038025b89263Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 1038125b89263Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 1038225b89263Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 1038325b89263Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 1038425b89263Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 1038525b89263Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 1038625b89263Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 1038725b89263Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 1038825b89263Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 1038925b89263Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 1039025b89263Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 1039125b89263Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 1039225b89263Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 1039325b89263Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 1039425b89263Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 1039525b89263Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 1039625b89263Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 1039725b89263Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 1039825b89263Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 1039925b89263Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 1040025b89263Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 1040125b89263Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 1040225b89263Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 1040325b89263Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 1040425b89263Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 1040525b89263Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 1040625b89263Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 1040725b89263Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 1040825b89263Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 1040925b89263Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 10410a253d6aeSmrg 10411