aclocal.m4 revision 57ee1794
157ee1794Smrg# generated automatically by aclocal 1.13.2 -*- Autoconf -*- 257ee1794Smrg 357ee1794Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4a253d6aeSmrg 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 1457ee1794Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15ea133fd7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16ea133fd7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1725b89263Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 1825b89263Smrg[m4_warning([this file was generated for autoconf 2.68. 19ea133fd7SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20ea133fd7SmrgIf you have problems, you may need to regenerate the build system entirely. 2157ee1794SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22a253d6aeSmrg 2357ee1794Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 24a253d6aeSmrg# 2525b89263Smrg# This file is free software; the Free Software Foundation 2625b89263Smrg# gives unlimited permission to copy and/or distribute it, 2725b89263Smrg# with or without modifications, as long as this notice is preserved. 2825b89263Smrg 2925b89263Smrg# AM_AUTOMAKE_VERSION(VERSION) 3025b89263Smrg# ---------------------------- 3125b89263Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3225b89263Smrg# generated from the m4 files accompanying Automake X.Y. 3325b89263Smrg# (This private macro should not be called outside this file.) 3425b89263SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3557ee1794Smrg[am__api_version='1.13' 3625b89263Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3725b89263Smrgdnl require some minimum version. Point them to the right macro. 3857ee1794Smrgm4_if([$1], [1.13.2], [], 3925b89263Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 4025b89263Smrg]) 4125b89263Smrg 4225b89263Smrg# _AM_AUTOCONF_VERSION(VERSION) 4325b89263Smrg# ----------------------------- 4425b89263Smrg# aclocal traces this macro to find the Autoconf version. 4525b89263Smrg# This is a private macro too. Using m4_define simplifies 4625b89263Smrg# the logic in aclocal, which can simply ignore this definition. 4725b89263Smrgm4_define([_AM_AUTOCONF_VERSION], []) 4825b89263Smrg 4925b89263Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 5025b89263Smrg# ------------------------------- 5125b89263Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5225b89263Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5325b89263SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5457ee1794Smrg[AM_AUTOMAKE_VERSION([1.13.2])dnl 5525b89263Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5625b89263Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5725b89263Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5825b89263Smrg 5925b89263Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6025b89263Smrg 6157ee1794Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 62a253d6aeSmrg# 6325b89263Smrg# This file is free software; the Free Software Foundation 6425b89263Smrg# gives unlimited permission to copy and/or distribute it, 6525b89263Smrg# with or without modifications, as long as this notice is preserved. 66ea133fd7Smrg 6725b89263Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6857ee1794Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 6957ee1794Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70a253d6aeSmrg# 7125b89263Smrg# Of course, Automake must honor this variable whenever it calls a 7225b89263Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7325b89263Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7425b89263Smrg# depending on how configure is run. This is pretty annoying, since 7525b89263Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7625b89263Smrg# source directory, any form will work fine, but in subdirectories a 7725b89263Smrg# relative path needs to be adjusted first. 78a253d6aeSmrg# 7925b89263Smrg# $ac_aux_dir/missing 8025b89263Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8125b89263Smrg# $top_srcdir/$ac_aux_dir/missing 8225b89263Smrg# fails if $ac_aux_dir is absolute, 8325b89263Smrg# fails when called from a subdirectory in a VPATH build with 8425b89263Smrg# a relative $ac_aux_dir 85a253d6aeSmrg# 8625b89263Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8725b89263Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8857ee1794Smrg# harmless because $srcdir is '.', but things will broke when you 8925b89263Smrg# start a VPATH build or use an absolute $srcdir. 90a253d6aeSmrg# 9125b89263Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9225b89263Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9325b89263Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9425b89263Smrg# and then we would define $MISSING as 9525b89263Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9625b89263Smrg# This will work as long as MISSING is not called from configure, because 9725b89263Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9825b89263Smrg# However there are other variables, like CC, which are often used in 9925b89263Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100a253d6aeSmrg# 10125b89263Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10225b89263Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10325b89263Smrg# configured tree to be moved without reconfiguration. 104a253d6aeSmrg 10525b89263SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10625b89263Smrg[dnl Rely on autoconf to set up CDPATH properly. 10725b89263SmrgAC_PREREQ([2.50])dnl 10825b89263Smrg# expand $ac_aux_dir to an absolute path 10925b89263Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 110ea133fd7Smrg]) 111a253d6aeSmrg 11225b89263Smrg# AM_CONDITIONAL -*- Autoconf -*- 113a253d6aeSmrg 11457ee1794Smrg# Copyright (C) 1997-2013 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# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12125b89263Smrg# ------------------------------------- 12225b89263Smrg# Define a conditional. 12325b89263SmrgAC_DEFUN([AM_CONDITIONAL], 12457ee1794Smrg[AC_PREREQ([2.52])dnl 12557ee1794Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12657ee1794Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12725b89263SmrgAC_SUBST([$1_TRUE])dnl 12825b89263SmrgAC_SUBST([$1_FALSE])dnl 12925b89263Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13025b89263Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13125b89263Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13225b89263Smrgif $2; then 13325b89263Smrg $1_TRUE= 13425b89263Smrg $1_FALSE='#' 13525b89263Smrgelse 13625b89263Smrg $1_TRUE='#' 13725b89263Smrg $1_FALSE= 13825b89263Smrgfi 13925b89263SmrgAC_CONFIG_COMMANDS_PRE( 14025b89263Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14125b89263Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14225b89263SmrgUsually this means the macro was only invoked conditionally.]]) 14325b89263Smrgfi])]) 144a253d6aeSmrg 14557ee1794Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 14625b89263Smrg# 14725b89263Smrg# This file is free software; the Free Software Foundation 14825b89263Smrg# gives unlimited permission to copy and/or distribute it, 14925b89263Smrg# with or without modifications, as long as this notice is preserved. 150a253d6aeSmrg 151a253d6aeSmrg 15257ee1794Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 15325b89263Smrg# written in clear, in which case automake, when reading aclocal.m4, 15425b89263Smrg# will think it sees a *use*, and therefore will trigger all it's 15525b89263Smrg# C support machinery. Also note that it means that autoscan, seeing 15625b89263Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 157ea133fd7Smrg 158ea133fd7Smrg 15925b89263Smrg# _AM_DEPENDENCIES(NAME) 160ea133fd7Smrg# ---------------------- 16125b89263Smrg# See how the compiler implements dependency checking. 16257ee1794Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 16325b89263Smrg# We try a few techniques and use that to set a single cache variable. 16425b89263Smrg# 16525b89263Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 16625b89263Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 16725b89263Smrg# dependency, and given that the user is not expected to run this macro, 16825b89263Smrg# just rely on AC_PROG_CC. 16925b89263SmrgAC_DEFUN([_AM_DEPENDENCIES], 17025b89263Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17125b89263SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17225b89263SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17325b89263SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 174ea133fd7Smrg 17557ee1794Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 17657ee1794Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 17757ee1794Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 17857ee1794Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 17957ee1794Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 18057ee1794Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18157ee1794Smrg [depcc="$$1" am_compiler_list=]) 182ea133fd7Smrg 18325b89263SmrgAC_CACHE_CHECK([dependency style of $depcc], 18425b89263Smrg [am_cv_$1_dependencies_compiler_type], 18525b89263Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18625b89263Smrg # We make a subdir and do the tests there. Otherwise we can end up 18725b89263Smrg # making bogus files that we don't know about and never remove. For 18825b89263Smrg # instance it was reported that on HP-UX the gcc test will end up 18957ee1794Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 19057ee1794Smrg # in D". 19157ee1794Smrg rm -rf conftest.dir 19225b89263Smrg mkdir conftest.dir 19325b89263Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19425b89263Smrg # using a relative directory. 19525b89263Smrg cp "$am_depcomp" conftest.dir 19625b89263Smrg cd conftest.dir 19725b89263Smrg # We will build objects and dependencies in a subdirectory because 19825b89263Smrg # it helps to detect inapplicable dependency modes. For instance 19925b89263Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20025b89263Smrg # side effect of compilation, but ICC will put the dependencies in 20125b89263Smrg # the current directory while Tru64 will put them in the object 20225b89263Smrg # directory. 20325b89263Smrg mkdir sub 204a253d6aeSmrg 20525b89263Smrg am_cv_$1_dependencies_compiler_type=none 20625b89263Smrg if test "$am_compiler_list" = ""; then 20725b89263Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 208ea133fd7Smrg fi 20925b89263Smrg am__universal=false 21025b89263Smrg m4_case([$1], [CC], 21125b89263Smrg [case " $depcc " in #( 21225b89263Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21325b89263Smrg esac], 21425b89263Smrg [CXX], 21525b89263Smrg [case " $depcc " in #( 21625b89263Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21725b89263Smrg esac]) 218a253d6aeSmrg 21925b89263Smrg for depmode in $am_compiler_list; do 22025b89263Smrg # Setup a source with many dependencies, because some compilers 22125b89263Smrg # like to wrap large dependency lists on column 80 (with \), and 22225b89263Smrg # we should not choose a depcomp mode which is confused by this. 22325b89263Smrg # 22425b89263Smrg # We need to recreate these files for each test, as the compiler may 22525b89263Smrg # overwrite some of them when testing with obscure command lines. 22625b89263Smrg # This happens at least with the AIX C compiler. 22725b89263Smrg : > sub/conftest.c 22825b89263Smrg for i in 1 2 3 4 5 6; do 22925b89263Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23057ee1794Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 23157ee1794Smrg # Solaris 10 /bin/sh. 23257ee1794Smrg echo '/* dummy */' > sub/conftst$i.h 23325b89263Smrg done 23425b89263Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 235a253d6aeSmrg 23657ee1794Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 23725b89263Smrg # mode. It turns out that the SunPro C++ compiler does not properly 23857ee1794Smrg # handle '-M -o', and we need to detect this. Also, some Intel 23957ee1794Smrg # versions had trouble with output in subdirs. 24025b89263Smrg am__obj=sub/conftest.${OBJEXT-o} 24125b89263Smrg am__minus_obj="-o $am__obj" 24225b89263Smrg case $depmode in 24325b89263Smrg gcc) 24425b89263Smrg # This depmode causes a compiler race in universal mode. 24525b89263Smrg test "$am__universal" = false || continue 24625b89263Smrg ;; 24725b89263Smrg nosideeffect) 24857ee1794Smrg # After this tag, mechanisms are not by side-effect, so they'll 24957ee1794Smrg # only be used when explicitly requested. 25025b89263Smrg if test "x$enable_dependency_tracking" = xyes; then 25125b89263Smrg continue 25225b89263Smrg else 25325b89263Smrg break 25425b89263Smrg fi 25525b89263Smrg ;; 25657ee1794Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 25757ee1794Smrg # This compiler won't grok '-c -o', but also, the minuso test has 25825b89263Smrg # not run yet. These depmodes are late enough in the game, and 25925b89263Smrg # so weak that their functioning should not be impacted. 26025b89263Smrg am__obj=conftest.${OBJEXT-o} 26125b89263Smrg am__minus_obj= 26225b89263Smrg ;; 26325b89263Smrg none) break ;; 26425b89263Smrg esac 26525b89263Smrg if depmode=$depmode \ 26625b89263Smrg source=sub/conftest.c object=$am__obj \ 26725b89263Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 26825b89263Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 26925b89263Smrg >/dev/null 2>conftest.err && 27025b89263Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27125b89263Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27225b89263Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27325b89263Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27425b89263Smrg # icc doesn't choke on unknown options, it will just issue warnings 27525b89263Smrg # or remarks (even with -Werror). So we grep stderr for any message 27625b89263Smrg # that says an option was ignored or not supported. 27725b89263Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 27825b89263Smrg # icc: Command line warning: ignoring option '-M'; no argument required 27925b89263Smrg # The diagnosis changed in icc 8.0: 28025b89263Smrg # icc: Command line remark: option '-MP' not supported 28125b89263Smrg if (grep 'ignoring option' conftest.err || 28225b89263Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28325b89263Smrg am_cv_$1_dependencies_compiler_type=$depmode 28425b89263Smrg break 28525b89263Smrg fi 28625b89263Smrg fi 28725b89263Smrg done 288a253d6aeSmrg 28925b89263Smrg cd .. 29025b89263Smrg rm -rf conftest.dir 29125b89263Smrgelse 29225b89263Smrg am_cv_$1_dependencies_compiler_type=none 29325b89263Smrgfi 29425b89263Smrg]) 29525b89263SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29625b89263SmrgAM_CONDITIONAL([am__fastdep$1], [ 29725b89263Smrg test "x$enable_dependency_tracking" != xno \ 29825b89263Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 29925b89263Smrg]) 300a253d6aeSmrg 301a253d6aeSmrg 30225b89263Smrg# AM_SET_DEPDIR 30325b89263Smrg# ------------- 30425b89263Smrg# Choose a directory name for dependency files. 30557ee1794Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 30625b89263SmrgAC_DEFUN([AM_SET_DEPDIR], 30725b89263Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 30825b89263SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 30925b89263Smrg]) 310a253d6aeSmrg 311a253d6aeSmrg 31225b89263Smrg# AM_DEP_TRACK 31325b89263Smrg# ------------ 31425b89263SmrgAC_DEFUN([AM_DEP_TRACK], 31557ee1794Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 31657ee1794SmrgAS_HELP_STRING( 31757ee1794Smrg [--enable-dependency-tracking], 31857ee1794Smrg [do not reject slow dependency extractors]) 31957ee1794SmrgAS_HELP_STRING( 32057ee1794Smrg [--disable-dependency-tracking], 32157ee1794Smrg [speeds up one-time build])]) 32225b89263Smrgif test "x$enable_dependency_tracking" != xno; then 32325b89263Smrg am_depcomp="$ac_aux_dir/depcomp" 32425b89263Smrg AMDEPBACKSLASH='\' 32557ee1794Smrg am__nodep='_no' 32625b89263Smrgfi 32725b89263SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32825b89263SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32925b89263Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 33057ee1794SmrgAC_SUBST([am__nodep])dnl 33157ee1794Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 33225b89263Smrg]) 333a253d6aeSmrg 33425b89263Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 335a253d6aeSmrg 33657ee1794Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 33725b89263Smrg# 33825b89263Smrg# This file is free software; the Free Software Foundation 33925b89263Smrg# gives unlimited permission to copy and/or distribute it, 34025b89263Smrg# with or without modifications, as long as this notice is preserved. 341a253d6aeSmrg 342ea133fd7Smrg 34325b89263Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 344ea133fd7Smrg# ------------------------------ 34525b89263SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34625b89263Smrg[{ 34757ee1794Smrg # Older Autoconf quotes --file arguments for eval, but not when files 34825b89263Smrg # are listed without --file. Let's play safe and only enable the eval 34925b89263Smrg # if we detect the quoting. 35025b89263Smrg case $CONFIG_FILES in 35125b89263Smrg *\'*) eval set x "$CONFIG_FILES" ;; 35225b89263Smrg *) set x $CONFIG_FILES ;; 35325b89263Smrg esac 35425b89263Smrg shift 35525b89263Smrg for mf 35625b89263Smrg do 35725b89263Smrg # Strip MF so we end up with the name of the file. 35825b89263Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35925b89263Smrg # Check whether this is an Automake generated Makefile or not. 36057ee1794Smrg # We used to match only the files named 'Makefile.in', but 36125b89263Smrg # some people rename them; so instead we look at the file content. 36225b89263Smrg # Grep'ing the first line is not enough: some people post-process 36325b89263Smrg # each Makefile.in and add a new line on top of each file to say so. 36425b89263Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36525b89263Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36625b89263Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36725b89263Smrg dirpart=`AS_DIRNAME("$mf")` 36825b89263Smrg else 36925b89263Smrg continue 37025b89263Smrg fi 37125b89263Smrg # Extract the definition of DEPDIR, am__include, and am__quote 37257ee1794Smrg # from the Makefile without running 'make'. 37325b89263Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37425b89263Smrg test -z "$DEPDIR" && continue 37525b89263Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37657ee1794Smrg test -z "$am__include" && continue 37725b89263Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37825b89263Smrg # Find all dependency output files, they are included files with 37925b89263Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 38025b89263Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38125b89263Smrg # expansion. 38225b89263Smrg for file in `sed -n " 38325b89263Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38457ee1794Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 38525b89263Smrg # Make sure the directory exists. 38625b89263Smrg test -f "$dirpart/$file" && continue 38725b89263Smrg fdir=`AS_DIRNAME(["$file"])` 38825b89263Smrg AS_MKDIR_P([$dirpart/$fdir]) 38925b89263Smrg # echo "creating $dirpart/$file" 39025b89263Smrg echo '# dummy' > "$dirpart/$file" 39125b89263Smrg done 39225b89263Smrg done 39325b89263Smrg} 39425b89263Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 395ea133fd7Smrg 396ea133fd7Smrg 39725b89263Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39825b89263Smrg# ----------------------------- 39925b89263Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 40025b89263Smrg# 40125b89263Smrg# This code is only required when automatic dependency tracking 40257ee1794Smrg# is enabled. FIXME. This creates each '.P' file that we will 40325b89263Smrg# need in order to bootstrap the dependency handling code. 40425b89263SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40525b89263Smrg[AC_CONFIG_COMMANDS([depfiles], 40625b89263Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40725b89263Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 408a253d6aeSmrg]) 409ea133fd7Smrg 41025b89263Smrg# Do all the work for Automake. -*- Autoconf -*- 411ea133fd7Smrg 41257ee1794Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 41325b89263Smrg# 41425b89263Smrg# This file is free software; the Free Software Foundation 41525b89263Smrg# gives unlimited permission to copy and/or distribute it, 41625b89263Smrg# with or without modifications, as long as this notice is preserved. 417ea133fd7Smrg 41825b89263Smrg# This macro actually does too much. Some checks are only needed if 41925b89263Smrg# your package does certain things. But this isn't really a big deal. 420a253d6aeSmrg 42125b89263Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 42225b89263Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 42325b89263Smrg# ----------------------------------------------- 42425b89263Smrg# The call with PACKAGE and VERSION arguments is the old style 42525b89263Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 42625b89263Smrg# and VERSION should now be passed to AC_INIT and removed from 42725b89263Smrg# the call to AM_INIT_AUTOMAKE. 42825b89263Smrg# We support both call styles for the transition. After 42925b89263Smrg# the next Automake release, Autoconf can make the AC_INIT 43025b89263Smrg# arguments mandatory, and then we can depend on a new Autoconf 43125b89263Smrg# release and drop the old call support. 43225b89263SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 43357ee1794Smrg[AC_PREREQ([2.65])dnl 43425b89263Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 43525b89263Smrgdnl the ones we care about. 43625b89263Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 43725b89263SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 43825b89263SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 43925b89263Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 44025b89263Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 44125b89263Smrg # is not polluted with repeated "-I." 44225b89263Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 44325b89263Smrg # test to see if srcdir already configured 44425b89263Smrg if test -f $srcdir/config.status; then 44525b89263Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 44625b89263Smrg fi 44725b89263Smrgfi 448a253d6aeSmrg 44925b89263Smrg# test whether we have cygpath 45025b89263Smrgif test -z "$CYGPATH_W"; then 45125b89263Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 45225b89263Smrg CYGPATH_W='cygpath -w' 45325b89263Smrg else 45425b89263Smrg CYGPATH_W=echo 45525b89263Smrg fi 45625b89263Smrgfi 45725b89263SmrgAC_SUBST([CYGPATH_W]) 458a253d6aeSmrg 45925b89263Smrg# Define the identity of the package. 46025b89263Smrgdnl Distinguish between old-style and new-style calls. 46125b89263Smrgm4_ifval([$2], 46257ee1794Smrg[AC_DIAGNOSE([obsolete], 46357ee1794Smrg [$0: two- and three-arguments forms are deprecated.]) 46457ee1794Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 46525b89263Smrg AC_SUBST([PACKAGE], [$1])dnl 46625b89263Smrg AC_SUBST([VERSION], [$2])], 46725b89263Smrg[_AM_SET_OPTIONS([$1])dnl 46825b89263Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 46957ee1794Smrgm4_if( 47057ee1794Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 47157ee1794Smrg [ok:ok],, 47225b89263Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 47325b89263Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 47425b89263Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 475a253d6aeSmrg 47625b89263Smrg_AM_IF_OPTION([no-define],, 47757ee1794Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 47857ee1794Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 479a253d6aeSmrg 48025b89263Smrg# Some tools Automake needs. 48125b89263SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 48225b89263SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 48357ee1794SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 48457ee1794SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 48557ee1794SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 48657ee1794SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 48757ee1794SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 48825b89263SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 48925b89263SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 49057ee1794SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 49157ee1794Smrg# For better backward compatibility. To be removed once Automake 1.9.x 49257ee1794Smrg# dies out for good. For more background, see: 49357ee1794Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 49457ee1794Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 49557ee1794SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 49625b89263Smrg# We need awk for the "check" target. The system "awk" is bad on 49725b89263Smrg# some platforms. 49825b89263SmrgAC_REQUIRE([AC_PROG_AWK])dnl 49925b89263SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50025b89263SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50125b89263Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50225b89263Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50325b89263Smrg [_AM_PROG_TAR([v7])])]) 50425b89263Smrg_AM_IF_OPTION([no-dependencies],, 50525b89263Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 50657ee1794Smrg [_AM_DEPENDENCIES([CC])], 50757ee1794Smrg [m4_define([AC_PROG_CC], 50857ee1794Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 50925b89263SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51057ee1794Smrg [_AM_DEPENDENCIES([CXX])], 51157ee1794Smrg [m4_define([AC_PROG_CXX], 51257ee1794Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 51325b89263SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51457ee1794Smrg [_AM_DEPENDENCIES([OBJC])], 51557ee1794Smrg [m4_define([AC_PROG_OBJC], 51657ee1794Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 51757ee1794SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 51857ee1794Smrg [_AM_DEPENDENCIES([OBJCXX])], 51957ee1794Smrg [m4_define([AC_PROG_OBJCXX], 52057ee1794Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 52125b89263Smrg]) 52257ee1794SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 52357ee1794Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 52457ee1794Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 52557ee1794Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 52625b89263SmrgAC_CONFIG_COMMANDS_PRE(dnl 52725b89263Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52825b89263Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 529ea133fd7Smrg]) 530a253d6aeSmrg 53157ee1794Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53225b89263Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53325b89263Smrgdnl mangled by Autoconf and run in a shell conditional statement. 53425b89263Smrgm4_define([_AC_COMPILER_EXEEXT], 53525b89263Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 536a253d6aeSmrg 537a253d6aeSmrg 53825b89263Smrg# When config.status generates a header, we must update the stamp-h file. 53925b89263Smrg# This file resides in the same directory as the config header 54025b89263Smrg# that is generated. The stamp files are numbered to have different names. 541a253d6aeSmrg 54225b89263Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 54325b89263Smrg# loop where config.status creates the headers, so we can generate 54425b89263Smrg# our stamp files there. 54525b89263SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 54625b89263Smrg[# Compute $1's index in $config_headers. 54725b89263Smrg_am_arg=$1 54825b89263Smrg_am_stamp_count=1 54925b89263Smrgfor _am_header in $config_headers :; do 55025b89263Smrg case $_am_header in 55125b89263Smrg $_am_arg | $_am_arg:* ) 55225b89263Smrg break ;; 55325b89263Smrg * ) 55425b89263Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 55525b89263Smrg esac 55625b89263Smrgdone 55725b89263Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 558a253d6aeSmrg 55957ee1794Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 56025b89263Smrg# 56125b89263Smrg# This file is free software; the Free Software Foundation 56225b89263Smrg# gives unlimited permission to copy and/or distribute it, 56325b89263Smrg# with or without modifications, as long as this notice is preserved. 564a253d6aeSmrg 56525b89263Smrg# AM_PROG_INSTALL_SH 56625b89263Smrg# ------------------ 56725b89263Smrg# Define $install_sh. 56825b89263SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 56925b89263Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57025b89263Smrgif test x"${install_sh}" != xset; then 57125b89263Smrg case $am_aux_dir in 57225b89263Smrg *\ * | *\ *) 57325b89263Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57425b89263Smrg *) 57525b89263Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57625b89263Smrg esac 57725b89263Smrgfi 57857ee1794SmrgAC_SUBST([install_sh])]) 579a253d6aeSmrg 58057ee1794Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 58125b89263Smrg# 58225b89263Smrg# This file is free software; the Free Software Foundation 58325b89263Smrg# gives unlimited permission to copy and/or distribute it, 58425b89263Smrg# with or without modifications, as long as this notice is preserved. 585a253d6aeSmrg 58625b89263Smrg# Check whether the underlying file-system supports filenames 58725b89263Smrg# with a leading dot. For instance MS-DOS doesn't. 58825b89263SmrgAC_DEFUN([AM_SET_LEADING_DOT], 58925b89263Smrg[rm -rf .tst 2>/dev/null 59025b89263Smrgmkdir .tst 2>/dev/null 59125b89263Smrgif test -d .tst; then 59225b89263Smrg am__leading_dot=. 59325b89263Smrgelse 59425b89263Smrg am__leading_dot=_ 59525b89263Smrgfi 59625b89263Smrgrmdir .tst 2>/dev/null 59725b89263SmrgAC_SUBST([am__leading_dot])]) 598a253d6aeSmrg 59925b89263Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 60025b89263Smrg 60157ee1794Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 602a253d6aeSmrg# 60325b89263Smrg# This file is free software; the Free Software Foundation 60425b89263Smrg# gives unlimited permission to copy and/or distribute it, 60525b89263Smrg# with or without modifications, as long as this notice is preserved. 606a253d6aeSmrg 60725b89263Smrg# AM_MAKE_INCLUDE() 60825b89263Smrg# ----------------- 60925b89263Smrg# Check to see how make treats includes. 61025b89263SmrgAC_DEFUN([AM_MAKE_INCLUDE], 61125b89263Smrg[am_make=${MAKE-make} 61225b89263Smrgcat > confinc << 'END' 61325b89263Smrgam__doit: 61425b89263Smrg @echo this is the am__doit target 61525b89263Smrg.PHONY: am__doit 61625b89263SmrgEND 61725b89263Smrg# If we don't find an include directive, just comment out the code. 61825b89263SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 61925b89263Smrgam__include="#" 62025b89263Smrgam__quote= 62125b89263Smrg_am_result=none 62225b89263Smrg# First try GNU make style include. 62325b89263Smrgecho "include confinc" > confmf 62457ee1794Smrg# Ignore all kinds of additional output from 'make'. 62525b89263Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 62625b89263Smrg*the\ am__doit\ target*) 62725b89263Smrg am__include=include 62825b89263Smrg am__quote= 62925b89263Smrg _am_result=GNU 63025b89263Smrg ;; 63125b89263Smrgesac 63225b89263Smrg# Now try BSD make style include. 63325b89263Smrgif test "$am__include" = "#"; then 63425b89263Smrg echo '.include "confinc"' > confmf 63525b89263Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 63625b89263Smrg *the\ am__doit\ target*) 63725b89263Smrg am__include=.include 63825b89263Smrg am__quote="\"" 63925b89263Smrg _am_result=BSD 64025b89263Smrg ;; 64125b89263Smrg esac 64225b89263Smrgfi 64325b89263SmrgAC_SUBST([am__include]) 64425b89263SmrgAC_SUBST([am__quote]) 64525b89263SmrgAC_MSG_RESULT([$_am_result]) 64625b89263Smrgrm -f confinc confmf 64725b89263Smrg]) 648ea133fd7Smrg 64925b89263Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 650ea133fd7Smrg 65157ee1794Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 65225b89263Smrg# 65325b89263Smrg# This file is free software; the Free Software Foundation 65425b89263Smrg# gives unlimited permission to copy and/or distribute it, 65525b89263Smrg# with or without modifications, as long as this notice is preserved. 656ea133fd7Smrg 65725b89263Smrg# AM_MISSING_PROG(NAME, PROGRAM) 658a253d6aeSmrg# ------------------------------ 65925b89263SmrgAC_DEFUN([AM_MISSING_PROG], 66025b89263Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 66125b89263Smrg$1=${$1-"${am_missing_run}$2"} 66225b89263SmrgAC_SUBST($1)]) 663ea133fd7Smrg 66425b89263Smrg# AM_MISSING_HAS_RUN 66525b89263Smrg# ------------------ 66657ee1794Smrg# Define MISSING if not defined so far and test if it is modern enough. 66757ee1794Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 66825b89263SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 66925b89263Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 67025b89263SmrgAC_REQUIRE_AUX_FILE([missing])dnl 67125b89263Smrgif test x"${MISSING+set}" != xset; then 67225b89263Smrg case $am_aux_dir in 67325b89263Smrg *\ * | *\ *) 67425b89263Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 67525b89263Smrg *) 67625b89263Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 67725b89263Smrg esac 67825b89263Smrgfi 67925b89263Smrg# Use eval to expand $SHELL 68057ee1794Smrgif eval "$MISSING --is-lightweight"; then 68157ee1794Smrg am_missing_run="$MISSING " 68225b89263Smrgelse 68325b89263Smrg am_missing_run= 68457ee1794Smrg AC_MSG_WARN(['missing' script is too old or missing]) 68525b89263Smrgfi 68625b89263Smrg]) 687ea133fd7Smrg 68825b89263Smrg# Helper functions for option handling. -*- Autoconf -*- 689a253d6aeSmrg 69057ee1794Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 69125b89263Smrg# 69225b89263Smrg# This file is free software; the Free Software Foundation 69325b89263Smrg# gives unlimited permission to copy and/or distribute it, 69425b89263Smrg# with or without modifications, as long as this notice is preserved. 695ea133fd7Smrg 69625b89263Smrg# _AM_MANGLE_OPTION(NAME) 69725b89263Smrg# ----------------------- 69825b89263SmrgAC_DEFUN([_AM_MANGLE_OPTION], 69925b89263Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 700a253d6aeSmrg 70125b89263Smrg# _AM_SET_OPTION(NAME) 70257ee1794Smrg# -------------------- 70325b89263Smrg# Set option NAME. Presently that only means defining a flag for this option. 70425b89263SmrgAC_DEFUN([_AM_SET_OPTION], 70557ee1794Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 706a253d6aeSmrg 70725b89263Smrg# _AM_SET_OPTIONS(OPTIONS) 70857ee1794Smrg# ------------------------ 70925b89263Smrg# OPTIONS is a space-separated list of Automake options. 71025b89263SmrgAC_DEFUN([_AM_SET_OPTIONS], 71125b89263Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 712a253d6aeSmrg 71325b89263Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 71425b89263Smrg# ------------------------------------------- 71525b89263Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 71625b89263SmrgAC_DEFUN([_AM_IF_OPTION], 71725b89263Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 718a253d6aeSmrg 71925b89263Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 720a253d6aeSmrg 72157ee1794Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 72225b89263Smrg# 72325b89263Smrg# This file is free software; the Free Software Foundation 72425b89263Smrg# gives unlimited permission to copy and/or distribute it, 72525b89263Smrg# with or without modifications, as long as this notice is preserved. 726a253d6aeSmrg 72725b89263Smrg# AM_SANITY_CHECK 72825b89263Smrg# --------------- 72925b89263SmrgAC_DEFUN([AM_SANITY_CHECK], 73025b89263Smrg[AC_MSG_CHECKING([whether build environment is sane]) 73125b89263Smrg# Reject unsafe characters in $srcdir or the absolute working directory 73225b89263Smrg# name. Accept space and tab only in the latter. 73325b89263Smrgam_lf=' 73425b89263Smrg' 73525b89263Smrgcase `pwd` in 73625b89263Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 73725b89263Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 73825b89263Smrgesac 73925b89263Smrgcase $srcdir in 74025b89263Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 74157ee1794Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 74225b89263Smrgesac 743ea133fd7Smrg 74457ee1794Smrg# Do 'set' in a subshell so we don't clobber the current shell's 74525b89263Smrg# arguments. Must try -L first in case configure is actually a 74625b89263Smrg# symlink; some systems play weird games with the mod time of symlinks 74725b89263Smrg# (eg FreeBSD returns the mod time of the symlink's containing 74825b89263Smrg# directory). 74925b89263Smrgif ( 75057ee1794Smrg am_has_slept=no 75157ee1794Smrg for am_try in 1 2; do 75257ee1794Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 75357ee1794Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 75457ee1794Smrg if test "$[*]" = "X"; then 75557ee1794Smrg # -L didn't work. 75657ee1794Smrg set X `ls -t "$srcdir/configure" conftest.file` 75757ee1794Smrg fi 75857ee1794Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 75957ee1794Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 76057ee1794Smrg 76157ee1794Smrg # If neither matched, then we have a broken ls. This can happen 76257ee1794Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 76357ee1794Smrg # broken ls alias from the environment. This has actually 76457ee1794Smrg # happened. Such a system could not be considered "sane". 76557ee1794Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 76657ee1794Smrg alias in your environment]) 76757ee1794Smrg fi 76857ee1794Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 76957ee1794Smrg break 77057ee1794Smrg fi 77157ee1794Smrg # Just in case. 77257ee1794Smrg sleep 1 77357ee1794Smrg am_has_slept=yes 77457ee1794Smrg done 77525b89263Smrg test "$[2]" = conftest.file 77625b89263Smrg ) 77725b89263Smrgthen 77825b89263Smrg # Ok. 77925b89263Smrg : 78025b89263Smrgelse 78125b89263Smrg AC_MSG_ERROR([newly created file is older than distributed files! 78225b89263SmrgCheck your system clock]) 783ea133fd7Smrgfi 78457ee1794SmrgAC_MSG_RESULT([yes]) 78557ee1794Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 78657ee1794Smrg# generated files are strictly newer. 78757ee1794Smrgam_sleep_pid= 78857ee1794Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 78957ee1794Smrg ( sleep 1 ) & 79057ee1794Smrg am_sleep_pid=$! 79157ee1794Smrgfi 79257ee1794SmrgAC_CONFIG_COMMANDS_PRE( 79357ee1794Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 79457ee1794Smrg if test -n "$am_sleep_pid"; then 79557ee1794Smrg # Hide warnings about reused PIDs. 79657ee1794Smrg wait $am_sleep_pid 2>/dev/null 79757ee1794Smrg fi 79857ee1794Smrg AC_MSG_RESULT([done])]) 79957ee1794Smrgrm -f conftest.file 80057ee1794Smrg]) 801ea133fd7Smrg 80257ee1794Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 80325b89263Smrg# 80425b89263Smrg# This file is free software; the Free Software Foundation 80525b89263Smrg# gives unlimited permission to copy and/or distribute it, 80625b89263Smrg# with or without modifications, as long as this notice is preserved. 807a253d6aeSmrg 80825b89263Smrg# AM_SILENT_RULES([DEFAULT]) 80925b89263Smrg# -------------------------- 81025b89263Smrg# Enable less verbose build rules; with the default set to DEFAULT 81157ee1794Smrg# ("yes" being less verbose, "no" or empty being verbose). 81225b89263SmrgAC_DEFUN([AM_SILENT_RULES], 81357ee1794Smrg[AC_ARG_ENABLE([silent-rules], [dnl 81457ee1794SmrgAS_HELP_STRING( 81557ee1794Smrg [--enable-silent-rules], 81657ee1794Smrg [less verbose build output (undo: "make V=1")]) 81757ee1794SmrgAS_HELP_STRING( 81857ee1794Smrg [--disable-silent-rules], 81957ee1794Smrg [verbose build output (undo: "make V=0")])dnl 82057ee1794Smrg]) 82157ee1794Smrgcase $enable_silent_rules in @%:@ ((( 82257ee1794Smrg yes) AM_DEFAULT_VERBOSITY=0;; 82357ee1794Smrg no) AM_DEFAULT_VERBOSITY=1;; 82457ee1794Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 82525b89263Smrgesac 82657ee1794Smrgdnl 82757ee1794Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 82857ee1794Smrgdnl do not support nested variable expansions. 82957ee1794Smrgdnl See automake bug#9928 and bug#10237. 83057ee1794Smrgam_make=${MAKE-make} 83157ee1794SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 83257ee1794Smrg [am_cv_make_support_nested_variables], 83357ee1794Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 83457ee1794SmrgBAR0=false 83557ee1794SmrgBAR1=true 83657ee1794SmrgV=1 83757ee1794Smrgam__doit: 83857ee1794Smrg @$(TRUE) 83957ee1794Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 84057ee1794Smrg am_cv_make_support_nested_variables=yes 84157ee1794Smrgelse 84257ee1794Smrg am_cv_make_support_nested_variables=no 84357ee1794Smrgfi]) 84457ee1794Smrgif test $am_cv_make_support_nested_variables = yes; then 84557ee1794Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 84657ee1794Smrg AM_V='$(V)' 84757ee1794Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 84857ee1794Smrgelse 84957ee1794Smrg AM_V=$AM_DEFAULT_VERBOSITY 85057ee1794Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 85157ee1794Smrgfi 85257ee1794SmrgAC_SUBST([AM_V])dnl 85357ee1794SmrgAM_SUBST_NOTMAKE([AM_V])dnl 85457ee1794SmrgAC_SUBST([AM_DEFAULT_V])dnl 85557ee1794SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 85625b89263SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 85725b89263SmrgAM_BACKSLASH='\' 85825b89263SmrgAC_SUBST([AM_BACKSLASH])dnl 85925b89263Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 86025b89263Smrg]) 861a253d6aeSmrg 86257ee1794Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 863a253d6aeSmrg# 86425b89263Smrg# This file is free software; the Free Software Foundation 86525b89263Smrg# gives unlimited permission to copy and/or distribute it, 86625b89263Smrg# with or without modifications, as long as this notice is preserved. 867ea133fd7Smrg 86825b89263Smrg# AM_PROG_INSTALL_STRIP 86925b89263Smrg# --------------------- 87057ee1794Smrg# One issue with vendor 'install' (even GNU) is that you can't 87125b89263Smrg# specify the program used to strip binaries. This is especially 87225b89263Smrg# annoying in cross-compiling environments, where the build's strip 87325b89263Smrg# is unlikely to handle the host's binaries. 87425b89263Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 87557ee1794Smrg# always use install-sh in "make install-strip", and initialize 87625b89263Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 87725b89263SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 87825b89263Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 87957ee1794Smrg# Installed binaries are usually stripped using 'strip' when the user 88057ee1794Smrg# run "make install-strip". However 'strip' might not be the right 88125b89263Smrg# tool to use in cross-compilation environments, therefore Automake 88257ee1794Smrg# will honor the 'STRIP' environment variable to overrule this program. 88357ee1794Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 88425b89263Smrgif test "$cross_compiling" != no; then 88525b89263Smrg AC_CHECK_TOOL([STRIP], [strip], :) 886a253d6aeSmrgfi 88725b89263SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 88825b89263SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 889a253d6aeSmrg 89057ee1794Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 89125b89263Smrg# 89225b89263Smrg# This file is free software; the Free Software Foundation 89325b89263Smrg# gives unlimited permission to copy and/or distribute it, 89425b89263Smrg# with or without modifications, as long as this notice is preserved. 895a253d6aeSmrg 89625b89263Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 89725b89263Smrg# --------------------------- 89825b89263Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 89925b89263Smrg# This macro is traced by Automake. 90025b89263SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 901a253d6aeSmrg 90225b89263Smrg# AM_SUBST_NOTMAKE(VARIABLE) 90357ee1794Smrg# -------------------------- 90425b89263Smrg# Public sister of _AM_SUBST_NOTMAKE. 90525b89263SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 906a253d6aeSmrg 90725b89263Smrg# Check how to create a tarball. -*- Autoconf -*- 908a253d6aeSmrg 90957ee1794Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 91025b89263Smrg# 91125b89263Smrg# This file is free software; the Free Software Foundation 91225b89263Smrg# gives unlimited permission to copy and/or distribute it, 91325b89263Smrg# with or without modifications, as long as this notice is preserved. 914a253d6aeSmrg 91525b89263Smrg# _AM_PROG_TAR(FORMAT) 91625b89263Smrg# -------------------- 91725b89263Smrg# Check how to create a tarball in format FORMAT. 91857ee1794Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 91925b89263Smrg# 92025b89263Smrg# Substitute a variable $(am__tar) that is a command 92125b89263Smrg# writing to stdout a FORMAT-tarball containing the directory 92225b89263Smrg# $tardir. 92325b89263Smrg# tardir=directory && $(am__tar) > result.tar 92425b89263Smrg# 92525b89263Smrg# Substitute a variable $(am__untar) that extract such 92625b89263Smrg# a tarball read from stdin. 92725b89263Smrg# $(am__untar) < result.tar 92806f32fbeSmrg# 92957ee1794SmrgAC_DEFUN([_AM_PROG_TAR], 93057ee1794Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 93157ee1794Smrg# in the wild :-( We should find a proper way to deprecate it ... 93257ee1794SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 933a253d6aeSmrg 93457ee1794Smrg# We'll loop over all known methods to create a tar archive until one works. 93557ee1794Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 936a253d6aeSmrg 93757ee1794Smrgm4_if([$1], [v7], 93857ee1794Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 93957ee1794Smrg 94057ee1794Smrg [m4_case([$1], 94157ee1794Smrg [ustar], 94257ee1794Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 94357ee1794Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 94457ee1794Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 94557ee1794Smrg # and bug#13588). 94657ee1794Smrg am_max_uid=2097151 # 2^21 - 1 94757ee1794Smrg am_max_gid=$am_max_uid 94857ee1794Smrg # The $UID and $GID variables are not portable, so we need to resort 94957ee1794Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 95057ee1794Smrg # below are definitely unexpected, so allow the users to see them 95157ee1794Smrg # (that is, avoid stderr redirection). 95257ee1794Smrg am_uid=`id -u || echo unknown` 95357ee1794Smrg am_gid=`id -g || echo unknown` 95457ee1794Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 95557ee1794Smrg if test $am_uid -le $am_max_uid; then 95657ee1794Smrg AC_MSG_RESULT([yes]) 95757ee1794Smrg else 95857ee1794Smrg AC_MSG_RESULT([no]) 95957ee1794Smrg _am_tools=none 96057ee1794Smrg fi 96157ee1794Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 96257ee1794Smrg if test $am_gid -le $am_max_gid; then 96357ee1794Smrg AC_MSG_RESULT([yes]) 96457ee1794Smrg else 96557ee1794Smrg AC_MSG_RESULT([no]) 96657ee1794Smrg _am_tools=none 96757ee1794Smrg fi], 968a253d6aeSmrg 96957ee1794Smrg [pax], 97057ee1794Smrg [], 971a253d6aeSmrg 97257ee1794Smrg [m4_fatal([Unknown tar format])]) 973a253d6aeSmrg 97457ee1794Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 975a253d6aeSmrg 97657ee1794Smrg # Go ahead even if we have the value already cached. We do so because we 97757ee1794Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 97857ee1794Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 97925b89263Smrg 98057ee1794Smrg for _am_tool in $_am_tools; do 98157ee1794Smrg case $_am_tool in 98257ee1794Smrg gnutar) 98357ee1794Smrg for _am_tar in tar gnutar gtar; do 98457ee1794Smrg AM_RUN_LOG([$_am_tar --version]) && break 98557ee1794Smrg done 98657ee1794Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98757ee1794Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98857ee1794Smrg am__untar="$_am_tar -xf -" 98957ee1794Smrg ;; 99057ee1794Smrg plaintar) 99157ee1794Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 99257ee1794Smrg # ustar tarball either. 99357ee1794Smrg (tar --version) >/dev/null 2>&1 && continue 99457ee1794Smrg am__tar='tar chf - "$$tardir"' 99557ee1794Smrg am__tar_='tar chf - "$tardir"' 99657ee1794Smrg am__untar='tar xf -' 99757ee1794Smrg ;; 99857ee1794Smrg pax) 99957ee1794Smrg am__tar='pax -L -x $1 -w "$$tardir"' 100057ee1794Smrg am__tar_='pax -L -x $1 -w "$tardir"' 100157ee1794Smrg am__untar='pax -r' 100257ee1794Smrg ;; 100357ee1794Smrg cpio) 100457ee1794Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 100557ee1794Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 100657ee1794Smrg am__untar='cpio -i -H $1 -d' 100757ee1794Smrg ;; 100857ee1794Smrg none) 100957ee1794Smrg am__tar=false 101057ee1794Smrg am__tar_=false 101157ee1794Smrg am__untar=false 101257ee1794Smrg ;; 101357ee1794Smrg esac 1014a253d6aeSmrg 101557ee1794Smrg # If the value was cached, stop now. We just wanted to have am__tar 101657ee1794Smrg # and am__untar set. 101757ee1794Smrg test -n "${am_cv_prog_tar_$1}" && break 101857ee1794Smrg 101957ee1794Smrg # tar/untar a dummy directory, and stop if the command works. 102057ee1794Smrg rm -rf conftest.dir 102157ee1794Smrg mkdir conftest.dir 102257ee1794Smrg echo GrepMe > conftest.dir/file 102357ee1794Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 102457ee1794Smrg rm -rf conftest.dir 102557ee1794Smrg if test -s conftest.tar; then 102657ee1794Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 102757ee1794Smrg AM_RUN_LOG([cat conftest.dir/file]) 102857ee1794Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102957ee1794Smrg fi 103057ee1794Smrg done 103157ee1794Smrg rm -rf conftest.dir 103206f32fbeSmrg 103357ee1794Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 103457ee1794Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 103506f32fbeSmrg 103657ee1794SmrgAC_SUBST([am__tar]) 103757ee1794SmrgAC_SUBST([am__untar]) 103857ee1794Smrg]) # _AM_PROG_TAR 1039ea133fd7Smrg 104006f32fbeSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 104106f32fbeSmrg# 104206f32fbeSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 104357ee1794Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 104457ee1794Smrg# Foundation, Inc. 104506f32fbeSmrg# Written by Gordon Matzigkeit, 1996 104606f32fbeSmrg# 104706f32fbeSmrg# This file is free software; the Free Software Foundation gives 104806f32fbeSmrg# unlimited permission to copy and/or distribute it, with or without 104906f32fbeSmrg# modifications, as long as this notice is preserved. 1050ea133fd7Smrg 105106f32fbeSmrgm4_define([_LT_COPYING], [dnl 105206f32fbeSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 105357ee1794Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 105457ee1794Smrg# Foundation, Inc. 105506f32fbeSmrg# Written by Gordon Matzigkeit, 1996 105625b89263Smrg# 105706f32fbeSmrg# This file is part of GNU Libtool. 105806f32fbeSmrg# 105906f32fbeSmrg# GNU Libtool is free software; you can redistribute it and/or 106006f32fbeSmrg# modify it under the terms of the GNU General Public License as 106106f32fbeSmrg# published by the Free Software Foundation; either version 2 of 106206f32fbeSmrg# the License, or (at your option) any later version. 106306f32fbeSmrg# 106406f32fbeSmrg# As a special exception to the GNU General Public License, 106506f32fbeSmrg# if you distribute this file as part of a program or library that 106606f32fbeSmrg# is built using GNU Libtool, you may include this file under the 106706f32fbeSmrg# same distribution terms that you use for the rest of that program. 106806f32fbeSmrg# 106906f32fbeSmrg# GNU Libtool is distributed in the hope that it will be useful, 107006f32fbeSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 107106f32fbeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 107206f32fbeSmrg# GNU General Public License for more details. 107306f32fbeSmrg# 107406f32fbeSmrg# You should have received a copy of the GNU General Public License 107506f32fbeSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 107606f32fbeSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 107706f32fbeSmrg# obtained by writing to the Free Software Foundation, Inc., 107806f32fbeSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 107906f32fbeSmrg]) 1080ea133fd7Smrg 108106f32fbeSmrg# serial 57 LT_INIT 1082a253d6aeSmrg 1083a253d6aeSmrg 108406f32fbeSmrg# LT_PREREQ(VERSION) 108506f32fbeSmrg# ------------------ 108606f32fbeSmrg# Complain and exit if this libtool version is less that VERSION. 108706f32fbeSmrgm4_defun([LT_PREREQ], 108806f32fbeSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 108906f32fbeSmrg [m4_default([$3], 109006f32fbeSmrg [m4_fatal([Libtool version $1 or higher is required], 109106f32fbeSmrg 63)])], 109206f32fbeSmrg [$2])]) 1093a253d6aeSmrg 1094a253d6aeSmrg 109506f32fbeSmrg# _LT_CHECK_BUILDDIR 109606f32fbeSmrg# ------------------ 109706f32fbeSmrg# Complain if the absolute build directory name contains unusual characters 109806f32fbeSmrgm4_defun([_LT_CHECK_BUILDDIR], 109906f32fbeSmrg[case `pwd` in 110006f32fbeSmrg *\ * | *\ *) 110106f32fbeSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 110206f32fbeSmrgesac 110306f32fbeSmrg]) 1104a253d6aeSmrg 1105a253d6aeSmrg 110606f32fbeSmrg# LT_INIT([OPTIONS]) 110706f32fbeSmrg# ------------------ 110806f32fbeSmrgAC_DEFUN([LT_INIT], 110906f32fbeSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 111006f32fbeSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 111106f32fbeSmrgAC_BEFORE([$0], [LT_LANG])dnl 111206f32fbeSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 111306f32fbeSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 111406f32fbeSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 1115a253d6aeSmrg 111606f32fbeSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 111706f32fbeSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 111806f32fbeSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 111906f32fbeSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 112006f32fbeSmrgdnl unless we require an AC_DEFUNed macro: 112106f32fbeSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 112206f32fbeSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 112306f32fbeSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 112406f32fbeSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 112506f32fbeSmrgm4_require([_LT_PROG_LTMAIN])dnl 1126a253d6aeSmrg 112706f32fbeSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1128a253d6aeSmrg 112906f32fbeSmrgdnl Parse OPTIONS 113006f32fbeSmrg_LT_SET_OPTIONS([$0], [$1]) 1131a253d6aeSmrg 113206f32fbeSmrg# This can be used to rebuild libtool when needed 113306f32fbeSmrgLIBTOOL_DEPS="$ltmain" 1134a253d6aeSmrg 113506f32fbeSmrg# Always use our own libtool. 113606f32fbeSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 113706f32fbeSmrgAC_SUBST(LIBTOOL)dnl 1138a253d6aeSmrg 113906f32fbeSmrg_LT_SETUP 1140a253d6aeSmrg 114106f32fbeSmrg# Only expand once: 114206f32fbeSmrgm4_define([LT_INIT]) 114306f32fbeSmrg])# LT_INIT 1144a253d6aeSmrg 114506f32fbeSmrg# Old names: 114606f32fbeSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 114706f32fbeSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 114806f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 114906f32fbeSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 115006f32fbeSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1151a253d6aeSmrg 1152a253d6aeSmrg 115306f32fbeSmrg# _LT_CC_BASENAME(CC) 115406f32fbeSmrg# ------------------- 115506f32fbeSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 115606f32fbeSmrgm4_defun([_LT_CC_BASENAME], 115706f32fbeSmrg[for cc_temp in $1""; do 115806f32fbeSmrg case $cc_temp in 115906f32fbeSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 116006f32fbeSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 116106f32fbeSmrg \-*) ;; 116206f32fbeSmrg *) break;; 116306f32fbeSmrg esac 116406f32fbeSmrgdone 116506f32fbeSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 116606f32fbeSmrg]) 1167a253d6aeSmrg 1168a253d6aeSmrg 116906f32fbeSmrg# _LT_FILEUTILS_DEFAULTS 117006f32fbeSmrg# ---------------------- 117106f32fbeSmrg# It is okay to use these file commands and assume they have been set 117206f32fbeSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 117306f32fbeSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 117406f32fbeSmrg[: ${CP="cp -f"} 117506f32fbeSmrg: ${MV="mv -f"} 117606f32fbeSmrg: ${RM="rm -f"} 117706f32fbeSmrg])# _LT_FILEUTILS_DEFAULTS 1178a253d6aeSmrg 1179a253d6aeSmrg 118006f32fbeSmrg# _LT_SETUP 118106f32fbeSmrg# --------- 118206f32fbeSmrgm4_defun([_LT_SETUP], 118306f32fbeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 118406f32fbeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 118506f32fbeSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 118606f32fbeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 118725b89263Smrg 118857ee1794Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 118957ee1794Smrgdnl 119006f32fbeSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 119106f32fbeSmrg_LT_DECL([], [host], [0])dnl 119206f32fbeSmrg_LT_DECL([], [host_os], [0])dnl 119306f32fbeSmrgdnl 119406f32fbeSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 119506f32fbeSmrg_LT_DECL([], [build], [0])dnl 119606f32fbeSmrg_LT_DECL([], [build_os], [0])dnl 119706f32fbeSmrgdnl 119806f32fbeSmrgAC_REQUIRE([AC_PROG_CC])dnl 119906f32fbeSmrgAC_REQUIRE([LT_PATH_LD])dnl 120006f32fbeSmrgAC_REQUIRE([LT_PATH_NM])dnl 120106f32fbeSmrgdnl 120206f32fbeSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 120306f32fbeSmrgtest -z "$LN_S" && LN_S="ln -s" 120406f32fbeSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 120506f32fbeSmrgdnl 120606f32fbeSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 120706f32fbeSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 120806f32fbeSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 120906f32fbeSmrgdnl 121006f32fbeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 121106f32fbeSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 121206f32fbeSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 121306f32fbeSmrgm4_require([_LT_CMD_RELOAD])dnl 121406f32fbeSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 121506f32fbeSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 121606f32fbeSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 121706f32fbeSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 121806f32fbeSmrgm4_require([_LT_WITH_SYSROOT])dnl 121906f32fbeSmrg 122006f32fbeSmrg_LT_CONFIG_LIBTOOL_INIT([ 122106f32fbeSmrg# See if we are running on zsh, and set the options which allow our 122206f32fbeSmrg# commands through without removal of \ escapes INIT. 122306f32fbeSmrgif test -n "\${ZSH_VERSION+set}" ; then 122406f32fbeSmrg setopt NO_GLOB_SUBST 122506f32fbeSmrgfi 122606f32fbeSmrg]) 122706f32fbeSmrgif test -n "${ZSH_VERSION+set}" ; then 122806f32fbeSmrg setopt NO_GLOB_SUBST 122925b89263Smrgfi 1230a253d6aeSmrg 123106f32fbeSmrg_LT_CHECK_OBJDIR 1232a253d6aeSmrg 123306f32fbeSmrgm4_require([_LT_TAG_COMPILER])dnl 123425b89263Smrg 123506f32fbeSmrgcase $host_os in 123606f32fbeSmrgaix3*) 123706f32fbeSmrg # AIX sometimes has problems with the GCC collect2 program. For some 123806f32fbeSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 123906f32fbeSmrg # vanish in a puff of smoke. 124006f32fbeSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 124106f32fbeSmrg COLLECT_NAMES= 124206f32fbeSmrg export COLLECT_NAMES 124306f32fbeSmrg fi 124406f32fbeSmrg ;; 124506f32fbeSmrgesac 124625b89263Smrg 124706f32fbeSmrg# Global variables: 124806f32fbeSmrgofile=libtool 124906f32fbeSmrgcan_build_shared=yes 1250a253d6aeSmrg 125106f32fbeSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 125206f32fbeSmrg# which needs '.lib'). 125306f32fbeSmrglibext=a 125425b89263Smrg 125506f32fbeSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1256a253d6aeSmrg 125706f32fbeSmrgold_CC="$CC" 125806f32fbeSmrgold_CFLAGS="$CFLAGS" 125925b89263Smrg 126006f32fbeSmrg# Set sane defaults for various variables 126106f32fbeSmrgtest -z "$CC" && CC=cc 126206f32fbeSmrgtest -z "$LTCC" && LTCC=$CC 126306f32fbeSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 126406f32fbeSmrgtest -z "$LD" && LD=ld 126506f32fbeSmrgtest -z "$ac_objext" && ac_objext=o 1266a253d6aeSmrg 126706f32fbeSmrg_LT_CC_BASENAME([$compiler]) 1268a253d6aeSmrg 126906f32fbeSmrg# Only perform the check for file, if the check method requires it 127006f32fbeSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 127106f32fbeSmrgcase $deplibs_check_method in 127206f32fbeSmrgfile_magic*) 127306f32fbeSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 127406f32fbeSmrg _LT_PATH_MAGIC 127506f32fbeSmrg fi 127606f32fbeSmrg ;; 127706f32fbeSmrgesac 1278a253d6aeSmrg 127906f32fbeSmrg# Use C for the default configuration in the libtool script 128006f32fbeSmrgLT_SUPPORTED_TAG([CC]) 128106f32fbeSmrg_LT_LANG_C_CONFIG 128206f32fbeSmrg_LT_LANG_DEFAULT_CONFIG 128306f32fbeSmrg_LT_CONFIG_COMMANDS 128406f32fbeSmrg])# _LT_SETUP 1285a253d6aeSmrg 128625b89263Smrg 128706f32fbeSmrg# _LT_PREPARE_SED_QUOTE_VARS 128806f32fbeSmrg# -------------------------- 128906f32fbeSmrg# Define a few sed substitution that help us do robust quoting. 129006f32fbeSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 129106f32fbeSmrg[# Backslashify metacharacters that are still active within 129206f32fbeSmrg# double-quoted strings. 129306f32fbeSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1294a253d6aeSmrg 129506f32fbeSmrg# Same as above, but do not quote variable references. 129606f32fbeSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 129725b89263Smrg 129806f32fbeSmrg# Sed substitution to delay expansion of an escaped shell variable in a 129906f32fbeSmrg# double_quote_subst'ed string. 130006f32fbeSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1301a253d6aeSmrg 130206f32fbeSmrg# Sed substitution to delay expansion of an escaped single quote. 130306f32fbeSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 130425b89263Smrg 130506f32fbeSmrg# Sed substitution to avoid accidental globbing in evaled expressions 130606f32fbeSmrgno_glob_subst='s/\*/\\\*/g' 130706f32fbeSmrg]) 130825b89263Smrg 130906f32fbeSmrg# _LT_PROG_LTMAIN 131006f32fbeSmrg# --------------- 131106f32fbeSmrg# Note that this code is called both from `configure', and `config.status' 131206f32fbeSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 131306f32fbeSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 131406f32fbeSmrg# so we pass a copy along to make sure it has a sensible value anyway. 131506f32fbeSmrgm4_defun([_LT_PROG_LTMAIN], 131606f32fbeSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 131706f32fbeSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 131806f32fbeSmrgltmain="$ac_aux_dir/ltmain.sh" 131906f32fbeSmrg])# _LT_PROG_LTMAIN 1320a253d6aeSmrg 1321a253d6aeSmrg 1322a253d6aeSmrg 132306f32fbeSmrg# So that we can recreate a full libtool script including additional 132406f32fbeSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 132506f32fbeSmrg# in macros and then make a single call at the end using the `libtool' 132606f32fbeSmrg# label. 1327a253d6aeSmrg 1328a253d6aeSmrg 132906f32fbeSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 133006f32fbeSmrg# ---------------------------------------- 133106f32fbeSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 133206f32fbeSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 133306f32fbeSmrg[m4_ifval([$1], 133406f32fbeSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 133506f32fbeSmrg [$1 133606f32fbeSmrg])])]) 1337a253d6aeSmrg 133806f32fbeSmrg# Initialize. 133906f32fbeSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1340a253d6aeSmrg 1341a253d6aeSmrg 134206f32fbeSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 134306f32fbeSmrg# ------------------------------ 134406f32fbeSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 134506f32fbeSmrgm4_define([_LT_CONFIG_LIBTOOL], 134606f32fbeSmrg[m4_ifval([$1], 134706f32fbeSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 134806f32fbeSmrg [$1 134906f32fbeSmrg])])]) 1350a253d6aeSmrg 135106f32fbeSmrg# Initialize. 135206f32fbeSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1353a253d6aeSmrg 1354a253d6aeSmrg 135506f32fbeSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 135606f32fbeSmrg# ----------------------------------------------------- 135706f32fbeSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 135806f32fbeSmrg[_LT_CONFIG_LIBTOOL([$1]) 135906f32fbeSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 136006f32fbeSmrg]) 1361a253d6aeSmrg 1362a253d6aeSmrg 136306f32fbeSmrg# _LT_FORMAT_COMMENT([COMMENT]) 136406f32fbeSmrg# ----------------------------- 136506f32fbeSmrg# Add leading comment marks to the start of each line, and a trailing 136606f32fbeSmrg# full-stop to the whole comment if one is not present already. 136706f32fbeSmrgm4_define([_LT_FORMAT_COMMENT], 136806f32fbeSmrg[m4_ifval([$1], [ 136906f32fbeSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 137006f32fbeSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 137106f32fbeSmrg)]) 1372a253d6aeSmrg 1373a253d6aeSmrg 1374a253d6aeSmrg 1375a253d6aeSmrg 1376a253d6aeSmrg 137706f32fbeSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 137806f32fbeSmrg# ------------------------------------------------------------------- 137906f32fbeSmrg# CONFIGNAME is the name given to the value in the libtool script. 138006f32fbeSmrg# VARNAME is the (base) name used in the configure script. 138106f32fbeSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 138206f32fbeSmrg# VARNAME. Any other value will be used directly. 138306f32fbeSmrgm4_define([_LT_DECL], 138406f32fbeSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 138506f32fbeSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 138606f32fbeSmrg [m4_ifval([$1], [$1], [$2])]) 138706f32fbeSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 138806f32fbeSmrg m4_ifval([$4], 138906f32fbeSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 139006f32fbeSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 139106f32fbeSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 139206f32fbeSmrg]) 1393a253d6aeSmrg 1394a253d6aeSmrg 139506f32fbeSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 139606f32fbeSmrg# -------------------------------------------------------- 139706f32fbeSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1398a253d6aeSmrg 1399a253d6aeSmrg 140006f32fbeSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 140106f32fbeSmrg# ------------------------------------------------ 140206f32fbeSmrgm4_define([lt_decl_tag_varnames], 140306f32fbeSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 140406f32fbeSmrg 140506f32fbeSmrg 140606f32fbeSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 140706f32fbeSmrg# --------------------------------------------------------- 140806f32fbeSmrgm4_define([_lt_decl_filter], 140906f32fbeSmrg[m4_case([$#], 141006f32fbeSmrg [0], [m4_fatal([$0: too few arguments: $#])], 141106f32fbeSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 141206f32fbeSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 141306f32fbeSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 141406f32fbeSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 141525b89263Smrg]) 1416a253d6aeSmrg 1417a253d6aeSmrg 141806f32fbeSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 141906f32fbeSmrg# -------------------------------------------------- 142006f32fbeSmrgm4_define([lt_decl_quote_varnames], 142106f32fbeSmrg[_lt_decl_filter([value], [1], $@)]) 1422a253d6aeSmrg 1423a253d6aeSmrg 142406f32fbeSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 142506f32fbeSmrg# --------------------------------------------------- 142606f32fbeSmrgm4_define([lt_decl_dquote_varnames], 142706f32fbeSmrg[_lt_decl_filter([value], [2], $@)]) 1428a253d6aeSmrg 1429a253d6aeSmrg 143006f32fbeSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 143106f32fbeSmrg# --------------------------------------------------- 143206f32fbeSmrgm4_define([lt_decl_varnames_tagged], 143306f32fbeSmrg[m4_assert([$# <= 2])dnl 143406f32fbeSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 143506f32fbeSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 143606f32fbeSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 143706f32fbeSmrgm4_define([_lt_decl_varnames_tagged], 143806f32fbeSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1439a253d6aeSmrg 1440a253d6aeSmrg 144106f32fbeSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 144206f32fbeSmrg# ------------------------------------------------ 144306f32fbeSmrgm4_define([lt_decl_all_varnames], 144406f32fbeSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 144506f32fbeSmrg m4_if([$2], [], 144606f32fbeSmrg m4_quote(lt_decl_varnames), 144706f32fbeSmrg m4_quote(m4_shift($@))))[]dnl 144806f32fbeSmrg]) 144906f32fbeSmrgm4_define([_lt_decl_all_varnames], 145006f32fbeSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 145106f32fbeSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 145206f32fbeSmrg]) 1453a253d6aeSmrg 1454a253d6aeSmrg 145506f32fbeSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 145606f32fbeSmrg# ------------------------------------ 145706f32fbeSmrg# Quote a variable value, and forward it to `config.status' so that its 145806f32fbeSmrg# declaration there will have the same value as in `configure'. VARNAME 145906f32fbeSmrg# must have a single quote delimited value for this to work. 146006f32fbeSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 146106f32fbeSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1462a253d6aeSmrg 1463ea133fd7Smrg 146406f32fbeSmrg# _LT_CONFIG_STATUS_DECLARATIONS 146506f32fbeSmrg# ------------------------------ 146606f32fbeSmrg# We delimit libtool config variables with single quotes, so when 146706f32fbeSmrg# we write them to config.status, we have to be sure to quote all 146806f32fbeSmrg# embedded single quotes properly. In configure, this macro expands 146906f32fbeSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 147006f32fbeSmrg# 147106f32fbeSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 147206f32fbeSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 147306f32fbeSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 147406f32fbeSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1475ea133fd7Smrg 147625b89263Smrg 147706f32fbeSmrg# _LT_LIBTOOL_TAGS 147806f32fbeSmrg# ---------------- 147906f32fbeSmrg# Output comment and list of tags supported by the script 148006f32fbeSmrgm4_defun([_LT_LIBTOOL_TAGS], 148106f32fbeSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 148206f32fbeSmrgavailable_tags="_LT_TAGS"dnl 148306f32fbeSmrg]) 1484a253d6aeSmrg 1485ea133fd7Smrg 148606f32fbeSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 148706f32fbeSmrg# ----------------------------------- 148806f32fbeSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 148906f32fbeSmrg# expand to a commented shell variable setting: 149025b89263Smrg# 149106f32fbeSmrg# # Some comment about what VAR is for. 149206f32fbeSmrg# visible_name=$lt_internal_name 149306f32fbeSmrgm4_define([_LT_LIBTOOL_DECLARE], 149406f32fbeSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 149506f32fbeSmrg [description])))[]dnl 149606f32fbeSmrgm4_pushdef([_libtool_name], 149706f32fbeSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 149806f32fbeSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 149906f32fbeSmrg [0], [_libtool_name=[$]$1], 150006f32fbeSmrg [1], [_libtool_name=$lt_[]$1], 150106f32fbeSmrg [2], [_libtool_name=$lt_[]$1], 150206f32fbeSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 150306f32fbeSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 150425b89263Smrg]) 1505a253d6aeSmrg 1506a253d6aeSmrg 150706f32fbeSmrg# _LT_LIBTOOL_CONFIG_VARS 150806f32fbeSmrg# ----------------------- 150906f32fbeSmrg# Produce commented declarations of non-tagged libtool config variables 151006f32fbeSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 151106f32fbeSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 151206f32fbeSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 151306f32fbeSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 151406f32fbeSmrg[m4_foreach([_lt_var], 151506f32fbeSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 151606f32fbeSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1517a253d6aeSmrg 1518a253d6aeSmrg 151906f32fbeSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 152006f32fbeSmrg# ------------------------- 152106f32fbeSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 152206f32fbeSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 152306f32fbeSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1524ea133fd7Smrg 1525ea133fd7Smrg 152606f32fbeSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 152706f32fbeSmrg# ------------------------------ 152806f32fbeSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1529ea133fd7Smrg 1530ea133fd7Smrg 153106f32fbeSmrg# _LT_CONFIG_COMMANDS 153206f32fbeSmrg# ------------------- 153306f32fbeSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 153406f32fbeSmrg# variables for single and double quote escaping we saved from calls 153506f32fbeSmrg# to _LT_DECL, we can put quote escaped variables declarations 153606f32fbeSmrg# into `config.status', and then the shell code to quote escape them in 153706f32fbeSmrg# for loops in `config.status'. Finally, any additional code accumulated 153806f32fbeSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 153906f32fbeSmrgm4_defun([_LT_CONFIG_COMMANDS], 154006f32fbeSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 154106f32fbeSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 154206f32fbeSmrg dnl instead of duplicating it all over again into config.status, 154306f32fbeSmrg dnl then we will have config.status run $CONFIG_LT later, so it 154406f32fbeSmrg dnl needs to know what name is stored there: 154506f32fbeSmrg [AC_CONFIG_COMMANDS([libtool], 154606f32fbeSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 154706f32fbeSmrg dnl If the libtool generation code is destined for config.status, 154806f32fbeSmrg dnl expand the accumulated commands and init code now: 154906f32fbeSmrg [AC_CONFIG_COMMANDS([libtool], 155006f32fbeSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 155106f32fbeSmrg])#_LT_CONFIG_COMMANDS 1552a253d6aeSmrg 1553a253d6aeSmrg 155406f32fbeSmrg# Initialize. 155506f32fbeSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 155606f32fbeSmrg[ 155725b89263Smrg 155806f32fbeSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 155906f32fbeSmrg# if CDPATH is set. 156006f32fbeSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 156125b89263Smrg 156206f32fbeSmrgsed_quote_subst='$sed_quote_subst' 156306f32fbeSmrgdouble_quote_subst='$double_quote_subst' 156406f32fbeSmrgdelay_variable_subst='$delay_variable_subst' 156506f32fbeSmrg_LT_CONFIG_STATUS_DECLARATIONS 156606f32fbeSmrgLTCC='$LTCC' 156706f32fbeSmrgLTCFLAGS='$LTCFLAGS' 156806f32fbeSmrgcompiler='$compiler_DEFAULT' 156925b89263Smrg 157006f32fbeSmrg# A function that is used when there is no print builtin or printf. 157106f32fbeSmrgfunc_fallback_echo () 157206f32fbeSmrg{ 157306f32fbeSmrg eval 'cat <<_LTECHO_EOF 157406f32fbeSmrg\$[]1 157506f32fbeSmrg_LTECHO_EOF' 157606f32fbeSmrg} 157725b89263Smrg 157806f32fbeSmrg# Quote evaled strings. 157906f32fbeSmrgfor var in lt_decl_all_varnames([[ \ 158006f32fbeSmrg]], lt_decl_quote_varnames); do 158106f32fbeSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 158206f32fbeSmrg *[[\\\\\\\`\\"\\\$]]*) 158306f32fbeSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 158406f32fbeSmrg ;; 158506f32fbeSmrg *) 158606f32fbeSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 158706f32fbeSmrg ;; 158806f32fbeSmrg esac 158925b89263Smrgdone 1590ea133fd7Smrg 159106f32fbeSmrg# Double-quote double-evaled strings. 159206f32fbeSmrgfor var in lt_decl_all_varnames([[ \ 159306f32fbeSmrg]], lt_decl_dquote_varnames); do 159406f32fbeSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 159506f32fbeSmrg *[[\\\\\\\`\\"\\\$]]*) 159606f32fbeSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 159706f32fbeSmrg ;; 159806f32fbeSmrg *) 159906f32fbeSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 160006f32fbeSmrg ;; 160106f32fbeSmrg esac 160206f32fbeSmrgdone 1603a253d6aeSmrg 160406f32fbeSmrg_LT_OUTPUT_LIBTOOL_INIT 160506f32fbeSmrg]) 1606a253d6aeSmrg 160706f32fbeSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 160806f32fbeSmrg# ------------------------------------ 160906f32fbeSmrg# Generate a child script FILE with all initialization necessary to 161006f32fbeSmrg# reuse the environment learned by the parent script, and make the 161106f32fbeSmrg# file executable. If COMMENT is supplied, it is inserted after the 161206f32fbeSmrg# `#!' sequence but before initialization text begins. After this 161306f32fbeSmrg# macro, additional text can be appended to FILE to form the body of 161406f32fbeSmrg# the child script. The macro ends with non-zero status if the 161506f32fbeSmrg# file could not be fully written (such as if the disk is full). 161606f32fbeSmrgm4_ifdef([AS_INIT_GENERATED], 161706f32fbeSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 161806f32fbeSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 161906f32fbeSmrg[m4_require([AS_PREPARE])]dnl 162006f32fbeSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 162106f32fbeSmrg[lt_write_fail=0 162206f32fbeSmrgcat >$1 <<_ASEOF || lt_write_fail=1 162306f32fbeSmrg#! $SHELL 162406f32fbeSmrg# Generated by $as_me. 162506f32fbeSmrg$2 162606f32fbeSmrgSHELL=\${CONFIG_SHELL-$SHELL} 162706f32fbeSmrgexport SHELL 162806f32fbeSmrg_ASEOF 162906f32fbeSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 163006f32fbeSmrgAS_SHELL_SANITIZE 163106f32fbeSmrg_AS_PREPARE 163206f32fbeSmrgexec AS_MESSAGE_FD>&1 163306f32fbeSmrg_ASEOF 163406f32fbeSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 163506f32fbeSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1636a253d6aeSmrg 163706f32fbeSmrg# LT_OUTPUT 163825b89263Smrg# --------- 163906f32fbeSmrg# This macro allows early generation of the libtool script (before 164006f32fbeSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 164106f32fbeSmrg# tests. 164206f32fbeSmrgAC_DEFUN([LT_OUTPUT], 164306f32fbeSmrg[: ${CONFIG_LT=./config.lt} 164406f32fbeSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 164506f32fbeSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 164606f32fbeSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 1647a253d6aeSmrg 164806f32fbeSmrgcat >>"$CONFIG_LT" <<\_LTEOF 164906f32fbeSmrglt_cl_silent=false 165006f32fbeSmrgexec AS_MESSAGE_LOG_FD>>config.log 165106f32fbeSmrg{ 165206f32fbeSmrg echo 165306f32fbeSmrg AS_BOX([Running $as_me.]) 165406f32fbeSmrg} >&AS_MESSAGE_LOG_FD 1655a253d6aeSmrg 165606f32fbeSmrglt_cl_help="\ 165706f32fbeSmrg\`$as_me' creates a local libtool stub from the current configuration, 165806f32fbeSmrgfor use in further configure time tests before the real libtool is 165906f32fbeSmrggenerated. 1660a253d6aeSmrg 166106f32fbeSmrgUsage: $[0] [[OPTIONS]] 1662a253d6aeSmrg 166306f32fbeSmrg -h, --help print this help, then exit 166406f32fbeSmrg -V, --version print version number, then exit 166506f32fbeSmrg -q, --quiet do not print progress messages 166606f32fbeSmrg -d, --debug don't remove temporary files 1667a253d6aeSmrg 166806f32fbeSmrgReport bugs to <bug-libtool@gnu.org>." 1669a253d6aeSmrg 167006f32fbeSmrglt_cl_version="\ 167106f32fbeSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 167206f32fbeSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 167306f32fbeSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1674a253d6aeSmrg 167557ee1794SmrgCopyright (C) 2011 Free Software Foundation, Inc. 167606f32fbeSmrgThis config.lt script is free software; the Free Software Foundation 167706f32fbeSmrggives unlimited permision to copy, distribute and modify it." 1678a253d6aeSmrg 167906f32fbeSmrgwhile test $[#] != 0 168006f32fbeSmrgdo 168106f32fbeSmrg case $[1] in 168206f32fbeSmrg --version | --v* | -V ) 168306f32fbeSmrg echo "$lt_cl_version"; exit 0 ;; 168406f32fbeSmrg --help | --h* | -h ) 168506f32fbeSmrg echo "$lt_cl_help"; exit 0 ;; 168606f32fbeSmrg --debug | --d* | -d ) 168706f32fbeSmrg debug=: ;; 168806f32fbeSmrg --quiet | --q* | --silent | --s* | -q ) 168906f32fbeSmrg lt_cl_silent=: ;; 1690a253d6aeSmrg 169106f32fbeSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 169206f32fbeSmrgTry \`$[0] --help' for more information.]) ;; 1693a253d6aeSmrg 169406f32fbeSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 169506f32fbeSmrgTry \`$[0] --help' for more information.]) ;; 169606f32fbeSmrg esac 169706f32fbeSmrg shift 169806f32fbeSmrgdone 1699a253d6aeSmrg 170006f32fbeSmrgif $lt_cl_silent; then 170106f32fbeSmrg exec AS_MESSAGE_FD>/dev/null 170206f32fbeSmrgfi 170306f32fbeSmrg_LTEOF 1704a253d6aeSmrg 170506f32fbeSmrgcat >>"$CONFIG_LT" <<_LTEOF 170606f32fbeSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 170706f32fbeSmrg_LTEOF 1708a253d6aeSmrg 170906f32fbeSmrgcat >>"$CONFIG_LT" <<\_LTEOF 171006f32fbeSmrgAC_MSG_NOTICE([creating $ofile]) 171106f32fbeSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 171206f32fbeSmrgAS_EXIT(0) 171306f32fbeSmrg_LTEOF 171406f32fbeSmrgchmod +x "$CONFIG_LT" 1715a253d6aeSmrg 171606f32fbeSmrg# configure is writing to config.log, but config.lt does its own redirection, 171706f32fbeSmrg# appending to config.log, which fails on DOS, as config.log is still kept 171806f32fbeSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 171906f32fbeSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 172006f32fbeSmrglt_cl_success=: 172106f32fbeSmrgtest "$silent" = yes && 172206f32fbeSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 172306f32fbeSmrgexec AS_MESSAGE_LOG_FD>/dev/null 172406f32fbeSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 172506f32fbeSmrgexec AS_MESSAGE_LOG_FD>>config.log 172606f32fbeSmrg$lt_cl_success || AS_EXIT(1) 172706f32fbeSmrg])# LT_OUTPUT 1728a253d6aeSmrg 1729a253d6aeSmrg 173006f32fbeSmrg# _LT_CONFIG(TAG) 173125b89263Smrg# --------------- 173206f32fbeSmrg# If TAG is the built-in tag, create an initial libtool script with a 173306f32fbeSmrg# default configuration from the untagged config vars. Otherwise add code 173406f32fbeSmrg# to config.status for appending the configuration named by TAG from the 173506f32fbeSmrg# matching tagged config vars. 173606f32fbeSmrgm4_defun([_LT_CONFIG], 173706f32fbeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 173806f32fbeSmrg_LT_CONFIG_SAVE_COMMANDS([ 173906f32fbeSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 174006f32fbeSmrg m4_if(_LT_TAG, [C], [ 174106f32fbeSmrg # See if we are running on zsh, and set the options which allow our 174206f32fbeSmrg # commands through without removal of \ escapes. 174306f32fbeSmrg if test -n "${ZSH_VERSION+set}" ; then 174406f32fbeSmrg setopt NO_GLOB_SUBST 174506f32fbeSmrg fi 1746a253d6aeSmrg 174706f32fbeSmrg cfgfile="${ofile}T" 174806f32fbeSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 174906f32fbeSmrg $RM "$cfgfile" 1750a253d6aeSmrg 175106f32fbeSmrg cat <<_LT_EOF >> "$cfgfile" 175206f32fbeSmrg#! $SHELL 1753a253d6aeSmrg 175406f32fbeSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 175506f32fbeSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 175606f32fbeSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 175706f32fbeSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 175806f32fbeSmrg# 175906f32fbeSmrg_LT_COPYING 176006f32fbeSmrg_LT_LIBTOOL_TAGS 1761a253d6aeSmrg 176206f32fbeSmrg# ### BEGIN LIBTOOL CONFIG 176306f32fbeSmrg_LT_LIBTOOL_CONFIG_VARS 176406f32fbeSmrg_LT_LIBTOOL_TAG_VARS 176506f32fbeSmrg# ### END LIBTOOL CONFIG 1766a253d6aeSmrg 176706f32fbeSmrg_LT_EOF 1768a253d6aeSmrg 176906f32fbeSmrg case $host_os in 177006f32fbeSmrg aix3*) 177106f32fbeSmrg cat <<\_LT_EOF >> "$cfgfile" 177206f32fbeSmrg# AIX sometimes has problems with the GCC collect2 program. For some 177306f32fbeSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 177406f32fbeSmrg# vanish in a puff of smoke. 177506f32fbeSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 177606f32fbeSmrg COLLECT_NAMES= 177706f32fbeSmrg export COLLECT_NAMES 177806f32fbeSmrgfi 177906f32fbeSmrg_LT_EOF 178006f32fbeSmrg ;; 178106f32fbeSmrg esac 1782a253d6aeSmrg 178306f32fbeSmrg _LT_PROG_LTMAIN 1784a253d6aeSmrg 178506f32fbeSmrg # We use sed instead of cat because bash on DJGPP gets confused if 178606f32fbeSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 178706f32fbeSmrg # text mode, it properly converts lines to CR/LF. This bash problem 178806f32fbeSmrg # is reportedly fixed, but why not run on old versions too? 178906f32fbeSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 179006f32fbeSmrg || (rm -f "$cfgfile"; exit 1) 1791a253d6aeSmrg 179206f32fbeSmrg _LT_PROG_REPLACE_SHELLFNS 1793a253d6aeSmrg 179406f32fbeSmrg mv -f "$cfgfile" "$ofile" || 179506f32fbeSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 179606f32fbeSmrg chmod +x "$ofile" 179706f32fbeSmrg], 179806f32fbeSmrg[cat <<_LT_EOF >> "$ofile" 1799a253d6aeSmrg 180006f32fbeSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 180106f32fbeSmrgdnl in a comment (ie after a #). 180206f32fbeSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 180306f32fbeSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 180406f32fbeSmrg# ### END LIBTOOL TAG CONFIG: $1 180506f32fbeSmrg_LT_EOF 180606f32fbeSmrg])dnl /m4_if 180706f32fbeSmrg], 180806f32fbeSmrg[m4_if([$1], [], [ 180906f32fbeSmrg PACKAGE='$PACKAGE' 181006f32fbeSmrg VERSION='$VERSION' 181106f32fbeSmrg TIMESTAMP='$TIMESTAMP' 181206f32fbeSmrg RM='$RM' 181306f32fbeSmrg ofile='$ofile'], []) 181406f32fbeSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 181506f32fbeSmrg])# _LT_CONFIG 1816a253d6aeSmrg 1817a253d6aeSmrg 181806f32fbeSmrg# LT_SUPPORTED_TAG(TAG) 181906f32fbeSmrg# --------------------- 182006f32fbeSmrg# Trace this macro to discover what tags are supported by the libtool 182106f32fbeSmrg# --tag option, using: 182206f32fbeSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 182306f32fbeSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1824ea133fd7Smrg 1825ea133fd7Smrg 182606f32fbeSmrg# C support is built-in for now 182706f32fbeSmrgm4_define([_LT_LANG_C_enabled], []) 182806f32fbeSmrgm4_define([_LT_TAGS], []) 1829ea133fd7Smrg 1830a253d6aeSmrg 183106f32fbeSmrg# LT_LANG(LANG) 183206f32fbeSmrg# ------------- 183306f32fbeSmrg# Enable libtool support for the given language if not already enabled. 183406f32fbeSmrgAC_DEFUN([LT_LANG], 183506f32fbeSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 183606f32fbeSmrgm4_case([$1], 183706f32fbeSmrg [C], [_LT_LANG(C)], 183806f32fbeSmrg [C++], [_LT_LANG(CXX)], 183957ee1794Smrg [Go], [_LT_LANG(GO)], 184006f32fbeSmrg [Java], [_LT_LANG(GCJ)], 184106f32fbeSmrg [Fortran 77], [_LT_LANG(F77)], 184206f32fbeSmrg [Fortran], [_LT_LANG(FC)], 184306f32fbeSmrg [Windows Resource], [_LT_LANG(RC)], 184406f32fbeSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 184506f32fbeSmrg [_LT_LANG($1)], 184606f32fbeSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 184706f32fbeSmrg])# LT_LANG 1848a253d6aeSmrg 1849a253d6aeSmrg 185006f32fbeSmrg# _LT_LANG(LANGNAME) 185106f32fbeSmrg# ------------------ 185206f32fbeSmrgm4_defun([_LT_LANG], 185306f32fbeSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 185406f32fbeSmrg [LT_SUPPORTED_TAG([$1])dnl 185506f32fbeSmrg m4_append([_LT_TAGS], [$1 ])dnl 185606f32fbeSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 185706f32fbeSmrg _LT_LANG_$1_CONFIG($1)])dnl 185806f32fbeSmrg])# _LT_LANG 1859a253d6aeSmrg 1860a253d6aeSmrg 186157ee1794Smrgm4_ifndef([AC_PROG_GO], [ 186257ee1794Smrg# NOTE: This macro has been submitted for inclusion into # 186357ee1794Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 186457ee1794Smrg# a released version of Autoconf we should remove this # 186557ee1794Smrg# macro and use it instead. # 186657ee1794Smrgm4_defun([AC_PROG_GO], 186757ee1794Smrg[AC_LANG_PUSH(Go)dnl 186857ee1794SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 186957ee1794SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 187057ee1794Smrg_AC_ARG_VAR_LDFLAGS()dnl 187157ee1794SmrgAC_CHECK_TOOL(GOC, gccgo) 187257ee1794Smrgif test -z "$GOC"; then 187357ee1794Smrg if test -n "$ac_tool_prefix"; then 187457ee1794Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 187557ee1794Smrg fi 187657ee1794Smrgfi 187757ee1794Smrgif test -z "$GOC"; then 187857ee1794Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 187957ee1794Smrgfi 188057ee1794Smrg])#m4_defun 188157ee1794Smrg])#m4_ifndef 188257ee1794Smrg 188357ee1794Smrg 188406f32fbeSmrg# _LT_LANG_DEFAULT_CONFIG 188506f32fbeSmrg# ----------------------- 188606f32fbeSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 188706f32fbeSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 188806f32fbeSmrg [LT_LANG(CXX)], 188906f32fbeSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1890a253d6aeSmrg 189106f32fbeSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 189206f32fbeSmrg [LT_LANG(F77)], 189306f32fbeSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1894ea133fd7Smrg 189506f32fbeSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 189606f32fbeSmrg [LT_LANG(FC)], 189706f32fbeSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1898ea133fd7Smrg 189906f32fbeSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 190006f32fbeSmrgdnl pulling things in needlessly. 190106f32fbeSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 190206f32fbeSmrg [LT_LANG(GCJ)], 190306f32fbeSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 190406f32fbeSmrg [LT_LANG(GCJ)], 190506f32fbeSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 190606f32fbeSmrg [LT_LANG(GCJ)], 190706f32fbeSmrg [m4_ifdef([AC_PROG_GCJ], 190806f32fbeSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 190906f32fbeSmrg m4_ifdef([A][M_PROG_GCJ], 191006f32fbeSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 191106f32fbeSmrg m4_ifdef([LT_PROG_GCJ], 191206f32fbeSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1913a253d6aeSmrg 191457ee1794SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 191557ee1794Smrg [LT_LANG(GO)], 191657ee1794Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 191757ee1794Smrg 191806f32fbeSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 191906f32fbeSmrg [LT_LANG(RC)], 192006f32fbeSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 192106f32fbeSmrg])# _LT_LANG_DEFAULT_CONFIG 1922a253d6aeSmrg 192306f32fbeSmrg# Obsolete macros: 192406f32fbeSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 192506f32fbeSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 192606f32fbeSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 192706f32fbeSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 192806f32fbeSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 192906f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 193006f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 193106f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 193206f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 193306f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 193406f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 1935a253d6aeSmrg 1936a253d6aeSmrg 193706f32fbeSmrg# _LT_TAG_COMPILER 193825b89263Smrg# ---------------- 193906f32fbeSmrgm4_defun([_LT_TAG_COMPILER], 194006f32fbeSmrg[AC_REQUIRE([AC_PROG_CC])dnl 1941a253d6aeSmrg 194206f32fbeSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 194306f32fbeSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 194406f32fbeSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 194506f32fbeSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1946a253d6aeSmrg 194706f32fbeSmrg# If no C compiler was specified, use CC. 194806f32fbeSmrgLTCC=${LTCC-"$CC"} 1949a253d6aeSmrg 195006f32fbeSmrg# If no C compiler flags were specified, use CFLAGS. 195106f32fbeSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1952a253d6aeSmrg 195306f32fbeSmrg# Allow CC to be a program name with arguments. 195406f32fbeSmrgcompiler=$CC 195506f32fbeSmrg])# _LT_TAG_COMPILER 1956a253d6aeSmrg 1957a253d6aeSmrg 195806f32fbeSmrg# _LT_COMPILER_BOILERPLATE 195906f32fbeSmrg# ------------------------ 196006f32fbeSmrg# Check for compiler boilerplate output or warnings with 196106f32fbeSmrg# the simple compiler test code. 196206f32fbeSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 196306f32fbeSmrg[m4_require([_LT_DECL_SED])dnl 196406f32fbeSmrgac_outfile=conftest.$ac_objext 196506f32fbeSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 196606f32fbeSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 196706f32fbeSmrg_lt_compiler_boilerplate=`cat conftest.err` 196806f32fbeSmrg$RM conftest* 196906f32fbeSmrg])# _LT_COMPILER_BOILERPLATE 1970a253d6aeSmrg 1971a253d6aeSmrg 197206f32fbeSmrg# _LT_LINKER_BOILERPLATE 197306f32fbeSmrg# ---------------------- 197406f32fbeSmrg# Check for linker boilerplate output or warnings with 197506f32fbeSmrg# the simple link test code. 197606f32fbeSmrgm4_defun([_LT_LINKER_BOILERPLATE], 197706f32fbeSmrg[m4_require([_LT_DECL_SED])dnl 197806f32fbeSmrgac_outfile=conftest.$ac_objext 197906f32fbeSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 198006f32fbeSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 198106f32fbeSmrg_lt_linker_boilerplate=`cat conftest.err` 198206f32fbeSmrg$RM -r conftest* 198306f32fbeSmrg])# _LT_LINKER_BOILERPLATE 1984a253d6aeSmrg 198506f32fbeSmrg# _LT_REQUIRED_DARWIN_CHECKS 198606f32fbeSmrg# ------------------------- 198706f32fbeSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 198806f32fbeSmrg case $host_os in 198906f32fbeSmrg rhapsody* | darwin*) 199006f32fbeSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 199106f32fbeSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 199206f32fbeSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 199306f32fbeSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 199406f32fbeSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 199506f32fbeSmrg _LT_DECL([], [DSYMUTIL], [1], 199606f32fbeSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 199706f32fbeSmrg _LT_DECL([], [NMEDIT], [1], 199806f32fbeSmrg [Tool to change global to local symbols on Mac OS X]) 199906f32fbeSmrg _LT_DECL([], [LIPO], [1], 200006f32fbeSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 200106f32fbeSmrg _LT_DECL([], [OTOOL], [1], 200206f32fbeSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 200306f32fbeSmrg _LT_DECL([], [OTOOL64], [1], 200406f32fbeSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2005a253d6aeSmrg 200606f32fbeSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 200706f32fbeSmrg [lt_cv_apple_cc_single_mod=no 200806f32fbeSmrg if test -z "${LT_MULTI_MODULE}"; then 200906f32fbeSmrg # By default we will add the -single_module flag. You can override 201006f32fbeSmrg # by either setting the environment variable LT_MULTI_MODULE 201106f32fbeSmrg # non-empty at configure time, or by adding -multi_module to the 201206f32fbeSmrg # link flags. 201306f32fbeSmrg rm -rf libconftest.dylib* 201406f32fbeSmrg echo "int foo(void){return 1;}" > conftest.c 201506f32fbeSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 201606f32fbeSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 201706f32fbeSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 201806f32fbeSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 201906f32fbeSmrg _lt_result=$? 202057ee1794Smrg # If there is a non-empty error log, and "single_module" 202157ee1794Smrg # appears in it, assume the flag caused a linker warning 202257ee1794Smrg if test -s conftest.err && $GREP single_module conftest.err; then 202357ee1794Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 202457ee1794Smrg # Otherwise, if the output was created with a 0 exit code from 202557ee1794Smrg # the compiler, it worked. 202657ee1794Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 202706f32fbeSmrg lt_cv_apple_cc_single_mod=yes 202806f32fbeSmrg else 202906f32fbeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 203006f32fbeSmrg fi 203106f32fbeSmrg rm -rf libconftest.dylib* 203206f32fbeSmrg rm -f conftest.* 203306f32fbeSmrg fi]) 203457ee1794Smrg 203506f32fbeSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 203606f32fbeSmrg [lt_cv_ld_exported_symbols_list], 203706f32fbeSmrg [lt_cv_ld_exported_symbols_list=no 203806f32fbeSmrg save_LDFLAGS=$LDFLAGS 203906f32fbeSmrg echo "_main" > conftest.sym 204006f32fbeSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 204106f32fbeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 204206f32fbeSmrg [lt_cv_ld_exported_symbols_list=yes], 204306f32fbeSmrg [lt_cv_ld_exported_symbols_list=no]) 204406f32fbeSmrg LDFLAGS="$save_LDFLAGS" 204506f32fbeSmrg ]) 204657ee1794Smrg 204706f32fbeSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 204806f32fbeSmrg [lt_cv_ld_force_load=no 204906f32fbeSmrg cat > conftest.c << _LT_EOF 205006f32fbeSmrgint forced_loaded() { return 2;} 205106f32fbeSmrg_LT_EOF 205206f32fbeSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 205306f32fbeSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 205406f32fbeSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 205506f32fbeSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 205606f32fbeSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 205706f32fbeSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 205806f32fbeSmrg cat > conftest.c << _LT_EOF 205906f32fbeSmrgint main() { return 0;} 206006f32fbeSmrg_LT_EOF 206106f32fbeSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 206206f32fbeSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 206306f32fbeSmrg _lt_result=$? 206457ee1794Smrg if test -s conftest.err && $GREP force_load conftest.err; then 206557ee1794Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 206657ee1794Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 206706f32fbeSmrg lt_cv_ld_force_load=yes 206806f32fbeSmrg else 206906f32fbeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 207006f32fbeSmrg fi 207106f32fbeSmrg rm -f conftest.err libconftest.a conftest conftest.c 207206f32fbeSmrg rm -rf conftest.dSYM 207306f32fbeSmrg ]) 207406f32fbeSmrg case $host_os in 207506f32fbeSmrg rhapsody* | darwin1.[[012]]) 207606f32fbeSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 207706f32fbeSmrg darwin1.*) 207806f32fbeSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 207906f32fbeSmrg darwin*) # darwin 5.x on 208006f32fbeSmrg # if running on 10.5 or later, the deployment target defaults 208106f32fbeSmrg # to the OS version, if on x86, and 10.4, the deployment 208206f32fbeSmrg # target defaults to 10.4. Don't you love it? 208306f32fbeSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 208406f32fbeSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 208506f32fbeSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 208606f32fbeSmrg 10.[[012]]*) 208706f32fbeSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 208806f32fbeSmrg 10.*) 208906f32fbeSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 209006f32fbeSmrg esac 209106f32fbeSmrg ;; 209206f32fbeSmrg esac 209306f32fbeSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 209406f32fbeSmrg _lt_dar_single_mod='$single_module' 209506f32fbeSmrg fi 209606f32fbeSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 209706f32fbeSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 209806f32fbeSmrg else 209906f32fbeSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 210006f32fbeSmrg fi 210106f32fbeSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 210206f32fbeSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 210306f32fbeSmrg else 210406f32fbeSmrg _lt_dsymutil= 210506f32fbeSmrg fi 210606f32fbeSmrg ;; 210706f32fbeSmrg esac 210806f32fbeSmrg]) 2109a253d6aeSmrg 2110a253d6aeSmrg 211157ee1794Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 211257ee1794Smrg# --------------------------------- 211306f32fbeSmrg# Checks for linker and compiler features on darwin 211406f32fbeSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 211506f32fbeSmrg[ 211606f32fbeSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 211706f32fbeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 211806f32fbeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 211906f32fbeSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 212006f32fbeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 212106f32fbeSmrg if test "$lt_cv_ld_force_load" = "yes"; then 212206f32fbeSmrg _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\"`' 212357ee1794Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 212457ee1794Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 212506f32fbeSmrg else 212606f32fbeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 212706f32fbeSmrg fi 212806f32fbeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 212906f32fbeSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 213006f32fbeSmrg case $cc_basename in 213106f32fbeSmrg ifort*) _lt_dar_can_shared=yes ;; 213206f32fbeSmrg *) _lt_dar_can_shared=$GCC ;; 213306f32fbeSmrg esac 213406f32fbeSmrg if test "$_lt_dar_can_shared" = "yes"; then 213506f32fbeSmrg output_verbose_link_cmd=func_echo_all 213606f32fbeSmrg _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}" 213706f32fbeSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 213806f32fbeSmrg _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}" 213906f32fbeSmrg _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}" 214006f32fbeSmrg m4_if([$1], [CXX], 214106f32fbeSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 214206f32fbeSmrg _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}" 214306f32fbeSmrg _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}" 214406f32fbeSmrg fi 214506f32fbeSmrg],[]) 214606f32fbeSmrg else 214706f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 214806f32fbeSmrg fi 2149ea133fd7Smrg]) 2150a253d6aeSmrg 215106f32fbeSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 215206f32fbeSmrg# ---------------------------------- 215306f32fbeSmrg# Links a minimal program and checks the executable 215406f32fbeSmrg# for the system default hardcoded library path. In most cases, 215506f32fbeSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 215606f32fbeSmrg# the location of the communication and MPI libs are included too. 215706f32fbeSmrg# If we don't find anything, use the default library path according 215806f32fbeSmrg# to the aix ld manual. 215906f32fbeSmrg# Store the results from the different compilers for each TAGNAME. 216006f32fbeSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 216106f32fbeSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 216206f32fbeSmrg[m4_require([_LT_DECL_SED])dnl 216306f32fbeSmrgif test "${lt_cv_aix_libpath+set}" = set; then 216406f32fbeSmrg aix_libpath=$lt_cv_aix_libpath 216506f32fbeSmrgelse 216606f32fbeSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 216706f32fbeSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 216806f32fbeSmrg lt_aix_libpath_sed='[ 216906f32fbeSmrg /Import File Strings/,/^$/ { 217006f32fbeSmrg /^0/ { 217106f32fbeSmrg s/^0 *\([^ ]*\) *$/\1/ 217206f32fbeSmrg p 217306f32fbeSmrg } 217406f32fbeSmrg }]' 217506f32fbeSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 217606f32fbeSmrg # Check for a 64-bit object if we didn't find anything. 217706f32fbeSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 217806f32fbeSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 217906f32fbeSmrg fi],[]) 218006f32fbeSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 218106f32fbeSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 218206f32fbeSmrg fi 218306f32fbeSmrg ]) 218406f32fbeSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 218506f32fbeSmrgfi 218606f32fbeSmrg])# _LT_SYS_MODULE_PATH_AIX 2187ea133fd7Smrg 2188ea133fd7Smrg 218906f32fbeSmrg# _LT_SHELL_INIT(ARG) 219006f32fbeSmrg# ------------------- 219106f32fbeSmrgm4_define([_LT_SHELL_INIT], 219206f32fbeSmrg[m4_divert_text([M4SH-INIT], [$1 219306f32fbeSmrg])])# _LT_SHELL_INIT 2194ea133fd7Smrg 2195ea133fd7Smrg 2196a253d6aeSmrg 219706f32fbeSmrg# _LT_PROG_ECHO_BACKSLASH 219806f32fbeSmrg# ----------------------- 219906f32fbeSmrg# Find how we can fake an echo command that does not interpret backslash. 220006f32fbeSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 220106f32fbeSmrg# of the generated configure script which will find a shell with a builtin 220206f32fbeSmrg# printf (which we can use as an echo command). 220306f32fbeSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 220406f32fbeSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 220506f32fbeSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 220606f32fbeSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2207a253d6aeSmrg 220806f32fbeSmrgAC_MSG_CHECKING([how to print strings]) 220906f32fbeSmrg# Test print first, because it will be a builtin if present. 221006f32fbeSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 221106f32fbeSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 221206f32fbeSmrg ECHO='print -r --' 221306f32fbeSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 221406f32fbeSmrg ECHO='printf %s\n' 221506f32fbeSmrgelse 221606f32fbeSmrg # Use this function as a fallback that always works. 221706f32fbeSmrg func_fallback_echo () 221806f32fbeSmrg { 221906f32fbeSmrg eval 'cat <<_LTECHO_EOF 222006f32fbeSmrg$[]1 222106f32fbeSmrg_LTECHO_EOF' 222206f32fbeSmrg } 222306f32fbeSmrg ECHO='func_fallback_echo' 222406f32fbeSmrgfi 2225a253d6aeSmrg 222606f32fbeSmrg# func_echo_all arg... 222706f32fbeSmrg# Invoke $ECHO with all args, space-separated. 222806f32fbeSmrgfunc_echo_all () 222906f32fbeSmrg{ 223006f32fbeSmrg $ECHO "$*" 223106f32fbeSmrg} 2232a253d6aeSmrg 223306f32fbeSmrgcase "$ECHO" in 223406f32fbeSmrg printf*) AC_MSG_RESULT([printf]) ;; 223506f32fbeSmrg print*) AC_MSG_RESULT([print -r]) ;; 223606f32fbeSmrg *) AC_MSG_RESULT([cat]) ;; 223706f32fbeSmrgesac 2238a253d6aeSmrg 223906f32fbeSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 224006f32fbeSmrg[_AS_DETECT_SUGGESTED([ 224106f32fbeSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 224206f32fbeSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 224306f32fbeSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 224406f32fbeSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 224506f32fbeSmrg PATH=/empty FPATH=/empty; export PATH FPATH 224606f32fbeSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 224706f32fbeSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2248a253d6aeSmrg 224906f32fbeSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 225006f32fbeSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 225106f32fbeSmrg])# _LT_PROG_ECHO_BACKSLASH 2252a253d6aeSmrg 2253a253d6aeSmrg 225406f32fbeSmrg# _LT_WITH_SYSROOT 225506f32fbeSmrg# ---------------- 225606f32fbeSmrgAC_DEFUN([_LT_WITH_SYSROOT], 225706f32fbeSmrg[AC_MSG_CHECKING([for sysroot]) 225806f32fbeSmrgAC_ARG_WITH([sysroot], 225906f32fbeSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 226006f32fbeSmrg (or the compiler's sysroot if not specified).], 226106f32fbeSmrg[], [with_sysroot=no]) 226206f32fbeSmrg 226306f32fbeSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 226406f32fbeSmrgdnl in case the user passed a directory name. 226506f32fbeSmrglt_sysroot= 226606f32fbeSmrgcase ${with_sysroot} in #( 226706f32fbeSmrg yes) 226806f32fbeSmrg if test "$GCC" = yes; then 226906f32fbeSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 227006f32fbeSmrg fi 227106f32fbeSmrg ;; #( 227206f32fbeSmrg /*) 227306f32fbeSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 227406f32fbeSmrg ;; #( 227506f32fbeSmrg no|'') 227606f32fbeSmrg ;; #( 227706f32fbeSmrg *) 227806f32fbeSmrg AC_MSG_RESULT([${with_sysroot}]) 227906f32fbeSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 228006f32fbeSmrg ;; 228106f32fbeSmrgesac 2282a253d6aeSmrg 228306f32fbeSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 228406f32fbeSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 228506f32fbeSmrg[dependent libraries, and in which our libraries should be installed.])]) 2286a253d6aeSmrg 228706f32fbeSmrg# _LT_ENABLE_LOCK 228806f32fbeSmrg# --------------- 228906f32fbeSmrgm4_defun([_LT_ENABLE_LOCK], 229006f32fbeSmrg[AC_ARG_ENABLE([libtool-lock], 229106f32fbeSmrg [AS_HELP_STRING([--disable-libtool-lock], 229206f32fbeSmrg [avoid locking (might break parallel builds)])]) 229306f32fbeSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2294a253d6aeSmrg 229506f32fbeSmrg# Some flags need to be propagated to the compiler or linker for good 229606f32fbeSmrg# libtool support. 229706f32fbeSmrgcase $host in 229806f32fbeSmrgia64-*-hpux*) 229906f32fbeSmrg # Find out which ABI we are using. 230006f32fbeSmrg echo 'int i;' > conftest.$ac_ext 230106f32fbeSmrg if AC_TRY_EVAL(ac_compile); then 230206f32fbeSmrg case `/usr/bin/file conftest.$ac_objext` in 230306f32fbeSmrg *ELF-32*) 230406f32fbeSmrg HPUX_IA64_MODE="32" 230506f32fbeSmrg ;; 230606f32fbeSmrg *ELF-64*) 230706f32fbeSmrg HPUX_IA64_MODE="64" 230806f32fbeSmrg ;; 230906f32fbeSmrg esac 231006f32fbeSmrg fi 231106f32fbeSmrg rm -rf conftest* 231206f32fbeSmrg ;; 231306f32fbeSmrg*-*-irix6*) 231406f32fbeSmrg # Find out which ABI we are using. 231506f32fbeSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 231606f32fbeSmrg if AC_TRY_EVAL(ac_compile); then 231706f32fbeSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 231806f32fbeSmrg case `/usr/bin/file conftest.$ac_objext` in 231906f32fbeSmrg *32-bit*) 232006f32fbeSmrg LD="${LD-ld} -melf32bsmip" 232106f32fbeSmrg ;; 232206f32fbeSmrg *N32*) 232306f32fbeSmrg LD="${LD-ld} -melf32bmipn32" 232406f32fbeSmrg ;; 232506f32fbeSmrg *64-bit*) 232606f32fbeSmrg LD="${LD-ld} -melf64bmip" 232706f32fbeSmrg ;; 232806f32fbeSmrg esac 232906f32fbeSmrg else 233006f32fbeSmrg case `/usr/bin/file conftest.$ac_objext` in 233106f32fbeSmrg *32-bit*) 233206f32fbeSmrg LD="${LD-ld} -32" 233306f32fbeSmrg ;; 233406f32fbeSmrg *N32*) 233506f32fbeSmrg LD="${LD-ld} -n32" 233606f32fbeSmrg ;; 233706f32fbeSmrg *64-bit*) 233806f32fbeSmrg LD="${LD-ld} -64" 233906f32fbeSmrg ;; 234006f32fbeSmrg esac 234106f32fbeSmrg fi 234206f32fbeSmrg fi 234306f32fbeSmrg rm -rf conftest* 234406f32fbeSmrg ;; 2345a253d6aeSmrg 234606f32fbeSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 234706f32fbeSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 234806f32fbeSmrg # Find out which ABI we are using. 234906f32fbeSmrg echo 'int i;' > conftest.$ac_ext 235006f32fbeSmrg if AC_TRY_EVAL(ac_compile); then 235106f32fbeSmrg case `/usr/bin/file conftest.o` in 235206f32fbeSmrg *32-bit*) 235306f32fbeSmrg case $host in 235406f32fbeSmrg x86_64-*kfreebsd*-gnu) 235506f32fbeSmrg LD="${LD-ld} -m elf_i386_fbsd" 235606f32fbeSmrg ;; 235706f32fbeSmrg x86_64-*linux*) 235806f32fbeSmrg LD="${LD-ld} -m elf_i386" 235906f32fbeSmrg ;; 236006f32fbeSmrg ppc64-*linux*|powerpc64-*linux*) 236106f32fbeSmrg LD="${LD-ld} -m elf32ppclinux" 236206f32fbeSmrg ;; 236306f32fbeSmrg s390x-*linux*) 236406f32fbeSmrg LD="${LD-ld} -m elf_s390" 236506f32fbeSmrg ;; 236606f32fbeSmrg sparc64-*linux*) 236706f32fbeSmrg LD="${LD-ld} -m elf32_sparc" 236806f32fbeSmrg ;; 236906f32fbeSmrg esac 237006f32fbeSmrg ;; 237106f32fbeSmrg *64-bit*) 237206f32fbeSmrg case $host in 237306f32fbeSmrg x86_64-*kfreebsd*-gnu) 237406f32fbeSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 237506f32fbeSmrg ;; 237606f32fbeSmrg x86_64-*linux*) 237706f32fbeSmrg LD="${LD-ld} -m elf_x86_64" 237806f32fbeSmrg ;; 237906f32fbeSmrg ppc*-*linux*|powerpc*-*linux*) 238006f32fbeSmrg LD="${LD-ld} -m elf64ppc" 238106f32fbeSmrg ;; 238206f32fbeSmrg s390*-*linux*|s390*-*tpf*) 238306f32fbeSmrg LD="${LD-ld} -m elf64_s390" 238406f32fbeSmrg ;; 238506f32fbeSmrg sparc*-*linux*) 238606f32fbeSmrg LD="${LD-ld} -m elf64_sparc" 238706f32fbeSmrg ;; 238806f32fbeSmrg esac 238906f32fbeSmrg ;; 239006f32fbeSmrg esac 239106f32fbeSmrg fi 239206f32fbeSmrg rm -rf conftest* 239306f32fbeSmrg ;; 2394a253d6aeSmrg 239506f32fbeSmrg*-*-sco3.2v5*) 239606f32fbeSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 239706f32fbeSmrg SAVE_CFLAGS="$CFLAGS" 239806f32fbeSmrg CFLAGS="$CFLAGS -belf" 239906f32fbeSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 240006f32fbeSmrg [AC_LANG_PUSH(C) 240106f32fbeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 240206f32fbeSmrg AC_LANG_POP]) 240306f32fbeSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 240406f32fbeSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 240506f32fbeSmrg CFLAGS="$SAVE_CFLAGS" 240606f32fbeSmrg fi 240706f32fbeSmrg ;; 240857ee1794Smrg*-*solaris*) 240906f32fbeSmrg # Find out which ABI we are using. 241006f32fbeSmrg echo 'int i;' > conftest.$ac_ext 241106f32fbeSmrg if AC_TRY_EVAL(ac_compile); then 241206f32fbeSmrg case `/usr/bin/file conftest.o` in 241306f32fbeSmrg *64-bit*) 241406f32fbeSmrg case $lt_cv_prog_gnu_ld in 241557ee1794Smrg yes*) 241657ee1794Smrg case $host in 241757ee1794Smrg i?86-*-solaris*) 241857ee1794Smrg LD="${LD-ld} -m elf_x86_64" 241957ee1794Smrg ;; 242057ee1794Smrg sparc*-*-solaris*) 242157ee1794Smrg LD="${LD-ld} -m elf64_sparc" 242257ee1794Smrg ;; 242357ee1794Smrg esac 242457ee1794Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 242557ee1794Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 242657ee1794Smrg LD="${LD-ld}_sol2" 242757ee1794Smrg fi 242857ee1794Smrg ;; 242906f32fbeSmrg *) 243006f32fbeSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 243106f32fbeSmrg LD="${LD-ld} -64" 243206f32fbeSmrg fi 243306f32fbeSmrg ;; 243406f32fbeSmrg esac 243506f32fbeSmrg ;; 243606f32fbeSmrg esac 243706f32fbeSmrg fi 243806f32fbeSmrg rm -rf conftest* 243906f32fbeSmrg ;; 244006f32fbeSmrgesac 2441a253d6aeSmrg 244206f32fbeSmrgneed_locks="$enable_libtool_lock" 244306f32fbeSmrg])# _LT_ENABLE_LOCK 2444a253d6aeSmrg 2445a253d6aeSmrg 244606f32fbeSmrg# _LT_PROG_AR 244706f32fbeSmrg# ----------- 244806f32fbeSmrgm4_defun([_LT_PROG_AR], 244906f32fbeSmrg[AC_CHECK_TOOLS(AR, [ar], false) 245006f32fbeSmrg: ${AR=ar} 245106f32fbeSmrg: ${AR_FLAGS=cru} 245206f32fbeSmrg_LT_DECL([], [AR], [1], [The archiver]) 245306f32fbeSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 245406f32fbeSmrg 245506f32fbeSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 245606f32fbeSmrg [lt_cv_ar_at_file=no 245706f32fbeSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 245806f32fbeSmrg [echo conftest.$ac_objext > conftest.lst 245906f32fbeSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 246006f32fbeSmrg AC_TRY_EVAL([lt_ar_try]) 246106f32fbeSmrg if test "$ac_status" -eq 0; then 246206f32fbeSmrg # Ensure the archiver fails upon bogus file names. 246306f32fbeSmrg rm -f conftest.$ac_objext libconftest.a 246406f32fbeSmrg AC_TRY_EVAL([lt_ar_try]) 246506f32fbeSmrg if test "$ac_status" -ne 0; then 246606f32fbeSmrg lt_cv_ar_at_file=@ 246706f32fbeSmrg fi 246806f32fbeSmrg fi 246906f32fbeSmrg rm -f conftest.* libconftest.a 247006f32fbeSmrg ]) 247106f32fbeSmrg ]) 2472a253d6aeSmrg 247306f32fbeSmrgif test "x$lt_cv_ar_at_file" = xno; then 247406f32fbeSmrg archiver_list_spec= 247506f32fbeSmrgelse 247606f32fbeSmrg archiver_list_spec=$lt_cv_ar_at_file 247706f32fbeSmrgfi 247806f32fbeSmrg_LT_DECL([], [archiver_list_spec], [1], 247906f32fbeSmrg [How to feed a file listing to the archiver]) 248006f32fbeSmrg])# _LT_PROG_AR 2481a253d6aeSmrg 2482a253d6aeSmrg 248306f32fbeSmrg# _LT_CMD_OLD_ARCHIVE 248406f32fbeSmrg# ------------------- 248506f32fbeSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 248606f32fbeSmrg[_LT_PROG_AR 2487a253d6aeSmrg 248806f32fbeSmrgAC_CHECK_TOOL(STRIP, strip, :) 248906f32fbeSmrgtest -z "$STRIP" && STRIP=: 249006f32fbeSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2491a253d6aeSmrg 249206f32fbeSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 249306f32fbeSmrgtest -z "$RANLIB" && RANLIB=: 249406f32fbeSmrg_LT_DECL([], [RANLIB], [1], 249506f32fbeSmrg [Commands used to install an old-style archive]) 2496a253d6aeSmrg 249706f32fbeSmrg# Determine commands to create old-style static archives. 249806f32fbeSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 249906f32fbeSmrgold_postinstall_cmds='chmod 644 $oldlib' 250006f32fbeSmrgold_postuninstall_cmds= 2501a253d6aeSmrg 250206f32fbeSmrgif test -n "$RANLIB"; then 250306f32fbeSmrg case $host_os in 250406f32fbeSmrg openbsd*) 250557ee1794Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 250606f32fbeSmrg ;; 250706f32fbeSmrg *) 250857ee1794Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 250906f32fbeSmrg ;; 251006f32fbeSmrg esac 251157ee1794Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 251206f32fbeSmrgfi 2513a253d6aeSmrg 251406f32fbeSmrgcase $host_os in 251506f32fbeSmrg darwin*) 251606f32fbeSmrg lock_old_archive_extraction=yes ;; 251706f32fbeSmrg *) 251806f32fbeSmrg lock_old_archive_extraction=no ;; 251906f32fbeSmrgesac 252006f32fbeSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 252106f32fbeSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 252206f32fbeSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 252306f32fbeSmrg [Commands used to build an old-style archive]) 252406f32fbeSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 252506f32fbeSmrg [Whether to use a lock for old archive extraction]) 252606f32fbeSmrg])# _LT_CMD_OLD_ARCHIVE 2527a253d6aeSmrg 2528a253d6aeSmrg 252906f32fbeSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 253006f32fbeSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 253106f32fbeSmrg# ---------------------------------------------------------------- 253206f32fbeSmrg# Check whether the given compiler option works 253306f32fbeSmrgAC_DEFUN([_LT_COMPILER_OPTION], 253406f32fbeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 253506f32fbeSmrgm4_require([_LT_DECL_SED])dnl 253606f32fbeSmrgAC_CACHE_CHECK([$1], [$2], 253706f32fbeSmrg [$2=no 253806f32fbeSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 253906f32fbeSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 254006f32fbeSmrg lt_compiler_flag="$3" 254106f32fbeSmrg # Insert the option either (1) after the last *FLAGS variable, or 254206f32fbeSmrg # (2) before a word containing "conftest.", or (3) at the end. 254306f32fbeSmrg # Note that $ac_compile itself does not contain backslashes and begins 254406f32fbeSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 254506f32fbeSmrg # The option is referenced via a variable to avoid confusing sed. 254606f32fbeSmrg lt_compile=`echo "$ac_compile" | $SED \ 254706f32fbeSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 254806f32fbeSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 254906f32fbeSmrg -e 's:$: $lt_compiler_flag:'` 255006f32fbeSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 255106f32fbeSmrg (eval "$lt_compile" 2>conftest.err) 255206f32fbeSmrg ac_status=$? 255306f32fbeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 255406f32fbeSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 255506f32fbeSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 255606f32fbeSmrg # The compiler can only warn and ignore the option if not recognized 255706f32fbeSmrg # So say no if there are warnings other than the usual output. 255806f32fbeSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 255906f32fbeSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 256006f32fbeSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 256106f32fbeSmrg $2=yes 256206f32fbeSmrg fi 256306f32fbeSmrg fi 256406f32fbeSmrg $RM conftest* 256506f32fbeSmrg]) 2566a253d6aeSmrg 256706f32fbeSmrgif test x"[$]$2" = xyes; then 256806f32fbeSmrg m4_if([$5], , :, [$5]) 256906f32fbeSmrgelse 257006f32fbeSmrg m4_if([$6], , :, [$6]) 257106f32fbeSmrgfi 257206f32fbeSmrg])# _LT_COMPILER_OPTION 2573a253d6aeSmrg 257406f32fbeSmrg# Old name: 257506f32fbeSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 257606f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 257706f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2578a253d6aeSmrg 2579a253d6aeSmrg 258006f32fbeSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 258106f32fbeSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 258206f32fbeSmrg# ---------------------------------------------------- 258306f32fbeSmrg# Check whether the given linker option works 258406f32fbeSmrgAC_DEFUN([_LT_LINKER_OPTION], 258506f32fbeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 258606f32fbeSmrgm4_require([_LT_DECL_SED])dnl 258706f32fbeSmrgAC_CACHE_CHECK([$1], [$2], 258806f32fbeSmrg [$2=no 258906f32fbeSmrg save_LDFLAGS="$LDFLAGS" 259006f32fbeSmrg LDFLAGS="$LDFLAGS $3" 259106f32fbeSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 259206f32fbeSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 259306f32fbeSmrg # The linker can only warn and ignore the option if not recognized 259406f32fbeSmrg # So say no if there are warnings 259506f32fbeSmrg if test -s conftest.err; then 259606f32fbeSmrg # Append any errors to the config.log. 259706f32fbeSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 259806f32fbeSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 259906f32fbeSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 260006f32fbeSmrg if diff conftest.exp conftest.er2 >/dev/null; then 260106f32fbeSmrg $2=yes 260206f32fbeSmrg fi 260306f32fbeSmrg else 260406f32fbeSmrg $2=yes 260506f32fbeSmrg fi 260606f32fbeSmrg fi 260706f32fbeSmrg $RM -r conftest* 260806f32fbeSmrg LDFLAGS="$save_LDFLAGS" 260906f32fbeSmrg]) 2610a253d6aeSmrg 261106f32fbeSmrgif test x"[$]$2" = xyes; then 261206f32fbeSmrg m4_if([$4], , :, [$4]) 261306f32fbeSmrgelse 261406f32fbeSmrg m4_if([$5], , :, [$5]) 261506f32fbeSmrgfi 261606f32fbeSmrg])# _LT_LINKER_OPTION 2617a253d6aeSmrg 261806f32fbeSmrg# Old name: 261906f32fbeSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 262006f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 262106f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2622a253d6aeSmrg 2623a253d6aeSmrg 262406f32fbeSmrg# LT_CMD_MAX_LEN 262506f32fbeSmrg#--------------- 262606f32fbeSmrgAC_DEFUN([LT_CMD_MAX_LEN], 262706f32fbeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 262806f32fbeSmrg# find the maximum length of command line arguments 262906f32fbeSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 263006f32fbeSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 263106f32fbeSmrg i=0 263206f32fbeSmrg teststring="ABCD" 2633a253d6aeSmrg 263406f32fbeSmrg case $build_os in 263506f32fbeSmrg msdosdjgpp*) 263606f32fbeSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 263706f32fbeSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 263806f32fbeSmrg # during glob expansion). Even if it were fixed, the result of this 263906f32fbeSmrg # check would be larger than it should be. 264006f32fbeSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 264106f32fbeSmrg ;; 2642a253d6aeSmrg 264306f32fbeSmrg gnu*) 264406f32fbeSmrg # Under GNU Hurd, this test is not required because there is 264506f32fbeSmrg # no limit to the length of command line arguments. 264606f32fbeSmrg # Libtool will interpret -1 as no limit whatsoever 264706f32fbeSmrg lt_cv_sys_max_cmd_len=-1; 264806f32fbeSmrg ;; 264925b89263Smrg 265006f32fbeSmrg cygwin* | mingw* | cegcc*) 265106f32fbeSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 265206f32fbeSmrg # about 5 minutes as the teststring grows exponentially. 265306f32fbeSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 265406f32fbeSmrg # you end up with a "frozen" computer, even though with patience 265506f32fbeSmrg # the test eventually succeeds (with a max line length of 256k). 265606f32fbeSmrg # Instead, let's just punt: use the minimum linelength reported by 265706f32fbeSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 265806f32fbeSmrg lt_cv_sys_max_cmd_len=8192; 265906f32fbeSmrg ;; 266025b89263Smrg 266106f32fbeSmrg mint*) 266206f32fbeSmrg # On MiNT this can take a long time and run out of memory. 266306f32fbeSmrg lt_cv_sys_max_cmd_len=8192; 266406f32fbeSmrg ;; 266525b89263Smrg 266606f32fbeSmrg amigaos*) 266706f32fbeSmrg # On AmigaOS with pdksh, this test takes hours, literally. 266806f32fbeSmrg # So we just punt and use a minimum line length of 8192. 266906f32fbeSmrg lt_cv_sys_max_cmd_len=8192; 267006f32fbeSmrg ;; 267125b89263Smrg 267206f32fbeSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 267306f32fbeSmrg # This has been around since 386BSD, at least. Likely further. 267406f32fbeSmrg if test -x /sbin/sysctl; then 267506f32fbeSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 267606f32fbeSmrg elif test -x /usr/sbin/sysctl; then 267706f32fbeSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 267806f32fbeSmrg else 267906f32fbeSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 268006f32fbeSmrg fi 268106f32fbeSmrg # And add a safety zone 268206f32fbeSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 268306f32fbeSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 268406f32fbeSmrg ;; 268525b89263Smrg 268606f32fbeSmrg interix*) 268706f32fbeSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 268806f32fbeSmrg lt_cv_sys_max_cmd_len=196608 268906f32fbeSmrg ;; 269025b89263Smrg 269157ee1794Smrg os2*) 269257ee1794Smrg # The test takes a long time on OS/2. 269357ee1794Smrg lt_cv_sys_max_cmd_len=8192 269457ee1794Smrg ;; 269557ee1794Smrg 269606f32fbeSmrg osf*) 269706f32fbeSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 269806f32fbeSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 269906f32fbeSmrg # nice to cause kernel panics so lets avoid the loop below. 270006f32fbeSmrg # First set a reasonable default. 270106f32fbeSmrg lt_cv_sys_max_cmd_len=16384 270206f32fbeSmrg # 270306f32fbeSmrg if test -x /sbin/sysconfig; then 270406f32fbeSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 270506f32fbeSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 270625b89263Smrg esac 270725b89263Smrg fi 270806f32fbeSmrg ;; 270906f32fbeSmrg sco3.2v5*) 271006f32fbeSmrg lt_cv_sys_max_cmd_len=102400 271106f32fbeSmrg ;; 271206f32fbeSmrg sysv5* | sco5v6* | sysv4.2uw2*) 271306f32fbeSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 271406f32fbeSmrg if test -n "$kargmax"; then 271506f32fbeSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 271625b89263Smrg else 271706f32fbeSmrg lt_cv_sys_max_cmd_len=32768 271825b89263Smrg fi 271906f32fbeSmrg ;; 272006f32fbeSmrg *) 272106f32fbeSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 272206f32fbeSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 272306f32fbeSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 272406f32fbeSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 272525b89263Smrg else 272606f32fbeSmrg # Make teststring a little bigger before we do anything with it. 272706f32fbeSmrg # a 1K string should be a reasonable start. 272806f32fbeSmrg for i in 1 2 3 4 5 6 7 8 ; do 272906f32fbeSmrg teststring=$teststring$teststring 273006f32fbeSmrg done 273106f32fbeSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 273206f32fbeSmrg # If test is not a shell built-in, we'll probably end up computing a 273306f32fbeSmrg # maximum length that is only half of the actual maximum length, but 273406f32fbeSmrg # we can't tell. 273557ee1794Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 273606f32fbeSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 273706f32fbeSmrg test $i != 17 # 1/2 MB should be enough 273806f32fbeSmrg do 273906f32fbeSmrg i=`expr $i + 1` 274006f32fbeSmrg teststring=$teststring$teststring 274106f32fbeSmrg done 274206f32fbeSmrg # Only check the string length outside the loop. 274306f32fbeSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 274406f32fbeSmrg teststring= 274506f32fbeSmrg # Add a significant safety factor because C++ compilers can tack on 274606f32fbeSmrg # massive amounts of additional arguments before passing them to the 274706f32fbeSmrg # linker. It appears as though 1/2 is a usable value. 274806f32fbeSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 274925b89263Smrg fi 275025b89263Smrg ;; 275125b89263Smrg esac 275225b89263Smrg]) 275306f32fbeSmrgif test -n $lt_cv_sys_max_cmd_len ; then 275406f32fbeSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 275506f32fbeSmrgelse 275606f32fbeSmrg AC_MSG_RESULT(none) 275706f32fbeSmrgfi 275806f32fbeSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 275906f32fbeSmrg_LT_DECL([], [max_cmd_len], [0], 276006f32fbeSmrg [What is the maximum length of a command?]) 276106f32fbeSmrg])# LT_CMD_MAX_LEN 276225b89263Smrg 276306f32fbeSmrg# Old name: 276406f32fbeSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 276506f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 276606f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 276725b89263Smrg 276825b89263Smrg 276906f32fbeSmrg# _LT_HEADER_DLFCN 277006f32fbeSmrg# ---------------- 277106f32fbeSmrgm4_defun([_LT_HEADER_DLFCN], 277206f32fbeSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 277306f32fbeSmrg])# _LT_HEADER_DLFCN 277425b89263Smrg 277525b89263Smrg 277606f32fbeSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 277706f32fbeSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 277806f32fbeSmrg# ---------------------------------------------------------------- 277906f32fbeSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 278006f32fbeSmrg[m4_require([_LT_HEADER_DLFCN])dnl 278106f32fbeSmrgif test "$cross_compiling" = yes; then : 278206f32fbeSmrg [$4] 278306f32fbeSmrgelse 278406f32fbeSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 278506f32fbeSmrg lt_status=$lt_dlunknown 278606f32fbeSmrg cat > conftest.$ac_ext <<_LT_EOF 278706f32fbeSmrg[#line $LINENO "configure" 278806f32fbeSmrg#include "confdefs.h" 278925b89263Smrg 279006f32fbeSmrg#if HAVE_DLFCN_H 279106f32fbeSmrg#include <dlfcn.h> 279206f32fbeSmrg#endif 279325b89263Smrg 279406f32fbeSmrg#include <stdio.h> 279525b89263Smrg 279606f32fbeSmrg#ifdef RTLD_GLOBAL 279706f32fbeSmrg# define LT_DLGLOBAL RTLD_GLOBAL 279806f32fbeSmrg#else 279906f32fbeSmrg# ifdef DL_GLOBAL 280006f32fbeSmrg# define LT_DLGLOBAL DL_GLOBAL 280106f32fbeSmrg# else 280206f32fbeSmrg# define LT_DLGLOBAL 0 280306f32fbeSmrg# endif 280406f32fbeSmrg#endif 280525b89263Smrg 280606f32fbeSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 280706f32fbeSmrg find out it does not work in some platform. */ 280806f32fbeSmrg#ifndef LT_DLLAZY_OR_NOW 280906f32fbeSmrg# ifdef RTLD_LAZY 281006f32fbeSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 281106f32fbeSmrg# else 281206f32fbeSmrg# ifdef DL_LAZY 281306f32fbeSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 281406f32fbeSmrg# else 281506f32fbeSmrg# ifdef RTLD_NOW 281606f32fbeSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 281706f32fbeSmrg# else 281806f32fbeSmrg# ifdef DL_NOW 281906f32fbeSmrg# define LT_DLLAZY_OR_NOW DL_NOW 282006f32fbeSmrg# else 282106f32fbeSmrg# define LT_DLLAZY_OR_NOW 0 282206f32fbeSmrg# endif 282306f32fbeSmrg# endif 282406f32fbeSmrg# endif 282506f32fbeSmrg# endif 282606f32fbeSmrg#endif 282725b89263Smrg 282806f32fbeSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 282906f32fbeSmrg correspondingly for the symbols needed. */ 283006f32fbeSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 283106f32fbeSmrgint fnord () __attribute__((visibility("default"))); 283206f32fbeSmrg#endif 283306f32fbeSmrg 283406f32fbeSmrgint fnord () { return 42; } 283506f32fbeSmrgint main () 283625b89263Smrg{ 283706f32fbeSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 283806f32fbeSmrg int status = $lt_dlunknown; 283925b89263Smrg 284006f32fbeSmrg if (self) 284106f32fbeSmrg { 284206f32fbeSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 284306f32fbeSmrg else 284406f32fbeSmrg { 284506f32fbeSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 284606f32fbeSmrg else puts (dlerror ()); 284706f32fbeSmrg } 284806f32fbeSmrg /* dlclose (self); */ 284906f32fbeSmrg } 285006f32fbeSmrg else 285106f32fbeSmrg puts (dlerror ()); 285225b89263Smrg 285306f32fbeSmrg return status; 285406f32fbeSmrg}] 285506f32fbeSmrg_LT_EOF 285606f32fbeSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 285706f32fbeSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 285806f32fbeSmrg lt_status=$? 285906f32fbeSmrg case x$lt_status in 286006f32fbeSmrg x$lt_dlno_uscore) $1 ;; 286106f32fbeSmrg x$lt_dlneed_uscore) $2 ;; 286206f32fbeSmrg x$lt_dlunknown|x*) $3 ;; 286306f32fbeSmrg esac 286406f32fbeSmrg else : 286506f32fbeSmrg # compilation failed 286606f32fbeSmrg $3 286706f32fbeSmrg fi 286806f32fbeSmrgfi 286906f32fbeSmrgrm -fr conftest* 287006f32fbeSmrg])# _LT_TRY_DLOPEN_SELF 287125b89263Smrg 287225b89263Smrg 287306f32fbeSmrg# LT_SYS_DLOPEN_SELF 287406f32fbeSmrg# ------------------ 287506f32fbeSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 287606f32fbeSmrg[m4_require([_LT_HEADER_DLFCN])dnl 287706f32fbeSmrgif test "x$enable_dlopen" != xyes; then 287806f32fbeSmrg enable_dlopen=unknown 287906f32fbeSmrg enable_dlopen_self=unknown 288006f32fbeSmrg enable_dlopen_self_static=unknown 288106f32fbeSmrgelse 288206f32fbeSmrg lt_cv_dlopen=no 288306f32fbeSmrg lt_cv_dlopen_libs= 288425b89263Smrg 288506f32fbeSmrg case $host_os in 288606f32fbeSmrg beos*) 288706f32fbeSmrg lt_cv_dlopen="load_add_on" 288806f32fbeSmrg lt_cv_dlopen_libs= 288906f32fbeSmrg lt_cv_dlopen_self=yes 289006f32fbeSmrg ;; 289125b89263Smrg 289206f32fbeSmrg mingw* | pw32* | cegcc*) 289306f32fbeSmrg lt_cv_dlopen="LoadLibrary" 289406f32fbeSmrg lt_cv_dlopen_libs= 289506f32fbeSmrg ;; 289625b89263Smrg 289706f32fbeSmrg cygwin*) 289806f32fbeSmrg lt_cv_dlopen="dlopen" 289906f32fbeSmrg lt_cv_dlopen_libs= 290006f32fbeSmrg ;; 290125b89263Smrg 290206f32fbeSmrg darwin*) 290306f32fbeSmrg # if libdl is installed we need to link against it 290406f32fbeSmrg AC_CHECK_LIB([dl], [dlopen], 290506f32fbeSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 290606f32fbeSmrg lt_cv_dlopen="dyld" 290706f32fbeSmrg lt_cv_dlopen_libs= 290806f32fbeSmrg lt_cv_dlopen_self=yes 290906f32fbeSmrg ]) 291006f32fbeSmrg ;; 291125b89263Smrg 291206f32fbeSmrg *) 291306f32fbeSmrg AC_CHECK_FUNC([shl_load], 291406f32fbeSmrg [lt_cv_dlopen="shl_load"], 291506f32fbeSmrg [AC_CHECK_LIB([dld], [shl_load], 291606f32fbeSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 291706f32fbeSmrg [AC_CHECK_FUNC([dlopen], 291806f32fbeSmrg [lt_cv_dlopen="dlopen"], 291906f32fbeSmrg [AC_CHECK_LIB([dl], [dlopen], 292006f32fbeSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 292106f32fbeSmrg [AC_CHECK_LIB([svld], [dlopen], 292206f32fbeSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 292306f32fbeSmrg [AC_CHECK_LIB([dld], [dld_link], 292406f32fbeSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 292506f32fbeSmrg ]) 292606f32fbeSmrg ]) 292706f32fbeSmrg ]) 292806f32fbeSmrg ]) 292906f32fbeSmrg ]) 293006f32fbeSmrg ;; 293106f32fbeSmrg esac 293225b89263Smrg 293306f32fbeSmrg if test "x$lt_cv_dlopen" != xno; then 293406f32fbeSmrg enable_dlopen=yes 293506f32fbeSmrg else 293606f32fbeSmrg enable_dlopen=no 293706f32fbeSmrg fi 293825b89263Smrg 293906f32fbeSmrg case $lt_cv_dlopen in 294006f32fbeSmrg dlopen) 294106f32fbeSmrg save_CPPFLAGS="$CPPFLAGS" 294206f32fbeSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 294325b89263Smrg 294406f32fbeSmrg save_LDFLAGS="$LDFLAGS" 294506f32fbeSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 294625b89263Smrg 294706f32fbeSmrg save_LIBS="$LIBS" 294806f32fbeSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 294925b89263Smrg 295006f32fbeSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 295106f32fbeSmrg lt_cv_dlopen_self, [dnl 295206f32fbeSmrg _LT_TRY_DLOPEN_SELF( 295306f32fbeSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 295406f32fbeSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 295506f32fbeSmrg ]) 295625b89263Smrg 295706f32fbeSmrg if test "x$lt_cv_dlopen_self" = xyes; then 295806f32fbeSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 295906f32fbeSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 296006f32fbeSmrg lt_cv_dlopen_self_static, [dnl 296106f32fbeSmrg _LT_TRY_DLOPEN_SELF( 296206f32fbeSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 296306f32fbeSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 296406f32fbeSmrg ]) 296506f32fbeSmrg fi 296606f32fbeSmrg 296706f32fbeSmrg CPPFLAGS="$save_CPPFLAGS" 296806f32fbeSmrg LDFLAGS="$save_LDFLAGS" 296906f32fbeSmrg LIBS="$save_LIBS" 297025b89263Smrg ;; 297125b89263Smrg esac 297206f32fbeSmrg 297306f32fbeSmrg case $lt_cv_dlopen_self in 297406f32fbeSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 297506f32fbeSmrg *) enable_dlopen_self=unknown ;; 297606f32fbeSmrg esac 297706f32fbeSmrg 297806f32fbeSmrg case $lt_cv_dlopen_self_static in 297906f32fbeSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 298006f32fbeSmrg *) enable_dlopen_self_static=unknown ;; 298106f32fbeSmrg esac 298225b89263Smrgfi 298306f32fbeSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 298406f32fbeSmrg [Whether dlopen is supported]) 298506f32fbeSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 298606f32fbeSmrg [Whether dlopen of programs is supported]) 298706f32fbeSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 298806f32fbeSmrg [Whether dlopen of statically linked programs is supported]) 298906f32fbeSmrg])# LT_SYS_DLOPEN_SELF 299025b89263Smrg 299106f32fbeSmrg# Old name: 299206f32fbeSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 299306f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 299406f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 299525b89263Smrg 299625b89263Smrg 299706f32fbeSmrg# _LT_COMPILER_C_O([TAGNAME]) 299806f32fbeSmrg# --------------------------- 299906f32fbeSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 300006f32fbeSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 300106f32fbeSmrgm4_defun([_LT_COMPILER_C_O], 300206f32fbeSmrg[m4_require([_LT_DECL_SED])dnl 300306f32fbeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 300406f32fbeSmrgm4_require([_LT_TAG_COMPILER])dnl 300506f32fbeSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 300606f32fbeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 300706f32fbeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 300806f32fbeSmrg $RM -r conftest 2>/dev/null 300906f32fbeSmrg mkdir conftest 301006f32fbeSmrg cd conftest 301106f32fbeSmrg mkdir out 301225b89263Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 301306f32fbeSmrg 301406f32fbeSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 301525b89263Smrg # Insert the option either (1) after the last *FLAGS variable, or 301625b89263Smrg # (2) before a word containing "conftest.", or (3) at the end. 301725b89263Smrg # Note that $ac_compile itself does not contain backslashes and begins 301825b89263Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 301925b89263Smrg lt_compile=`echo "$ac_compile" | $SED \ 302025b89263Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 302125b89263Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 302225b89263Smrg -e 's:$: $lt_compiler_flag:'` 302325b89263Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 302406f32fbeSmrg (eval "$lt_compile" 2>out/conftest.err) 302525b89263Smrg ac_status=$? 302606f32fbeSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 302725b89263Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 302806f32fbeSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 302906f32fbeSmrg then 303025b89263Smrg # The compiler can only warn and ignore the option if not recognized 303106f32fbeSmrg # So say no if there are warnings 303206f32fbeSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 303306f32fbeSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 303406f32fbeSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 303506f32fbeSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 303625b89263Smrg fi 303725b89263Smrg fi 303806f32fbeSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 303906f32fbeSmrg $RM conftest* 304006f32fbeSmrg # SGI C++ compiler will create directory out/ii_files/ for 304106f32fbeSmrg # template instantiation 304206f32fbeSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 304306f32fbeSmrg $RM out/* && rmdir out 304406f32fbeSmrg cd .. 304506f32fbeSmrg $RM -r conftest 304625b89263Smrg $RM conftest* 304725b89263Smrg]) 304806f32fbeSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 304906f32fbeSmrg [Does compiler simultaneously support -c and -o options?]) 305006f32fbeSmrg])# _LT_COMPILER_C_O 305125b89263Smrg 305225b89263Smrg 305306f32fbeSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 305406f32fbeSmrg# ---------------------------------- 305506f32fbeSmrg# Check to see if we can do hard links to lock some files if needed 305606f32fbeSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 305706f32fbeSmrg[m4_require([_LT_ENABLE_LOCK])dnl 305806f32fbeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 305906f32fbeSmrg_LT_COMPILER_C_O([$1]) 306025b89263Smrg 306106f32fbeSmrghard_links="nottested" 306206f32fbeSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 306306f32fbeSmrg # do not overwrite the value of need_locks provided by the user 306406f32fbeSmrg AC_MSG_CHECKING([if we can lock with hard links]) 306506f32fbeSmrg hard_links=yes 306606f32fbeSmrg $RM conftest* 306706f32fbeSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 306806f32fbeSmrg touch conftest.a 306906f32fbeSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 307006f32fbeSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 307106f32fbeSmrg AC_MSG_RESULT([$hard_links]) 307206f32fbeSmrg if test "$hard_links" = no; then 307306f32fbeSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 307406f32fbeSmrg need_locks=warn 307506f32fbeSmrg fi 307625b89263Smrgelse 307706f32fbeSmrg need_locks=no 307825b89263Smrgfi 307906f32fbeSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 308006f32fbeSmrg])# _LT_COMPILER_FILE_LOCKS 308125b89263Smrg 308225b89263Smrg 308306f32fbeSmrg# _LT_CHECK_OBJDIR 308406f32fbeSmrg# ---------------- 308506f32fbeSmrgm4_defun([_LT_CHECK_OBJDIR], 308606f32fbeSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 308706f32fbeSmrg[rm -f .libs 2>/dev/null 308806f32fbeSmrgmkdir .libs 2>/dev/null 308906f32fbeSmrgif test -d .libs; then 309006f32fbeSmrg lt_cv_objdir=.libs 309106f32fbeSmrgelse 309206f32fbeSmrg # MS-DOS does not allow filenames that begin with a dot. 309306f32fbeSmrg lt_cv_objdir=_libs 309406f32fbeSmrgfi 309506f32fbeSmrgrmdir .libs 2>/dev/null]) 309606f32fbeSmrgobjdir=$lt_cv_objdir 309706f32fbeSmrg_LT_DECL([], [objdir], [0], 309806f32fbeSmrg [The name of the directory that contains temporary libtool files])dnl 309906f32fbeSmrgm4_pattern_allow([LT_OBJDIR])dnl 310006f32fbeSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 310106f32fbeSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 310206f32fbeSmrg])# _LT_CHECK_OBJDIR 310325b89263Smrg 310425b89263Smrg 310506f32fbeSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 310606f32fbeSmrg# -------------------------------------- 310706f32fbeSmrg# Check hardcoding attributes. 310806f32fbeSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 310906f32fbeSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 311006f32fbeSmrg_LT_TAGVAR(hardcode_action, $1)= 311106f32fbeSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 311206f32fbeSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 311306f32fbeSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 311425b89263Smrg 311506f32fbeSmrg # We can hardcode non-existent directories. 311606f32fbeSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 311706f32fbeSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 311806f32fbeSmrg # have to relink, otherwise we might link with an installed library 311906f32fbeSmrg # when we should be linking with a yet-to-be-installed one 312006f32fbeSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 312106f32fbeSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 312206f32fbeSmrg # Linking always hardcodes the temporary library directory. 312306f32fbeSmrg _LT_TAGVAR(hardcode_action, $1)=relink 312406f32fbeSmrg else 312506f32fbeSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 312606f32fbeSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 312706f32fbeSmrg fi 312806f32fbeSmrgelse 312906f32fbeSmrg # We cannot hardcode anything, or else we can only hardcode existing 313006f32fbeSmrg # directories. 313106f32fbeSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 313206f32fbeSmrgfi 313306f32fbeSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 313425b89263Smrg 313506f32fbeSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 313606f32fbeSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 313706f32fbeSmrg # Fast installation is not supported 313806f32fbeSmrg enable_fast_install=no 313906f32fbeSmrgelif test "$shlibpath_overrides_runpath" = yes || 314006f32fbeSmrg test "$enable_shared" = no; then 314106f32fbeSmrg # Fast installation is not necessary 314206f32fbeSmrg enable_fast_install=needless 314306f32fbeSmrgfi 314406f32fbeSmrg_LT_TAGDECL([], [hardcode_action], [0], 314506f32fbeSmrg [How to hardcode a shared library path into an executable]) 314606f32fbeSmrg])# _LT_LINKER_HARDCODE_LIBPATH 314725b89263Smrg 314825b89263Smrg 314906f32fbeSmrg# _LT_CMD_STRIPLIB 315006f32fbeSmrg# ---------------- 315106f32fbeSmrgm4_defun([_LT_CMD_STRIPLIB], 315206f32fbeSmrg[m4_require([_LT_DECL_EGREP]) 315306f32fbeSmrgstriplib= 315406f32fbeSmrgold_striplib= 315506f32fbeSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 315606f32fbeSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 315706f32fbeSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 315806f32fbeSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 315906f32fbeSmrg AC_MSG_RESULT([yes]) 316006f32fbeSmrgelse 316106f32fbeSmrg# FIXME - insert some real tests, host_os isn't really good enough 316206f32fbeSmrg case $host_os in 316306f32fbeSmrg darwin*) 316406f32fbeSmrg if test -n "$STRIP" ; then 316506f32fbeSmrg striplib="$STRIP -x" 316606f32fbeSmrg old_striplib="$STRIP -S" 316706f32fbeSmrg AC_MSG_RESULT([yes]) 316825b89263Smrg else 316906f32fbeSmrg AC_MSG_RESULT([no]) 317025b89263Smrg fi 317125b89263Smrg ;; 317206f32fbeSmrg *) 317306f32fbeSmrg AC_MSG_RESULT([no]) 317425b89263Smrg ;; 317506f32fbeSmrg esac 317606f32fbeSmrgfi 317706f32fbeSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 317806f32fbeSmrg_LT_DECL([], [striplib], [1]) 317906f32fbeSmrg])# _LT_CMD_STRIPLIB 318025b89263Smrg 318106f32fbeSmrg 318206f32fbeSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 318306f32fbeSmrg# ----------------------------- 318406f32fbeSmrg# PORTME Fill in your ld.so characteristics 318506f32fbeSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 318606f32fbeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 318706f32fbeSmrgm4_require([_LT_DECL_EGREP])dnl 318806f32fbeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 318906f32fbeSmrgm4_require([_LT_DECL_OBJDUMP])dnl 319006f32fbeSmrgm4_require([_LT_DECL_SED])dnl 319106f32fbeSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 319206f32fbeSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 319306f32fbeSmrgm4_if([$1], 319406f32fbeSmrg [], [ 319506f32fbeSmrgif test "$GCC" = yes; then 319606f32fbeSmrg case $host_os in 319706f32fbeSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 319806f32fbeSmrg *) lt_awk_arg="/^libraries:/" ;; 319906f32fbeSmrg esac 320006f32fbeSmrg case $host_os in 320106f32fbeSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 320206f32fbeSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 320306f32fbeSmrg esac 320406f32fbeSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 320506f32fbeSmrg case $lt_search_path_spec in 320606f32fbeSmrg *\;*) 320706f32fbeSmrg # if the path contains ";" then we assume it to be the separator 320806f32fbeSmrg # otherwise default to the standard path separator (i.e. ":") - it is 320906f32fbeSmrg # assumed that no part of a normal pathname contains ";" but that should 321006f32fbeSmrg # okay in the real world where ";" in dirpaths is itself problematic. 321106f32fbeSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 321225b89263Smrg ;; 321325b89263Smrg *) 321406f32fbeSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 321506f32fbeSmrg ;; 321606f32fbeSmrg esac 321706f32fbeSmrg # Ok, now we have the path, separated by spaces, we can step through it 321806f32fbeSmrg # and add multilib dir if necessary. 321906f32fbeSmrg lt_tmp_lt_search_path_spec= 322006f32fbeSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 322106f32fbeSmrg for lt_sys_path in $lt_search_path_spec; do 322206f32fbeSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 322306f32fbeSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 322425b89263Smrg else 322506f32fbeSmrg test -d "$lt_sys_path" && \ 322606f32fbeSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 322725b89263Smrg fi 322806f32fbeSmrg done 322906f32fbeSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 323006f32fbeSmrgBEGIN {RS=" "; FS="/|\n";} { 323106f32fbeSmrg lt_foo=""; 323206f32fbeSmrg lt_count=0; 323306f32fbeSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 323406f32fbeSmrg if ($lt_i != "" && $lt_i != ".") { 323506f32fbeSmrg if ($lt_i == "..") { 323606f32fbeSmrg lt_count++; 323706f32fbeSmrg } else { 323806f32fbeSmrg if (lt_count == 0) { 323906f32fbeSmrg lt_foo="/" $lt_i lt_foo; 324006f32fbeSmrg } else { 324106f32fbeSmrg lt_count--; 324206f32fbeSmrg } 324306f32fbeSmrg } 324406f32fbeSmrg } 324506f32fbeSmrg } 324606f32fbeSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 324706f32fbeSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 324806f32fbeSmrg}'` 324906f32fbeSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 325006f32fbeSmrg # for these hosts. 325106f32fbeSmrg case $host_os in 325206f32fbeSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 325306f32fbeSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 325425b89263Smrg esac 325506f32fbeSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 325625b89263Smrgelse 325706f32fbeSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 325806f32fbeSmrgfi]) 325906f32fbeSmrglibrary_names_spec= 326006f32fbeSmrglibname_spec='lib$name' 326106f32fbeSmrgsoname_spec= 326206f32fbeSmrgshrext_cmds=".so" 326306f32fbeSmrgpostinstall_cmds= 326406f32fbeSmrgpostuninstall_cmds= 326506f32fbeSmrgfinish_cmds= 326606f32fbeSmrgfinish_eval= 326706f32fbeSmrgshlibpath_var= 326806f32fbeSmrgshlibpath_overrides_runpath=unknown 326906f32fbeSmrgversion_type=none 327006f32fbeSmrgdynamic_linker="$host_os ld.so" 327106f32fbeSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 327206f32fbeSmrgneed_lib_prefix=unknown 327306f32fbeSmrghardcode_into_libs=no 327425b89263Smrg 327506f32fbeSmrg# when you set need_version to no, make sure it does not cause -set_version 327606f32fbeSmrg# flags to be left without arguments 327706f32fbeSmrgneed_version=unknown 327825b89263Smrg 327906f32fbeSmrgcase $host_os in 328006f32fbeSmrgaix3*) 328157ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 328206f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 328306f32fbeSmrg shlibpath_var=LIBPATH 328425b89263Smrg 328506f32fbeSmrg # AIX 3 has no versioning support, so we append a major version to the name. 328606f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 328706f32fbeSmrg ;; 328825b89263Smrg 328906f32fbeSmrgaix[[4-9]]*) 329057ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 329106f32fbeSmrg need_lib_prefix=no 329206f32fbeSmrg need_version=no 329306f32fbeSmrg hardcode_into_libs=yes 329406f32fbeSmrg if test "$host_cpu" = ia64; then 329506f32fbeSmrg # AIX 5 supports IA64 329606f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 329706f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 329806f32fbeSmrg else 329906f32fbeSmrg # With GCC up to 2.95.x, collect2 would create an import file 330006f32fbeSmrg # for dependence libraries. The import file would start with 330106f32fbeSmrg # the line `#! .'. This would cause the generated library to 330206f32fbeSmrg # depend on `.', always an invalid library. This was fixed in 330306f32fbeSmrg # development snapshots of GCC prior to 3.0. 330406f32fbeSmrg case $host_os in 330506f32fbeSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 330606f32fbeSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 330706f32fbeSmrg echo ' yes ' 330806f32fbeSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 330906f32fbeSmrg : 331006f32fbeSmrg else 331106f32fbeSmrg can_build_shared=no 331206f32fbeSmrg fi 331306f32fbeSmrg ;; 331406f32fbeSmrg esac 331506f32fbeSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 331606f32fbeSmrg # soname into executable. Probably we can add versioning support to 331706f32fbeSmrg # collect2, so additional links can be useful in future. 331806f32fbeSmrg if test "$aix_use_runtimelinking" = yes; then 331906f32fbeSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 332006f32fbeSmrg # instead of lib<name>.a to let people know that these are not 332106f32fbeSmrg # typical AIX shared libraries. 332206f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 332306f32fbeSmrg else 332406f32fbeSmrg # We preserve .a as extension for shared libraries through AIX4.2 332506f32fbeSmrg # and later when we are not doing run time linking. 332606f32fbeSmrg library_names_spec='${libname}${release}.a $libname.a' 332706f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 332806f32fbeSmrg fi 332906f32fbeSmrg shlibpath_var=LIBPATH 333006f32fbeSmrg fi 333106f32fbeSmrg ;; 333225b89263Smrg 333306f32fbeSmrgamigaos*) 333406f32fbeSmrg case $host_cpu in 333506f32fbeSmrg powerpc) 333606f32fbeSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 333706f32fbeSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 333806f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 333906f32fbeSmrg ;; 334006f32fbeSmrg m68k) 334106f32fbeSmrg library_names_spec='$libname.ixlibrary $libname.a' 334206f32fbeSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 334306f32fbeSmrg 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' 334406f32fbeSmrg ;; 334506f32fbeSmrg esac 334606f32fbeSmrg ;; 334725b89263Smrg 334806f32fbeSmrgbeos*) 334906f32fbeSmrg library_names_spec='${libname}${shared_ext}' 335006f32fbeSmrg dynamic_linker="$host_os ld.so" 335106f32fbeSmrg shlibpath_var=LIBRARY_PATH 335206f32fbeSmrg ;; 335325b89263Smrg 335406f32fbeSmrgbsdi[[45]]*) 335557ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 335606f32fbeSmrg need_version=no 335706f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 335806f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 335906f32fbeSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 336006f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 336106f32fbeSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 336206f32fbeSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 336306f32fbeSmrg # the default ld.so.conf also contains /usr/contrib/lib and 336406f32fbeSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 336506f32fbeSmrg # libtool to hard-code these into programs 336606f32fbeSmrg ;; 336725b89263Smrg 336806f32fbeSmrgcygwin* | mingw* | pw32* | cegcc*) 336906f32fbeSmrg version_type=windows 337006f32fbeSmrg shrext_cmds=".dll" 337106f32fbeSmrg need_version=no 337206f32fbeSmrg need_lib_prefix=no 337325b89263Smrg 337406f32fbeSmrg case $GCC,$cc_basename in 337506f32fbeSmrg yes,*) 337606f32fbeSmrg # gcc 337706f32fbeSmrg library_names_spec='$libname.dll.a' 337806f32fbeSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 337906f32fbeSmrg postinstall_cmds='base_file=`basename \${file}`~ 338006f32fbeSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 338106f32fbeSmrg dldir=$destdir/`dirname \$dlpath`~ 338206f32fbeSmrg test -d \$dldir || mkdir -p \$dldir~ 338306f32fbeSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 338406f32fbeSmrg chmod a+x \$dldir/$dlname~ 338506f32fbeSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 338606f32fbeSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 338706f32fbeSmrg fi' 338806f32fbeSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 338906f32fbeSmrg dlpath=$dir/\$dldll~ 339006f32fbeSmrg $RM \$dlpath' 339106f32fbeSmrg shlibpath_overrides_runpath=yes 339225b89263Smrg 339306f32fbeSmrg case $host_os in 339406f32fbeSmrg cygwin*) 339506f32fbeSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 339606f32fbeSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 339706f32fbeSmrgm4_if([$1], [],[ 339806f32fbeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 339906f32fbeSmrg ;; 340006f32fbeSmrg mingw* | cegcc*) 340106f32fbeSmrg # MinGW DLLs use traditional 'lib' prefix 340206f32fbeSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 340306f32fbeSmrg ;; 340406f32fbeSmrg pw32*) 340506f32fbeSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 340606f32fbeSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 340706f32fbeSmrg ;; 340806f32fbeSmrg esac 340906f32fbeSmrg dynamic_linker='Win32 ld.exe' 341006f32fbeSmrg ;; 341125b89263Smrg 341206f32fbeSmrg *,cl*) 341306f32fbeSmrg # Native MSVC 341406f32fbeSmrg libname_spec='$name' 341506f32fbeSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 341606f32fbeSmrg library_names_spec='${libname}.dll.lib' 341706f32fbeSmrg 341806f32fbeSmrg case $build_os in 341906f32fbeSmrg mingw*) 342006f32fbeSmrg sys_lib_search_path_spec= 342106f32fbeSmrg lt_save_ifs=$IFS 342206f32fbeSmrg IFS=';' 342306f32fbeSmrg for lt_path in $LIB 342406f32fbeSmrg do 342506f32fbeSmrg IFS=$lt_save_ifs 342606f32fbeSmrg # Let DOS variable expansion print the short 8.3 style file name. 342706f32fbeSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 342806f32fbeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 342906f32fbeSmrg done 343006f32fbeSmrg IFS=$lt_save_ifs 343106f32fbeSmrg # Convert to MSYS style. 343206f32fbeSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 343306f32fbeSmrg ;; 343406f32fbeSmrg cygwin*) 343506f32fbeSmrg # Convert to unix form, then to dos form, then back to unix form 343606f32fbeSmrg # but this time dos style (no spaces!) so that the unix form looks 343706f32fbeSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 343806f32fbeSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 343906f32fbeSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 344006f32fbeSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 344106f32fbeSmrg ;; 344206f32fbeSmrg *) 344306f32fbeSmrg sys_lib_search_path_spec="$LIB" 344406f32fbeSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 344506f32fbeSmrg # It is most probably a Windows format PATH. 344606f32fbeSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 344725b89263Smrg else 344806f32fbeSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 344906f32fbeSmrg fi 345006f32fbeSmrg # FIXME: find the short name or the path components, as spaces are 345106f32fbeSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 345206f32fbeSmrg ;; 3453ea133fd7Smrg esac 3454a253d6aeSmrg 345506f32fbeSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 345606f32fbeSmrg postinstall_cmds='base_file=`basename \${file}`~ 345706f32fbeSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 345806f32fbeSmrg dldir=$destdir/`dirname \$dlpath`~ 345906f32fbeSmrg test -d \$dldir || mkdir -p \$dldir~ 346006f32fbeSmrg $install_prog $dir/$dlname \$dldir/$dlname' 346106f32fbeSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 346206f32fbeSmrg dlpath=$dir/\$dldll~ 346306f32fbeSmrg $RM \$dlpath' 346406f32fbeSmrg shlibpath_overrides_runpath=yes 346506f32fbeSmrg dynamic_linker='Win32 link.exe' 346625b89263Smrg ;; 3467a253d6aeSmrg 346806f32fbeSmrg *) 346906f32fbeSmrg # Assume MSVC wrapper 347006f32fbeSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 347106f32fbeSmrg dynamic_linker='Win32 ld.exe' 347225b89263Smrg ;; 347306f32fbeSmrg esac 347406f32fbeSmrg # FIXME: first we should search . and the directory the executable is in 347506f32fbeSmrg shlibpath_var=PATH 347606f32fbeSmrg ;; 3477a253d6aeSmrg 347806f32fbeSmrgdarwin* | rhapsody*) 347906f32fbeSmrg dynamic_linker="$host_os dyld" 348006f32fbeSmrg version_type=darwin 348106f32fbeSmrg need_lib_prefix=no 348206f32fbeSmrg need_version=no 348306f32fbeSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 348406f32fbeSmrg soname_spec='${libname}${release}${major}$shared_ext' 348506f32fbeSmrg shlibpath_overrides_runpath=yes 348606f32fbeSmrg shlibpath_var=DYLD_LIBRARY_PATH 348706f32fbeSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 348806f32fbeSmrgm4_if([$1], [],[ 348906f32fbeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 349006f32fbeSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 349106f32fbeSmrg ;; 3492a253d6aeSmrg 349306f32fbeSmrgdgux*) 349457ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 349506f32fbeSmrg need_lib_prefix=no 349606f32fbeSmrg need_version=no 349706f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 349857ee1794Smrg soname_spec='${libname}${release}${shared_ext}$major' 349957ee1794Smrg shlibpath_var=LD_LIBRARY_PATH 350006f32fbeSmrg ;; 3501a253d6aeSmrg 350206f32fbeSmrgfreebsd* | dragonfly*) 350306f32fbeSmrg # DragonFly does not have aout. When/if they implement a new 350406f32fbeSmrg # versioning mechanism, adjust this. 350506f32fbeSmrg if test -x /usr/bin/objformat; then 350606f32fbeSmrg objformat=`/usr/bin/objformat` 350725b89263Smrg else 350806f32fbeSmrg case $host_os in 350957ee1794Smrg freebsd[[23]].*) objformat=aout ;; 351006f32fbeSmrg *) objformat=elf ;; 351106f32fbeSmrg esac 351225b89263Smrg fi 351306f32fbeSmrg version_type=freebsd-$objformat 351406f32fbeSmrg case $version_type in 351506f32fbeSmrg freebsd-elf*) 351606f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 351706f32fbeSmrg need_version=no 351806f32fbeSmrg need_lib_prefix=no 351906f32fbeSmrg ;; 352006f32fbeSmrg freebsd-*) 352106f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 352206f32fbeSmrg need_version=yes 352306f32fbeSmrg ;; 352406f32fbeSmrg esac 352506f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 352606f32fbeSmrg case $host_os in 352757ee1794Smrg freebsd2.*) 352806f32fbeSmrg shlibpath_overrides_runpath=yes 352906f32fbeSmrg ;; 353006f32fbeSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 353106f32fbeSmrg shlibpath_overrides_runpath=yes 353206f32fbeSmrg hardcode_into_libs=yes 353306f32fbeSmrg ;; 353406f32fbeSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 353506f32fbeSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 353606f32fbeSmrg shlibpath_overrides_runpath=no 353706f32fbeSmrg hardcode_into_libs=yes 353806f32fbeSmrg ;; 353906f32fbeSmrg *) # from 4.6 on, and DragonFly 354006f32fbeSmrg shlibpath_overrides_runpath=yes 354106f32fbeSmrg hardcode_into_libs=yes 354206f32fbeSmrg ;; 354306f32fbeSmrg esac 354406f32fbeSmrg ;; 3545a253d6aeSmrg 354606f32fbeSmrggnu*) 354757ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 354806f32fbeSmrg need_lib_prefix=no 354906f32fbeSmrg need_version=no 355006f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 355106f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 355206f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 355357ee1794Smrg shlibpath_overrides_runpath=no 355406f32fbeSmrg hardcode_into_libs=yes 355506f32fbeSmrg ;; 3556a253d6aeSmrg 355706f32fbeSmrghaiku*) 355857ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 355906f32fbeSmrg need_lib_prefix=no 356006f32fbeSmrg need_version=no 356106f32fbeSmrg dynamic_linker="$host_os runtime_loader" 356206f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 356306f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 356406f32fbeSmrg shlibpath_var=LIBRARY_PATH 356506f32fbeSmrg shlibpath_overrides_runpath=yes 356606f32fbeSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 356706f32fbeSmrg hardcode_into_libs=yes 356806f32fbeSmrg ;; 3569a253d6aeSmrg 357006f32fbeSmrghpux9* | hpux10* | hpux11*) 357106f32fbeSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 357206f32fbeSmrg # link against other versions. 357306f32fbeSmrg version_type=sunos 357406f32fbeSmrg need_lib_prefix=no 357506f32fbeSmrg need_version=no 357606f32fbeSmrg case $host_cpu in 357706f32fbeSmrg ia64*) 357806f32fbeSmrg shrext_cmds='.so' 357906f32fbeSmrg hardcode_into_libs=yes 358006f32fbeSmrg dynamic_linker="$host_os dld.so" 358106f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 358206f32fbeSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 358306f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 358406f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 358506f32fbeSmrg if test "X$HPUX_IA64_MODE" = X32; then 358606f32fbeSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 358706f32fbeSmrg else 358806f32fbeSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 358925b89263Smrg fi 359006f32fbeSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 359106f32fbeSmrg ;; 359206f32fbeSmrg hppa*64*) 359306f32fbeSmrg shrext_cmds='.sl' 359406f32fbeSmrg hardcode_into_libs=yes 359506f32fbeSmrg dynamic_linker="$host_os dld.sl" 359606f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 359706f32fbeSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 359806f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 359906f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 360006f32fbeSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 360106f32fbeSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 360206f32fbeSmrg ;; 360306f32fbeSmrg *) 360406f32fbeSmrg shrext_cmds='.sl' 360506f32fbeSmrg dynamic_linker="$host_os dld.sl" 360606f32fbeSmrg shlibpath_var=SHLIB_PATH 360706f32fbeSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 360806f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 360906f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 361025b89263Smrg ;; 361125b89263Smrg esac 361206f32fbeSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 361306f32fbeSmrg postinstall_cmds='chmod 555 $lib' 361406f32fbeSmrg # or fails outright, so override atomically: 361506f32fbeSmrg install_override_mode=555 361606f32fbeSmrg ;; 3617a253d6aeSmrg 361806f32fbeSmrginterix[[3-9]]*) 361957ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 362006f32fbeSmrg need_lib_prefix=no 362106f32fbeSmrg need_version=no 362206f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 362306f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 362406f32fbeSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 362506f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 362606f32fbeSmrg shlibpath_overrides_runpath=no 362706f32fbeSmrg hardcode_into_libs=yes 362806f32fbeSmrg ;; 3629a253d6aeSmrg 363006f32fbeSmrgirix5* | irix6* | nonstopux*) 363106f32fbeSmrg case $host_os in 363206f32fbeSmrg nonstopux*) version_type=nonstopux ;; 363306f32fbeSmrg *) 363406f32fbeSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 363557ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 363606f32fbeSmrg else 363706f32fbeSmrg version_type=irix 363806f32fbeSmrg fi ;; 363925b89263Smrg esac 364006f32fbeSmrg need_lib_prefix=no 364106f32fbeSmrg need_version=no 364206f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 364306f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 364406f32fbeSmrg case $host_os in 364506f32fbeSmrg irix5* | nonstopux*) 364606f32fbeSmrg libsuff= shlibsuff= 364706f32fbeSmrg ;; 364806f32fbeSmrg *) 364906f32fbeSmrg case $LD in # libtool.m4 will add one of these switches to LD 365006f32fbeSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 365106f32fbeSmrg libsuff= shlibsuff= libmagic=32-bit;; 365206f32fbeSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 365306f32fbeSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 365406f32fbeSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 365506f32fbeSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 365606f32fbeSmrg *) libsuff= shlibsuff= libmagic=never-match;; 365706f32fbeSmrg esac 365806f32fbeSmrg ;; 365906f32fbeSmrg esac 366006f32fbeSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 366106f32fbeSmrg shlibpath_overrides_runpath=no 366206f32fbeSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 366306f32fbeSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 366406f32fbeSmrg hardcode_into_libs=yes 366506f32fbeSmrg ;; 3666a253d6aeSmrg 366706f32fbeSmrg# No shared lib support for Linux oldld, aout, or coff. 366806f32fbeSmrglinux*oldld* | linux*aout* | linux*coff*) 366906f32fbeSmrg dynamic_linker=no 367006f32fbeSmrg ;; 3671a253d6aeSmrg 367257ee1794Smrg# This must be glibc/ELF. 367306f32fbeSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 367457ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 367506f32fbeSmrg need_lib_prefix=no 367606f32fbeSmrg need_version=no 367706f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 367806f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 367906f32fbeSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 368006f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 368106f32fbeSmrg shlibpath_overrides_runpath=no 3682a253d6aeSmrg 368306f32fbeSmrg # Some binutils ld are patched to set DT_RUNPATH 368406f32fbeSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 368506f32fbeSmrg [lt_cv_shlibpath_overrides_runpath=no 368606f32fbeSmrg save_LDFLAGS=$LDFLAGS 368706f32fbeSmrg save_libdir=$libdir 368806f32fbeSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 368906f32fbeSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 369006f32fbeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 369106f32fbeSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 369206f32fbeSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 369306f32fbeSmrg LDFLAGS=$save_LDFLAGS 369406f32fbeSmrg libdir=$save_libdir 369506f32fbeSmrg ]) 369606f32fbeSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3697a253d6aeSmrg 369806f32fbeSmrg # This implies no fast_install, which is unacceptable. 369906f32fbeSmrg # Some rework will be needed to allow for fast_install 370006f32fbeSmrg # before this can be enabled. 370106f32fbeSmrg hardcode_into_libs=yes 3702a253d6aeSmrg 370306f32fbeSmrg # Append ld.so.conf contents to the search path 370406f32fbeSmrg if test -f /etc/ld.so.conf; then 370506f32fbeSmrg 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' ' '` 370606f32fbeSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 370725b89263Smrg fi 3708a253d6aeSmrg 370906f32fbeSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 371006f32fbeSmrg # powerpc, because MkLinux only supported shared libraries with the 371106f32fbeSmrg # GNU dynamic linker. Since this was broken with cross compilers, 371206f32fbeSmrg # most powerpc-linux boxes support dynamic linking these days and 371306f32fbeSmrg # people can always --disable-shared, the test was removed, and we 371406f32fbeSmrg # assume the GNU/Linux dynamic linker is in use. 371506f32fbeSmrg dynamic_linker='GNU/Linux ld.so' 371606f32fbeSmrg ;; 3717a253d6aeSmrg 371806f32fbeSmrgnetbsd*) 371906f32fbeSmrg version_type=sunos 372006f32fbeSmrg need_lib_prefix=no 372106f32fbeSmrg need_version=no 372206f32fbeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 372306f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 372406f32fbeSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 372506f32fbeSmrg dynamic_linker='NetBSD (a.out) ld.so' 372625b89263Smrg else 372706f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 372806f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 372906f32fbeSmrg dynamic_linker='NetBSD ld.elf_so' 373025b89263Smrg fi 373106f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 373206f32fbeSmrg shlibpath_overrides_runpath=yes 373306f32fbeSmrg hardcode_into_libs=yes 373406f32fbeSmrg ;; 3735a253d6aeSmrg 373606f32fbeSmrgnewsos6) 373757ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 373806f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 373906f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 374006f32fbeSmrg shlibpath_overrides_runpath=yes 374106f32fbeSmrg ;; 3742a253d6aeSmrg 374306f32fbeSmrg*nto* | *qnx*) 374406f32fbeSmrg version_type=qnx 374506f32fbeSmrg need_lib_prefix=no 374606f32fbeSmrg need_version=no 374706f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 374806f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 374906f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 375006f32fbeSmrg shlibpath_overrides_runpath=no 375106f32fbeSmrg hardcode_into_libs=yes 375206f32fbeSmrg dynamic_linker='ldqnx.so' 375306f32fbeSmrg ;; 3754a253d6aeSmrg 375506f32fbeSmrgopenbsd*) 375606f32fbeSmrg version_type=sunos 375706f32fbeSmrg sys_lib_dlsearch_path_spec="/usr/lib" 375806f32fbeSmrg need_lib_prefix=no 375906f32fbeSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 3760ea133fd7Smrg case $host_os in 376106f32fbeSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 376206f32fbeSmrg *) need_version=no ;; 3763ea133fd7Smrg esac 376406f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 376506f32fbeSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 376606f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 376706f32fbeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 376806f32fbeSmrg case $host_os in 376906f32fbeSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 377006f32fbeSmrg shlibpath_overrides_runpath=no 377106f32fbeSmrg ;; 377206f32fbeSmrg *) 377306f32fbeSmrg shlibpath_overrides_runpath=yes 377406f32fbeSmrg ;; 377506f32fbeSmrg esac 377606f32fbeSmrg else 377706f32fbeSmrg shlibpath_overrides_runpath=yes 377806f32fbeSmrg fi 377906f32fbeSmrg ;; 3780a253d6aeSmrg 378106f32fbeSmrgos2*) 378206f32fbeSmrg libname_spec='$name' 378306f32fbeSmrg shrext_cmds=".dll" 378406f32fbeSmrg need_lib_prefix=no 378506f32fbeSmrg library_names_spec='$libname${shared_ext} $libname.a' 378606f32fbeSmrg dynamic_linker='OS/2 ld.exe' 378706f32fbeSmrg shlibpath_var=LIBPATH 378806f32fbeSmrg ;; 3789a253d6aeSmrg 379006f32fbeSmrgosf3* | osf4* | osf5*) 379106f32fbeSmrg version_type=osf 379206f32fbeSmrg need_lib_prefix=no 379306f32fbeSmrg need_version=no 379406f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 379506f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 379606f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 379706f32fbeSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 379806f32fbeSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 379906f32fbeSmrg ;; 380006f32fbeSmrg 380106f32fbeSmrgrdos*) 380206f32fbeSmrg dynamic_linker=no 380306f32fbeSmrg ;; 380406f32fbeSmrg 380506f32fbeSmrgsolaris*) 380657ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 380706f32fbeSmrg need_lib_prefix=no 380806f32fbeSmrg need_version=no 380906f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 381006f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 381106f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 381206f32fbeSmrg shlibpath_overrides_runpath=yes 381306f32fbeSmrg hardcode_into_libs=yes 381406f32fbeSmrg # ldd complains unless libraries are executable 381506f32fbeSmrg postinstall_cmds='chmod +x $lib' 381606f32fbeSmrg ;; 381706f32fbeSmrg 381806f32fbeSmrgsunos4*) 381906f32fbeSmrg version_type=sunos 382006f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 382106f32fbeSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 382206f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 382306f32fbeSmrg shlibpath_overrides_runpath=yes 382406f32fbeSmrg if test "$with_gnu_ld" = yes; then 382506f32fbeSmrg need_lib_prefix=no 382606f32fbeSmrg fi 382706f32fbeSmrg need_version=yes 382806f32fbeSmrg ;; 382906f32fbeSmrg 383006f32fbeSmrgsysv4 | sysv4.3*) 383157ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 383206f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 383306f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 383406f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 383506f32fbeSmrg case $host_vendor in 383606f32fbeSmrg sni) 383706f32fbeSmrg shlibpath_overrides_runpath=no 383806f32fbeSmrg need_lib_prefix=no 383906f32fbeSmrg runpath_var=LD_RUN_PATH 384006f32fbeSmrg ;; 384106f32fbeSmrg siemens) 384206f32fbeSmrg need_lib_prefix=no 384306f32fbeSmrg ;; 384406f32fbeSmrg motorola) 384506f32fbeSmrg need_lib_prefix=no 384606f32fbeSmrg need_version=no 384706f32fbeSmrg shlibpath_overrides_runpath=no 384806f32fbeSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 384906f32fbeSmrg ;; 385025b89263Smrg esac 385106f32fbeSmrg ;; 385225b89263Smrg 385306f32fbeSmrgsysv4*MP*) 385406f32fbeSmrg if test -d /usr/nec ;then 385557ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 385606f32fbeSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 385706f32fbeSmrg soname_spec='$libname${shared_ext}.$major' 385806f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 385906f32fbeSmrg fi 386025b89263Smrg ;; 386125b89263Smrg 386206f32fbeSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 386306f32fbeSmrg version_type=freebsd-elf 386425b89263Smrg need_lib_prefix=no 386525b89263Smrg need_version=no 386606f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 386706f32fbeSmrg soname_spec='${libname}${release}${shared_ext}$major' 386806f32fbeSmrg shlibpath_var=LD_LIBRARY_PATH 386906f32fbeSmrg shlibpath_overrides_runpath=yes 387025b89263Smrg hardcode_into_libs=yes 387106f32fbeSmrg if test "$with_gnu_ld" = yes; then 387206f32fbeSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 387325b89263Smrg else 387406f32fbeSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 387525b89263Smrg case $host_os in 387606f32fbeSmrg sco3.2v5*) 387706f32fbeSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 387806f32fbeSmrg ;; 387925b89263Smrg esac 388025b89263Smrg fi 388106f32fbeSmrg sys_lib_dlsearch_path_spec='/usr/lib' 388225b89263Smrg ;; 3883a253d6aeSmrg 388406f32fbeSmrgtpf*) 388506f32fbeSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 388657ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 388706f32fbeSmrg need_lib_prefix=no 388825b89263Smrg need_version=no 388925b89263Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 389025b89263Smrg shlibpath_var=LD_LIBRARY_PATH 389106f32fbeSmrg shlibpath_overrides_runpath=no 389206f32fbeSmrg hardcode_into_libs=yes 389325b89263Smrg ;; 3894ea133fd7Smrg 389506f32fbeSmrguts4*) 389657ee1794Smrg version_type=linux # correct to gnu/linux during the next big refactor 389706f32fbeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 389825b89263Smrg soname_spec='${libname}${release}${shared_ext}$major' 389925b89263Smrg shlibpath_var=LD_LIBRARY_PATH 390025b89263Smrg ;; 390125b89263Smrg 390206f32fbeSmrg*) 390325b89263Smrg dynamic_linker=no 390425b89263Smrg ;; 390506f32fbeSmrgesac 390606f32fbeSmrgAC_MSG_RESULT([$dynamic_linker]) 390706f32fbeSmrgtest "$dynamic_linker" = no && can_build_shared=no 390825b89263Smrg 390906f32fbeSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 391006f32fbeSmrgif test "$GCC" = yes; then 391106f32fbeSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 391206f32fbeSmrgfi 391325b89263Smrg 391406f32fbeSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 391506f32fbeSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 391606f32fbeSmrgfi 391706f32fbeSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 391806f32fbeSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 391906f32fbeSmrgfi 3920ea133fd7Smrg 392106f32fbeSmrg_LT_DECL([], [variables_saved_for_relink], [1], 392206f32fbeSmrg [Variables whose values should be saved in libtool wrapper scripts and 392306f32fbeSmrg restored at link time]) 392406f32fbeSmrg_LT_DECL([], [need_lib_prefix], [0], 392506f32fbeSmrg [Do we need the "lib" prefix for modules?]) 392606f32fbeSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 392706f32fbeSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 392806f32fbeSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 392906f32fbeSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 393006f32fbeSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 393106f32fbeSmrg [Is shlibpath searched before the hard-coded library search path?]) 393206f32fbeSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 393306f32fbeSmrg_LT_DECL([], [library_names_spec], [1], 393406f32fbeSmrg [[List of archive names. First name is the real one, the rest are links. 393506f32fbeSmrg The last name is the one that the linker finds with -lNAME]]) 393606f32fbeSmrg_LT_DECL([], [soname_spec], [1], 393706f32fbeSmrg [[The coded name of the library, if different from the real name]]) 393806f32fbeSmrg_LT_DECL([], [install_override_mode], [1], 393906f32fbeSmrg [Permission mode override for installation of shared libraries]) 394006f32fbeSmrg_LT_DECL([], [postinstall_cmds], [2], 394106f32fbeSmrg [Command to use after installation of a shared archive]) 394206f32fbeSmrg_LT_DECL([], [postuninstall_cmds], [2], 394306f32fbeSmrg [Command to use after uninstallation of a shared archive]) 394406f32fbeSmrg_LT_DECL([], [finish_cmds], [2], 394506f32fbeSmrg [Commands used to finish a libtool library installation in a directory]) 394606f32fbeSmrg_LT_DECL([], [finish_eval], [1], 394706f32fbeSmrg [[As "finish_cmds", except a single script fragment to be evaled but 394806f32fbeSmrg not shown]]) 394906f32fbeSmrg_LT_DECL([], [hardcode_into_libs], [0], 395006f32fbeSmrg [Whether we should hardcode library paths into libraries]) 395106f32fbeSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 395206f32fbeSmrg [Compile-time system search path for libraries]) 395306f32fbeSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 395406f32fbeSmrg [Run-time system search path for libraries]) 395506f32fbeSmrg])# _LT_SYS_DYNAMIC_LINKER 395625b89263Smrg 395725b89263Smrg 395806f32fbeSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 395906f32fbeSmrg# -------------------------- 396006f32fbeSmrg# find a file program which can recognize shared library 396106f32fbeSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 396206f32fbeSmrg[m4_require([_LT_DECL_EGREP])dnl 396306f32fbeSmrgAC_MSG_CHECKING([for $1]) 396406f32fbeSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 396506f32fbeSmrg[case $MAGIC_CMD in 396606f32fbeSmrg[[\\/*] | ?:[\\/]*]) 396706f32fbeSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 396825b89263Smrg ;; 396906f32fbeSmrg*) 397006f32fbeSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 397106f32fbeSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 397206f32fbeSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 397306f32fbeSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 397406f32fbeSmrgdnl not every word. This closes a longstanding sh security hole. 397506f32fbeSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 397606f32fbeSmrg for ac_dir in $ac_dummy; do 397706f32fbeSmrg IFS="$lt_save_ifs" 397806f32fbeSmrg test -z "$ac_dir" && ac_dir=. 397906f32fbeSmrg if test -f $ac_dir/$1; then 398006f32fbeSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 398106f32fbeSmrg if test -n "$file_magic_test_file"; then 398206f32fbeSmrg case $deplibs_check_method in 398306f32fbeSmrg "file_magic "*) 398406f32fbeSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 398506f32fbeSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 398606f32fbeSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 398706f32fbeSmrg $EGREP "$file_magic_regex" > /dev/null; then 398806f32fbeSmrg : 398906f32fbeSmrg else 399006f32fbeSmrg cat <<_LT_EOF 1>&2 3991ea133fd7Smrg 399206f32fbeSmrg*** Warning: the command libtool uses to detect shared libraries, 399306f32fbeSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 399406f32fbeSmrg*** The result is that libtool may fail to recognize shared libraries 399506f32fbeSmrg*** as such. This will affect the creation of libtool libraries that 399606f32fbeSmrg*** depend on shared libraries, but programs linked with such libtool 399706f32fbeSmrg*** libraries will work regardless of this problem. Nevertheless, you 399806f32fbeSmrg*** may want to report the problem to your system manager and/or to 399906f32fbeSmrg*** bug-libtool@gnu.org 4000a253d6aeSmrg 400106f32fbeSmrg_LT_EOF 400206f32fbeSmrg fi ;; 400306f32fbeSmrg esac 400406f32fbeSmrg fi 400506f32fbeSmrg break 400606f32fbeSmrg fi 400706f32fbeSmrg done 400806f32fbeSmrg IFS="$lt_save_ifs" 400906f32fbeSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 401025b89263Smrg ;; 401106f32fbeSmrgesac]) 401206f32fbeSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 401306f32fbeSmrgif test -n "$MAGIC_CMD"; then 401406f32fbeSmrg AC_MSG_RESULT($MAGIC_CMD) 401506f32fbeSmrgelse 401606f32fbeSmrg AC_MSG_RESULT(no) 401706f32fbeSmrgfi 401806f32fbeSmrg_LT_DECL([], [MAGIC_CMD], [0], 401906f32fbeSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 402006f32fbeSmrg])# _LT_PATH_TOOL_PREFIX 4021a253d6aeSmrg 402206f32fbeSmrg# Old name: 402306f32fbeSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 402406f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 402506f32fbeSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4026ea133fd7Smrg 4027a253d6aeSmrg 402806f32fbeSmrg# _LT_PATH_MAGIC 402906f32fbeSmrg# -------------- 403006f32fbeSmrg# find a file program which can recognize a shared library 403106f32fbeSmrgm4_defun([_LT_PATH_MAGIC], 403206f32fbeSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 403306f32fbeSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 403406f32fbeSmrg if test -n "$ac_tool_prefix"; then 403506f32fbeSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 403625b89263Smrg else 403706f32fbeSmrg MAGIC_CMD=: 403825b89263Smrg fi 403906f32fbeSmrgfi 404006f32fbeSmrg])# _LT_PATH_MAGIC 4041a253d6aeSmrg 4042a253d6aeSmrg 404306f32fbeSmrg# LT_PATH_LD 404406f32fbeSmrg# ---------- 404506f32fbeSmrg# find the pathname to the GNU or non-GNU linker 404606f32fbeSmrgAC_DEFUN([LT_PATH_LD], 404706f32fbeSmrg[AC_REQUIRE([AC_PROG_CC])dnl 404806f32fbeSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 404906f32fbeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 405006f32fbeSmrgm4_require([_LT_DECL_SED])dnl 405106f32fbeSmrgm4_require([_LT_DECL_EGREP])dnl 405206f32fbeSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 405325b89263Smrg 405406f32fbeSmrgAC_ARG_WITH([gnu-ld], 405506f32fbeSmrg [AS_HELP_STRING([--with-gnu-ld], 405606f32fbeSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 405706f32fbeSmrg [test "$withval" = no || with_gnu_ld=yes], 405806f32fbeSmrg [with_gnu_ld=no])dnl 405906f32fbeSmrg 406006f32fbeSmrgac_prog=ld 406106f32fbeSmrgif test "$GCC" = yes; then 406206f32fbeSmrg # Check if gcc -print-prog-name=ld gives a path. 406306f32fbeSmrg AC_MSG_CHECKING([for ld used by $CC]) 406406f32fbeSmrg case $host in 406506f32fbeSmrg *-*-mingw*) 406606f32fbeSmrg # gcc leaves a trailing carriage return which upsets mingw 406706f32fbeSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 406806f32fbeSmrg *) 406906f32fbeSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 407025b89263Smrg esac 407106f32fbeSmrg case $ac_prog in 407206f32fbeSmrg # Accept absolute paths. 407306f32fbeSmrg [[\\/]]* | ?:[[\\/]]*) 407406f32fbeSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 407506f32fbeSmrg # Canonicalize the pathname of ld 407606f32fbeSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 407706f32fbeSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 407806f32fbeSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 407906f32fbeSmrg done 408006f32fbeSmrg test -z "$LD" && LD="$ac_prog" 408106f32fbeSmrg ;; 408206f32fbeSmrg "") 408306f32fbeSmrg # If it fails, then pretend we aren't using GCC. 408406f32fbeSmrg ac_prog=ld 408506f32fbeSmrg ;; 408606f32fbeSmrg *) 408706f32fbeSmrg # If it is relative, then search for the first ld in PATH. 408806f32fbeSmrg with_gnu_ld=unknown 408906f32fbeSmrg ;; 409006f32fbeSmrg esac 409106f32fbeSmrgelif test "$with_gnu_ld" = yes; then 409206f32fbeSmrg AC_MSG_CHECKING([for GNU ld]) 409306f32fbeSmrgelse 409406f32fbeSmrg AC_MSG_CHECKING([for non-GNU ld]) 409506f32fbeSmrgfi 409606f32fbeSmrgAC_CACHE_VAL(lt_cv_path_LD, 409706f32fbeSmrg[if test -z "$LD"; then 409806f32fbeSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 409906f32fbeSmrg for ac_dir in $PATH; do 410006f32fbeSmrg IFS="$lt_save_ifs" 410106f32fbeSmrg test -z "$ac_dir" && ac_dir=. 410206f32fbeSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 410306f32fbeSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 410406f32fbeSmrg # Check to see if the program is GNU ld. I'd rather use --version, 410506f32fbeSmrg # but apparently some variants of GNU ld only accept -v. 410606f32fbeSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 410706f32fbeSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 410806f32fbeSmrg *GNU* | *'with BFD'*) 410906f32fbeSmrg test "$with_gnu_ld" != no && break 411025b89263Smrg ;; 411125b89263Smrg *) 411206f32fbeSmrg test "$with_gnu_ld" != yes && break 411325b89263Smrg ;; 4114ea133fd7Smrg esac 411506f32fbeSmrg fi 411606f32fbeSmrg done 411706f32fbeSmrg IFS="$lt_save_ifs" 411806f32fbeSmrgelse 411906f32fbeSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 412006f32fbeSmrgfi]) 412106f32fbeSmrgLD="$lt_cv_path_LD" 412206f32fbeSmrgif test -n "$LD"; then 412306f32fbeSmrg AC_MSG_RESULT($LD) 412406f32fbeSmrgelse 412506f32fbeSmrg AC_MSG_RESULT(no) 412606f32fbeSmrgfi 412706f32fbeSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 412806f32fbeSmrg_LT_PATH_LD_GNU 412906f32fbeSmrgAC_SUBST([LD]) 4130a253d6aeSmrg 413106f32fbeSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 413206f32fbeSmrg])# LT_PATH_LD 4133a253d6aeSmrg 413406f32fbeSmrg# Old names: 413506f32fbeSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 413606f32fbeSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 413706f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 413806f32fbeSmrgdnl AC_DEFUN([AM_PROG_LD], []) 413906f32fbeSmrgdnl AC_DEFUN([AC_PROG_LD], []) 4140a253d6aeSmrg 4141a253d6aeSmrg 414206f32fbeSmrg# _LT_PATH_LD_GNU 414306f32fbeSmrg#- -------------- 414406f32fbeSmrgm4_defun([_LT_PATH_LD_GNU], 414506f32fbeSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 414606f32fbeSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 414706f32fbeSmrgcase `$LD -v 2>&1 </dev/null` in 414806f32fbeSmrg*GNU* | *'with BFD'*) 414906f32fbeSmrg lt_cv_prog_gnu_ld=yes 415025b89263Smrg ;; 415106f32fbeSmrg*) 415206f32fbeSmrg lt_cv_prog_gnu_ld=no 415325b89263Smrg ;; 415406f32fbeSmrgesac]) 415506f32fbeSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 415606f32fbeSmrg])# _LT_PATH_LD_GNU 4157a253d6aeSmrg 415806f32fbeSmrg 415906f32fbeSmrg# _LT_CMD_RELOAD 416006f32fbeSmrg# -------------- 416106f32fbeSmrg# find reload flag for linker 416206f32fbeSmrg# -- PORTME Some linkers may need a different reload flag. 416306f32fbeSmrgm4_defun([_LT_CMD_RELOAD], 416406f32fbeSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 416506f32fbeSmrg lt_cv_ld_reload_flag, 416606f32fbeSmrg [lt_cv_ld_reload_flag='-r']) 416706f32fbeSmrgreload_flag=$lt_cv_ld_reload_flag 416806f32fbeSmrgcase $reload_flag in 416906f32fbeSmrg"" | " "*) ;; 417006f32fbeSmrg*) reload_flag=" $reload_flag" ;; 417106f32fbeSmrgesac 417206f32fbeSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 417306f32fbeSmrgcase $host_os in 417406f32fbeSmrg cygwin* | mingw* | pw32* | cegcc*) 417506f32fbeSmrg if test "$GCC" != yes; then 417606f32fbeSmrg reload_cmds=false 417706f32fbeSmrg fi 417806f32fbeSmrg ;; 417906f32fbeSmrg darwin*) 418006f32fbeSmrg if test "$GCC" = yes; then 418106f32fbeSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 418206f32fbeSmrg else 418306f32fbeSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 418406f32fbeSmrg fi 418506f32fbeSmrg ;; 418606f32fbeSmrgesac 418706f32fbeSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 418806f32fbeSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 418906f32fbeSmrg])# _LT_CMD_RELOAD 419006f32fbeSmrg 419106f32fbeSmrg 419206f32fbeSmrg# _LT_CHECK_MAGIC_METHOD 419306f32fbeSmrg# ---------------------- 419406f32fbeSmrg# how to check for library dependencies 419506f32fbeSmrg# -- PORTME fill in with the dynamic library characteristics 419606f32fbeSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 419706f32fbeSmrg[m4_require([_LT_DECL_EGREP]) 419806f32fbeSmrgm4_require([_LT_DECL_OBJDUMP]) 419906f32fbeSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 420006f32fbeSmrglt_cv_deplibs_check_method, 420106f32fbeSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 420206f32fbeSmrglt_cv_file_magic_test_file= 420306f32fbeSmrglt_cv_deplibs_check_method='unknown' 420406f32fbeSmrg# Need to set the preceding variable on all platforms that support 420506f32fbeSmrg# interlibrary dependencies. 420606f32fbeSmrg# 'none' -- dependencies not supported. 420706f32fbeSmrg# `unknown' -- same as none, but documents that we really don't know. 420806f32fbeSmrg# 'pass_all' -- all dependencies passed with no checks. 420906f32fbeSmrg# 'test_compile' -- check by making test program. 421006f32fbeSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 421106f32fbeSmrg# which responds to the $file_magic_cmd with a given extended regex. 421206f32fbeSmrg# If you have `file' or equivalent on your system and you're not sure 421306f32fbeSmrg# whether `pass_all' will *always* work, you probably want this one. 421406f32fbeSmrg 421506f32fbeSmrgcase $host_os in 421606f32fbeSmrgaix[[4-9]]*) 421706f32fbeSmrg lt_cv_deplibs_check_method=pass_all 421825b89263Smrg ;; 4219a253d6aeSmrg 422006f32fbeSmrgbeos*) 422106f32fbeSmrg lt_cv_deplibs_check_method=pass_all 422225b89263Smrg ;; 4223a253d6aeSmrg 422406f32fbeSmrgbsdi[[45]]*) 422506f32fbeSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 422606f32fbeSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 422706f32fbeSmrg lt_cv_file_magic_test_file=/shlib/libc.so 422806f32fbeSmrg ;; 422906f32fbeSmrg 423006f32fbeSmrgcygwin*) 423106f32fbeSmrg # func_win32_libid is a shell function defined in ltmain.sh 423206f32fbeSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 423306f32fbeSmrg lt_cv_file_magic_cmd='func_win32_libid' 423406f32fbeSmrg ;; 423506f32fbeSmrg 423606f32fbeSmrgmingw* | pw32*) 423706f32fbeSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 423806f32fbeSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 423906f32fbeSmrg # unless we find 'file', for example because we are cross-compiling. 424006f32fbeSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 424106f32fbeSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 424206f32fbeSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 424306f32fbeSmrg lt_cv_file_magic_cmd='func_win32_libid' 424425b89263Smrg else 424506f32fbeSmrg # Keep this pattern in sync with the one in func_win32_libid. 424606f32fbeSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 424706f32fbeSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 424825b89263Smrg fi 424925b89263Smrg ;; 4250a253d6aeSmrg 425106f32fbeSmrgcegcc*) 425206f32fbeSmrg # use the weaker test based on 'objdump'. See mingw*. 425306f32fbeSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 425406f32fbeSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 425525b89263Smrg ;; 4256a253d6aeSmrg 425706f32fbeSmrgdarwin* | rhapsody*) 425806f32fbeSmrg lt_cv_deplibs_check_method=pass_all 425925b89263Smrg ;; 4260a253d6aeSmrg 426106f32fbeSmrgfreebsd* | dragonfly*) 426206f32fbeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 426306f32fbeSmrg case $host_cpu in 426406f32fbeSmrg i*86 ) 426506f32fbeSmrg # Not sure whether the presence of OpenBSD here was a mistake. 426606f32fbeSmrg # Let's accept both of them until this is cleared up. 426706f32fbeSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 426806f32fbeSmrg lt_cv_file_magic_cmd=/usr/bin/file 426906f32fbeSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 427006f32fbeSmrg ;; 427106f32fbeSmrg esac 427206f32fbeSmrg else 427306f32fbeSmrg lt_cv_deplibs_check_method=pass_all 427406f32fbeSmrg fi 427525b89263Smrg ;; 4276a253d6aeSmrg 427706f32fbeSmrggnu*) 427806f32fbeSmrg lt_cv_deplibs_check_method=pass_all 427906f32fbeSmrg ;; 4280a253d6aeSmrg 428106f32fbeSmrghaiku*) 428206f32fbeSmrg lt_cv_deplibs_check_method=pass_all 428306f32fbeSmrg ;; 4284a253d6aeSmrg 428506f32fbeSmrghpux10.20* | hpux11*) 428606f32fbeSmrg lt_cv_file_magic_cmd=/usr/bin/file 428706f32fbeSmrg case $host_cpu in 428806f32fbeSmrg ia64*) 428906f32fbeSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 429006f32fbeSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 429106f32fbeSmrg ;; 429206f32fbeSmrg hppa*64*) 429306f32fbeSmrg [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]'] 429406f32fbeSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 429506f32fbeSmrg ;; 429606f32fbeSmrg *) 429706f32fbeSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 429806f32fbeSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 429906f32fbeSmrg ;; 430006f32fbeSmrg esac 430106f32fbeSmrg ;; 4302a253d6aeSmrg 430306f32fbeSmrginterix[[3-9]]*) 430406f32fbeSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 430506f32fbeSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 430625b89263Smrg ;; 4307a253d6aeSmrg 430806f32fbeSmrgirix5* | irix6* | nonstopux*) 430906f32fbeSmrg case $LD in 431006f32fbeSmrg *-32|*"-32 ") libmagic=32-bit;; 431106f32fbeSmrg *-n32|*"-n32 ") libmagic=N32;; 431206f32fbeSmrg *-64|*"-64 ") libmagic=64-bit;; 431306f32fbeSmrg *) libmagic=never-match;; 431406f32fbeSmrg esac 431506f32fbeSmrg lt_cv_deplibs_check_method=pass_all 431606f32fbeSmrg ;; 431725b89263Smrg 431857ee1794Smrg# This must be glibc/ELF. 431906f32fbeSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 432006f32fbeSmrg lt_cv_deplibs_check_method=pass_all 432125b89263Smrg ;; 432225b89263Smrg 432306f32fbeSmrgnetbsd*) 432406f32fbeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 432506f32fbeSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 432606f32fbeSmrg else 432706f32fbeSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 432806f32fbeSmrg fi 432906f32fbeSmrg ;; 4330a253d6aeSmrg 433106f32fbeSmrgnewos6*) 433206f32fbeSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 433306f32fbeSmrg lt_cv_file_magic_cmd=/usr/bin/file 433406f32fbeSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 433506f32fbeSmrg ;; 4336a253d6aeSmrg 433706f32fbeSmrg*nto* | *qnx*) 433806f32fbeSmrg lt_cv_deplibs_check_method=pass_all 433906f32fbeSmrg ;; 434006f32fbeSmrg 434106f32fbeSmrgopenbsd*) 434206f32fbeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 434306f32fbeSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 434425b89263Smrg else 434506f32fbeSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 434625b89263Smrg fi 434706f32fbeSmrg ;; 4348a253d6aeSmrg 434906f32fbeSmrgosf3* | osf4* | osf5*) 435006f32fbeSmrg lt_cv_deplibs_check_method=pass_all 435106f32fbeSmrg ;; 4352a253d6aeSmrg 435306f32fbeSmrgrdos*) 435406f32fbeSmrg lt_cv_deplibs_check_method=pass_all 435506f32fbeSmrg ;; 4356a253d6aeSmrg 435706f32fbeSmrgsolaris*) 435806f32fbeSmrg lt_cv_deplibs_check_method=pass_all 435906f32fbeSmrg ;; 4360a253d6aeSmrg 436106f32fbeSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 436206f32fbeSmrg lt_cv_deplibs_check_method=pass_all 436306f32fbeSmrg ;; 436406f32fbeSmrg 436506f32fbeSmrgsysv4 | sysv4.3*) 436606f32fbeSmrg case $host_vendor in 436706f32fbeSmrg motorola) 436806f32fbeSmrg 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]]' 436906f32fbeSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 437025b89263Smrg ;; 437106f32fbeSmrg ncr) 437206f32fbeSmrg lt_cv_deplibs_check_method=pass_all 437306f32fbeSmrg ;; 437406f32fbeSmrg sequent) 437506f32fbeSmrg lt_cv_file_magic_cmd='/bin/file' 437606f32fbeSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 437706f32fbeSmrg ;; 437806f32fbeSmrg sni) 437906f32fbeSmrg lt_cv_file_magic_cmd='/bin/file' 438006f32fbeSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 438106f32fbeSmrg lt_cv_file_magic_test_file=/lib/libc.so 438206f32fbeSmrg ;; 438306f32fbeSmrg siemens) 438406f32fbeSmrg lt_cv_deplibs_check_method=pass_all 438506f32fbeSmrg ;; 438606f32fbeSmrg pc) 438706f32fbeSmrg lt_cv_deplibs_check_method=pass_all 438825b89263Smrg ;; 438925b89263Smrg esac 439025b89263Smrg ;; 439125b89263Smrg 439206f32fbeSmrgtpf*) 439306f32fbeSmrg lt_cv_deplibs_check_method=pass_all 439406f32fbeSmrg ;; 439525b89263Smrgesac 439606f32fbeSmrg]) 439706f32fbeSmrg 439806f32fbeSmrgfile_magic_glob= 439906f32fbeSmrgwant_nocaseglob=no 440006f32fbeSmrgif test "$build" = "$host"; then 440106f32fbeSmrg case $host_os in 440206f32fbeSmrg mingw* | pw32*) 440306f32fbeSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 440406f32fbeSmrg want_nocaseglob=yes 440525b89263Smrg else 440606f32fbeSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 440725b89263Smrg fi 440825b89263Smrg ;; 440906f32fbeSmrg esac 441006f32fbeSmrgfi 4411a253d6aeSmrg 441206f32fbeSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 441306f32fbeSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 441406f32fbeSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4415a253d6aeSmrg 441625b89263Smrg_LT_DECL([], [deplibs_check_method], [1], 441725b89263Smrg [Method to check whether dependent libraries are shared objects]) 441825b89263Smrg_LT_DECL([], [file_magic_cmd], [1], 441906f32fbeSmrg [Command to use when deplibs_check_method = "file_magic"]) 442006f32fbeSmrg_LT_DECL([], [file_magic_glob], [1], 442106f32fbeSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 442206f32fbeSmrg_LT_DECL([], [want_nocaseglob], [1], 442306f32fbeSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 442425b89263Smrg])# _LT_CHECK_MAGIC_METHOD 4425a253d6aeSmrg 4426a253d6aeSmrg 442725b89263Smrg# LT_PATH_NM 442825b89263Smrg# ---------- 442925b89263Smrg# find the pathname to a BSD- or MS-compatible name lister 443025b89263SmrgAC_DEFUN([LT_PATH_NM], 443125b89263Smrg[AC_REQUIRE([AC_PROG_CC])dnl 443225b89263SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 443325b89263Smrg[if test -n "$NM"; then 443425b89263Smrg # Let the user override the test. 443525b89263Smrg lt_cv_path_NM="$NM" 4436ea133fd7Smrgelse 443725b89263Smrg lt_nm_to_check="${ac_tool_prefix}nm" 443825b89263Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 443925b89263Smrg lt_nm_to_check="$lt_nm_to_check nm" 444025b89263Smrg fi 444125b89263Smrg for lt_tmp_nm in $lt_nm_to_check; do 444225b89263Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 444325b89263Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 444425b89263Smrg IFS="$lt_save_ifs" 444525b89263Smrg test -z "$ac_dir" && ac_dir=. 444625b89263Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 444725b89263Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 444825b89263Smrg # Check to see if the nm accepts a BSD-compat flag. 444925b89263Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 445025b89263Smrg # nm: unknown option "B" ignored 445125b89263Smrg # Tru64's nm complains that /dev/null is an invalid object file 445225b89263Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 445325b89263Smrg */dev/null* | *'Invalid file or object type'*) 445425b89263Smrg lt_cv_path_NM="$tmp_nm -B" 445525b89263Smrg break 445625b89263Smrg ;; 445725b89263Smrg *) 445825b89263Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 445925b89263Smrg */dev/null*) 446025b89263Smrg lt_cv_path_NM="$tmp_nm -p" 446125b89263Smrg break 446225b89263Smrg ;; 446325b89263Smrg *) 446425b89263Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 446525b89263Smrg continue # so that we can try to find one that supports BSD flags 446625b89263Smrg ;; 446725b89263Smrg esac 446825b89263Smrg ;; 446925b89263Smrg esac 447025b89263Smrg fi 447125b89263Smrg done 447225b89263Smrg IFS="$lt_save_ifs" 447325b89263Smrg done 447425b89263Smrg : ${lt_cv_path_NM=no} 447525b89263Smrgfi]) 447625b89263Smrgif test "$lt_cv_path_NM" != "no"; then 447725b89263Smrg NM="$lt_cv_path_NM" 447825b89263Smrgelse 447925b89263Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 448025b89263Smrg if test -n "$DUMPBIN"; then : 448125b89263Smrg # Let the user override the test. 448225b89263Smrg else 448325b89263Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 448425b89263Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 448525b89263Smrg *COFF*) 448625b89263Smrg DUMPBIN="$DUMPBIN -symbols" 448725b89263Smrg ;; 448825b89263Smrg *) 448925b89263Smrg DUMPBIN=: 449025b89263Smrg ;; 449125b89263Smrg esac 449225b89263Smrg fi 449325b89263Smrg AC_SUBST([DUMPBIN]) 449425b89263Smrg if test "$DUMPBIN" != ":"; then 449525b89263Smrg NM="$DUMPBIN" 449625b89263Smrg fi 4497ea133fd7Smrgfi 449825b89263Smrgtest -z "$NM" && NM=nm 449925b89263SmrgAC_SUBST([NM]) 450025b89263Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 450125b89263Smrg 450225b89263SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 450325b89263Smrg [lt_cv_nm_interface="BSD nm" 450425b89263Smrg echo "int some_variable = 0;" > conftest.$ac_ext 450525b89263Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 450625b89263Smrg (eval "$ac_compile" 2>conftest.err) 450725b89263Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 450825b89263Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 450925b89263Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 451025b89263Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 451125b89263Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 451225b89263Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 451325b89263Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 451425b89263Smrg lt_cv_nm_interface="MS dumpbin" 451525b89263Smrg fi 451625b89263Smrg rm -f conftest*]) 451725b89263Smrg])# LT_PATH_NM 4518a253d6aeSmrg 451925b89263Smrg# Old names: 452025b89263SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 452125b89263SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4522ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 452325b89263Smrgdnl AC_DEFUN([AM_PROG_NM], []) 452425b89263Smrgdnl AC_DEFUN([AC_PROG_NM], []) 4525a253d6aeSmrg 452606f32fbeSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 452706f32fbeSmrg# -------------------------------- 452806f32fbeSmrg# how to determine the name of the shared library 452906f32fbeSmrg# associated with a specific link library. 453006f32fbeSmrg# -- PORTME fill in with the dynamic library characteristics 453106f32fbeSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 453206f32fbeSmrg[m4_require([_LT_DECL_EGREP]) 453306f32fbeSmrgm4_require([_LT_DECL_OBJDUMP]) 453406f32fbeSmrgm4_require([_LT_DECL_DLLTOOL]) 453506f32fbeSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 453606f32fbeSmrglt_cv_sharedlib_from_linklib_cmd, 453706f32fbeSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 453806f32fbeSmrg 453906f32fbeSmrgcase $host_os in 454006f32fbeSmrgcygwin* | mingw* | pw32* | cegcc*) 454106f32fbeSmrg # two different shell functions defined in ltmain.sh 454206f32fbeSmrg # decide which to use based on capabilities of $DLLTOOL 454306f32fbeSmrg case `$DLLTOOL --help 2>&1` in 454406f32fbeSmrg *--identify-strict*) 454506f32fbeSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 454606f32fbeSmrg ;; 454706f32fbeSmrg *) 454806f32fbeSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 454906f32fbeSmrg ;; 455006f32fbeSmrg esac 455106f32fbeSmrg ;; 455206f32fbeSmrg*) 455306f32fbeSmrg # fallback: assume linklib IS sharedlib 455406f32fbeSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 455506f32fbeSmrg ;; 455606f32fbeSmrgesac 455706f32fbeSmrg]) 455806f32fbeSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 455906f32fbeSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 456006f32fbeSmrg 456106f32fbeSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 456206f32fbeSmrg [Command to associate shared and link libraries]) 456306f32fbeSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 456406f32fbeSmrg 456506f32fbeSmrg 456606f32fbeSmrg# _LT_PATH_MANIFEST_TOOL 456706f32fbeSmrg# ---------------------- 456806f32fbeSmrg# locate the manifest tool 456906f32fbeSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 457006f32fbeSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 457106f32fbeSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 457206f32fbeSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 457306f32fbeSmrg [lt_cv_path_mainfest_tool=no 457406f32fbeSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 457506f32fbeSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 457606f32fbeSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 457706f32fbeSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 457806f32fbeSmrg lt_cv_path_mainfest_tool=yes 457906f32fbeSmrg fi 458006f32fbeSmrg rm -f conftest*]) 458106f32fbeSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 458206f32fbeSmrg MANIFEST_TOOL=: 458306f32fbeSmrgfi 458406f32fbeSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 458506f32fbeSmrg])# _LT_PATH_MANIFEST_TOOL 458606f32fbeSmrg 4587a253d6aeSmrg 458825b89263Smrg# LT_LIB_M 458925b89263Smrg# -------- 459025b89263Smrg# check for math library 459125b89263SmrgAC_DEFUN([LT_LIB_M], 459225b89263Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 459325b89263SmrgLIBM= 459425b89263Smrgcase $host in 459525b89263Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 459625b89263Smrg # These system don't have libm, or don't need it 459725b89263Smrg ;; 459825b89263Smrg*-ncr-sysv4.3*) 459925b89263Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 460025b89263Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 460125b89263Smrg ;; 460225b89263Smrg*) 460325b89263Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 460425b89263Smrg ;; 460525b89263Smrgesac 460625b89263SmrgAC_SUBST([LIBM]) 460725b89263Smrg])# LT_LIB_M 460825b89263Smrg 460925b89263Smrg# Old name: 461025b89263SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 461125b89263Smrgdnl aclocal-1.4 backwards compatibility: 461225b89263Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4613ea133fd7Smrg 4614a253d6aeSmrg 461525b89263Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 461625b89263Smrg# ------------------------------- 461725b89263Smrgm4_defun([_LT_COMPILER_NO_RTTI], 461825b89263Smrg[m4_require([_LT_TAG_COMPILER])dnl 4619a253d6aeSmrg 462025b89263Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4621ea133fd7Smrg 462225b89263Smrgif test "$GCC" = yes; then 462325b89263Smrg case $cc_basename in 462425b89263Smrg nvcc*) 462525b89263Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 462625b89263Smrg *) 462725b89263Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 462825b89263Smrg esac 4629ea133fd7Smrg 463025b89263Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 463125b89263Smrg lt_cv_prog_compiler_rtti_exceptions, 463225b89263Smrg [-fno-rtti -fno-exceptions], [], 463325b89263Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 463425b89263Smrgfi 463525b89263Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 463625b89263Smrg [Compiler flag to turn off builtin functions]) 463725b89263Smrg])# _LT_COMPILER_NO_RTTI 4638ea133fd7Smrg 4639ea133fd7Smrg 464025b89263Smrg# _LT_CMD_GLOBAL_SYMBOLS 464125b89263Smrg# ---------------------- 464225b89263Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 464325b89263Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 464425b89263SmrgAC_REQUIRE([AC_PROG_CC])dnl 464525b89263SmrgAC_REQUIRE([AC_PROG_AWK])dnl 464625b89263SmrgAC_REQUIRE([LT_PATH_NM])dnl 464725b89263SmrgAC_REQUIRE([LT_PATH_LD])dnl 464825b89263Smrgm4_require([_LT_DECL_SED])dnl 464925b89263Smrgm4_require([_LT_DECL_EGREP])dnl 465025b89263Smrgm4_require([_LT_TAG_COMPILER])dnl 4651ea133fd7Smrg 465225b89263Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 465325b89263SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 465425b89263SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 465525b89263Smrg[ 465625b89263Smrg# These are sane defaults that work on at least a few old systems. 465725b89263Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4658a253d6aeSmrg 465925b89263Smrg# Character class describing NM global symbol codes. 466025b89263Smrgsymcode='[[BCDEGRST]]' 4661a253d6aeSmrg 466225b89263Smrg# Regexp to match symbols that can be accessed directly from C. 466325b89263Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4664a253d6aeSmrg 466525b89263Smrg# Define system-specific variables. 466625b89263Smrgcase $host_os in 466725b89263Smrgaix*) 466825b89263Smrg symcode='[[BCDT]]' 466925b89263Smrg ;; 467025b89263Smrgcygwin* | mingw* | pw32* | cegcc*) 467125b89263Smrg symcode='[[ABCDGISTW]]' 467225b89263Smrg ;; 467325b89263Smrghpux*) 467425b89263Smrg if test "$host_cpu" = ia64; then 467525b89263Smrg symcode='[[ABCDEGRST]]' 467625b89263Smrg fi 467725b89263Smrg ;; 467825b89263Smrgirix* | nonstopux*) 467925b89263Smrg symcode='[[BCDEGRST]]' 468025b89263Smrg ;; 468125b89263Smrgosf*) 468225b89263Smrg symcode='[[BCDEGQRST]]' 468325b89263Smrg ;; 468425b89263Smrgsolaris*) 468525b89263Smrg symcode='[[BDRT]]' 468625b89263Smrg ;; 468725b89263Smrgsco3.2v5*) 468825b89263Smrg symcode='[[DT]]' 468925b89263Smrg ;; 469025b89263Smrgsysv4.2uw2*) 469125b89263Smrg symcode='[[DT]]' 469225b89263Smrg ;; 469325b89263Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 469425b89263Smrg symcode='[[ABDT]]' 469525b89263Smrg ;; 469625b89263Smrgsysv4) 469725b89263Smrg symcode='[[DFNSTU]]' 469825b89263Smrg ;; 469925b89263Smrgesac 4700a253d6aeSmrg 470125b89263Smrg# If we're using GNU nm, then use its standard symbol codes. 470225b89263Smrgcase `$NM -V 2>&1` in 470325b89263Smrg*GNU* | *'with BFD'*) 470425b89263Smrg symcode='[[ABCDGIRSTW]]' ;; 470525b89263Smrgesac 4706a253d6aeSmrg 470725b89263Smrg# Transform an extracted symbol line into a proper C declaration. 470825b89263Smrg# Some systems (esp. on ia64) link data and code symbols differently, 470925b89263Smrg# so use this general approach. 471025b89263Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4711a253d6aeSmrg 471225b89263Smrg# Transform an extracted symbol line into symbol name and symbol address 471306f32fbeSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 471406f32fbeSmrglt_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'" 4715a253d6aeSmrg 471625b89263Smrg# Handle CRLF in mingw tool chain 471725b89263Smrgopt_cr= 471825b89263Smrgcase $build_os in 471925b89263Smrgmingw*) 472025b89263Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 472125b89263Smrg ;; 472225b89263Smrgesac 4723ea133fd7Smrg 472425b89263Smrg# Try without a prefix underscore, then with it. 472525b89263Smrgfor ac_symprfx in "" "_"; do 4726a253d6aeSmrg 472725b89263Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 472825b89263Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4729a253d6aeSmrg 473025b89263Smrg # Write the raw and C identifiers. 473125b89263Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 473225b89263Smrg # Fake it for dumpbin and say T for any non-static function 473325b89263Smrg # and D for any global variable. 473425b89263Smrg # Also find C++ and __fastcall symbols from MSVC++, 473525b89263Smrg # which start with @ or ?. 473625b89263Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 473725b89263Smrg" {last_section=section; section=\$ 3};"\ 473857ee1794Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 473925b89263Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 474025b89263Smrg" \$ 0!~/External *\|/{next};"\ 474125b89263Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 474225b89263Smrg" {if(hide[section]) next};"\ 474325b89263Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 474425b89263Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 474525b89263Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 474625b89263Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 474725b89263Smrg" ' prfx=^$ac_symprfx]" 474825b89263Smrg else 474925b89263Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 475025b89263Smrg fi 475106f32fbeSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4752a253d6aeSmrg 475325b89263Smrg # Check to see that the pipe works correctly. 475425b89263Smrg pipe_works=no 4755ea133fd7Smrg 475625b89263Smrg rm -f conftest* 475725b89263Smrg cat > conftest.$ac_ext <<_LT_EOF 475825b89263Smrg#ifdef __cplusplus 475925b89263Smrgextern "C" { 476025b89263Smrg#endif 476125b89263Smrgchar nm_test_var; 476225b89263Smrgvoid nm_test_func(void); 476325b89263Smrgvoid nm_test_func(void){} 476425b89263Smrg#ifdef __cplusplus 476525b89263Smrg} 476625b89263Smrg#endif 476725b89263Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 476825b89263Smrg_LT_EOF 4769a253d6aeSmrg 477025b89263Smrg if AC_TRY_EVAL(ac_compile); then 477125b89263Smrg # Now try to grab the symbols. 477225b89263Smrg nlist=conftest.nm 477325b89263Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 477425b89263Smrg # Try sorting and uniquifying the output. 477525b89263Smrg if sort "$nlist" | uniq > "$nlist"T; then 477625b89263Smrg mv -f "$nlist"T "$nlist" 477725b89263Smrg else 477825b89263Smrg rm -f "$nlist"T 477925b89263Smrg fi 4780a253d6aeSmrg 478125b89263Smrg # Make sure that we snagged all the symbols we need. 478225b89263Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 478325b89263Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 478425b89263Smrg cat <<_LT_EOF > conftest.$ac_ext 478506f32fbeSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 478606f32fbeSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 478706f32fbeSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 478806f32fbeSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 478906f32fbeSmrg# define LT@&t@_DLSYM_CONST 479006f32fbeSmrg#elif defined(__osf__) 479106f32fbeSmrg/* This system does not cope well with relocations in const data. */ 479206f32fbeSmrg# define LT@&t@_DLSYM_CONST 479306f32fbeSmrg#else 479406f32fbeSmrg# define LT@&t@_DLSYM_CONST const 479506f32fbeSmrg#endif 479606f32fbeSmrg 479725b89263Smrg#ifdef __cplusplus 479825b89263Smrgextern "C" { 479925b89263Smrg#endif 4800ea133fd7Smrg 480125b89263Smrg_LT_EOF 480225b89263Smrg # Now generate the symbol file. 480325b89263Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4804ea133fd7Smrg 480525b89263Smrg cat <<_LT_EOF >> conftest.$ac_ext 4806a253d6aeSmrg 480725b89263Smrg/* The mapping between symbol names and symbols. */ 480806f32fbeSmrgLT@&t@_DLSYM_CONST struct { 480925b89263Smrg const char *name; 481025b89263Smrg void *address; 481125b89263Smrg} 481225b89263Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 481325b89263Smrg{ 481425b89263Smrg { "@PROGRAM@", (void *) 0 }, 481525b89263Smrg_LT_EOF 481625b89263Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 481725b89263Smrg cat <<\_LT_EOF >> conftest.$ac_ext 481825b89263Smrg {0, (void *) 0} 481925b89263Smrg}; 4820ea133fd7Smrg 482125b89263Smrg/* This works around a problem in FreeBSD linker */ 482225b89263Smrg#ifdef FREEBSD_WORKAROUND 482325b89263Smrgstatic const void *lt_preloaded_setup() { 482425b89263Smrg return lt__PROGRAM__LTX_preloaded_symbols; 482525b89263Smrg} 482625b89263Smrg#endif 4827a253d6aeSmrg 482825b89263Smrg#ifdef __cplusplus 482925b89263Smrg} 483025b89263Smrg#endif 483125b89263Smrg_LT_EOF 483225b89263Smrg # Now try linking the two files. 483325b89263Smrg mv conftest.$ac_objext conftstm.$ac_objext 483406f32fbeSmrg lt_globsym_save_LIBS=$LIBS 483506f32fbeSmrg lt_globsym_save_CFLAGS=$CFLAGS 483625b89263Smrg LIBS="conftstm.$ac_objext" 483725b89263Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 483825b89263Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 483925b89263Smrg pipe_works=yes 484025b89263Smrg fi 484106f32fbeSmrg LIBS=$lt_globsym_save_LIBS 484206f32fbeSmrg CFLAGS=$lt_globsym_save_CFLAGS 4843ea133fd7Smrg else 484425b89263Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4845ea133fd7Smrg fi 484625b89263Smrg else 484725b89263Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 484825b89263Smrg fi 484925b89263Smrg else 485025b89263Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 485125b89263Smrg fi 485225b89263Smrg else 485325b89263Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 485425b89263Smrg cat conftest.$ac_ext >&5 485525b89263Smrg fi 485625b89263Smrg rm -rf conftest* conftst* 4857a253d6aeSmrg 485825b89263Smrg # Do not use the global_symbol_pipe unless it works. 485925b89263Smrg if test "$pipe_works" = yes; then 486025b89263Smrg break 486125b89263Smrg else 486225b89263Smrg lt_cv_sys_global_symbol_pipe= 486325b89263Smrg fi 486425b89263Smrgdone 486525b89263Smrg]) 486625b89263Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 486725b89263Smrg lt_cv_sys_global_symbol_to_cdecl= 486825b89263Smrgfi 486925b89263Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 487025b89263Smrg AC_MSG_RESULT(failed) 487125b89263Smrgelse 487225b89263Smrg AC_MSG_RESULT(ok) 487325b89263Smrgfi 4874a253d6aeSmrg 487506f32fbeSmrg# Response file support. 487606f32fbeSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 487706f32fbeSmrg nm_file_list_spec='@' 487806f32fbeSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 487906f32fbeSmrg nm_file_list_spec='@' 488006f32fbeSmrgfi 488106f32fbeSmrg 488225b89263Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 488325b89263Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 488425b89263Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 488525b89263Smrg [Transform the output of nm in a proper C declaration]) 488625b89263Smrg_LT_DECL([global_symbol_to_c_name_address], 488725b89263Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 488825b89263Smrg [Transform the output of nm in a C name address pair]) 488925b89263Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 489025b89263Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 489125b89263Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 489206f32fbeSmrg_LT_DECL([], [nm_file_list_spec], [1], 489306f32fbeSmrg [Specify filename containing input files for $NM]) 489425b89263Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4895a253d6aeSmrg 4896a253d6aeSmrg 489725b89263Smrg# _LT_COMPILER_PIC([TAGNAME]) 489825b89263Smrg# --------------------------- 489925b89263Smrgm4_defun([_LT_COMPILER_PIC], 490025b89263Smrg[m4_require([_LT_TAG_COMPILER])dnl 490125b89263Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 490225b89263Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 490325b89263Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4904a253d6aeSmrg 490525b89263Smrgm4_if([$1], [CXX], [ 490625b89263Smrg # C++ specific cases for pic, static, wl, etc. 490725b89263Smrg if test "$GXX" = yes; then 490825b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 490925b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4910a253d6aeSmrg 491125b89263Smrg case $host_os in 491225b89263Smrg aix*) 491325b89263Smrg # All AIX code is PIC. 491425b89263Smrg if test "$host_cpu" = ia64; then 491525b89263Smrg # AIX 5 now supports IA64 processor 491625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 491725b89263Smrg fi 491825b89263Smrg ;; 4919ea133fd7Smrg 492025b89263Smrg amigaos*) 492125b89263Smrg case $host_cpu in 492225b89263Smrg powerpc) 492325b89263Smrg # see comment about AmigaOS4 .so support 492425b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4925ea133fd7Smrg ;; 492625b89263Smrg m68k) 492725b89263Smrg # FIXME: we need at least 68020 code to build shared libraries, but 492825b89263Smrg # adding the `-m68020' flag to GCC prevents building anything better, 492925b89263Smrg # like `-m68040'. 493025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4931ea133fd7Smrg ;; 493225b89263Smrg esac 493325b89263Smrg ;; 4934a253d6aeSmrg 493525b89263Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 493625b89263Smrg # PIC is the default for these OSes. 493725b89263Smrg ;; 493825b89263Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 493925b89263Smrg # This hack is so that the source file can tell whether it is being 494025b89263Smrg # built for inclusion in a dll (and should export symbols for example). 494125b89263Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 494225b89263Smrg # (--disable-auto-import) libraries 494325b89263Smrg m4_if([$1], [GCJ], [], 494425b89263Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 494525b89263Smrg ;; 494625b89263Smrg darwin* | rhapsody*) 494725b89263Smrg # PIC is the default on this platform 494825b89263Smrg # Common symbols not allowed in MH_DYLIB files 494925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 495025b89263Smrg ;; 495125b89263Smrg *djgpp*) 495225b89263Smrg # DJGPP does not support shared libraries at all 495325b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 495425b89263Smrg ;; 495525b89263Smrg haiku*) 495625b89263Smrg # PIC is the default for Haiku. 495725b89263Smrg # The "-static" flag exists, but is broken. 495825b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 495925b89263Smrg ;; 496025b89263Smrg interix[[3-9]]*) 496125b89263Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 496225b89263Smrg # Instead, we relocate shared libraries at runtime. 496325b89263Smrg ;; 496425b89263Smrg sysv4*MP*) 496525b89263Smrg if test -d /usr/nec; then 496625b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 496725b89263Smrg fi 496825b89263Smrg ;; 496925b89263Smrg hpux*) 497025b89263Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 497125b89263Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 497225b89263Smrg # sets the default TLS model and affects inlining. 497325b89263Smrg case $host_cpu in 497425b89263Smrg hppa*64*) 4975ea133fd7Smrg ;; 497625b89263Smrg *) 497725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 497825b89263Smrg ;; 497925b89263Smrg esac 498025b89263Smrg ;; 498125b89263Smrg *qnx* | *nto*) 498225b89263Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 498325b89263Smrg # it will coredump. 498425b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 498525b89263Smrg ;; 498625b89263Smrg *) 498725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 498825b89263Smrg ;; 498925b89263Smrg esac 499025b89263Smrg else 499125b89263Smrg case $host_os in 499225b89263Smrg aix[[4-9]]*) 499325b89263Smrg # All AIX code is PIC. 499425b89263Smrg if test "$host_cpu" = ia64; then 499525b89263Smrg # AIX 5 now supports IA64 processor 499625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 499725b89263Smrg else 499825b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 499925b89263Smrg fi 500025b89263Smrg ;; 500125b89263Smrg chorus*) 500225b89263Smrg case $cc_basename in 500325b89263Smrg cxch68*) 500425b89263Smrg # Green Hills C++ Compiler 500525b89263Smrg # _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" 500625b89263Smrg ;; 500725b89263Smrg esac 500825b89263Smrg ;; 500906f32fbeSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 501006f32fbeSmrg # This hack is so that the source file can tell whether it is being 501106f32fbeSmrg # built for inclusion in a dll (and should export symbols for example). 501206f32fbeSmrg m4_if([$1], [GCJ], [], 501306f32fbeSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 501406f32fbeSmrg ;; 501525b89263Smrg dgux*) 501625b89263Smrg case $cc_basename in 501725b89263Smrg ec++*) 501825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5019ea133fd7Smrg ;; 502025b89263Smrg ghcx*) 502125b89263Smrg # Green Hills C++ Compiler 502225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5023ea133fd7Smrg ;; 502425b89263Smrg *) 5025ea133fd7Smrg ;; 502625b89263Smrg esac 502725b89263Smrg ;; 502825b89263Smrg freebsd* | dragonfly*) 502925b89263Smrg # FreeBSD uses GNU C++ 503025b89263Smrg ;; 503125b89263Smrg hpux9* | hpux10* | hpux11*) 503225b89263Smrg case $cc_basename in 503325b89263Smrg CC*) 503425b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 503525b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 503625b89263Smrg if test "$host_cpu" != ia64; then 503725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 503825b89263Smrg fi 5039ea133fd7Smrg ;; 504025b89263Smrg aCC*) 504125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 504225b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 504325b89263Smrg case $host_cpu in 504425b89263Smrg hppa*64*|ia64*) 504525b89263Smrg # +Z the default 5046ea133fd7Smrg ;; 504725b89263Smrg *) 504825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5049ea133fd7Smrg ;; 5050ea133fd7Smrg esac 505125b89263Smrg ;; 505225b89263Smrg *) 505325b89263Smrg ;; 505425b89263Smrg esac 505525b89263Smrg ;; 505625b89263Smrg interix*) 505725b89263Smrg # This is c89, which is MS Visual C++ (no shared libs) 505825b89263Smrg # Anyone wants to do a port? 505925b89263Smrg ;; 506025b89263Smrg irix5* | irix6* | nonstopux*) 506125b89263Smrg case $cc_basename in 506225b89263Smrg CC*) 506325b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 506425b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 506525b89263Smrg # CC pic flag -KPIC is the default. 506625b89263Smrg ;; 506725b89263Smrg *) 506825b89263Smrg ;; 506925b89263Smrg esac 507025b89263Smrg ;; 507125b89263Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 507225b89263Smrg case $cc_basename in 507325b89263Smrg KCC*) 507425b89263Smrg # KAI C++ Compiler 507525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 507625b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 507725b89263Smrg ;; 507825b89263Smrg ecpc* ) 507925b89263Smrg # old Intel C++ for x86_64 which still supported -KPIC. 508025b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 508125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 508225b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 508325b89263Smrg ;; 508425b89263Smrg icpc* ) 508525b89263Smrg # Intel C++, used to be incompatible with GCC. 508625b89263Smrg # ICC 10 doesn't accept -KPIC any more. 508725b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 508825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 508925b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 509025b89263Smrg ;; 509125b89263Smrg pgCC* | pgcpp*) 509225b89263Smrg # Portland Group C++ compiler 509325b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 509425b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 509525b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 509625b89263Smrg ;; 5097ea133fd7Smrg cxx*) 5098ea133fd7Smrg # Compaq C++ 509925b89263Smrg # Make sure the PIC flag is empty. It appears that all Alpha 510025b89263Smrg # Linux and Compaq Tru64 Unix objects are PIC. 510125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 510225b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5103ea133fd7Smrg ;; 510425b89263Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 510525b89263Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 510625b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 510725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 510825b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5109ea133fd7Smrg ;; 5110ea133fd7Smrg *) 5111ea133fd7Smrg case `$CC -V 2>&1 | sed 5q` in 5112ea133fd7Smrg *Sun\ C*) 5113ea133fd7Smrg # Sun C++ 5.9 511425b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 511525b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 511625b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5117ea133fd7Smrg ;; 5118ea133fd7Smrg esac 5119ea133fd7Smrg ;; 5120ea133fd7Smrg esac 5121ea133fd7Smrg ;; 512225b89263Smrg lynxos*) 512325b89263Smrg ;; 512425b89263Smrg m88k*) 512525b89263Smrg ;; 512625b89263Smrg mvs*) 512725b89263Smrg case $cc_basename in 512825b89263Smrg cxx*) 512925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 513025b89263Smrg ;; 513125b89263Smrg *) 513225b89263Smrg ;; 513325b89263Smrg esac 513425b89263Smrg ;; 513525b89263Smrg netbsd*) 513625b89263Smrg ;; 513725b89263Smrg *qnx* | *nto*) 513825b89263Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 513925b89263Smrg # it will coredump. 514025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 514125b89263Smrg ;; 514225b89263Smrg osf3* | osf4* | osf5*) 514325b89263Smrg case $cc_basename in 514425b89263Smrg KCC*) 514525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 514625b89263Smrg ;; 514725b89263Smrg RCC*) 514825b89263Smrg # Rational C++ 2.4.1 514925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 515025b89263Smrg ;; 515125b89263Smrg cxx*) 515225b89263Smrg # Digital/Compaq C++ 515325b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 515425b89263Smrg # Make sure the PIC flag is empty. It appears that all Alpha 515525b89263Smrg # Linux and Compaq Tru64 Unix objects are PIC. 515625b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 515725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 515825b89263Smrg ;; 515925b89263Smrg *) 516025b89263Smrg ;; 516125b89263Smrg esac 516225b89263Smrg ;; 516325b89263Smrg psos*) 5164ea133fd7Smrg ;; 516525b89263Smrg solaris*) 516625b89263Smrg case $cc_basename in 516725b89263Smrg CC* | sunCC*) 516825b89263Smrg # Sun C++ 4.2, 5.x and Centerline C++ 516925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 517025b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 517125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 517225b89263Smrg ;; 517325b89263Smrg gcx*) 517425b89263Smrg # Green Hills C++ Compiler 517525b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 517625b89263Smrg ;; 517725b89263Smrg *) 517825b89263Smrg ;; 517925b89263Smrg esac 5180ea133fd7Smrg ;; 518125b89263Smrg sunos4*) 518225b89263Smrg case $cc_basename in 518325b89263Smrg CC*) 518425b89263Smrg # Sun C++ 4.x 518525b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 518625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 518725b89263Smrg ;; 518825b89263Smrg lcc*) 518925b89263Smrg # Lucid 519025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5191ea133fd7Smrg ;; 5192ea133fd7Smrg *) 5193ea133fd7Smrg ;; 5194ea133fd7Smrg esac 5195ea133fd7Smrg ;; 519625b89263Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 519725b89263Smrg case $cc_basename in 519825b89263Smrg CC*) 519925b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 520125b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 520225b89263Smrg ;; 520325b89263Smrg esac 5204ea133fd7Smrg ;; 520525b89263Smrg tandem*) 520625b89263Smrg case $cc_basename in 520725b89263Smrg NCC*) 520825b89263Smrg # NonStop-UX NCC 3.20 520925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 521025b89263Smrg ;; 521125b89263Smrg *) 521225b89263Smrg ;; 521325b89263Smrg esac 5214ea133fd7Smrg ;; 521525b89263Smrg vxworks*) 5216ea133fd7Smrg ;; 521725b89263Smrg *) 521825b89263Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5219ea133fd7Smrg ;; 522025b89263Smrg esac 522125b89263Smrg fi 522225b89263Smrg], 522325b89263Smrg[ 522425b89263Smrg if test "$GCC" = yes; then 522525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5227a253d6aeSmrg 522825b89263Smrg case $host_os in 522925b89263Smrg aix*) 523025b89263Smrg # All AIX code is PIC. 523125b89263Smrg if test "$host_cpu" = ia64; then 523225b89263Smrg # AIX 5 now supports IA64 processor 523325b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523425b89263Smrg fi 523525b89263Smrg ;; 5236a253d6aeSmrg 523725b89263Smrg amigaos*) 523825b89263Smrg case $host_cpu in 523925b89263Smrg powerpc) 524025b89263Smrg # see comment about AmigaOS4 .so support 524125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 524225b89263Smrg ;; 524325b89263Smrg m68k) 524425b89263Smrg # FIXME: we need at least 68020 code to build shared libraries, but 524525b89263Smrg # adding the `-m68020' flag to GCC prevents building anything better, 524625b89263Smrg # like `-m68040'. 524725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 524825b89263Smrg ;; 524925b89263Smrg esac 525025b89263Smrg ;; 5251ea133fd7Smrg 525225b89263Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 525325b89263Smrg # PIC is the default for these OSes. 525425b89263Smrg ;; 5255ea133fd7Smrg 525625b89263Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 525725b89263Smrg # This hack is so that the source file can tell whether it is being 525825b89263Smrg # built for inclusion in a dll (and should export symbols for example). 525925b89263Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 526025b89263Smrg # (--disable-auto-import) libraries 526125b89263Smrg m4_if([$1], [GCJ], [], 526225b89263Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 526325b89263Smrg ;; 5264ea133fd7Smrg 526525b89263Smrg darwin* | rhapsody*) 526625b89263Smrg # PIC is the default on this platform 526725b89263Smrg # Common symbols not allowed in MH_DYLIB files 526825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 526925b89263Smrg ;; 5270a253d6aeSmrg 527125b89263Smrg haiku*) 527225b89263Smrg # PIC is the default for Haiku. 527325b89263Smrg # The "-static" flag exists, but is broken. 527425b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 527525b89263Smrg ;; 5276a253d6aeSmrg 527725b89263Smrg hpux*) 527825b89263Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 527925b89263Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 528025b89263Smrg # sets the default TLS model and affects inlining. 528125b89263Smrg case $host_cpu in 528225b89263Smrg hppa*64*) 528325b89263Smrg # +Z the default 528425b89263Smrg ;; 528525b89263Smrg *) 528625b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 528725b89263Smrg ;; 528825b89263Smrg esac 528925b89263Smrg ;; 5290a253d6aeSmrg 529125b89263Smrg interix[[3-9]]*) 529225b89263Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 529325b89263Smrg # Instead, we relocate shared libraries at runtime. 529425b89263Smrg ;; 5295ea133fd7Smrg 529625b89263Smrg msdosdjgpp*) 529725b89263Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 529825b89263Smrg # on systems that don't support them. 529925b89263Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 530025b89263Smrg enable_shared=no 530125b89263Smrg ;; 5302a253d6aeSmrg 530325b89263Smrg *nto* | *qnx*) 530425b89263Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 530525b89263Smrg # it will coredump. 530625b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 530725b89263Smrg ;; 5308a253d6aeSmrg 530925b89263Smrg sysv4*MP*) 531025b89263Smrg if test -d /usr/nec; then 531125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 531225b89263Smrg fi 531325b89263Smrg ;; 5314a253d6aeSmrg 531525b89263Smrg *) 531625b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 531725b89263Smrg ;; 531825b89263Smrg esac 5319ea133fd7Smrg 532025b89263Smrg case $cc_basename in 532125b89263Smrg nvcc*) # Cuda Compiler Driver 2.2 532225b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 532357ee1794Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 532457ee1794Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 532557ee1794Smrg fi 532625b89263Smrg ;; 532725b89263Smrg esac 532825b89263Smrg else 532925b89263Smrg # PORTME Check for flag to pass linker flags through the system compiler. 533025b89263Smrg case $host_os in 533125b89263Smrg aix*) 533225b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 533325b89263Smrg if test "$host_cpu" = ia64; then 533425b89263Smrg # AIX 5 now supports IA64 processor 533525b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 533625b89263Smrg else 533725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 533825b89263Smrg fi 533925b89263Smrg ;; 5340ea133fd7Smrg 534125b89263Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 534225b89263Smrg # This hack is so that the source file can tell whether it is being 534325b89263Smrg # built for inclusion in a dll (and should export symbols for example). 534425b89263Smrg m4_if([$1], [GCJ], [], 534525b89263Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 534625b89263Smrg ;; 5347ea133fd7Smrg 534825b89263Smrg hpux9* | hpux10* | hpux11*) 534925b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 535025b89263Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 535125b89263Smrg # not for PA HP-UX. 535225b89263Smrg case $host_cpu in 535325b89263Smrg hppa*64*|ia64*) 535425b89263Smrg # +Z the default 535525b89263Smrg ;; 535625b89263Smrg *) 535725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 535825b89263Smrg ;; 535925b89263Smrg esac 536025b89263Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 536125b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 536225b89263Smrg ;; 5363a253d6aeSmrg 536425b89263Smrg irix5* | irix6* | nonstopux*) 536525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 536625b89263Smrg # PIC (with -KPIC) is the default. 536725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 536825b89263Smrg ;; 5369a253d6aeSmrg 537025b89263Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5371ea133fd7Smrg case $cc_basename in 537225b89263Smrg # old Intel for x86_64 which still supported -KPIC. 537325b89263Smrg ecc*) 537425b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 537525b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 537625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 537725b89263Smrg ;; 537825b89263Smrg # icc used to be incompatible with GCC. 537925b89263Smrg # ICC 10 doesn't accept -KPIC any more. 538025b89263Smrg icc* | ifort*) 538125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 538225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 538325b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 538425b89263Smrg ;; 538525b89263Smrg # Lahey Fortran 8.1. 538625b89263Smrg lf95*) 538725b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 538825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 538925b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 539025b89263Smrg ;; 539106f32fbeSmrg nagfor*) 539206f32fbeSmrg # NAG Fortran compiler 539306f32fbeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 539406f32fbeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 539506f32fbeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 539606f32fbeSmrg ;; 539725b89263Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 539825b89263Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 539925b89263Smrg # which looks to be a dead project) 540025b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 540125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 540225b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 540325b89263Smrg ;; 540425b89263Smrg ccc*) 540525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 540625b89263Smrg # All Alpha code is PIC. 540725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 540825b89263Smrg ;; 540925b89263Smrg xl* | bgxl* | bgf* | mpixl*) 541025b89263Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 541125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 541225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 541325b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 541425b89263Smrg ;; 541525b89263Smrg *) 541625b89263Smrg case `$CC -V 2>&1 | sed 5q` in 541757ee1794Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 541825b89263Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 541925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 542025b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 542125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5422ea133fd7Smrg ;; 542357ee1794Smrg *Sun\ F* | *Sun*Fortran*) 542457ee1794Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 542557ee1794Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 542657ee1794Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 542757ee1794Smrg ;; 542825b89263Smrg *Sun\ C*) 542925b89263Smrg # Sun C 5.9 543025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 543125b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 543225b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5433ea133fd7Smrg ;; 543457ee1794Smrg *Intel*\ [[CF]]*Compiler*) 543557ee1794Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 543657ee1794Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 543757ee1794Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 543857ee1794Smrg ;; 543957ee1794Smrg *Portland\ Group*) 544057ee1794Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 544157ee1794Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 544257ee1794Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 544357ee1794Smrg ;; 544425b89263Smrg esac 544525b89263Smrg ;; 5446ea133fd7Smrg esac 5447ea133fd7Smrg ;; 5448a253d6aeSmrg 544925b89263Smrg newsos6) 545025b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 545125b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 545225b89263Smrg ;; 5453a253d6aeSmrg 545425b89263Smrg *nto* | *qnx*) 545525b89263Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 545625b89263Smrg # it will coredump. 545725b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5458ea133fd7Smrg ;; 5459a253d6aeSmrg 546025b89263Smrg osf3* | osf4* | osf5*) 546125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 546225b89263Smrg # All OSF/1 code is PIC. 546325b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 546425b89263Smrg ;; 5465a253d6aeSmrg 546625b89263Smrg rdos*) 546725b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 546825b89263Smrg ;; 5469a253d6aeSmrg 547025b89263Smrg solaris*) 547125b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 547225b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 547325b89263Smrg case $cc_basename in 547425b89263Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 547525b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5476ea133fd7Smrg *) 547725b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 547825b89263Smrg esac 547925b89263Smrg ;; 5480a253d6aeSmrg 548125b89263Smrg sunos4*) 548225b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 548325b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 548425b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 548525b89263Smrg ;; 5486ea133fd7Smrg 548725b89263Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 548825b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 548925b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 549025b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549125b89263Smrg ;; 5492ea133fd7Smrg 549325b89263Smrg sysv4*MP*) 549425b89263Smrg if test -d /usr/nec ;then 549525b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 549625b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549725b89263Smrg fi 549825b89263Smrg ;; 5499ea133fd7Smrg 550025b89263Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 550125b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 550325b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 550425b89263Smrg ;; 5505ea133fd7Smrg 550625b89263Smrg unicos*) 550725b89263Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550825b89263Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 550925b89263Smrg ;; 5510a253d6aeSmrg 551125b89263Smrg uts4*) 551225b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 551325b89263Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 551425b89263Smrg ;; 5515a253d6aeSmrg 551625b89263Smrg *) 551725b89263Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 551825b89263Smrg ;; 551925b89263Smrg esac 552025b89263Smrg fi 552125b89263Smrg]) 552225b89263Smrgcase $host_os in 552325b89263Smrg # For platforms which do not support PIC, -DPIC is meaningless: 552425b89263Smrg *djgpp*) 552525b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 552625b89263Smrg ;; 552725b89263Smrg *) 552825b89263Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 552925b89263Smrg ;; 553025b89263Smrgesac 553106f32fbeSmrg 553206f32fbeSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 553306f32fbeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 553406f32fbeSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 553506f32fbeSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5536a253d6aeSmrg 553725b89263Smrg# 553825b89263Smrg# Check to make sure the PIC flag actually works. 553925b89263Smrg# 554025b89263Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 554125b89263Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 554225b89263Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 554325b89263Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 554425b89263Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 554525b89263Smrg "" | " "*) ;; 554625b89263Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 554725b89263Smrg esac], 554825b89263Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 554925b89263Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 555025b89263Smrgfi 555125b89263Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 555225b89263Smrg [Additional compiler flags for building library objects]) 5553a253d6aeSmrg 555406f32fbeSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 555506f32fbeSmrg [How to pass a linker flag through the compiler]) 555625b89263Smrg# 555725b89263Smrg# Check to make sure the static flag actually works. 555825b89263Smrg# 555925b89263Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 556025b89263Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 556125b89263Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 556225b89263Smrg $lt_tmp_static_flag, 556325b89263Smrg [], 556425b89263Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 556525b89263Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 556625b89263Smrg [Compiler flag to prevent dynamic linking]) 556725b89263Smrg])# _LT_COMPILER_PIC 5568a253d6aeSmrg 5569a253d6aeSmrg 557025b89263Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 557125b89263Smrg# ---------------------------- 557225b89263Smrg# See if the linker supports building shared libraries. 557325b89263Smrgm4_defun([_LT_LINKER_SHLIBS], 557425b89263Smrg[AC_REQUIRE([LT_PATH_LD])dnl 557525b89263SmrgAC_REQUIRE([LT_PATH_NM])dnl 557606f32fbeSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 557725b89263Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 557825b89263Smrgm4_require([_LT_DECL_EGREP])dnl 557925b89263Smrgm4_require([_LT_DECL_SED])dnl 558025b89263Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 558125b89263Smrgm4_require([_LT_TAG_COMPILER])dnl 558225b89263SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 558325b89263Smrgm4_if([$1], [CXX], [ 558425b89263Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 558506f32fbeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 558625b89263Smrg case $host_os in 558725b89263Smrg aix[[4-9]]*) 558825b89263Smrg # If we're using GNU nm, then we don't want the "-C" option. 558925b89263Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 559025b89263Smrg # Also, AIX nm treats weak defined symbols like other global defined 559125b89263Smrg # symbols, whereas GNU nm marks them as "W". 559225b89263Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 559325b89263Smrg _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' 559425b89263Smrg else 559525b89263Smrg _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' 559625b89263Smrg fi 559725b89263Smrg ;; 559825b89263Smrg pw32*) 559925b89263Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 560006f32fbeSmrg ;; 560125b89263Smrg cygwin* | mingw* | cegcc*) 560206f32fbeSmrg case $cc_basename in 560357ee1794Smrg cl*) 560457ee1794Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 560557ee1794Smrg ;; 560606f32fbeSmrg *) 560706f32fbeSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 560806f32fbeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 560906f32fbeSmrg ;; 561006f32fbeSmrg esac 561106f32fbeSmrg ;; 561225b89263Smrg *) 561325b89263Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 561406f32fbeSmrg ;; 561525b89263Smrg esac 561625b89263Smrg], [ 561725b89263Smrg runpath_var= 561825b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 561925b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=no 562025b89263Smrg _LT_TAGVAR(archive_cmds, $1)= 562125b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 562225b89263Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 562325b89263Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 562425b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 562525b89263Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 562625b89263Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 562725b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 562825b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 562925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 563025b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 563125b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 563225b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 563325b89263Smrg _LT_TAGVAR(inherit_rpath, $1)=no 563425b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 563525b89263Smrg _LT_TAGVAR(module_cmds, $1)= 563625b89263Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 563725b89263Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 563825b89263Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 563925b89263Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 564025b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 564125b89263Smrg # include_expsyms should be a list of space-separated symbols to be *always* 564225b89263Smrg # included in the symbol list 564325b89263Smrg _LT_TAGVAR(include_expsyms, $1)= 564425b89263Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 564525b89263Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 564625b89263Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 564725b89263Smrg # as well as any symbol that contains `d'. 564825b89263Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 564925b89263Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 565025b89263Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 565125b89263Smrg # the symbol is explicitly referenced. Since portable code cannot 565225b89263Smrg # rely on this symbol name, it's probably fine to never include it in 565325b89263Smrg # preloaded symbol tables. 565425b89263Smrg # Exclude shared library initialization/finalization symbols. 565525b89263Smrgdnl Note also adjust exclude_expsyms for C++ above. 565625b89263Smrg extract_expsyms_cmds= 565725b89263Smrg 565825b89263Smrg case $host_os in 565925b89263Smrg cygwin* | mingw* | pw32* | cegcc*) 566025b89263Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 566125b89263Smrg # When not using gcc, we currently assume that we are using 566225b89263Smrg # Microsoft Visual C++. 566325b89263Smrg if test "$GCC" != yes; then 566425b89263Smrg with_gnu_ld=no 566525b89263Smrg fi 566625b89263Smrg ;; 566725b89263Smrg interix*) 566825b89263Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 566925b89263Smrg with_gnu_ld=yes 567025b89263Smrg ;; 567125b89263Smrg openbsd*) 567225b89263Smrg with_gnu_ld=no 567325b89263Smrg ;; 567425b89263Smrg esac 5675a253d6aeSmrg 567625b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5677a253d6aeSmrg 567825b89263Smrg # On some targets, GNU ld is compatible enough with the native linker 567925b89263Smrg # that we're better off using the native interface for both. 568025b89263Smrg lt_use_gnu_ld_interface=no 568125b89263Smrg if test "$with_gnu_ld" = yes; then 568225b89263Smrg case $host_os in 568325b89263Smrg aix*) 568425b89263Smrg # The AIX port of GNU ld has always aspired to compatibility 568525b89263Smrg # with the native linker. However, as the warning in the GNU ld 568625b89263Smrg # block says, versions before 2.19.5* couldn't really create working 568725b89263Smrg # shared libraries, regardless of the interface used. 568825b89263Smrg case `$LD -v 2>&1` in 568925b89263Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 569025b89263Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 569125b89263Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 569225b89263Smrg *) 569325b89263Smrg lt_use_gnu_ld_interface=yes 569425b89263Smrg ;; 569525b89263Smrg esac 569625b89263Smrg ;; 569725b89263Smrg *) 569825b89263Smrg lt_use_gnu_ld_interface=yes 569925b89263Smrg ;; 570025b89263Smrg esac 570125b89263Smrg fi 5702a253d6aeSmrg 570325b89263Smrg if test "$lt_use_gnu_ld_interface" = yes; then 570425b89263Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 570525b89263Smrg wlarc='${wl}' 5706a253d6aeSmrg 570725b89263Smrg # Set some defaults for GNU ld with shared library support. These 570825b89263Smrg # are reset later if shared libraries are not supported. Putting them 570925b89263Smrg # here allows them to be overridden if necessary. 571025b89263Smrg runpath_var=LD_RUN_PATH 571125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 571225b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 571325b89263Smrg # ancient GNU ld didn't support --whole-archive et. al. 571425b89263Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 571525b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 571625b89263Smrg else 571725b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 571825b89263Smrg fi 571925b89263Smrg supports_anon_versioning=no 572025b89263Smrg case `$LD -v 2>&1` in 572125b89263Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 572225b89263Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 572325b89263Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 572425b89263Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 572525b89263Smrg *\ 2.11.*) ;; # other 2.11 versions 572625b89263Smrg *) supports_anon_versioning=yes ;; 572725b89263Smrg esac 5728a253d6aeSmrg 572925b89263Smrg # See if GNU ld supports shared libraries. 573025b89263Smrg case $host_os in 573125b89263Smrg aix[[3-9]]*) 573225b89263Smrg # On AIX/PPC, the GNU linker is very broken 573325b89263Smrg if test "$host_cpu" != ia64; then 573425b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 573525b89263Smrg cat <<_LT_EOF 1>&2 5736a253d6aeSmrg 573725b89263Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 573825b89263Smrg*** to be unable to reliably create shared libraries on AIX. 573925b89263Smrg*** Therefore, libtool is disabling shared libraries support. If you 574025b89263Smrg*** really care for shared libraries, you may want to install binutils 574125b89263Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 574225b89263Smrg*** You will then need to restart the configuration process. 5743a253d6aeSmrg 574425b89263Smrg_LT_EOF 574525b89263Smrg fi 574625b89263Smrg ;; 5747a253d6aeSmrg 574825b89263Smrg amigaos*) 574925b89263Smrg case $host_cpu in 575025b89263Smrg powerpc) 575125b89263Smrg # see comment about AmigaOS4 .so support 575225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 575325b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 575425b89263Smrg ;; 575525b89263Smrg m68k) 575625b89263Smrg _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)' 575725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 575825b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 575925b89263Smrg ;; 576025b89263Smrg esac 576125b89263Smrg ;; 5762a253d6aeSmrg 576325b89263Smrg beos*) 576425b89263Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 576525b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 576625b89263Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 576725b89263Smrg # support --undefined. This deserves some investigation. FIXME 576825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 576925b89263Smrg else 577025b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 577125b89263Smrg fi 577225b89263Smrg ;; 5773a253d6aeSmrg 577425b89263Smrg cygwin* | mingw* | pw32* | cegcc*) 577525b89263Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 577625b89263Smrg # as there is no search path for DLLs. 577725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 577825b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 577925b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 578025b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=no 578125b89263Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 578206f32fbeSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 578306f32fbeSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5784ea133fd7Smrg 578525b89263Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 578625b89263Smrg _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' 578725b89263Smrg # If the export-symbols file already is a .def file (1st line 578825b89263Smrg # is EXPORTS), use it as is; otherwise, prepend... 578925b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 579025b89263Smrg cp $export_symbols $output_objdir/$soname.def; 579125b89263Smrg else 579225b89263Smrg echo EXPORTS > $output_objdir/$soname.def; 579325b89263Smrg cat $export_symbols >> $output_objdir/$soname.def; 579425b89263Smrg fi~ 579525b89263Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 579625b89263Smrg else 579725b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 579825b89263Smrg fi 5799ea133fd7Smrg ;; 5800a253d6aeSmrg 580125b89263Smrg haiku*) 580225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 580325b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 580425b89263Smrg ;; 5805a253d6aeSmrg 580625b89263Smrg interix[[3-9]]*) 580725b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 580825b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 580925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 581025b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 581125b89263Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 581225b89263Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 581325b89263Smrg # default) and relocated if they conflict, which is a slow very memory 581425b89263Smrg # consuming and fragmenting process. To avoid this, we pick a random, 581525b89263Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 581625b89263Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 581725b89263Smrg _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' 581825b89263Smrg _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' 5819ea133fd7Smrg ;; 5820a253d6aeSmrg 582125b89263Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 582225b89263Smrg tmp_diet=no 582325b89263Smrg if test "$host_os" = linux-dietlibc; then 582425b89263Smrg case $cc_basename in 582525b89263Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 582625b89263Smrg esac 582725b89263Smrg fi 582825b89263Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 582925b89263Smrg && test "$tmp_diet" = no 583025b89263Smrg then 583106f32fbeSmrg tmp_addflag=' $pic_flag' 583225b89263Smrg tmp_sharedflag='-shared' 583325b89263Smrg case $cc_basename,$host_cpu in 583425b89263Smrg pgcc*) # Portland Group C compiler 583525b89263Smrg _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' 583625b89263Smrg tmp_addflag=' $pic_flag' 583725b89263Smrg ;; 583825b89263Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 583925b89263Smrg # Portland Group f77 and f90 compilers 584025b89263Smrg _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' 584125b89263Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 584225b89263Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 584325b89263Smrg tmp_addflag=' -i_dynamic' ;; 584425b89263Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 584525b89263Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 584625b89263Smrg ifc* | ifort*) # Intel Fortran compiler 584725b89263Smrg tmp_addflag=' -nofor_main' ;; 584825b89263Smrg lf95*) # Lahey Fortran 8.1 584925b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 585025b89263Smrg tmp_sharedflag='--shared' ;; 585125b89263Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 585225b89263Smrg tmp_sharedflag='-qmkshrobj' 585325b89263Smrg tmp_addflag= ;; 585425b89263Smrg nvcc*) # Cuda Compiler Driver 2.2 585525b89263Smrg _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' 585625b89263Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 585725b89263Smrg ;; 585825b89263Smrg esac 585925b89263Smrg case `$CC -V 2>&1 | sed 5q` in 586025b89263Smrg *Sun\ C*) # Sun C 5.9 586125b89263Smrg _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' 586225b89263Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 586325b89263Smrg tmp_sharedflag='-G' ;; 586425b89263Smrg *Sun\ F*) # Sun Fortran 8.3 586525b89263Smrg tmp_sharedflag='-G' ;; 586625b89263Smrg esac 586725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5868a253d6aeSmrg 586925b89263Smrg if test "x$supports_anon_versioning" = xyes; then 587025b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 587125b89263Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 587225b89263Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 587325b89263Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 587425b89263Smrg fi 5875ea133fd7Smrg 587625b89263Smrg case $cc_basename in 587725b89263Smrg xlf* | bgf* | bgxlf* | mpixlf*) 587825b89263Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 587925b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 588057ee1794Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 588125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 588225b89263Smrg if test "x$supports_anon_versioning" = xyes; then 588325b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 588425b89263Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 588525b89263Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 588625b89263Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 588725b89263Smrg fi 588825b89263Smrg ;; 588925b89263Smrg esac 589025b89263Smrg else 589125b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 589225b89263Smrg fi 589325b89263Smrg ;; 5894ea133fd7Smrg 589525b89263Smrg netbsd*) 589625b89263Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 589725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 589825b89263Smrg wlarc= 589925b89263Smrg else 590006f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 590106f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 590225b89263Smrg fi 590325b89263Smrg ;; 5904a253d6aeSmrg 590525b89263Smrg solaris*) 590625b89263Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 590725b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 590825b89263Smrg cat <<_LT_EOF 1>&2 5909a253d6aeSmrg 591025b89263Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 591125b89263Smrg*** create shared libraries on Solaris systems. Therefore, libtool 591225b89263Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 591325b89263Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 591425b89263Smrg*** your PATH or compiler configuration so that the native linker is 591525b89263Smrg*** used, and then restart. 5916a253d6aeSmrg 591725b89263Smrg_LT_EOF 591825b89263Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 591906f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 592006f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 592125b89263Smrg else 592225b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 592325b89263Smrg fi 592425b89263Smrg ;; 5925a253d6aeSmrg 592625b89263Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 592725b89263Smrg case `$LD -v 2>&1` in 592825b89263Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 592925b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 593025b89263Smrg cat <<_LT_EOF 1>&2 5931a253d6aeSmrg 593225b89263Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 593325b89263Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 593425b89263Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 593525b89263Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 593625b89263Smrg*** your PATH or compiler configuration so that the native linker is 593725b89263Smrg*** used, and then restart. 5938a253d6aeSmrg 593925b89263Smrg_LT_EOF 594025b89263Smrg ;; 594125b89263Smrg *) 594225b89263Smrg # For security reasons, it is highly recommended that you always 594325b89263Smrg # use absolute paths for naming shared libraries, and exclude the 594425b89263Smrg # DT_RUNPATH tag from executables and libraries. But doing so 594525b89263Smrg # requires that you compile everything twice, which is a pain. 594625b89263Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 594725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 594825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 594925b89263Smrg _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' 595025b89263Smrg else 595125b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 595225b89263Smrg fi 595325b89263Smrg ;; 595425b89263Smrg esac 595525b89263Smrg ;; 5956ea133fd7Smrg 595725b89263Smrg sunos4*) 595825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 595925b89263Smrg wlarc= 596025b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 596125b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 596225b89263Smrg ;; 5963a253d6aeSmrg 596425b89263Smrg *) 596525b89263Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 596606f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 596706f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 596825b89263Smrg else 596925b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 597025b89263Smrg fi 597125b89263Smrg ;; 597225b89263Smrg esac 5973a253d6aeSmrg 597425b89263Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 597525b89263Smrg runpath_var= 597625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 597725b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 597825b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 597925b89263Smrg fi 598025b89263Smrg else 598125b89263Smrg # PORTME fill in a description of your system's linker (not GNU ld) 598225b89263Smrg case $host_os in 598325b89263Smrg aix3*) 598425b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 598525b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 598625b89263Smrg _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' 598725b89263Smrg # Note: this linker hardcodes the directories in LIBPATH if there 598825b89263Smrg # are no directories specified by -L. 598925b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 599025b89263Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 599125b89263Smrg # Neither direct hardcoding nor static linking is supported with a 599225b89263Smrg # broken collect2. 599325b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 599425b89263Smrg fi 599525b89263Smrg ;; 5996a253d6aeSmrg 599725b89263Smrg aix[[4-9]]*) 599825b89263Smrg if test "$host_cpu" = ia64; then 599925b89263Smrg # On IA64, the linker does run time linking by default, so we don't 600025b89263Smrg # have to do anything special. 600125b89263Smrg aix_use_runtimelinking=no 600225b89263Smrg exp_sym_flag='-Bexport' 600325b89263Smrg no_entry_flag="" 600425b89263Smrg else 600525b89263Smrg # If we're using GNU nm, then we don't want the "-C" option. 600625b89263Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 600725b89263Smrg # Also, AIX nm treats weak defined symbols like other global 600825b89263Smrg # defined symbols, whereas GNU nm marks them as "W". 600925b89263Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 601025b89263Smrg _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' 601125b89263Smrg else 601225b89263Smrg _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' 601325b89263Smrg fi 601425b89263Smrg aix_use_runtimelinking=no 6015a253d6aeSmrg 601625b89263Smrg # Test if we are trying to use run time linking or normal 601725b89263Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 601825b89263Smrg # need to do runtime linking. 601925b89263Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 602025b89263Smrg for ld_flag in $LDFLAGS; do 602125b89263Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 602225b89263Smrg aix_use_runtimelinking=yes 602325b89263Smrg break 602425b89263Smrg fi 602525b89263Smrg done 602625b89263Smrg ;; 602725b89263Smrg esac 6028a253d6aeSmrg 602925b89263Smrg exp_sym_flag='-bexport' 603025b89263Smrg no_entry_flag='-bnoentry' 603125b89263Smrg fi 6032a253d6aeSmrg 603325b89263Smrg # When large executables or shared objects are built, AIX ld can 603425b89263Smrg # have problems creating the table of contents. If linking a library 603525b89263Smrg # or program results in "error TOC overflow" add -mminimal-toc to 603625b89263Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 603725b89263Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6038ea133fd7Smrg 603925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='' 604025b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 604125b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 604225b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 604325b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 604425b89263Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6045ea133fd7Smrg 604625b89263Smrg if test "$GCC" = yes; then 604725b89263Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 604825b89263Smrg # We only want to do this on AIX 4.2 and lower, the check 604925b89263Smrg # below for broken collect2 doesn't work under 4.3+ 605025b89263Smrg collect2name=`${CC} -print-prog-name=collect2` 605125b89263Smrg if test -f "$collect2name" && 605225b89263Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 605325b89263Smrg then 605425b89263Smrg # We have reworked collect2 605525b89263Smrg : 605625b89263Smrg else 605725b89263Smrg # We have old collect2 605825b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 605925b89263Smrg # It fails to find uninstalled libraries when the uninstalled 606025b89263Smrg # path is not listed in the libpath. Setting hardcode_minus_L 606125b89263Smrg # to unsupported forces relinking 606225b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 606325b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 606425b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 606525b89263Smrg fi 606625b89263Smrg ;; 606725b89263Smrg esac 606825b89263Smrg shared_flag='-shared' 606925b89263Smrg if test "$aix_use_runtimelinking" = yes; then 607025b89263Smrg shared_flag="$shared_flag "'${wl}-G' 607125b89263Smrg fi 607225b89263Smrg else 607325b89263Smrg # not using gcc 607425b89263Smrg if test "$host_cpu" = ia64; then 607525b89263Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 607625b89263Smrg # chokes on -Wl,-G. The following line is correct: 607725b89263Smrg shared_flag='-G' 607825b89263Smrg else 607925b89263Smrg if test "$aix_use_runtimelinking" = yes; then 608025b89263Smrg shared_flag='${wl}-G' 608125b89263Smrg else 608225b89263Smrg shared_flag='${wl}-bM:SRE' 608325b89263Smrg fi 608425b89263Smrg fi 608525b89263Smrg fi 6086ea133fd7Smrg 608725b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 608825b89263Smrg # It seems that -bexpall does not export symbols beginning with 608925b89263Smrg # underscore (_), so it is better to generate a list of symbols to export. 609025b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 609125b89263Smrg if test "$aix_use_runtimelinking" = yes; then 609225b89263Smrg # Warning - without using the other runtime loading flags (-brtl), 609325b89263Smrg # -berok will link without error, but may produce a broken library. 609425b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 609525b89263Smrg # Determine the default libpath from the value encoded in an 609625b89263Smrg # empty executable. 609706f32fbeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 609825b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 609925b89263Smrg _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" 610025b89263Smrg else 610125b89263Smrg if test "$host_cpu" = ia64; then 610225b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 610325b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 610425b89263Smrg _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" 610525b89263Smrg else 610625b89263Smrg # Determine the default libpath from the value encoded in an 610725b89263Smrg # empty executable. 610806f32fbeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 610925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 611025b89263Smrg # Warning - without using the other run time loading flags, 611125b89263Smrg # -berok will link without error, but may produce a broken library. 611225b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 611325b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 611425b89263Smrg if test "$with_gnu_ld" = yes; then 611525b89263Smrg # We only use this code for GNU lds that support --whole-archive. 611625b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 611725b89263Smrg else 611825b89263Smrg # Exported symbols can be pulled into shared objects from archives 611925b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 612025b89263Smrg fi 612125b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 612225b89263Smrg # This is similar to how AIX traditionally builds its shared libraries. 612325b89263Smrg _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' 612425b89263Smrg fi 612525b89263Smrg fi 612625b89263Smrg ;; 6127ea133fd7Smrg 612825b89263Smrg amigaos*) 612925b89263Smrg case $host_cpu in 613025b89263Smrg powerpc) 613125b89263Smrg # see comment about AmigaOS4 .so support 613225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 613325b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 613425b89263Smrg ;; 613525b89263Smrg m68k) 613625b89263Smrg _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)' 613725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 613825b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 613925b89263Smrg ;; 614025b89263Smrg esac 614125b89263Smrg ;; 6142ea133fd7Smrg 614325b89263Smrg bsdi[[45]]*) 614425b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 614525b89263Smrg ;; 6146a253d6aeSmrg 614725b89263Smrg cygwin* | mingw* | pw32* | cegcc*) 614825b89263Smrg # When not using gcc, we currently assume that we are using 614925b89263Smrg # Microsoft Visual C++. 615025b89263Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 615125b89263Smrg # no search path for DLLs. 615206f32fbeSmrg case $cc_basename in 615306f32fbeSmrg cl*) 615406f32fbeSmrg # Native MSVC 615506f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 615606f32fbeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 615706f32fbeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 615806f32fbeSmrg _LT_TAGVAR(file_list_spec, $1)='@' 615906f32fbeSmrg # Tell ltmain to make .lib files, not .a files. 616006f32fbeSmrg libext=lib 616106f32fbeSmrg # Tell ltmain to make .dll files, not .so files. 616206f32fbeSmrg shrext_cmds=".dll" 616306f32fbeSmrg # FIXME: Setting linknames here is a bad hack. 616406f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 616506f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 616606f32fbeSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 616706f32fbeSmrg else 616806f32fbeSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 616906f32fbeSmrg fi~ 617006f32fbeSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 617106f32fbeSmrg linknames=' 617206f32fbeSmrg # The linker will not automatically build a static lib if we build a DLL. 617306f32fbeSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 617406f32fbeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 617557ee1794Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 617606f32fbeSmrg _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' 617706f32fbeSmrg # Don't use ranlib 617806f32fbeSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 617906f32fbeSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 618006f32fbeSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 618106f32fbeSmrg case $lt_outputfile in 618206f32fbeSmrg *.exe|*.EXE) ;; 618306f32fbeSmrg *) 618406f32fbeSmrg lt_outputfile="$lt_outputfile.exe" 618506f32fbeSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 618606f32fbeSmrg ;; 618706f32fbeSmrg esac~ 618806f32fbeSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 618906f32fbeSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 619006f32fbeSmrg $RM "$lt_outputfile.manifest"; 619106f32fbeSmrg fi' 619206f32fbeSmrg ;; 619306f32fbeSmrg *) 619406f32fbeSmrg # Assume MSVC wrapper 619506f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 619606f32fbeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 619706f32fbeSmrg # Tell ltmain to make .lib files, not .a files. 619806f32fbeSmrg libext=lib 619906f32fbeSmrg # Tell ltmain to make .dll files, not .so files. 620006f32fbeSmrg shrext_cmds=".dll" 620106f32fbeSmrg # FIXME: Setting linknames here is a bad hack. 620206f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 620306f32fbeSmrg # The linker will automatically build a .lib file if we build a DLL. 620406f32fbeSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 620506f32fbeSmrg # FIXME: Should let the user specify the lib program. 620606f32fbeSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 620706f32fbeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 620806f32fbeSmrg ;; 620906f32fbeSmrg esac 621025b89263Smrg ;; 6211a253d6aeSmrg 621225b89263Smrg darwin* | rhapsody*) 621325b89263Smrg _LT_DARWIN_LINKER_FEATURES($1) 621425b89263Smrg ;; 6215a253d6aeSmrg 621625b89263Smrg dgux*) 621725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 621825b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 621925b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 622025b89263Smrg ;; 6221a253d6aeSmrg 622225b89263Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 622325b89263Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 622425b89263Smrg # does not break anything, and helps significantly (at the cost of a little 622525b89263Smrg # extra space). 622625b89263Smrg freebsd2.2*) 622725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 622825b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 622925b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 623025b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 623125b89263Smrg ;; 6232a253d6aeSmrg 623325b89263Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 623457ee1794Smrg freebsd2.*) 623525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 623625b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 623725b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 623825b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 623925b89263Smrg ;; 6240ea133fd7Smrg 624125b89263Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 624225b89263Smrg freebsd* | dragonfly*) 624306f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 624425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 624525b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 624625b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 624725b89263Smrg ;; 6248ea133fd7Smrg 624925b89263Smrg hpux9*) 625025b89263Smrg if test "$GCC" = yes; then 625106f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 625225b89263Smrg else 625325b89263Smrg _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' 625425b89263Smrg fi 625525b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 625625b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 625725b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6258ea133fd7Smrg 625925b89263Smrg # hardcode_minus_L: Not really in the search PATH, 626025b89263Smrg # but as the default location of the library. 626125b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 626225b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 626325b89263Smrg ;; 6264ea133fd7Smrg 626525b89263Smrg hpux10*) 626625b89263Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 626706f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 626825b89263Smrg else 626925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 627025b89263Smrg fi 627125b89263Smrg if test "$with_gnu_ld" = no; then 627225b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 627325b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 627425b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 627525b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 627625b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 627725b89263Smrg # hardcode_minus_L: Not really in the search PATH, 627825b89263Smrg # but as the default location of the library. 627925b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 628025b89263Smrg fi 628125b89263Smrg ;; 6282a253d6aeSmrg 628325b89263Smrg hpux11*) 628425b89263Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 628525b89263Smrg case $host_cpu in 628625b89263Smrg hppa*64*) 628725b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 628825b89263Smrg ;; 628925b89263Smrg ia64*) 629006f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 629125b89263Smrg ;; 629225b89263Smrg *) 629306f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 629425b89263Smrg ;; 629525b89263Smrg esac 629625b89263Smrg else 629725b89263Smrg case $host_cpu in 629825b89263Smrg hppa*64*) 629925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 630025b89263Smrg ;; 630125b89263Smrg ia64*) 630225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 630325b89263Smrg ;; 630425b89263Smrg *) 630525b89263Smrg m4_if($1, [], [ 630625b89263Smrg # Older versions of the 11.00 compiler do not understand -b yet 630725b89263Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 630825b89263Smrg _LT_LINKER_OPTION([if $CC understands -b], 630925b89263Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 631025b89263Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 631125b89263Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 631225b89263Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 631325b89263Smrg ;; 631425b89263Smrg esac 631525b89263Smrg fi 631625b89263Smrg if test "$with_gnu_ld" = no; then 631725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 631825b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6319a253d6aeSmrg 632025b89263Smrg case $host_cpu in 632125b89263Smrg hppa*64*|ia64*) 632225b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 632325b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 632425b89263Smrg ;; 632525b89263Smrg *) 632625b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 632725b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 632825b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6329a253d6aeSmrg 633025b89263Smrg # hardcode_minus_L: Not really in the search PATH, 633125b89263Smrg # but as the default location of the library. 633225b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 633325b89263Smrg ;; 633425b89263Smrg esac 633525b89263Smrg fi 633625b89263Smrg ;; 6337a253d6aeSmrg 633825b89263Smrg irix5* | irix6* | nonstopux*) 633925b89263Smrg if test "$GCC" = yes; then 634006f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_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' 634125b89263Smrg # Try to use the -exported_symbol ld option, if it does not 634225b89263Smrg # work, assume that -exports_file does not work either and 634325b89263Smrg # implicitly export all symbols. 634406f32fbeSmrg # This should be the same for all languages, so no per-tag cache variable. 634506f32fbeSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 634606f32fbeSmrg [lt_cv_irix_exported_symbol], 634706f32fbeSmrg [save_LDFLAGS="$LDFLAGS" 634806f32fbeSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 634906f32fbeSmrg AC_LINK_IFELSE( 635006f32fbeSmrg [AC_LANG_SOURCE( 635106f32fbeSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 635206f32fbeSmrg [C++], [[int foo (void) { return 0; }]], 635306f32fbeSmrg [Fortran 77], [[ 635406f32fbeSmrg subroutine foo 635506f32fbeSmrg end]], 635606f32fbeSmrg [Fortran], [[ 635706f32fbeSmrg subroutine foo 635806f32fbeSmrg end]])])], 635906f32fbeSmrg [lt_cv_irix_exported_symbol=yes], 636006f32fbeSmrg [lt_cv_irix_exported_symbol=no]) 636106f32fbeSmrg LDFLAGS="$save_LDFLAGS"]) 636206f32fbeSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 636306f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_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 ${wl}-exports_file ${wl}$export_symbols -o $lib' 636406f32fbeSmrg fi 636525b89263Smrg else 636625b89263Smrg _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' 636725b89263Smrg _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' 636825b89263Smrg fi 636925b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 637025b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 637125b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 637225b89263Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 637325b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 637425b89263Smrg ;; 6375a253d6aeSmrg 637625b89263Smrg netbsd*) 637725b89263Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 637825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 637925b89263Smrg else 638025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 638125b89263Smrg fi 638225b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 638325b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 638425b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 638525b89263Smrg ;; 6386a253d6aeSmrg 638725b89263Smrg newsos6) 638825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 638925b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 639025b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 639125b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 639225b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 639325b89263Smrg ;; 6394a253d6aeSmrg 639525b89263Smrg *nto* | *qnx*) 639625b89263Smrg ;; 6397a253d6aeSmrg 639825b89263Smrg openbsd*) 639925b89263Smrg if test -f /usr/libexec/ld.so; then 640025b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 640125b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 640225b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 640325b89263Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 640425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 640525b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 640625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 640725b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 640825b89263Smrg else 640925b89263Smrg case $host_os in 641025b89263Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 641125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 641225b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 641325b89263Smrg ;; 641425b89263Smrg *) 641525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 641625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 641725b89263Smrg ;; 641825b89263Smrg esac 6419ea133fd7Smrg fi 642025b89263Smrg else 642125b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 642225b89263Smrg fi 642325b89263Smrg ;; 6424ea133fd7Smrg 642525b89263Smrg os2*) 642625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 642725b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 642825b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 642925b89263Smrg _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' 643025b89263Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 643125b89263Smrg ;; 6432ea133fd7Smrg 643325b89263Smrg osf3*) 643425b89263Smrg if test "$GCC" = yes; then 643525b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 643625b89263Smrg _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' 643725b89263Smrg else 643825b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 643925b89263Smrg _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' 644025b89263Smrg fi 644125b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 644225b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 644325b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 644425b89263Smrg ;; 6445ea133fd7Smrg 644625b89263Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 644725b89263Smrg if test "$GCC" = yes; then 644825b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 644906f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_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' 645025b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 645125b89263Smrg else 645225b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 645325b89263Smrg _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' 645425b89263Smrg _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~ 645525b89263Smrg $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' 6456ea133fd7Smrg 645725b89263Smrg # Both c and cxx compiler support -rpath directly 645825b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 645925b89263Smrg fi 646025b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 646125b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 646225b89263Smrg ;; 6463ea133fd7Smrg 646425b89263Smrg solaris*) 646525b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 646625b89263Smrg if test "$GCC" = yes; then 646725b89263Smrg wlarc='${wl}' 646806f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 646925b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 647006f32fbeSmrg $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 647125b89263Smrg else 647225b89263Smrg case `$CC -V 2>&1` in 647325b89263Smrg *"Compilers 5.0"*) 647425b89263Smrg wlarc='' 647525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 647625b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 647725b89263Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 647825b89263Smrg ;; 647925b89263Smrg *) 648025b89263Smrg wlarc='${wl}' 648125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 648225b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 648325b89263Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 648425b89263Smrg ;; 648525b89263Smrg esac 648625b89263Smrg fi 648725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 648825b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 648925b89263Smrg case $host_os in 649025b89263Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 649125b89263Smrg *) 649225b89263Smrg # The compiler driver will combine and reorder linker options, 649325b89263Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 649425b89263Smrg # but is careful enough not to reorder. 649525b89263Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 649625b89263Smrg if test "$GCC" = yes; then 649725b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 649825b89263Smrg else 649925b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 650025b89263Smrg fi 650125b89263Smrg ;; 650225b89263Smrg esac 650325b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 650425b89263Smrg ;; 6505a253d6aeSmrg 650625b89263Smrg sunos4*) 650725b89263Smrg if test "x$host_vendor" = xsequent; then 650825b89263Smrg # Use $CC to link under sequent, because it throws in some extra .o 650925b89263Smrg # files that make .init and .fini sections work. 651025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 651125b89263Smrg else 651225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 651325b89263Smrg fi 651425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 651525b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 651625b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 651725b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 651825b89263Smrg ;; 6519a253d6aeSmrg 652025b89263Smrg sysv4) 652125b89263Smrg case $host_vendor in 652225b89263Smrg sni) 652325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 652425b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 652525b89263Smrg ;; 652625b89263Smrg siemens) 652725b89263Smrg ## LD is ld it makes a PLAMLIB 652825b89263Smrg ## CC just makes a GrossModule. 652925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 653025b89263Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 653125b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 653225b89263Smrg ;; 653325b89263Smrg motorola) 653425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 653525b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 653625b89263Smrg ;; 653725b89263Smrg esac 653825b89263Smrg runpath_var='LD_RUN_PATH' 653925b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 654025b89263Smrg ;; 6541a253d6aeSmrg 654225b89263Smrg sysv4.3*) 654325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 654425b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 654525b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 654625b89263Smrg ;; 6547a253d6aeSmrg 654825b89263Smrg sysv4*MP*) 654925b89263Smrg if test -d /usr/nec; then 655025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 655125b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 655225b89263Smrg runpath_var=LD_RUN_PATH 655325b89263Smrg hardcode_runpath_var=yes 655425b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 655525b89263Smrg fi 655625b89263Smrg ;; 6557ea133fd7Smrg 655825b89263Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 655925b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 656025b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 656125b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 656225b89263Smrg runpath_var='LD_RUN_PATH' 6563a253d6aeSmrg 656425b89263Smrg if test "$GCC" = yes; then 656525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 656625b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 656725b89263Smrg else 656825b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 656925b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 657025b89263Smrg fi 657125b89263Smrg ;; 6572a253d6aeSmrg 657325b89263Smrg sysv5* | sco3.2v5* | sco5v6*) 657425b89263Smrg # Note: We can NOT use -z defs as we might desire, because we do not 657525b89263Smrg # link with -lc, and that would cause any symbols used from libc to 657625b89263Smrg # always be unresolved, which means just about no library would 657725b89263Smrg # ever link correctly. If we're not using GNU ld we use -z text 657825b89263Smrg # though, which does catch some bad symbols but isn't as heavy-handed 657925b89263Smrg # as -z defs. 658025b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 658125b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 658225b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 658325b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 658425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 658525b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 658625b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 658725b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 658825b89263Smrg runpath_var='LD_RUN_PATH' 6589a253d6aeSmrg 659025b89263Smrg if test "$GCC" = yes; then 659125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659225b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659325b89263Smrg else 659425b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659525b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659625b89263Smrg fi 659725b89263Smrg ;; 6598a253d6aeSmrg 659925b89263Smrg uts4*) 660025b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 660125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 660225b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 660325b89263Smrg ;; 6604a253d6aeSmrg 660525b89263Smrg *) 660625b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 660725b89263Smrg ;; 660825b89263Smrg esac 6609ea133fd7Smrg 661025b89263Smrg if test x$host_vendor = xsni; then 661125b89263Smrg case $host in 661225b89263Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 661325b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 661425b89263Smrg ;; 661525b89263Smrg esac 661625b89263Smrg fi 661725b89263Smrg fi 661825b89263Smrg]) 661925b89263SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 662025b89263Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6621ea133fd7Smrg 662225b89263Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6623ea133fd7Smrg 662425b89263Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 662525b89263Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 662625b89263Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 662725b89263Smrg [The commands to extract the exported symbol list from a shared archive]) 6628ea133fd7Smrg 662925b89263Smrg# 663025b89263Smrg# Do we need to explicitly link libc? 663125b89263Smrg# 663225b89263Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 663325b89263Smrgx|xyes) 663425b89263Smrg # Assume -lc should be added 663525b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6636a253d6aeSmrg 663725b89263Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 663825b89263Smrg case $_LT_TAGVAR(archive_cmds, $1) in 663925b89263Smrg *'~'*) 664025b89263Smrg # FIXME: we may have to deal with multi-command sequences. 664125b89263Smrg ;; 664225b89263Smrg '$CC '*) 664325b89263Smrg # Test whether the compiler implicitly links with -lc since on some 664425b89263Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 664525b89263Smrg # to ld, don't add -lc before -lgcc. 664625b89263Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 664725b89263Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 664825b89263Smrg [$RM conftest* 664925b89263Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 665025b89263Smrg 665125b89263Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 665225b89263Smrg soname=conftest 665325b89263Smrg lib=conftest 665425b89263Smrg libobjs=conftest.$ac_objext 665525b89263Smrg deplibs= 665625b89263Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 665725b89263Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 665825b89263Smrg compiler_flags=-v 665925b89263Smrg linker_flags=-v 666025b89263Smrg verstring= 666125b89263Smrg output_objdir=. 666225b89263Smrg libname=conftest 666325b89263Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 666425b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 666525b89263Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 666625b89263Smrg then 666725b89263Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 666825b89263Smrg else 666925b89263Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 667025b89263Smrg fi 667125b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 667225b89263Smrg else 667325b89263Smrg cat conftest.err 1>&5 667425b89263Smrg fi 667525b89263Smrg $RM conftest* 667625b89263Smrg ]) 667725b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 667825b89263Smrg ;; 667925b89263Smrg esac 668025b89263Smrg fi 668125b89263Smrg ;; 668225b89263Smrgesac 6683a253d6aeSmrg 668425b89263Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 668525b89263Smrg [Whether or not to add -lc for building shared libraries]) 668625b89263Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 668725b89263Smrg [enable_shared_with_static_runtimes], [0], 668825b89263Smrg [Whether or not to disallow shared libs when runtime libs are static]) 668925b89263Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 669025b89263Smrg [Compiler flag to allow reflexive dlopens]) 669125b89263Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 669225b89263Smrg [Compiler flag to generate shared objects directly from archives]) 669325b89263Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 669425b89263Smrg [Whether the compiler copes with passing no objects directly]) 669525b89263Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 669625b89263Smrg [Create an old-style archive from a shared archive]) 669725b89263Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 669825b89263Smrg [Create a temporary old-style archive to link instead of a shared archive]) 669925b89263Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 670025b89263Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 670125b89263Smrg_LT_TAGDECL([], [module_cmds], [2], 670225b89263Smrg [Commands used to build a loadable module if different from building 670325b89263Smrg a shared archive.]) 670425b89263Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 670525b89263Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 670625b89263Smrg [Whether we are building with GNU ld or not]) 670725b89263Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 670825b89263Smrg [Flag that allows shared libraries with undefined symbols to be built]) 670925b89263Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 671025b89263Smrg [Flag that enforces no undefined symbols]) 671125b89263Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 671225b89263Smrg [Flag to hardcode $libdir into a binary during linking. 671325b89263Smrg This must work even if $libdir does not exist]) 671425b89263Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 671525b89263Smrg [Whether we need a single "-rpath" flag with a separated argument]) 671625b89263Smrg_LT_TAGDECL([], [hardcode_direct], [0], 671725b89263Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 671825b89263Smrg DIR into the resulting binary]) 671925b89263Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 672025b89263Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 672125b89263Smrg DIR into the resulting binary and the resulting library dependency is 672225b89263Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 672325b89263Smrg library is relocated]) 672425b89263Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 672525b89263Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 672625b89263Smrg into the resulting binary]) 672725b89263Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 672825b89263Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 672925b89263Smrg into the resulting binary]) 673025b89263Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 673125b89263Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 673225b89263Smrg into the library and all subsequent libraries and executables linked 673325b89263Smrg against it]) 673425b89263Smrg_LT_TAGDECL([], [inherit_rpath], [0], 673525b89263Smrg [Set to yes if linker adds runtime paths of dependent libraries 673625b89263Smrg to runtime path list]) 673725b89263Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 673825b89263Smrg [Whether libtool must link a program against all its dependency libraries]) 673925b89263Smrg_LT_TAGDECL([], [always_export_symbols], [0], 674025b89263Smrg [Set to "yes" if exported symbols are required]) 674125b89263Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 674225b89263Smrg [The commands to list exported symbols]) 674325b89263Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 674425b89263Smrg [Symbols that should not be listed in the preloaded symbols]) 674525b89263Smrg_LT_TAGDECL([], [include_expsyms], [1], 674625b89263Smrg [Symbols that must always be exported]) 674725b89263Smrg_LT_TAGDECL([], [prelink_cmds], [2], 674825b89263Smrg [Commands necessary for linking programs (against libraries) with templates]) 674906f32fbeSmrg_LT_TAGDECL([], [postlink_cmds], [2], 675006f32fbeSmrg [Commands necessary for finishing linking programs]) 675125b89263Smrg_LT_TAGDECL([], [file_list_spec], [1], 675225b89263Smrg [Specify filename containing input files]) 675325b89263Smrgdnl FIXME: Not yet implemented 675425b89263Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 675525b89263Smrgdnl [Compiler flag to generate thread safe objects]) 675625b89263Smrg])# _LT_LINKER_SHLIBS 6757a253d6aeSmrg 6758a253d6aeSmrg 675925b89263Smrg# _LT_LANG_C_CONFIG([TAG]) 676025b89263Smrg# ------------------------ 676125b89263Smrg# Ensure that the configuration variables for a C compiler are suitably 676225b89263Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 676325b89263Smrg# the compiler configuration to `libtool'. 676425b89263Smrgm4_defun([_LT_LANG_C_CONFIG], 676525b89263Smrg[m4_require([_LT_DECL_EGREP])dnl 676625b89263Smrglt_save_CC="$CC" 676725b89263SmrgAC_LANG_PUSH(C) 6768a253d6aeSmrg 676925b89263Smrg# Source file extension for C test sources. 677025b89263Smrgac_ext=c 6771a253d6aeSmrg 677225b89263Smrg# Object file extension for compiled C test sources. 6773ea133fd7Smrgobjext=o 6774ea133fd7Smrg_LT_TAGVAR(objext, $1)=$objext 6775a253d6aeSmrg 6776ea133fd7Smrg# Code to be used in simple compile tests 677725b89263Smrglt_simple_compile_test_code="int some_variable = 0;" 6778a253d6aeSmrg 6779ea133fd7Smrg# Code to be used in simple link tests 678025b89263Smrglt_simple_link_test_code='int main(){return(0);}' 6781a253d6aeSmrg 6782ea133fd7Smrg_LT_TAG_COMPILER 678325b89263Smrg# Save the default compiler, since it gets overwritten when the other 678425b89263Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 678525b89263Smrgcompiler_DEFAULT=$CC 6786a253d6aeSmrg 6787ea133fd7Smrg# save warnings/boilerplate of simple test code 6788ea133fd7Smrg_LT_COMPILER_BOILERPLATE 6789ea133fd7Smrg_LT_LINKER_BOILERPLATE 6790a253d6aeSmrg 6791ea133fd7Smrgif test -n "$compiler"; then 679225b89263Smrg _LT_COMPILER_NO_RTTI($1) 679325b89263Smrg _LT_COMPILER_PIC($1) 679425b89263Smrg _LT_COMPILER_C_O($1) 679525b89263Smrg _LT_COMPILER_FILE_LOCKS($1) 679625b89263Smrg _LT_LINKER_SHLIBS($1) 679725b89263Smrg _LT_SYS_DYNAMIC_LINKER($1) 679825b89263Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 679925b89263Smrg LT_SYS_DLOPEN_SELF 680025b89263Smrg _LT_CMD_STRIPLIB 6801ea133fd7Smrg 680225b89263Smrg # Report which library types will actually be built 680325b89263Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 680425b89263Smrg AC_MSG_RESULT([$can_build_shared]) 6805ea133fd7Smrg 680625b89263Smrg AC_MSG_CHECKING([whether to build shared libraries]) 680725b89263Smrg test "$can_build_shared" = "no" && enable_shared=no 6808ea133fd7Smrg 680925b89263Smrg # On AIX, shared libraries and static libraries use the same namespace, and 681025b89263Smrg # are all built from PIC. 681125b89263Smrg case $host_os in 681225b89263Smrg aix3*) 681325b89263Smrg test "$enable_shared" = yes && enable_static=no 681425b89263Smrg if test -n "$RANLIB"; then 681525b89263Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 681625b89263Smrg postinstall_cmds='$RANLIB $lib' 681725b89263Smrg fi 681825b89263Smrg ;; 6819ea133fd7Smrg 682025b89263Smrg aix[[4-9]]*) 682125b89263Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 682225b89263Smrg test "$enable_shared" = yes && enable_static=no 682325b89263Smrg fi 682425b89263Smrg ;; 6825ea133fd7Smrg esac 682625b89263Smrg AC_MSG_RESULT([$enable_shared]) 6827ea133fd7Smrg 682825b89263Smrg AC_MSG_CHECKING([whether to build static libraries]) 682925b89263Smrg # Make sure either enable_shared or enable_static is yes. 683025b89263Smrg test "$enable_shared" = yes || enable_static=yes 683125b89263Smrg AC_MSG_RESULT([$enable_static]) 6832ea133fd7Smrg 683325b89263Smrg _LT_CONFIG($1) 683425b89263Smrgfi 683525b89263SmrgAC_LANG_POP 683625b89263SmrgCC="$lt_save_CC" 683725b89263Smrg])# _LT_LANG_C_CONFIG 6838ea133fd7Smrg 6839ea133fd7Smrg 684025b89263Smrg# _LT_LANG_CXX_CONFIG([TAG]) 684125b89263Smrg# -------------------------- 684225b89263Smrg# Ensure that the configuration variables for a C++ compiler are suitably 684325b89263Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 684425b89263Smrg# the compiler configuration to `libtool'. 684525b89263Smrgm4_defun([_LT_LANG_CXX_CONFIG], 684625b89263Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 684725b89263Smrgm4_require([_LT_DECL_EGREP])dnl 684806f32fbeSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 684925b89263Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 685025b89263Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 685125b89263Smrg (test "X$CXX" != "Xg++"))) ; then 685225b89263Smrg AC_PROG_CXXCPP 685325b89263Smrgelse 685425b89263Smrg _lt_caught_CXX_error=yes 685525b89263Smrgfi 6856ea133fd7Smrg 685725b89263SmrgAC_LANG_PUSH(C++) 685825b89263Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 685925b89263Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 686025b89263Smrg_LT_TAGVAR(always_export_symbols, $1)=no 686125b89263Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 686225b89263Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 686325b89263Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 686425b89263Smrg_LT_TAGVAR(hardcode_direct, $1)=no 686525b89263Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 686625b89263Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 686725b89263Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 686825b89263Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 686925b89263Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 687025b89263Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 687125b89263Smrg_LT_TAGVAR(inherit_rpath, $1)=no 687225b89263Smrg_LT_TAGVAR(module_cmds, $1)= 687325b89263Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 687425b89263Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 687525b89263Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 687625b89263Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 687725b89263Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 687825b89263Smrg_LT_TAGVAR(no_undefined_flag, $1)= 687925b89263Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 688025b89263Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6881ea133fd7Smrg 688225b89263Smrg# Source file extension for C++ test sources. 688325b89263Smrgac_ext=cpp 6884ea133fd7Smrg 688525b89263Smrg# Object file extension for compiled C++ test sources. 688625b89263Smrgobjext=o 688725b89263Smrg_LT_TAGVAR(objext, $1)=$objext 6888ea133fd7Smrg 688925b89263Smrg# No sense in running all these tests if we already determined that 689025b89263Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 689125b89263Smrg# are currently assumed to apply to all compilers on this platform, 689225b89263Smrg# and will be corrupted by setting them based on a non-working compiler. 689325b89263Smrgif test "$_lt_caught_CXX_error" != yes; then 689425b89263Smrg # Code to be used in simple compile tests 689525b89263Smrg lt_simple_compile_test_code="int some_variable = 0;" 6896ea133fd7Smrg 689725b89263Smrg # Code to be used in simple link tests 689825b89263Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6899ea133fd7Smrg 690025b89263Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 690125b89263Smrg _LT_TAG_COMPILER 6902ea133fd7Smrg 690325b89263Smrg # save warnings/boilerplate of simple test code 690425b89263Smrg _LT_COMPILER_BOILERPLATE 690525b89263Smrg _LT_LINKER_BOILERPLATE 6906ea133fd7Smrg 690725b89263Smrg # Allow CC to be a program name with arguments. 690825b89263Smrg lt_save_CC=$CC 690906f32fbeSmrg lt_save_CFLAGS=$CFLAGS 691025b89263Smrg lt_save_LD=$LD 691125b89263Smrg lt_save_GCC=$GCC 691225b89263Smrg GCC=$GXX 691325b89263Smrg lt_save_with_gnu_ld=$with_gnu_ld 691425b89263Smrg lt_save_path_LD=$lt_cv_path_LD 691525b89263Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 691625b89263Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 691725b89263Smrg else 691825b89263Smrg $as_unset lt_cv_prog_gnu_ld 691925b89263Smrg fi 692025b89263Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 692125b89263Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 692225b89263Smrg else 692325b89263Smrg $as_unset lt_cv_path_LD 692425b89263Smrg fi 692525b89263Smrg test -z "${LDCXX+set}" || LD=$LDCXX 692625b89263Smrg CC=${CXX-"c++"} 692706f32fbeSmrg CFLAGS=$CXXFLAGS 692825b89263Smrg compiler=$CC 692925b89263Smrg _LT_TAGVAR(compiler, $1)=$CC 693025b89263Smrg _LT_CC_BASENAME([$compiler]) 6931ea133fd7Smrg 693225b89263Smrg if test -n "$compiler"; then 693325b89263Smrg # We don't want -fno-exception when compiling C++ code, so set the 693425b89263Smrg # no_builtin_flag separately 693525b89263Smrg if test "$GXX" = yes; then 693625b89263Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 693725b89263Smrg else 693825b89263Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 693925b89263Smrg fi 6940ea133fd7Smrg 694125b89263Smrg if test "$GXX" = yes; then 694225b89263Smrg # Set up default GNU C++ configuration 6943ea133fd7Smrg 694425b89263Smrg LT_PATH_LD 6945ea133fd7Smrg 694625b89263Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 694725b89263Smrg # archiving commands below assume that GNU ld is being used. 694825b89263Smrg if test "$with_gnu_ld" = yes; then 694906f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 695006f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 6951ea133fd7Smrg 695225b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 695325b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6954ea133fd7Smrg 695525b89263Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 695625b89263Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 695725b89263Smrg # investigate it a little bit more. (MM) 695825b89263Smrg wlarc='${wl}' 6959ea133fd7Smrg 696025b89263Smrg # ancient GNU ld didn't support --whole-archive et. al. 696125b89263Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 696225b89263Smrg $GREP 'no-whole-archive' > /dev/null; then 696325b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 696425b89263Smrg else 696525b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 696625b89263Smrg fi 696725b89263Smrg else 696825b89263Smrg with_gnu_ld=no 696925b89263Smrg wlarc= 6970ea133fd7Smrg 697125b89263Smrg # A generic and very simple default shared library creation 697225b89263Smrg # command for GNU C++ for the case where it uses the native 697325b89263Smrg # linker, instead of GNU ld. If possible, this setting should 697425b89263Smrg # overridden to take advantage of the native linker features on 697525b89263Smrg # the platform it is being used on. 697625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 697725b89263Smrg fi 6978ea133fd7Smrg 697925b89263Smrg # Commands to make compiler produce verbose output that lists 698025b89263Smrg # what "hidden" libraries, object files and flags are used when 698125b89263Smrg # linking a shared library. 698225b89263Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6983ea133fd7Smrg 698425b89263Smrg else 698525b89263Smrg GXX=no 698625b89263Smrg with_gnu_ld=no 698725b89263Smrg wlarc= 698825b89263Smrg fi 6989ea133fd7Smrg 699025b89263Smrg # PORTME: fill in a description of your system's C++ link characteristics 699125b89263Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 699225b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 699325b89263Smrg case $host_os in 699425b89263Smrg aix3*) 699525b89263Smrg # FIXME: insert proper C++ library support 699625b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 699725b89263Smrg ;; 699825b89263Smrg aix[[4-9]]*) 699925b89263Smrg if test "$host_cpu" = ia64; then 700025b89263Smrg # On IA64, the linker does run time linking by default, so we don't 700125b89263Smrg # have to do anything special. 700225b89263Smrg aix_use_runtimelinking=no 700325b89263Smrg exp_sym_flag='-Bexport' 700425b89263Smrg no_entry_flag="" 700525b89263Smrg else 700625b89263Smrg aix_use_runtimelinking=no 7007ea133fd7Smrg 700825b89263Smrg # Test if we are trying to use run time linking or normal 700925b89263Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 701025b89263Smrg # need to do runtime linking. 701125b89263Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 701225b89263Smrg for ld_flag in $LDFLAGS; do 701325b89263Smrg case $ld_flag in 701425b89263Smrg *-brtl*) 701525b89263Smrg aix_use_runtimelinking=yes 701625b89263Smrg break 701725b89263Smrg ;; 701825b89263Smrg esac 701925b89263Smrg done 702025b89263Smrg ;; 702125b89263Smrg esac 7022ea133fd7Smrg 702325b89263Smrg exp_sym_flag='-bexport' 702425b89263Smrg no_entry_flag='-bnoentry' 702525b89263Smrg fi 7026ea133fd7Smrg 702725b89263Smrg # When large executables or shared objects are built, AIX ld can 702825b89263Smrg # have problems creating the table of contents. If linking a library 702925b89263Smrg # or program results in "error TOC overflow" add -mminimal-toc to 703025b89263Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 703125b89263Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7032ea133fd7Smrg 703325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='' 703425b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 703525b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 703625b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 703725b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 703825b89263Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7039ea133fd7Smrg 704025b89263Smrg if test "$GXX" = yes; then 704125b89263Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 704225b89263Smrg # We only want to do this on AIX 4.2 and lower, the check 704325b89263Smrg # below for broken collect2 doesn't work under 4.3+ 704425b89263Smrg collect2name=`${CC} -print-prog-name=collect2` 704525b89263Smrg if test -f "$collect2name" && 704625b89263Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 704725b89263Smrg then 704825b89263Smrg # We have reworked collect2 704925b89263Smrg : 705025b89263Smrg else 705125b89263Smrg # We have old collect2 705225b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 705325b89263Smrg # It fails to find uninstalled libraries when the uninstalled 705425b89263Smrg # path is not listed in the libpath. Setting hardcode_minus_L 705525b89263Smrg # to unsupported forces relinking 705625b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 705725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 705825b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 705925b89263Smrg fi 706025b89263Smrg esac 706125b89263Smrg shared_flag='-shared' 706225b89263Smrg if test "$aix_use_runtimelinking" = yes; then 706325b89263Smrg shared_flag="$shared_flag "'${wl}-G' 706425b89263Smrg fi 706525b89263Smrg else 706625b89263Smrg # not using gcc 706725b89263Smrg if test "$host_cpu" = ia64; then 706825b89263Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 706925b89263Smrg # chokes on -Wl,-G. The following line is correct: 707025b89263Smrg shared_flag='-G' 707125b89263Smrg else 707225b89263Smrg if test "$aix_use_runtimelinking" = yes; then 707325b89263Smrg shared_flag='${wl}-G' 707425b89263Smrg else 707525b89263Smrg shared_flag='${wl}-bM:SRE' 707625b89263Smrg fi 707725b89263Smrg fi 707825b89263Smrg fi 7079ea133fd7Smrg 708025b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 708125b89263Smrg # It seems that -bexpall does not export symbols beginning with 708225b89263Smrg # underscore (_), so it is better to generate a list of symbols to 708325b89263Smrg # export. 708425b89263Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 708525b89263Smrg if test "$aix_use_runtimelinking" = yes; then 708625b89263Smrg # Warning - without using the other runtime loading flags (-brtl), 708725b89263Smrg # -berok will link without error, but may produce a broken library. 708825b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 708925b89263Smrg # Determine the default libpath from the value encoded in an empty 709025b89263Smrg # executable. 709106f32fbeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 709225b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7093ea133fd7Smrg 709425b89263Smrg _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" 709525b89263Smrg else 709625b89263Smrg if test "$host_cpu" = ia64; then 709725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 709825b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 709925b89263Smrg _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" 710025b89263Smrg else 710125b89263Smrg # Determine the default libpath from the value encoded in an 710225b89263Smrg # empty executable. 710306f32fbeSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 710425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 710525b89263Smrg # Warning - without using the other run time loading flags, 710625b89263Smrg # -berok will link without error, but may produce a broken library. 710725b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 710825b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 710925b89263Smrg if test "$with_gnu_ld" = yes; then 711025b89263Smrg # We only use this code for GNU lds that support --whole-archive. 711125b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 711225b89263Smrg else 711325b89263Smrg # Exported symbols can be pulled into shared objects from archives 711425b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 711525b89263Smrg fi 711625b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 711725b89263Smrg # This is similar to how AIX traditionally builds its shared 711825b89263Smrg # libraries. 711925b89263Smrg _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' 712025b89263Smrg fi 712125b89263Smrg fi 712225b89263Smrg ;; 7123ea133fd7Smrg 712425b89263Smrg beos*) 712525b89263Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 712625b89263Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 712725b89263Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 712825b89263Smrg # support --undefined. This deserves some investigation. FIXME 712925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 713025b89263Smrg else 713125b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 713225b89263Smrg fi 713325b89263Smrg ;; 7134ea133fd7Smrg 713525b89263Smrg chorus*) 713625b89263Smrg case $cc_basename in 713725b89263Smrg *) 713825b89263Smrg # FIXME: insert proper C++ library support 713925b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 714025b89263Smrg ;; 714125b89263Smrg esac 714225b89263Smrg ;; 7143ea133fd7Smrg 714425b89263Smrg cygwin* | mingw* | pw32* | cegcc*) 714506f32fbeSmrg case $GXX,$cc_basename in 714606f32fbeSmrg ,cl* | no,cl*) 714706f32fbeSmrg # Native MSVC 714806f32fbeSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 714906f32fbeSmrg # no search path for DLLs. 715006f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 715106f32fbeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 715206f32fbeSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 715306f32fbeSmrg _LT_TAGVAR(file_list_spec, $1)='@' 715406f32fbeSmrg # Tell ltmain to make .lib files, not .a files. 715506f32fbeSmrg libext=lib 715606f32fbeSmrg # Tell ltmain to make .dll files, not .so files. 715706f32fbeSmrg shrext_cmds=".dll" 715806f32fbeSmrg # FIXME: Setting linknames here is a bad hack. 715906f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 716006f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 716106f32fbeSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 716206f32fbeSmrg else 716306f32fbeSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 716406f32fbeSmrg fi~ 716506f32fbeSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 716606f32fbeSmrg linknames=' 716706f32fbeSmrg # The linker will not automatically build a static lib if we build a DLL. 716806f32fbeSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 716906f32fbeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 717006f32fbeSmrg # Don't use ranlib 717106f32fbeSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 717206f32fbeSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 717306f32fbeSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 717406f32fbeSmrg case $lt_outputfile in 717506f32fbeSmrg *.exe|*.EXE) ;; 717606f32fbeSmrg *) 717706f32fbeSmrg lt_outputfile="$lt_outputfile.exe" 717806f32fbeSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 717906f32fbeSmrg ;; 718006f32fbeSmrg esac~ 718106f32fbeSmrg func_to_tool_file "$lt_outputfile"~ 718206f32fbeSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 718306f32fbeSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 718406f32fbeSmrg $RM "$lt_outputfile.manifest"; 718506f32fbeSmrg fi' 718606f32fbeSmrg ;; 718706f32fbeSmrg *) 718806f32fbeSmrg # g++ 718906f32fbeSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 719006f32fbeSmrg # as there is no search path for DLLs. 719106f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 719206f32fbeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 719306f32fbeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 719406f32fbeSmrg _LT_TAGVAR(always_export_symbols, $1)=no 719506f32fbeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 719606f32fbeSmrg 719706f32fbeSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 719806f32fbeSmrg _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' 719906f32fbeSmrg # If the export-symbols file already is a .def file (1st line 720006f32fbeSmrg # is EXPORTS), use it as is; otherwise, prepend... 720106f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 720206f32fbeSmrg cp $export_symbols $output_objdir/$soname.def; 720306f32fbeSmrg else 720406f32fbeSmrg echo EXPORTS > $output_objdir/$soname.def; 720506f32fbeSmrg cat $export_symbols >> $output_objdir/$soname.def; 720606f32fbeSmrg fi~ 720706f32fbeSmrg $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' 720806f32fbeSmrg else 720906f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 721006f32fbeSmrg fi 721106f32fbeSmrg ;; 721206f32fbeSmrg esac 721306f32fbeSmrg ;; 721425b89263Smrg darwin* | rhapsody*) 721525b89263Smrg _LT_DARWIN_LINKER_FEATURES($1) 721625b89263Smrg ;; 7217ea133fd7Smrg 721825b89263Smrg dgux*) 721925b89263Smrg case $cc_basename in 722025b89263Smrg ec++*) 722125b89263Smrg # FIXME: insert proper C++ library support 722225b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 722325b89263Smrg ;; 722425b89263Smrg ghcx*) 722525b89263Smrg # Green Hills C++ Compiler 722625b89263Smrg # FIXME: insert proper C++ library support 722725b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 722825b89263Smrg ;; 722925b89263Smrg *) 723025b89263Smrg # FIXME: insert proper C++ library support 723125b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723225b89263Smrg ;; 723325b89263Smrg esac 723425b89263Smrg ;; 7235ea133fd7Smrg 723657ee1794Smrg freebsd2.*) 723725b89263Smrg # C++ shared libraries reported to be fairly broken before 723825b89263Smrg # switch to ELF 723925b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 724025b89263Smrg ;; 7241ea133fd7Smrg 724225b89263Smrg freebsd-elf*) 724325b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 724425b89263Smrg ;; 7245ea133fd7Smrg 724625b89263Smrg freebsd* | dragonfly*) 724725b89263Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 724825b89263Smrg # conventions 724925b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 725025b89263Smrg ;; 7251ea133fd7Smrg 725225b89263Smrg gnu*) 725325b89263Smrg ;; 7254ea133fd7Smrg 725525b89263Smrg haiku*) 725625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 725725b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 725825b89263Smrg ;; 7259ea133fd7Smrg 726025b89263Smrg hpux9*) 726125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 726225b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 726325b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 726425b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 726525b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 726625b89263Smrg # but as the default 726725b89263Smrg # location of the library. 7268ea133fd7Smrg 726925b89263Smrg case $cc_basename in 727025b89263Smrg CC*) 727125b89263Smrg # FIXME: insert proper C++ library support 727225b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 727325b89263Smrg ;; 727425b89263Smrg aCC*) 727525b89263Smrg _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' 727625b89263Smrg # Commands to make compiler produce verbose output that lists 727725b89263Smrg # what "hidden" libraries, object files and flags are used when 727825b89263Smrg # linking a shared library. 727925b89263Smrg # 728025b89263Smrg # There doesn't appear to be a way to prevent this compiler from 728125b89263Smrg # explicitly linking system object files so we need to strip them 728225b89263Smrg # from the output so that they don't get included in the library 728325b89263Smrg # dependencies. 728425b89263Smrg 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"' 728525b89263Smrg ;; 728625b89263Smrg *) 728725b89263Smrg if test "$GXX" = yes; then 728806f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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' 728925b89263Smrg else 729025b89263Smrg # FIXME: insert proper C++ library support 729125b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 729225b89263Smrg fi 729325b89263Smrg ;; 729425b89263Smrg esac 729525b89263Smrg ;; 7296ea133fd7Smrg 729725b89263Smrg hpux10*|hpux11*) 729825b89263Smrg if test $with_gnu_ld = no; then 729925b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 730025b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7301ea133fd7Smrg 730225b89263Smrg case $host_cpu in 730325b89263Smrg hppa*64*|ia64*) 730425b89263Smrg ;; 730525b89263Smrg *) 730625b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 730725b89263Smrg ;; 730825b89263Smrg esac 730925b89263Smrg fi 731025b89263Smrg case $host_cpu in 731125b89263Smrg hppa*64*|ia64*) 731225b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 731325b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 731425b89263Smrg ;; 731525b89263Smrg *) 731625b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 731725b89263Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 731825b89263Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 731925b89263Smrg # but as the default 732025b89263Smrg # location of the library. 732125b89263Smrg ;; 732225b89263Smrg esac 7323ea133fd7Smrg 732425b89263Smrg case $cc_basename in 732525b89263Smrg CC*) 732625b89263Smrg # FIXME: insert proper C++ library support 732725b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 732825b89263Smrg ;; 732925b89263Smrg aCC*) 733025b89263Smrg case $host_cpu in 733125b89263Smrg hppa*64*) 733225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 733325b89263Smrg ;; 733425b89263Smrg ia64*) 733525b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 733625b89263Smrg ;; 733725b89263Smrg *) 733825b89263Smrg _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' 733925b89263Smrg ;; 734025b89263Smrg esac 734125b89263Smrg # Commands to make compiler produce verbose output that lists 734225b89263Smrg # what "hidden" libraries, object files and flags are used when 734325b89263Smrg # linking a shared library. 734425b89263Smrg # 734525b89263Smrg # There doesn't appear to be a way to prevent this compiler from 734625b89263Smrg # explicitly linking system object files so we need to strip them 734725b89263Smrg # from the output so that they don't get included in the library 734825b89263Smrg # dependencies. 734925b89263Smrg 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"' 735025b89263Smrg ;; 735125b89263Smrg *) 735225b89263Smrg if test "$GXX" = yes; then 735325b89263Smrg if test $with_gnu_ld = no; then 735425b89263Smrg case $host_cpu in 735525b89263Smrg hppa*64*) 735625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 735725b89263Smrg ;; 735825b89263Smrg ia64*) 735906f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 736025b89263Smrg ;; 736125b89263Smrg *) 736206f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 736325b89263Smrg ;; 736425b89263Smrg esac 736525b89263Smrg fi 736625b89263Smrg else 736725b89263Smrg # FIXME: insert proper C++ library support 736825b89263Smrg _LT_TAGVAR(ld_shlibs, $1)=no 736925b89263Smrg fi 737025b89263Smrg ;; 737125b89263Smrg esac 737225b89263Smrg ;; 7373ea133fd7Smrg 737425b89263Smrg interix[[3-9]]*) 737525b89263Smrg _LT_TAGVAR(hardcode_direct, $1)=no 737625b89263Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 737725b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 737825b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 737925b89263Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 738025b89263Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 738125b89263Smrg # default) and relocated if they conflict, which is a slow very memory 738225b89263Smrg # consuming and fragmenting process. To avoid this, we pick a random, 738325b89263Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 738425b89263Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 738525b89263Smrg _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' 738625b89263Smrg _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' 738725b89263Smrg ;; 738825b89263Smrg irix5* | irix6*) 738925b89263Smrg case $cc_basename in 739025b89263Smrg CC*) 739125b89263Smrg # SGI C++ 739225b89263Smrg _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' 7393ea133fd7Smrg 739425b89263Smrg # Archives containing C++ object files must be created using 739525b89263Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 739625b89263Smrg # necessary to make sure instantiated templates are included 739725b89263Smrg # in the archive. 739825b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 739925b89263Smrg ;; 740025b89263Smrg *) 740125b89263Smrg if test "$GXX" = yes; then 740225b89263Smrg if test "$with_gnu_ld" = no; then 740306f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -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' 740425b89263Smrg else 740506f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -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' 740625b89263Smrg fi 740725b89263Smrg fi 740825b89263Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 740925b89263Smrg ;; 741025b89263Smrg esac 741125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 741225b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 741325b89263Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 741425b89263Smrg ;; 7415ea133fd7Smrg 741625b89263Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 741725b89263Smrg case $cc_basename in 741825b89263Smrg KCC*) 741925b89263Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7420ea133fd7Smrg 742125b89263Smrg # KCC will only create a shared library if the output file 742225b89263Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 742325b89263Smrg # to its proper name (with version) after linking. 742425b89263Smrg _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' 742525b89263Smrg _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' 742625b89263Smrg # Commands to make compiler produce verbose output that lists 742725b89263Smrg # what "hidden" libraries, object files and flags are used when 742825b89263Smrg # linking a shared library. 742925b89263Smrg # 743025b89263Smrg # There doesn't appear to be a way to prevent this compiler from 743125b89263Smrg # explicitly linking system object files so we need to strip them 743225b89263Smrg # from the output so that they don't get included in the library 743325b89263Smrg # dependencies. 743425b89263Smrg 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"' 7435ea133fd7Smrg 743625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 743725b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7438ea133fd7Smrg 743925b89263Smrg # Archives containing C++ object files must be created using 744025b89263Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 744125b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 744225b89263Smrg ;; 744325b89263Smrg icpc* | ecpc* ) 744425b89263Smrg # Intel C++ 744525b89263Smrg with_gnu_ld=yes 744625b89263Smrg # version 8.0 and above of icpc choke on multiply defined symbols 744725b89263Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 744825b89263Smrg # earlier do not add the objects themselves. 744925b89263Smrg case `$CC -V 2>&1` in 745025b89263Smrg *"Version 7."*) 745125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 745225b89263Smrg _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' 745325b89263Smrg ;; 745425b89263Smrg *) # Version 8.0 or newer 745525b89263Smrg tmp_idyn= 745625b89263Smrg case $host_cpu in 745725b89263Smrg ia64*) tmp_idyn=' -i_dynamic';; 745825b89263Smrg esac 745925b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 746025b89263Smrg _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' 746125b89263Smrg ;; 746225b89263Smrg esac 746325b89263Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 746425b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 746525b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 746625b89263Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 746725b89263Smrg ;; 746825b89263Smrg pgCC* | pgcpp*) 746925b89263Smrg # Portland Group C++ compiler 747025b89263Smrg case `$CC -V` in 747125b89263Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 747225b89263Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 747325b89263Smrg rm -rf $tpldir~ 747425b89263Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 747525b89263Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 747625b89263Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 747725b89263Smrg rm -rf $tpldir~ 747825b89263Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 747925b89263Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 748025b89263Smrg $RANLIB $oldlib' 748125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 748225b89263Smrg rm -rf $tpldir~ 748325b89263Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 748425b89263Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 748525b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 748625b89263Smrg rm -rf $tpldir~ 748725b89263Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 748825b89263Smrg $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' 748925b89263Smrg ;; 749025b89263Smrg *) # Version 6 and above use weak symbols 749125b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 749225b89263Smrg _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' 749325b89263Smrg ;; 749425b89263Smrg esac 7495ea133fd7Smrg 749625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 749725b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 749825b89263Smrg _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' 749925b89263Smrg ;; 750025b89263Smrg cxx*) 750125b89263Smrg # Compaq C++ 750225b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 750325b89263Smrg _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' 7504ea133fd7Smrg 750525b89263Smrg runpath_var=LD_RUN_PATH 750625b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 750725b89263Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7508ea133fd7Smrg 750925b89263Smrg # Commands to make compiler produce verbose output that lists 751025b89263Smrg # what "hidden" libraries, object files and flags are used when 751125b89263Smrg # linking a shared library. 751225b89263Smrg # 751325b89263Smrg # There doesn't appear to be a way to prevent this compiler from 751425b89263Smrg # explicitly linking system object files so we need to strip them 751525b89263Smrg # from the output so that they don't get included in the library 751625b89263Smrg # dependencies. 751725b89263Smrg 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' 751825b89263Smrg ;; 751925b89263Smrg xl* | mpixl* | bgxl*) 752025b89263Smrg # IBM XL 8.0 on PPC, with GNU ld 752125b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 752225b89263Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 752325b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 752425b89263Smrg if test "x$supports_anon_versioning" = xyes; then 752525b89263Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 752625b89263Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 752725b89263Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 752825b89263Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 752925b89263Smrg fi 753025b89263Smrg ;; 753125b89263Smrg *) 753225b89263Smrg case `$CC -V 2>&1 | sed 5q` in 753325b89263Smrg *Sun\ C*) 753425b89263Smrg # Sun C++ 5.9 753525b89263Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 753625b89263Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 753725b89263Smrg _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' 753825b89263Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 753925b89263Smrg _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' 754025b89263Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7541ea133fd7Smrg 754206f32fbeSmrg # Not sure whether something based on 754306f32fbeSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 754406f32fbeSmrg # would be better. 754506f32fbeSmrg output_verbose_link_cmd='func_echo_all' 754606f32fbeSmrg 754706f32fbeSmrg # Archives containing C++ object files must be created using 754806f32fbeSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 754906f32fbeSmrg # necessary to make sure instantiated templates are included 755006f32fbeSmrg # in the archive. 755106f32fbeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 755206f32fbeSmrg ;; 755306f32fbeSmrg esac 755406f32fbeSmrg ;; 755506f32fbeSmrg esac 755606f32fbeSmrg ;; 755706f32fbeSmrg 755806f32fbeSmrg lynxos*) 755906f32fbeSmrg # FIXME: insert proper C++ library support 756006f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 756106f32fbeSmrg ;; 756206f32fbeSmrg 756306f32fbeSmrg m88k*) 756406f32fbeSmrg # FIXME: insert proper C++ library support 756506f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 756606f32fbeSmrg ;; 756706f32fbeSmrg 756806f32fbeSmrg mvs*) 756906f32fbeSmrg case $cc_basename in 757006f32fbeSmrg cxx*) 757106f32fbeSmrg # FIXME: insert proper C++ library support 757206f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 757306f32fbeSmrg ;; 757406f32fbeSmrg *) 757506f32fbeSmrg # FIXME: insert proper C++ library support 757606f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 757706f32fbeSmrg ;; 757806f32fbeSmrg esac 757906f32fbeSmrg ;; 758006f32fbeSmrg 758106f32fbeSmrg netbsd*) 758206f32fbeSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 758306f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 758406f32fbeSmrg wlarc= 758506f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 758606f32fbeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 758706f32fbeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 758806f32fbeSmrg fi 758906f32fbeSmrg # Workaround some broken pre-1.5 toolchains 759006f32fbeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 759106f32fbeSmrg ;; 759206f32fbeSmrg 759306f32fbeSmrg *nto* | *qnx*) 759406f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 759506f32fbeSmrg ;; 759606f32fbeSmrg 759706f32fbeSmrg openbsd2*) 759806f32fbeSmrg # C++ shared libraries are fairly broken 759906f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 760006f32fbeSmrg ;; 760106f32fbeSmrg 760206f32fbeSmrg openbsd*) 760306f32fbeSmrg if test -f /usr/libexec/ld.so; then 760406f32fbeSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 760506f32fbeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 760606f32fbeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 760706f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 760806f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 760906f32fbeSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 761006f32fbeSmrg _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' 761106f32fbeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 761206f32fbeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 761306f32fbeSmrg fi 761406f32fbeSmrg output_verbose_link_cmd=func_echo_all 761506f32fbeSmrg else 761606f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 761706f32fbeSmrg fi 761806f32fbeSmrg ;; 761906f32fbeSmrg 762006f32fbeSmrg osf3* | osf4* | osf5*) 762106f32fbeSmrg case $cc_basename in 762206f32fbeSmrg KCC*) 762306f32fbeSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 762406f32fbeSmrg 762506f32fbeSmrg # KCC will only create a shared library if the output file 762606f32fbeSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 762706f32fbeSmrg # to its proper name (with version) after linking. 762806f32fbeSmrg _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' 762906f32fbeSmrg 763006f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 763106f32fbeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 763206f32fbeSmrg 763306f32fbeSmrg # Archives containing C++ object files must be created using 763406f32fbeSmrg # the KAI C++ compiler. 763506f32fbeSmrg case $host in 763606f32fbeSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 763706f32fbeSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 763806f32fbeSmrg esac 763906f32fbeSmrg ;; 764006f32fbeSmrg RCC*) 764106f32fbeSmrg # Rational C++ 2.4.1 764206f32fbeSmrg # FIXME: insert proper C++ library support 764306f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 764406f32fbeSmrg ;; 764506f32fbeSmrg cxx*) 764606f32fbeSmrg case $host in 764706f32fbeSmrg osf3*) 764806f32fbeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 764906f32fbeSmrg _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' 765006f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 765106f32fbeSmrg ;; 765206f32fbeSmrg *) 765306f32fbeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 765406f32fbeSmrg _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' 765506f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 765606f32fbeSmrg echo "-hidden">> $lib.exp~ 765706f32fbeSmrg $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~ 765806f32fbeSmrg $RM $lib.exp' 765906f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 766006f32fbeSmrg ;; 766106f32fbeSmrg esac 766206f32fbeSmrg 766306f32fbeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 766406f32fbeSmrg 766506f32fbeSmrg # Commands to make compiler produce verbose output that lists 766606f32fbeSmrg # what "hidden" libraries, object files and flags are used when 766706f32fbeSmrg # linking a shared library. 766806f32fbeSmrg # 766906f32fbeSmrg # There doesn't appear to be a way to prevent this compiler from 767006f32fbeSmrg # explicitly linking system object files so we need to strip them 767106f32fbeSmrg # from the output so that they don't get included in the library 767206f32fbeSmrg # dependencies. 767306f32fbeSmrg 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"' 767406f32fbeSmrg ;; 767506f32fbeSmrg *) 767606f32fbeSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 767706f32fbeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 767806f32fbeSmrg case $host in 767906f32fbeSmrg osf3*) 768006f32fbeSmrg _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' 768106f32fbeSmrg ;; 768206f32fbeSmrg *) 768306f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -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' 768406f32fbeSmrg ;; 768506f32fbeSmrg esac 768606f32fbeSmrg 768706f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 768806f32fbeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 768906f32fbeSmrg 769006f32fbeSmrg # Commands to make compiler produce verbose output that lists 769106f32fbeSmrg # what "hidden" libraries, object files and flags are used when 769206f32fbeSmrg # linking a shared library. 769306f32fbeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 769406f32fbeSmrg 769506f32fbeSmrg else 769606f32fbeSmrg # FIXME: insert proper C++ library support 769706f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 769806f32fbeSmrg fi 769906f32fbeSmrg ;; 770006f32fbeSmrg esac 770106f32fbeSmrg ;; 770206f32fbeSmrg 770306f32fbeSmrg psos*) 770406f32fbeSmrg # FIXME: insert proper C++ library support 770506f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 770606f32fbeSmrg ;; 770706f32fbeSmrg 770806f32fbeSmrg sunos4*) 770906f32fbeSmrg case $cc_basename in 771006f32fbeSmrg CC*) 771106f32fbeSmrg # Sun C++ 4.x 771206f32fbeSmrg # FIXME: insert proper C++ library support 771306f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 771406f32fbeSmrg ;; 771506f32fbeSmrg lcc*) 771606f32fbeSmrg # Lucid 771706f32fbeSmrg # FIXME: insert proper C++ library support 771806f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 771906f32fbeSmrg ;; 772006f32fbeSmrg *) 772106f32fbeSmrg # FIXME: insert proper C++ library support 772206f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 772306f32fbeSmrg ;; 772406f32fbeSmrg esac 772506f32fbeSmrg ;; 772606f32fbeSmrg 772706f32fbeSmrg solaris*) 772806f32fbeSmrg case $cc_basename in 772906f32fbeSmrg CC* | sunCC*) 773006f32fbeSmrg # Sun C++ 4.2, 5.x and Centerline C++ 773106f32fbeSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 773206f32fbeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 773306f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 773406f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 773506f32fbeSmrg $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' 773606f32fbeSmrg 773706f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 773806f32fbeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 773906f32fbeSmrg case $host_os in 774006f32fbeSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 774106f32fbeSmrg *) 774206f32fbeSmrg # The compiler driver will combine and reorder linker options, 774306f32fbeSmrg # but understands `-z linker_flag'. 774406f32fbeSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 774506f32fbeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 774606f32fbeSmrg ;; 774706f32fbeSmrg esac 774806f32fbeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 774906f32fbeSmrg 775006f32fbeSmrg output_verbose_link_cmd='func_echo_all' 775106f32fbeSmrg 775206f32fbeSmrg # Archives containing C++ object files must be created using 775306f32fbeSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 775406f32fbeSmrg # necessary to make sure instantiated templates are included 775506f32fbeSmrg # in the archive. 775606f32fbeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 775706f32fbeSmrg ;; 775806f32fbeSmrg gcx*) 775906f32fbeSmrg # Green Hills C++ Compiler 776006f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 776106f32fbeSmrg 776206f32fbeSmrg # The C++ compiler must be used to create the archive. 776306f32fbeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 776406f32fbeSmrg ;; 776506f32fbeSmrg *) 776606f32fbeSmrg # GNU C++ compiler with Solaris linker 776706f32fbeSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 776806f32fbeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 776906f32fbeSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 777006f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 777106f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 777206f32fbeSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 777306f32fbeSmrg 777406f32fbeSmrg # Commands to make compiler produce verbose output that lists 777506f32fbeSmrg # what "hidden" libraries, object files and flags are used when 777606f32fbeSmrg # linking a shared library. 777706f32fbeSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 777806f32fbeSmrg else 777906f32fbeSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 778006f32fbeSmrg # platform. 778106f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 778206f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 778306f32fbeSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 778406f32fbeSmrg 778506f32fbeSmrg # Commands to make compiler produce verbose output that lists 778606f32fbeSmrg # what "hidden" libraries, object files and flags are used when 778706f32fbeSmrg # linking a shared library. 778806f32fbeSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 778906f32fbeSmrg fi 779006f32fbeSmrg 779106f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 779206f32fbeSmrg case $host_os in 779306f32fbeSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 779406f32fbeSmrg *) 779506f32fbeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 779606f32fbeSmrg ;; 779706f32fbeSmrg esac 779806f32fbeSmrg fi 779906f32fbeSmrg ;; 780006f32fbeSmrg esac 780106f32fbeSmrg ;; 780206f32fbeSmrg 780306f32fbeSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 780406f32fbeSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 780506f32fbeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 780606f32fbeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 780706f32fbeSmrg runpath_var='LD_RUN_PATH' 780806f32fbeSmrg 780906f32fbeSmrg case $cc_basename in 781006f32fbeSmrg CC*) 781106f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781206f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781306f32fbeSmrg ;; 781406f32fbeSmrg *) 781506f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781606f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781706f32fbeSmrg ;; 781806f32fbeSmrg esac 781906f32fbeSmrg ;; 782006f32fbeSmrg 782106f32fbeSmrg sysv5* | sco3.2v5* | sco5v6*) 782206f32fbeSmrg # Note: We can NOT use -z defs as we might desire, because we do not 782306f32fbeSmrg # link with -lc, and that would cause any symbols used from libc to 782406f32fbeSmrg # always be unresolved, which means just about no library would 782506f32fbeSmrg # ever link correctly. If we're not using GNU ld we use -z text 782606f32fbeSmrg # though, which does catch some bad symbols but isn't as heavy-handed 782706f32fbeSmrg # as -z defs. 782806f32fbeSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 782906f32fbeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 783006f32fbeSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 783106f32fbeSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 783206f32fbeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 783306f32fbeSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 783406f32fbeSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 783506f32fbeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 783606f32fbeSmrg runpath_var='LD_RUN_PATH' 783706f32fbeSmrg 783806f32fbeSmrg case $cc_basename in 783906f32fbeSmrg CC*) 784006f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 784106f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 784206f32fbeSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 784306f32fbeSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 784406f32fbeSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 784506f32fbeSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 784606f32fbeSmrg ;; 784706f32fbeSmrg *) 784806f32fbeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 784906f32fbeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 785006f32fbeSmrg ;; 785106f32fbeSmrg esac 785206f32fbeSmrg ;; 785306f32fbeSmrg 785406f32fbeSmrg tandem*) 785506f32fbeSmrg case $cc_basename in 785606f32fbeSmrg NCC*) 785706f32fbeSmrg # NonStop-UX NCC 3.20 785806f32fbeSmrg # FIXME: insert proper C++ library support 785906f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 786006f32fbeSmrg ;; 786106f32fbeSmrg *) 786206f32fbeSmrg # FIXME: insert proper C++ library support 786306f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 786406f32fbeSmrg ;; 786506f32fbeSmrg esac 786606f32fbeSmrg ;; 786706f32fbeSmrg 786806f32fbeSmrg vxworks*) 786906f32fbeSmrg # FIXME: insert proper C++ library support 787006f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 787106f32fbeSmrg ;; 787206f32fbeSmrg 787306f32fbeSmrg *) 787406f32fbeSmrg # FIXME: insert proper C++ library support 787506f32fbeSmrg _LT_TAGVAR(ld_shlibs, $1)=no 787606f32fbeSmrg ;; 787706f32fbeSmrg esac 787806f32fbeSmrg 787906f32fbeSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 788006f32fbeSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 788106f32fbeSmrg 788206f32fbeSmrg _LT_TAGVAR(GCC, $1)="$GXX" 788306f32fbeSmrg _LT_TAGVAR(LD, $1)="$LD" 788406f32fbeSmrg 788506f32fbeSmrg ## CAVEAT EMPTOR: 788606f32fbeSmrg ## There is no encapsulation within the following macros, do not change 788706f32fbeSmrg ## the running order or otherwise move them around unless you know exactly 788806f32fbeSmrg ## what you are doing... 788906f32fbeSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 789006f32fbeSmrg _LT_COMPILER_PIC($1) 789106f32fbeSmrg _LT_COMPILER_C_O($1) 789206f32fbeSmrg _LT_COMPILER_FILE_LOCKS($1) 789306f32fbeSmrg _LT_LINKER_SHLIBS($1) 789406f32fbeSmrg _LT_SYS_DYNAMIC_LINKER($1) 789506f32fbeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 789606f32fbeSmrg 789706f32fbeSmrg _LT_CONFIG($1) 789806f32fbeSmrg fi # test -n "$compiler" 789906f32fbeSmrg 790006f32fbeSmrg CC=$lt_save_CC 790106f32fbeSmrg CFLAGS=$lt_save_CFLAGS 790206f32fbeSmrg LDCXX=$LD 790306f32fbeSmrg LD=$lt_save_LD 790406f32fbeSmrg GCC=$lt_save_GCC 790506f32fbeSmrg with_gnu_ld=$lt_save_with_gnu_ld 790606f32fbeSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 790706f32fbeSmrg lt_cv_path_LD=$lt_save_path_LD 790806f32fbeSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 790906f32fbeSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 791006f32fbeSmrgfi # test "$_lt_caught_CXX_error" != yes 791106f32fbeSmrg 791206f32fbeSmrgAC_LANG_POP 791306f32fbeSmrg])# _LT_LANG_CXX_CONFIG 791406f32fbeSmrg 791506f32fbeSmrg 791606f32fbeSmrg# _LT_FUNC_STRIPNAME_CNF 791706f32fbeSmrg# ---------------------- 791806f32fbeSmrg# func_stripname_cnf prefix suffix name 791906f32fbeSmrg# strip PREFIX and SUFFIX off of NAME. 792006f32fbeSmrg# PREFIX and SUFFIX must not contain globbing or regex special 792106f32fbeSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 792206f32fbeSmrg# dot (in which case that matches only a dot). 792306f32fbeSmrg# 792406f32fbeSmrg# This function is identical to the (non-XSI) version of func_stripname, 792506f32fbeSmrg# except this one can be used by m4 code that may be executed by configure, 792606f32fbeSmrg# rather than the libtool script. 792706f32fbeSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 792806f32fbeSmrgAC_REQUIRE([_LT_DECL_SED]) 792906f32fbeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 793006f32fbeSmrgfunc_stripname_cnf () 793106f32fbeSmrg{ 793206f32fbeSmrg case ${2} in 793306f32fbeSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 793406f32fbeSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 793506f32fbeSmrg esac 793606f32fbeSmrg} # func_stripname_cnf 793706f32fbeSmrg])# _LT_FUNC_STRIPNAME_CNF 793806f32fbeSmrg 793906f32fbeSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 794006f32fbeSmrg# --------------------------------- 794106f32fbeSmrg# Figure out "hidden" library dependencies from verbose 794206f32fbeSmrg# compiler output when linking a shared library. 794306f32fbeSmrg# Parse the compiler output and extract the necessary 794406f32fbeSmrg# objects, libraries and library flags. 794506f32fbeSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 794606f32fbeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 794706f32fbeSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 794806f32fbeSmrg# Dependencies to place before and after the object being linked: 794906f32fbeSmrg_LT_TAGVAR(predep_objects, $1)= 795006f32fbeSmrg_LT_TAGVAR(postdep_objects, $1)= 795106f32fbeSmrg_LT_TAGVAR(predeps, $1)= 795206f32fbeSmrg_LT_TAGVAR(postdeps, $1)= 795306f32fbeSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 795406f32fbeSmrg 795506f32fbeSmrgdnl we can't use the lt_simple_compile_test_code here, 795606f32fbeSmrgdnl because it contains code intended for an executable, 795706f32fbeSmrgdnl not a library. It's possible we should let each 795806f32fbeSmrgdnl tag define a new lt_????_link_test_code variable, 795906f32fbeSmrgdnl but it's only used here... 796006f32fbeSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 796106f32fbeSmrgint a; 796206f32fbeSmrgvoid foo (void) { a = 0; } 796306f32fbeSmrg_LT_EOF 796406f32fbeSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 796506f32fbeSmrgclass Foo 796606f32fbeSmrg{ 796706f32fbeSmrgpublic: 796806f32fbeSmrg Foo (void) { a = 0; } 796906f32fbeSmrgprivate: 797006f32fbeSmrg int a; 797106f32fbeSmrg}; 797206f32fbeSmrg_LT_EOF 797306f32fbeSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 797406f32fbeSmrg subroutine foo 797506f32fbeSmrg implicit none 797606f32fbeSmrg integer*4 a 797706f32fbeSmrg a=0 797806f32fbeSmrg return 797906f32fbeSmrg end 798006f32fbeSmrg_LT_EOF 798106f32fbeSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 798206f32fbeSmrg subroutine foo 798306f32fbeSmrg implicit none 798406f32fbeSmrg integer a 798506f32fbeSmrg a=0 798606f32fbeSmrg return 798706f32fbeSmrg end 798806f32fbeSmrg_LT_EOF 798906f32fbeSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 799006f32fbeSmrgpublic class foo { 799106f32fbeSmrg private int a; 799206f32fbeSmrg public void bar (void) { 799306f32fbeSmrg a = 0; 799406f32fbeSmrg } 799506f32fbeSmrg}; 799606f32fbeSmrg_LT_EOF 799757ee1794Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 799857ee1794Smrgpackage foo 799957ee1794Smrgfunc foo() { 800057ee1794Smrg} 800157ee1794Smrg_LT_EOF 800206f32fbeSmrg]) 800306f32fbeSmrg 800406f32fbeSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 800506f32fbeSmrgcase "$CC $CFLAGS " in #( 800606f32fbeSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 800706f32fbeSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 800857ee1794Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 800906f32fbeSmrgesac 801006f32fbeSmrg 801106f32fbeSmrgdnl Parse the compiler output and extract the necessary 801206f32fbeSmrgdnl objects, libraries and library flags. 801306f32fbeSmrgif AC_TRY_EVAL(ac_compile); then 801406f32fbeSmrg # Parse the compiler output and extract the necessary 801506f32fbeSmrg # objects, libraries and library flags. 801606f32fbeSmrg 801706f32fbeSmrg # Sentinel used to keep track of whether or not we are before 801806f32fbeSmrg # the conftest object file. 801906f32fbeSmrg pre_test_object_deps_done=no 802006f32fbeSmrg 802106f32fbeSmrg for p in `eval "$output_verbose_link_cmd"`; do 802206f32fbeSmrg case ${prev}${p} in 802306f32fbeSmrg 802406f32fbeSmrg -L* | -R* | -l*) 802506f32fbeSmrg # Some compilers place space between "-{L,R}" and the path. 802606f32fbeSmrg # Remove the space. 802706f32fbeSmrg if test $p = "-L" || 802806f32fbeSmrg test $p = "-R"; then 802906f32fbeSmrg prev=$p 803006f32fbeSmrg continue 803106f32fbeSmrg fi 803206f32fbeSmrg 803306f32fbeSmrg # Expand the sysroot to ease extracting the directories later. 803406f32fbeSmrg if test -z "$prev"; then 803506f32fbeSmrg case $p in 803606f32fbeSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 803706f32fbeSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 803806f32fbeSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 803906f32fbeSmrg esac 804006f32fbeSmrg fi 804106f32fbeSmrg case $p in 804206f32fbeSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 804306f32fbeSmrg esac 804406f32fbeSmrg if test "$pre_test_object_deps_done" = no; then 804506f32fbeSmrg case ${prev} in 804606f32fbeSmrg -L | -R) 804706f32fbeSmrg # Internal compiler library paths should come after those 804806f32fbeSmrg # provided the user. The postdeps already come after the 804906f32fbeSmrg # user supplied libs so there is no need to process them. 805006f32fbeSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 805106f32fbeSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 805206f32fbeSmrg else 805306f32fbeSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 805406f32fbeSmrg fi 805506f32fbeSmrg ;; 805606f32fbeSmrg # The "-l" case would never come before the object being 805706f32fbeSmrg # linked, so don't bother handling this case. 805806f32fbeSmrg esac 805906f32fbeSmrg else 806006f32fbeSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 806106f32fbeSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 806206f32fbeSmrg else 806306f32fbeSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 806406f32fbeSmrg fi 806506f32fbeSmrg fi 806606f32fbeSmrg prev= 806706f32fbeSmrg ;; 806806f32fbeSmrg 806906f32fbeSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 807006f32fbeSmrg *.$objext) 807106f32fbeSmrg # This assumes that the test object file only shows up 807206f32fbeSmrg # once in the compiler output. 807306f32fbeSmrg if test "$p" = "conftest.$objext"; then 807406f32fbeSmrg pre_test_object_deps_done=yes 807506f32fbeSmrg continue 807606f32fbeSmrg fi 807706f32fbeSmrg 807806f32fbeSmrg if test "$pre_test_object_deps_done" = no; then 807906f32fbeSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 808006f32fbeSmrg _LT_TAGVAR(predep_objects, $1)="$p" 808106f32fbeSmrg else 808206f32fbeSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 808306f32fbeSmrg fi 808406f32fbeSmrg else 808506f32fbeSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 808606f32fbeSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 808706f32fbeSmrg else 808806f32fbeSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 808906f32fbeSmrg fi 809006f32fbeSmrg fi 809106f32fbeSmrg ;; 8092ea133fd7Smrg 809306f32fbeSmrg *) ;; # Ignore the rest. 8094ea133fd7Smrg 809506f32fbeSmrg esac 809606f32fbeSmrg done 8097ea133fd7Smrg 809806f32fbeSmrg # Clean up. 809906f32fbeSmrg rm -f a.out a.exe 810006f32fbeSmrgelse 810106f32fbeSmrg echo "libtool.m4: error: problem compiling $1 test program" 810206f32fbeSmrgfi 8103ea133fd7Smrg 810406f32fbeSmrg$RM -f confest.$objext 810506f32fbeSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 8106ea133fd7Smrg 810706f32fbeSmrg# PORTME: override above test on systems where it is broken 810806f32fbeSmrgm4_if([$1], [CXX], 810906f32fbeSmrg[case $host_os in 811006f32fbeSmrginterix[[3-9]]*) 811106f32fbeSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 811206f32fbeSmrg # hack all around it, let's just trust "g++" to DTRT. 811306f32fbeSmrg _LT_TAGVAR(predep_objects,$1)= 811406f32fbeSmrg _LT_TAGVAR(postdep_objects,$1)= 811506f32fbeSmrg _LT_TAGVAR(postdeps,$1)= 811606f32fbeSmrg ;; 8117ea133fd7Smrg 811806f32fbeSmrglinux*) 811906f32fbeSmrg case `$CC -V 2>&1 | sed 5q` in 812006f32fbeSmrg *Sun\ C*) 812106f32fbeSmrg # Sun C++ 5.9 8122ea133fd7Smrg 812306f32fbeSmrg # The more standards-conforming stlport4 library is 812406f32fbeSmrg # incompatible with the Cstd library. Avoid specifying 812506f32fbeSmrg # it if it's in CXXFLAGS. Ignore libCrun as 812606f32fbeSmrg # -library=stlport4 depends on it. 812706f32fbeSmrg case " $CXX $CXXFLAGS " in 812806f32fbeSmrg *" -library=stlport4 "*) 812906f32fbeSmrg solaris_use_stlport4=yes 813006f32fbeSmrg ;; 813106f32fbeSmrg esac 8132ea133fd7Smrg 813306f32fbeSmrg if test "$solaris_use_stlport4" != yes; then 813406f32fbeSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 813506f32fbeSmrg fi 813606f32fbeSmrg ;; 813706f32fbeSmrg esac 813806f32fbeSmrg ;; 8139ea133fd7Smrg 814006f32fbeSmrgsolaris*) 814106f32fbeSmrg case $cc_basename in 814206f32fbeSmrg CC* | sunCC*) 814306f32fbeSmrg # The more standards-conforming stlport4 library is 814406f32fbeSmrg # incompatible with the Cstd library. Avoid specifying 814506f32fbeSmrg # it if it's in CXXFLAGS. Ignore libCrun as 814606f32fbeSmrg # -library=stlport4 depends on it. 814706f32fbeSmrg case " $CXX $CXXFLAGS " in 814806f32fbeSmrg *" -library=stlport4 "*) 814906f32fbeSmrg solaris_use_stlport4=yes 815006f32fbeSmrg ;; 815106f32fbeSmrg esac 8152ea133fd7Smrg 815306f32fbeSmrg # Adding this requires a known-good setup of shared libraries for 815406f32fbeSmrg # Sun compiler versions before 5.6, else PIC objects from an old 815506f32fbeSmrg # archive will be linked into the output, leading to subtle bugs. 815606f32fbeSmrg if test "$solaris_use_stlport4" != yes; then 815706f32fbeSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 815806f32fbeSmrg fi 815906f32fbeSmrg ;; 816006f32fbeSmrg esac 816106f32fbeSmrg ;; 816206f32fbeSmrgesac 816306f32fbeSmrg]) 8164ea133fd7Smrg 816506f32fbeSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 816606f32fbeSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 816706f32fbeSmrgesac 816806f32fbeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 816906f32fbeSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 817006f32fbeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 817106f32fbeSmrgfi 817206f32fbeSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 817306f32fbeSmrg [The directories searched by this compiler when creating a shared library]) 817406f32fbeSmrg_LT_TAGDECL([], [predep_objects], [1], 817506f32fbeSmrg [Dependencies to place before and after the objects being linked to 817606f32fbeSmrg create a shared library]) 817706f32fbeSmrg_LT_TAGDECL([], [postdep_objects], [1]) 817806f32fbeSmrg_LT_TAGDECL([], [predeps], [1]) 817906f32fbeSmrg_LT_TAGDECL([], [postdeps], [1]) 818006f32fbeSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 818106f32fbeSmrg [The library search path used internally by the compiler when linking 818206f32fbeSmrg a shared library]) 818306f32fbeSmrg])# _LT_SYS_HIDDEN_LIBDEPS 8184ea133fd7Smrg 8185ea133fd7Smrg 818606f32fbeSmrg# _LT_LANG_F77_CONFIG([TAG]) 818706f32fbeSmrg# -------------------------- 818806f32fbeSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 818906f32fbeSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 819006f32fbeSmrg# to write the compiler configuration to `libtool'. 819106f32fbeSmrgm4_defun([_LT_LANG_F77_CONFIG], 819206f32fbeSmrg[AC_LANG_PUSH(Fortran 77) 819306f32fbeSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 819406f32fbeSmrg _lt_disable_F77=yes 819506f32fbeSmrgfi 819606f32fbeSmrg 819706f32fbeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 819806f32fbeSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 819906f32fbeSmrg_LT_TAGVAR(always_export_symbols, $1)=no 820006f32fbeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 820106f32fbeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 820206f32fbeSmrg_LT_TAGVAR(hardcode_direct, $1)=no 820306f32fbeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 820406f32fbeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 820506f32fbeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 820606f32fbeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 820706f32fbeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 820806f32fbeSmrg_LT_TAGVAR(inherit_rpath, $1)=no 820906f32fbeSmrg_LT_TAGVAR(module_cmds, $1)= 821006f32fbeSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 821106f32fbeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 821206f32fbeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 821306f32fbeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 821406f32fbeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 821506f32fbeSmrg_LT_TAGVAR(no_undefined_flag, $1)= 821606f32fbeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 821706f32fbeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 821806f32fbeSmrg 821906f32fbeSmrg# Source file extension for f77 test sources. 822006f32fbeSmrgac_ext=f 822106f32fbeSmrg 822206f32fbeSmrg# Object file extension for compiled f77 test sources. 822306f32fbeSmrgobjext=o 822406f32fbeSmrg_LT_TAGVAR(objext, $1)=$objext 822506f32fbeSmrg 822606f32fbeSmrg# No sense in running all these tests if we already determined that 822706f32fbeSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 822806f32fbeSmrg# are currently assumed to apply to all compilers on this platform, 822906f32fbeSmrg# and will be corrupted by setting them based on a non-working compiler. 823006f32fbeSmrgif test "$_lt_disable_F77" != yes; then 823106f32fbeSmrg # Code to be used in simple compile tests 823206f32fbeSmrg lt_simple_compile_test_code="\ 823306f32fbeSmrg subroutine t 823406f32fbeSmrg return 823506f32fbeSmrg end 823606f32fbeSmrg" 823706f32fbeSmrg 823806f32fbeSmrg # Code to be used in simple link tests 823906f32fbeSmrg lt_simple_link_test_code="\ 824006f32fbeSmrg program t 824106f32fbeSmrg end 824206f32fbeSmrg" 8243ea133fd7Smrg 824406f32fbeSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 824506f32fbeSmrg _LT_TAG_COMPILER 8246ea133fd7Smrg 824706f32fbeSmrg # save warnings/boilerplate of simple test code 824806f32fbeSmrg _LT_COMPILER_BOILERPLATE 824906f32fbeSmrg _LT_LINKER_BOILERPLATE 8250ea133fd7Smrg 825106f32fbeSmrg # Allow CC to be a program name with arguments. 825206f32fbeSmrg lt_save_CC="$CC" 825306f32fbeSmrg lt_save_GCC=$GCC 825406f32fbeSmrg lt_save_CFLAGS=$CFLAGS 825506f32fbeSmrg CC=${F77-"f77"} 825606f32fbeSmrg CFLAGS=$FFLAGS 825706f32fbeSmrg compiler=$CC 825806f32fbeSmrg _LT_TAGVAR(compiler, $1)=$CC 825906f32fbeSmrg _LT_CC_BASENAME([$compiler]) 826006f32fbeSmrg GCC=$G77 826106f32fbeSmrg if test -n "$compiler"; then 826206f32fbeSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 826306f32fbeSmrg AC_MSG_RESULT([$can_build_shared]) 8264ea133fd7Smrg 826506f32fbeSmrg AC_MSG_CHECKING([whether to build shared libraries]) 826606f32fbeSmrg test "$can_build_shared" = "no" && enable_shared=no 8267ea133fd7Smrg 826806f32fbeSmrg # On AIX, shared libraries and static libraries use the same namespace, and 826906f32fbeSmrg # are all built from PIC. 827006f32fbeSmrg case $host_os in 827106f32fbeSmrg aix3*) 827206f32fbeSmrg test "$enable_shared" = yes && enable_static=no 827306f32fbeSmrg if test -n "$RANLIB"; then 827406f32fbeSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 827506f32fbeSmrg postinstall_cmds='$RANLIB $lib' 827606f32fbeSmrg fi 827725b89263Smrg ;; 827806f32fbeSmrg aix[[4-9]]*) 827906f32fbeSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 828006f32fbeSmrg test "$enable_shared" = yes && enable_static=no 828106f32fbeSmrg fi 828225b89263Smrg ;; 828306f32fbeSmrg esac 828406f32fbeSmrg AC_MSG_RESULT([$enable_shared]) 8285ea133fd7Smrg 828606f32fbeSmrg AC_MSG_CHECKING([whether to build static libraries]) 828706f32fbeSmrg # Make sure either enable_shared or enable_static is yes. 828806f32fbeSmrg test "$enable_shared" = yes || enable_static=yes 828906f32fbeSmrg AC_MSG_RESULT([$enable_static]) 8290ea133fd7Smrg 829106f32fbeSmrg _LT_TAGVAR(GCC, $1)="$G77" 829206f32fbeSmrg _LT_TAGVAR(LD, $1)="$LD" 8293ea133fd7Smrg 829406f32fbeSmrg ## CAVEAT EMPTOR: 829506f32fbeSmrg ## There is no encapsulation within the following macros, do not change 829606f32fbeSmrg ## the running order or otherwise move them around unless you know exactly 829706f32fbeSmrg ## what you are doing... 829806f32fbeSmrg _LT_COMPILER_PIC($1) 829906f32fbeSmrg _LT_COMPILER_C_O($1) 830006f32fbeSmrg _LT_COMPILER_FILE_LOCKS($1) 830106f32fbeSmrg _LT_LINKER_SHLIBS($1) 830206f32fbeSmrg _LT_SYS_DYNAMIC_LINKER($1) 830306f32fbeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8304ea133fd7Smrg 830506f32fbeSmrg _LT_CONFIG($1) 830606f32fbeSmrg fi # test -n "$compiler" 8307ea133fd7Smrg 830806f32fbeSmrg GCC=$lt_save_GCC 830906f32fbeSmrg CC="$lt_save_CC" 831006f32fbeSmrg CFLAGS="$lt_save_CFLAGS" 831106f32fbeSmrgfi # test "$_lt_disable_F77" != yes 8312ea133fd7Smrg 831306f32fbeSmrgAC_LANG_POP 831406f32fbeSmrg])# _LT_LANG_F77_CONFIG 8315ea133fd7Smrg 8316ea133fd7Smrg 831706f32fbeSmrg# _LT_LANG_FC_CONFIG([TAG]) 831806f32fbeSmrg# ------------------------- 831906f32fbeSmrg# Ensure that the configuration variables for a Fortran compiler are 832006f32fbeSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 832106f32fbeSmrg# to write the compiler configuration to `libtool'. 832206f32fbeSmrgm4_defun([_LT_LANG_FC_CONFIG], 832306f32fbeSmrg[AC_LANG_PUSH(Fortran) 8324ea133fd7Smrg 832506f32fbeSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 832606f32fbeSmrg _lt_disable_FC=yes 832706f32fbeSmrgfi 8328ea133fd7Smrg 832906f32fbeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 833006f32fbeSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 833106f32fbeSmrg_LT_TAGVAR(always_export_symbols, $1)=no 833206f32fbeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 833306f32fbeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 833406f32fbeSmrg_LT_TAGVAR(hardcode_direct, $1)=no 833506f32fbeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 833606f32fbeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 833706f32fbeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 833806f32fbeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 833906f32fbeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 834006f32fbeSmrg_LT_TAGVAR(inherit_rpath, $1)=no 834106f32fbeSmrg_LT_TAGVAR(module_cmds, $1)= 834206f32fbeSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 834306f32fbeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 834406f32fbeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 834506f32fbeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 834606f32fbeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 834706f32fbeSmrg_LT_TAGVAR(no_undefined_flag, $1)= 834806f32fbeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 834906f32fbeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 835006f32fbeSmrg 835106f32fbeSmrg# Source file extension for fc test sources. 835206f32fbeSmrgac_ext=${ac_fc_srcext-f} 835306f32fbeSmrg 835406f32fbeSmrg# Object file extension for compiled fc test sources. 835506f32fbeSmrgobjext=o 835606f32fbeSmrg_LT_TAGVAR(objext, $1)=$objext 835706f32fbeSmrg 835806f32fbeSmrg# No sense in running all these tests if we already determined that 835906f32fbeSmrg# the FC compiler isn't working. Some variables (like enable_shared) 836006f32fbeSmrg# are currently assumed to apply to all compilers on this platform, 836106f32fbeSmrg# and will be corrupted by setting them based on a non-working compiler. 836206f32fbeSmrgif test "$_lt_disable_FC" != yes; then 836306f32fbeSmrg # Code to be used in simple compile tests 836406f32fbeSmrg lt_simple_compile_test_code="\ 836506f32fbeSmrg subroutine t 836606f32fbeSmrg return 836706f32fbeSmrg end 836806f32fbeSmrg" 836906f32fbeSmrg 837006f32fbeSmrg # Code to be used in simple link tests 837106f32fbeSmrg lt_simple_link_test_code="\ 837206f32fbeSmrg program t 837306f32fbeSmrg end 837406f32fbeSmrg" 837506f32fbeSmrg 837606f32fbeSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 837706f32fbeSmrg _LT_TAG_COMPILER 8378ea133fd7Smrg 837906f32fbeSmrg # save warnings/boilerplate of simple test code 838006f32fbeSmrg _LT_COMPILER_BOILERPLATE 838106f32fbeSmrg _LT_LINKER_BOILERPLATE 8382ea133fd7Smrg 838306f32fbeSmrg # Allow CC to be a program name with arguments. 838406f32fbeSmrg lt_save_CC="$CC" 838506f32fbeSmrg lt_save_GCC=$GCC 838606f32fbeSmrg lt_save_CFLAGS=$CFLAGS 838706f32fbeSmrg CC=${FC-"f95"} 838806f32fbeSmrg CFLAGS=$FCFLAGS 838906f32fbeSmrg compiler=$CC 839006f32fbeSmrg GCC=$ac_cv_fc_compiler_gnu 8391ea133fd7Smrg 839206f32fbeSmrg _LT_TAGVAR(compiler, $1)=$CC 839306f32fbeSmrg _LT_CC_BASENAME([$compiler]) 8394ea133fd7Smrg 839506f32fbeSmrg if test -n "$compiler"; then 839606f32fbeSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 839706f32fbeSmrg AC_MSG_RESULT([$can_build_shared]) 8398ea133fd7Smrg 839906f32fbeSmrg AC_MSG_CHECKING([whether to build shared libraries]) 840006f32fbeSmrg test "$can_build_shared" = "no" && enable_shared=no 840106f32fbeSmrg 840206f32fbeSmrg # On AIX, shared libraries and static libraries use the same namespace, and 840306f32fbeSmrg # are all built from PIC. 840406f32fbeSmrg case $host_os in 840506f32fbeSmrg aix3*) 840606f32fbeSmrg test "$enable_shared" = yes && enable_static=no 840706f32fbeSmrg if test -n "$RANLIB"; then 840806f32fbeSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 840906f32fbeSmrg postinstall_cmds='$RANLIB $lib' 841006f32fbeSmrg fi 841106f32fbeSmrg ;; 841206f32fbeSmrg aix[[4-9]]*) 841306f32fbeSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 841406f32fbeSmrg test "$enable_shared" = yes && enable_static=no 841506f32fbeSmrg fi 841625b89263Smrg ;; 841725b89263Smrg esac 841806f32fbeSmrg AC_MSG_RESULT([$enable_shared]) 8419ea133fd7Smrg 842006f32fbeSmrg AC_MSG_CHECKING([whether to build static libraries]) 842106f32fbeSmrg # Make sure either enable_shared or enable_static is yes. 842206f32fbeSmrg test "$enable_shared" = yes || enable_static=yes 842306f32fbeSmrg AC_MSG_RESULT([$enable_static]) 8424ea133fd7Smrg 842506f32fbeSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 842625b89263Smrg _LT_TAGVAR(LD, $1)="$LD" 8427ea133fd7Smrg 842825b89263Smrg ## CAVEAT EMPTOR: 842925b89263Smrg ## There is no encapsulation within the following macros, do not change 843025b89263Smrg ## the running order or otherwise move them around unless you know exactly 843125b89263Smrg ## what you are doing... 843225b89263Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 843325b89263Smrg _LT_COMPILER_PIC($1) 843425b89263Smrg _LT_COMPILER_C_O($1) 843525b89263Smrg _LT_COMPILER_FILE_LOCKS($1) 843625b89263Smrg _LT_LINKER_SHLIBS($1) 843725b89263Smrg _LT_SYS_DYNAMIC_LINKER($1) 843825b89263Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8439ea133fd7Smrg 844006f32fbeSmrg _LT_CONFIG($1) 844106f32fbeSmrg fi # test -n "$compiler" 844206f32fbeSmrg 844306f32fbeSmrg GCC=$lt_save_GCC 844406f32fbeSmrg CC=$lt_save_CC 844506f32fbeSmrg CFLAGS=$lt_save_CFLAGS 844606f32fbeSmrgfi # test "$_lt_disable_FC" != yes 844706f32fbeSmrg 844806f32fbeSmrgAC_LANG_POP 844906f32fbeSmrg])# _LT_LANG_FC_CONFIG 845006f32fbeSmrg 845106f32fbeSmrg 845206f32fbeSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 845306f32fbeSmrg# -------------------------- 845406f32fbeSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 845506f32fbeSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 845606f32fbeSmrg# to write the compiler configuration to `libtool'. 845706f32fbeSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 845806f32fbeSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 845906f32fbeSmrgAC_LANG_SAVE 846006f32fbeSmrg 846106f32fbeSmrg# Source file extension for Java test sources. 846206f32fbeSmrgac_ext=java 846306f32fbeSmrg 846406f32fbeSmrg# Object file extension for compiled Java test sources. 846506f32fbeSmrgobjext=o 846606f32fbeSmrg_LT_TAGVAR(objext, $1)=$objext 846706f32fbeSmrg 846806f32fbeSmrg# Code to be used in simple compile tests 846906f32fbeSmrglt_simple_compile_test_code="class foo {}" 847006f32fbeSmrg 847106f32fbeSmrg# Code to be used in simple link tests 847206f32fbeSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 847306f32fbeSmrg 847406f32fbeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 847506f32fbeSmrg_LT_TAG_COMPILER 847606f32fbeSmrg 847706f32fbeSmrg# save warnings/boilerplate of simple test code 847806f32fbeSmrg_LT_COMPILER_BOILERPLATE 847906f32fbeSmrg_LT_LINKER_BOILERPLATE 848006f32fbeSmrg 848106f32fbeSmrg# Allow CC to be a program name with arguments. 848206f32fbeSmrglt_save_CC=$CC 848306f32fbeSmrglt_save_CFLAGS=$CFLAGS 848406f32fbeSmrglt_save_GCC=$GCC 848506f32fbeSmrgGCC=yes 848606f32fbeSmrgCC=${GCJ-"gcj"} 848706f32fbeSmrgCFLAGS=$GCJFLAGS 848806f32fbeSmrgcompiler=$CC 848906f32fbeSmrg_LT_TAGVAR(compiler, $1)=$CC 849006f32fbeSmrg_LT_TAGVAR(LD, $1)="$LD" 849106f32fbeSmrg_LT_CC_BASENAME([$compiler]) 849206f32fbeSmrg 849306f32fbeSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 849406f32fbeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 849506f32fbeSmrg 849606f32fbeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 849706f32fbeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 849806f32fbeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 849906f32fbeSmrg 850006f32fbeSmrgif test -n "$compiler"; then 850106f32fbeSmrg _LT_COMPILER_NO_RTTI($1) 850206f32fbeSmrg _LT_COMPILER_PIC($1) 850306f32fbeSmrg _LT_COMPILER_C_O($1) 850406f32fbeSmrg _LT_COMPILER_FILE_LOCKS($1) 850506f32fbeSmrg _LT_LINKER_SHLIBS($1) 850606f32fbeSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 850706f32fbeSmrg 850806f32fbeSmrg _LT_CONFIG($1) 850906f32fbeSmrgfi 851006f32fbeSmrg 851106f32fbeSmrgAC_LANG_RESTORE 851206f32fbeSmrg 851306f32fbeSmrgGCC=$lt_save_GCC 851406f32fbeSmrgCC=$lt_save_CC 851506f32fbeSmrgCFLAGS=$lt_save_CFLAGS 851606f32fbeSmrg])# _LT_LANG_GCJ_CONFIG 851706f32fbeSmrg 851806f32fbeSmrg 851957ee1794Smrg# _LT_LANG_GO_CONFIG([TAG]) 852057ee1794Smrg# -------------------------- 852157ee1794Smrg# Ensure that the configuration variables for the GNU Go compiler 852257ee1794Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 852357ee1794Smrg# to write the compiler configuration to `libtool'. 852457ee1794Smrgm4_defun([_LT_LANG_GO_CONFIG], 852557ee1794Smrg[AC_REQUIRE([LT_PROG_GO])dnl 852657ee1794SmrgAC_LANG_SAVE 852757ee1794Smrg 852857ee1794Smrg# Source file extension for Go test sources. 852957ee1794Smrgac_ext=go 853057ee1794Smrg 853157ee1794Smrg# Object file extension for compiled Go test sources. 853257ee1794Smrgobjext=o 853357ee1794Smrg_LT_TAGVAR(objext, $1)=$objext 853457ee1794Smrg 853557ee1794Smrg# Code to be used in simple compile tests 853657ee1794Smrglt_simple_compile_test_code="package main; func main() { }" 853757ee1794Smrg 853857ee1794Smrg# Code to be used in simple link tests 853957ee1794Smrglt_simple_link_test_code='package main; func main() { }' 854057ee1794Smrg 854157ee1794Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 854257ee1794Smrg_LT_TAG_COMPILER 854357ee1794Smrg 854457ee1794Smrg# save warnings/boilerplate of simple test code 854557ee1794Smrg_LT_COMPILER_BOILERPLATE 854657ee1794Smrg_LT_LINKER_BOILERPLATE 854757ee1794Smrg 854857ee1794Smrg# Allow CC to be a program name with arguments. 854957ee1794Smrglt_save_CC=$CC 855057ee1794Smrglt_save_CFLAGS=$CFLAGS 855157ee1794Smrglt_save_GCC=$GCC 855257ee1794SmrgGCC=yes 855357ee1794SmrgCC=${GOC-"gccgo"} 855457ee1794SmrgCFLAGS=$GOFLAGS 855557ee1794Smrgcompiler=$CC 855657ee1794Smrg_LT_TAGVAR(compiler, $1)=$CC 855757ee1794Smrg_LT_TAGVAR(LD, $1)="$LD" 855857ee1794Smrg_LT_CC_BASENAME([$compiler]) 855957ee1794Smrg 856057ee1794Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 856157ee1794Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 856257ee1794Smrg 856357ee1794Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 856457ee1794Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 856557ee1794Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 856657ee1794Smrg 856757ee1794Smrgif test -n "$compiler"; then 856857ee1794Smrg _LT_COMPILER_NO_RTTI($1) 856957ee1794Smrg _LT_COMPILER_PIC($1) 857057ee1794Smrg _LT_COMPILER_C_O($1) 857157ee1794Smrg _LT_COMPILER_FILE_LOCKS($1) 857257ee1794Smrg _LT_LINKER_SHLIBS($1) 857357ee1794Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 857457ee1794Smrg 857557ee1794Smrg _LT_CONFIG($1) 857657ee1794Smrgfi 857757ee1794Smrg 857857ee1794SmrgAC_LANG_RESTORE 857957ee1794Smrg 858057ee1794SmrgGCC=$lt_save_GCC 858157ee1794SmrgCC=$lt_save_CC 858257ee1794SmrgCFLAGS=$lt_save_CFLAGS 858357ee1794Smrg])# _LT_LANG_GO_CONFIG 858457ee1794Smrg 858557ee1794Smrg 858606f32fbeSmrg# _LT_LANG_RC_CONFIG([TAG]) 858706f32fbeSmrg# ------------------------- 858806f32fbeSmrg# Ensure that the configuration variables for the Windows resource compiler 858906f32fbeSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 859006f32fbeSmrg# to write the compiler configuration to `libtool'. 859106f32fbeSmrgm4_defun([_LT_LANG_RC_CONFIG], 859206f32fbeSmrg[AC_REQUIRE([LT_PROG_RC])dnl 859306f32fbeSmrgAC_LANG_SAVE 859406f32fbeSmrg 859506f32fbeSmrg# Source file extension for RC test sources. 859606f32fbeSmrgac_ext=rc 859706f32fbeSmrg 859806f32fbeSmrg# Object file extension for compiled RC test sources. 859906f32fbeSmrgobjext=o 860006f32fbeSmrg_LT_TAGVAR(objext, $1)=$objext 860106f32fbeSmrg 860206f32fbeSmrg# Code to be used in simple compile tests 860306f32fbeSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 860406f32fbeSmrg 860506f32fbeSmrg# Code to be used in simple link tests 860606f32fbeSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 860706f32fbeSmrg 860806f32fbeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 860906f32fbeSmrg_LT_TAG_COMPILER 861006f32fbeSmrg 861106f32fbeSmrg# save warnings/boilerplate of simple test code 861206f32fbeSmrg_LT_COMPILER_BOILERPLATE 861306f32fbeSmrg_LT_LINKER_BOILERPLATE 861406f32fbeSmrg 861506f32fbeSmrg# Allow CC to be a program name with arguments. 861606f32fbeSmrglt_save_CC="$CC" 861706f32fbeSmrglt_save_CFLAGS=$CFLAGS 861806f32fbeSmrglt_save_GCC=$GCC 861906f32fbeSmrgGCC= 862006f32fbeSmrgCC=${RC-"windres"} 862106f32fbeSmrgCFLAGS= 862206f32fbeSmrgcompiler=$CC 862306f32fbeSmrg_LT_TAGVAR(compiler, $1)=$CC 862406f32fbeSmrg_LT_CC_BASENAME([$compiler]) 862506f32fbeSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 862606f32fbeSmrg 862706f32fbeSmrgif test -n "$compiler"; then 862806f32fbeSmrg : 862906f32fbeSmrg _LT_CONFIG($1) 863006f32fbeSmrgfi 863106f32fbeSmrg 863206f32fbeSmrgGCC=$lt_save_GCC 863306f32fbeSmrgAC_LANG_RESTORE 863406f32fbeSmrgCC=$lt_save_CC 863506f32fbeSmrgCFLAGS=$lt_save_CFLAGS 863606f32fbeSmrg])# _LT_LANG_RC_CONFIG 863706f32fbeSmrg 863806f32fbeSmrg 863906f32fbeSmrg# LT_PROG_GCJ 864006f32fbeSmrg# ----------- 864106f32fbeSmrgAC_DEFUN([LT_PROG_GCJ], 864206f32fbeSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 864306f32fbeSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 864406f32fbeSmrg [AC_CHECK_TOOL(GCJ, gcj,) 864506f32fbeSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 864606f32fbeSmrg AC_SUBST(GCJFLAGS)])])[]dnl 864706f32fbeSmrg]) 864806f32fbeSmrg 864906f32fbeSmrg# Old name: 865006f32fbeSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 865106f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 865206f32fbeSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 865306f32fbeSmrg 865406f32fbeSmrg 865557ee1794Smrg# LT_PROG_GO 865657ee1794Smrg# ---------- 865757ee1794SmrgAC_DEFUN([LT_PROG_GO], 865857ee1794Smrg[AC_CHECK_TOOL(GOC, gccgo,) 865957ee1794Smrg]) 866057ee1794Smrg 866157ee1794Smrg 866206f32fbeSmrg# LT_PROG_RC 866306f32fbeSmrg# ---------- 866406f32fbeSmrgAC_DEFUN([LT_PROG_RC], 866506f32fbeSmrg[AC_CHECK_TOOL(RC, windres,) 866606f32fbeSmrg]) 866706f32fbeSmrg 866806f32fbeSmrg# Old name: 866906f32fbeSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 867006f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 867106f32fbeSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 867206f32fbeSmrg 867306f32fbeSmrg 867406f32fbeSmrg# _LT_DECL_EGREP 867506f32fbeSmrg# -------------- 867606f32fbeSmrg# If we don't have a new enough Autoconf to choose the best grep 867706f32fbeSmrg# available, choose the one first in the user's PATH. 867806f32fbeSmrgm4_defun([_LT_DECL_EGREP], 867906f32fbeSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 868006f32fbeSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 868106f32fbeSmrgtest -z "$GREP" && GREP=grep 868206f32fbeSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 868306f32fbeSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 868406f32fbeSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 868506f32fbeSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 868606f32fbeSmrgAC_SUBST([GREP]) 868706f32fbeSmrg]) 868806f32fbeSmrg 8689ea133fd7Smrg 869006f32fbeSmrg# _LT_DECL_OBJDUMP 869106f32fbeSmrg# -------------- 869206f32fbeSmrg# If we don't have a new enough Autoconf to choose the best objdump 869306f32fbeSmrg# available, choose the one first in the user's PATH. 869406f32fbeSmrgm4_defun([_LT_DECL_OBJDUMP], 869506f32fbeSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 869606f32fbeSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 869706f32fbeSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 869806f32fbeSmrgAC_SUBST([OBJDUMP]) 869906f32fbeSmrg]) 8700ea133fd7Smrg 870106f32fbeSmrg# _LT_DECL_DLLTOOL 870206f32fbeSmrg# ---------------- 870306f32fbeSmrg# Ensure DLLTOOL variable is set. 870406f32fbeSmrgm4_defun([_LT_DECL_DLLTOOL], 870506f32fbeSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 870606f32fbeSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 870706f32fbeSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 870806f32fbeSmrgAC_SUBST([DLLTOOL]) 870906f32fbeSmrg]) 8710ea133fd7Smrg 871106f32fbeSmrg# _LT_DECL_SED 871206f32fbeSmrg# ------------ 871306f32fbeSmrg# Check for a fully-functional sed program, that truncates 871406f32fbeSmrg# as few characters as possible. Prefer GNU sed if found. 871506f32fbeSmrgm4_defun([_LT_DECL_SED], 871606f32fbeSmrg[AC_PROG_SED 871706f32fbeSmrgtest -z "$SED" && SED=sed 871806f32fbeSmrgXsed="$SED -e 1s/^X//" 871906f32fbeSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 872006f32fbeSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 872106f32fbeSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 872206f32fbeSmrg])# _LT_DECL_SED 8723ea133fd7Smrg 872406f32fbeSmrgm4_ifndef([AC_PROG_SED], [ 872506f32fbeSmrg# NOTE: This macro has been submitted for inclusion into # 872606f32fbeSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 872706f32fbeSmrg# a released version of Autoconf we should remove this # 872806f32fbeSmrg# macro and use it instead. # 8729ea133fd7Smrg 873006f32fbeSmrgm4_defun([AC_PROG_SED], 873106f32fbeSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 873206f32fbeSmrgAC_CACHE_VAL(lt_cv_path_SED, 873306f32fbeSmrg[# Loop through the user's path and test for sed and gsed. 873406f32fbeSmrg# Then use that list of sed's as ones to test for truncation. 873506f32fbeSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 873606f32fbeSmrgfor as_dir in $PATH 873706f32fbeSmrgdo 873806f32fbeSmrg IFS=$as_save_IFS 873906f32fbeSmrg test -z "$as_dir" && as_dir=. 874006f32fbeSmrg for lt_ac_prog in sed gsed; do 874106f32fbeSmrg for ac_exec_ext in '' $ac_executable_extensions; do 874206f32fbeSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 874306f32fbeSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 874406f32fbeSmrg fi 874506f32fbeSmrg done 874606f32fbeSmrg done 874706f32fbeSmrgdone 874806f32fbeSmrgIFS=$as_save_IFS 874906f32fbeSmrglt_ac_max=0 875006f32fbeSmrglt_ac_count=0 875106f32fbeSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 875206f32fbeSmrg# along with /bin/sed that truncates output. 875306f32fbeSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 875406f32fbeSmrg test ! -f $lt_ac_sed && continue 875506f32fbeSmrg cat /dev/null > conftest.in 875606f32fbeSmrg lt_ac_count=0 875706f32fbeSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 875806f32fbeSmrg # Check for GNU sed and select it if it is found. 875906f32fbeSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 876006f32fbeSmrg lt_cv_path_SED=$lt_ac_sed 876106f32fbeSmrg break 876206f32fbeSmrg fi 876306f32fbeSmrg while true; do 876406f32fbeSmrg cat conftest.in conftest.in >conftest.tmp 876506f32fbeSmrg mv conftest.tmp conftest.in 876606f32fbeSmrg cp conftest.in conftest.nl 876706f32fbeSmrg echo >>conftest.nl 876806f32fbeSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 876906f32fbeSmrg cmp -s conftest.out conftest.nl || break 877006f32fbeSmrg # 10000 chars as input seems more than enough 877106f32fbeSmrg test $lt_ac_count -gt 10 && break 877206f32fbeSmrg lt_ac_count=`expr $lt_ac_count + 1` 877306f32fbeSmrg if test $lt_ac_count -gt $lt_ac_max; then 877406f32fbeSmrg lt_ac_max=$lt_ac_count 877506f32fbeSmrg lt_cv_path_SED=$lt_ac_sed 877606f32fbeSmrg fi 877706f32fbeSmrg done 877806f32fbeSmrgdone 877925b89263Smrg]) 878006f32fbeSmrgSED=$lt_cv_path_SED 878106f32fbeSmrgAC_SUBST([SED]) 878206f32fbeSmrgAC_MSG_RESULT([$SED]) 878306f32fbeSmrg])#AC_PROG_SED 878406f32fbeSmrg])#m4_ifndef 8785ea133fd7Smrg 878606f32fbeSmrg# Old name: 878706f32fbeSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 878806f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 878906f32fbeSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8790ea133fd7Smrg 8791ea133fd7Smrg 879206f32fbeSmrg# _LT_CHECK_SHELL_FEATURES 879306f32fbeSmrg# ------------------------ 879406f32fbeSmrg# Find out whether the shell is Bourne or XSI compatible, 879506f32fbeSmrg# or has some other useful features. 879606f32fbeSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 879706f32fbeSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 879806f32fbeSmrg# Try some XSI features 879906f32fbeSmrgxsi_shell=no 880006f32fbeSmrg( _lt_dummy="a/b/c" 880106f32fbeSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 880206f32fbeSmrg = c,a/b,b/c, \ 880306f32fbeSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 880406f32fbeSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 880506f32fbeSmrg && xsi_shell=yes 880606f32fbeSmrgAC_MSG_RESULT([$xsi_shell]) 880706f32fbeSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8808ea133fd7Smrg 880906f32fbeSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 881006f32fbeSmrglt_shell_append=no 881106f32fbeSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 881206f32fbeSmrg >/dev/null 2>&1 \ 881306f32fbeSmrg && lt_shell_append=yes 881406f32fbeSmrgAC_MSG_RESULT([$lt_shell_append]) 881506f32fbeSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8816ea133fd7Smrg 881706f32fbeSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 881806f32fbeSmrg lt_unset=unset 881906f32fbeSmrgelse 882006f32fbeSmrg lt_unset=false 882106f32fbeSmrgfi 882206f32fbeSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8823ea133fd7Smrg 882406f32fbeSmrg# test EBCDIC or ASCII 882506f32fbeSmrgcase `echo X|tr X '\101'` in 882606f32fbeSmrg A) # ASCII based system 882706f32fbeSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 882806f32fbeSmrg lt_SP2NL='tr \040 \012' 882906f32fbeSmrg lt_NL2SP='tr \015\012 \040\040' 883006f32fbeSmrg ;; 883106f32fbeSmrg *) # EBCDIC based system 883206f32fbeSmrg lt_SP2NL='tr \100 \n' 883306f32fbeSmrg lt_NL2SP='tr \r\n \100\100' 883406f32fbeSmrg ;; 883506f32fbeSmrgesac 883606f32fbeSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 883706f32fbeSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 883806f32fbeSmrg])# _LT_CHECK_SHELL_FEATURES 883906f32fbeSmrg 884006f32fbeSmrg 884106f32fbeSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 884206f32fbeSmrg# ------------------------------------------------------ 884306f32fbeSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 884406f32fbeSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 884506f32fbeSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 884606f32fbeSmrg[dnl { 884706f32fbeSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 884806f32fbeSmrg$1 ()\ 884906f32fbeSmrg{\ 885006f32fbeSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 885106f32fbeSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 885206f32fbeSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 885306f32fbeSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 885406f32fbeSmrgtest 0 -eq $? || _lt_function_replace_fail=: 885506f32fbeSmrg]) 8856ea133fd7Smrg 8857ea133fd7Smrg 885806f32fbeSmrg# _LT_PROG_REPLACE_SHELLFNS 885906f32fbeSmrg# ------------------------- 886006f32fbeSmrg# Replace existing portable implementations of several shell functions with 886106f32fbeSmrg# equivalent extended shell implementations where those features are available.. 886206f32fbeSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 886306f32fbeSmrg[if test x"$xsi_shell" = xyes; then 886406f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 886506f32fbeSmrg case ${1} in 886606f32fbeSmrg */*) func_dirname_result="${1%/*}${2}" ;; 886706f32fbeSmrg * ) func_dirname_result="${3}" ;; 886806f32fbeSmrg esac]) 886906f32fbeSmrg 887006f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 887106f32fbeSmrg func_basename_result="${1##*/}"]) 887206f32fbeSmrg 887306f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 887406f32fbeSmrg case ${1} in 887506f32fbeSmrg */*) func_dirname_result="${1%/*}${2}" ;; 887606f32fbeSmrg * ) func_dirname_result="${3}" ;; 887725b89263Smrg esac 887806f32fbeSmrg func_basename_result="${1##*/}"]) 8879ea133fd7Smrg 888006f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 888106f32fbeSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 888206f32fbeSmrg # positional parameters, so assign one to ordinary parameter first. 888306f32fbeSmrg func_stripname_result=${3} 888406f32fbeSmrg func_stripname_result=${func_stripname_result#"${1}"} 888506f32fbeSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 888606f32fbeSmrg 888706f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 888806f32fbeSmrg func_split_long_opt_name=${1%%=*} 888906f32fbeSmrg func_split_long_opt_arg=${1#*=}]) 889006f32fbeSmrg 889106f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 889206f32fbeSmrg func_split_short_opt_arg=${1#??} 889306f32fbeSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 889406f32fbeSmrg 889506f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 889606f32fbeSmrg case ${1} in 889706f32fbeSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 889806f32fbeSmrg *) func_lo2o_result=${1} ;; 889906f32fbeSmrg esac]) 890006f32fbeSmrg 890106f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 890206f32fbeSmrg 890306f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 890406f32fbeSmrg 890506f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 890625b89263Smrgfi 8907ea133fd7Smrg 890806f32fbeSmrgif test x"$lt_shell_append" = xyes; then 890906f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 8910ea133fd7Smrg 891106f32fbeSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 891206f32fbeSmrg func_quote_for_eval "${2}" 891306f32fbeSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 891406f32fbeSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 8915ea133fd7Smrg 891606f32fbeSmrg # Save a `func_append' function call where possible by direct use of '+=' 891706f32fbeSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 891806f32fbeSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 891906f32fbeSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 892006f32fbeSmrg test 0 -eq $? || _lt_function_replace_fail=: 892106f32fbeSmrgelse 892206f32fbeSmrg # Save a `func_append' function call even when '+=' is not available 892306f32fbeSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 892406f32fbeSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 892506f32fbeSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 892606f32fbeSmrg test 0 -eq $? || _lt_function_replace_fail=: 892706f32fbeSmrgfi 8928ea133fd7Smrg 892906f32fbeSmrgif test x"$_lt_function_replace_fail" = x":"; then 893006f32fbeSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 893106f32fbeSmrgfi 893206f32fbeSmrg]) 8933ea133fd7Smrg 893406f32fbeSmrg# _LT_PATH_CONVERSION_FUNCTIONS 893506f32fbeSmrg# ----------------------------- 893606f32fbeSmrg# Determine which file name conversion functions should be used by 893706f32fbeSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 893806f32fbeSmrg# for certain cross-compile configurations and native mingw. 893906f32fbeSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 894006f32fbeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 894106f32fbeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 894206f32fbeSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 894306f32fbeSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 894406f32fbeSmrg[case $host in 894506f32fbeSmrg *-*-mingw* ) 894606f32fbeSmrg case $build in 894706f32fbeSmrg *-*-mingw* ) # actually msys 894806f32fbeSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 894906f32fbeSmrg ;; 895006f32fbeSmrg *-*-cygwin* ) 895106f32fbeSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 895206f32fbeSmrg ;; 895306f32fbeSmrg * ) # otherwise, assume *nix 895406f32fbeSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 895506f32fbeSmrg ;; 895606f32fbeSmrg esac 895725b89263Smrg ;; 895806f32fbeSmrg *-*-cygwin* ) 895906f32fbeSmrg case $build in 896006f32fbeSmrg *-*-mingw* ) # actually msys 896106f32fbeSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 896206f32fbeSmrg ;; 896306f32fbeSmrg *-*-cygwin* ) 896406f32fbeSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 896506f32fbeSmrg ;; 896606f32fbeSmrg * ) # otherwise, assume *nix 896706f32fbeSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 896806f32fbeSmrg ;; 896925b89263Smrg esac 897025b89263Smrg ;; 897106f32fbeSmrg * ) # unhandled hosts (and "normal" native builds) 897206f32fbeSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 897306f32fbeSmrg ;; 897425b89263Smrgesac 897525b89263Smrg]) 897606f32fbeSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 897706f32fbeSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 897806f32fbeSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 897906f32fbeSmrg [0], [convert $build file names to $host format])dnl 898006f32fbeSmrg 898106f32fbeSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 898206f32fbeSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 898306f32fbeSmrg[#assume ordinary cross tools, or native build. 898406f32fbeSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 898506f32fbeSmrgcase $host in 898606f32fbeSmrg *-*-mingw* ) 898706f32fbeSmrg case $build in 898806f32fbeSmrg *-*-mingw* ) # actually msys 898906f32fbeSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 899006f32fbeSmrg ;; 899106f32fbeSmrg esac 899206f32fbeSmrg ;; 899325b89263Smrgesac 899406f32fbeSmrg]) 899506f32fbeSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 899606f32fbeSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 899706f32fbeSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 899806f32fbeSmrg [0], [convert $build files to toolchain format])dnl 899906f32fbeSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 9000ea133fd7Smrg 900106f32fbeSmrg# Helper functions for option handling. -*- Autoconf -*- 900206f32fbeSmrg# 900306f32fbeSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 900406f32fbeSmrg# Inc. 900506f32fbeSmrg# Written by Gary V. Vaughan, 2004 900606f32fbeSmrg# 900706f32fbeSmrg# This file is free software; the Free Software Foundation gives 900806f32fbeSmrg# unlimited permission to copy and/or distribute it, with or without 900906f32fbeSmrg# modifications, as long as this notice is preserved. 9010ea133fd7Smrg 901106f32fbeSmrg# serial 7 ltoptions.m4 9012ea133fd7Smrg 901306f32fbeSmrg# This is to help aclocal find these macros, as it can't see m4_define. 901406f32fbeSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9015ea133fd7Smrg 9016ea133fd7Smrg 901706f32fbeSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 901806f32fbeSmrg# ------------------------------------------ 901906f32fbeSmrgm4_define([_LT_MANGLE_OPTION], 902006f32fbeSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9021ea133fd7Smrg 9022ea133fd7Smrg 902306f32fbeSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 902406f32fbeSmrg# --------------------------------------- 902506f32fbeSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 902606f32fbeSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 902706f32fbeSmrg# saved as a flag. 902806f32fbeSmrgm4_define([_LT_SET_OPTION], 902906f32fbeSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 903006f32fbeSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 903106f32fbeSmrg _LT_MANGLE_DEFUN([$1], [$2]), 903206f32fbeSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 903306f32fbeSmrg]) 9034ea133fd7Smrg 903525b89263Smrg 903606f32fbeSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 903706f32fbeSmrg# ------------------------------------------------------------ 903806f32fbeSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 903906f32fbeSmrgm4_define([_LT_IF_OPTION], 904006f32fbeSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 904125b89263Smrg 904225b89263Smrg 904306f32fbeSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 904406f32fbeSmrg# ------------------------------------------------------- 904506f32fbeSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 904606f32fbeSmrg# are set. 904706f32fbeSmrgm4_define([_LT_UNLESS_OPTIONS], 904806f32fbeSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 904906f32fbeSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 905006f32fbeSmrg [m4_define([$0_found])])])[]dnl 905106f32fbeSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 905206f32fbeSmrg])[]dnl 905306f32fbeSmrg]) 905406f32fbeSmrg 905506f32fbeSmrg 905606f32fbeSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 905706f32fbeSmrg# ---------------------------------------- 905806f32fbeSmrg# OPTION-LIST is a space-separated list of Libtool options associated 905906f32fbeSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 906006f32fbeSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 906106f32fbeSmrg# the unknown option and exit. 906206f32fbeSmrgm4_defun([_LT_SET_OPTIONS], 906306f32fbeSmrg[# Set options 906406f32fbeSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 906506f32fbeSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 906606f32fbeSmrg 906706f32fbeSmrgm4_if([$1],[LT_INIT],[ 906806f32fbeSmrg dnl 906906f32fbeSmrg dnl Simply set some default values (i.e off) if boolean options were not 907006f32fbeSmrg dnl specified: 907106f32fbeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 907206f32fbeSmrg ]) 907306f32fbeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 907406f32fbeSmrg ]) 907506f32fbeSmrg dnl 907606f32fbeSmrg dnl If no reference was made to various pairs of opposing options, then 907706f32fbeSmrg dnl we run the default mode handler for the pair. For example, if neither 907806f32fbeSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 907906f32fbeSmrg dnl archives by default: 908006f32fbeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 908106f32fbeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 908206f32fbeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 908306f32fbeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 908406f32fbeSmrg [_LT_ENABLE_FAST_INSTALL]) 908506f32fbeSmrg ]) 908606f32fbeSmrg])# _LT_SET_OPTIONS 908706f32fbeSmrg 908825b89263Smrg 9089ea133fd7Smrg 909006f32fbeSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 909106f32fbeSmrg# ----------------------------------------- 909206f32fbeSmrgm4_define([_LT_MANGLE_DEFUN], 909306f32fbeSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9094ea133fd7Smrg 9095ea133fd7Smrg 909606f32fbeSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 909706f32fbeSmrg# ----------------------------------------------- 909806f32fbeSmrgm4_define([LT_OPTION_DEFINE], 909906f32fbeSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 910006f32fbeSmrg])# LT_OPTION_DEFINE 9101ea133fd7Smrg 9102ea133fd7Smrg 910306f32fbeSmrg# dlopen 910406f32fbeSmrg# ------ 910506f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 910606f32fbeSmrg]) 9107ea133fd7Smrg 910806f32fbeSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 910906f32fbeSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 911006f32fbeSmrgAC_DIAGNOSE([obsolete], 911106f32fbeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 911206f32fbeSmrgput the `dlopen' option into LT_INIT's first parameter.]) 911306f32fbeSmrg]) 9114ea133fd7Smrg 911506f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 911606f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9117ea133fd7Smrg 9118ea133fd7Smrg 911906f32fbeSmrg# win32-dll 912006f32fbeSmrg# --------- 912106f32fbeSmrg# Declare package support for building win32 dll's. 912206f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 912306f32fbeSmrg[enable_win32_dll=yes 9124ea133fd7Smrg 912506f32fbeSmrgcase $host in 912606f32fbeSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 912706f32fbeSmrg AC_CHECK_TOOL(AS, as, false) 912806f32fbeSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 912906f32fbeSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 913006f32fbeSmrg ;; 913106f32fbeSmrgesac 9132ea133fd7Smrg 913306f32fbeSmrgtest -z "$AS" && AS=as 913406f32fbeSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9135ea133fd7Smrg 913606f32fbeSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 913706f32fbeSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9138ea133fd7Smrg 913906f32fbeSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 914006f32fbeSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 914106f32fbeSmrg])# win32-dll 9142ea133fd7Smrg 914306f32fbeSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 914406f32fbeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 914506f32fbeSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 914606f32fbeSmrgAC_DIAGNOSE([obsolete], 914706f32fbeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 914806f32fbeSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 914906f32fbeSmrg]) 9150ea133fd7Smrg 915106f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 915206f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 915325b89263Smrg 9154ea133fd7Smrg 915506f32fbeSmrg# _LT_ENABLE_SHARED([DEFAULT]) 915606f32fbeSmrg# ---------------------------- 915706f32fbeSmrg# implement the --enable-shared flag, and supports the `shared' and 915806f32fbeSmrg# `disable-shared' LT_INIT options. 915906f32fbeSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 916006f32fbeSmrgm4_define([_LT_ENABLE_SHARED], 916106f32fbeSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 916206f32fbeSmrgAC_ARG_ENABLE([shared], 916306f32fbeSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 916406f32fbeSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 916506f32fbeSmrg [p=${PACKAGE-default} 916606f32fbeSmrg case $enableval in 916706f32fbeSmrg yes) enable_shared=yes ;; 916806f32fbeSmrg no) enable_shared=no ;; 916906f32fbeSmrg *) 917006f32fbeSmrg enable_shared=no 917106f32fbeSmrg # Look at the argument we got. We use all the common list separators. 917206f32fbeSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 917306f32fbeSmrg for pkg in $enableval; do 917406f32fbeSmrg IFS="$lt_save_ifs" 917506f32fbeSmrg if test "X$pkg" = "X$p"; then 917606f32fbeSmrg enable_shared=yes 917706f32fbeSmrg fi 917806f32fbeSmrg done 917906f32fbeSmrg IFS="$lt_save_ifs" 918006f32fbeSmrg ;; 918106f32fbeSmrg esac], 918206f32fbeSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9183ea133fd7Smrg 918406f32fbeSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 918506f32fbeSmrg [Whether or not to build shared libraries]) 918606f32fbeSmrg])# _LT_ENABLE_SHARED 9187ea133fd7Smrg 918806f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 918906f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9190ea133fd7Smrg 919106f32fbeSmrg# Old names: 919206f32fbeSmrgAC_DEFUN([AC_ENABLE_SHARED], 919306f32fbeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 919406f32fbeSmrg]) 9195ea133fd7Smrg 919606f32fbeSmrgAC_DEFUN([AC_DISABLE_SHARED], 919706f32fbeSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 919806f32fbeSmrg]) 9199ea133fd7Smrg 920006f32fbeSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 920106f32fbeSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9202ea133fd7Smrg 920306f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 920406f32fbeSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 920506f32fbeSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9206ea133fd7Smrg 9207ea133fd7Smrg 9208ea133fd7Smrg 920906f32fbeSmrg# _LT_ENABLE_STATIC([DEFAULT]) 921006f32fbeSmrg# ---------------------------- 921106f32fbeSmrg# implement the --enable-static flag, and support the `static' and 921206f32fbeSmrg# `disable-static' LT_INIT options. 921306f32fbeSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 921406f32fbeSmrgm4_define([_LT_ENABLE_STATIC], 921506f32fbeSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 921606f32fbeSmrgAC_ARG_ENABLE([static], 921706f32fbeSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 921806f32fbeSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 921906f32fbeSmrg [p=${PACKAGE-default} 922006f32fbeSmrg case $enableval in 922106f32fbeSmrg yes) enable_static=yes ;; 922206f32fbeSmrg no) enable_static=no ;; 922306f32fbeSmrg *) 922406f32fbeSmrg enable_static=no 922506f32fbeSmrg # Look at the argument we got. We use all the common list separators. 922606f32fbeSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 922706f32fbeSmrg for pkg in $enableval; do 922806f32fbeSmrg IFS="$lt_save_ifs" 922906f32fbeSmrg if test "X$pkg" = "X$p"; then 923006f32fbeSmrg enable_static=yes 923106f32fbeSmrg fi 923206f32fbeSmrg done 923306f32fbeSmrg IFS="$lt_save_ifs" 923406f32fbeSmrg ;; 923506f32fbeSmrg esac], 923606f32fbeSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 923706f32fbeSmrg 923806f32fbeSmrg _LT_DECL([build_old_libs], [enable_static], [0], 923906f32fbeSmrg [Whether or not to build static libraries]) 924006f32fbeSmrg])# _LT_ENABLE_STATIC 924106f32fbeSmrg 924206f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 924306f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9244ea133fd7Smrg 924506f32fbeSmrg# Old names: 924606f32fbeSmrgAC_DEFUN([AC_ENABLE_STATIC], 924706f32fbeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 924806f32fbeSmrg]) 9249ea133fd7Smrg 925006f32fbeSmrgAC_DEFUN([AC_DISABLE_STATIC], 925106f32fbeSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 925206f32fbeSmrg]) 9253ea133fd7Smrg 925406f32fbeSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 925506f32fbeSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9256a253d6aeSmrg 925706f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 925806f32fbeSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 925906f32fbeSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9260a253d6aeSmrg 9261a253d6aeSmrg 9262a253d6aeSmrg 926306f32fbeSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 926406f32fbeSmrg# ---------------------------------- 926506f32fbeSmrg# implement the --enable-fast-install flag, and support the `fast-install' 926606f32fbeSmrg# and `disable-fast-install' LT_INIT options. 926706f32fbeSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 926806f32fbeSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 926906f32fbeSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 927006f32fbeSmrgAC_ARG_ENABLE([fast-install], 927106f32fbeSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 927206f32fbeSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 927306f32fbeSmrg [p=${PACKAGE-default} 927406f32fbeSmrg case $enableval in 927506f32fbeSmrg yes) enable_fast_install=yes ;; 927606f32fbeSmrg no) enable_fast_install=no ;; 927706f32fbeSmrg *) 927806f32fbeSmrg enable_fast_install=no 927906f32fbeSmrg # Look at the argument we got. We use all the common list separators. 928006f32fbeSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 928106f32fbeSmrg for pkg in $enableval; do 928206f32fbeSmrg IFS="$lt_save_ifs" 928306f32fbeSmrg if test "X$pkg" = "X$p"; then 928406f32fbeSmrg enable_fast_install=yes 928506f32fbeSmrg fi 928606f32fbeSmrg done 928706f32fbeSmrg IFS="$lt_save_ifs" 928806f32fbeSmrg ;; 928906f32fbeSmrg esac], 929006f32fbeSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9291a253d6aeSmrg 929206f32fbeSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 929306f32fbeSmrg [Whether or not to optimize for fast installation])dnl 929406f32fbeSmrg])# _LT_ENABLE_FAST_INSTALL 9295a253d6aeSmrg 929606f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 929706f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9298a253d6aeSmrg 929906f32fbeSmrg# Old names: 930006f32fbeSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 930106f32fbeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 930206f32fbeSmrgAC_DIAGNOSE([obsolete], 930306f32fbeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 930406f32fbeSmrgthe `fast-install' option into LT_INIT's first parameter.]) 930506f32fbeSmrg]) 9306a253d6aeSmrg 930706f32fbeSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 930806f32fbeSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 930906f32fbeSmrgAC_DIAGNOSE([obsolete], 931006f32fbeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 931106f32fbeSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 931206f32fbeSmrg]) 9313a253d6aeSmrg 931406f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 931506f32fbeSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 931606f32fbeSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9317a253d6aeSmrg 9318a253d6aeSmrg 931906f32fbeSmrg# _LT_WITH_PIC([MODE]) 932006f32fbeSmrg# -------------------- 932106f32fbeSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 932206f32fbeSmrg# LT_INIT options. 932306f32fbeSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 932406f32fbeSmrgm4_define([_LT_WITH_PIC], 932506f32fbeSmrg[AC_ARG_WITH([pic], 932657ee1794Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 932706f32fbeSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 932857ee1794Smrg [lt_p=${PACKAGE-default} 932957ee1794Smrg case $withval in 933057ee1794Smrg yes|no) pic_mode=$withval ;; 933157ee1794Smrg *) 933257ee1794Smrg pic_mode=default 933357ee1794Smrg # Look at the argument we got. We use all the common list separators. 933457ee1794Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 933557ee1794Smrg for lt_pkg in $withval; do 933657ee1794Smrg IFS="$lt_save_ifs" 933757ee1794Smrg if test "X$lt_pkg" = "X$lt_p"; then 933857ee1794Smrg pic_mode=yes 933957ee1794Smrg fi 934057ee1794Smrg done 934157ee1794Smrg IFS="$lt_save_ifs" 934257ee1794Smrg ;; 934357ee1794Smrg esac], 934406f32fbeSmrg [pic_mode=default]) 9345a253d6aeSmrg 934606f32fbeSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9347a253d6aeSmrg 934806f32fbeSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 934906f32fbeSmrg])# _LT_WITH_PIC 9350ea133fd7Smrg 935106f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 935206f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9353ea133fd7Smrg 935406f32fbeSmrg# Old name: 935506f32fbeSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 935606f32fbeSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 935706f32fbeSmrgAC_DIAGNOSE([obsolete], 935806f32fbeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 935906f32fbeSmrgput the `pic-only' option into LT_INIT's first parameter.]) 936006f32fbeSmrg]) 9361ea133fd7Smrg 936206f32fbeSmrgdnl aclocal-1.4 backwards compatibility: 936306f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9364ea133fd7Smrg 9365ea133fd7Smrg 936606f32fbeSmrgm4_define([_LTDL_MODE], []) 936706f32fbeSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 936806f32fbeSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 936906f32fbeSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 937006f32fbeSmrg [m4_define([_LTDL_MODE], [recursive])]) 937106f32fbeSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 937206f32fbeSmrg [m4_define([_LTDL_MODE], [subproject])]) 9373ea133fd7Smrg 937406f32fbeSmrgm4_define([_LTDL_TYPE], []) 937506f32fbeSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 937606f32fbeSmrg [m4_define([_LTDL_TYPE], [installable])]) 937706f32fbeSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 937806f32fbeSmrg [m4_define([_LTDL_TYPE], [convenience])]) 9379ea133fd7Smrg 938006f32fbeSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 938106f32fbeSmrg# 938206f32fbeSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 938306f32fbeSmrg# Written by Gary V. Vaughan, 2004 938406f32fbeSmrg# 938506f32fbeSmrg# This file is free software; the Free Software Foundation gives 938606f32fbeSmrg# unlimited permission to copy and/or distribute it, with or without 938706f32fbeSmrg# modifications, as long as this notice is preserved. 9388ea133fd7Smrg 938906f32fbeSmrg# serial 6 ltsugar.m4 939025b89263Smrg 939106f32fbeSmrg# This is to help aclocal find these macros, as it can't see m4_define. 939206f32fbeSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 939325b89263Smrg 939425b89263Smrg 939506f32fbeSmrg# lt_join(SEP, ARG1, [ARG2...]) 939606f32fbeSmrg# ----------------------------- 939706f32fbeSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 939806f32fbeSmrg# associated separator. 939906f32fbeSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 940006f32fbeSmrg# versions in m4sugar had bugs. 940106f32fbeSmrgm4_define([lt_join], 940206f32fbeSmrg[m4_if([$#], [1], [], 940306f32fbeSmrg [$#], [2], [[$2]], 940406f32fbeSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 940506f32fbeSmrgm4_define([_lt_join], 940606f32fbeSmrg[m4_if([$#$2], [2], [], 940706f32fbeSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 940825b89263Smrg 940925b89263Smrg 941006f32fbeSmrg# lt_car(LIST) 941106f32fbeSmrg# lt_cdr(LIST) 941206f32fbeSmrg# ------------ 941306f32fbeSmrg# Manipulate m4 lists. 941406f32fbeSmrg# These macros are necessary as long as will still need to support 941506f32fbeSmrg# Autoconf-2.59 which quotes differently. 941606f32fbeSmrgm4_define([lt_car], [[$1]]) 941706f32fbeSmrgm4_define([lt_cdr], 941806f32fbeSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 941906f32fbeSmrg [$#], 1, [], 942006f32fbeSmrg [m4_dquote(m4_shift($@))])]) 942106f32fbeSmrgm4_define([lt_unquote], $1) 9422ea133fd7Smrg 9423ea133fd7Smrg 942406f32fbeSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 942506f32fbeSmrg# ------------------------------------------ 942606f32fbeSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 942706f32fbeSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 942806f32fbeSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 942906f32fbeSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 943006f32fbeSmrg# than defined and empty). 943106f32fbeSmrg# 943206f32fbeSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 943306f32fbeSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 943406f32fbeSmrgm4_define([lt_append], 943506f32fbeSmrg[m4_define([$1], 943606f32fbeSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9437a253d6aeSmrg 9438a253d6aeSmrg 9439a253d6aeSmrg 944006f32fbeSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 944106f32fbeSmrg# ---------------------------------------------------------- 944206f32fbeSmrg# Produce a SEP delimited list of all paired combinations of elements of 944306f32fbeSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 944406f32fbeSmrg# has the form PREFIXmINFIXSUFFIXn. 944506f32fbeSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 944606f32fbeSmrgm4_define([lt_combine], 944706f32fbeSmrg[m4_if(m4_eval([$# > 3]), [1], 944806f32fbeSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 944906f32fbeSmrg[[m4_foreach([_Lt_prefix], [$2], 945006f32fbeSmrg [m4_foreach([_Lt_suffix], 945106f32fbeSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 945206f32fbeSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9453a253d6aeSmrg 9454a253d6aeSmrg 945506f32fbeSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 945606f32fbeSmrg# ----------------------------------------------------------------------- 945706f32fbeSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 945806f32fbeSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 945906f32fbeSmrgm4_define([lt_if_append_uniq], 946006f32fbeSmrg[m4_ifdef([$1], 946106f32fbeSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 946206f32fbeSmrg [lt_append([$1], [$2], [$3])$4], 946306f32fbeSmrg [$5])], 946406f32fbeSmrg [lt_append([$1], [$2], [$3])$4])]) 9465a253d6aeSmrg 9466a253d6aeSmrg 946706f32fbeSmrg# lt_dict_add(DICT, KEY, VALUE) 946806f32fbeSmrg# ----------------------------- 946906f32fbeSmrgm4_define([lt_dict_add], 947006f32fbeSmrg[m4_define([$1($2)], [$3])]) 9471a253d6aeSmrg 9472a253d6aeSmrg 947306f32fbeSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 947406f32fbeSmrg# -------------------------------------------- 947506f32fbeSmrgm4_define([lt_dict_add_subkey], 947606f32fbeSmrg[m4_define([$1($2:$3)], [$4])]) 9477a253d6aeSmrg 9478a253d6aeSmrg 947906f32fbeSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 948006f32fbeSmrg# ---------------------------------- 948106f32fbeSmrgm4_define([lt_dict_fetch], 948206f32fbeSmrg[m4_ifval([$3], 948306f32fbeSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 948406f32fbeSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9485ea133fd7Smrg 9486ea133fd7Smrg 948706f32fbeSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 948806f32fbeSmrg# ----------------------------------------------------------------- 948906f32fbeSmrgm4_define([lt_if_dict_fetch], 949006f32fbeSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 949106f32fbeSmrg [$5], 949206f32fbeSmrg [$6])]) 9493ea133fd7Smrg 9494ea133fd7Smrg 949506f32fbeSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 949606f32fbeSmrg# -------------------------------------------------------------- 949706f32fbeSmrgm4_define([lt_dict_filter], 949806f32fbeSmrg[m4_if([$5], [], [], 949906f32fbeSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 950006f32fbeSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 950106f32fbeSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 950206f32fbeSmrg]) 9503a253d6aeSmrg 950406f32fbeSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 950506f32fbeSmrg# 950606f32fbeSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 950706f32fbeSmrg# Written by Scott James Remnant, 2004 950806f32fbeSmrg# 950906f32fbeSmrg# This file is free software; the Free Software Foundation gives 951006f32fbeSmrg# unlimited permission to copy and/or distribute it, with or without 951106f32fbeSmrg# modifications, as long as this notice is preserved. 9512ea133fd7Smrg 951306f32fbeSmrg# @configure_input@ 9514ea133fd7Smrg 951557ee1794Smrg# serial 3337 ltversion.m4 951606f32fbeSmrg# This file is part of GNU Libtool 9517ea133fd7Smrg 951857ee1794Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 951957ee1794Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 9520a253d6aeSmrg 952106f32fbeSmrgAC_DEFUN([LTVERSION_VERSION], 952257ee1794Smrg[macro_version='2.4.2' 952357ee1794Smrgmacro_revision='1.3337' 952406f32fbeSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 952506f32fbeSmrg_LT_DECL(, macro_revision, 0) 952606f32fbeSmrg]) 9527a253d6aeSmrg 952806f32fbeSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 952906f32fbeSmrg# 953006f32fbeSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 953106f32fbeSmrg# Written by Scott James Remnant, 2004. 953206f32fbeSmrg# 953306f32fbeSmrg# This file is free software; the Free Software Foundation gives 953406f32fbeSmrg# unlimited permission to copy and/or distribute it, with or without 953506f32fbeSmrg# modifications, as long as this notice is preserved. 9536a253d6aeSmrg 953706f32fbeSmrg# serial 5 lt~obsolete.m4 9538ea133fd7Smrg 953906f32fbeSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 954006f32fbeSmrg# 954106f32fbeSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 954206f32fbeSmrg# which have later been changed to m4_define as they aren't part of the 954306f32fbeSmrg# exported API, or moved to Autoconf or Automake where they belong. 954406f32fbeSmrg# 954506f32fbeSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 954606f32fbeSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 954706f32fbeSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 954806f32fbeSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 954906f32fbeSmrg# and doesn't know about Autoconf macros at all.) 955006f32fbeSmrg# 955106f32fbeSmrg# So we provide this file, which has a silly filename so it's always 955206f32fbeSmrg# included after everything else. This provides aclocal with the 955306f32fbeSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 955406f32fbeSmrg# because those macros already exist, or will be overwritten later. 955506f32fbeSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 955606f32fbeSmrg# 955706f32fbeSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 955806f32fbeSmrg# Yes, that means every name once taken will need to remain here until 955906f32fbeSmrg# we give up compatibility with versions before 1.7, at which point 956006f32fbeSmrg# we need to keep only those names which we still refer to. 9561ea133fd7Smrg 956206f32fbeSmrg# This is to help aclocal find these macros, as it can't see m4_define. 956306f32fbeSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9564a253d6aeSmrg 956506f32fbeSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 956606f32fbeSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 956706f32fbeSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 956806f32fbeSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 956906f32fbeSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 957006f32fbeSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 957106f32fbeSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 957206f32fbeSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 957306f32fbeSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 957406f32fbeSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 957506f32fbeSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 957606f32fbeSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 957706f32fbeSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 957806f32fbeSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 957906f32fbeSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 958006f32fbeSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 958106f32fbeSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 958206f32fbeSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 958306f32fbeSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 958406f32fbeSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 958506f32fbeSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 958606f32fbeSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 958706f32fbeSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 958806f32fbeSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 958906f32fbeSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 959006f32fbeSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 959106f32fbeSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 959206f32fbeSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 959306f32fbeSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 959406f32fbeSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 959506f32fbeSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 959606f32fbeSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 959706f32fbeSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 959806f32fbeSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 959906f32fbeSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 960006f32fbeSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 960106f32fbeSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 960206f32fbeSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 960306f32fbeSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 960406f32fbeSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 960506f32fbeSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 960606f32fbeSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 960706f32fbeSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 960806f32fbeSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 960906f32fbeSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 961006f32fbeSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 961106f32fbeSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 961206f32fbeSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 961306f32fbeSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 961406f32fbeSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 961506f32fbeSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 961606f32fbeSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 961706f32fbeSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 961806f32fbeSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 961906f32fbeSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 962006f32fbeSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 962106f32fbeSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 962206f32fbeSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 962306f32fbeSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 962406f32fbeSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 962506f32fbeSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9626a253d6aeSmrg 962757ee1794Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 962857ee1794Smrg# 962957ee1794Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 963057ee1794Smrg# 963157ee1794Smrg# This program is free software; you can redistribute it and/or modify 963257ee1794Smrg# it under the terms of the GNU General Public License as published by 963357ee1794Smrg# the Free Software Foundation; either version 2 of the License, or 963457ee1794Smrg# (at your option) any later version. 963557ee1794Smrg# 963657ee1794Smrg# This program is distributed in the hope that it will be useful, but 963757ee1794Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 963857ee1794Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 963957ee1794Smrg# General Public License for more details. 964057ee1794Smrg# 964157ee1794Smrg# You should have received a copy of the GNU General Public License 964257ee1794Smrg# along with this program; if not, write to the Free Software 964357ee1794Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 964457ee1794Smrg# 964557ee1794Smrg# As a special exception to the GNU General Public License, if you 964657ee1794Smrg# distribute this file as part of a program that contains a 964757ee1794Smrg# configuration script generated by Autoconf, you may include it under 964857ee1794Smrg# the same distribution terms that you use for the rest of that program. 964957ee1794Smrg 965057ee1794Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 965157ee1794Smrg# ---------------------------------- 965257ee1794SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 965357ee1794Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 965457ee1794Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 965557ee1794SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 965657ee1794Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 965757ee1794Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 965857ee1794Smrgfi 965957ee1794Smrgif test -n "$PKG_CONFIG"; then 966057ee1794Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 966157ee1794Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 966257ee1794Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 966357ee1794Smrg AC_MSG_RESULT([yes]) 966457ee1794Smrg else 966557ee1794Smrg AC_MSG_RESULT([no]) 966657ee1794Smrg PKG_CONFIG="" 966757ee1794Smrg fi 966857ee1794Smrg 966957ee1794Smrgfi[]dnl 967057ee1794Smrg])# PKG_PROG_PKG_CONFIG 967157ee1794Smrg 967257ee1794Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 967357ee1794Smrg# 967457ee1794Smrg# Check to see whether a particular set of modules exists. Similar 967557ee1794Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 967657ee1794Smrg# 967757ee1794Smrg# 967857ee1794Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 967957ee1794Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 968057ee1794Smrg# PKG_CHECK_EXISTS manually 968157ee1794Smrg# -------------------------------------------------------------- 968257ee1794SmrgAC_DEFUN([PKG_CHECK_EXISTS], 968357ee1794Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 968457ee1794Smrgif test -n "$PKG_CONFIG" && \ 968557ee1794Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 968657ee1794Smrg m4_ifval([$2], [$2], [:]) 968757ee1794Smrgm4_ifvaln([$3], [else 968857ee1794Smrg $3])dnl 968957ee1794Smrgfi]) 969057ee1794Smrg 969157ee1794Smrg 969257ee1794Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 969357ee1794Smrg# --------------------------------------------- 969457ee1794Smrgm4_define([_PKG_CONFIG], 969557ee1794Smrg[if test -n "$$1"; then 969657ee1794Smrg pkg_cv_[]$1="$$1" 969757ee1794Smrg elif test -n "$PKG_CONFIG"; then 969857ee1794Smrg PKG_CHECK_EXISTS([$3], 969957ee1794Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 970057ee1794Smrg [pkg_failed=yes]) 970157ee1794Smrg else 970257ee1794Smrg pkg_failed=untried 970357ee1794Smrgfi[]dnl 970457ee1794Smrg])# _PKG_CONFIG 970557ee1794Smrg 970657ee1794Smrg# _PKG_SHORT_ERRORS_SUPPORTED 970757ee1794Smrg# ----------------------------- 970857ee1794SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 970957ee1794Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 971057ee1794Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 971157ee1794Smrg _pkg_short_errors_supported=yes 971257ee1794Smrgelse 971357ee1794Smrg _pkg_short_errors_supported=no 971457ee1794Smrgfi[]dnl 971557ee1794Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 971657ee1794Smrg 971757ee1794Smrg 971857ee1794Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 971957ee1794Smrg# [ACTION-IF-NOT-FOUND]) 972057ee1794Smrg# 972157ee1794Smrg# 972257ee1794Smrg# Note that if there is a possibility the first call to 972357ee1794Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 972457ee1794Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 972557ee1794Smrg# 972657ee1794Smrg# 972757ee1794Smrg# -------------------------------------------------------------- 972857ee1794SmrgAC_DEFUN([PKG_CHECK_MODULES], 972957ee1794Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 973057ee1794SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 973157ee1794SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 973257ee1794Smrg 973357ee1794Smrgpkg_failed=no 973457ee1794SmrgAC_MSG_CHECKING([for $1]) 973557ee1794Smrg 973657ee1794Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 973757ee1794Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 973857ee1794Smrg 973957ee1794Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 974057ee1794Smrgand $1[]_LIBS to avoid the need to call pkg-config. 974157ee1794SmrgSee the pkg-config man page for more details.]) 974257ee1794Smrg 974357ee1794Smrgif test $pkg_failed = yes; then 974457ee1794Smrg _PKG_SHORT_ERRORS_SUPPORTED 974557ee1794Smrg if test $_pkg_short_errors_supported = yes; then 974657ee1794Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 974757ee1794Smrg else 974857ee1794Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 974957ee1794Smrg fi 975057ee1794Smrg # Put the nasty error message in config.log where it belongs 975157ee1794Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 975257ee1794Smrg 975357ee1794Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 975457ee1794Smrg[Package requirements ($2) were not met: 975557ee1794Smrg 975657ee1794Smrg$$1_PKG_ERRORS 975757ee1794Smrg 975857ee1794SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 975957ee1794Smrginstalled software in a non-standard prefix. 976057ee1794Smrg 976157ee1794Smrg_PKG_TEXT 976257ee1794Smrg])], 976357ee1794Smrg [AC_MSG_RESULT([no]) 976457ee1794Smrg $4]) 976557ee1794Smrgelif test $pkg_failed = untried; then 976657ee1794Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 976757ee1794Smrg[The pkg-config script could not be found or is too old. Make sure it 976857ee1794Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 976957ee1794Smrgpath to pkg-config. 977057ee1794Smrg 977157ee1794Smrg_PKG_TEXT 977257ee1794Smrg 977357ee1794SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 977457ee1794Smrg [$4]) 977557ee1794Smrgelse 977657ee1794Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 977757ee1794Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 977857ee1794Smrg AC_MSG_RESULT([yes]) 977957ee1794Smrg ifelse([$3], , :, [$3]) 978057ee1794Smrgfi[]dnl 978157ee1794Smrg])# PKG_CHECK_MODULES 978257ee1794Smrg 978306f32fbeSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 978406f32fbeSmrgdnl 978506f32fbeSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 978606f32fbeSmrgdnl 978706f32fbeSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 978806f32fbeSmrgdnl copy of this software and associated documentation files (the "Software"), 978906f32fbeSmrgdnl to deal in the Software without restriction, including without limitation 979006f32fbeSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 979106f32fbeSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 979206f32fbeSmrgdnl Software is furnished to do so, subject to the following conditions: 979306f32fbeSmrgdnl 979406f32fbeSmrgdnl The above copyright notice and this permission notice (including the next 979506f32fbeSmrgdnl paragraph) shall be included in all copies or substantial portions of the 979606f32fbeSmrgdnl Software. 979706f32fbeSmrgdnl 979806f32fbeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 979906f32fbeSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 980006f32fbeSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 980106f32fbeSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 980206f32fbeSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 980306f32fbeSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 980406f32fbeSmrgdnl DEALINGS IN THE SOFTWARE. 980525b89263Smrg 980606f32fbeSmrg# XORG_MACROS_VERSION(required-version) 980706f32fbeSmrg# ------------------------------------- 980806f32fbeSmrg# Minimum version: 1.1.0 980906f32fbeSmrg# 981006f32fbeSmrg# If you're using a macro added in Version 1.1 or newer, include this in 981106f32fbeSmrg# your configure.ac with the minimum required version, such as: 981206f32fbeSmrg# XORG_MACROS_VERSION(1.1) 981306f32fbeSmrg# 981406f32fbeSmrg# To ensure that this macro is defined, also add: 981506f32fbeSmrg# m4_ifndef([XORG_MACROS_VERSION], 981606f32fbeSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 981706f32fbeSmrg# 981806f32fbeSmrg# 981906f32fbeSmrg# See the "minimum version" comment for each macro you use to see what 982006f32fbeSmrg# version you require. 982106f32fbeSmrgm4_defun([XORG_MACROS_VERSION],[ 982257ee1794Smrgm4_define([vers_have], [1.17]) 982306f32fbeSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 982406f32fbeSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 982506f32fbeSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 982606f32fbeSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 982706f32fbeSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 982806f32fbeSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 982906f32fbeSmrgm4_undefine([vers_have]) 983006f32fbeSmrgm4_undefine([maj_have]) 983106f32fbeSmrgm4_undefine([maj_needed]) 983206f32fbeSmrg]) # XORG_MACROS_VERSION 983325b89263Smrg 983406f32fbeSmrg# XORG_PROG_RAWCPP() 983506f32fbeSmrg# ------------------ 983606f32fbeSmrg# Minimum version: 1.0.0 983706f32fbeSmrg# 983806f32fbeSmrg# Find cpp program and necessary flags for use in pre-processing text files 983906f32fbeSmrg# such as man pages and config files 984006f32fbeSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 984106f32fbeSmrgAC_REQUIRE([AC_PROG_CPP]) 984206f32fbeSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 984306f32fbeSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9844a253d6aeSmrg 984506f32fbeSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 984606f32fbeSmrg# which is not the best choice for supporting other OS'es, but covers most 984706f32fbeSmrg# of the ones we need for now. 984806f32fbeSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 984906f32fbeSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 985006f32fbeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 985106f32fbeSmrg AC_MSG_RESULT([no]) 985206f32fbeSmrgelse 985306f32fbeSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 985406f32fbeSmrg RAWCPPFLAGS=-undef 985506f32fbeSmrg AC_MSG_RESULT([yes]) 985606f32fbeSmrg # under Cygwin unix is still defined even with -undef 985706f32fbeSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 985806f32fbeSmrg RAWCPPFLAGS="-undef -ansi" 985906f32fbeSmrg AC_MSG_RESULT([yes, with -ansi]) 986006f32fbeSmrg else 986106f32fbeSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 986206f32fbeSmrg fi 986306f32fbeSmrgfi 986406f32fbeSmrgrm -f conftest.$ac_ext 9865a253d6aeSmrg 986606f32fbeSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 986706f32fbeSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 986806f32fbeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 986906f32fbeSmrg AC_MSG_RESULT([no]) 987006f32fbeSmrgelse 987106f32fbeSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 987206f32fbeSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 987306f32fbeSmrg AC_MSG_RESULT([yes]) 987406f32fbeSmrg else 987506f32fbeSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 987606f32fbeSmrg fi 987706f32fbeSmrgfi 987806f32fbeSmrgrm -f conftest.$ac_ext 987906f32fbeSmrgAC_SUBST(RAWCPPFLAGS) 988006f32fbeSmrg]) # XORG_PROG_RAWCPP 9881a253d6aeSmrg 988206f32fbeSmrg# XORG_MANPAGE_SECTIONS() 988306f32fbeSmrg# ----------------------- 988406f32fbeSmrg# Minimum version: 1.0.0 988506f32fbeSmrg# 988606f32fbeSmrg# Determine which sections man pages go in for the different man page types 988706f32fbeSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 988806f32fbeSmrg# Not sure if there's any better way than just hardcoding by OS name. 988906f32fbeSmrg# Override default settings by setting environment variables 989006f32fbeSmrg# Added MAN_SUBSTS in version 1.8 989106f32fbeSmrg# Added AC_PROG_SED in version 1.8 9892a253d6aeSmrg 989306f32fbeSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 989406f32fbeSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 989506f32fbeSmrgAC_REQUIRE([AC_PROG_SED]) 9896a253d6aeSmrg 989706f32fbeSmrgif test x$APP_MAN_SUFFIX = x ; then 989806f32fbeSmrg APP_MAN_SUFFIX=1 989906f32fbeSmrgfi 990006f32fbeSmrgif test x$APP_MAN_DIR = x ; then 990106f32fbeSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 990206f32fbeSmrgfi 9903a253d6aeSmrg 990406f32fbeSmrgif test x$LIB_MAN_SUFFIX = x ; then 990506f32fbeSmrg LIB_MAN_SUFFIX=3 990606f32fbeSmrgfi 990706f32fbeSmrgif test x$LIB_MAN_DIR = x ; then 990806f32fbeSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 990906f32fbeSmrgfi 991025b89263Smrg 991106f32fbeSmrgif test x$FILE_MAN_SUFFIX = x ; then 991206f32fbeSmrg case $host_os in 991306f32fbeSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 991406f32fbeSmrg *) FILE_MAN_SUFFIX=5 ;; 991506f32fbeSmrg esac 991606f32fbeSmrgfi 991706f32fbeSmrgif test x$FILE_MAN_DIR = x ; then 991806f32fbeSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 991906f32fbeSmrgfi 992025b89263Smrg 992106f32fbeSmrgif test x$MISC_MAN_SUFFIX = x ; then 992206f32fbeSmrg case $host_os in 992306f32fbeSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 992406f32fbeSmrg *) MISC_MAN_SUFFIX=7 ;; 992506f32fbeSmrg esac 992606f32fbeSmrgfi 992706f32fbeSmrgif test x$MISC_MAN_DIR = x ; then 992806f32fbeSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 992906f32fbeSmrgfi 993025b89263Smrg 993106f32fbeSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 993206f32fbeSmrg case $host_os in 993306f32fbeSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 993406f32fbeSmrg *) DRIVER_MAN_SUFFIX=4 ;; 993506f32fbeSmrg esac 993606f32fbeSmrgfi 993706f32fbeSmrgif test x$DRIVER_MAN_DIR = x ; then 993806f32fbeSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 993906f32fbeSmrgfi 994025b89263Smrg 994106f32fbeSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 994206f32fbeSmrg case $host_os in 994306f32fbeSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 994406f32fbeSmrg *) ADMIN_MAN_SUFFIX=8 ;; 994506f32fbeSmrg esac 994606f32fbeSmrgfi 994706f32fbeSmrgif test x$ADMIN_MAN_DIR = x ; then 994806f32fbeSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 994906f32fbeSmrgfi 995025b89263Smrg 995125b89263Smrg 995206f32fbeSmrgAC_SUBST([APP_MAN_SUFFIX]) 995306f32fbeSmrgAC_SUBST([LIB_MAN_SUFFIX]) 995406f32fbeSmrgAC_SUBST([FILE_MAN_SUFFIX]) 995506f32fbeSmrgAC_SUBST([MISC_MAN_SUFFIX]) 995606f32fbeSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 995706f32fbeSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 995806f32fbeSmrgAC_SUBST([APP_MAN_DIR]) 995906f32fbeSmrgAC_SUBST([LIB_MAN_DIR]) 996006f32fbeSmrgAC_SUBST([FILE_MAN_DIR]) 996106f32fbeSmrgAC_SUBST([MISC_MAN_DIR]) 996206f32fbeSmrgAC_SUBST([DRIVER_MAN_DIR]) 996306f32fbeSmrgAC_SUBST([ADMIN_MAN_DIR]) 996425b89263Smrg 996506f32fbeSmrgXORG_MAN_PAGE="X Version 11" 996606f32fbeSmrgAC_SUBST([XORG_MAN_PAGE]) 996706f32fbeSmrgMAN_SUBSTS="\ 996806f32fbeSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 996906f32fbeSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 997006f32fbeSmrg -e 's|__xservername__|Xorg|g' \ 997106f32fbeSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 997206f32fbeSmrg -e 's|__projectroot__|\$(prefix)|g' \ 997306f32fbeSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 997406f32fbeSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 997506f32fbeSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 997606f32fbeSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 997706f32fbeSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 997806f32fbeSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 997906f32fbeSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 998006f32fbeSmrgAC_SUBST([MAN_SUBSTS]) 998125b89263Smrg 998206f32fbeSmrg]) # XORG_MANPAGE_SECTIONS 9983a253d6aeSmrg 998406f32fbeSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 998506f32fbeSmrg# ------------------------ 998606f32fbeSmrg# Minimum version: 1.7.0 998725b89263Smrg# 998806f32fbeSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 998906f32fbeSmrg# provided by xorg-sgml-doctools, if installed. 999006f32fbeSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 999106f32fbeSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 999206f32fbeSmrgXORG_SGML_PATH= 999306f32fbeSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 999406f32fbeSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 999506f32fbeSmrg [m4_ifval([$1],[:], 999606f32fbeSmrg [if test x"$cross_compiling" != x"yes" ; then 999706f32fbeSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 999806f32fbeSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 999906f32fbeSmrg fi]) 1000006f32fbeSmrg ]) 10001a253d6aeSmrg 1000206f32fbeSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1000306f32fbeSmrg# the path and the name of the doc stylesheet 1000406f32fbeSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1000506f32fbeSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1000606f32fbeSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1000706f32fbeSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1000806f32fbeSmrgelse 1000906f32fbeSmrg AC_MSG_RESULT([no]) 1001006f32fbeSmrgfi 10011a253d6aeSmrg 1001206f32fbeSmrgAC_SUBST(XORG_SGML_PATH) 1001306f32fbeSmrgAC_SUBST(STYLESHEET_SRCDIR) 1001406f32fbeSmrgAC_SUBST(XSL_STYLESHEET) 1001506f32fbeSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1001606f32fbeSmrg]) # XORG_CHECK_SGML_DOCTOOLS 10017a253d6aeSmrg 1001806f32fbeSmrg# XORG_CHECK_LINUXDOC 1001906f32fbeSmrg# ------------------- 1002006f32fbeSmrg# Minimum version: 1.0.0 1002106f32fbeSmrg# 1002206f32fbeSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1002306f32fbeSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1002406f32fbeSmrg# Whether or not the necessary tools and files are found can be checked 1002506f32fbeSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1002606f32fbeSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1002706f32fbeSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1002806f32fbeSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10029a253d6aeSmrg 1003006f32fbeSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10031a253d6aeSmrg 1003206f32fbeSmrgAC_MSG_CHECKING([whether to build documentation]) 10033a253d6aeSmrg 1003406f32fbeSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1003506f32fbeSmrg BUILDDOC=yes 1003606f32fbeSmrgelse 1003706f32fbeSmrg BUILDDOC=no 1003806f32fbeSmrgfi 10039a253d6aeSmrg 1004006f32fbeSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10041a253d6aeSmrg 1004206f32fbeSmrgAC_MSG_RESULT([$BUILDDOC]) 10043a253d6aeSmrg 1004406f32fbeSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10045a253d6aeSmrg 1004606f32fbeSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1004706f32fbeSmrg BUILDPDFDOC=yes 1004806f32fbeSmrgelse 1004906f32fbeSmrg BUILDPDFDOC=no 1005006f32fbeSmrgfi 10051a253d6aeSmrg 1005206f32fbeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10053a253d6aeSmrg 1005406f32fbeSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10055a253d6aeSmrg 1005606f32fbeSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1005706f32fbeSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1005806f32fbeSmrgMAKE_PDF="$PS2PDF" 1005906f32fbeSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10060a253d6aeSmrg 1006106f32fbeSmrgAC_SUBST(MAKE_TEXT) 1006206f32fbeSmrgAC_SUBST(MAKE_PS) 1006306f32fbeSmrgAC_SUBST(MAKE_PDF) 1006406f32fbeSmrgAC_SUBST(MAKE_HTML) 1006506f32fbeSmrg]) # XORG_CHECK_LINUXDOC 10066a253d6aeSmrg 1006706f32fbeSmrg# XORG_CHECK_DOCBOOK 1006806f32fbeSmrg# ------------------- 1006906f32fbeSmrg# Minimum version: 1.0.0 1007006f32fbeSmrg# 1007106f32fbeSmrg# Checks for the ability to build output formats from SGML DocBook source. 1007206f32fbeSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1007306f32fbeSmrg# indicates whether the necessary tools and files are found and, if set, 1007406f32fbeSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1007506f32fbeSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1007606f32fbeSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10077a253d6aeSmrg 1007806f32fbeSmrgBUILDTXTDOC=no 1007906f32fbeSmrgBUILDPDFDOC=no 1008006f32fbeSmrgBUILDPSDOC=no 1008106f32fbeSmrgBUILDHTMLDOC=no 10082a253d6aeSmrg 1008306f32fbeSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1008406f32fbeSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1008506f32fbeSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1008606f32fbeSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1008725b89263Smrg 1008806f32fbeSmrgAC_MSG_CHECKING([whether to build text documentation]) 1008906f32fbeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1009006f32fbeSmrg test x$BUILD_TXTDOC != xno; then 1009106f32fbeSmrg BUILDTXTDOC=yes 1009206f32fbeSmrgfi 1009306f32fbeSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1009406f32fbeSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1009525b89263Smrg 1009606f32fbeSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1009706f32fbeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1009806f32fbeSmrg test x$BUILD_PDFDOC != xno; then 1009906f32fbeSmrg BUILDPDFDOC=yes 1010006f32fbeSmrgfi 1010106f32fbeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1010206f32fbeSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10103a253d6aeSmrg 1010406f32fbeSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1010506f32fbeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1010606f32fbeSmrg test x$BUILD_PSDOC != xno; then 1010706f32fbeSmrg BUILDPSDOC=yes 1010806f32fbeSmrgfi 1010906f32fbeSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1011006f32fbeSmrgAC_MSG_RESULT([$BUILDPSDOC]) 10111a253d6aeSmrg 1011206f32fbeSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1011306f32fbeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1011406f32fbeSmrg test x$BUILD_HTMLDOC != xno; then 1011506f32fbeSmrg BUILDHTMLDOC=yes 1011606f32fbeSmrgfi 1011706f32fbeSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1011806f32fbeSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10119a253d6aeSmrg 1012006f32fbeSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1012106f32fbeSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1012206f32fbeSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1012306f32fbeSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10124a253d6aeSmrg 1012506f32fbeSmrgAC_SUBST(MAKE_TEXT) 1012606f32fbeSmrgAC_SUBST(MAKE_PS) 1012706f32fbeSmrgAC_SUBST(MAKE_PDF) 1012806f32fbeSmrgAC_SUBST(MAKE_HTML) 1012906f32fbeSmrg]) # XORG_CHECK_DOCBOOK 10130a253d6aeSmrg 1013106f32fbeSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1013206f32fbeSmrg# ---------------- 1013306f32fbeSmrg# Minimum version: 1.5.0 1013406f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1013506f32fbeSmrg# 1013606f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes 1013706f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the 1013806f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1013906f32fbeSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1014006f32fbeSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1014106f32fbeSmrg# --with-xmlto assumes 'auto'. 1014206f32fbeSmrg# 1014306f32fbeSmrg# Interface to module: 1014406f32fbeSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1014506f32fbeSmrg# XMLTO: returns the path of the xmlto program found 1014606f32fbeSmrg# returns the path set by the user in the environment 1014706f32fbeSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1014806f32fbeSmrg# 'no' user instructs the module not to use xmlto 1014906f32fbeSmrg# 1015006f32fbeSmrg# Added in version 1.10.0 1015106f32fbeSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1015206f32fbeSmrg# xmlto for text output requires either lynx, links, or w3m browsers 1015306f32fbeSmrg# 1015406f32fbeSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1015506f32fbeSmrg# 1015606f32fbeSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1015706f32fbeSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1015806f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto])) 1015906f32fbeSmrgAC_ARG_WITH(xmlto, 1016006f32fbeSmrg AS_HELP_STRING([--with-xmlto], 1016106f32fbeSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1016206f32fbeSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1016306f32fbeSmrgm4_undefine([_defopt]) 10164a253d6aeSmrg 1016506f32fbeSmrgif test "x$use_xmlto" = x"auto"; then 1016606f32fbeSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1016706f32fbeSmrg if test "x$XMLTO" = "x"; then 1016806f32fbeSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1016906f32fbeSmrg have_xmlto=no 1017006f32fbeSmrg else 1017106f32fbeSmrg have_xmlto=yes 1017206f32fbeSmrg fi 1017306f32fbeSmrgelif test "x$use_xmlto" = x"yes" ; then 1017406f32fbeSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1017506f32fbeSmrg if test "x$XMLTO" = "x"; then 1017606f32fbeSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1017706f32fbeSmrg fi 1017806f32fbeSmrg have_xmlto=yes 1017906f32fbeSmrgelif test "x$use_xmlto" = x"no" ; then 1018006f32fbeSmrg if test "x$XMLTO" != "x"; then 1018106f32fbeSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1018206f32fbeSmrg fi 1018306f32fbeSmrg have_xmlto=no 1018406f32fbeSmrgelse 1018506f32fbeSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1018606f32fbeSmrgfi 10187a253d6aeSmrg 1018806f32fbeSmrg# Test for a minimum version of xmlto, if provided. 1018906f32fbeSmrgm4_ifval([$1], 1019006f32fbeSmrg[if test "$have_xmlto" = yes; then 1019106f32fbeSmrg # scrape the xmlto version 1019206f32fbeSmrg AC_MSG_CHECKING([the xmlto version]) 1019306f32fbeSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1019406f32fbeSmrg AC_MSG_RESULT([$xmlto_version]) 1019506f32fbeSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1019606f32fbeSmrg [if test "x$use_xmlto" = xauto; then 1019706f32fbeSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1019806f32fbeSmrg have_xmlto=no 1019906f32fbeSmrg else 1020006f32fbeSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1020106f32fbeSmrg fi]) 1020206f32fbeSmrgfi]) 10203a253d6aeSmrg 1020406f32fbeSmrg# Test for the ability of xmlto to generate a text target 1020506f32fbeSmrghave_xmlto_text=no 1020606f32fbeSmrgcat > conftest.xml << "EOF" 1020706f32fbeSmrgEOF 1020806f32fbeSmrgAS_IF([test "$have_xmlto" = yes], 1020906f32fbeSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1021006f32fbeSmrg [have_xmlto_text=yes], 1021106f32fbeSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1021206f32fbeSmrgrm -f conftest.xml 1021306f32fbeSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1021406f32fbeSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1021506f32fbeSmrg]) # XORG_WITH_XMLTO 10216a253d6aeSmrg 1021706f32fbeSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1021806f32fbeSmrg# -------------------------------------------- 1021906f32fbeSmrg# Minimum version: 1.12.0 1022006f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.12.0 1022106f32fbeSmrg# 1022206f32fbeSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1022306f32fbeSmrg# XML-based language used for the transformation of XML documents. 1022406f32fbeSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1022506f32fbeSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1022606f32fbeSmrg# The XSLT processor is often used as a standalone tool for transformations. 1022706f32fbeSmrg# It should not be assumed that this tool is used only to work with documnetation. 1022806f32fbeSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1022906f32fbeSmrg# 1023006f32fbeSmrg# Interface to module: 1023106f32fbeSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1023206f32fbeSmrg# XSLTPROC: returns the path of the xsltproc program found 1023306f32fbeSmrg# returns the path set by the user in the environment 1023406f32fbeSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1023506f32fbeSmrg# 'no' user instructs the module not to use xsltproc 1023606f32fbeSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1023706f32fbeSmrg# 1023806f32fbeSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1023906f32fbeSmrg# 1024006f32fbeSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1024106f32fbeSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1024206f32fbeSmrg# Preserves the interface, should it be implemented later 1024306f32fbeSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1024406f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto])) 1024506f32fbeSmrgAC_ARG_WITH(xsltproc, 1024606f32fbeSmrg AS_HELP_STRING([--with-xsltproc], 1024706f32fbeSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1024806f32fbeSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1024906f32fbeSmrgm4_undefine([_defopt]) 10250a253d6aeSmrg 1025106f32fbeSmrgif test "x$use_xsltproc" = x"auto"; then 1025206f32fbeSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1025306f32fbeSmrg if test "x$XSLTPROC" = "x"; then 1025406f32fbeSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1025506f32fbeSmrg have_xsltproc=no 1025606f32fbeSmrg else 1025706f32fbeSmrg have_xsltproc=yes 1025806f32fbeSmrg fi 1025906f32fbeSmrgelif test "x$use_xsltproc" = x"yes" ; then 1026006f32fbeSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1026106f32fbeSmrg if test "x$XSLTPROC" = "x"; then 1026206f32fbeSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1026306f32fbeSmrg fi 1026406f32fbeSmrg have_xsltproc=yes 1026506f32fbeSmrgelif test "x$use_xsltproc" = x"no" ; then 1026606f32fbeSmrg if test "x$XSLTPROC" != "x"; then 1026706f32fbeSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1026806f32fbeSmrg fi 1026906f32fbeSmrg have_xsltproc=no 1027006f32fbeSmrgelse 1027106f32fbeSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1027206f32fbeSmrgfi 10273a253d6aeSmrg 1027406f32fbeSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1027506f32fbeSmrg]) # XORG_WITH_XSLTPROC 10276a253d6aeSmrg 1027706f32fbeSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1027806f32fbeSmrg# ---------------------------------------- 1027906f32fbeSmrg# Minimum version: 1.15.0 1028006f32fbeSmrg# 1028106f32fbeSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 1028206f32fbeSmrg# scanning arbitrary text files, extracting information from those text files, 1028306f32fbeSmrg# and printing reports based on that information. 1028406f32fbeSmrg# 1028506f32fbeSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1028606f32fbeSmrg# 1028706f32fbeSmrg# Interface to module: 1028806f32fbeSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 1028906f32fbeSmrg# PERL: returns the path of the perl program found 1029006f32fbeSmrg# returns the path set by the user in the environment 1029106f32fbeSmrg# --with-perl: 'yes' user instructs the module to use perl 1029206f32fbeSmrg# 'no' user instructs the module not to use perl 1029306f32fbeSmrg# have_perl: returns yes if perl found in PATH or no 1029406f32fbeSmrg# 1029506f32fbeSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1029606f32fbeSmrg# 1029706f32fbeSmrgAC_DEFUN([XORG_WITH_PERL],[ 1029806f32fbeSmrgAC_ARG_VAR([PERL], [Path to perl command]) 1029906f32fbeSmrg# Preserves the interface, should it be implemented later 1030006f32fbeSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1030106f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto])) 1030206f32fbeSmrgAC_ARG_WITH(perl, 1030306f32fbeSmrg AS_HELP_STRING([--with-perl], 1030406f32fbeSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 1030506f32fbeSmrg [use_perl=$withval], [use_perl=]_defopt) 1030606f32fbeSmrgm4_undefine([_defopt]) 1030725b89263Smrg 1030806f32fbeSmrgif test "x$use_perl" = x"auto"; then 1030906f32fbeSmrg AC_PATH_PROG([PERL], [perl]) 1031006f32fbeSmrg if test "x$PERL" = "x"; then 1031106f32fbeSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1031206f32fbeSmrg have_perl=no 1031306f32fbeSmrg else 1031406f32fbeSmrg have_perl=yes 1031506f32fbeSmrg fi 1031606f32fbeSmrgelif test "x$use_perl" = x"yes" ; then 1031706f32fbeSmrg AC_PATH_PROG([PERL], [perl]) 1031806f32fbeSmrg if test "x$PERL" = "x"; then 1031906f32fbeSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1032006f32fbeSmrg fi 1032106f32fbeSmrg have_perl=yes 1032206f32fbeSmrgelif test "x$use_perl" = x"no" ; then 1032306f32fbeSmrg if test "x$PERL" != "x"; then 1032406f32fbeSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1032506f32fbeSmrg fi 1032606f32fbeSmrg have_perl=no 1032706f32fbeSmrgelse 1032806f32fbeSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1032906f32fbeSmrgfi 1033025b89263Smrg 1033106f32fbeSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1033206f32fbeSmrg]) # XORG_WITH_PERL 1033325b89263Smrg 1033406f32fbeSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1033506f32fbeSmrg# ---------------- 1033606f32fbeSmrg# Minimum version: 1.5.0 1033706f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1033806f32fbeSmrg# 1033906f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes 1034006f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the 1034106f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1034206f32fbeSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1034306f32fbeSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1034406f32fbeSmrg# --with-asciidoc assumes 'auto'. 1034506f32fbeSmrg# 1034606f32fbeSmrg# Interface to module: 1034706f32fbeSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1034806f32fbeSmrg# ASCIIDOC: returns the path of the asciidoc program found 1034906f32fbeSmrg# returns the path set by the user in the environment 1035006f32fbeSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1035106f32fbeSmrg# 'no' user instructs the module not to use asciidoc 1035206f32fbeSmrg# 1035306f32fbeSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1035406f32fbeSmrg# 1035506f32fbeSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1035606f32fbeSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1035706f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto])) 1035806f32fbeSmrgAC_ARG_WITH(asciidoc, 1035906f32fbeSmrg AS_HELP_STRING([--with-asciidoc], 1036006f32fbeSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1036106f32fbeSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1036206f32fbeSmrgm4_undefine([_defopt]) 10363a253d6aeSmrg 1036406f32fbeSmrgif test "x$use_asciidoc" = x"auto"; then 1036506f32fbeSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1036606f32fbeSmrg if test "x$ASCIIDOC" = "x"; then 1036706f32fbeSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1036806f32fbeSmrg have_asciidoc=no 1036906f32fbeSmrg else 1037006f32fbeSmrg have_asciidoc=yes 1037106f32fbeSmrg fi 1037206f32fbeSmrgelif test "x$use_asciidoc" = x"yes" ; then 1037306f32fbeSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1037406f32fbeSmrg if test "x$ASCIIDOC" = "x"; then 1037506f32fbeSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1037606f32fbeSmrg fi 1037706f32fbeSmrg have_asciidoc=yes 1037806f32fbeSmrgelif test "x$use_asciidoc" = x"no" ; then 1037906f32fbeSmrg if test "x$ASCIIDOC" != "x"; then 1038006f32fbeSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1038106f32fbeSmrg fi 1038206f32fbeSmrg have_asciidoc=no 1038306f32fbeSmrgelse 1038406f32fbeSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1038506f32fbeSmrgfi 1038606f32fbeSmrgm4_ifval([$1], 1038706f32fbeSmrg[if test "$have_asciidoc" = yes; then 1038806f32fbeSmrg # scrape the asciidoc version 1038906f32fbeSmrg AC_MSG_CHECKING([the asciidoc version]) 1039006f32fbeSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1039106f32fbeSmrg AC_MSG_RESULT([$asciidoc_version]) 1039206f32fbeSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1039306f32fbeSmrg [if test "x$use_asciidoc" = xauto; then 1039406f32fbeSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1039506f32fbeSmrg have_asciidoc=no 1039606f32fbeSmrg else 1039706f32fbeSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1039806f32fbeSmrg fi]) 1039906f32fbeSmrgfi]) 1040006f32fbeSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1040106f32fbeSmrg]) # XORG_WITH_ASCIIDOC 10402a253d6aeSmrg 1040306f32fbeSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1040406f32fbeSmrg# -------------------------------- 1040506f32fbeSmrg# Minimum version: 1.5.0 1040606f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1040706f32fbeSmrg# 1040806f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes 1040906f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the 1041006f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1041106f32fbeSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1041206f32fbeSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1041306f32fbeSmrg# --with-doxygen assumes 'auto'. 1041406f32fbeSmrg# 1041506f32fbeSmrg# Interface to module: 1041606f32fbeSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1041706f32fbeSmrg# DOXYGEN: returns the path of the doxygen program found 1041806f32fbeSmrg# returns the path set by the user in the environment 1041906f32fbeSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1042006f32fbeSmrg# 'no' user instructs the module not to use doxygen 1042106f32fbeSmrg# 1042206f32fbeSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1042306f32fbeSmrg# 1042406f32fbeSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1042506f32fbeSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1042606f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto])) 1042706f32fbeSmrgAC_ARG_WITH(doxygen, 1042806f32fbeSmrg AS_HELP_STRING([--with-doxygen], 1042906f32fbeSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1043006f32fbeSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1043106f32fbeSmrgm4_undefine([_defopt]) 10432a253d6aeSmrg 1043306f32fbeSmrgif test "x$use_doxygen" = x"auto"; then 1043406f32fbeSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1043506f32fbeSmrg if test "x$DOXYGEN" = "x"; then 1043606f32fbeSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1043706f32fbeSmrg have_doxygen=no 1043806f32fbeSmrg else 1043906f32fbeSmrg have_doxygen=yes 1044006f32fbeSmrg fi 1044106f32fbeSmrgelif test "x$use_doxygen" = x"yes" ; then 1044206f32fbeSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1044306f32fbeSmrg if test "x$DOXYGEN" = "x"; then 1044406f32fbeSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1044506f32fbeSmrg fi 1044606f32fbeSmrg have_doxygen=yes 1044706f32fbeSmrgelif test "x$use_doxygen" = x"no" ; then 1044806f32fbeSmrg if test "x$DOXYGEN" != "x"; then 1044906f32fbeSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1045006f32fbeSmrg fi 1045106f32fbeSmrg have_doxygen=no 1045206f32fbeSmrgelse 1045306f32fbeSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1045406f32fbeSmrgfi 1045506f32fbeSmrgm4_ifval([$1], 1045606f32fbeSmrg[if test "$have_doxygen" = yes; then 1045706f32fbeSmrg # scrape the doxygen version 1045806f32fbeSmrg AC_MSG_CHECKING([the doxygen version]) 1045906f32fbeSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1046006f32fbeSmrg AC_MSG_RESULT([$doxygen_version]) 1046106f32fbeSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1046206f32fbeSmrg [if test "x$use_doxygen" = xauto; then 1046306f32fbeSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1046406f32fbeSmrg have_doxygen=no 1046506f32fbeSmrg else 1046606f32fbeSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1046706f32fbeSmrg fi]) 1046806f32fbeSmrgfi]) 1046906f32fbeSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1047006f32fbeSmrg]) # XORG_WITH_DOXYGEN 10471a253d6aeSmrg 1047206f32fbeSmrg# XORG_WITH_GROFF([DEFAULT]) 1047306f32fbeSmrg# ---------------- 1047406f32fbeSmrg# Minimum version: 1.6.0 1047506f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1047606f32fbeSmrg# 1047706f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes 1047806f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the 1047906f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1048006f32fbeSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 1048106f32fbeSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 1048206f32fbeSmrg# --with-groff assumes 'auto'. 1048306f32fbeSmrg# 1048406f32fbeSmrg# Interface to module: 1048506f32fbeSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1048606f32fbeSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1048706f32fbeSmrg# HAVE_GROFF_MS: the -ms macros package 1048806f32fbeSmrg# GROFF: returns the path of the groff program found 1048906f32fbeSmrg# returns the path set by the user in the environment 1049006f32fbeSmrg# --with-groff: 'yes' user instructs the module to use groff 1049106f32fbeSmrg# 'no' user instructs the module not to use groff 1049206f32fbeSmrg# 1049306f32fbeSmrg# Added in version 1.9.0: 1049406f32fbeSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1049506f32fbeSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1049606f32fbeSmrg# psselect from the psutils package. 1049706f32fbeSmrg# the ghostcript package. Refer to the grohtml man pages 1049806f32fbeSmrg# 1049906f32fbeSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1050006f32fbeSmrg# 1050106f32fbeSmrg# OS and distros often splits groff in a basic and full package, the former 1050206f32fbeSmrg# having the groff program and the later having devices, fonts and macros 1050306f32fbeSmrg# Checking for the groff executable is not enough. 1050406f32fbeSmrg# 1050506f32fbeSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 1050606f32fbeSmrg# unset HAVE_GROFF or GROFF env variables. 1050706f32fbeSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1050806f32fbeSmrg# 1050906f32fbeSmrgAC_DEFUN([XORG_WITH_GROFF],[ 1051006f32fbeSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1051106f32fbeSmrgm4_define([_defopt], m4_default([$1], [auto])) 1051206f32fbeSmrgAC_ARG_WITH(groff, 1051306f32fbeSmrg AS_HELP_STRING([--with-groff], 1051406f32fbeSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1051506f32fbeSmrg [use_groff=$withval], [use_groff=]_defopt) 1051606f32fbeSmrgm4_undefine([_defopt]) 10517a253d6aeSmrg 1051806f32fbeSmrgif test "x$use_groff" = x"auto"; then 1051906f32fbeSmrg AC_PATH_PROG([GROFF], [groff]) 1052006f32fbeSmrg if test "x$GROFF" = "x"; then 1052106f32fbeSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1052206f32fbeSmrg have_groff=no 1052306f32fbeSmrg else 1052406f32fbeSmrg have_groff=yes 1052506f32fbeSmrg fi 1052606f32fbeSmrgelif test "x$use_groff" = x"yes" ; then 1052706f32fbeSmrg AC_PATH_PROG([GROFF], [groff]) 1052806f32fbeSmrg if test "x$GROFF" = "x"; then 1052906f32fbeSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1053006f32fbeSmrg fi 1053106f32fbeSmrg have_groff=yes 1053206f32fbeSmrgelif test "x$use_groff" = x"no" ; then 1053306f32fbeSmrg if test "x$GROFF" != "x"; then 1053406f32fbeSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1053506f32fbeSmrg fi 1053606f32fbeSmrg have_groff=no 1053706f32fbeSmrgelse 1053806f32fbeSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1053906f32fbeSmrgfi 10540a253d6aeSmrg 1054106f32fbeSmrg# We have groff, test for the presence of the macro packages 1054206f32fbeSmrgif test "x$have_groff" = x"yes"; then 1054306f32fbeSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1054406f32fbeSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1054506f32fbeSmrg groff_ms_works=yes 1054606f32fbeSmrg else 1054706f32fbeSmrg groff_ms_works=no 1054806f32fbeSmrg fi 1054906f32fbeSmrg AC_MSG_RESULT([$groff_ms_works]) 1055006f32fbeSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1055106f32fbeSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1055206f32fbeSmrg groff_mm_works=yes 1055306f32fbeSmrg else 1055406f32fbeSmrg groff_mm_works=no 1055506f32fbeSmrg fi 1055606f32fbeSmrg AC_MSG_RESULT([$groff_mm_works]) 1055706f32fbeSmrgfi 10558a253d6aeSmrg 1055906f32fbeSmrg# We have groff, test for HTML dependencies, one command per package 1056006f32fbeSmrgif test "x$have_groff" = x"yes"; then 1056106f32fbeSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1056206f32fbeSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1056306f32fbeSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1056406f32fbeSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1056506f32fbeSmrg have_groff_html=yes 1056606f32fbeSmrg else 1056706f32fbeSmrg have_groff_html=no 1056806f32fbeSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1056906f32fbeSmrg fi 1057006f32fbeSmrgfi 10571a253d6aeSmrg 1057206f32fbeSmrg# Set Automake conditionals for Makefiles 1057306f32fbeSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1057406f32fbeSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1057506f32fbeSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1057606f32fbeSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1057706f32fbeSmrg]) # XORG_WITH_GROFF 10578a253d6aeSmrg 1057906f32fbeSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1058006f32fbeSmrg# --------------------------------------- 1058106f32fbeSmrg# Minimum version: 1.6.0 1058206f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1058306f32fbeSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1058406f32fbeSmrg# 1058506f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes 1058606f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the 1058706f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1058806f32fbeSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 1058906f32fbeSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 1059006f32fbeSmrg# --with-fop assumes 'auto'. 1059106f32fbeSmrg# 1059206f32fbeSmrg# Interface to module: 1059306f32fbeSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1059406f32fbeSmrg# FOP: returns the path of the fop program found 1059506f32fbeSmrg# returns the path set by the user in the environment 1059606f32fbeSmrg# --with-fop: 'yes' user instructs the module to use fop 1059706f32fbeSmrg# 'no' user instructs the module not to use fop 1059806f32fbeSmrg# 1059906f32fbeSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1060006f32fbeSmrg# 1060106f32fbeSmrgAC_DEFUN([XORG_WITH_FOP],[ 1060206f32fbeSmrgAC_ARG_VAR([FOP], [Path to fop command]) 1060306f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto])) 1060406f32fbeSmrgAC_ARG_WITH(fop, 1060506f32fbeSmrg AS_HELP_STRING([--with-fop], 1060606f32fbeSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1060706f32fbeSmrg [use_fop=$withval], [use_fop=]_defopt) 1060806f32fbeSmrgm4_undefine([_defopt]) 10609a253d6aeSmrg 1061006f32fbeSmrgif test "x$use_fop" = x"auto"; then 1061106f32fbeSmrg AC_PATH_PROG([FOP], [fop]) 1061206f32fbeSmrg if test "x$FOP" = "x"; then 1061306f32fbeSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1061406f32fbeSmrg have_fop=no 1061506f32fbeSmrg else 1061606f32fbeSmrg have_fop=yes 1061706f32fbeSmrg fi 1061806f32fbeSmrgelif test "x$use_fop" = x"yes" ; then 1061906f32fbeSmrg AC_PATH_PROG([FOP], [fop]) 1062006f32fbeSmrg if test "x$FOP" = "x"; then 1062106f32fbeSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1062206f32fbeSmrg fi 1062306f32fbeSmrg have_fop=yes 1062406f32fbeSmrgelif test "x$use_fop" = x"no" ; then 1062506f32fbeSmrg if test "x$FOP" != "x"; then 1062606f32fbeSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1062706f32fbeSmrg fi 1062806f32fbeSmrg have_fop=no 1062906f32fbeSmrgelse 1063006f32fbeSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1063106f32fbeSmrgfi 10632a253d6aeSmrg 1063306f32fbeSmrg# Test for a minimum version of fop, if provided. 1063406f32fbeSmrgm4_ifval([$1], 1063506f32fbeSmrg[if test "$have_fop" = yes; then 1063606f32fbeSmrg # scrape the fop version 1063706f32fbeSmrg AC_MSG_CHECKING([for fop minimum version]) 1063806f32fbeSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1063906f32fbeSmrg AC_MSG_RESULT([$fop_version]) 1064006f32fbeSmrg AS_VERSION_COMPARE([$fop_version], [$1], 1064106f32fbeSmrg [if test "x$use_fop" = xauto; then 1064206f32fbeSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1064306f32fbeSmrg have_fop=no 1064406f32fbeSmrg else 1064506f32fbeSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1064606f32fbeSmrg fi]) 1064706f32fbeSmrgfi]) 1064806f32fbeSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1064906f32fbeSmrg]) # XORG_WITH_FOP 10650a253d6aeSmrg 1065106f32fbeSmrg# XORG_WITH_PS2PDF([DEFAULT]) 1065206f32fbeSmrg# ---------------- 1065306f32fbeSmrg# Minimum version: 1.6.0 1065406f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1065506f32fbeSmrg# 1065606f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes 1065706f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the 1065806f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1065906f32fbeSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1066006f32fbeSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1066106f32fbeSmrg# --with-ps2pdf assumes 'auto'. 1066206f32fbeSmrg# 1066306f32fbeSmrg# Interface to module: 1066406f32fbeSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1066506f32fbeSmrg# PS2PDF: returns the path of the ps2pdf program found 1066606f32fbeSmrg# returns the path set by the user in the environment 1066706f32fbeSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1066806f32fbeSmrg# 'no' user instructs the module not to use ps2pdf 1066906f32fbeSmrg# 1067006f32fbeSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1067106f32fbeSmrg# 1067206f32fbeSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1067306f32fbeSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1067406f32fbeSmrgm4_define([_defopt], m4_default([$1], [auto])) 1067506f32fbeSmrgAC_ARG_WITH(ps2pdf, 1067606f32fbeSmrg AS_HELP_STRING([--with-ps2pdf], 1067706f32fbeSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1067806f32fbeSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1067906f32fbeSmrgm4_undefine([_defopt]) 10680a253d6aeSmrg 1068106f32fbeSmrgif test "x$use_ps2pdf" = x"auto"; then 1068206f32fbeSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1068306f32fbeSmrg if test "x$PS2PDF" = "x"; then 1068406f32fbeSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1068506f32fbeSmrg have_ps2pdf=no 1068606f32fbeSmrg else 1068706f32fbeSmrg have_ps2pdf=yes 1068806f32fbeSmrg fi 1068906f32fbeSmrgelif test "x$use_ps2pdf" = x"yes" ; then 1069006f32fbeSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1069106f32fbeSmrg if test "x$PS2PDF" = "x"; then 1069206f32fbeSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1069306f32fbeSmrg fi 1069406f32fbeSmrg have_ps2pdf=yes 1069506f32fbeSmrgelif test "x$use_ps2pdf" = x"no" ; then 1069606f32fbeSmrg if test "x$PS2PDF" != "x"; then 1069706f32fbeSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1069806f32fbeSmrg fi 1069906f32fbeSmrg have_ps2pdf=no 1070006f32fbeSmrgelse 1070106f32fbeSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1070206f32fbeSmrgfi 1070306f32fbeSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1070406f32fbeSmrg]) # XORG_WITH_PS2PDF 10705a253d6aeSmrg 1070606f32fbeSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 1070706f32fbeSmrg# ---------------- 1070806f32fbeSmrg# Minimum version: 1.6.0 1070906f32fbeSmrg# 1071006f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes 1071106f32fbeSmrg# not at the appropriate level. This macro enables a builder to skip all 1071206f32fbeSmrg# documentation targets except traditional man pages. 1071306f32fbeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1071406f32fbeSmrg# maximum flexibilty in controlling documentation building. 1071506f32fbeSmrg# Refer to: 1071606f32fbeSmrg# XORG_WITH_XMLTO --with-xmlto 1071706f32fbeSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1071806f32fbeSmrg# XORG_WITH_DOXYGEN --with-doxygen 1071906f32fbeSmrg# XORG_WITH_FOP --with-fop 1072006f32fbeSmrg# XORG_WITH_GROFF --with-groff 1072106f32fbeSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1072206f32fbeSmrg# 1072306f32fbeSmrg# Interface to module: 1072406f32fbeSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1072506f32fbeSmrg# --enable-docs: 'yes' user instructs the module to generate docs 1072606f32fbeSmrg# 'no' user instructs the module not to generate docs 1072706f32fbeSmrg# parm1: specify the default value, yes or no. 1072806f32fbeSmrg# 1072906f32fbeSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1073006f32fbeSmrgm4_define([docs_default], m4_default([$1], [yes])) 1073106f32fbeSmrgAC_ARG_ENABLE(docs, 1073206f32fbeSmrg AS_HELP_STRING([--enable-docs], 1073306f32fbeSmrg [Enable building the documentation (default: ]docs_default[)]), 1073406f32fbeSmrg [build_docs=$enableval], [build_docs=]docs_default) 1073506f32fbeSmrgm4_undefine([docs_default]) 1073606f32fbeSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1073706f32fbeSmrgAC_MSG_CHECKING([whether to build documentation]) 1073806f32fbeSmrgAC_MSG_RESULT([$build_docs]) 1073906f32fbeSmrg]) # XORG_ENABLE_DOCS 10740a253d6aeSmrg 1074106f32fbeSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1074206f32fbeSmrg# ---------------- 1074306f32fbeSmrg# Minimum version: 1.6.0 1074406f32fbeSmrg# 1074506f32fbeSmrg# This macro enables a builder to skip all developer documentation. 1074606f32fbeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1074706f32fbeSmrg# maximum flexibilty in controlling documentation building. 1074806f32fbeSmrg# Refer to: 1074906f32fbeSmrg# XORG_WITH_XMLTO --with-xmlto 1075006f32fbeSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1075106f32fbeSmrg# XORG_WITH_DOXYGEN --with-doxygen 1075206f32fbeSmrg# XORG_WITH_FOP --with-fop 1075306f32fbeSmrg# XORG_WITH_GROFF --with-groff 1075406f32fbeSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1075506f32fbeSmrg# 1075606f32fbeSmrg# Interface to module: 1075706f32fbeSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1075806f32fbeSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1075906f32fbeSmrg# 'no' user instructs the module not to generate developer docs 1076006f32fbeSmrg# parm1: specify the default value, yes or no. 1076106f32fbeSmrg# 1076206f32fbeSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1076306f32fbeSmrgm4_define([devel_default], m4_default([$1], [yes])) 1076406f32fbeSmrgAC_ARG_ENABLE(devel-docs, 1076506f32fbeSmrg AS_HELP_STRING([--enable-devel-docs], 1076606f32fbeSmrg [Enable building the developer documentation (default: ]devel_default[)]), 1076706f32fbeSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1076806f32fbeSmrgm4_undefine([devel_default]) 1076906f32fbeSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1077006f32fbeSmrgAC_MSG_CHECKING([whether to build developer documentation]) 1077106f32fbeSmrgAC_MSG_RESULT([$build_devel_docs]) 1077206f32fbeSmrg]) # XORG_ENABLE_DEVEL_DOCS 1077325b89263Smrg 1077406f32fbeSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 1077506f32fbeSmrg# ---------------- 1077606f32fbeSmrg# Minimum version: 1.6.0 1077706f32fbeSmrg# 1077806f32fbeSmrg# This macro enables a builder to skip all functional specification targets. 1077906f32fbeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1078006f32fbeSmrg# maximum flexibilty in controlling documentation building. 1078106f32fbeSmrg# Refer to: 1078206f32fbeSmrg# XORG_WITH_XMLTO --with-xmlto 1078306f32fbeSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1078406f32fbeSmrg# XORG_WITH_DOXYGEN --with-doxygen 1078506f32fbeSmrg# XORG_WITH_FOP --with-fop 1078606f32fbeSmrg# XORG_WITH_GROFF --with-groff 1078706f32fbeSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1078806f32fbeSmrg# 1078906f32fbeSmrg# Interface to module: 1079006f32fbeSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1079106f32fbeSmrg# --enable-specs: 'yes' user instructs the module to generate specs 1079206f32fbeSmrg# 'no' user instructs the module not to generate specs 1079306f32fbeSmrg# parm1: specify the default value, yes or no. 1079406f32fbeSmrg# 1079506f32fbeSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1079606f32fbeSmrgm4_define([spec_default], m4_default([$1], [yes])) 1079706f32fbeSmrgAC_ARG_ENABLE(specs, 1079806f32fbeSmrg AS_HELP_STRING([--enable-specs], 1079906f32fbeSmrg [Enable building the specs (default: ]spec_default[)]), 1080006f32fbeSmrg [build_specs=$enableval], [build_specs=]spec_default) 1080106f32fbeSmrgm4_undefine([spec_default]) 1080206f32fbeSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1080306f32fbeSmrgAC_MSG_CHECKING([whether to build functional specifications]) 1080406f32fbeSmrgAC_MSG_RESULT([$build_specs]) 1080506f32fbeSmrg]) # XORG_ENABLE_SPECS 10806a253d6aeSmrg 1080706f32fbeSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1080806f32fbeSmrg# ---------------------------------------------- 1080906f32fbeSmrg# Minimum version: 1.13.0 1081006f32fbeSmrg# 1081106f32fbeSmrg# This macro enables a builder to enable/disable unit testing 1081206f32fbeSmrg# It makes no assumption about the test cases implementation 1081306f32fbeSmrg# Test cases may or may not use Automake "Support for test suites" 1081406f32fbeSmrg# They may or may not use the software utility library GLib 1081506f32fbeSmrg# 1081606f32fbeSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1081706f32fbeSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1081806f32fbeSmrg# The variable enable_unit_tests is used by other macros in this file. 1081906f32fbeSmrg# 1082006f32fbeSmrg# Interface to module: 1082106f32fbeSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1082206f32fbeSmrg# enable_unit_tests: used in configure.ac for additional configuration 1082306f32fbeSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1082406f32fbeSmrg# 'no' user instructs the module not to build tests 1082506f32fbeSmrg# parm1: specify the default value, yes or no. 1082606f32fbeSmrg# 1082706f32fbeSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1082806f32fbeSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1082906f32fbeSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1083006f32fbeSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1083106f32fbeSmrgm4_define([_defopt], m4_default([$1], [auto])) 1083206f32fbeSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1083306f32fbeSmrg [Enable building unit test cases (default: ]_defopt[)]), 1083406f32fbeSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1083506f32fbeSmrgm4_undefine([_defopt]) 1083606f32fbeSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1083706f32fbeSmrgAC_MSG_CHECKING([whether to build unit test cases]) 1083806f32fbeSmrgAC_MSG_RESULT([$enable_unit_tests]) 1083906f32fbeSmrg]) # XORG_ENABLE_UNIT_TESTS 10840a253d6aeSmrg 1084157ee1794Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1084257ee1794Smrg# ------------------------------------------------------ 1084357ee1794Smrg# Minimum version: 1.17.0 1084457ee1794Smrg# 1084557ee1794Smrg# This macro enables a builder to enable/disable integration testing 1084657ee1794Smrg# It makes no assumption about the test cases' implementation 1084757ee1794Smrg# Test cases may or may not use Automake "Support for test suites" 1084857ee1794Smrg# 1084957ee1794Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1085057ee1794Smrg# usually requires less dependencies and may be built and run under less 1085157ee1794Smrg# stringent environments than integration tests. 1085257ee1794Smrg# 1085357ee1794Smrg# Interface to module: 1085457ee1794Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1085557ee1794Smrg# enable_integration_tests: used in configure.ac for additional configuration 1085657ee1794Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1085757ee1794Smrg# 'no' user instructs the module not to build tests 1085857ee1794Smrg# parm1: specify the default value, yes or no. 1085957ee1794Smrg# 1086057ee1794SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1086157ee1794SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1086257ee1794Smrgm4_define([_defopt], m4_default([$1], [auto])) 1086357ee1794SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1086457ee1794Smrg [Enable building integration test cases (default: ]_defopt[)]), 1086557ee1794Smrg [enable_integration_tests=$enableval], 1086657ee1794Smrg [enable_integration_tests=]_defopt) 1086757ee1794Smrgm4_undefine([_defopt]) 1086857ee1794SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1086957ee1794Smrg [test "x$enable_integration_tests" != xno]) 1087057ee1794SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1087157ee1794SmrgAC_MSG_RESULT([$enable_integration_tests]) 1087257ee1794Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 1087357ee1794Smrg 1087406f32fbeSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1087506f32fbeSmrg# ---------------------------------------- 1087606f32fbeSmrg# Minimum version: 1.13.0 1087706f32fbeSmrg# 1087806f32fbeSmrg# GLib is a library which provides advanced data structures and functions. 1087906f32fbeSmrg# This macro enables a module to test for the presence of Glib. 1088006f32fbeSmrg# 1088106f32fbeSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1088206f32fbeSmrg# Otherwise the value of $enable_unit_tests is blank. 1088306f32fbeSmrg# 1088457ee1794Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1088557ee1794Smrg# test support usually requires less dependencies and may be built and run under 1088657ee1794Smrg# less stringent environments than integration tests. 1088757ee1794Smrg# 1088806f32fbeSmrg# Interface to module: 1088906f32fbeSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 1089006f32fbeSmrg# with_glib: used in configure.ac to know if GLib has been found 1089106f32fbeSmrg# --with-glib: 'yes' user instructs the module to use glib 1089206f32fbeSmrg# 'no' user instructs the module not to use glib 1089306f32fbeSmrg# 1089406f32fbeSmrgAC_DEFUN([XORG_WITH_GLIB],[ 1089506f32fbeSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1089606f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto])) 1089706f32fbeSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1089806f32fbeSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 1089906f32fbeSmrg [with_glib=$withval], [with_glib=]_defopt) 1090006f32fbeSmrgm4_undefine([_defopt]) 10901a253d6aeSmrg 1090206f32fbeSmrghave_glib=no 1090306f32fbeSmrg# Do not probe GLib if user explicitly disabled unit testing 1090406f32fbeSmrgif test "x$enable_unit_tests" != x"no"; then 1090506f32fbeSmrg # Do not probe GLib if user explicitly disabled it 1090606f32fbeSmrg if test "x$with_glib" != x"no"; then 1090706f32fbeSmrg m4_ifval( 1090806f32fbeSmrg [$1], 1090906f32fbeSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1091006f32fbeSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1091106f32fbeSmrg ) 1091206f32fbeSmrg fi 1091306f32fbeSmrgfi 10914a253d6aeSmrg 1091506f32fbeSmrg# Not having GLib when unit testing has been explicitly requested is an error 1091606f32fbeSmrgif test "x$enable_unit_tests" = x"yes"; then 1091706f32fbeSmrg if test "x$have_glib" = x"no"; then 1091806f32fbeSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1091906f32fbeSmrg fi 1092006f32fbeSmrgfi 10921a253d6aeSmrg 1092206f32fbeSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 1092306f32fbeSmrgif test "x$enable_unit_tests" = x"no"; then 1092406f32fbeSmrg if test "x$with_glib" = x"yes"; then 1092506f32fbeSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1092606f32fbeSmrg fi 1092706f32fbeSmrgfi 10928a253d6aeSmrg 1092906f32fbeSmrg# Not having GLib when it has been explicitly requested is an error 1093006f32fbeSmrgif test "x$with_glib" = x"yes"; then 1093106f32fbeSmrg if test "x$have_glib" = x"no"; then 1093206f32fbeSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1093306f32fbeSmrg fi 1093406f32fbeSmrgfi 10935a253d6aeSmrg 1093606f32fbeSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1093706f32fbeSmrg]) # XORG_WITH_GLIB 10938a253d6aeSmrg 1093906f32fbeSmrg# XORG_LD_WRAP([required|optional]) 1094006f32fbeSmrg# --------------------------------- 1094106f32fbeSmrg# Minimum version: 1.13.0 1094206f32fbeSmrg# 1094306f32fbeSmrg# Check if linker supports -wrap, passed via compiler flags 1094406f32fbeSmrg# 1094506f32fbeSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1094606f32fbeSmrg# Otherwise the value of $enable_unit_tests is blank. 1094706f32fbeSmrg# 1094806f32fbeSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1094906f32fbeSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1095006f32fbeSmrg# available, an argument of "optional" allows use when some unit tests require 1095106f32fbeSmrg# ld -wrap and others do not. 1095206f32fbeSmrg# 1095306f32fbeSmrgAC_DEFUN([XORG_LD_WRAP],[ 1095406f32fbeSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1095506f32fbeSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 1095606f32fbeSmrg void __wrap_exit(int status) { return; }], 1095706f32fbeSmrg [exit(0);])]) 1095806f32fbeSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 1095906f32fbeSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1096006f32fbeSmrg if test "x$have_ld_wrap" = x"no"; then 1096106f32fbeSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1096206f32fbeSmrg fi 1096306f32fbeSmrgfi 1096406f32fbeSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1096506f32fbeSmrg# 1096606f32fbeSmrg]) # XORG_LD_WRAP 10967a253d6aeSmrg 1096806f32fbeSmrg# XORG_CHECK_LINKER_FLAGS 1096906f32fbeSmrg# ----------------------- 1097006f32fbeSmrg# SYNOPSIS 1097106f32fbeSmrg# 1097206f32fbeSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1097306f32fbeSmrg# 1097406f32fbeSmrg# DESCRIPTION 1097506f32fbeSmrg# 1097606f32fbeSmrg# Check whether the given linker FLAGS work with the current language's 1097706f32fbeSmrg# linker, or whether they give an error. 1097806f32fbeSmrg# 1097906f32fbeSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1098006f32fbeSmrg# success/failure. 1098106f32fbeSmrg# 1098206f32fbeSmrg# PROGRAM-SOURCE is the program source to link with, if needed 1098306f32fbeSmrg# 1098406f32fbeSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1098506f32fbeSmrg# 1098606f32fbeSmrg# LICENSE 1098706f32fbeSmrg# 1098806f32fbeSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1098906f32fbeSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1099006f32fbeSmrg# Copyright (c) 2009 Matteo Frigo 1099106f32fbeSmrg# 1099206f32fbeSmrg# This program is free software: you can redistribute it and/or modify it 1099306f32fbeSmrg# under the terms of the GNU General Public License as published by the 1099406f32fbeSmrg# Free Software Foundation, either version 3 of the License, or (at your 1099506f32fbeSmrg# option) any later version. 1099606f32fbeSmrg# 1099706f32fbeSmrg# This program is distributed in the hope that it will be useful, but 1099806f32fbeSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1099906f32fbeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1100006f32fbeSmrg# Public License for more details. 1100106f32fbeSmrg# 1100206f32fbeSmrg# You should have received a copy of the GNU General Public License along 1100306f32fbeSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1100406f32fbeSmrg# 1100506f32fbeSmrg# As a special exception, the respective Autoconf Macro's copyright owner 1100606f32fbeSmrg# gives unlimited permission to copy, distribute and modify the configure 1100706f32fbeSmrg# scripts that are the output of Autoconf when processing the Macro. You 1100806f32fbeSmrg# need not follow the terms of the GNU General Public License when using 1100906f32fbeSmrg# or distributing such scripts, even though portions of the text of the 1101006f32fbeSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 1101106f32fbeSmrg# all other use of the material that constitutes the Autoconf Macro. 1101206f32fbeSmrg# 1101306f32fbeSmrg# This special exception to the GPL applies to versions of the Autoconf 1101406f32fbeSmrg# Macro released by the Autoconf Archive. When you make and distribute a 1101506f32fbeSmrg# modified version of the Autoconf Macro, you may extend this special 1101606f32fbeSmrg# exception to the GPL to apply to your modified version as well.# 1101706f32fbeSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1101806f32fbeSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1101906f32fbeSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1102006f32fbeSmrgAS_LITERAL_IF([$1], 1102106f32fbeSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1102206f32fbeSmrg ax_save_FLAGS=$LDFLAGS 1102306f32fbeSmrg LDFLAGS="$1" 1102406f32fbeSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1102506f32fbeSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1102606f32fbeSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1102706f32fbeSmrg LDFLAGS=$ax_save_FLAGS])], 1102806f32fbeSmrg [ax_save_FLAGS=$LDFLAGS 1102906f32fbeSmrg LDFLAGS="$1" 1103006f32fbeSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1103106f32fbeSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1103206f32fbeSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1103306f32fbeSmrg LDFLAGS=$ax_save_FLAGS]) 1103406f32fbeSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1103506f32fbeSmrgAC_MSG_RESULT($xorg_check_linker_flags) 1103606f32fbeSmrgif test "x$xorg_check_linker_flags" = xyes; then 1103706f32fbeSmrg m4_default([$2], :) 1103806f32fbeSmrgelse 1103906f32fbeSmrg m4_default([$3], :) 1104006f32fbeSmrgfi 1104106f32fbeSmrg]) # XORG_CHECK_LINKER_FLAGS 11042a253d6aeSmrg 1104306f32fbeSmrg# XORG_MEMORY_CHECK_FLAGS 1104406f32fbeSmrg# ----------------------- 1104506f32fbeSmrg# Minimum version: 1.16.0 1104606f32fbeSmrg# 1104706f32fbeSmrg# This macro attempts to find appropriate memory checking functionality 1104806f32fbeSmrg# for various platforms which unit testing code may use to catch various 1104906f32fbeSmrg# forms of memory allocation and access errors in testing. 1105006f32fbeSmrg# 1105106f32fbeSmrg# Interface to module: 1105206f32fbeSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1105306f32fbeSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1105406f32fbeSmrg# 1105506f32fbeSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1105606f32fbeSmrg# 1105706f32fbeSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11058a253d6aeSmrg 1105906f32fbeSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1106006f32fbeSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1106106f32fbeSmrg [Environment variables to enable memory checking in tests]) 11062a253d6aeSmrg 1106306f32fbeSmrg# Check for different types of support on different platforms 1106406f32fbeSmrgcase $host_os in 1106506f32fbeSmrg solaris*) 1106606f32fbeSmrg AC_CHECK_LIB([umem], [umem_alloc], 1106706f32fbeSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1106806f32fbeSmrg ;; 1106906f32fbeSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1107006f32fbeSmrg # both directly and inverted, so should not be 0 or 255. 1107106f32fbeSmrg malloc_debug_env='MALLOC_PERTURB_=15' 1107206f32fbeSmrg ;; 1107306f32fbeSmrg darwin*) 1107406f32fbeSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1107506f32fbeSmrg ;; 1107606f32fbeSmrg *bsd*) 1107706f32fbeSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1107806f32fbeSmrg ;; 1107906f32fbeSmrgesac 11080ea133fd7Smrg 1108106f32fbeSmrg# User supplied flags override default flags 1108206f32fbeSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1108306f32fbeSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1108406f32fbeSmrgfi 11085a253d6aeSmrg 1108606f32fbeSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1108706f32fbeSmrg]) # XORG_WITH_LINT 11088a253d6aeSmrg 1108906f32fbeSmrg# XORG_CHECK_MALLOC_ZERO 1109006f32fbeSmrg# ---------------------- 1109106f32fbeSmrg# Minimum version: 1.0.0 1109225b89263Smrg# 1109306f32fbeSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1109406f32fbeSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1109506f32fbeSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1109606f32fbeSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1109706f32fbeSmrgAC_ARG_ENABLE(malloc0returnsnull, 1109806f32fbeSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 1109906f32fbeSmrg [malloc(0) returns NULL (default: auto)]), 1110006f32fbeSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1110106f32fbeSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11102a253d6aeSmrg 1110306f32fbeSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1110406f32fbeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1110506f32fbeSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1110606f32fbeSmrg#include <stdlib.h> 1110706f32fbeSmrg],[ 1110806f32fbeSmrg char *m0, *r0, *c0, *p; 1110906f32fbeSmrg m0 = malloc(0); 1111006f32fbeSmrg p = malloc(10); 1111106f32fbeSmrg r0 = realloc(p,0); 1111206f32fbeSmrg c0 = calloc(0,10); 1111306f32fbeSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1111406f32fbeSmrg])], 1111506f32fbeSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 1111606f32fbeSmrg [MALLOC_ZERO_RETURNS_NULL=no], 1111706f32fbeSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1111806f32fbeSmrgfi 1111906f32fbeSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11120a253d6aeSmrg 1112106f32fbeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1112206f32fbeSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1112306f32fbeSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1112406f32fbeSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1112506f32fbeSmrgelse 1112606f32fbeSmrg MALLOC_ZERO_CFLAGS="" 1112706f32fbeSmrg XMALLOC_ZERO_CFLAGS="" 1112806f32fbeSmrg XTMALLOC_ZERO_CFLAGS="" 1112906f32fbeSmrgfi 11130a253d6aeSmrg 1113106f32fbeSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1113206f32fbeSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1113306f32fbeSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1113406f32fbeSmrg]) # XORG_CHECK_MALLOC_ZERO 11135a253d6aeSmrg 1113606f32fbeSmrg# XORG_WITH_LINT() 1113706f32fbeSmrg# ---------------- 1113806f32fbeSmrg# Minimum version: 1.1.0 1113906f32fbeSmrg# 1114006f32fbeSmrg# This macro enables the use of a tool that flags some suspicious and 1114106f32fbeSmrg# non-portable constructs (likely to be bugs) in C language source code. 1114206f32fbeSmrg# It will attempt to locate the tool and use appropriate options. 1114306f32fbeSmrg# There are various lint type tools on different platforms. 1114406f32fbeSmrg# 1114506f32fbeSmrg# Interface to module: 1114606f32fbeSmrg# LINT: returns the path to the tool found on the platform 1114706f32fbeSmrg# or the value set to LINT on the configure cmd line 1114806f32fbeSmrg# also an Automake conditional 1114906f32fbeSmrg# LINT_FLAGS: an Automake variable with appropriate flags 1115006f32fbeSmrg# 1115106f32fbeSmrg# --with-lint: 'yes' user instructs the module to use lint 1115206f32fbeSmrg# 'no' user instructs the module not to use lint (default) 1115306f32fbeSmrg# 1115406f32fbeSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1115506f32fbeSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1115606f32fbeSmrg# 1115706f32fbeSmrgAC_DEFUN([XORG_WITH_LINT],[ 11158a253d6aeSmrg 1115906f32fbeSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1116006f32fbeSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1116106f32fbeSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1116206f32fbeSmrg [Use a lint-style source code checker (default: disabled)])], 1116306f32fbeSmrg [use_lint=$withval], [use_lint=no]) 11164a253d6aeSmrg 1116506f32fbeSmrg# Obtain platform specific info like program name and options 1116606f32fbeSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1116706f32fbeSmrgcase $host_os in 1116806f32fbeSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1116906f32fbeSmrg lint_name=splint 1117006f32fbeSmrg lint_options="-badflag" 1117106f32fbeSmrg ;; 1117206f32fbeSmrg *freebsd* | *netbsd*) 1117306f32fbeSmrg lint_name=lint 1117406f32fbeSmrg lint_options="-u -b" 1117506f32fbeSmrg ;; 1117606f32fbeSmrg *solaris*) 1117706f32fbeSmrg lint_name=lint 1117806f32fbeSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1117906f32fbeSmrg ;; 1118006f32fbeSmrgesac 11181a253d6aeSmrg 1118206f32fbeSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1118306f32fbeSmrgif test "x$use_lint" = x"yes" ; then 1118406f32fbeSmrg AC_PATH_PROG([LINT], [$lint_name]) 1118506f32fbeSmrg if test "x$LINT" = "x"; then 1118606f32fbeSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1118706f32fbeSmrg fi 1118806f32fbeSmrgelif test "x$use_lint" = x"no" ; then 1118906f32fbeSmrg if test "x$LINT" != "x"; then 1119006f32fbeSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1119106f32fbeSmrg fi 1119206f32fbeSmrgelse 1119306f32fbeSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1119406f32fbeSmrgfi 11195a253d6aeSmrg 1119606f32fbeSmrg# User supplied flags override default flags 1119706f32fbeSmrgif test "x$LINT_FLAGS" != "x"; then 1119806f32fbeSmrg lint_options=$LINT_FLAGS 1119906f32fbeSmrgfi 11200a253d6aeSmrg 1120106f32fbeSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1120206f32fbeSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11203a253d6aeSmrg 1120406f32fbeSmrg]) # XORG_WITH_LINT 11205ea133fd7Smrg 1120606f32fbeSmrg# XORG_LINT_LIBRARY(LIBNAME) 1120706f32fbeSmrg# -------------------------- 1120806f32fbeSmrg# Minimum version: 1.1.0 1120906f32fbeSmrg# 1121006f32fbeSmrg# Sets up flags for building lint libraries for checking programs that call 1121106f32fbeSmrg# functions in the library. 1121206f32fbeSmrg# 1121306f32fbeSmrg# Interface to module: 1121406f32fbeSmrg# LINTLIB - Automake variable with the name of lint library file to make 1121506f32fbeSmrg# MAKE_LINT_LIB - Automake conditional 1121606f32fbeSmrg# 1121706f32fbeSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1121806f32fbeSmrg# - 'no' user instructs the module not to create a lint library (default) 11219ea133fd7Smrg 1122006f32fbeSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1122106f32fbeSmrgAC_REQUIRE([XORG_WITH_LINT]) 1122206f32fbeSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1122306f32fbeSmrg [Create lint library (default: disabled)])], 1122406f32fbeSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11225a253d6aeSmrg 1122606f32fbeSmrgif test "x$make_lint_lib" = x"yes" ; then 1122706f32fbeSmrg LINTLIB=llib-l$1.ln 1122806f32fbeSmrg if test "x$LINT" = "x"; then 1122906f32fbeSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1123006f32fbeSmrg fi 1123106f32fbeSmrgelif test "x$make_lint_lib" != x"no" ; then 1123206f32fbeSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1123306f32fbeSmrgfi 1123425b89263Smrg 1123506f32fbeSmrgAC_SUBST(LINTLIB) 1123606f32fbeSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1123725b89263Smrg 1123806f32fbeSmrg]) # XORG_LINT_LIBRARY 1123906f32fbeSmrg 1124006f32fbeSmrg# XORG_COMPILER_BRAND 1124106f32fbeSmrg# ------------------- 1124206f32fbeSmrg# Minimum version: 1.14.0 1124306f32fbeSmrg# 1124406f32fbeSmrg# Checks for various brands of compilers and sets flags as appropriate: 1124506f32fbeSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1124606f32fbeSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1124706f32fbeSmrg# clang compiler - sets CLANGCC to "yes" 1124806f32fbeSmrg# Intel compiler - sets INTELCC to "yes" 1124906f32fbeSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1125006f32fbeSmrg# 1125106f32fbeSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1125206f32fbeSmrgAC_LANG_CASE( 1125306f32fbeSmrg [C], [ 1125406f32fbeSmrg AC_REQUIRE([AC_PROG_CC_C99]) 1125506f32fbeSmrg ], 1125606f32fbeSmrg [C++], [ 1125706f32fbeSmrg AC_REQUIRE([AC_PROG_CXX]) 1125806f32fbeSmrg ] 1125906f32fbeSmrg) 1126006f32fbeSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1126106f32fbeSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1126206f32fbeSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1126306f32fbeSmrg]) # XORG_COMPILER_BRAND 1126425b89263Smrg 1126506f32fbeSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1126606f32fbeSmrg# --------------- 1126706f32fbeSmrg# Minimum version: 1.16.0 1126806f32fbeSmrg# 1126906f32fbeSmrg# Test if the compiler works when passed the given flag as a command line argument. 1127006f32fbeSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1127106f32fbeSmrg# next flag in the list until there are no more options. 1127206f32fbeSmrg# 1127306f32fbeSmrg# Note that this does not guarantee that the compiler supports the flag as some 1127406f32fbeSmrg# compilers will simply ignore arguments that they do not understand, but we do 1127506f32fbeSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1127606f32fbeSmrg# -Werror=unused-command-line-argument 1127706f32fbeSmrg# 1127806f32fbeSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1127906f32fbeSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1128006f32fbeSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1128106f32fbeSmrg 1128206f32fbeSmrgAC_LANG_COMPILER_REQUIRE 1128306f32fbeSmrg 1128406f32fbeSmrgAC_LANG_CASE( 1128506f32fbeSmrg [C], [ 1128606f32fbeSmrg AC_REQUIRE([AC_PROG_CC_C99]) 1128706f32fbeSmrg define([PREFIX], [C]) 1128857ee1794Smrg define([CACHE_PREFIX], [cc]) 1128957ee1794Smrg define([COMPILER], [$CC]) 1129006f32fbeSmrg ], 1129106f32fbeSmrg [C++], [ 1129206f32fbeSmrg define([PREFIX], [CXX]) 1129357ee1794Smrg define([CACHE_PREFIX], [cxx]) 1129457ee1794Smrg define([COMPILER], [$CXX]) 1129506f32fbeSmrg ] 1129606f32fbeSmrg) 11297a253d6aeSmrg 1129806f32fbeSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1129906f32fbeSmrg 1130057ee1794Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1130106f32fbeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1130257ee1794Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1130357ee1794Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1130406f32fbeSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1130557ee1794Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1130657ee1794Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1130757ee1794Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1130806f32fbeSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1130906f32fbeSmrgfi 11310ea133fd7Smrg 1131157ee1794Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1131257ee1794Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1131306f32fbeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1131406f32fbeSmrg fi 1131506f32fbeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1131657ee1794Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1131757ee1794Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1131806f32fbeSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1131957ee1794Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1132057ee1794Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1132157ee1794Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1132206f32fbeSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1132306f32fbeSmrgfi 11324ea133fd7Smrg 1132506f32fbeSmrgfound="no" 1132606f32fbeSmrgm4_foreach([flag], m4_cdr($@), [ 1132706f32fbeSmrg if test $found = "no" ; then 1132806f32fbeSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1132906f32fbeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1133006f32fbeSmrg fi 1133106f32fbeSmrg 1133206f32fbeSmrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 1133306f32fbeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1133406f32fbeSmrg fi 1133506f32fbeSmrg 1133606f32fbeSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1133706f32fbeSmrg 1133806f32fbeSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1133957ee1794Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1134057ee1794Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1134157ee1794Smrg AC_CACHE_VAL($cacheid, 1134206f32fbeSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1134357ee1794Smrg [eval $cacheid=yes], 1134457ee1794Smrg [eval $cacheid=no])]) 1134506f32fbeSmrg 1134606f32fbeSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1134706f32fbeSmrg 1134857ee1794Smrg eval supported=\$$cacheid 1134906f32fbeSmrg AC_MSG_RESULT([$supported]) 1135006f32fbeSmrg if test "$supported" = "yes" ; then 1135106f32fbeSmrg $1="$$1 ]flag[" 1135206f32fbeSmrg found="yes" 1135306f32fbeSmrg fi 1135406f32fbeSmrg fi 1135506f32fbeSmrg]) 1135606f32fbeSmrg]) # XORG_TESTSET_CFLAG 11357a253d6aeSmrg 1135806f32fbeSmrg# XORG_COMPILER_FLAGS 1135906f32fbeSmrg# --------------- 1136006f32fbeSmrg# Minimum version: 1.16.0 1136106f32fbeSmrg# 1136206f32fbeSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1136306f32fbeSmrg# arguments supported by the selected compiler which do NOT alter the generated 1136406f32fbeSmrg# code. These arguments will cause the compiler to print various warnings 1136506f32fbeSmrg# during compilation AND turn a conservative set of warnings into errors. 1136606f32fbeSmrg# 1136706f32fbeSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1136806f32fbeSmrg# future versions of util-macros as options are added to new compilers. 1136906f32fbeSmrg# 1137006f32fbeSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1137106f32fbeSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1137206f32fbeSmrg 1137306f32fbeSmrgAC_ARG_ENABLE(selective-werror, 1137406f32fbeSmrg AS_HELP_STRING([--disable-selective-werror], 1137506f32fbeSmrg [Turn off selective compiler errors. (default: enabled)]), 1137606f32fbeSmrg [SELECTIVE_WERROR=$enableval], 1137706f32fbeSmrg [SELECTIVE_WERROR=yes]) 1137806f32fbeSmrg 1137906f32fbeSmrgAC_LANG_CASE( 1138006f32fbeSmrg [C], [ 1138106f32fbeSmrg define([PREFIX], [C]) 1138206f32fbeSmrg ], 1138306f32fbeSmrg [C++], [ 1138406f32fbeSmrg define([PREFIX], [CXX]) 1138506f32fbeSmrg ] 1138606f32fbeSmrg) 1138706f32fbeSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1138806f32fbeSmrgif test "x$SUNCC" = "xyes"; then 1138906f32fbeSmrg [BASE_]PREFIX[FLAGS]="-v" 1139006f32fbeSmrgelse 1139106f32fbeSmrg [BASE_]PREFIX[FLAGS]="" 1139206f32fbeSmrgfi 11393a253d6aeSmrg 1139406f32fbeSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1139506f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1139606f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1139706f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1139806f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1139906f32fbeSmrg 1140006f32fbeSmrgAC_LANG_CASE( 1140106f32fbeSmrg [C], [ 1140206f32fbeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1140306f32fbeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1140406f32fbeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1140506f32fbeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1140606f32fbeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 1140706f32fbeSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1140806f32fbeSmrg ] 1140906f32fbeSmrg) 11410a253d6aeSmrg 1141106f32fbeSmrg# This chunk adds additional warnings that could catch undesired effects. 1141206f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1141306f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1141406f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1141506f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1141606f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1141706f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1141806f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1141906f32fbeSmrg 1142006f32fbeSmrg# These are currently disabled because they are noisy. They will be enabled 1142106f32fbeSmrg# in the future once the codebase is sufficiently modernized to silence 1142206f32fbeSmrg# them. For now, I don't want them to drown out the other warnings. 1142306f32fbeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1142406f32fbeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1142506f32fbeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1142606f32fbeSmrg 1142706f32fbeSmrg# Turn some warnings into errors, so we don't accidently get successful builds 1142806f32fbeSmrg# when there are problems that should be fixed. 1142906f32fbeSmrg 1143006f32fbeSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1143106f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1143206f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1143306f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1143406f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1143506f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1143606f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1143706f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1143806f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1143906f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1144006f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1144106f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1144206f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1144306f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1144406f32fbeSmrgelse 1144506f32fbeSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 1144606f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1144706f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1144806f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1144906f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1145006f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1145106f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1145206f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1145306f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1145406f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1145506f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1145606f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1145706f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1145806f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1145906f32fbeSmrgfi 1146025b89263Smrg 1146106f32fbeSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1146206f32fbeSmrg]) # XORG_COMPILER_FLAGS 1146325b89263Smrg 1146406f32fbeSmrg# XORG_CWARNFLAGS 1146506f32fbeSmrg# --------------- 1146606f32fbeSmrg# Minimum version: 1.2.0 1146706f32fbeSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11468ea133fd7Smrg# 1146906f32fbeSmrg# Defines CWARNFLAGS to enable C compiler warnings. 11470ea133fd7Smrg# 1147106f32fbeSmrg# This function is deprecated because it defines -fno-strict-aliasing 1147206f32fbeSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1147306f32fbeSmrg# is needed, then it should be added explicitly in the module when 1147406f32fbeSmrg# it is updated to use BASE_CFLAGS. 1147506f32fbeSmrg# 1147606f32fbeSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1147706f32fbeSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1147806f32fbeSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1147906f32fbeSmrgAC_LANG_CASE( 1148006f32fbeSmrg [C], [ 1148106f32fbeSmrg CWARNFLAGS="$BASE_CFLAGS" 1148206f32fbeSmrg if test "x$GCC" = xyes ; then 1148306f32fbeSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1148406f32fbeSmrg fi 1148506f32fbeSmrg AC_SUBST(CWARNFLAGS) 1148606f32fbeSmrg ] 1148706f32fbeSmrg) 1148806f32fbeSmrg]) # XORG_CWARNFLAGS 11489a253d6aeSmrg 1149006f32fbeSmrg# XORG_STRICT_OPTION 1149106f32fbeSmrg# ----------------------- 1149206f32fbeSmrg# Minimum version: 1.3.0 1149306f32fbeSmrg# 1149406f32fbeSmrg# Add configure option to enable strict compilation flags, such as treating 1149506f32fbeSmrg# warnings as fatal errors. 1149606f32fbeSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1149706f32fbeSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1149806f32fbeSmrg# 1149906f32fbeSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1150006f32fbeSmrg# when strict compilation is unconditionally desired. 1150106f32fbeSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1150206f32fbeSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1150306f32fbeSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11504ea133fd7Smrg 1150506f32fbeSmrgAC_ARG_ENABLE(strict-compilation, 1150606f32fbeSmrg AS_HELP_STRING([--enable-strict-compilation], 1150706f32fbeSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1150806f32fbeSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11509a253d6aeSmrg 1151006f32fbeSmrgAC_LANG_CASE( 1151106f32fbeSmrg [C], [ 1151206f32fbeSmrg define([PREFIX], [C]) 1151306f32fbeSmrg ], 1151406f32fbeSmrg [C++], [ 1151506f32fbeSmrg define([PREFIX], [CXX]) 1151606f32fbeSmrg ] 1151706f32fbeSmrg) 1151825b89263Smrg 1151906f32fbeSmrg[STRICT_]PREFIX[FLAGS]="" 1152006f32fbeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1152106f32fbeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1152225b89263Smrg 1152306f32fbeSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1152406f32fbeSmrg# activate it with -Werror, so we add it here explicitly. 1152506f32fbeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11526a253d6aeSmrg 1152706f32fbeSmrgif test "x$STRICT_COMPILE" = "xyes"; then 1152806f32fbeSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1152906f32fbeSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1153006f32fbeSmrgfi 1153106f32fbeSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1153206f32fbeSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1153306f32fbeSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1153406f32fbeSmrg]) # XORG_STRICT_OPTION 11535a253d6aeSmrg 1153606f32fbeSmrg# XORG_DEFAULT_OPTIONS 1153706f32fbeSmrg# -------------------- 1153806f32fbeSmrg# Minimum version: 1.3.0 11539ea133fd7Smrg# 1154006f32fbeSmrg# Defines default options for X.Org modules. 11541ea133fd7Smrg# 1154206f32fbeSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1154306f32fbeSmrgAC_REQUIRE([AC_PROG_INSTALL]) 1154406f32fbeSmrgXORG_COMPILER_FLAGS 1154506f32fbeSmrgXORG_CWARNFLAGS 1154606f32fbeSmrgXORG_STRICT_OPTION 1154706f32fbeSmrgXORG_RELEASE_VERSION 1154806f32fbeSmrgXORG_CHANGELOG 1154906f32fbeSmrgXORG_INSTALL 1155006f32fbeSmrgXORG_MANPAGE_SECTIONS 1155106f32fbeSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1155206f32fbeSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1155306f32fbeSmrg]) # XORG_DEFAULT_OPTIONS 1155406f32fbeSmrg 1155506f32fbeSmrg# XORG_INSTALL() 1155606f32fbeSmrg# ---------------- 1155706f32fbeSmrg# Minimum version: 1.4.0 11558ea133fd7Smrg# 1155906f32fbeSmrg# Defines the variable INSTALL_CMD as the command to copy 1156006f32fbeSmrg# INSTALL from $prefix/share/util-macros. 1156125b89263Smrg# 1156206f32fbeSmrgAC_DEFUN([XORG_INSTALL], [ 1156306f32fbeSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1156406f32fbeSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1156506f32fbeSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1156606f32fbeSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1156706f32fbeSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1156806f32fbeSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1156906f32fbeSmrgAC_SUBST([INSTALL_CMD]) 1157006f32fbeSmrg]) # XORG_INSTALL 1157106f32fbeSmrgdnl Copyright 2005 Red Hat, Inc 1157206f32fbeSmrgdnl 1157306f32fbeSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1157406f32fbeSmrgdnl documentation for any purpose is hereby granted without fee, provided that 1157506f32fbeSmrgdnl the above copyright notice appear in all copies and that both that 1157606f32fbeSmrgdnl copyright notice and this permission notice appear in supporting 1157706f32fbeSmrgdnl documentation. 1157806f32fbeSmrgdnl 1157906f32fbeSmrgdnl The above copyright notice and this permission notice shall be included 1158006f32fbeSmrgdnl in all copies or substantial portions of the Software. 1158106f32fbeSmrgdnl 1158206f32fbeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1158306f32fbeSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1158406f32fbeSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1158506f32fbeSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1158606f32fbeSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1158706f32fbeSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1158806f32fbeSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 1158906f32fbeSmrgdnl 1159006f32fbeSmrgdnl Except as contained in this notice, the name of the copyright holders shall 1159106f32fbeSmrgdnl not be used in advertising or otherwise to promote the sale, use or 1159206f32fbeSmrgdnl other dealings in this Software without prior written authorization 1159306f32fbeSmrgdnl from the copyright holders. 1159406f32fbeSmrgdnl 1159525b89263Smrg 1159606f32fbeSmrg# XORG_RELEASE_VERSION 1159706f32fbeSmrg# -------------------- 1159806f32fbeSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1159906f32fbeSmrg 1160006f32fbeSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1160106f32fbeSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1160206f32fbeSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1160306f32fbeSmrg [Major version of this package]) 1160406f32fbeSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1160506f32fbeSmrg if test "x$PVM" = "x"; then 1160606f32fbeSmrg PVM="0" 1160706f32fbeSmrg fi 1160806f32fbeSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1160906f32fbeSmrg [$PVM], 1161006f32fbeSmrg [Minor version of this package]) 1161106f32fbeSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1161206f32fbeSmrg if test "x$PVP" = "x"; then 1161306f32fbeSmrg PVP="0" 1161406f32fbeSmrg fi 1161506f32fbeSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1161606f32fbeSmrg [$PVP], 1161706f32fbeSmrg [Patch version of this package]) 1161806f32fbeSmrg]) 1161925b89263Smrg 1162006f32fbeSmrg# XORG_CHANGELOG() 1162106f32fbeSmrg# ---------------- 1162206f32fbeSmrg# Minimum version: 1.2.0 1162306f32fbeSmrg# 1162406f32fbeSmrg# Defines the variable CHANGELOG_CMD as the command to generate 1162506f32fbeSmrg# ChangeLog from git. 1162606f32fbeSmrg# 1162706f32fbeSmrg# 1162806f32fbeSmrgAC_DEFUN([XORG_CHANGELOG], [ 1162906f32fbeSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1163006f32fbeSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1163106f32fbeSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1163206f32fbeSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1163306f32fbeSmrgAC_SUBST([CHANGELOG_CMD]) 1163406f32fbeSmrg]) # XORG_CHANGELOG 11635a253d6aeSmrg 11636