aclocal.m4 revision 06c34b88
106c34b88Smrg# generated automatically by aclocal 1.13.2 -*- Autoconf -*- 2f1ee322dSmrg 306c34b88Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4c43cc173Smrg 5c43cc173Smrg# This file is free software; the Free Software Foundation 6c43cc173Smrg# gives unlimited permission to copy and/or distribute it, 7c43cc173Smrg# with or without modifications, as long as this notice is preserved. 8c43cc173Smrg 9c43cc173Smrg# This program is distributed in the hope that it will be useful, 10c43cc173Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11c43cc173Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12c43cc173Smrg# PARTICULAR PURPOSE. 13c43cc173Smrg 1406c34b88Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1521e67964Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1621e67964Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17f1ee322dSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18f1ee322dSmrg[m4_warning([this file was generated for autoconf 2.69. 1921e67964SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2021e67964SmrgIf you have problems, you may need to regenerate the build system entirely. 21f1ee322dSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22c43cc173Smrg 2306c34b88Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 24c27c18e8Smrg# 2506c34b88Smrg# This file is free software; the Free Software Foundation 2606c34b88Smrg# gives unlimited permission to copy and/or distribute it, 2706c34b88Smrg# with or without modifications, as long as this notice is preserved. 2806c34b88Smrg 2906c34b88Smrg# AM_AUTOMAKE_VERSION(VERSION) 3006c34b88Smrg# ---------------------------- 3106c34b88Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3206c34b88Smrg# generated from the m4 files accompanying Automake X.Y. 3306c34b88Smrg# (This private macro should not be called outside this file.) 3406c34b88SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3506c34b88Smrg[am__api_version='1.13' 3606c34b88Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3706c34b88Smrgdnl require some minimum version. Point them to the right macro. 3806c34b88Smrgm4_if([$1], [1.13.2], [], 3906c34b88Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 4006c34b88Smrg]) 4106c34b88Smrg 4206c34b88Smrg# _AM_AUTOCONF_VERSION(VERSION) 4306c34b88Smrg# ----------------------------- 4406c34b88Smrg# aclocal traces this macro to find the Autoconf version. 4506c34b88Smrg# This is a private macro too. Using m4_define simplifies 4606c34b88Smrg# the logic in aclocal, which can simply ignore this definition. 4706c34b88Smrgm4_define([_AM_AUTOCONF_VERSION], []) 4806c34b88Smrg 4906c34b88Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 5006c34b88Smrg# ------------------------------- 5106c34b88Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5206c34b88Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5306c34b88SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5406c34b88Smrg[AM_AUTOMAKE_VERSION([1.13.2])dnl 5506c34b88Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5606c34b88Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5706c34b88Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5806c34b88Smrg 5906c34b88Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6006c34b88Smrg 6106c34b88Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 62c27c18e8Smrg# 6306c34b88Smrg# This file is free software; the Free Software Foundation 6406c34b88Smrg# gives unlimited permission to copy and/or distribute it, 6506c34b88Smrg# with or without modifications, as long as this notice is preserved. 66c27c18e8Smrg 6706c34b88Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6806c34b88Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 6906c34b88Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70c27c18e8Smrg# 7106c34b88Smrg# Of course, Automake must honor this variable whenever it calls a 7206c34b88Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7306c34b88Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7406c34b88Smrg# depending on how configure is run. This is pretty annoying, since 7506c34b88Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7606c34b88Smrg# source directory, any form will work fine, but in subdirectories a 7706c34b88Smrg# relative path needs to be adjusted first. 78c27c18e8Smrg# 7906c34b88Smrg# $ac_aux_dir/missing 8006c34b88Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8106c34b88Smrg# $top_srcdir/$ac_aux_dir/missing 8206c34b88Smrg# fails if $ac_aux_dir is absolute, 8306c34b88Smrg# fails when called from a subdirectory in a VPATH build with 8406c34b88Smrg# a relative $ac_aux_dir 85c27c18e8Smrg# 8606c34b88Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8706c34b88Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8806c34b88Smrg# harmless because $srcdir is '.', but things will broke when you 8906c34b88Smrg# start a VPATH build or use an absolute $srcdir. 90c27c18e8Smrg# 9106c34b88Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9206c34b88Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9306c34b88Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9406c34b88Smrg# and then we would define $MISSING as 9506c34b88Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9606c34b88Smrg# This will work as long as MISSING is not called from configure, because 9706c34b88Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9806c34b88Smrg# However there are other variables, like CC, which are often used in 9906c34b88Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100c27c18e8Smrg# 10106c34b88Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10206c34b88Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10306c34b88Smrg# configured tree to be moved without reconfiguration. 104c43cc173Smrg 10506c34b88SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10606c34b88Smrg[dnl Rely on autoconf to set up CDPATH properly. 10706c34b88SmrgAC_PREREQ([2.50])dnl 10806c34b88Smrg# expand $ac_aux_dir to an absolute path 10906c34b88Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 110c27c18e8Smrg]) 111c27c18e8Smrg 11206c34b88Smrg# AM_CONDITIONAL -*- Autoconf -*- 113c27c18e8Smrg 11406c34b88Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 11506c34b88Smrg# 11606c34b88Smrg# This file is free software; the Free Software Foundation 11706c34b88Smrg# gives unlimited permission to copy and/or distribute it, 11806c34b88Smrg# with or without modifications, as long as this notice is preserved. 119c43cc173Smrg 12006c34b88Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12106c34b88Smrg# ------------------------------------- 12206c34b88Smrg# Define a conditional. 12306c34b88SmrgAC_DEFUN([AM_CONDITIONAL], 12406c34b88Smrg[AC_PREREQ([2.52])dnl 12506c34b88Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12606c34b88Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12706c34b88SmrgAC_SUBST([$1_TRUE])dnl 12806c34b88SmrgAC_SUBST([$1_FALSE])dnl 12906c34b88Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13006c34b88Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13106c34b88Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13206c34b88Smrgif $2; then 13306c34b88Smrg $1_TRUE= 13406c34b88Smrg $1_FALSE='#' 13506c34b88Smrgelse 13606c34b88Smrg $1_TRUE='#' 13706c34b88Smrg $1_FALSE= 13806c34b88Smrgfi 13906c34b88SmrgAC_CONFIG_COMMANDS_PRE( 14006c34b88Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14106c34b88Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14206c34b88SmrgUsually this means the macro was only invoked conditionally.]]) 14306c34b88Smrgfi])]) 144c43cc173Smrg 14506c34b88Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 14606c34b88Smrg# 14706c34b88Smrg# This file is free software; the Free Software Foundation 14806c34b88Smrg# gives unlimited permission to copy and/or distribute it, 14906c34b88Smrg# with or without modifications, as long as this notice is preserved. 150c27c18e8Smrg 151c27c18e8Smrg 15206c34b88Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 15306c34b88Smrg# written in clear, in which case automake, when reading aclocal.m4, 15406c34b88Smrg# will think it sees a *use*, and therefore will trigger all it's 15506c34b88Smrg# C support machinery. Also note that it means that autoscan, seeing 15606c34b88Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 157c27c18e8Smrg 158c27c18e8Smrg 15906c34b88Smrg# _AM_DEPENDENCIES(NAME) 160c27c18e8Smrg# ---------------------- 16106c34b88Smrg# See how the compiler implements dependency checking. 16206c34b88Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 16306c34b88Smrg# We try a few techniques and use that to set a single cache variable. 16406c34b88Smrg# 16506c34b88Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 16606c34b88Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 16706c34b88Smrg# dependency, and given that the user is not expected to run this macro, 16806c34b88Smrg# just rely on AC_PROG_CC. 16906c34b88SmrgAC_DEFUN([_AM_DEPENDENCIES], 17006c34b88Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17106c34b88SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17206c34b88SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17306c34b88SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 174c27c18e8Smrg 17506c34b88Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 17606c34b88Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 17706c34b88Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 17806c34b88Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 17906c34b88Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 18006c34b88Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18106c34b88Smrg [depcc="$$1" am_compiler_list=]) 182c27c18e8Smrg 18306c34b88SmrgAC_CACHE_CHECK([dependency style of $depcc], 18406c34b88Smrg [am_cv_$1_dependencies_compiler_type], 18506c34b88Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18606c34b88Smrg # We make a subdir and do the tests there. Otherwise we can end up 18706c34b88Smrg # making bogus files that we don't know about and never remove. For 18806c34b88Smrg # instance it was reported that on HP-UX the gcc test will end up 18906c34b88Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 19006c34b88Smrg # in D". 19106c34b88Smrg rm -rf conftest.dir 19206c34b88Smrg mkdir conftest.dir 19306c34b88Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19406c34b88Smrg # using a relative directory. 19506c34b88Smrg cp "$am_depcomp" conftest.dir 19606c34b88Smrg cd conftest.dir 19706c34b88Smrg # We will build objects and dependencies in a subdirectory because 19806c34b88Smrg # it helps to detect inapplicable dependency modes. For instance 19906c34b88Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20006c34b88Smrg # side effect of compilation, but ICC will put the dependencies in 20106c34b88Smrg # the current directory while Tru64 will put them in the object 20206c34b88Smrg # directory. 20306c34b88Smrg mkdir sub 204c43cc173Smrg 20506c34b88Smrg am_cv_$1_dependencies_compiler_type=none 20606c34b88Smrg if test "$am_compiler_list" = ""; then 20706c34b88Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 20821e67964Smrg fi 20906c34b88Smrg am__universal=false 21006c34b88Smrg m4_case([$1], [CC], 21106c34b88Smrg [case " $depcc " in #( 21206c34b88Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21306c34b88Smrg esac], 21406c34b88Smrg [CXX], 21506c34b88Smrg [case " $depcc " in #( 21606c34b88Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21706c34b88Smrg esac]) 218c43cc173Smrg 21906c34b88Smrg for depmode in $am_compiler_list; do 22006c34b88Smrg # Setup a source with many dependencies, because some compilers 22106c34b88Smrg # like to wrap large dependency lists on column 80 (with \), and 22206c34b88Smrg # we should not choose a depcomp mode which is confused by this. 22306c34b88Smrg # 22406c34b88Smrg # We need to recreate these files for each test, as the compiler may 22506c34b88Smrg # overwrite some of them when testing with obscure command lines. 22606c34b88Smrg # This happens at least with the AIX C compiler. 22706c34b88Smrg : > sub/conftest.c 22806c34b88Smrg for i in 1 2 3 4 5 6; do 22906c34b88Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23006c34b88Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 23106c34b88Smrg # Solaris 10 /bin/sh. 23206c34b88Smrg echo '/* dummy */' > sub/conftst$i.h 23306c34b88Smrg done 23406c34b88Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 235c43cc173Smrg 23606c34b88Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 23706c34b88Smrg # mode. It turns out that the SunPro C++ compiler does not properly 23806c34b88Smrg # handle '-M -o', and we need to detect this. Also, some Intel 23906c34b88Smrg # versions had trouble with output in subdirs. 24006c34b88Smrg am__obj=sub/conftest.${OBJEXT-o} 24106c34b88Smrg am__minus_obj="-o $am__obj" 24206c34b88Smrg case $depmode in 24306c34b88Smrg gcc) 24406c34b88Smrg # This depmode causes a compiler race in universal mode. 24506c34b88Smrg test "$am__universal" = false || continue 24606c34b88Smrg ;; 24706c34b88Smrg nosideeffect) 24806c34b88Smrg # After this tag, mechanisms are not by side-effect, so they'll 24906c34b88Smrg # only be used when explicitly requested. 25006c34b88Smrg if test "x$enable_dependency_tracking" = xyes; then 25106c34b88Smrg continue 25206c34b88Smrg else 25306c34b88Smrg break 25406c34b88Smrg fi 25506c34b88Smrg ;; 25606c34b88Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 25706c34b88Smrg # This compiler won't grok '-c -o', but also, the minuso test has 25806c34b88Smrg # not run yet. These depmodes are late enough in the game, and 25906c34b88Smrg # so weak that their functioning should not be impacted. 26006c34b88Smrg am__obj=conftest.${OBJEXT-o} 26106c34b88Smrg am__minus_obj= 26206c34b88Smrg ;; 26306c34b88Smrg none) break ;; 26406c34b88Smrg esac 26506c34b88Smrg if depmode=$depmode \ 26606c34b88Smrg source=sub/conftest.c object=$am__obj \ 26706c34b88Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 26806c34b88Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 26906c34b88Smrg >/dev/null 2>conftest.err && 27006c34b88Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27106c34b88Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27206c34b88Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27306c34b88Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27406c34b88Smrg # icc doesn't choke on unknown options, it will just issue warnings 27506c34b88Smrg # or remarks (even with -Werror). So we grep stderr for any message 27606c34b88Smrg # that says an option was ignored or not supported. 27706c34b88Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 27806c34b88Smrg # icc: Command line warning: ignoring option '-M'; no argument required 27906c34b88Smrg # The diagnosis changed in icc 8.0: 28006c34b88Smrg # icc: Command line remark: option '-MP' not supported 28106c34b88Smrg if (grep 'ignoring option' conftest.err || 28206c34b88Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28306c34b88Smrg am_cv_$1_dependencies_compiler_type=$depmode 28406c34b88Smrg break 28506c34b88Smrg fi 28606c34b88Smrg fi 28706c34b88Smrg done 288c43cc173Smrg 28906c34b88Smrg cd .. 29006c34b88Smrg rm -rf conftest.dir 29106c34b88Smrgelse 29206c34b88Smrg am_cv_$1_dependencies_compiler_type=none 29306c34b88Smrgfi 29406c34b88Smrg]) 29506c34b88SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29606c34b88SmrgAM_CONDITIONAL([am__fastdep$1], [ 29706c34b88Smrg test "x$enable_dependency_tracking" != xno \ 29806c34b88Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 29906c34b88Smrg]) 300c43cc173Smrg 301c43cc173Smrg 30206c34b88Smrg# AM_SET_DEPDIR 30306c34b88Smrg# ------------- 30406c34b88Smrg# Choose a directory name for dependency files. 30506c34b88Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 30606c34b88SmrgAC_DEFUN([AM_SET_DEPDIR], 30706c34b88Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 30806c34b88SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 30906c34b88Smrg]) 310c43cc173Smrg 311c43cc173Smrg 31206c34b88Smrg# AM_DEP_TRACK 31306c34b88Smrg# ------------ 31406c34b88SmrgAC_DEFUN([AM_DEP_TRACK], 31506c34b88Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 31606c34b88SmrgAS_HELP_STRING( 31706c34b88Smrg [--enable-dependency-tracking], 31806c34b88Smrg [do not reject slow dependency extractors]) 31906c34b88SmrgAS_HELP_STRING( 32006c34b88Smrg [--disable-dependency-tracking], 32106c34b88Smrg [speeds up one-time build])]) 32206c34b88Smrgif test "x$enable_dependency_tracking" != xno; then 32306c34b88Smrg am_depcomp="$ac_aux_dir/depcomp" 32406c34b88Smrg AMDEPBACKSLASH='\' 32506c34b88Smrg am__nodep='_no' 32606c34b88Smrgfi 32706c34b88SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32806c34b88SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32906c34b88Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 33006c34b88SmrgAC_SUBST([am__nodep])dnl 33106c34b88Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 33206c34b88Smrg]) 33337eb1ca1Smrg 33406c34b88Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 33537eb1ca1Smrg 33606c34b88Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 33706c34b88Smrg# 33806c34b88Smrg# This file is free software; the Free Software Foundation 33906c34b88Smrg# gives unlimited permission to copy and/or distribute it, 34006c34b88Smrg# with or without modifications, as long as this notice is preserved. 34137eb1ca1Smrg 342c43cc173Smrg 34306c34b88Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 34406c34b88Smrg# ------------------------------ 34506c34b88SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34606c34b88Smrg[{ 34706c34b88Smrg # Older Autoconf quotes --file arguments for eval, but not when files 34806c34b88Smrg # are listed without --file. Let's play safe and only enable the eval 34906c34b88Smrg # if we detect the quoting. 35006c34b88Smrg case $CONFIG_FILES in 35106c34b88Smrg *\'*) eval set x "$CONFIG_FILES" ;; 35206c34b88Smrg *) set x $CONFIG_FILES ;; 35306c34b88Smrg esac 35406c34b88Smrg shift 35506c34b88Smrg for mf 35606c34b88Smrg do 35706c34b88Smrg # Strip MF so we end up with the name of the file. 35806c34b88Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35906c34b88Smrg # Check whether this is an Automake generated Makefile or not. 36006c34b88Smrg # We used to match only the files named 'Makefile.in', but 36106c34b88Smrg # some people rename them; so instead we look at the file content. 36206c34b88Smrg # Grep'ing the first line is not enough: some people post-process 36306c34b88Smrg # each Makefile.in and add a new line on top of each file to say so. 36406c34b88Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36506c34b88Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36606c34b88Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36706c34b88Smrg dirpart=`AS_DIRNAME("$mf")` 36806c34b88Smrg else 36906c34b88Smrg continue 37006c34b88Smrg fi 37106c34b88Smrg # Extract the definition of DEPDIR, am__include, and am__quote 37206c34b88Smrg # from the Makefile without running 'make'. 37306c34b88Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37406c34b88Smrg test -z "$DEPDIR" && continue 37506c34b88Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37606c34b88Smrg test -z "$am__include" && continue 37706c34b88Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37806c34b88Smrg # Find all dependency output files, they are included files with 37906c34b88Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 38006c34b88Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38106c34b88Smrg # expansion. 38206c34b88Smrg for file in `sed -n " 38306c34b88Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38406c34b88Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 38506c34b88Smrg # Make sure the directory exists. 38606c34b88Smrg test -f "$dirpart/$file" && continue 38706c34b88Smrg fdir=`AS_DIRNAME(["$file"])` 38806c34b88Smrg AS_MKDIR_P([$dirpart/$fdir]) 38906c34b88Smrg # echo "creating $dirpart/$file" 39006c34b88Smrg echo '# dummy' > "$dirpart/$file" 39106c34b88Smrg done 39206c34b88Smrg done 39306c34b88Smrg} 39406c34b88Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 395c43cc173Smrg 396c27c18e8Smrg 39706c34b88Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39806c34b88Smrg# ----------------------------- 39906c34b88Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 40006c34b88Smrg# 40106c34b88Smrg# This code is only required when automatic dependency tracking 40206c34b88Smrg# is enabled. FIXME. This creates each '.P' file that we will 40306c34b88Smrg# need in order to bootstrap the dependency handling code. 40406c34b88SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40506c34b88Smrg[AC_CONFIG_COMMANDS([depfiles], 40606c34b88Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40706c34b88Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 40806c34b88Smrg]) 409c27c18e8Smrg 41006c34b88Smrg# Do all the work for Automake. -*- Autoconf -*- 411c27c18e8Smrg 41206c34b88Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 41306c34b88Smrg# 41406c34b88Smrg# This file is free software; the Free Software Foundation 41506c34b88Smrg# gives unlimited permission to copy and/or distribute it, 41606c34b88Smrg# with or without modifications, as long as this notice is preserved. 417c27c18e8Smrg 41806c34b88Smrg# This macro actually does too much. Some checks are only needed if 41906c34b88Smrg# your package does certain things. But this isn't really a big deal. 420c27c18e8Smrg 42106c34b88Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 42206c34b88Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 42306c34b88Smrg# ----------------------------------------------- 42406c34b88Smrg# The call with PACKAGE and VERSION arguments is the old style 42506c34b88Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 42606c34b88Smrg# and VERSION should now be passed to AC_INIT and removed from 42706c34b88Smrg# the call to AM_INIT_AUTOMAKE. 42806c34b88Smrg# We support both call styles for the transition. After 42906c34b88Smrg# the next Automake release, Autoconf can make the AC_INIT 43006c34b88Smrg# arguments mandatory, and then we can depend on a new Autoconf 43106c34b88Smrg# release and drop the old call support. 43206c34b88SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 43306c34b88Smrg[AC_PREREQ([2.65])dnl 43406c34b88Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 43506c34b88Smrgdnl the ones we care about. 43606c34b88Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 43706c34b88SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 43806c34b88SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 43906c34b88Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 44006c34b88Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 44106c34b88Smrg # is not polluted with repeated "-I." 44206c34b88Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 44306c34b88Smrg # test to see if srcdir already configured 44406c34b88Smrg if test -f $srcdir/config.status; then 44506c34b88Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 44606c34b88Smrg fi 44706c34b88Smrgfi 448c27c18e8Smrg 44906c34b88Smrg# test whether we have cygpath 45006c34b88Smrgif test -z "$CYGPATH_W"; then 45106c34b88Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 45206c34b88Smrg CYGPATH_W='cygpath -w' 45306c34b88Smrg else 45406c34b88Smrg CYGPATH_W=echo 45506c34b88Smrg fi 45606c34b88Smrgfi 45706c34b88SmrgAC_SUBST([CYGPATH_W]) 458c27c18e8Smrg 45906c34b88Smrg# Define the identity of the package. 46006c34b88Smrgdnl Distinguish between old-style and new-style calls. 46106c34b88Smrgm4_ifval([$2], 46206c34b88Smrg[AC_DIAGNOSE([obsolete], 46306c34b88Smrg [$0: two- and three-arguments forms are deprecated.]) 46406c34b88Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 46506c34b88Smrg AC_SUBST([PACKAGE], [$1])dnl 46606c34b88Smrg AC_SUBST([VERSION], [$2])], 46706c34b88Smrg[_AM_SET_OPTIONS([$1])dnl 46806c34b88Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 46906c34b88Smrgm4_if( 47006c34b88Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 47106c34b88Smrg [ok:ok],, 47206c34b88Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 47306c34b88Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 47406c34b88Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 475c27c18e8Smrg 47606c34b88Smrg_AM_IF_OPTION([no-define],, 47706c34b88Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 47806c34b88Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 479c27c18e8Smrg 48006c34b88Smrg# Some tools Automake needs. 48106c34b88SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 48206c34b88SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 48306c34b88SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 48406c34b88SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 48506c34b88SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 48606c34b88SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 48706c34b88SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 48806c34b88SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 48906c34b88SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 49006c34b88SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 49106c34b88Smrg# For better backward compatibility. To be removed once Automake 1.9.x 49206c34b88Smrg# dies out for good. For more background, see: 49306c34b88Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 49406c34b88Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 49506c34b88SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 49606c34b88Smrg# We need awk for the "check" target. The system "awk" is bad on 49706c34b88Smrg# some platforms. 49806c34b88SmrgAC_REQUIRE([AC_PROG_AWK])dnl 49906c34b88SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50006c34b88SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50106c34b88Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50206c34b88Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50306c34b88Smrg [_AM_PROG_TAR([v7])])]) 50406c34b88Smrg_AM_IF_OPTION([no-dependencies],, 50506c34b88Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 50606c34b88Smrg [_AM_DEPENDENCIES([CC])], 50706c34b88Smrg [m4_define([AC_PROG_CC], 50806c34b88Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 50906c34b88SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51006c34b88Smrg [_AM_DEPENDENCIES([CXX])], 51106c34b88Smrg [m4_define([AC_PROG_CXX], 51206c34b88Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 51306c34b88SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51406c34b88Smrg [_AM_DEPENDENCIES([OBJC])], 51506c34b88Smrg [m4_define([AC_PROG_OBJC], 51606c34b88Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 51706c34b88SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 51806c34b88Smrg [_AM_DEPENDENCIES([OBJCXX])], 51906c34b88Smrg [m4_define([AC_PROG_OBJCXX], 52006c34b88Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 52106c34b88Smrg]) 52206c34b88SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 52306c34b88Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 52406c34b88Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 52506c34b88Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 52606c34b88SmrgAC_CONFIG_COMMANDS_PRE(dnl 52706c34b88Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52806c34b88Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 529c27c18e8Smrg]) 530c27c18e8Smrg 53106c34b88Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53206c34b88Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53306c34b88Smrgdnl mangled by Autoconf and run in a shell conditional statement. 53406c34b88Smrgm4_define([_AC_COMPILER_EXEEXT], 53506c34b88Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 536c27c18e8Smrg 537c27c18e8Smrg 53806c34b88Smrg# When config.status generates a header, we must update the stamp-h file. 53906c34b88Smrg# This file resides in the same directory as the config header 54006c34b88Smrg# that is generated. The stamp files are numbered to have different names. 541c27c18e8Smrg 54206c34b88Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 54306c34b88Smrg# loop where config.status creates the headers, so we can generate 54406c34b88Smrg# our stamp files there. 54506c34b88SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 54606c34b88Smrg[# Compute $1's index in $config_headers. 54706c34b88Smrg_am_arg=$1 54806c34b88Smrg_am_stamp_count=1 54906c34b88Smrgfor _am_header in $config_headers :; do 55006c34b88Smrg case $_am_header in 55106c34b88Smrg $_am_arg | $_am_arg:* ) 55206c34b88Smrg break ;; 55306c34b88Smrg * ) 55406c34b88Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 55506c34b88Smrg esac 55606c34b88Smrgdone 55706c34b88Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 558c27c18e8Smrg 55906c34b88Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 56006c34b88Smrg# 56106c34b88Smrg# This file is free software; the Free Software Foundation 56206c34b88Smrg# gives unlimited permission to copy and/or distribute it, 56306c34b88Smrg# with or without modifications, as long as this notice is preserved. 564c27c18e8Smrg 56506c34b88Smrg# AM_PROG_INSTALL_SH 56606c34b88Smrg# ------------------ 56706c34b88Smrg# Define $install_sh. 56806c34b88SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 56906c34b88Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57006c34b88Smrgif test x"${install_sh}" != xset; then 57106c34b88Smrg case $am_aux_dir in 57206c34b88Smrg *\ * | *\ *) 57306c34b88Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57406c34b88Smrg *) 57506c34b88Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57606c34b88Smrg esac 57706c34b88Smrgfi 57806c34b88SmrgAC_SUBST([install_sh])]) 579c27c18e8Smrg 58006c34b88Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 58106c34b88Smrg# 58206c34b88Smrg# This file is free software; the Free Software Foundation 58306c34b88Smrg# gives unlimited permission to copy and/or distribute it, 58406c34b88Smrg# with or without modifications, as long as this notice is preserved. 585c27c18e8Smrg 58606c34b88Smrg# Check whether the underlying file-system supports filenames 58706c34b88Smrg# with a leading dot. For instance MS-DOS doesn't. 58806c34b88SmrgAC_DEFUN([AM_SET_LEADING_DOT], 58906c34b88Smrg[rm -rf .tst 2>/dev/null 59006c34b88Smrgmkdir .tst 2>/dev/null 59106c34b88Smrgif test -d .tst; then 59206c34b88Smrg am__leading_dot=. 59306c34b88Smrgelse 59406c34b88Smrg am__leading_dot=_ 59506c34b88Smrgfi 59606c34b88Smrgrmdir .tst 2>/dev/null 59706c34b88SmrgAC_SUBST([am__leading_dot])]) 598c27c18e8Smrg 59906c34b88Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 600c27c18e8Smrg 60106c34b88Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 60206c34b88Smrg# 60306c34b88Smrg# This file is free software; the Free Software Foundation 60406c34b88Smrg# gives unlimited permission to copy and/or distribute it, 60506c34b88Smrg# with or without modifications, as long as this notice is preserved. 606c27c18e8Smrg 60706c34b88Smrg# AM_MAKE_INCLUDE() 60806c34b88Smrg# ----------------- 60906c34b88Smrg# Check to see how make treats includes. 61006c34b88SmrgAC_DEFUN([AM_MAKE_INCLUDE], 61106c34b88Smrg[am_make=${MAKE-make} 61206c34b88Smrgcat > confinc << 'END' 61306c34b88Smrgam__doit: 61406c34b88Smrg @echo this is the am__doit target 61506c34b88Smrg.PHONY: am__doit 61606c34b88SmrgEND 61706c34b88Smrg# If we don't find an include directive, just comment out the code. 61806c34b88SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 61906c34b88Smrgam__include="#" 62006c34b88Smrgam__quote= 62106c34b88Smrg_am_result=none 62206c34b88Smrg# First try GNU make style include. 62306c34b88Smrgecho "include confinc" > confmf 62406c34b88Smrg# Ignore all kinds of additional output from 'make'. 62506c34b88Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 62606c34b88Smrg*the\ am__doit\ target*) 62706c34b88Smrg am__include=include 62806c34b88Smrg am__quote= 62906c34b88Smrg _am_result=GNU 63006c34b88Smrg ;; 63106c34b88Smrgesac 63206c34b88Smrg# Now try BSD make style include. 63306c34b88Smrgif test "$am__include" = "#"; then 63406c34b88Smrg echo '.include "confinc"' > confmf 63506c34b88Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 63606c34b88Smrg *the\ am__doit\ target*) 63706c34b88Smrg am__include=.include 63806c34b88Smrg am__quote="\"" 63906c34b88Smrg _am_result=BSD 64006c34b88Smrg ;; 64106c34b88Smrg esac 64206c34b88Smrgfi 64306c34b88SmrgAC_SUBST([am__include]) 64406c34b88SmrgAC_SUBST([am__quote]) 64506c34b88SmrgAC_MSG_RESULT([$_am_result]) 64606c34b88Smrgrm -f confinc confmf 647c27c18e8Smrg]) 648c27c18e8Smrg 64906c34b88Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 650c27c18e8Smrg 65106c34b88Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 652c27c18e8Smrg# 65306c34b88Smrg# This file is free software; the Free Software Foundation 65406c34b88Smrg# gives unlimited permission to copy and/or distribute it, 65506c34b88Smrg# with or without modifications, as long as this notice is preserved. 656c43cc173Smrg 65706c34b88Smrg# AM_MISSING_PROG(NAME, PROGRAM) 65806c34b88Smrg# ------------------------------ 65906c34b88SmrgAC_DEFUN([AM_MISSING_PROG], 66006c34b88Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 66106c34b88Smrg$1=${$1-"${am_missing_run}$2"} 66206c34b88SmrgAC_SUBST($1)]) 663c43cc173Smrg 66406c34b88Smrg# AM_MISSING_HAS_RUN 66506c34b88Smrg# ------------------ 66606c34b88Smrg# Define MISSING if not defined so far and test if it is modern enough. 66706c34b88Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 66806c34b88SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 66906c34b88Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 67006c34b88SmrgAC_REQUIRE_AUX_FILE([missing])dnl 67106c34b88Smrgif test x"${MISSING+set}" != xset; then 67206c34b88Smrg case $am_aux_dir in 67306c34b88Smrg *\ * | *\ *) 67406c34b88Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 67506c34b88Smrg *) 67606c34b88Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 67706c34b88Smrg esac 67806c34b88Smrgfi 67906c34b88Smrg# Use eval to expand $SHELL 68006c34b88Smrgif eval "$MISSING --is-lightweight"; then 68106c34b88Smrg am_missing_run="$MISSING " 68206c34b88Smrgelse 68306c34b88Smrg am_missing_run= 68406c34b88Smrg AC_MSG_WARN(['missing' script is too old or missing]) 68506c34b88Smrgfi 686c27c18e8Smrg]) 687c27c18e8Smrg 68806c34b88Smrg# Helper functions for option handling. -*- Autoconf -*- 689c27c18e8Smrg 69006c34b88Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 691c27c18e8Smrg# 69206c34b88Smrg# This file is free software; the Free Software Foundation 69306c34b88Smrg# gives unlimited permission to copy and/or distribute it, 69406c34b88Smrg# with or without modifications, as long as this notice is preserved. 695c27c18e8Smrg 69606c34b88Smrg# _AM_MANGLE_OPTION(NAME) 697c27c18e8Smrg# ----------------------- 69806c34b88SmrgAC_DEFUN([_AM_MANGLE_OPTION], 69906c34b88Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 700c27c18e8Smrg 70106c34b88Smrg# _AM_SET_OPTION(NAME) 70206c34b88Smrg# -------------------- 70306c34b88Smrg# Set option NAME. Presently that only means defining a flag for this option. 70406c34b88SmrgAC_DEFUN([_AM_SET_OPTION], 70506c34b88Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 706c27c18e8Smrg 70706c34b88Smrg# _AM_SET_OPTIONS(OPTIONS) 70806c34b88Smrg# ------------------------ 70906c34b88Smrg# OPTIONS is a space-separated list of Automake options. 71006c34b88SmrgAC_DEFUN([_AM_SET_OPTIONS], 71106c34b88Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 712c27c18e8Smrg 71306c34b88Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 71406c34b88Smrg# ------------------------------------------- 71506c34b88Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 71606c34b88SmrgAC_DEFUN([_AM_IF_OPTION], 71706c34b88Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 718c27c18e8Smrg 71906c34b88Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 720c27c18e8Smrg 72106c34b88Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 72206c34b88Smrg# 72306c34b88Smrg# This file is free software; the Free Software Foundation 72406c34b88Smrg# gives unlimited permission to copy and/or distribute it, 72506c34b88Smrg# with or without modifications, as long as this notice is preserved. 726c27c18e8Smrg 72706c34b88Smrg# AM_SANITY_CHECK 72806c34b88Smrg# --------------- 72906c34b88SmrgAC_DEFUN([AM_SANITY_CHECK], 73006c34b88Smrg[AC_MSG_CHECKING([whether build environment is sane]) 73106c34b88Smrg# Reject unsafe characters in $srcdir or the absolute working directory 73206c34b88Smrg# name. Accept space and tab only in the latter. 73306c34b88Smrgam_lf=' 73406c34b88Smrg' 73506c34b88Smrgcase `pwd` in 73606c34b88Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 73706c34b88Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 73806c34b88Smrgesac 73906c34b88Smrgcase $srcdir in 74006c34b88Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 74106c34b88Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 74206c34b88Smrgesac 743c27c18e8Smrg 74406c34b88Smrg# Do 'set' in a subshell so we don't clobber the current shell's 74506c34b88Smrg# arguments. Must try -L first in case configure is actually a 74606c34b88Smrg# symlink; some systems play weird games with the mod time of symlinks 74706c34b88Smrg# (eg FreeBSD returns the mod time of the symlink's containing 74806c34b88Smrg# directory). 74906c34b88Smrgif ( 75006c34b88Smrg am_has_slept=no 75106c34b88Smrg for am_try in 1 2; do 75206c34b88Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 75306c34b88Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 75406c34b88Smrg if test "$[*]" = "X"; then 75506c34b88Smrg # -L didn't work. 75606c34b88Smrg set X `ls -t "$srcdir/configure" conftest.file` 75706c34b88Smrg fi 75806c34b88Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 75906c34b88Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 760c27c18e8Smrg 76106c34b88Smrg # If neither matched, then we have a broken ls. This can happen 76206c34b88Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 76306c34b88Smrg # broken ls alias from the environment. This has actually 76406c34b88Smrg # happened. Such a system could not be considered "sane". 76506c34b88Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 76606c34b88Smrg alias in your environment]) 76706c34b88Smrg fi 76806c34b88Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 76906c34b88Smrg break 77006c34b88Smrg fi 77106c34b88Smrg # Just in case. 77206c34b88Smrg sleep 1 77306c34b88Smrg am_has_slept=yes 77406c34b88Smrg done 77506c34b88Smrg test "$[2]" = conftest.file 77606c34b88Smrg ) 77706c34b88Smrgthen 77806c34b88Smrg # Ok. 77906c34b88Smrg : 78006c34b88Smrgelse 78106c34b88Smrg AC_MSG_ERROR([newly created file is older than distributed files! 78206c34b88SmrgCheck your system clock]) 78306c34b88Smrgfi 78406c34b88SmrgAC_MSG_RESULT([yes]) 78506c34b88Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 78606c34b88Smrg# generated files are strictly newer. 78706c34b88Smrgam_sleep_pid= 78806c34b88Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 78906c34b88Smrg ( sleep 1 ) & 79006c34b88Smrg am_sleep_pid=$! 79106c34b88Smrgfi 79206c34b88SmrgAC_CONFIG_COMMANDS_PRE( 79306c34b88Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 79406c34b88Smrg if test -n "$am_sleep_pid"; then 79506c34b88Smrg # Hide warnings about reused PIDs. 79606c34b88Smrg wait $am_sleep_pid 2>/dev/null 79706c34b88Smrg fi 79806c34b88Smrg AC_MSG_RESULT([done])]) 79906c34b88Smrgrm -f conftest.file 80006c34b88Smrg]) 801c27c18e8Smrg 80206c34b88Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 80306c34b88Smrg# 80406c34b88Smrg# This file is free software; the Free Software Foundation 80506c34b88Smrg# gives unlimited permission to copy and/or distribute it, 80606c34b88Smrg# with or without modifications, as long as this notice is preserved. 807c27c18e8Smrg 80806c34b88Smrg# AM_SILENT_RULES([DEFAULT]) 80906c34b88Smrg# -------------------------- 81006c34b88Smrg# Enable less verbose build rules; with the default set to DEFAULT 81106c34b88Smrg# ("yes" being less verbose, "no" or empty being verbose). 81206c34b88SmrgAC_DEFUN([AM_SILENT_RULES], 81306c34b88Smrg[AC_ARG_ENABLE([silent-rules], [dnl 81406c34b88SmrgAS_HELP_STRING( 81506c34b88Smrg [--enable-silent-rules], 81606c34b88Smrg [less verbose build output (undo: "make V=1")]) 81706c34b88SmrgAS_HELP_STRING( 81806c34b88Smrg [--disable-silent-rules], 81906c34b88Smrg [verbose build output (undo: "make V=0")])dnl 82006c34b88Smrg]) 82106c34b88Smrgcase $enable_silent_rules in @%:@ ((( 82206c34b88Smrg yes) AM_DEFAULT_VERBOSITY=0;; 82306c34b88Smrg no) AM_DEFAULT_VERBOSITY=1;; 82406c34b88Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 82506c34b88Smrgesac 82606c34b88Smrgdnl 82706c34b88Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 82806c34b88Smrgdnl do not support nested variable expansions. 82906c34b88Smrgdnl See automake bug#9928 and bug#10237. 83006c34b88Smrgam_make=${MAKE-make} 83106c34b88SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 83206c34b88Smrg [am_cv_make_support_nested_variables], 83306c34b88Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 83406c34b88SmrgBAR0=false 83506c34b88SmrgBAR1=true 83606c34b88SmrgV=1 83706c34b88Smrgam__doit: 83806c34b88Smrg @$(TRUE) 83906c34b88Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 84006c34b88Smrg am_cv_make_support_nested_variables=yes 84106c34b88Smrgelse 84206c34b88Smrg am_cv_make_support_nested_variables=no 84306c34b88Smrgfi]) 84406c34b88Smrgif test $am_cv_make_support_nested_variables = yes; then 84506c34b88Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 84606c34b88Smrg AM_V='$(V)' 84706c34b88Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 84806c34b88Smrgelse 84906c34b88Smrg AM_V=$AM_DEFAULT_VERBOSITY 85006c34b88Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 85106c34b88Smrgfi 85206c34b88SmrgAC_SUBST([AM_V])dnl 85306c34b88SmrgAM_SUBST_NOTMAKE([AM_V])dnl 85406c34b88SmrgAC_SUBST([AM_DEFAULT_V])dnl 85506c34b88SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 85606c34b88SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 85706c34b88SmrgAM_BACKSLASH='\' 85806c34b88SmrgAC_SUBST([AM_BACKSLASH])dnl 85906c34b88Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 86006c34b88Smrg]) 861c27c18e8Smrg 86206c34b88Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 86306c34b88Smrg# 86406c34b88Smrg# This file is free software; the Free Software Foundation 86506c34b88Smrg# gives unlimited permission to copy and/or distribute it, 86606c34b88Smrg# with or without modifications, as long as this notice is preserved. 86737eb1ca1Smrg 86806c34b88Smrg# AM_PROG_INSTALL_STRIP 86906c34b88Smrg# --------------------- 87006c34b88Smrg# One issue with vendor 'install' (even GNU) is that you can't 87106c34b88Smrg# specify the program used to strip binaries. This is especially 87206c34b88Smrg# annoying in cross-compiling environments, where the build's strip 87306c34b88Smrg# is unlikely to handle the host's binaries. 87406c34b88Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 87506c34b88Smrg# always use install-sh in "make install-strip", and initialize 87606c34b88Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 87706c34b88SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 87806c34b88Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 87906c34b88Smrg# Installed binaries are usually stripped using 'strip' when the user 88006c34b88Smrg# run "make install-strip". However 'strip' might not be the right 88106c34b88Smrg# tool to use in cross-compilation environments, therefore Automake 88206c34b88Smrg# will honor the 'STRIP' environment variable to overrule this program. 88306c34b88Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 88406c34b88Smrgif test "$cross_compiling" != no; then 88506c34b88Smrg AC_CHECK_TOOL([STRIP], [strip], :) 88606c34b88Smrgfi 88706c34b88SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 88806c34b88SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 88906c34b88Smrg 89006c34b88Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 89106c34b88Smrg# 89206c34b88Smrg# This file is free software; the Free Software Foundation 89306c34b88Smrg# gives unlimited permission to copy and/or distribute it, 89406c34b88Smrg# with or without modifications, as long as this notice is preserved. 89506c34b88Smrg 89606c34b88Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 89706c34b88Smrg# --------------------------- 89806c34b88Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 89906c34b88Smrg# This macro is traced by Automake. 90006c34b88SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 90106c34b88Smrg 90206c34b88Smrg# AM_SUBST_NOTMAKE(VARIABLE) 90306c34b88Smrg# -------------------------- 90406c34b88Smrg# Public sister of _AM_SUBST_NOTMAKE. 90506c34b88SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 90606c34b88Smrg 90706c34b88Smrg# Check how to create a tarball. -*- Autoconf -*- 90806c34b88Smrg 90906c34b88Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 91006c34b88Smrg# 91106c34b88Smrg# This file is free software; the Free Software Foundation 91206c34b88Smrg# gives unlimited permission to copy and/or distribute it, 91306c34b88Smrg# with or without modifications, as long as this notice is preserved. 91406c34b88Smrg 91506c34b88Smrg# _AM_PROG_TAR(FORMAT) 91606c34b88Smrg# -------------------- 91706c34b88Smrg# Check how to create a tarball in format FORMAT. 91806c34b88Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 91906c34b88Smrg# 92006c34b88Smrg# Substitute a variable $(am__tar) that is a command 92106c34b88Smrg# writing to stdout a FORMAT-tarball containing the directory 92206c34b88Smrg# $tardir. 92306c34b88Smrg# tardir=directory && $(am__tar) > result.tar 92406c34b88Smrg# 92506c34b88Smrg# Substitute a variable $(am__untar) that extract such 92606c34b88Smrg# a tarball read from stdin. 92706c34b88Smrg# $(am__untar) < result.tar 92806c34b88Smrg# 92906c34b88SmrgAC_DEFUN([_AM_PROG_TAR], 93006c34b88Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 93106c34b88Smrg# in the wild :-( We should find a proper way to deprecate it ... 93206c34b88SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 93306c34b88Smrg 93406c34b88Smrg# We'll loop over all known methods to create a tar archive until one works. 93506c34b88Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 93606c34b88Smrg 93706c34b88Smrgm4_if([$1], [v7], 93806c34b88Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 93906c34b88Smrg 94006c34b88Smrg [m4_case([$1], 94106c34b88Smrg [ustar], 94206c34b88Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 94306c34b88Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 94406c34b88Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 94506c34b88Smrg # and bug#13588). 94606c34b88Smrg am_max_uid=2097151 # 2^21 - 1 94706c34b88Smrg am_max_gid=$am_max_uid 94806c34b88Smrg # The $UID and $GID variables are not portable, so we need to resort 94906c34b88Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 95006c34b88Smrg # below are definitely unexpected, so allow the users to see them 95106c34b88Smrg # (that is, avoid stderr redirection). 95206c34b88Smrg am_uid=`id -u || echo unknown` 95306c34b88Smrg am_gid=`id -g || echo unknown` 95406c34b88Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 95506c34b88Smrg if test $am_uid -le $am_max_uid; then 95606c34b88Smrg AC_MSG_RESULT([yes]) 95706c34b88Smrg else 95806c34b88Smrg AC_MSG_RESULT([no]) 95906c34b88Smrg _am_tools=none 96006c34b88Smrg fi 96106c34b88Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 96206c34b88Smrg if test $am_gid -le $am_max_gid; then 96306c34b88Smrg AC_MSG_RESULT([yes]) 96406c34b88Smrg else 96506c34b88Smrg AC_MSG_RESULT([no]) 96606c34b88Smrg _am_tools=none 96706c34b88Smrg fi], 96806c34b88Smrg 96906c34b88Smrg [pax], 97006c34b88Smrg [], 97106c34b88Smrg 97206c34b88Smrg [m4_fatal([Unknown tar format])]) 97306c34b88Smrg 97406c34b88Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 97506c34b88Smrg 97606c34b88Smrg # Go ahead even if we have the value already cached. We do so because we 97706c34b88Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 97806c34b88Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 97906c34b88Smrg 98006c34b88Smrg for _am_tool in $_am_tools; do 98106c34b88Smrg case $_am_tool in 98206c34b88Smrg gnutar) 98306c34b88Smrg for _am_tar in tar gnutar gtar; do 98406c34b88Smrg AM_RUN_LOG([$_am_tar --version]) && break 98506c34b88Smrg done 98606c34b88Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98706c34b88Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98806c34b88Smrg am__untar="$_am_tar -xf -" 989c27c18e8Smrg ;; 99006c34b88Smrg plaintar) 99106c34b88Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 99206c34b88Smrg # ustar tarball either. 99306c34b88Smrg (tar --version) >/dev/null 2>&1 && continue 99406c34b88Smrg am__tar='tar chf - "$$tardir"' 99506c34b88Smrg am__tar_='tar chf - "$tardir"' 99606c34b88Smrg am__untar='tar xf -' 99706c34b88Smrg ;; 99806c34b88Smrg pax) 99906c34b88Smrg am__tar='pax -L -x $1 -w "$$tardir"' 100006c34b88Smrg am__tar_='pax -L -x $1 -w "$tardir"' 100106c34b88Smrg am__untar='pax -r' 100206c34b88Smrg ;; 100306c34b88Smrg cpio) 100406c34b88Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 100506c34b88Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 100606c34b88Smrg am__untar='cpio -i -H $1 -d' 100706c34b88Smrg ;; 100806c34b88Smrg none) 100906c34b88Smrg am__tar=false 101006c34b88Smrg am__tar_=false 101106c34b88Smrg am__untar=false 1012c27c18e8Smrg ;; 1013c27c18e8Smrg esac 1014c27c18e8Smrg 101506c34b88Smrg # If the value was cached, stop now. We just wanted to have am__tar 101606c34b88Smrg # and am__untar set. 101706c34b88Smrg test -n "${am_cv_prog_tar_$1}" && break 101806c34b88Smrg 101906c34b88Smrg # tar/untar a dummy directory, and stop if the command works. 102006c34b88Smrg rm -rf conftest.dir 102106c34b88Smrg mkdir conftest.dir 102206c34b88Smrg echo GrepMe > conftest.dir/file 102306c34b88Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 102406c34b88Smrg rm -rf conftest.dir 102506c34b88Smrg if test -s conftest.tar; then 102606c34b88Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 102706c34b88Smrg AM_RUN_LOG([cat conftest.dir/file]) 102806c34b88Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102906c34b88Smrg fi 103006c34b88Smrg done 103106c34b88Smrg rm -rf conftest.dir 1032c27c18e8Smrg 103306c34b88Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 103406c34b88Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1035c27c18e8Smrg 103606c34b88SmrgAC_SUBST([am__tar]) 103706c34b88SmrgAC_SUBST([am__untar]) 103806c34b88Smrg]) # _AM_PROG_TAR 1039c27c18e8Smrg 104006c34b88Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 104106c34b88Smrg# 104206c34b88Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 104306c34b88Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 104406c34b88Smrg# Foundation, Inc. 104506c34b88Smrg# Written by Gordon Matzigkeit, 1996 104606c34b88Smrg# 104706c34b88Smrg# This file is free software; the Free Software Foundation gives 104806c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 104906c34b88Smrg# modifications, as long as this notice is preserved. 1050c27c18e8Smrg 105106c34b88Smrgm4_define([_LT_COPYING], [dnl 105206c34b88Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 105306c34b88Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 105406c34b88Smrg# Foundation, Inc. 105506c34b88Smrg# Written by Gordon Matzigkeit, 1996 105606c34b88Smrg# 105706c34b88Smrg# This file is part of GNU Libtool. 105806c34b88Smrg# 105906c34b88Smrg# GNU Libtool is free software; you can redistribute it and/or 106006c34b88Smrg# modify it under the terms of the GNU General Public License as 106106c34b88Smrg# published by the Free Software Foundation; either version 2 of 106206c34b88Smrg# the License, or (at your option) any later version. 106306c34b88Smrg# 106406c34b88Smrg# As a special exception to the GNU General Public License, 106506c34b88Smrg# if you distribute this file as part of a program or library that 106606c34b88Smrg# is built using GNU Libtool, you may include this file under the 106706c34b88Smrg# same distribution terms that you use for the rest of that program. 106806c34b88Smrg# 106906c34b88Smrg# GNU Libtool is distributed in the hope that it will be useful, 107006c34b88Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 107106c34b88Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 107206c34b88Smrg# GNU General Public License for more details. 107306c34b88Smrg# 107406c34b88Smrg# You should have received a copy of the GNU General Public License 107506c34b88Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 107606c34b88Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 107706c34b88Smrg# obtained by writing to the Free Software Foundation, Inc., 107806c34b88Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 107906c34b88Smrg]) 1080c27c18e8Smrg 108106c34b88Smrg# serial 57 LT_INIT 1082c27c18e8Smrg 1083c27c18e8Smrg 108406c34b88Smrg# LT_PREREQ(VERSION) 108506c34b88Smrg# ------------------ 108606c34b88Smrg# Complain and exit if this libtool version is less that VERSION. 108706c34b88Smrgm4_defun([LT_PREREQ], 108806c34b88Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 108906c34b88Smrg [m4_default([$3], 109006c34b88Smrg [m4_fatal([Libtool version $1 or higher is required], 109106c34b88Smrg 63)])], 109206c34b88Smrg [$2])]) 1093c27c18e8Smrg 1094c27c18e8Smrg 109506c34b88Smrg# _LT_CHECK_BUILDDIR 109606c34b88Smrg# ------------------ 109706c34b88Smrg# Complain if the absolute build directory name contains unusual characters 109806c34b88Smrgm4_defun([_LT_CHECK_BUILDDIR], 109906c34b88Smrg[case `pwd` in 110006c34b88Smrg *\ * | *\ *) 110106c34b88Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 110206c34b88Smrgesac 110306c34b88Smrg]) 1104c27c18e8Smrg 1105c27c18e8Smrg 110606c34b88Smrg# LT_INIT([OPTIONS]) 110706c34b88Smrg# ------------------ 110806c34b88SmrgAC_DEFUN([LT_INIT], 110906c34b88Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 111006c34b88SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 111106c34b88SmrgAC_BEFORE([$0], [LT_LANG])dnl 111206c34b88SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 111306c34b88SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 111406c34b88Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 1115c27c18e8Smrg 111606c34b88Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 111706c34b88Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 111806c34b88Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 111906c34b88Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 112006c34b88Smrgdnl unless we require an AC_DEFUNed macro: 112106c34b88SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 112206c34b88SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 112306c34b88SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 112406c34b88SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 112506c34b88Smrgm4_require([_LT_PROG_LTMAIN])dnl 1126c27c18e8Smrg 112706c34b88Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1128c27c18e8Smrg 112906c34b88Smrgdnl Parse OPTIONS 113006c34b88Smrg_LT_SET_OPTIONS([$0], [$1]) 1131c27c18e8Smrg 113206c34b88Smrg# This can be used to rebuild libtool when needed 113306c34b88SmrgLIBTOOL_DEPS="$ltmain" 1134c27c18e8Smrg 113506c34b88Smrg# Always use our own libtool. 113606c34b88SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 113706c34b88SmrgAC_SUBST(LIBTOOL)dnl 1138c27c18e8Smrg 113906c34b88Smrg_LT_SETUP 1140c27c18e8Smrg 114106c34b88Smrg# Only expand once: 114206c34b88Smrgm4_define([LT_INIT]) 114306c34b88Smrg])# LT_INIT 1144c27c18e8Smrg 114506c34b88Smrg# Old names: 114606c34b88SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 114706c34b88SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 114806c34b88Smrgdnl aclocal-1.4 backwards compatibility: 114906c34b88Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 115006c34b88Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1151c27c18e8Smrg 1152c27c18e8Smrg 115306c34b88Smrg# _LT_CC_BASENAME(CC) 115406c34b88Smrg# ------------------- 115506c34b88Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 115606c34b88Smrgm4_defun([_LT_CC_BASENAME], 115706c34b88Smrg[for cc_temp in $1""; do 115806c34b88Smrg case $cc_temp in 115906c34b88Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 116006c34b88Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 116106c34b88Smrg \-*) ;; 116206c34b88Smrg *) break;; 116306c34b88Smrg esac 116406c34b88Smrgdone 116506c34b88Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 116606c34b88Smrg]) 1167c27c18e8Smrg 1168c27c18e8Smrg 116906c34b88Smrg# _LT_FILEUTILS_DEFAULTS 117006c34b88Smrg# ---------------------- 117106c34b88Smrg# It is okay to use these file commands and assume they have been set 117206c34b88Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 117306c34b88Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 117406c34b88Smrg[: ${CP="cp -f"} 117506c34b88Smrg: ${MV="mv -f"} 117606c34b88Smrg: ${RM="rm -f"} 117706c34b88Smrg])# _LT_FILEUTILS_DEFAULTS 1178c27c18e8Smrg 1179c27c18e8Smrg 118006c34b88Smrg# _LT_SETUP 118106c34b88Smrg# --------- 118206c34b88Smrgm4_defun([_LT_SETUP], 118306c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 118406c34b88SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 118506c34b88SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 118606c34b88SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 118706c34b88Smrg 118806c34b88Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 118906c34b88Smrgdnl 119006c34b88Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 119106c34b88Smrg_LT_DECL([], [host], [0])dnl 119206c34b88Smrg_LT_DECL([], [host_os], [0])dnl 119306c34b88Smrgdnl 119406c34b88Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 119506c34b88Smrg_LT_DECL([], [build], [0])dnl 119606c34b88Smrg_LT_DECL([], [build_os], [0])dnl 119706c34b88Smrgdnl 119806c34b88SmrgAC_REQUIRE([AC_PROG_CC])dnl 119906c34b88SmrgAC_REQUIRE([LT_PATH_LD])dnl 120006c34b88SmrgAC_REQUIRE([LT_PATH_NM])dnl 120106c34b88Smrgdnl 120206c34b88SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 120306c34b88Smrgtest -z "$LN_S" && LN_S="ln -s" 120406c34b88Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 120506c34b88Smrgdnl 120606c34b88SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 120706c34b88Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 120806c34b88Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 120906c34b88Smrgdnl 121006c34b88Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 121106c34b88Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 121206c34b88Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 121306c34b88Smrgm4_require([_LT_CMD_RELOAD])dnl 121406c34b88Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 121506c34b88Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 121606c34b88Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 121706c34b88Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 121806c34b88Smrgm4_require([_LT_WITH_SYSROOT])dnl 121906c34b88Smrg 122006c34b88Smrg_LT_CONFIG_LIBTOOL_INIT([ 122106c34b88Smrg# See if we are running on zsh, and set the options which allow our 122206c34b88Smrg# commands through without removal of \ escapes INIT. 122306c34b88Smrgif test -n "\${ZSH_VERSION+set}" ; then 122406c34b88Smrg setopt NO_GLOB_SUBST 122506c34b88Smrgfi 122606c34b88Smrg]) 122706c34b88Smrgif test -n "${ZSH_VERSION+set}" ; then 122806c34b88Smrg setopt NO_GLOB_SUBST 1229c27c18e8Smrgfi 1230c27c18e8Smrg 123106c34b88Smrg_LT_CHECK_OBJDIR 1232c27c18e8Smrg 123306c34b88Smrgm4_require([_LT_TAG_COMPILER])dnl 1234c27c18e8Smrg 123506c34b88Smrgcase $host_os in 123606c34b88Smrgaix3*) 123706c34b88Smrg # AIX sometimes has problems with the GCC collect2 program. For some 123806c34b88Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 123906c34b88Smrg # vanish in a puff of smoke. 124006c34b88Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 124106c34b88Smrg COLLECT_NAMES= 124206c34b88Smrg export COLLECT_NAMES 124306c34b88Smrg fi 124406c34b88Smrg ;; 124506c34b88Smrgesac 1246c27c18e8Smrg 124706c34b88Smrg# Global variables: 124806c34b88Smrgofile=libtool 124906c34b88Smrgcan_build_shared=yes 1250c27c18e8Smrg 125106c34b88Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 125206c34b88Smrg# which needs '.lib'). 125306c34b88Smrglibext=a 1254c27c18e8Smrg 125506c34b88Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1256c27c18e8Smrg 125706c34b88Smrgold_CC="$CC" 125806c34b88Smrgold_CFLAGS="$CFLAGS" 1259c27c18e8Smrg 126006c34b88Smrg# Set sane defaults for various variables 126106c34b88Smrgtest -z "$CC" && CC=cc 126206c34b88Smrgtest -z "$LTCC" && LTCC=$CC 126306c34b88Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 126406c34b88Smrgtest -z "$LD" && LD=ld 126506c34b88Smrgtest -z "$ac_objext" && ac_objext=o 1266c27c18e8Smrg 126706c34b88Smrg_LT_CC_BASENAME([$compiler]) 1268c27c18e8Smrg 126906c34b88Smrg# Only perform the check for file, if the check method requires it 127006c34b88Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 127106c34b88Smrgcase $deplibs_check_method in 127206c34b88Smrgfile_magic*) 127306c34b88Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 127406c34b88Smrg _LT_PATH_MAGIC 127506c34b88Smrg fi 127606c34b88Smrg ;; 127706c34b88Smrgesac 1278c27c18e8Smrg 127906c34b88Smrg# Use C for the default configuration in the libtool script 128006c34b88SmrgLT_SUPPORTED_TAG([CC]) 128106c34b88Smrg_LT_LANG_C_CONFIG 128206c34b88Smrg_LT_LANG_DEFAULT_CONFIG 128306c34b88Smrg_LT_CONFIG_COMMANDS 128406c34b88Smrg])# _LT_SETUP 1285c27c18e8Smrg 1286c27c18e8Smrg 128706c34b88Smrg# _LT_PREPARE_SED_QUOTE_VARS 128806c34b88Smrg# -------------------------- 128906c34b88Smrg# Define a few sed substitution that help us do robust quoting. 129006c34b88Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 129106c34b88Smrg[# Backslashify metacharacters that are still active within 129206c34b88Smrg# double-quoted strings. 129306c34b88Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1294c27c18e8Smrg 129506c34b88Smrg# Same as above, but do not quote variable references. 129606c34b88Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1297c27c18e8Smrg 129806c34b88Smrg# Sed substitution to delay expansion of an escaped shell variable in a 129906c34b88Smrg# double_quote_subst'ed string. 130006c34b88Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1301f1ee322dSmrg 130206c34b88Smrg# Sed substitution to delay expansion of an escaped single quote. 130306c34b88Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1304f1ee322dSmrg 130506c34b88Smrg# Sed substitution to avoid accidental globbing in evaled expressions 130606c34b88Smrgno_glob_subst='s/\*/\\\*/g' 130706c34b88Smrg]) 1308c27c18e8Smrg 130906c34b88Smrg# _LT_PROG_LTMAIN 131006c34b88Smrg# --------------- 131106c34b88Smrg# Note that this code is called both from `configure', and `config.status' 131206c34b88Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 131306c34b88Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 131406c34b88Smrg# so we pass a copy along to make sure it has a sensible value anyway. 131506c34b88Smrgm4_defun([_LT_PROG_LTMAIN], 131606c34b88Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 131706c34b88Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 131806c34b88Smrgltmain="$ac_aux_dir/ltmain.sh" 131906c34b88Smrg])# _LT_PROG_LTMAIN 1320c27c18e8Smrg 1321c27c18e8Smrg 1322f1ee322dSmrg 132306c34b88Smrg# So that we can recreate a full libtool script including additional 132406c34b88Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 132506c34b88Smrg# in macros and then make a single call at the end using the `libtool' 132606c34b88Smrg# label. 1327c27c18e8Smrg 1328c27c18e8Smrg 132906c34b88Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 133006c34b88Smrg# ---------------------------------------- 133106c34b88Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 133206c34b88Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 133306c34b88Smrg[m4_ifval([$1], 133406c34b88Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 133506c34b88Smrg [$1 133606c34b88Smrg])])]) 1337c27c18e8Smrg 133806c34b88Smrg# Initialize. 133906c34b88Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1340c43cc173Smrg 1341c27c18e8Smrg 134206c34b88Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 134306c34b88Smrg# ------------------------------ 134406c34b88Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 134506c34b88Smrgm4_define([_LT_CONFIG_LIBTOOL], 134606c34b88Smrg[m4_ifval([$1], 134706c34b88Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 134806c34b88Smrg [$1 134906c34b88Smrg])])]) 1350c43cc173Smrg 135106c34b88Smrg# Initialize. 135206c34b88Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1353c43cc173Smrg 1354c43cc173Smrg 135506c34b88Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 135606c34b88Smrg# ----------------------------------------------------- 135706c34b88Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 135806c34b88Smrg[_LT_CONFIG_LIBTOOL([$1]) 135906c34b88Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 136006c34b88Smrg]) 1361c43cc173Smrg 1362c43cc173Smrg 136306c34b88Smrg# _LT_FORMAT_COMMENT([COMMENT]) 136406c34b88Smrg# ----------------------------- 136506c34b88Smrg# Add leading comment marks to the start of each line, and a trailing 136606c34b88Smrg# full-stop to the whole comment if one is not present already. 136706c34b88Smrgm4_define([_LT_FORMAT_COMMENT], 136806c34b88Smrg[m4_ifval([$1], [ 136906c34b88Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 137006c34b88Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 137106c34b88Smrg)]) 1372c43cc173Smrg 1373c43cc173Smrg 137421e67964Smrg 1375f1ee322dSmrg 1376f1ee322dSmrg 137706c34b88Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 137806c34b88Smrg# ------------------------------------------------------------------- 137906c34b88Smrg# CONFIGNAME is the name given to the value in the libtool script. 138006c34b88Smrg# VARNAME is the (base) name used in the configure script. 138106c34b88Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 138206c34b88Smrg# VARNAME. Any other value will be used directly. 138306c34b88Smrgm4_define([_LT_DECL], 138406c34b88Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 138506c34b88Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 138606c34b88Smrg [m4_ifval([$1], [$1], [$2])]) 138706c34b88Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 138806c34b88Smrg m4_ifval([$4], 138906c34b88Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 139006c34b88Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 139106c34b88Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 139221e67964Smrg]) 1393c43cc173Smrg 1394c27c18e8Smrg 139506c34b88Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 139606c34b88Smrg# -------------------------------------------------------- 139706c34b88Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 139806c34b88Smrg 139906c34b88Smrg 140006c34b88Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 140106c34b88Smrg# ------------------------------------------------ 140206c34b88Smrgm4_define([lt_decl_tag_varnames], 140306c34b88Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 140406c34b88Smrg 140506c34b88Smrg 140606c34b88Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 140706c34b88Smrg# --------------------------------------------------------- 140806c34b88Smrgm4_define([_lt_decl_filter], 140906c34b88Smrg[m4_case([$#], 141006c34b88Smrg [0], [m4_fatal([$0: too few arguments: $#])], 141106c34b88Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 141206c34b88Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 141306c34b88Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 141406c34b88Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1415c27c18e8Smrg]) 1416c27c18e8Smrg 1417c43cc173Smrg 141806c34b88Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 141906c34b88Smrg# -------------------------------------------------- 142006c34b88Smrgm4_define([lt_decl_quote_varnames], 142106c34b88Smrg[_lt_decl_filter([value], [1], $@)]) 1422c43cc173Smrg 142337eb1ca1Smrg 142406c34b88Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 142506c34b88Smrg# --------------------------------------------------- 142606c34b88Smrgm4_define([lt_decl_dquote_varnames], 142706c34b88Smrg[_lt_decl_filter([value], [2], $@)]) 1428c43cc173Smrg 1429c43cc173Smrg 143006c34b88Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 143106c34b88Smrg# --------------------------------------------------- 143206c34b88Smrgm4_define([lt_decl_varnames_tagged], 143306c34b88Smrg[m4_assert([$# <= 2])dnl 143406c34b88Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 143506c34b88Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 143606c34b88Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 143706c34b88Smrgm4_define([_lt_decl_varnames_tagged], 143806c34b88Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 143937eb1ca1Smrg 1440c43cc173Smrg 144106c34b88Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 144206c34b88Smrg# ------------------------------------------------ 144306c34b88Smrgm4_define([lt_decl_all_varnames], 144406c34b88Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 144506c34b88Smrg m4_if([$2], [], 144606c34b88Smrg m4_quote(lt_decl_varnames), 144706c34b88Smrg m4_quote(m4_shift($@))))[]dnl 144806c34b88Smrg]) 144906c34b88Smrgm4_define([_lt_decl_all_varnames], 145006c34b88Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 145106c34b88Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 145206c34b88Smrg]) 1453c43cc173Smrg 1454c43cc173Smrg 145506c34b88Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 145606c34b88Smrg# ------------------------------------ 145706c34b88Smrg# Quote a variable value, and forward it to `config.status' so that its 145806c34b88Smrg# declaration there will have the same value as in `configure'. VARNAME 145906c34b88Smrg# must have a single quote delimited value for this to work. 146006c34b88Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 146106c34b88Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1462c43cc173Smrg 146306c34b88Smrg 146406c34b88Smrg# _LT_CONFIG_STATUS_DECLARATIONS 146506c34b88Smrg# ------------------------------ 146606c34b88Smrg# We delimit libtool config variables with single quotes, so when 146706c34b88Smrg# we write them to config.status, we have to be sure to quote all 146806c34b88Smrg# embedded single quotes properly. In configure, this macro expands 146906c34b88Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 147006c34b88Smrg# 147106c34b88Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 147206c34b88Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 147306c34b88Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 147406c34b88Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1475c43cc173Smrg 1476c43cc173Smrg 147706c34b88Smrg# _LT_LIBTOOL_TAGS 1478b789ec8aSmrg# ---------------- 147906c34b88Smrg# Output comment and list of tags supported by the script 148006c34b88Smrgm4_defun([_LT_LIBTOOL_TAGS], 148106c34b88Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 148206c34b88Smrgavailable_tags="_LT_TAGS"dnl 148306c34b88Smrg]) 1484b789ec8aSmrg 1485b789ec8aSmrg 148606c34b88Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 148706c34b88Smrg# ----------------------------------- 148806c34b88Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 148906c34b88Smrg# expand to a commented shell variable setting: 149006c34b88Smrg# 149106c34b88Smrg# # Some comment about what VAR is for. 149206c34b88Smrg# visible_name=$lt_internal_name 149306c34b88Smrgm4_define([_LT_LIBTOOL_DECLARE], 149406c34b88Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 149506c34b88Smrg [description])))[]dnl 149606c34b88Smrgm4_pushdef([_libtool_name], 149706c34b88Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 149806c34b88Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 149906c34b88Smrg [0], [_libtool_name=[$]$1], 150006c34b88Smrg [1], [_libtool_name=$lt_[]$1], 150106c34b88Smrg [2], [_libtool_name=$lt_[]$1], 150206c34b88Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 150306c34b88Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 150406c34b88Smrg]) 1505b789ec8aSmrg 1506c43cc173Smrg 150706c34b88Smrg# _LT_LIBTOOL_CONFIG_VARS 150806c34b88Smrg# ----------------------- 150906c34b88Smrg# Produce commented declarations of non-tagged libtool config variables 151006c34b88Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 151106c34b88Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 151206c34b88Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 151306c34b88Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 151406c34b88Smrg[m4_foreach([_lt_var], 151506c34b88Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 151606c34b88Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1517c43cc173Smrg 1518c43cc173Smrg 151906c34b88Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 152006c34b88Smrg# ------------------------- 152106c34b88Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 152206c34b88Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 152306c34b88Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1524c43cc173Smrg 1525c27c18e8Smrg 152606c34b88Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 152706c34b88Smrg# ------------------------------ 152806c34b88Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1529c27c18e8Smrg 1530b789ec8aSmrg 153106c34b88Smrg# _LT_CONFIG_COMMANDS 153206c34b88Smrg# ------------------- 153306c34b88Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 153406c34b88Smrg# variables for single and double quote escaping we saved from calls 153506c34b88Smrg# to _LT_DECL, we can put quote escaped variables declarations 153606c34b88Smrg# into `config.status', and then the shell code to quote escape them in 153706c34b88Smrg# for loops in `config.status'. Finally, any additional code accumulated 153806c34b88Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 153906c34b88Smrgm4_defun([_LT_CONFIG_COMMANDS], 154006c34b88Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 154106c34b88Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 154206c34b88Smrg dnl instead of duplicating it all over again into config.status, 154306c34b88Smrg dnl then we will have config.status run $CONFIG_LT later, so it 154406c34b88Smrg dnl needs to know what name is stored there: 154506c34b88Smrg [AC_CONFIG_COMMANDS([libtool], 154606c34b88Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 154706c34b88Smrg dnl If the libtool generation code is destined for config.status, 154806c34b88Smrg dnl expand the accumulated commands and init code now: 154906c34b88Smrg [AC_CONFIG_COMMANDS([libtool], 155006c34b88Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 155106c34b88Smrg])#_LT_CONFIG_COMMANDS 1552b789ec8aSmrg 1553b789ec8aSmrg 155406c34b88Smrg# Initialize. 155506c34b88Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 155606c34b88Smrg[ 1557b789ec8aSmrg 155806c34b88Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 155906c34b88Smrg# if CDPATH is set. 156006c34b88Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1561c27c18e8Smrg 156206c34b88Smrgsed_quote_subst='$sed_quote_subst' 156306c34b88Smrgdouble_quote_subst='$double_quote_subst' 156406c34b88Smrgdelay_variable_subst='$delay_variable_subst' 156506c34b88Smrg_LT_CONFIG_STATUS_DECLARATIONS 156606c34b88SmrgLTCC='$LTCC' 156706c34b88SmrgLTCFLAGS='$LTCFLAGS' 156806c34b88Smrgcompiler='$compiler_DEFAULT' 1569c27c18e8Smrg 157006c34b88Smrg# A function that is used when there is no print builtin or printf. 157106c34b88Smrgfunc_fallback_echo () 157206c34b88Smrg{ 157306c34b88Smrg eval 'cat <<_LTECHO_EOF 157406c34b88Smrg\$[]1 157506c34b88Smrg_LTECHO_EOF' 157606c34b88Smrg} 1577c27c18e8Smrg 157806c34b88Smrg# Quote evaled strings. 157906c34b88Smrgfor var in lt_decl_all_varnames([[ \ 158006c34b88Smrg]], lt_decl_quote_varnames); do 158106c34b88Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 158206c34b88Smrg *[[\\\\\\\`\\"\\\$]]*) 158306c34b88Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 158406c34b88Smrg ;; 158506c34b88Smrg *) 158606c34b88Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 158706c34b88Smrg ;; 158806c34b88Smrg esac 158906c34b88Smrgdone 1590c43cc173Smrg 159106c34b88Smrg# Double-quote double-evaled strings. 159206c34b88Smrgfor var in lt_decl_all_varnames([[ \ 159306c34b88Smrg]], lt_decl_dquote_varnames); do 159406c34b88Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 159506c34b88Smrg *[[\\\\\\\`\\"\\\$]]*) 159606c34b88Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 159706c34b88Smrg ;; 159806c34b88Smrg *) 159906c34b88Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 160006c34b88Smrg ;; 160106c34b88Smrg esac 160206c34b88Smrgdone 1603c43cc173Smrg 160406c34b88Smrg_LT_OUTPUT_LIBTOOL_INIT 160521e67964Smrg]) 1606c43cc173Smrg 160706c34b88Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 160806c34b88Smrg# ------------------------------------ 160906c34b88Smrg# Generate a child script FILE with all initialization necessary to 161006c34b88Smrg# reuse the environment learned by the parent script, and make the 161106c34b88Smrg# file executable. If COMMENT is supplied, it is inserted after the 161206c34b88Smrg# `#!' sequence but before initialization text begins. After this 161306c34b88Smrg# macro, additional text can be appended to FILE to form the body of 161406c34b88Smrg# the child script. The macro ends with non-zero status if the 161506c34b88Smrg# file could not be fully written (such as if the disk is full). 161606c34b88Smrgm4_ifdef([AS_INIT_GENERATED], 161706c34b88Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 161806c34b88Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 161906c34b88Smrg[m4_require([AS_PREPARE])]dnl 162006c34b88Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 162106c34b88Smrg[lt_write_fail=0 162206c34b88Smrgcat >$1 <<_ASEOF || lt_write_fail=1 162306c34b88Smrg#! $SHELL 162406c34b88Smrg# Generated by $as_me. 162506c34b88Smrg$2 162606c34b88SmrgSHELL=\${CONFIG_SHELL-$SHELL} 162706c34b88Smrgexport SHELL 162806c34b88Smrg_ASEOF 162906c34b88Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 163006c34b88SmrgAS_SHELL_SANITIZE 163106c34b88Smrg_AS_PREPARE 163206c34b88Smrgexec AS_MESSAGE_FD>&1 163306c34b88Smrg_ASEOF 163406c34b88Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 163506c34b88Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1636c43cc173Smrg 163706c34b88Smrg# LT_OUTPUT 163806c34b88Smrg# --------- 163906c34b88Smrg# This macro allows early generation of the libtool script (before 164006c34b88Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 164106c34b88Smrg# tests. 164206c34b88SmrgAC_DEFUN([LT_OUTPUT], 164306c34b88Smrg[: ${CONFIG_LT=./config.lt} 164406c34b88SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 164506c34b88Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 164606c34b88Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 1647c43cc173Smrg 164806c34b88Smrgcat >>"$CONFIG_LT" <<\_LTEOF 164906c34b88Smrglt_cl_silent=false 165006c34b88Smrgexec AS_MESSAGE_LOG_FD>>config.log 165106c34b88Smrg{ 165206c34b88Smrg echo 165306c34b88Smrg AS_BOX([Running $as_me.]) 165406c34b88Smrg} >&AS_MESSAGE_LOG_FD 1655c27c18e8Smrg 165606c34b88Smrglt_cl_help="\ 165706c34b88Smrg\`$as_me' creates a local libtool stub from the current configuration, 165806c34b88Smrgfor use in further configure time tests before the real libtool is 165906c34b88Smrggenerated. 1660c43cc173Smrg 166106c34b88SmrgUsage: $[0] [[OPTIONS]] 1662c43cc173Smrg 166306c34b88Smrg -h, --help print this help, then exit 166406c34b88Smrg -V, --version print version number, then exit 166506c34b88Smrg -q, --quiet do not print progress messages 166606c34b88Smrg -d, --debug don't remove temporary files 1667c43cc173Smrg 166806c34b88SmrgReport bugs to <bug-libtool@gnu.org>." 1669c27c18e8Smrg 167006c34b88Smrglt_cl_version="\ 167106c34b88Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 167206c34b88Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 167306c34b88Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1674c43cc173Smrg 167506c34b88SmrgCopyright (C) 2011 Free Software Foundation, Inc. 167606c34b88SmrgThis config.lt script is free software; the Free Software Foundation 167706c34b88Smrggives unlimited permision to copy, distribute and modify it." 1678c43cc173Smrg 167906c34b88Smrgwhile test $[#] != 0 168006c34b88Smrgdo 168106c34b88Smrg case $[1] in 168206c34b88Smrg --version | --v* | -V ) 168306c34b88Smrg echo "$lt_cl_version"; exit 0 ;; 168406c34b88Smrg --help | --h* | -h ) 168506c34b88Smrg echo "$lt_cl_help"; exit 0 ;; 168606c34b88Smrg --debug | --d* | -d ) 168706c34b88Smrg debug=: ;; 168806c34b88Smrg --quiet | --q* | --silent | --s* | -q ) 168906c34b88Smrg lt_cl_silent=: ;; 1690c43cc173Smrg 169106c34b88Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 169206c34b88SmrgTry \`$[0] --help' for more information.]) ;; 1693c43cc173Smrg 169406c34b88Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 169506c34b88SmrgTry \`$[0] --help' for more information.]) ;; 169606c34b88Smrg esac 169706c34b88Smrg shift 169806c34b88Smrgdone 169937eb1ca1Smrg 170006c34b88Smrgif $lt_cl_silent; then 170106c34b88Smrg exec AS_MESSAGE_FD>/dev/null 170206c34b88Smrgfi 170306c34b88Smrg_LTEOF 1704c43cc173Smrg 170506c34b88Smrgcat >>"$CONFIG_LT" <<_LTEOF 170606c34b88Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 170706c34b88Smrg_LTEOF 1708c43cc173Smrg 170906c34b88Smrgcat >>"$CONFIG_LT" <<\_LTEOF 171006c34b88SmrgAC_MSG_NOTICE([creating $ofile]) 171106c34b88Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 171206c34b88SmrgAS_EXIT(0) 171306c34b88Smrg_LTEOF 171406c34b88Smrgchmod +x "$CONFIG_LT" 1715c43cc173Smrg 171606c34b88Smrg# configure is writing to config.log, but config.lt does its own redirection, 171706c34b88Smrg# appending to config.log, which fails on DOS, as config.log is still kept 171806c34b88Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 171906c34b88Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 172006c34b88Smrglt_cl_success=: 172106c34b88Smrgtest "$silent" = yes && 172206c34b88Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 172306c34b88Smrgexec AS_MESSAGE_LOG_FD>/dev/null 172406c34b88Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 172506c34b88Smrgexec AS_MESSAGE_LOG_FD>>config.log 172606c34b88Smrg$lt_cl_success || AS_EXIT(1) 172706c34b88Smrg])# LT_OUTPUT 1728f1ee322dSmrg 172906c34b88Smrg 173006c34b88Smrg# _LT_CONFIG(TAG) 173106c34b88Smrg# --------------- 173206c34b88Smrg# If TAG is the built-in tag, create an initial libtool script with a 173306c34b88Smrg# default configuration from the untagged config vars. Otherwise add code 173406c34b88Smrg# to config.status for appending the configuration named by TAG from the 173506c34b88Smrg# matching tagged config vars. 173606c34b88Smrgm4_defun([_LT_CONFIG], 173706c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 173806c34b88Smrg_LT_CONFIG_SAVE_COMMANDS([ 173906c34b88Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 174006c34b88Smrg m4_if(_LT_TAG, [C], [ 174106c34b88Smrg # See if we are running on zsh, and set the options which allow our 174206c34b88Smrg # commands through without removal of \ escapes. 174306c34b88Smrg if test -n "${ZSH_VERSION+set}" ; then 174406c34b88Smrg setopt NO_GLOB_SUBST 174521e67964Smrg fi 1746c43cc173Smrg 174706c34b88Smrg cfgfile="${ofile}T" 174806c34b88Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 174906c34b88Smrg $RM "$cfgfile" 1750c43cc173Smrg 175106c34b88Smrg cat <<_LT_EOF >> "$cfgfile" 175206c34b88Smrg#! $SHELL 1753c27c18e8Smrg 175406c34b88Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 175506c34b88Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 175606c34b88Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 175706c34b88Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 175806c34b88Smrg# 175906c34b88Smrg_LT_COPYING 176006c34b88Smrg_LT_LIBTOOL_TAGS 1761c43cc173Smrg 176206c34b88Smrg# ### BEGIN LIBTOOL CONFIG 176306c34b88Smrg_LT_LIBTOOL_CONFIG_VARS 176406c34b88Smrg_LT_LIBTOOL_TAG_VARS 176506c34b88Smrg# ### END LIBTOOL CONFIG 1766c43cc173Smrg 176706c34b88Smrg_LT_EOF 1768c43cc173Smrg 176906c34b88Smrg case $host_os in 177006c34b88Smrg aix3*) 177106c34b88Smrg cat <<\_LT_EOF >> "$cfgfile" 177206c34b88Smrg# AIX sometimes has problems with the GCC collect2 program. For some 177306c34b88Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 177406c34b88Smrg# vanish in a puff of smoke. 177506c34b88Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 177606c34b88Smrg COLLECT_NAMES= 177706c34b88Smrg export COLLECT_NAMES 177806c34b88Smrgfi 177906c34b88Smrg_LT_EOF 178006c34b88Smrg ;; 178106c34b88Smrg esac 1782c43cc173Smrg 178306c34b88Smrg _LT_PROG_LTMAIN 1784c43cc173Smrg 178506c34b88Smrg # We use sed instead of cat because bash on DJGPP gets confused if 178606c34b88Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 178706c34b88Smrg # text mode, it properly converts lines to CR/LF. This bash problem 178806c34b88Smrg # is reportedly fixed, but why not run on old versions too? 178906c34b88Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 179006c34b88Smrg || (rm -f "$cfgfile"; exit 1) 1791c43cc173Smrg 179206c34b88Smrg _LT_PROG_REPLACE_SHELLFNS 179321e67964Smrg 179406c34b88Smrg mv -f "$cfgfile" "$ofile" || 179506c34b88Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 179606c34b88Smrg chmod +x "$ofile" 179706c34b88Smrg], 179806c34b88Smrg[cat <<_LT_EOF >> "$ofile" 179937eb1ca1Smrg 180006c34b88Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 180106c34b88Smrgdnl in a comment (ie after a #). 180206c34b88Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 180306c34b88Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 180406c34b88Smrg# ### END LIBTOOL TAG CONFIG: $1 180506c34b88Smrg_LT_EOF 180606c34b88Smrg])dnl /m4_if 180706c34b88Smrg], 180806c34b88Smrg[m4_if([$1], [], [ 180906c34b88Smrg PACKAGE='$PACKAGE' 181006c34b88Smrg VERSION='$VERSION' 181106c34b88Smrg TIMESTAMP='$TIMESTAMP' 181206c34b88Smrg RM='$RM' 181306c34b88Smrg ofile='$ofile'], []) 181406c34b88Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 181506c34b88Smrg])# _LT_CONFIG 181621e67964Smrg 181721e67964Smrg 181806c34b88Smrg# LT_SUPPORTED_TAG(TAG) 181906c34b88Smrg# --------------------- 182006c34b88Smrg# Trace this macro to discover what tags are supported by the libtool 182106c34b88Smrg# --tag option, using: 182206c34b88Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 182306c34b88SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1824c43cc173Smrg 1825c43cc173Smrg 182606c34b88Smrg# C support is built-in for now 182706c34b88Smrgm4_define([_LT_LANG_C_enabled], []) 182806c34b88Smrgm4_define([_LT_TAGS], []) 1829c43cc173Smrg 1830c43cc173Smrg 183106c34b88Smrg# LT_LANG(LANG) 183206c34b88Smrg# ------------- 183306c34b88Smrg# Enable libtool support for the given language if not already enabled. 183406c34b88SmrgAC_DEFUN([LT_LANG], 183506c34b88Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 183606c34b88Smrgm4_case([$1], 183706c34b88Smrg [C], [_LT_LANG(C)], 183806c34b88Smrg [C++], [_LT_LANG(CXX)], 183906c34b88Smrg [Go], [_LT_LANG(GO)], 184006c34b88Smrg [Java], [_LT_LANG(GCJ)], 184106c34b88Smrg [Fortran 77], [_LT_LANG(F77)], 184206c34b88Smrg [Fortran], [_LT_LANG(FC)], 184306c34b88Smrg [Windows Resource], [_LT_LANG(RC)], 184406c34b88Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 184506c34b88Smrg [_LT_LANG($1)], 184606c34b88Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 184706c34b88Smrg])# LT_LANG 1848c43cc173Smrg 1849c43cc173Smrg 185006c34b88Smrg# _LT_LANG(LANGNAME) 185106c34b88Smrg# ------------------ 185206c34b88Smrgm4_defun([_LT_LANG], 185306c34b88Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 185406c34b88Smrg [LT_SUPPORTED_TAG([$1])dnl 185506c34b88Smrg m4_append([_LT_TAGS], [$1 ])dnl 185606c34b88Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 185706c34b88Smrg _LT_LANG_$1_CONFIG($1)])dnl 185806c34b88Smrg])# _LT_LANG 185921e67964Smrg 1860c43cc173Smrg 186106c34b88Smrgm4_ifndef([AC_PROG_GO], [ 186206c34b88Smrg# NOTE: This macro has been submitted for inclusion into # 186306c34b88Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 186406c34b88Smrg# a released version of Autoconf we should remove this # 186506c34b88Smrg# macro and use it instead. # 186606c34b88Smrgm4_defun([AC_PROG_GO], 186706c34b88Smrg[AC_LANG_PUSH(Go)dnl 186806c34b88SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 186906c34b88SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 187006c34b88Smrg_AC_ARG_VAR_LDFLAGS()dnl 187106c34b88SmrgAC_CHECK_TOOL(GOC, gccgo) 187206c34b88Smrgif test -z "$GOC"; then 187306c34b88Smrg if test -n "$ac_tool_prefix"; then 187406c34b88Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 187521e67964Smrg fi 187606c34b88Smrgfi 187706c34b88Smrgif test -z "$GOC"; then 187806c34b88Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 187906c34b88Smrgfi 188006c34b88Smrg])#m4_defun 188106c34b88Smrg])#m4_ifndef 1882c43cc173Smrg 1883c43cc173Smrg 188406c34b88Smrg# _LT_LANG_DEFAULT_CONFIG 188506c34b88Smrg# ----------------------- 188606c34b88Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 188706c34b88Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 188806c34b88Smrg [LT_LANG(CXX)], 188906c34b88Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1890c43cc173Smrg 189106c34b88SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 189206c34b88Smrg [LT_LANG(F77)], 189306c34b88Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1894c43cc173Smrg 189506c34b88SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 189606c34b88Smrg [LT_LANG(FC)], 189706c34b88Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1898c43cc173Smrg 189906c34b88Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 190006c34b88Smrgdnl pulling things in needlessly. 190106c34b88SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 190206c34b88Smrg [LT_LANG(GCJ)], 190306c34b88Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 190406c34b88Smrg [LT_LANG(GCJ)], 190506c34b88Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 190606c34b88Smrg [LT_LANG(GCJ)], 190706c34b88Smrg [m4_ifdef([AC_PROG_GCJ], 190806c34b88Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 190906c34b88Smrg m4_ifdef([A][M_PROG_GCJ], 191006c34b88Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 191106c34b88Smrg m4_ifdef([LT_PROG_GCJ], 191206c34b88Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1913c43cc173Smrg 191406c34b88SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 191506c34b88Smrg [LT_LANG(GO)], 191606c34b88Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 1917c43cc173Smrg 191806c34b88SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 191906c34b88Smrg [LT_LANG(RC)], 192006c34b88Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 192106c34b88Smrg])# _LT_LANG_DEFAULT_CONFIG 1922c43cc173Smrg 192306c34b88Smrg# Obsolete macros: 192406c34b88SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 192506c34b88SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 192606c34b88SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 192706c34b88SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 192806c34b88SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 1929c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 193006c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 193106c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 193206c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 193306c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 193406c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 1935c43cc173Smrg 1936c27c18e8Smrg 193706c34b88Smrg# _LT_TAG_COMPILER 193806c34b88Smrg# ---------------- 193906c34b88Smrgm4_defun([_LT_TAG_COMPILER], 194006c34b88Smrg[AC_REQUIRE([AC_PROG_CC])dnl 1941c43cc173Smrg 194206c34b88Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 194306c34b88Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 194406c34b88Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 194506c34b88Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1946c43cc173Smrg 194706c34b88Smrg# If no C compiler was specified, use CC. 194806c34b88SmrgLTCC=${LTCC-"$CC"} 1949c43cc173Smrg 195006c34b88Smrg# If no C compiler flags were specified, use CFLAGS. 195106c34b88SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1952c43cc173Smrg 195306c34b88Smrg# Allow CC to be a program name with arguments. 195406c34b88Smrgcompiler=$CC 195506c34b88Smrg])# _LT_TAG_COMPILER 1956c43cc173Smrg 1957c43cc173Smrg 195806c34b88Smrg# _LT_COMPILER_BOILERPLATE 195906c34b88Smrg# ------------------------ 196006c34b88Smrg# Check for compiler boilerplate output or warnings with 196106c34b88Smrg# the simple compiler test code. 196206c34b88Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 196306c34b88Smrg[m4_require([_LT_DECL_SED])dnl 196406c34b88Smrgac_outfile=conftest.$ac_objext 196506c34b88Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 196606c34b88Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 196706c34b88Smrg_lt_compiler_boilerplate=`cat conftest.err` 196806c34b88Smrg$RM conftest* 196906c34b88Smrg])# _LT_COMPILER_BOILERPLATE 1970c43cc173Smrg 1971c43cc173Smrg 197206c34b88Smrg# _LT_LINKER_BOILERPLATE 197306c34b88Smrg# ---------------------- 197406c34b88Smrg# Check for linker boilerplate output or warnings with 197506c34b88Smrg# the simple link test code. 197606c34b88Smrgm4_defun([_LT_LINKER_BOILERPLATE], 197706c34b88Smrg[m4_require([_LT_DECL_SED])dnl 197806c34b88Smrgac_outfile=conftest.$ac_objext 197906c34b88Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 198006c34b88Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 198106c34b88Smrg_lt_linker_boilerplate=`cat conftest.err` 198206c34b88Smrg$RM -r conftest* 198306c34b88Smrg])# _LT_LINKER_BOILERPLATE 1984c43cc173Smrg 198506c34b88Smrg# _LT_REQUIRED_DARWIN_CHECKS 198606c34b88Smrg# ------------------------- 198706c34b88Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 1988c43cc173Smrg case $host_os in 198906c34b88Smrg rhapsody* | darwin*) 199006c34b88Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 199106c34b88Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 199206c34b88Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 199306c34b88Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 199406c34b88Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 199506c34b88Smrg _LT_DECL([], [DSYMUTIL], [1], 199606c34b88Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 199706c34b88Smrg _LT_DECL([], [NMEDIT], [1], 199806c34b88Smrg [Tool to change global to local symbols on Mac OS X]) 199906c34b88Smrg _LT_DECL([], [LIPO], [1], 200006c34b88Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 200106c34b88Smrg _LT_DECL([], [OTOOL], [1], 200206c34b88Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 200306c34b88Smrg _LT_DECL([], [OTOOL64], [1], 200406c34b88Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2005c43cc173Smrg 200606c34b88Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 200706c34b88Smrg [lt_cv_apple_cc_single_mod=no 200806c34b88Smrg if test -z "${LT_MULTI_MODULE}"; then 200906c34b88Smrg # By default we will add the -single_module flag. You can override 201006c34b88Smrg # by either setting the environment variable LT_MULTI_MODULE 201106c34b88Smrg # non-empty at configure time, or by adding -multi_module to the 201206c34b88Smrg # link flags. 201306c34b88Smrg rm -rf libconftest.dylib* 201406c34b88Smrg echo "int foo(void){return 1;}" > conftest.c 201506c34b88Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 201606c34b88Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 201706c34b88Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 201806c34b88Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 201906c34b88Smrg _lt_result=$? 202006c34b88Smrg # If there is a non-empty error log, and "single_module" 202106c34b88Smrg # appears in it, assume the flag caused a linker warning 202206c34b88Smrg if test -s conftest.err && $GREP single_module conftest.err; then 202306c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 202406c34b88Smrg # Otherwise, if the output was created with a 0 exit code from 202506c34b88Smrg # the compiler, it worked. 202606c34b88Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 202706c34b88Smrg lt_cv_apple_cc_single_mod=yes 202806c34b88Smrg else 202906c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 203006c34b88Smrg fi 203106c34b88Smrg rm -rf libconftest.dylib* 203206c34b88Smrg rm -f conftest.* 203306c34b88Smrg fi]) 2034c43cc173Smrg 203506c34b88Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 203606c34b88Smrg [lt_cv_ld_exported_symbols_list], 203706c34b88Smrg [lt_cv_ld_exported_symbols_list=no 203806c34b88Smrg save_LDFLAGS=$LDFLAGS 203906c34b88Smrg echo "_main" > conftest.sym 204006c34b88Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 204106c34b88Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 204206c34b88Smrg [lt_cv_ld_exported_symbols_list=yes], 204306c34b88Smrg [lt_cv_ld_exported_symbols_list=no]) 204406c34b88Smrg LDFLAGS="$save_LDFLAGS" 204506c34b88Smrg ]) 204606c34b88Smrg 204706c34b88Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 204806c34b88Smrg [lt_cv_ld_force_load=no 204906c34b88Smrg cat > conftest.c << _LT_EOF 205006c34b88Smrgint forced_loaded() { return 2;} 205106c34b88Smrg_LT_EOF 205206c34b88Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 205306c34b88Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 205406c34b88Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 205506c34b88Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 205606c34b88Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 205706c34b88Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 205806c34b88Smrg cat > conftest.c << _LT_EOF 205906c34b88Smrgint main() { return 0;} 206006c34b88Smrg_LT_EOF 206106c34b88Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 206206c34b88Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 206306c34b88Smrg _lt_result=$? 206406c34b88Smrg if test -s conftest.err && $GREP force_load conftest.err; then 206506c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 206606c34b88Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 206706c34b88Smrg lt_cv_ld_force_load=yes 206806c34b88Smrg else 206906c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 207006c34b88Smrg fi 207106c34b88Smrg rm -f conftest.err libconftest.a conftest conftest.c 207206c34b88Smrg rm -rf conftest.dSYM 207306c34b88Smrg ]) 207406c34b88Smrg case $host_os in 207506c34b88Smrg rhapsody* | darwin1.[[012]]) 207606c34b88Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 207706c34b88Smrg darwin1.*) 207806c34b88Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 207906c34b88Smrg darwin*) # darwin 5.x on 208006c34b88Smrg # if running on 10.5 or later, the deployment target defaults 208106c34b88Smrg # to the OS version, if on x86, and 10.4, the deployment 208206c34b88Smrg # target defaults to 10.4. Don't you love it? 208306c34b88Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 208406c34b88Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 208506c34b88Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 208606c34b88Smrg 10.[[012]]*) 208706c34b88Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 208806c34b88Smrg 10.*) 208906c34b88Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 209006c34b88Smrg esac 209137eb1ca1Smrg ;; 209237eb1ca1Smrg esac 209306c34b88Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 209406c34b88Smrg _lt_dar_single_mod='$single_module' 209506c34b88Smrg fi 209606c34b88Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 209706c34b88Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 209821e67964Smrg else 209906c34b88Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 210021e67964Smrg fi 210106c34b88Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 210206c34b88Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 210321e67964Smrg else 210406c34b88Smrg _lt_dsymutil= 210521e67964Smrg fi 2106c27c18e8Smrg ;; 2107c27c18e8Smrg esac 210806c34b88Smrg]) 2109c43cc173Smrg 2110c43cc173Smrg 211106c34b88Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 211206c34b88Smrg# --------------------------------- 211306c34b88Smrg# Checks for linker and compiler features on darwin 211406c34b88Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 211506c34b88Smrg[ 211606c34b88Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 211706c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 211806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 211906c34b88Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 212006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 212106c34b88Smrg if test "$lt_cv_ld_force_load" = "yes"; then 212206c34b88Smrg _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\"`' 212306c34b88Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 212406c34b88Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 212506c34b88Smrg else 212606c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 212706c34b88Smrg fi 212806c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 212906c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 213006c34b88Smrg case $cc_basename in 213106c34b88Smrg ifort*) _lt_dar_can_shared=yes ;; 213206c34b88Smrg *) _lt_dar_can_shared=$GCC ;; 213306c34b88Smrg esac 213406c34b88Smrg if test "$_lt_dar_can_shared" = "yes"; then 213506c34b88Smrg output_verbose_link_cmd=func_echo_all 213606c34b88Smrg _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}" 213706c34b88Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 213806c34b88Smrg _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}" 213906c34b88Smrg _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}" 214006c34b88Smrg m4_if([$1], [CXX], 214106c34b88Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 214206c34b88Smrg _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}" 214306c34b88Smrg _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}" 214406c34b88Smrg fi 214506c34b88Smrg],[]) 214606c34b88Smrg else 214706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 214806c34b88Smrg fi 214906c34b88Smrg]) 2150c43cc173Smrg 215106c34b88Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 215206c34b88Smrg# ---------------------------------- 215306c34b88Smrg# Links a minimal program and checks the executable 215406c34b88Smrg# for the system default hardcoded library path. In most cases, 215506c34b88Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 215606c34b88Smrg# the location of the communication and MPI libs are included too. 215706c34b88Smrg# If we don't find anything, use the default library path according 215806c34b88Smrg# to the aix ld manual. 215906c34b88Smrg# Store the results from the different compilers for each TAGNAME. 216006c34b88Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 216106c34b88Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 216206c34b88Smrg[m4_require([_LT_DECL_SED])dnl 216306c34b88Smrgif test "${lt_cv_aix_libpath+set}" = set; then 216406c34b88Smrg aix_libpath=$lt_cv_aix_libpath 216506c34b88Smrgelse 216606c34b88Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 216706c34b88Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 216806c34b88Smrg lt_aix_libpath_sed='[ 216906c34b88Smrg /Import File Strings/,/^$/ { 217006c34b88Smrg /^0/ { 217106c34b88Smrg s/^0 *\([^ ]*\) *$/\1/ 217206c34b88Smrg p 217306c34b88Smrg } 217406c34b88Smrg }]' 217506c34b88Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 217606c34b88Smrg # Check for a 64-bit object if we didn't find anything. 217706c34b88Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 217806c34b88Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 217906c34b88Smrg fi],[]) 218006c34b88Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 218106c34b88Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 218206c34b88Smrg fi 218306c34b88Smrg ]) 218406c34b88Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 218506c34b88Smrgfi 218606c34b88Smrg])# _LT_SYS_MODULE_PATH_AIX 2187b789ec8aSmrg 2188b789ec8aSmrg 218906c34b88Smrg# _LT_SHELL_INIT(ARG) 219006c34b88Smrg# ------------------- 219106c34b88Smrgm4_define([_LT_SHELL_INIT], 219206c34b88Smrg[m4_divert_text([M4SH-INIT], [$1 219306c34b88Smrg])])# _LT_SHELL_INIT 2194b789ec8aSmrg 2195c43cc173Smrg 2196c43cc173Smrg 219706c34b88Smrg# _LT_PROG_ECHO_BACKSLASH 219806c34b88Smrg# ----------------------- 219906c34b88Smrg# Find how we can fake an echo command that does not interpret backslash. 220006c34b88Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 220106c34b88Smrg# of the generated configure script which will find a shell with a builtin 220206c34b88Smrg# printf (which we can use as an echo command). 220306c34b88Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 220406c34b88Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 220506c34b88SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 220606c34b88SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2207c43cc173Smrg 220806c34b88SmrgAC_MSG_CHECKING([how to print strings]) 220906c34b88Smrg# Test print first, because it will be a builtin if present. 221006c34b88Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 221106c34b88Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 221206c34b88Smrg ECHO='print -r --' 221306c34b88Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 221406c34b88Smrg ECHO='printf %s\n' 221506c34b88Smrgelse 221606c34b88Smrg # Use this function as a fallback that always works. 221706c34b88Smrg func_fallback_echo () 221806c34b88Smrg { 221906c34b88Smrg eval 'cat <<_LTECHO_EOF 222006c34b88Smrg$[]1 222106c34b88Smrg_LTECHO_EOF' 222206c34b88Smrg } 222306c34b88Smrg ECHO='func_fallback_echo' 222406c34b88Smrgfi 2225c43cc173Smrg 222606c34b88Smrg# func_echo_all arg... 222706c34b88Smrg# Invoke $ECHO with all args, space-separated. 222806c34b88Smrgfunc_echo_all () 222906c34b88Smrg{ 223006c34b88Smrg $ECHO "$*" 223106c34b88Smrg} 2232c43cc173Smrg 223306c34b88Smrgcase "$ECHO" in 223406c34b88Smrg printf*) AC_MSG_RESULT([printf]) ;; 223506c34b88Smrg print*) AC_MSG_RESULT([print -r]) ;; 223606c34b88Smrg *) AC_MSG_RESULT([cat]) ;; 223706c34b88Smrgesac 223821e67964Smrg 223906c34b88Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 224006c34b88Smrg[_AS_DETECT_SUGGESTED([ 224106c34b88Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 224206c34b88Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 224306c34b88Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 224406c34b88Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 224506c34b88Smrg PATH=/empty FPATH=/empty; export PATH FPATH 224606c34b88Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 224706c34b88Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2248c43cc173Smrg 224906c34b88Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 225006c34b88Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 225106c34b88Smrg])# _LT_PROG_ECHO_BACKSLASH 2252c43cc173Smrg 225337eb1ca1Smrg 225406c34b88Smrg# _LT_WITH_SYSROOT 225506c34b88Smrg# ---------------- 225606c34b88SmrgAC_DEFUN([_LT_WITH_SYSROOT], 225706c34b88Smrg[AC_MSG_CHECKING([for sysroot]) 225806c34b88SmrgAC_ARG_WITH([sysroot], 225906c34b88Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 226006c34b88Smrg (or the compiler's sysroot if not specified).], 226106c34b88Smrg[], [with_sysroot=no]) 2262c27c18e8Smrg 226306c34b88Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 226406c34b88Smrgdnl in case the user passed a directory name. 226506c34b88Smrglt_sysroot= 226606c34b88Smrgcase ${with_sysroot} in #( 226706c34b88Smrg yes) 226806c34b88Smrg if test "$GCC" = yes; then 226906c34b88Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 227006c34b88Smrg fi 227106c34b88Smrg ;; #( 227206c34b88Smrg /*) 227306c34b88Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 227406c34b88Smrg ;; #( 227506c34b88Smrg no|'') 227606c34b88Smrg ;; #( 227706c34b88Smrg *) 227806c34b88Smrg AC_MSG_RESULT([${with_sysroot}]) 227906c34b88Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 228006c34b88Smrg ;; 228106c34b88Smrgesac 2282c27c18e8Smrg 228306c34b88Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 228406c34b88Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 228506c34b88Smrg[dependent libraries, and in which our libraries should be installed.])]) 2286c43cc173Smrg 228706c34b88Smrg# _LT_ENABLE_LOCK 228806c34b88Smrg# --------------- 228906c34b88Smrgm4_defun([_LT_ENABLE_LOCK], 229006c34b88Smrg[AC_ARG_ENABLE([libtool-lock], 229106c34b88Smrg [AS_HELP_STRING([--disable-libtool-lock], 229206c34b88Smrg [avoid locking (might break parallel builds)])]) 229306c34b88Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 229437eb1ca1Smrg 229506c34b88Smrg# Some flags need to be propagated to the compiler or linker for good 229606c34b88Smrg# libtool support. 229706c34b88Smrgcase $host in 229806c34b88Smrgia64-*-hpux*) 229906c34b88Smrg # Find out which ABI we are using. 230006c34b88Smrg echo 'int i;' > conftest.$ac_ext 230106c34b88Smrg if AC_TRY_EVAL(ac_compile); then 230206c34b88Smrg case `/usr/bin/file conftest.$ac_objext` in 230306c34b88Smrg *ELF-32*) 230406c34b88Smrg HPUX_IA64_MODE="32" 230506c34b88Smrg ;; 230606c34b88Smrg *ELF-64*) 230706c34b88Smrg HPUX_IA64_MODE="64" 230806c34b88Smrg ;; 230906c34b88Smrg esac 231021e67964Smrg fi 231106c34b88Smrg rm -rf conftest* 231221e67964Smrg ;; 231306c34b88Smrg*-*-irix6*) 231406c34b88Smrg # Find out which ABI we are using. 231506c34b88Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 231606c34b88Smrg if AC_TRY_EVAL(ac_compile); then 231706c34b88Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 231806c34b88Smrg case `/usr/bin/file conftest.$ac_objext` in 231906c34b88Smrg *32-bit*) 232006c34b88Smrg LD="${LD-ld} -melf32bsmip" 232106c34b88Smrg ;; 232206c34b88Smrg *N32*) 232306c34b88Smrg LD="${LD-ld} -melf32bmipn32" 232406c34b88Smrg ;; 232506c34b88Smrg *64-bit*) 232606c34b88Smrg LD="${LD-ld} -melf64bmip" 232706c34b88Smrg ;; 232806c34b88Smrg esac 232906c34b88Smrg else 233006c34b88Smrg case `/usr/bin/file conftest.$ac_objext` in 233106c34b88Smrg *32-bit*) 233206c34b88Smrg LD="${LD-ld} -32" 233306c34b88Smrg ;; 233406c34b88Smrg *N32*) 233506c34b88Smrg LD="${LD-ld} -n32" 233606c34b88Smrg ;; 233706c34b88Smrg *64-bit*) 233806c34b88Smrg LD="${LD-ld} -64" 233906c34b88Smrg ;; 234006c34b88Smrg esac 234106c34b88Smrg fi 2342c43cc173Smrg fi 234306c34b88Smrg rm -rf conftest* 2344c43cc173Smrg ;; 2345c43cc173Smrg 234606c34b88Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 234706c34b88Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 234806c34b88Smrg # Find out which ABI we are using. 234906c34b88Smrg echo 'int i;' > conftest.$ac_ext 235006c34b88Smrg if AC_TRY_EVAL(ac_compile); then 235106c34b88Smrg case `/usr/bin/file conftest.o` in 235206c34b88Smrg *32-bit*) 235306c34b88Smrg case $host in 235406c34b88Smrg x86_64-*kfreebsd*-gnu) 235506c34b88Smrg LD="${LD-ld} -m elf_i386_fbsd" 235606c34b88Smrg ;; 235706c34b88Smrg x86_64-*linux*) 235806c34b88Smrg LD="${LD-ld} -m elf_i386" 235906c34b88Smrg ;; 236006c34b88Smrg ppc64-*linux*|powerpc64-*linux*) 236106c34b88Smrg LD="${LD-ld} -m elf32ppclinux" 236206c34b88Smrg ;; 236306c34b88Smrg s390x-*linux*) 236406c34b88Smrg LD="${LD-ld} -m elf_s390" 236506c34b88Smrg ;; 236606c34b88Smrg sparc64-*linux*) 236706c34b88Smrg LD="${LD-ld} -m elf32_sparc" 236806c34b88Smrg ;; 236906c34b88Smrg esac 237006c34b88Smrg ;; 237106c34b88Smrg *64-bit*) 237206c34b88Smrg case $host in 237306c34b88Smrg x86_64-*kfreebsd*-gnu) 237406c34b88Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 237506c34b88Smrg ;; 237606c34b88Smrg x86_64-*linux*) 237706c34b88Smrg LD="${LD-ld} -m elf_x86_64" 237806c34b88Smrg ;; 237906c34b88Smrg ppc*-*linux*|powerpc*-*linux*) 238006c34b88Smrg LD="${LD-ld} -m elf64ppc" 238106c34b88Smrg ;; 238206c34b88Smrg s390*-*linux*|s390*-*tpf*) 238306c34b88Smrg LD="${LD-ld} -m elf64_s390" 238406c34b88Smrg ;; 238506c34b88Smrg sparc*-*linux*) 238606c34b88Smrg LD="${LD-ld} -m elf64_sparc" 238706c34b88Smrg ;; 238806c34b88Smrg esac 238906c34b88Smrg ;; 239006c34b88Smrg esac 239106c34b88Smrg fi 239206c34b88Smrg rm -rf conftest* 2393c43cc173Smrg ;; 2394c43cc173Smrg 239506c34b88Smrg*-*-sco3.2v5*) 239606c34b88Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 239706c34b88Smrg SAVE_CFLAGS="$CFLAGS" 239806c34b88Smrg CFLAGS="$CFLAGS -belf" 239906c34b88Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 240006c34b88Smrg [AC_LANG_PUSH(C) 240106c34b88Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 240206c34b88Smrg AC_LANG_POP]) 240306c34b88Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 240406c34b88Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 240506c34b88Smrg CFLAGS="$SAVE_CFLAGS" 240606c34b88Smrg fi 2407c43cc173Smrg ;; 240806c34b88Smrg*-*solaris*) 240906c34b88Smrg # Find out which ABI we are using. 241006c34b88Smrg echo 'int i;' > conftest.$ac_ext 241106c34b88Smrg if AC_TRY_EVAL(ac_compile); then 241206c34b88Smrg case `/usr/bin/file conftest.o` in 241306c34b88Smrg *64-bit*) 241406c34b88Smrg case $lt_cv_prog_gnu_ld in 241506c34b88Smrg yes*) 241606c34b88Smrg case $host in 241706c34b88Smrg i?86-*-solaris*) 241806c34b88Smrg LD="${LD-ld} -m elf_x86_64" 241906c34b88Smrg ;; 242006c34b88Smrg sparc*-*-solaris*) 242106c34b88Smrg LD="${LD-ld} -m elf64_sparc" 242206c34b88Smrg ;; 242306c34b88Smrg esac 242406c34b88Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 242506c34b88Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 242606c34b88Smrg LD="${LD-ld}_sol2" 242706c34b88Smrg fi 242806c34b88Smrg ;; 242921e67964Smrg *) 243006c34b88Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 243106c34b88Smrg LD="${LD-ld} -64" 243206c34b88Smrg fi 243321e67964Smrg ;; 2434c43cc173Smrg esac 243506c34b88Smrg ;; 243606c34b88Smrg esac 2437c43cc173Smrg fi 243806c34b88Smrg rm -rf conftest* 2439c43cc173Smrg ;; 244006c34b88Smrgesac 2441c43cc173Smrg 244206c34b88Smrgneed_locks="$enable_libtool_lock" 244306c34b88Smrg])# _LT_ENABLE_LOCK 2444c43cc173Smrg 2445c43cc173Smrg 244606c34b88Smrg# _LT_PROG_AR 244706c34b88Smrg# ----------- 244806c34b88Smrgm4_defun([_LT_PROG_AR], 244906c34b88Smrg[AC_CHECK_TOOLS(AR, [ar], false) 245006c34b88Smrg: ${AR=ar} 245106c34b88Smrg: ${AR_FLAGS=cru} 245206c34b88Smrg_LT_DECL([], [AR], [1], [The archiver]) 245306c34b88Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2454c43cc173Smrg 245506c34b88SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 245606c34b88Smrg [lt_cv_ar_at_file=no 245706c34b88Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 245806c34b88Smrg [echo conftest.$ac_objext > conftest.lst 245906c34b88Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 246006c34b88Smrg AC_TRY_EVAL([lt_ar_try]) 246106c34b88Smrg if test "$ac_status" -eq 0; then 246206c34b88Smrg # Ensure the archiver fails upon bogus file names. 246306c34b88Smrg rm -f conftest.$ac_objext libconftest.a 246406c34b88Smrg AC_TRY_EVAL([lt_ar_try]) 246506c34b88Smrg if test "$ac_status" -ne 0; then 246606c34b88Smrg lt_cv_ar_at_file=@ 246706c34b88Smrg fi 246806c34b88Smrg fi 246906c34b88Smrg rm -f conftest.* libconftest.a 247006c34b88Smrg ]) 247106c34b88Smrg ]) 2472c43cc173Smrg 247306c34b88Smrgif test "x$lt_cv_ar_at_file" = xno; then 247406c34b88Smrg archiver_list_spec= 247506c34b88Smrgelse 247606c34b88Smrg archiver_list_spec=$lt_cv_ar_at_file 247706c34b88Smrgfi 247806c34b88Smrg_LT_DECL([], [archiver_list_spec], [1], 247906c34b88Smrg [How to feed a file listing to the archiver]) 248006c34b88Smrg])# _LT_PROG_AR 2481c43cc173Smrg 2482c43cc173Smrg 248306c34b88Smrg# _LT_CMD_OLD_ARCHIVE 248406c34b88Smrg# ------------------- 248506c34b88Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 248606c34b88Smrg[_LT_PROG_AR 2487c43cc173Smrg 248806c34b88SmrgAC_CHECK_TOOL(STRIP, strip, :) 248906c34b88Smrgtest -z "$STRIP" && STRIP=: 249006c34b88Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2491c43cc173Smrg 249206c34b88SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 249306c34b88Smrgtest -z "$RANLIB" && RANLIB=: 249406c34b88Smrg_LT_DECL([], [RANLIB], [1], 249506c34b88Smrg [Commands used to install an old-style archive]) 2496c27c18e8Smrg 249706c34b88Smrg# Determine commands to create old-style static archives. 249806c34b88Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 249906c34b88Smrgold_postinstall_cmds='chmod 644 $oldlib' 250006c34b88Smrgold_postuninstall_cmds= 2501c43cc173Smrg 250206c34b88Smrgif test -n "$RANLIB"; then 250306c34b88Smrg case $host_os in 250406c34b88Smrg openbsd*) 250506c34b88Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 250606c34b88Smrg ;; 250706c34b88Smrg *) 250806c34b88Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 250906c34b88Smrg ;; 251006c34b88Smrg esac 251106c34b88Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 251206c34b88Smrgfi 251306c34b88Smrg 251406c34b88Smrgcase $host_os in 251506c34b88Smrg darwin*) 251606c34b88Smrg lock_old_archive_extraction=yes ;; 251706c34b88Smrg *) 251806c34b88Smrg lock_old_archive_extraction=no ;; 251921e67964Smrgesac 252006c34b88Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 252106c34b88Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 252206c34b88Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 252306c34b88Smrg [Commands used to build an old-style archive]) 252406c34b88Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 252506c34b88Smrg [Whether to use a lock for old archive extraction]) 252606c34b88Smrg])# _LT_CMD_OLD_ARCHIVE 2527c43cc173Smrg 2528c43cc173Smrg 252906c34b88Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 253006c34b88Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 253106c34b88Smrg# ---------------------------------------------------------------- 253206c34b88Smrg# Check whether the given compiler option works 253306c34b88SmrgAC_DEFUN([_LT_COMPILER_OPTION], 253406c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 253506c34b88Smrgm4_require([_LT_DECL_SED])dnl 253606c34b88SmrgAC_CACHE_CHECK([$1], [$2], 253706c34b88Smrg [$2=no 253806c34b88Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 253906c34b88Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 254006c34b88Smrg lt_compiler_flag="$3" 254106c34b88Smrg # Insert the option either (1) after the last *FLAGS variable, or 254206c34b88Smrg # (2) before a word containing "conftest.", or (3) at the end. 254306c34b88Smrg # Note that $ac_compile itself does not contain backslashes and begins 254406c34b88Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 254506c34b88Smrg # The option is referenced via a variable to avoid confusing sed. 254606c34b88Smrg lt_compile=`echo "$ac_compile" | $SED \ 254706c34b88Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 254806c34b88Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 254906c34b88Smrg -e 's:$: $lt_compiler_flag:'` 255006c34b88Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 255106c34b88Smrg (eval "$lt_compile" 2>conftest.err) 255206c34b88Smrg ac_status=$? 255306c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 255406c34b88Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 255506c34b88Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 255606c34b88Smrg # The compiler can only warn and ignore the option if not recognized 255706c34b88Smrg # So say no if there are warnings other than the usual output. 255806c34b88Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 255906c34b88Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 256006c34b88Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 256106c34b88Smrg $2=yes 256206c34b88Smrg fi 256306c34b88Smrg fi 256406c34b88Smrg $RM conftest* 256506c34b88Smrg]) 2566c43cc173Smrg 256706c34b88Smrgif test x"[$]$2" = xyes; then 256806c34b88Smrg m4_if([$5], , :, [$5]) 256906c34b88Smrgelse 257006c34b88Smrg m4_if([$6], , :, [$6]) 257106c34b88Smrgfi 257206c34b88Smrg])# _LT_COMPILER_OPTION 2573c27c18e8Smrg 257406c34b88Smrg# Old name: 257506c34b88SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 257606c34b88Smrgdnl aclocal-1.4 backwards compatibility: 257706c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2578c27c18e8Smrg 2579c43cc173Smrg 258006c34b88Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 258106c34b88Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 258206c34b88Smrg# ---------------------------------------------------- 258306c34b88Smrg# Check whether the given linker option works 258406c34b88SmrgAC_DEFUN([_LT_LINKER_OPTION], 258506c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 258606c34b88Smrgm4_require([_LT_DECL_SED])dnl 258706c34b88SmrgAC_CACHE_CHECK([$1], [$2], 258806c34b88Smrg [$2=no 258906c34b88Smrg save_LDFLAGS="$LDFLAGS" 259006c34b88Smrg LDFLAGS="$LDFLAGS $3" 259106c34b88Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 259206c34b88Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 259306c34b88Smrg # The linker can only warn and ignore the option if not recognized 259406c34b88Smrg # So say no if there are warnings 259506c34b88Smrg if test -s conftest.err; then 259606c34b88Smrg # Append any errors to the config.log. 259706c34b88Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 259806c34b88Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 259906c34b88Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 260006c34b88Smrg if diff conftest.exp conftest.er2 >/dev/null; then 260106c34b88Smrg $2=yes 260206c34b88Smrg fi 260306c34b88Smrg else 260406c34b88Smrg $2=yes 260506c34b88Smrg fi 260606c34b88Smrg fi 260706c34b88Smrg $RM -r conftest* 260806c34b88Smrg LDFLAGS="$save_LDFLAGS" 260906c34b88Smrg]) 2610c43cc173Smrg 261106c34b88Smrgif test x"[$]$2" = xyes; then 261206c34b88Smrg m4_if([$4], , :, [$4]) 2613c43cc173Smrgelse 261406c34b88Smrg m4_if([$5], , :, [$5]) 2615c43cc173Smrgfi 261606c34b88Smrg])# _LT_LINKER_OPTION 2617c43cc173Smrg 2618c27c18e8Smrg# Old name: 261906c34b88SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2620c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 262106c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2622c43cc173Smrg 2623c27c18e8Smrg 262406c34b88Smrg# LT_CMD_MAX_LEN 262506c34b88Smrg#--------------- 262606c34b88SmrgAC_DEFUN([LT_CMD_MAX_LEN], 262706c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 262806c34b88Smrg# find the maximum length of command line arguments 262906c34b88SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 263006c34b88SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 263106c34b88Smrg i=0 263206c34b88Smrg teststring="ABCD" 2633c43cc173Smrg 263406c34b88Smrg case $build_os in 263506c34b88Smrg msdosdjgpp*) 263606c34b88Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 263706c34b88Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 263806c34b88Smrg # during glob expansion). Even if it were fixed, the result of this 263906c34b88Smrg # check would be larger than it should be. 264006c34b88Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 264106c34b88Smrg ;; 2642c43cc173Smrg 264306c34b88Smrg gnu*) 264406c34b88Smrg # Under GNU Hurd, this test is not required because there is 264506c34b88Smrg # no limit to the length of command line arguments. 264606c34b88Smrg # Libtool will interpret -1 as no limit whatsoever 264706c34b88Smrg lt_cv_sys_max_cmd_len=-1; 264806c34b88Smrg ;; 2649c27c18e8Smrg 265006c34b88Smrg cygwin* | mingw* | cegcc*) 265106c34b88Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 265206c34b88Smrg # about 5 minutes as the teststring grows exponentially. 265306c34b88Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 265406c34b88Smrg # you end up with a "frozen" computer, even though with patience 265506c34b88Smrg # the test eventually succeeds (with a max line length of 256k). 265606c34b88Smrg # Instead, let's just punt: use the minimum linelength reported by 265706c34b88Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 265806c34b88Smrg lt_cv_sys_max_cmd_len=8192; 265906c34b88Smrg ;; 2660c27c18e8Smrg 266106c34b88Smrg mint*) 266206c34b88Smrg # On MiNT this can take a long time and run out of memory. 266306c34b88Smrg lt_cv_sys_max_cmd_len=8192; 266421e67964Smrg ;; 266506c34b88Smrg 266606c34b88Smrg amigaos*) 266706c34b88Smrg # On AmigaOS with pdksh, this test takes hours, literally. 266806c34b88Smrg # So we just punt and use a minimum line length of 8192. 266906c34b88Smrg lt_cv_sys_max_cmd_len=8192; 2670c43cc173Smrg ;; 267106c34b88Smrg 267206c34b88Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 267306c34b88Smrg # This has been around since 386BSD, at least. Likely further. 267406c34b88Smrg if test -x /sbin/sysctl; then 267506c34b88Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 267606c34b88Smrg elif test -x /usr/sbin/sysctl; then 267706c34b88Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 267806c34b88Smrg else 267906c34b88Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 268006c34b88Smrg fi 268106c34b88Smrg # And add a safety zone 268206c34b88Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 268306c34b88Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 268406c34b88Smrg ;; 268506c34b88Smrg 268606c34b88Smrg interix*) 268706c34b88Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 268806c34b88Smrg lt_cv_sys_max_cmd_len=196608 268906c34b88Smrg ;; 269006c34b88Smrg 269106c34b88Smrg os2*) 269206c34b88Smrg # The test takes a long time on OS/2. 269306c34b88Smrg lt_cv_sys_max_cmd_len=8192 269406c34b88Smrg ;; 269506c34b88Smrg 269606c34b88Smrg osf*) 269706c34b88Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 269806c34b88Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 269906c34b88Smrg # nice to cause kernel panics so lets avoid the loop below. 270006c34b88Smrg # First set a reasonable default. 270106c34b88Smrg lt_cv_sys_max_cmd_len=16384 270206c34b88Smrg # 270306c34b88Smrg if test -x /sbin/sysconfig; then 270406c34b88Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 270506c34b88Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 270621e67964Smrg esac 270721e67964Smrg fi 270806c34b88Smrg ;; 270906c34b88Smrg sco3.2v5*) 271006c34b88Smrg lt_cv_sys_max_cmd_len=102400 271106c34b88Smrg ;; 271206c34b88Smrg sysv5* | sco5v6* | sysv4.2uw2*) 271306c34b88Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 271406c34b88Smrg if test -n "$kargmax"; then 271506c34b88Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 271606c34b88Smrg else 271706c34b88Smrg lt_cv_sys_max_cmd_len=32768 271806c34b88Smrg fi 271906c34b88Smrg ;; 272006c34b88Smrg *) 272106c34b88Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 272206c34b88Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 272306c34b88Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 272406c34b88Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 272506c34b88Smrg else 272606c34b88Smrg # Make teststring a little bigger before we do anything with it. 272706c34b88Smrg # a 1K string should be a reasonable start. 272806c34b88Smrg for i in 1 2 3 4 5 6 7 8 ; do 272906c34b88Smrg teststring=$teststring$teststring 273006c34b88Smrg done 273106c34b88Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 273206c34b88Smrg # If test is not a shell built-in, we'll probably end up computing a 273306c34b88Smrg # maximum length that is only half of the actual maximum length, but 273406c34b88Smrg # we can't tell. 273506c34b88Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 273606c34b88Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 273706c34b88Smrg test $i != 17 # 1/2 MB should be enough 273806c34b88Smrg do 273906c34b88Smrg i=`expr $i + 1` 274006c34b88Smrg teststring=$teststring$teststring 274106c34b88Smrg done 274206c34b88Smrg # Only check the string length outside the loop. 274306c34b88Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 274406c34b88Smrg teststring= 274506c34b88Smrg # Add a significant safety factor because C++ compilers can tack on 274606c34b88Smrg # massive amounts of additional arguments before passing them to the 274706c34b88Smrg # linker. It appears as though 1/2 is a usable value. 274806c34b88Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 274906c34b88Smrg fi 275006c34b88Smrg ;; 275106c34b88Smrg esac 275206c34b88Smrg]) 275306c34b88Smrgif test -n $lt_cv_sys_max_cmd_len ; then 275406c34b88Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 275521e67964Smrgelse 275606c34b88Smrg AC_MSG_RESULT(none) 2757c43cc173Smrgfi 275806c34b88Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 275906c34b88Smrg_LT_DECL([], [max_cmd_len], [0], 276006c34b88Smrg [What is the maximum length of a command?]) 276106c34b88Smrg])# LT_CMD_MAX_LEN 2762c43cc173Smrg 276306c34b88Smrg# Old name: 276406c34b88SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2765c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 276606c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2767c27c18e8Smrg 2768c27c18e8Smrg 276906c34b88Smrg# _LT_HEADER_DLFCN 277006c34b88Smrg# ---------------- 277106c34b88Smrgm4_defun([_LT_HEADER_DLFCN], 277206c34b88Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 277306c34b88Smrg])# _LT_HEADER_DLFCN 2774c43cc173Smrg 277521e67964Smrg 277606c34b88Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 277706c34b88Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 277806c34b88Smrg# ---------------------------------------------------------------- 277906c34b88Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 278006c34b88Smrg[m4_require([_LT_HEADER_DLFCN])dnl 278106c34b88Smrgif test "$cross_compiling" = yes; then : 278206c34b88Smrg [$4] 278306c34b88Smrgelse 278406c34b88Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 278506c34b88Smrg lt_status=$lt_dlunknown 278606c34b88Smrg cat > conftest.$ac_ext <<_LT_EOF 278706c34b88Smrg[#line $LINENO "configure" 278806c34b88Smrg#include "confdefs.h" 2789c43cc173Smrg 279006c34b88Smrg#if HAVE_DLFCN_H 279106c34b88Smrg#include <dlfcn.h> 279206c34b88Smrg#endif 279321e67964Smrg 279406c34b88Smrg#include <stdio.h> 279521e67964Smrg 279606c34b88Smrg#ifdef RTLD_GLOBAL 279706c34b88Smrg# define LT_DLGLOBAL RTLD_GLOBAL 279806c34b88Smrg#else 279906c34b88Smrg# ifdef DL_GLOBAL 280006c34b88Smrg# define LT_DLGLOBAL DL_GLOBAL 280106c34b88Smrg# else 280206c34b88Smrg# define LT_DLGLOBAL 0 280306c34b88Smrg# endif 280406c34b88Smrg#endif 2805c43cc173Smrg 280606c34b88Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 280706c34b88Smrg find out it does not work in some platform. */ 280806c34b88Smrg#ifndef LT_DLLAZY_OR_NOW 280906c34b88Smrg# ifdef RTLD_LAZY 281006c34b88Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 281106c34b88Smrg# else 281206c34b88Smrg# ifdef DL_LAZY 281306c34b88Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 281406c34b88Smrg# else 281506c34b88Smrg# ifdef RTLD_NOW 281606c34b88Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 281706c34b88Smrg# else 281806c34b88Smrg# ifdef DL_NOW 281906c34b88Smrg# define LT_DLLAZY_OR_NOW DL_NOW 282006c34b88Smrg# else 282106c34b88Smrg# define LT_DLLAZY_OR_NOW 0 282206c34b88Smrg# endif 282306c34b88Smrg# endif 282406c34b88Smrg# endif 282506c34b88Smrg# endif 282606c34b88Smrg#endif 2827c43cc173Smrg 282806c34b88Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 282906c34b88Smrg correspondingly for the symbols needed. */ 283006c34b88Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 283106c34b88Smrgint fnord () __attribute__((visibility("default"))); 283206c34b88Smrg#endif 2833c43cc173Smrg 283406c34b88Smrgint fnord () { return 42; } 283506c34b88Smrgint main () 283606c34b88Smrg{ 283706c34b88Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 283806c34b88Smrg int status = $lt_dlunknown; 2839c43cc173Smrg 284006c34b88Smrg if (self) 284106c34b88Smrg { 284206c34b88Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 284306c34b88Smrg else 284406c34b88Smrg { 284506c34b88Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 284606c34b88Smrg else puts (dlerror ()); 284706c34b88Smrg } 284806c34b88Smrg /* dlclose (self); */ 284906c34b88Smrg } 285021e67964Smrg else 285106c34b88Smrg puts (dlerror ()); 285221e67964Smrg 285306c34b88Smrg return status; 285406c34b88Smrg}] 285506c34b88Smrg_LT_EOF 285606c34b88Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 285706c34b88Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 285806c34b88Smrg lt_status=$? 285906c34b88Smrg case x$lt_status in 286006c34b88Smrg x$lt_dlno_uscore) $1 ;; 286106c34b88Smrg x$lt_dlneed_uscore) $2 ;; 286206c34b88Smrg x$lt_dlunknown|x*) $3 ;; 2863c43cc173Smrg esac 286406c34b88Smrg else : 286506c34b88Smrg # compilation failed 286606c34b88Smrg $3 286721e67964Smrg fi 286806c34b88Smrgfi 286906c34b88Smrgrm -fr conftest* 287006c34b88Smrg])# _LT_TRY_DLOPEN_SELF 287121e67964Smrg 2872c43cc173Smrg 287306c34b88Smrg# LT_SYS_DLOPEN_SELF 287406c34b88Smrg# ------------------ 287506c34b88SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 287606c34b88Smrg[m4_require([_LT_HEADER_DLFCN])dnl 287706c34b88Smrgif test "x$enable_dlopen" != xyes; then 287806c34b88Smrg enable_dlopen=unknown 287906c34b88Smrg enable_dlopen_self=unknown 288006c34b88Smrg enable_dlopen_self_static=unknown 288106c34b88Smrgelse 288206c34b88Smrg lt_cv_dlopen=no 288306c34b88Smrg lt_cv_dlopen_libs= 288437eb1ca1Smrg 288506c34b88Smrg case $host_os in 288606c34b88Smrg beos*) 288706c34b88Smrg lt_cv_dlopen="load_add_on" 288806c34b88Smrg lt_cv_dlopen_libs= 288906c34b88Smrg lt_cv_dlopen_self=yes 289021e67964Smrg ;; 289106c34b88Smrg 289206c34b88Smrg mingw* | pw32* | cegcc*) 289306c34b88Smrg lt_cv_dlopen="LoadLibrary" 289406c34b88Smrg lt_cv_dlopen_libs= 289506c34b88Smrg ;; 289606c34b88Smrg 289706c34b88Smrg cygwin*) 289806c34b88Smrg lt_cv_dlopen="dlopen" 289906c34b88Smrg lt_cv_dlopen_libs= 290006c34b88Smrg ;; 290106c34b88Smrg 290206c34b88Smrg darwin*) 290306c34b88Smrg # if libdl is installed we need to link against it 290406c34b88Smrg AC_CHECK_LIB([dl], [dlopen], 290506c34b88Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 290606c34b88Smrg lt_cv_dlopen="dyld" 290706c34b88Smrg lt_cv_dlopen_libs= 290806c34b88Smrg lt_cv_dlopen_self=yes 290906c34b88Smrg ]) 291021e67964Smrg ;; 291106c34b88Smrg 2912c43cc173Smrg *) 291306c34b88Smrg AC_CHECK_FUNC([shl_load], 291406c34b88Smrg [lt_cv_dlopen="shl_load"], 291506c34b88Smrg [AC_CHECK_LIB([dld], [shl_load], 291606c34b88Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 291706c34b88Smrg [AC_CHECK_FUNC([dlopen], 291806c34b88Smrg [lt_cv_dlopen="dlopen"], 291906c34b88Smrg [AC_CHECK_LIB([dl], [dlopen], 292006c34b88Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 292106c34b88Smrg [AC_CHECK_LIB([svld], [dlopen], 292206c34b88Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 292306c34b88Smrg [AC_CHECK_LIB([dld], [dld_link], 292406c34b88Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 292506c34b88Smrg ]) 292606c34b88Smrg ]) 292706c34b88Smrg ]) 292806c34b88Smrg ]) 292906c34b88Smrg ]) 2930c43cc173Smrg ;; 2931c43cc173Smrg esac 2932c43cc173Smrg 293306c34b88Smrg if test "x$lt_cv_dlopen" != xno; then 293406c34b88Smrg enable_dlopen=yes 293521e67964Smrg else 293606c34b88Smrg enable_dlopen=no 293721e67964Smrg fi 293821e67964Smrg 293906c34b88Smrg case $lt_cv_dlopen in 294006c34b88Smrg dlopen) 294106c34b88Smrg save_CPPFLAGS="$CPPFLAGS" 294206c34b88Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 294321e67964Smrg 294406c34b88Smrg save_LDFLAGS="$LDFLAGS" 294506c34b88Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 294621e67964Smrg 294706c34b88Smrg save_LIBS="$LIBS" 294806c34b88Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 294921e67964Smrg 295006c34b88Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 295106c34b88Smrg lt_cv_dlopen_self, [dnl 295206c34b88Smrg _LT_TRY_DLOPEN_SELF( 295306c34b88Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 295406c34b88Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 295506c34b88Smrg ]) 295621e67964Smrg 295706c34b88Smrg if test "x$lt_cv_dlopen_self" = xyes; then 295806c34b88Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 295906c34b88Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 296006c34b88Smrg lt_cv_dlopen_self_static, [dnl 296106c34b88Smrg _LT_TRY_DLOPEN_SELF( 296206c34b88Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 296306c34b88Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 296406c34b88Smrg ]) 296506c34b88Smrg fi 2966c27c18e8Smrg 296706c34b88Smrg CPPFLAGS="$save_CPPFLAGS" 296806c34b88Smrg LDFLAGS="$save_LDFLAGS" 296906c34b88Smrg LIBS="$save_LIBS" 2970c43cc173Smrg ;; 2971c43cc173Smrg esac 2972c43cc173Smrg 297306c34b88Smrg case $lt_cv_dlopen_self in 297406c34b88Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 297506c34b88Smrg *) enable_dlopen_self=unknown ;; 297606c34b88Smrg esac 2977b789ec8aSmrg 297806c34b88Smrg case $lt_cv_dlopen_self_static in 297906c34b88Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 298006c34b88Smrg *) enable_dlopen_self_static=unknown ;; 2981b789ec8aSmrg esac 2982b789ec8aSmrgfi 298306c34b88Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 298406c34b88Smrg [Whether dlopen is supported]) 298506c34b88Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 298606c34b88Smrg [Whether dlopen of programs is supported]) 298706c34b88Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 298806c34b88Smrg [Whether dlopen of statically linked programs is supported]) 298906c34b88Smrg])# LT_SYS_DLOPEN_SELF 2990b789ec8aSmrg 299106c34b88Smrg# Old name: 299206c34b88SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 299306c34b88Smrgdnl aclocal-1.4 backwards compatibility: 299406c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2995c43cc173Smrg 2996c43cc173Smrg 299706c34b88Smrg# _LT_COMPILER_C_O([TAGNAME]) 299806c34b88Smrg# --------------------------- 299906c34b88Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 300006c34b88Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 300106c34b88Smrgm4_defun([_LT_COMPILER_C_O], 300206c34b88Smrg[m4_require([_LT_DECL_SED])dnl 300306c34b88Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 300406c34b88Smrgm4_require([_LT_TAG_COMPILER])dnl 300506c34b88SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 300606c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 300706c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 300806c34b88Smrg $RM -r conftest 2>/dev/null 300906c34b88Smrg mkdir conftest 301006c34b88Smrg cd conftest 301106c34b88Smrg mkdir out 301206c34b88Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3013c27c18e8Smrg 301406c34b88Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 301506c34b88Smrg # Insert the option either (1) after the last *FLAGS variable, or 301606c34b88Smrg # (2) before a word containing "conftest.", or (3) at the end. 301706c34b88Smrg # Note that $ac_compile itself does not contain backslashes and begins 301806c34b88Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 301906c34b88Smrg lt_compile=`echo "$ac_compile" | $SED \ 302006c34b88Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 302106c34b88Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 302206c34b88Smrg -e 's:$: $lt_compiler_flag:'` 302306c34b88Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 302406c34b88Smrg (eval "$lt_compile" 2>out/conftest.err) 302506c34b88Smrg ac_status=$? 302606c34b88Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 302706c34b88Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 302806c34b88Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 302906c34b88Smrg then 303006c34b88Smrg # The compiler can only warn and ignore the option if not recognized 303106c34b88Smrg # So say no if there are warnings 303206c34b88Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 303306c34b88Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 303406c34b88Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 303506c34b88Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 303606c34b88Smrg fi 303706c34b88Smrg fi 303806c34b88Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 303906c34b88Smrg $RM conftest* 304006c34b88Smrg # SGI C++ compiler will create directory out/ii_files/ for 304106c34b88Smrg # template instantiation 304206c34b88Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 304306c34b88Smrg $RM out/* && rmdir out 304406c34b88Smrg cd .. 304506c34b88Smrg $RM -r conftest 304606c34b88Smrg $RM conftest* 304706c34b88Smrg]) 304806c34b88Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 304906c34b88Smrg [Does compiler simultaneously support -c and -o options?]) 305006c34b88Smrg])# _LT_COMPILER_C_O 305106c34b88Smrg 305206c34b88Smrg 305306c34b88Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 305406c34b88Smrg# ---------------------------------- 305506c34b88Smrg# Check to see if we can do hard links to lock some files if needed 305606c34b88Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 305706c34b88Smrg[m4_require([_LT_ENABLE_LOCK])dnl 305806c34b88Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 305906c34b88Smrg_LT_COMPILER_C_O([$1]) 306006c34b88Smrg 306106c34b88Smrghard_links="nottested" 306206c34b88Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 306306c34b88Smrg # do not overwrite the value of need_locks provided by the user 306406c34b88Smrg AC_MSG_CHECKING([if we can lock with hard links]) 306506c34b88Smrg hard_links=yes 306606c34b88Smrg $RM conftest* 306706c34b88Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 306806c34b88Smrg touch conftest.a 306906c34b88Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 307006c34b88Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 307106c34b88Smrg AC_MSG_RESULT([$hard_links]) 307206c34b88Smrg if test "$hard_links" = no; then 307306c34b88Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 307406c34b88Smrg need_locks=warn 3075c43cc173Smrg fi 3076c27c18e8Smrgelse 307706c34b88Smrg need_locks=no 3078c27c18e8Smrgfi 307906c34b88Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 308006c34b88Smrg])# _LT_COMPILER_FILE_LOCKS 3081c43cc173Smrg 3082b789ec8aSmrg 308306c34b88Smrg# _LT_CHECK_OBJDIR 308406c34b88Smrg# ---------------- 308506c34b88Smrgm4_defun([_LT_CHECK_OBJDIR], 308606c34b88Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 308706c34b88Smrg[rm -f .libs 2>/dev/null 308806c34b88Smrgmkdir .libs 2>/dev/null 308906c34b88Smrgif test -d .libs; then 309006c34b88Smrg lt_cv_objdir=.libs 309106c34b88Smrgelse 309206c34b88Smrg # MS-DOS does not allow filenames that begin with a dot. 309306c34b88Smrg lt_cv_objdir=_libs 309406c34b88Smrgfi 309506c34b88Smrgrmdir .libs 2>/dev/null]) 309606c34b88Smrgobjdir=$lt_cv_objdir 309706c34b88Smrg_LT_DECL([], [objdir], [0], 309806c34b88Smrg [The name of the directory that contains temporary libtool files])dnl 309906c34b88Smrgm4_pattern_allow([LT_OBJDIR])dnl 310006c34b88SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 310106c34b88Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 310206c34b88Smrg])# _LT_CHECK_OBJDIR 3103b789ec8aSmrg 3104b789ec8aSmrg 310506c34b88Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 310606c34b88Smrg# -------------------------------------- 310706c34b88Smrg# Check hardcoding attributes. 310806c34b88Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 310906c34b88Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 311006c34b88Smrg_LT_TAGVAR(hardcode_action, $1)= 311106c34b88Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 311206c34b88Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 311306c34b88Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 3114b789ec8aSmrg 311506c34b88Smrg # We can hardcode non-existent directories. 311606c34b88Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 311706c34b88Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 311806c34b88Smrg # have to relink, otherwise we might link with an installed library 311906c34b88Smrg # when we should be linking with a yet-to-be-installed one 312006c34b88Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 312106c34b88Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 312206c34b88Smrg # Linking always hardcodes the temporary library directory. 312306c34b88Smrg _LT_TAGVAR(hardcode_action, $1)=relink 312406c34b88Smrg else 312506c34b88Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 312606c34b88Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 3127b789ec8aSmrg fi 312806c34b88Smrgelse 312906c34b88Smrg # We cannot hardcode anything, or else we can only hardcode existing 313006c34b88Smrg # directories. 313106c34b88Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 3132b789ec8aSmrgfi 313306c34b88SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 313421e67964Smrg 313506c34b88Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 313606c34b88Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 313706c34b88Smrg # Fast installation is not supported 313806c34b88Smrg enable_fast_install=no 313906c34b88Smrgelif test "$shlibpath_overrides_runpath" = yes || 314006c34b88Smrg test "$enable_shared" = no; then 314106c34b88Smrg # Fast installation is not necessary 314206c34b88Smrg enable_fast_install=needless 314306c34b88Smrgfi 314406c34b88Smrg_LT_TAGDECL([], [hardcode_action], [0], 314506c34b88Smrg [How to hardcode a shared library path into an executable]) 314606c34b88Smrg])# _LT_LINKER_HARDCODE_LIBPATH 314721e67964Smrg 3148c43cc173Smrg 314906c34b88Smrg# _LT_CMD_STRIPLIB 315006c34b88Smrg# ---------------- 315106c34b88Smrgm4_defun([_LT_CMD_STRIPLIB], 315206c34b88Smrg[m4_require([_LT_DECL_EGREP]) 315306c34b88Smrgstriplib= 315406c34b88Smrgold_striplib= 315506c34b88SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 315606c34b88Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 315706c34b88Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 315806c34b88Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 315906c34b88Smrg AC_MSG_RESULT([yes]) 316006c34b88Smrgelse 316106c34b88Smrg# FIXME - insert some real tests, host_os isn't really good enough 316206c34b88Smrg case $host_os in 316306c34b88Smrg darwin*) 316406c34b88Smrg if test -n "$STRIP" ; then 316506c34b88Smrg striplib="$STRIP -x" 316606c34b88Smrg old_striplib="$STRIP -S" 316706c34b88Smrg AC_MSG_RESULT([yes]) 316806c34b88Smrg else 316906c34b88Smrg AC_MSG_RESULT([no]) 317006c34b88Smrg fi 317106c34b88Smrg ;; 317237eb1ca1Smrg *) 317306c34b88Smrg AC_MSG_RESULT([no]) 317406c34b88Smrg ;; 317537eb1ca1Smrg esac 3176c27c18e8Smrgfi 317706c34b88Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 317806c34b88Smrg_LT_DECL([], [striplib], [1]) 317906c34b88Smrg])# _LT_CMD_STRIPLIB 3180c43cc173Smrg 3181c43cc173Smrg 318206c34b88Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 318306c34b88Smrg# ----------------------------- 318406c34b88Smrg# PORTME Fill in your ld.so characteristics 318506c34b88Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 318606c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3187c27c18e8Smrgm4_require([_LT_DECL_EGREP])dnl 318806c34b88Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 318906c34b88Smrgm4_require([_LT_DECL_OBJDUMP])dnl 319006c34b88Smrgm4_require([_LT_DECL_SED])dnl 319106c34b88Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 319206c34b88SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 319306c34b88Smrgm4_if([$1], 319406c34b88Smrg [], [ 319506c34b88Smrgif test "$GCC" = yes; then 319606c34b88Smrg case $host_os in 319706c34b88Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 319806c34b88Smrg *) lt_awk_arg="/^libraries:/" ;; 319906c34b88Smrg esac 320006c34b88Smrg case $host_os in 320106c34b88Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 320206c34b88Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 320306c34b88Smrg esac 320406c34b88Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 320506c34b88Smrg case $lt_search_path_spec in 320606c34b88Smrg *\;*) 320706c34b88Smrg # if the path contains ";" then we assume it to be the separator 320806c34b88Smrg # otherwise default to the standard path separator (i.e. ":") - it is 320906c34b88Smrg # assumed that no part of a normal pathname contains ";" but that should 321006c34b88Smrg # okay in the real world where ";" in dirpaths is itself problematic. 321106c34b88Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 321206c34b88Smrg ;; 321306c34b88Smrg *) 321406c34b88Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 321506c34b88Smrg ;; 321606c34b88Smrg esac 321706c34b88Smrg # Ok, now we have the path, separated by spaces, we can step through it 321806c34b88Smrg # and add multilib dir if necessary. 321906c34b88Smrg lt_tmp_lt_search_path_spec= 322006c34b88Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 322106c34b88Smrg for lt_sys_path in $lt_search_path_spec; do 322206c34b88Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 322306c34b88Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 322406c34b88Smrg else 322506c34b88Smrg test -d "$lt_sys_path" && \ 322606c34b88Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 322706c34b88Smrg fi 322806c34b88Smrg done 322906c34b88Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 323006c34b88SmrgBEGIN {RS=" "; FS="/|\n";} { 323106c34b88Smrg lt_foo=""; 323206c34b88Smrg lt_count=0; 323306c34b88Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 323406c34b88Smrg if ($lt_i != "" && $lt_i != ".") { 323506c34b88Smrg if ($lt_i == "..") { 323606c34b88Smrg lt_count++; 323706c34b88Smrg } else { 323806c34b88Smrg if (lt_count == 0) { 323906c34b88Smrg lt_foo="/" $lt_i lt_foo; 324006c34b88Smrg } else { 324106c34b88Smrg lt_count--; 324206c34b88Smrg } 324306c34b88Smrg } 324406c34b88Smrg } 324506c34b88Smrg } 324606c34b88Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 324706c34b88Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 324806c34b88Smrg}'` 324906c34b88Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 325006c34b88Smrg # for these hosts. 325106c34b88Smrg case $host_os in 325206c34b88Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 325306c34b88Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 325406c34b88Smrg esac 325506c34b88Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 325606c34b88Smrgelse 325706c34b88Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 325806c34b88Smrgfi]) 325906c34b88Smrglibrary_names_spec= 326006c34b88Smrglibname_spec='lib$name' 326106c34b88Smrgsoname_spec= 326206c34b88Smrgshrext_cmds=".so" 326306c34b88Smrgpostinstall_cmds= 326406c34b88Smrgpostuninstall_cmds= 326506c34b88Smrgfinish_cmds= 326606c34b88Smrgfinish_eval= 326706c34b88Smrgshlibpath_var= 326806c34b88Smrgshlibpath_overrides_runpath=unknown 326906c34b88Smrgversion_type=none 327006c34b88Smrgdynamic_linker="$host_os ld.so" 327106c34b88Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 327206c34b88Smrgneed_lib_prefix=unknown 327306c34b88Smrghardcode_into_libs=no 3274c43cc173Smrg 327506c34b88Smrg# when you set need_version to no, make sure it does not cause -set_version 327606c34b88Smrg# flags to be left without arguments 327706c34b88Smrgneed_version=unknown 3278c43cc173Smrg 3279c27c18e8Smrgcase $host_os in 328006c34b88Smrgaix3*) 328106c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 328206c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 328306c34b88Smrg shlibpath_var=LIBPATH 328406c34b88Smrg 328506c34b88Smrg # AIX 3 has no versioning support, so we append a major version to the name. 328606c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 3287c27c18e8Smrg ;; 328806c34b88Smrg 328906c34b88Smrgaix[[4-9]]*) 329006c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 329106c34b88Smrg need_lib_prefix=no 329206c34b88Smrg need_version=no 329306c34b88Smrg hardcode_into_libs=yes 3294c27c18e8Smrg if test "$host_cpu" = ia64; then 329506c34b88Smrg # AIX 5 supports IA64 329606c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 329706c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 329806c34b88Smrg else 329906c34b88Smrg # With GCC up to 2.95.x, collect2 would create an import file 330006c34b88Smrg # for dependence libraries. The import file would start with 330106c34b88Smrg # the line `#! .'. This would cause the generated library to 330206c34b88Smrg # depend on `.', always an invalid library. This was fixed in 330306c34b88Smrg # development snapshots of GCC prior to 3.0. 330406c34b88Smrg case $host_os in 330506c34b88Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 330606c34b88Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 330706c34b88Smrg echo ' yes ' 330806c34b88Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 330906c34b88Smrg : 331006c34b88Smrg else 331106c34b88Smrg can_build_shared=no 331206c34b88Smrg fi 331306c34b88Smrg ;; 331406c34b88Smrg esac 331506c34b88Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 331606c34b88Smrg # soname into executable. Probably we can add versioning support to 331706c34b88Smrg # collect2, so additional links can be useful in future. 331806c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 331906c34b88Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 332006c34b88Smrg # instead of lib<name>.a to let people know that these are not 332106c34b88Smrg # typical AIX shared libraries. 332206c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 332306c34b88Smrg else 332406c34b88Smrg # We preserve .a as extension for shared libraries through AIX4.2 332506c34b88Smrg # and later when we are not doing run time linking. 332606c34b88Smrg library_names_spec='${libname}${release}.a $libname.a' 332706c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 332806c34b88Smrg fi 332906c34b88Smrg shlibpath_var=LIBPATH 3330c27c18e8Smrg fi 3331c27c18e8Smrg ;; 3332c43cc173Smrg 333306c34b88Smrgamigaos*) 333406c34b88Smrg case $host_cpu in 333506c34b88Smrg powerpc) 333606c34b88Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 333706c34b88Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 333806c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 333906c34b88Smrg ;; 334006c34b88Smrg m68k) 334106c34b88Smrg library_names_spec='$libname.ixlibrary $libname.a' 334206c34b88Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 334306c34b88Smrg 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' 334406c34b88Smrg ;; 334506c34b88Smrg esac 334606c34b88Smrg ;; 3347c43cc173Smrg 334806c34b88Smrgbeos*) 334906c34b88Smrg library_names_spec='${libname}${shared_ext}' 335006c34b88Smrg dynamic_linker="$host_os ld.so" 335106c34b88Smrg shlibpath_var=LIBRARY_PATH 3352c27c18e8Smrg ;; 3353c43cc173Smrg 335406c34b88Smrgbsdi[[45]]*) 335506c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 335606c34b88Smrg need_version=no 335706c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 335806c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 335906c34b88Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 336006c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 336106c34b88Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 336206c34b88Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 336306c34b88Smrg # the default ld.so.conf also contains /usr/contrib/lib and 336406c34b88Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 336506c34b88Smrg # libtool to hard-code these into programs 336606c34b88Smrg ;; 3367c43cc173Smrg 336806c34b88Smrgcygwin* | mingw* | pw32* | cegcc*) 336906c34b88Smrg version_type=windows 337006c34b88Smrg shrext_cmds=".dll" 337106c34b88Smrg need_version=no 337206c34b88Smrg need_lib_prefix=no 3373c43cc173Smrg 337406c34b88Smrg case $GCC,$cc_basename in 337506c34b88Smrg yes,*) 337606c34b88Smrg # gcc 337706c34b88Smrg library_names_spec='$libname.dll.a' 337806c34b88Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 337906c34b88Smrg postinstall_cmds='base_file=`basename \${file}`~ 338006c34b88Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 338106c34b88Smrg dldir=$destdir/`dirname \$dlpath`~ 338206c34b88Smrg test -d \$dldir || mkdir -p \$dldir~ 338306c34b88Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 338406c34b88Smrg chmod a+x \$dldir/$dlname~ 338506c34b88Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 338606c34b88Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 338706c34b88Smrg fi' 338806c34b88Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 338906c34b88Smrg dlpath=$dir/\$dldll~ 339006c34b88Smrg $RM \$dlpath' 339106c34b88Smrg shlibpath_overrides_runpath=yes 3392c43cc173Smrg 339306c34b88Smrg case $host_os in 339406c34b88Smrg cygwin*) 339506c34b88Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 339606c34b88Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 339706c34b88Smrgm4_if([$1], [],[ 339806c34b88Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 339906c34b88Smrg ;; 340006c34b88Smrg mingw* | cegcc*) 340106c34b88Smrg # MinGW DLLs use traditional 'lib' prefix 340206c34b88Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 340306c34b88Smrg ;; 340406c34b88Smrg pw32*) 340506c34b88Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 340606c34b88Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 340706c34b88Smrg ;; 340806c34b88Smrg esac 340906c34b88Smrg dynamic_linker='Win32 ld.exe' 341006c34b88Smrg ;; 3411c43cc173Smrg 341206c34b88Smrg *,cl*) 341306c34b88Smrg # Native MSVC 341406c34b88Smrg libname_spec='$name' 341506c34b88Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 341606c34b88Smrg library_names_spec='${libname}.dll.lib' 3417c43cc173Smrg 341806c34b88Smrg case $build_os in 341906c34b88Smrg mingw*) 342006c34b88Smrg sys_lib_search_path_spec= 342106c34b88Smrg lt_save_ifs=$IFS 342206c34b88Smrg IFS=';' 342306c34b88Smrg for lt_path in $LIB 342406c34b88Smrg do 342506c34b88Smrg IFS=$lt_save_ifs 342606c34b88Smrg # Let DOS variable expansion print the short 8.3 style file name. 342706c34b88Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 342806c34b88Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 342906c34b88Smrg done 343006c34b88Smrg IFS=$lt_save_ifs 343106c34b88Smrg # Convert to MSYS style. 343206c34b88Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 343306c34b88Smrg ;; 343406c34b88Smrg cygwin*) 343506c34b88Smrg # Convert to unix form, then to dos form, then back to unix form 343606c34b88Smrg # but this time dos style (no spaces!) so that the unix form looks 343706c34b88Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 343806c34b88Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 343906c34b88Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 344006c34b88Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 344106c34b88Smrg ;; 344206c34b88Smrg *) 344306c34b88Smrg sys_lib_search_path_spec="$LIB" 344406c34b88Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 344506c34b88Smrg # It is most probably a Windows format PATH. 344606c34b88Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 3447c27c18e8Smrg else 344806c34b88Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3449c27c18e8Smrg fi 345006c34b88Smrg # FIXME: find the short name or the path components, as spaces are 345106c34b88Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 345206c34b88Smrg ;; 345306c34b88Smrg esac 3454c43cc173Smrg 345506c34b88Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 345606c34b88Smrg postinstall_cmds='base_file=`basename \${file}`~ 345706c34b88Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 345806c34b88Smrg dldir=$destdir/`dirname \$dlpath`~ 345906c34b88Smrg test -d \$dldir || mkdir -p \$dldir~ 346006c34b88Smrg $install_prog $dir/$dlname \$dldir/$dlname' 346106c34b88Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 346206c34b88Smrg dlpath=$dir/\$dldll~ 346306c34b88Smrg $RM \$dlpath' 346406c34b88Smrg shlibpath_overrides_runpath=yes 346506c34b88Smrg dynamic_linker='Win32 link.exe' 346606c34b88Smrg ;; 3467c43cc173Smrg 346806c34b88Smrg *) 346906c34b88Smrg # Assume MSVC wrapper 347006c34b88Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 347106c34b88Smrg dynamic_linker='Win32 ld.exe' 347206c34b88Smrg ;; 347306c34b88Smrg esac 347406c34b88Smrg # FIXME: first we should search . and the directory the executable is in 347506c34b88Smrg shlibpath_var=PATH 347606c34b88Smrg ;; 3477c43cc173Smrg 347806c34b88Smrgdarwin* | rhapsody*) 347906c34b88Smrg dynamic_linker="$host_os dyld" 348006c34b88Smrg version_type=darwin 348106c34b88Smrg need_lib_prefix=no 348206c34b88Smrg need_version=no 348306c34b88Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 348406c34b88Smrg soname_spec='${libname}${release}${major}$shared_ext' 348506c34b88Smrg shlibpath_overrides_runpath=yes 348606c34b88Smrg shlibpath_var=DYLD_LIBRARY_PATH 348706c34b88Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 348806c34b88Smrgm4_if([$1], [],[ 348906c34b88Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 349006c34b88Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 349106c34b88Smrg ;; 3492c43cc173Smrg 349306c34b88Smrgdgux*) 349406c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 349506c34b88Smrg need_lib_prefix=no 349606c34b88Smrg need_version=no 349706c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 349806c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 349906c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 350006c34b88Smrg ;; 3501c43cc173Smrg 350206c34b88Smrgfreebsd* | dragonfly*) 350306c34b88Smrg # DragonFly does not have aout. When/if they implement a new 350406c34b88Smrg # versioning mechanism, adjust this. 350506c34b88Smrg if test -x /usr/bin/objformat; then 350606c34b88Smrg objformat=`/usr/bin/objformat` 3507c27c18e8Smrg else 350806c34b88Smrg case $host_os in 350906c34b88Smrg freebsd[[23]].*) objformat=aout ;; 351006c34b88Smrg *) objformat=elf ;; 351106c34b88Smrg esac 3512c27c18e8Smrg fi 351306c34b88Smrg version_type=freebsd-$objformat 351406c34b88Smrg case $version_type in 351506c34b88Smrg freebsd-elf*) 351606c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 351706c34b88Smrg need_version=no 351806c34b88Smrg need_lib_prefix=no 351906c34b88Smrg ;; 352006c34b88Smrg freebsd-*) 352106c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 352206c34b88Smrg need_version=yes 352306c34b88Smrg ;; 352406c34b88Smrg esac 352506c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 352606c34b88Smrg case $host_os in 352706c34b88Smrg freebsd2.*) 352806c34b88Smrg shlibpath_overrides_runpath=yes 352906c34b88Smrg ;; 353006c34b88Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 353106c34b88Smrg shlibpath_overrides_runpath=yes 353206c34b88Smrg hardcode_into_libs=yes 353306c34b88Smrg ;; 353406c34b88Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 353506c34b88Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 353606c34b88Smrg shlibpath_overrides_runpath=no 353706c34b88Smrg hardcode_into_libs=yes 353806c34b88Smrg ;; 353906c34b88Smrg *) # from 4.6 on, and DragonFly 354006c34b88Smrg shlibpath_overrides_runpath=yes 354106c34b88Smrg hardcode_into_libs=yes 354206c34b88Smrg ;; 354306c34b88Smrg esac 354406c34b88Smrg ;; 3545c43cc173Smrg 354606c34b88Smrggnu*) 354706c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 354806c34b88Smrg need_lib_prefix=no 354906c34b88Smrg need_version=no 355006c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 355106c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 355206c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 355306c34b88Smrg shlibpath_overrides_runpath=no 355406c34b88Smrg hardcode_into_libs=yes 355506c34b88Smrg ;; 3556c43cc173Smrg 355706c34b88Smrghaiku*) 355806c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 355906c34b88Smrg need_lib_prefix=no 356006c34b88Smrg need_version=no 356106c34b88Smrg dynamic_linker="$host_os runtime_loader" 356206c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 356306c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 356406c34b88Smrg shlibpath_var=LIBRARY_PATH 356506c34b88Smrg shlibpath_overrides_runpath=yes 356606c34b88Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 356706c34b88Smrg hardcode_into_libs=yes 356806c34b88Smrg ;; 3569c43cc173Smrg 357006c34b88Smrghpux9* | hpux10* | hpux11*) 357106c34b88Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 357206c34b88Smrg # link against other versions. 357306c34b88Smrg version_type=sunos 357406c34b88Smrg need_lib_prefix=no 357506c34b88Smrg need_version=no 357606c34b88Smrg case $host_cpu in 357706c34b88Smrg ia64*) 357806c34b88Smrg shrext_cmds='.so' 357906c34b88Smrg hardcode_into_libs=yes 358006c34b88Smrg dynamic_linker="$host_os dld.so" 358106c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 358206c34b88Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 358306c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 358406c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 358506c34b88Smrg if test "X$HPUX_IA64_MODE" = X32; then 358606c34b88Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 358706c34b88Smrg else 358806c34b88Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 358906c34b88Smrg fi 359006c34b88Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 359106c34b88Smrg ;; 359206c34b88Smrg hppa*64*) 359306c34b88Smrg shrext_cmds='.sl' 359406c34b88Smrg hardcode_into_libs=yes 359506c34b88Smrg dynamic_linker="$host_os dld.sl" 359606c34b88Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 359706c34b88Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 359806c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 359906c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 360006c34b88Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 360106c34b88Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 360206c34b88Smrg ;; 360306c34b88Smrg *) 360406c34b88Smrg shrext_cmds='.sl' 360506c34b88Smrg dynamic_linker="$host_os dld.sl" 360606c34b88Smrg shlibpath_var=SHLIB_PATH 360706c34b88Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 360806c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 360906c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 361006c34b88Smrg ;; 361106c34b88Smrg esac 361206c34b88Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 361306c34b88Smrg postinstall_cmds='chmod 555 $lib' 361406c34b88Smrg # or fails outright, so override atomically: 361506c34b88Smrg install_override_mode=555 361606c34b88Smrg ;; 3617c43cc173Smrg 361806c34b88Smrginterix[[3-9]]*) 361906c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 362006c34b88Smrg need_lib_prefix=no 362106c34b88Smrg need_version=no 362206c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 362306c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 362406c34b88Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 362506c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 362606c34b88Smrg shlibpath_overrides_runpath=no 362706c34b88Smrg hardcode_into_libs=yes 362806c34b88Smrg ;; 3629c43cc173Smrg 363006c34b88Smrgirix5* | irix6* | nonstopux*) 363106c34b88Smrg case $host_os in 363206c34b88Smrg nonstopux*) version_type=nonstopux ;; 3633c27c18e8Smrg *) 363406c34b88Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 363506c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 3636c27c18e8Smrg else 363706c34b88Smrg version_type=irix 363806c34b88Smrg fi ;; 363906c34b88Smrg esac 364006c34b88Smrg need_lib_prefix=no 364106c34b88Smrg need_version=no 364206c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 364306c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 364406c34b88Smrg case $host_os in 364506c34b88Smrg irix5* | nonstopux*) 364606c34b88Smrg libsuff= shlibsuff= 364706c34b88Smrg ;; 364806c34b88Smrg *) 364906c34b88Smrg case $LD in # libtool.m4 will add one of these switches to LD 365006c34b88Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 365106c34b88Smrg libsuff= shlibsuff= libmagic=32-bit;; 365206c34b88Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 365306c34b88Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 365406c34b88Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 365506c34b88Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 365606c34b88Smrg *) libsuff= shlibsuff= libmagic=never-match;; 365706c34b88Smrg esac 365806c34b88Smrg ;; 365906c34b88Smrg esac 366006c34b88Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 366106c34b88Smrg shlibpath_overrides_runpath=no 366206c34b88Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 366306c34b88Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 366406c34b88Smrg hardcode_into_libs=yes 366506c34b88Smrg ;; 3666c43cc173Smrg 366706c34b88Smrg# No shared lib support for Linux oldld, aout, or coff. 366806c34b88Smrglinux*oldld* | linux*aout* | linux*coff*) 366906c34b88Smrg dynamic_linker=no 367006c34b88Smrg ;; 3671c43cc173Smrg 367206c34b88Smrg# This must be glibc/ELF. 367306c34b88Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 367406c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 367506c34b88Smrg need_lib_prefix=no 367606c34b88Smrg need_version=no 367706c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 367806c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 367906c34b88Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 368006c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 368106c34b88Smrg shlibpath_overrides_runpath=no 3682c43cc173Smrg 368306c34b88Smrg # Some binutils ld are patched to set DT_RUNPATH 368406c34b88Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 368506c34b88Smrg [lt_cv_shlibpath_overrides_runpath=no 368606c34b88Smrg save_LDFLAGS=$LDFLAGS 368706c34b88Smrg save_libdir=$libdir 368806c34b88Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 368906c34b88Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 369006c34b88Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 369106c34b88Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 369206c34b88Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 369306c34b88Smrg LDFLAGS=$save_LDFLAGS 369406c34b88Smrg libdir=$save_libdir 369506c34b88Smrg ]) 369606c34b88Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 3697c43cc173Smrg 369806c34b88Smrg # This implies no fast_install, which is unacceptable. 369906c34b88Smrg # Some rework will be needed to allow for fast_install 370006c34b88Smrg # before this can be enabled. 370106c34b88Smrg hardcode_into_libs=yes 370221e67964Smrg 370306c34b88Smrg # Add ABI-specific directories to the system library path. 370406c34b88Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 370521e67964Smrg 370606c34b88Smrg # Append ld.so.conf contents to the search path 370706c34b88Smrg if test -f /etc/ld.so.conf; then 370806c34b88Smrg 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' ' '` 370906c34b88Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 371021e67964Smrg 371106c34b88Smrg fi 371221e67964Smrg 371306c34b88Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 371406c34b88Smrg # powerpc, because MkLinux only supported shared libraries with the 371506c34b88Smrg # GNU dynamic linker. Since this was broken with cross compilers, 371606c34b88Smrg # most powerpc-linux boxes support dynamic linking these days and 371706c34b88Smrg # people can always --disable-shared, the test was removed, and we 371806c34b88Smrg # assume the GNU/Linux dynamic linker is in use. 371906c34b88Smrg dynamic_linker='GNU/Linux ld.so' 372006c34b88Smrg ;; 372121e67964Smrg 372206c34b88Smrgnetbsd*) 372306c34b88Smrg version_type=sunos 372406c34b88Smrg need_lib_prefix=no 372506c34b88Smrg need_version=no 372606c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 372706c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 372806c34b88Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 372906c34b88Smrg dynamic_linker='NetBSD (a.out) ld.so' 373006c34b88Smrg else 373106c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 373206c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 373306c34b88Smrg dynamic_linker='NetBSD ld.elf_so' 373406c34b88Smrg fi 373506c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 373606c34b88Smrg shlibpath_overrides_runpath=yes 373706c34b88Smrg hardcode_into_libs=yes 373806c34b88Smrg ;; 373921e67964Smrg 374006c34b88Smrgnewsos6) 374106c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 374206c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 374306c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 374406c34b88Smrg shlibpath_overrides_runpath=yes 374506c34b88Smrg ;; 3746c43cc173Smrg 374706c34b88Smrg*nto* | *qnx*) 374806c34b88Smrg version_type=qnx 374906c34b88Smrg need_lib_prefix=no 375006c34b88Smrg need_version=no 375106c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 375206c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 375306c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 375406c34b88Smrg shlibpath_overrides_runpath=no 375506c34b88Smrg hardcode_into_libs=yes 375606c34b88Smrg dynamic_linker='ldqnx.so' 375706c34b88Smrg ;; 3758c43cc173Smrg 375906c34b88Smrgopenbsd*) 376006c34b88Smrg version_type=sunos 376106c34b88Smrg sys_lib_dlsearch_path_spec="/usr/lib" 376206c34b88Smrg need_lib_prefix=no 376306c34b88Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 376406c34b88Smrg case $host_os in 376506c34b88Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 376606c34b88Smrg *) need_version=no ;; 376706c34b88Smrg esac 376806c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 376906c34b88Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 377006c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 377106c34b88Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 377206c34b88Smrg case $host_os in 377306c34b88Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 377406c34b88Smrg shlibpath_overrides_runpath=no 377506c34b88Smrg ;; 377606c34b88Smrg *) 377706c34b88Smrg shlibpath_overrides_runpath=yes 377806c34b88Smrg ;; 377906c34b88Smrg esac 378006c34b88Smrg else 378106c34b88Smrg shlibpath_overrides_runpath=yes 3782c27c18e8Smrg fi 378306c34b88Smrg ;; 3784b789ec8aSmrg 378506c34b88Smrgos2*) 378606c34b88Smrg libname_spec='$name' 378706c34b88Smrg shrext_cmds=".dll" 378806c34b88Smrg need_lib_prefix=no 378906c34b88Smrg library_names_spec='$libname${shared_ext} $libname.a' 379006c34b88Smrg dynamic_linker='OS/2 ld.exe' 379106c34b88Smrg shlibpath_var=LIBPATH 379206c34b88Smrg ;; 379321e67964Smrg 379406c34b88Smrgosf3* | osf4* | osf5*) 379506c34b88Smrg version_type=osf 379606c34b88Smrg need_lib_prefix=no 379706c34b88Smrg need_version=no 379806c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 379906c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 380006c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 380106c34b88Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 380206c34b88Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 380306c34b88Smrg ;; 380421e67964Smrg 380506c34b88Smrgrdos*) 380606c34b88Smrg dynamic_linker=no 380706c34b88Smrg ;; 380821e67964Smrg 380906c34b88Smrgsolaris*) 381006c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 381106c34b88Smrg need_lib_prefix=no 381206c34b88Smrg need_version=no 381306c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 381406c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 381506c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 381606c34b88Smrg shlibpath_overrides_runpath=yes 381706c34b88Smrg hardcode_into_libs=yes 381806c34b88Smrg # ldd complains unless libraries are executable 381906c34b88Smrg postinstall_cmds='chmod +x $lib' 382006c34b88Smrg ;; 3821c27c18e8Smrg 382206c34b88Smrgsunos4*) 382306c34b88Smrg version_type=sunos 382406c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 382506c34b88Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 382606c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 382706c34b88Smrg shlibpath_overrides_runpath=yes 382806c34b88Smrg if test "$with_gnu_ld" = yes; then 382906c34b88Smrg need_lib_prefix=no 383006c34b88Smrg fi 383106c34b88Smrg need_version=yes 383206c34b88Smrg ;; 383306c34b88Smrg 383406c34b88Smrgsysv4 | sysv4.3*) 383506c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 383606c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 383706c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 383806c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 383906c34b88Smrg case $host_vendor in 384006c34b88Smrg sni) 384106c34b88Smrg shlibpath_overrides_runpath=no 384206c34b88Smrg need_lib_prefix=no 384306c34b88Smrg runpath_var=LD_RUN_PATH 3844f1ee322dSmrg ;; 384506c34b88Smrg siemens) 384606c34b88Smrg need_lib_prefix=no 384706c34b88Smrg ;; 384806c34b88Smrg motorola) 384906c34b88Smrg need_lib_prefix=no 385006c34b88Smrg need_version=no 385106c34b88Smrg shlibpath_overrides_runpath=no 385206c34b88Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3853b789ec8aSmrg ;; 385421e67964Smrg esac 385506c34b88Smrg ;; 3856c43cc173Smrg 385706c34b88Smrgsysv4*MP*) 385806c34b88Smrg if test -d /usr/nec ;then 385906c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 386006c34b88Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 386106c34b88Smrg soname_spec='$libname${shared_ext}.$major' 386206c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 386306c34b88Smrg fi 386406c34b88Smrg ;; 386506c34b88Smrg 386606c34b88Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 386706c34b88Smrg version_type=freebsd-elf 386806c34b88Smrg need_lib_prefix=no 386906c34b88Smrg need_version=no 387006c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 387106c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 387206c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 387306c34b88Smrg shlibpath_overrides_runpath=yes 387406c34b88Smrg hardcode_into_libs=yes 3875c27c18e8Smrg if test "$with_gnu_ld" = yes; then 387606c34b88Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 387706c34b88Smrg else 387806c34b88Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 387937eb1ca1Smrg case $host_os in 388006c34b88Smrg sco3.2v5*) 388106c34b88Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 388237eb1ca1Smrg ;; 388337eb1ca1Smrg esac 388437eb1ca1Smrg fi 388506c34b88Smrg sys_lib_dlsearch_path_spec='/usr/lib' 388606c34b88Smrg ;; 388737eb1ca1Smrg 388806c34b88Smrgtpf*) 388906c34b88Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 389006c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 389106c34b88Smrg need_lib_prefix=no 389206c34b88Smrg need_version=no 389306c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 389406c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 389506c34b88Smrg shlibpath_overrides_runpath=no 389606c34b88Smrg hardcode_into_libs=yes 389706c34b88Smrg ;; 389821e67964Smrg 389906c34b88Smrguts4*) 390006c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 390106c34b88Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 390206c34b88Smrg soname_spec='${libname}${release}${shared_ext}$major' 390306c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 390406c34b88Smrg ;; 3905c27c18e8Smrg 390606c34b88Smrg*) 390706c34b88Smrg dynamic_linker=no 390806c34b88Smrg ;; 390906c34b88Smrgesac 391006c34b88SmrgAC_MSG_RESULT([$dynamic_linker]) 391106c34b88Smrgtest "$dynamic_linker" = no && can_build_shared=no 391221e67964Smrg 391306c34b88Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 391406c34b88Smrgif test "$GCC" = yes; then 391506c34b88Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 391606c34b88Smrgfi 391737eb1ca1Smrg 391806c34b88Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 391906c34b88Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 392006c34b88Smrgfi 392106c34b88Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 392206c34b88Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 392306c34b88Smrgfi 392421e67964Smrg 392506c34b88Smrg_LT_DECL([], [variables_saved_for_relink], [1], 392606c34b88Smrg [Variables whose values should be saved in libtool wrapper scripts and 392706c34b88Smrg restored at link time]) 392806c34b88Smrg_LT_DECL([], [need_lib_prefix], [0], 392906c34b88Smrg [Do we need the "lib" prefix for modules?]) 393006c34b88Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 393106c34b88Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 393206c34b88Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 393306c34b88Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 393406c34b88Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 393506c34b88Smrg [Is shlibpath searched before the hard-coded library search path?]) 393606c34b88Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 393706c34b88Smrg_LT_DECL([], [library_names_spec], [1], 393806c34b88Smrg [[List of archive names. First name is the real one, the rest are links. 393906c34b88Smrg The last name is the one that the linker finds with -lNAME]]) 394006c34b88Smrg_LT_DECL([], [soname_spec], [1], 394106c34b88Smrg [[The coded name of the library, if different from the real name]]) 394206c34b88Smrg_LT_DECL([], [install_override_mode], [1], 394306c34b88Smrg [Permission mode override for installation of shared libraries]) 394406c34b88Smrg_LT_DECL([], [postinstall_cmds], [2], 394506c34b88Smrg [Command to use after installation of a shared archive]) 394606c34b88Smrg_LT_DECL([], [postuninstall_cmds], [2], 394706c34b88Smrg [Command to use after uninstallation of a shared archive]) 394806c34b88Smrg_LT_DECL([], [finish_cmds], [2], 394906c34b88Smrg [Commands used to finish a libtool library installation in a directory]) 395006c34b88Smrg_LT_DECL([], [finish_eval], [1], 395106c34b88Smrg [[As "finish_cmds", except a single script fragment to be evaled but 395206c34b88Smrg not shown]]) 395306c34b88Smrg_LT_DECL([], [hardcode_into_libs], [0], 395406c34b88Smrg [Whether we should hardcode library paths into libraries]) 395506c34b88Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 395606c34b88Smrg [Compile-time system search path for libraries]) 395706c34b88Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 395806c34b88Smrg [Run-time system search path for libraries]) 395906c34b88Smrg])# _LT_SYS_DYNAMIC_LINKER 3960c43cc173Smrg 3961c43cc173Smrg 396206c34b88Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 396306c34b88Smrg# -------------------------- 396406c34b88Smrg# find a file program which can recognize shared library 396506c34b88SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 396606c34b88Smrg[m4_require([_LT_DECL_EGREP])dnl 396706c34b88SmrgAC_MSG_CHECKING([for $1]) 396806c34b88SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 396906c34b88Smrg[case $MAGIC_CMD in 397006c34b88Smrg[[\\/*] | ?:[\\/]*]) 397106c34b88Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 397206c34b88Smrg ;; 397306c34b88Smrg*) 397406c34b88Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 397506c34b88Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 397606c34b88Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 397706c34b88Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 397806c34b88Smrgdnl not every word. This closes a longstanding sh security hole. 397906c34b88Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 398006c34b88Smrg for ac_dir in $ac_dummy; do 398106c34b88Smrg IFS="$lt_save_ifs" 398206c34b88Smrg test -z "$ac_dir" && ac_dir=. 398306c34b88Smrg if test -f $ac_dir/$1; then 398406c34b88Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 398506c34b88Smrg if test -n "$file_magic_test_file"; then 398606c34b88Smrg case $deplibs_check_method in 398706c34b88Smrg "file_magic "*) 398806c34b88Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 398906c34b88Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 399006c34b88Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 399106c34b88Smrg $EGREP "$file_magic_regex" > /dev/null; then 399206c34b88Smrg : 399306c34b88Smrg else 399406c34b88Smrg cat <<_LT_EOF 1>&2 399506c34b88Smrg 399606c34b88Smrg*** Warning: the command libtool uses to detect shared libraries, 399706c34b88Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 399806c34b88Smrg*** The result is that libtool may fail to recognize shared libraries 399906c34b88Smrg*** as such. This will affect the creation of libtool libraries that 400006c34b88Smrg*** depend on shared libraries, but programs linked with such libtool 400106c34b88Smrg*** libraries will work regardless of this problem. Nevertheless, you 400206c34b88Smrg*** may want to report the problem to your system manager and/or to 400306c34b88Smrg*** bug-libtool@gnu.org 400406c34b88Smrg 400506c34b88Smrg_LT_EOF 400606c34b88Smrg fi ;; 4007c27c18e8Smrg esac 4008c27c18e8Smrg fi 400906c34b88Smrg break 401006c34b88Smrg fi 401106c34b88Smrg done 401206c34b88Smrg IFS="$lt_save_ifs" 401306c34b88Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 401406c34b88Smrg ;; 401506c34b88Smrgesac]) 401606c34b88SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 401706c34b88Smrgif test -n "$MAGIC_CMD"; then 401806c34b88Smrg AC_MSG_RESULT($MAGIC_CMD) 401906c34b88Smrgelse 402006c34b88Smrg AC_MSG_RESULT(no) 402106c34b88Smrgfi 402206c34b88Smrg_LT_DECL([], [MAGIC_CMD], [0], 402306c34b88Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 402406c34b88Smrg])# _LT_PATH_TOOL_PREFIX 4025c43cc173Smrg 402606c34b88Smrg# Old name: 402706c34b88SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 402806c34b88Smrgdnl aclocal-1.4 backwards compatibility: 402906c34b88Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4030c43cc173Smrg 4031c43cc173Smrg 403206c34b88Smrg# _LT_PATH_MAGIC 403306c34b88Smrg# -------------- 403406c34b88Smrg# find a file program which can recognize a shared library 403506c34b88Smrgm4_defun([_LT_PATH_MAGIC], 403606c34b88Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 403706c34b88Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 403806c34b88Smrg if test -n "$ac_tool_prefix"; then 403906c34b88Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 404006c34b88Smrg else 404106c34b88Smrg MAGIC_CMD=: 404206c34b88Smrg fi 404306c34b88Smrgfi 404406c34b88Smrg])# _LT_PATH_MAGIC 4045c43cc173Smrg 4046c43cc173Smrg 404706c34b88Smrg# LT_PATH_LD 404806c34b88Smrg# ---------- 404906c34b88Smrg# find the pathname to the GNU or non-GNU linker 405006c34b88SmrgAC_DEFUN([LT_PATH_LD], 405106c34b88Smrg[AC_REQUIRE([AC_PROG_CC])dnl 405206c34b88SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 405306c34b88SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 405406c34b88Smrgm4_require([_LT_DECL_SED])dnl 405506c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 405606c34b88Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4057c43cc173Smrg 405806c34b88SmrgAC_ARG_WITH([gnu-ld], 405906c34b88Smrg [AS_HELP_STRING([--with-gnu-ld], 406006c34b88Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 406106c34b88Smrg [test "$withval" = no || with_gnu_ld=yes], 406206c34b88Smrg [with_gnu_ld=no])dnl 4063c43cc173Smrg 406406c34b88Smrgac_prog=ld 406506c34b88Smrgif test "$GCC" = yes; then 406606c34b88Smrg # Check if gcc -print-prog-name=ld gives a path. 406706c34b88Smrg AC_MSG_CHECKING([for ld used by $CC]) 406806c34b88Smrg case $host in 406906c34b88Smrg *-*-mingw*) 407006c34b88Smrg # gcc leaves a trailing carriage return which upsets mingw 407106c34b88Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 407206c34b88Smrg *) 407306c34b88Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 407406c34b88Smrg esac 407506c34b88Smrg case $ac_prog in 407606c34b88Smrg # Accept absolute paths. 407706c34b88Smrg [[\\/]]* | ?:[[\\/]]*) 407806c34b88Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 407906c34b88Smrg # Canonicalize the pathname of ld 408006c34b88Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 408106c34b88Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 408206c34b88Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 408306c34b88Smrg done 408406c34b88Smrg test -z "$LD" && LD="$ac_prog" 408506c34b88Smrg ;; 408606c34b88Smrg "") 408706c34b88Smrg # If it fails, then pretend we aren't using GCC. 408806c34b88Smrg ac_prog=ld 408906c34b88Smrg ;; 409006c34b88Smrg *) 409106c34b88Smrg # If it is relative, then search for the first ld in PATH. 409206c34b88Smrg with_gnu_ld=unknown 409306c34b88Smrg ;; 409406c34b88Smrg esac 409506c34b88Smrgelif test "$with_gnu_ld" = yes; then 409606c34b88Smrg AC_MSG_CHECKING([for GNU ld]) 409706c34b88Smrgelse 409806c34b88Smrg AC_MSG_CHECKING([for non-GNU ld]) 409906c34b88Smrgfi 410006c34b88SmrgAC_CACHE_VAL(lt_cv_path_LD, 410106c34b88Smrg[if test -z "$LD"; then 410206c34b88Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 410306c34b88Smrg for ac_dir in $PATH; do 410406c34b88Smrg IFS="$lt_save_ifs" 410506c34b88Smrg test -z "$ac_dir" && ac_dir=. 410606c34b88Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 410706c34b88Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 410806c34b88Smrg # Check to see if the program is GNU ld. I'd rather use --version, 410906c34b88Smrg # but apparently some variants of GNU ld only accept -v. 411006c34b88Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 411106c34b88Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 411206c34b88Smrg *GNU* | *'with BFD'*) 411306c34b88Smrg test "$with_gnu_ld" != no && break 4114c27c18e8Smrg ;; 411506c34b88Smrg *) 411606c34b88Smrg test "$with_gnu_ld" != yes && break 4117c27c18e8Smrg ;; 4118c27c18e8Smrg esac 411906c34b88Smrg fi 412006c34b88Smrg done 412106c34b88Smrg IFS="$lt_save_ifs" 412206c34b88Smrgelse 412306c34b88Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 412406c34b88Smrgfi]) 412506c34b88SmrgLD="$lt_cv_path_LD" 412606c34b88Smrgif test -n "$LD"; then 412706c34b88Smrg AC_MSG_RESULT($LD) 412806c34b88Smrgelse 412906c34b88Smrg AC_MSG_RESULT(no) 413006c34b88Smrgfi 413106c34b88Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 413206c34b88Smrg_LT_PATH_LD_GNU 413306c34b88SmrgAC_SUBST([LD]) 4134c43cc173Smrg 413506c34b88Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 413606c34b88Smrg])# LT_PATH_LD 4137c43cc173Smrg 413806c34b88Smrg# Old names: 413906c34b88SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 414006c34b88SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 414106c34b88Smrgdnl aclocal-1.4 backwards compatibility: 414206c34b88Smrgdnl AC_DEFUN([AM_PROG_LD], []) 414306c34b88Smrgdnl AC_DEFUN([AC_PROG_LD], []) 4144c43cc173Smrg 4145c43cc173Smrg 414606c34b88Smrg# _LT_PATH_LD_GNU 414706c34b88Smrg#- -------------- 414806c34b88Smrgm4_defun([_LT_PATH_LD_GNU], 414906c34b88Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 415006c34b88Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 415106c34b88Smrgcase `$LD -v 2>&1 </dev/null` in 415206c34b88Smrg*GNU* | *'with BFD'*) 415306c34b88Smrg lt_cv_prog_gnu_ld=yes 415406c34b88Smrg ;; 415506c34b88Smrg*) 415606c34b88Smrg lt_cv_prog_gnu_ld=no 415706c34b88Smrg ;; 415806c34b88Smrgesac]) 415906c34b88Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 416006c34b88Smrg])# _LT_PATH_LD_GNU 4161c43cc173Smrg 4162c43cc173Smrg 416306c34b88Smrg# _LT_CMD_RELOAD 416406c34b88Smrg# -------------- 416506c34b88Smrg# find reload flag for linker 416606c34b88Smrg# -- PORTME Some linkers may need a different reload flag. 416706c34b88Smrgm4_defun([_LT_CMD_RELOAD], 416806c34b88Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 416906c34b88Smrg lt_cv_ld_reload_flag, 417006c34b88Smrg [lt_cv_ld_reload_flag='-r']) 417106c34b88Smrgreload_flag=$lt_cv_ld_reload_flag 417206c34b88Smrgcase $reload_flag in 417306c34b88Smrg"" | " "*) ;; 417406c34b88Smrg*) reload_flag=" $reload_flag" ;; 417506c34b88Smrgesac 417606c34b88Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 417706c34b88Smrgcase $host_os in 417806c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 417906c34b88Smrg if test "$GCC" != yes; then 418006c34b88Smrg reload_cmds=false 418106c34b88Smrg fi 418206c34b88Smrg ;; 418306c34b88Smrg darwin*) 418406c34b88Smrg if test "$GCC" = yes; then 418506c34b88Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 418606c34b88Smrg else 418706c34b88Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 418806c34b88Smrg fi 418906c34b88Smrg ;; 419006c34b88Smrgesac 419106c34b88Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 419206c34b88Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 419306c34b88Smrg])# _LT_CMD_RELOAD 4194c27c18e8Smrg 4195c43cc173Smrg 419606c34b88Smrg# _LT_CHECK_MAGIC_METHOD 419706c34b88Smrg# ---------------------- 419806c34b88Smrg# how to check for library dependencies 419906c34b88Smrg# -- PORTME fill in with the dynamic library characteristics 420006c34b88Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 420106c34b88Smrg[m4_require([_LT_DECL_EGREP]) 420206c34b88Smrgm4_require([_LT_DECL_OBJDUMP]) 420306c34b88SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 420406c34b88Smrglt_cv_deplibs_check_method, 420506c34b88Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 420606c34b88Smrglt_cv_file_magic_test_file= 420706c34b88Smrglt_cv_deplibs_check_method='unknown' 420806c34b88Smrg# Need to set the preceding variable on all platforms that support 420906c34b88Smrg# interlibrary dependencies. 421006c34b88Smrg# 'none' -- dependencies not supported. 421106c34b88Smrg# `unknown' -- same as none, but documents that we really don't know. 421206c34b88Smrg# 'pass_all' -- all dependencies passed with no checks. 421306c34b88Smrg# 'test_compile' -- check by making test program. 421406c34b88Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 421506c34b88Smrg# which responds to the $file_magic_cmd with a given extended regex. 421606c34b88Smrg# If you have `file' or equivalent on your system and you're not sure 421706c34b88Smrg# whether `pass_all' will *always* work, you probably want this one. 4218c43cc173Smrg 421906c34b88Smrgcase $host_os in 422006c34b88Smrgaix[[4-9]]*) 422106c34b88Smrg lt_cv_deplibs_check_method=pass_all 422206c34b88Smrg ;; 4223c43cc173Smrg 422406c34b88Smrgbeos*) 422506c34b88Smrg lt_cv_deplibs_check_method=pass_all 422606c34b88Smrg ;; 4227c43cc173Smrg 422806c34b88Smrgbsdi[[45]]*) 422906c34b88Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 423006c34b88Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 423106c34b88Smrg lt_cv_file_magic_test_file=/shlib/libc.so 423206c34b88Smrg ;; 4233c43cc173Smrg 423406c34b88Smrgcygwin*) 423506c34b88Smrg # func_win32_libid is a shell function defined in ltmain.sh 423606c34b88Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 423706c34b88Smrg lt_cv_file_magic_cmd='func_win32_libid' 423806c34b88Smrg ;; 423906c34b88Smrg 424006c34b88Smrgmingw* | pw32*) 424106c34b88Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 424206c34b88Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 424306c34b88Smrg # unless we find 'file', for example because we are cross-compiling. 424406c34b88Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 424506c34b88Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 424606c34b88Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 424706c34b88Smrg lt_cv_file_magic_cmd='func_win32_libid' 424806c34b88Smrg else 424906c34b88Smrg # Keep this pattern in sync with the one in func_win32_libid. 425006c34b88Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 425106c34b88Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 425206c34b88Smrg fi 425306c34b88Smrg ;; 4254c43cc173Smrg 425506c34b88Smrgcegcc*) 425606c34b88Smrg # use the weaker test based on 'objdump'. See mingw*. 425706c34b88Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 425806c34b88Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 425906c34b88Smrg ;; 4260c43cc173Smrg 426106c34b88Smrgdarwin* | rhapsody*) 426206c34b88Smrg lt_cv_deplibs_check_method=pass_all 426306c34b88Smrg ;; 4264c43cc173Smrg 426506c34b88Smrgfreebsd* | dragonfly*) 426606c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 426706c34b88Smrg case $host_cpu in 426806c34b88Smrg i*86 ) 426906c34b88Smrg # Not sure whether the presence of OpenBSD here was a mistake. 427006c34b88Smrg # Let's accept both of them until this is cleared up. 427106c34b88Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 427206c34b88Smrg lt_cv_file_magic_cmd=/usr/bin/file 427306c34b88Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4274c27c18e8Smrg ;; 427506c34b88Smrg esac 427606c34b88Smrg else 427706c34b88Smrg lt_cv_deplibs_check_method=pass_all 427806c34b88Smrg fi 427906c34b88Smrg ;; 4280c43cc173Smrg 428106c34b88Smrggnu*) 428206c34b88Smrg lt_cv_deplibs_check_method=pass_all 428306c34b88Smrg ;; 4284c43cc173Smrg 428506c34b88Smrghaiku*) 428606c34b88Smrg lt_cv_deplibs_check_method=pass_all 428706c34b88Smrg ;; 4288c43cc173Smrg 428906c34b88Smrghpux10.20* | hpux11*) 429006c34b88Smrg lt_cv_file_magic_cmd=/usr/bin/file 429106c34b88Smrg case $host_cpu in 429206c34b88Smrg ia64*) 429306c34b88Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 429406c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 429506c34b88Smrg ;; 429606c34b88Smrg hppa*64*) 429706c34b88Smrg [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]'] 429806c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 429906c34b88Smrg ;; 430006c34b88Smrg *) 430106c34b88Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 430206c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 430306c34b88Smrg ;; 430406c34b88Smrg esac 430506c34b88Smrg ;; 4306c43cc173Smrg 430706c34b88Smrginterix[[3-9]]*) 430806c34b88Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 430906c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 431006c34b88Smrg ;; 4311c43cc173Smrg 431206c34b88Smrgirix5* | irix6* | nonstopux*) 431306c34b88Smrg case $LD in 431406c34b88Smrg *-32|*"-32 ") libmagic=32-bit;; 431506c34b88Smrg *-n32|*"-n32 ") libmagic=N32;; 431606c34b88Smrg *-64|*"-64 ") libmagic=64-bit;; 431706c34b88Smrg *) libmagic=never-match;; 431806c34b88Smrg esac 431906c34b88Smrg lt_cv_deplibs_check_method=pass_all 432006c34b88Smrg ;; 4321c43cc173Smrg 432206c34b88Smrg# This must be glibc/ELF. 432306c34b88Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 432406c34b88Smrg lt_cv_deplibs_check_method=pass_all 432506c34b88Smrg ;; 4326c43cc173Smrg 432706c34b88Smrgnetbsd*) 432806c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 432906c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 433006c34b88Smrg else 433106c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 433206c34b88Smrg fi 433306c34b88Smrg ;; 4334c43cc173Smrg 433506c34b88Smrgnewos6*) 433606c34b88Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 433706c34b88Smrg lt_cv_file_magic_cmd=/usr/bin/file 433806c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 433906c34b88Smrg ;; 4340c27c18e8Smrg 434106c34b88Smrg*nto* | *qnx*) 434206c34b88Smrg lt_cv_deplibs_check_method=pass_all 434306c34b88Smrg ;; 4344c27c18e8Smrg 434506c34b88Smrgopenbsd*) 434606c34b88Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 434706c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 434806c34b88Smrg else 434906c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 435006c34b88Smrg fi 435106c34b88Smrg ;; 435221e67964Smrg 435306c34b88Smrgosf3* | osf4* | osf5*) 435406c34b88Smrg lt_cv_deplibs_check_method=pass_all 435506c34b88Smrg ;; 4356c43cc173Smrg 435706c34b88Smrgrdos*) 435806c34b88Smrg lt_cv_deplibs_check_method=pass_all 435906c34b88Smrg ;; 4360c43cc173Smrg 436106c34b88Smrgsolaris*) 436206c34b88Smrg lt_cv_deplibs_check_method=pass_all 436306c34b88Smrg ;; 4364c43cc173Smrg 436506c34b88Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 436606c34b88Smrg lt_cv_deplibs_check_method=pass_all 436706c34b88Smrg ;; 4368c43cc173Smrg 436906c34b88Smrgsysv4 | sysv4.3*) 437006c34b88Smrg case $host_vendor in 437106c34b88Smrg motorola) 437206c34b88Smrg 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]]' 437306c34b88Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 437406c34b88Smrg ;; 437506c34b88Smrg ncr) 437606c34b88Smrg lt_cv_deplibs_check_method=pass_all 437706c34b88Smrg ;; 437806c34b88Smrg sequent) 437906c34b88Smrg lt_cv_file_magic_cmd='/bin/file' 438006c34b88Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 438106c34b88Smrg ;; 438206c34b88Smrg sni) 438306c34b88Smrg lt_cv_file_magic_cmd='/bin/file' 438406c34b88Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 438506c34b88Smrg lt_cv_file_magic_test_file=/lib/libc.so 438606c34b88Smrg ;; 438706c34b88Smrg siemens) 438806c34b88Smrg lt_cv_deplibs_check_method=pass_all 438906c34b88Smrg ;; 439006c34b88Smrg pc) 439106c34b88Smrg lt_cv_deplibs_check_method=pass_all 439206c34b88Smrg ;; 439306c34b88Smrg esac 439406c34b88Smrg ;; 4395c43cc173Smrg 439606c34b88Smrgtpf*) 439706c34b88Smrg lt_cv_deplibs_check_method=pass_all 439806c34b88Smrg ;; 439906c34b88Smrgesac 440006c34b88Smrg]) 4401c43cc173Smrg 440206c34b88Smrgfile_magic_glob= 440306c34b88Smrgwant_nocaseglob=no 440406c34b88Smrgif test "$build" = "$host"; then 440506c34b88Smrg case $host_os in 440606c34b88Smrg mingw* | pw32*) 440706c34b88Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 440806c34b88Smrg want_nocaseglob=yes 440906c34b88Smrg else 441006c34b88Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 441106c34b88Smrg fi 441206c34b88Smrg ;; 441306c34b88Smrg esac 441406c34b88Smrgfi 4415c43cc173Smrg 441606c34b88Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 441706c34b88Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 441806c34b88Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4419c43cc173Smrg 442006c34b88Smrg_LT_DECL([], [deplibs_check_method], [1], 442106c34b88Smrg [Method to check whether dependent libraries are shared objects]) 442206c34b88Smrg_LT_DECL([], [file_magic_cmd], [1], 442306c34b88Smrg [Command to use when deplibs_check_method = "file_magic"]) 442406c34b88Smrg_LT_DECL([], [file_magic_glob], [1], 442506c34b88Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 442606c34b88Smrg_LT_DECL([], [want_nocaseglob], [1], 442706c34b88Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 442806c34b88Smrg])# _LT_CHECK_MAGIC_METHOD 442906c34b88Smrg 443006c34b88Smrg 443106c34b88Smrg# LT_PATH_NM 443206c34b88Smrg# ---------- 443306c34b88Smrg# find the pathname to a BSD- or MS-compatible name lister 443406c34b88SmrgAC_DEFUN([LT_PATH_NM], 443506c34b88Smrg[AC_REQUIRE([AC_PROG_CC])dnl 443606c34b88SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 443706c34b88Smrg[if test -n "$NM"; then 443806c34b88Smrg # Let the user override the test. 443906c34b88Smrg lt_cv_path_NM="$NM" 444006c34b88Smrgelse 444106c34b88Smrg lt_nm_to_check="${ac_tool_prefix}nm" 444206c34b88Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 444306c34b88Smrg lt_nm_to_check="$lt_nm_to_check nm" 444406c34b88Smrg fi 444506c34b88Smrg for lt_tmp_nm in $lt_nm_to_check; do 444606c34b88Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 444706c34b88Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 444806c34b88Smrg IFS="$lt_save_ifs" 444906c34b88Smrg test -z "$ac_dir" && ac_dir=. 445006c34b88Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 445106c34b88Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 445206c34b88Smrg # Check to see if the nm accepts a BSD-compat flag. 445306c34b88Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 445406c34b88Smrg # nm: unknown option "B" ignored 445506c34b88Smrg # Tru64's nm complains that /dev/null is an invalid object file 445606c34b88Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 445706c34b88Smrg */dev/null* | *'Invalid file or object type'*) 445806c34b88Smrg lt_cv_path_NM="$tmp_nm -B" 445906c34b88Smrg break 4460c27c18e8Smrg ;; 4461c27c18e8Smrg *) 446206c34b88Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 446306c34b88Smrg */dev/null*) 446406c34b88Smrg lt_cv_path_NM="$tmp_nm -p" 446506c34b88Smrg break 446606c34b88Smrg ;; 446706c34b88Smrg *) 446806c34b88Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 446906c34b88Smrg continue # so that we can try to find one that supports BSD flags 447006c34b88Smrg ;; 447106c34b88Smrg esac 4472c27c18e8Smrg ;; 4473c27c18e8Smrg esac 4474c27c18e8Smrg fi 447506c34b88Smrg done 447606c34b88Smrg IFS="$lt_save_ifs" 447706c34b88Smrg done 447806c34b88Smrg : ${lt_cv_path_NM=no} 447906c34b88Smrgfi]) 448006c34b88Smrgif test "$lt_cv_path_NM" != "no"; then 448106c34b88Smrg NM="$lt_cv_path_NM" 448206c34b88Smrgelse 448306c34b88Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 448406c34b88Smrg if test -n "$DUMPBIN"; then : 448506c34b88Smrg # Let the user override the test. 448606c34b88Smrg else 448706c34b88Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 448806c34b88Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 448906c34b88Smrg *COFF*) 449006c34b88Smrg DUMPBIN="$DUMPBIN -symbols" 4491c27c18e8Smrg ;; 449206c34b88Smrg *) 449306c34b88Smrg DUMPBIN=: 4494c27c18e8Smrg ;; 449506c34b88Smrg esac 449606c34b88Smrg fi 449706c34b88Smrg AC_SUBST([DUMPBIN]) 449806c34b88Smrg if test "$DUMPBIN" != ":"; then 449906c34b88Smrg NM="$DUMPBIN" 450006c34b88Smrg fi 450106c34b88Smrgfi 450206c34b88Smrgtest -z "$NM" && NM=nm 450306c34b88SmrgAC_SUBST([NM]) 450406c34b88Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4505c43cc173Smrg 450606c34b88SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 450706c34b88Smrg [lt_cv_nm_interface="BSD nm" 450806c34b88Smrg echo "int some_variable = 0;" > conftest.$ac_ext 450906c34b88Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 451006c34b88Smrg (eval "$ac_compile" 2>conftest.err) 451106c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 451206c34b88Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 451306c34b88Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 451406c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 451506c34b88Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 451606c34b88Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 451706c34b88Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 451806c34b88Smrg lt_cv_nm_interface="MS dumpbin" 451906c34b88Smrg fi 452006c34b88Smrg rm -f conftest*]) 452106c34b88Smrg])# LT_PATH_NM 4522c43cc173Smrg 452306c34b88Smrg# Old names: 452406c34b88SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 452506c34b88SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 452606c34b88Smrgdnl aclocal-1.4 backwards compatibility: 452706c34b88Smrgdnl AC_DEFUN([AM_PROG_NM], []) 452806c34b88Smrgdnl AC_DEFUN([AC_PROG_NM], []) 4529c43cc173Smrg 453006c34b88Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 453106c34b88Smrg# -------------------------------- 453206c34b88Smrg# how to determine the name of the shared library 453306c34b88Smrg# associated with a specific link library. 453406c34b88Smrg# -- PORTME fill in with the dynamic library characteristics 453506c34b88Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 453606c34b88Smrg[m4_require([_LT_DECL_EGREP]) 453706c34b88Smrgm4_require([_LT_DECL_OBJDUMP]) 453806c34b88Smrgm4_require([_LT_DECL_DLLTOOL]) 453906c34b88SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 454006c34b88Smrglt_cv_sharedlib_from_linklib_cmd, 454106c34b88Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4542c43cc173Smrg 454306c34b88Smrgcase $host_os in 454406c34b88Smrgcygwin* | mingw* | pw32* | cegcc*) 454506c34b88Smrg # two different shell functions defined in ltmain.sh 454606c34b88Smrg # decide which to use based on capabilities of $DLLTOOL 454706c34b88Smrg case `$DLLTOOL --help 2>&1` in 454806c34b88Smrg *--identify-strict*) 454906c34b88Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 455006c34b88Smrg ;; 455106c34b88Smrg *) 455206c34b88Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 455306c34b88Smrg ;; 455406c34b88Smrg esac 455506c34b88Smrg ;; 455606c34b88Smrg*) 455706c34b88Smrg # fallback: assume linklib IS sharedlib 455806c34b88Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 455906c34b88Smrg ;; 456006c34b88Smrgesac 456106c34b88Smrg]) 456206c34b88Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 456306c34b88Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4564c43cc173Smrg 456506c34b88Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 456606c34b88Smrg [Command to associate shared and link libraries]) 456706c34b88Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4568c43cc173Smrg 4569c43cc173Smrg 457006c34b88Smrg# _LT_PATH_MANIFEST_TOOL 457106c34b88Smrg# ---------------------- 457206c34b88Smrg# locate the manifest tool 457306c34b88Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 457406c34b88Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 457506c34b88Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 457606c34b88SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 457706c34b88Smrg [lt_cv_path_mainfest_tool=no 457806c34b88Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 457906c34b88Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 458006c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 458106c34b88Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 458206c34b88Smrg lt_cv_path_mainfest_tool=yes 458306c34b88Smrg fi 458406c34b88Smrg rm -f conftest*]) 458506c34b88Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 458606c34b88Smrg MANIFEST_TOOL=: 458706c34b88Smrgfi 458806c34b88Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 458906c34b88Smrg])# _LT_PATH_MANIFEST_TOOL 4590c43cc173Smrg 4591c43cc173Smrg 459206c34b88Smrg# LT_LIB_M 459306c34b88Smrg# -------- 459406c34b88Smrg# check for math library 459506c34b88SmrgAC_DEFUN([LT_LIB_M], 459606c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 459706c34b88SmrgLIBM= 459806c34b88Smrgcase $host in 459906c34b88Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 460006c34b88Smrg # These system don't have libm, or don't need it 460106c34b88Smrg ;; 460206c34b88Smrg*-ncr-sysv4.3*) 460306c34b88Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 460406c34b88Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 460506c34b88Smrg ;; 460606c34b88Smrg*) 460706c34b88Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 460806c34b88Smrg ;; 460906c34b88Smrgesac 461006c34b88SmrgAC_SUBST([LIBM]) 461106c34b88Smrg])# LT_LIB_M 461206c34b88Smrg 461306c34b88Smrg# Old name: 461406c34b88SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 461506c34b88Smrgdnl aclocal-1.4 backwards compatibility: 461606c34b88Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 461706c34b88Smrg 461806c34b88Smrg 461906c34b88Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 462006c34b88Smrg# ------------------------------- 462106c34b88Smrgm4_defun([_LT_COMPILER_NO_RTTI], 462206c34b88Smrg[m4_require([_LT_TAG_COMPILER])dnl 462306c34b88Smrg 462406c34b88Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 462506c34b88Smrg 462606c34b88Smrgif test "$GCC" = yes; then 462706c34b88Smrg case $cc_basename in 462806c34b88Smrg nvcc*) 462906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 463006c34b88Smrg *) 463106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 463206c34b88Smrg esac 463306c34b88Smrg 463406c34b88Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 463506c34b88Smrg lt_cv_prog_compiler_rtti_exceptions, 463606c34b88Smrg [-fno-rtti -fno-exceptions], [], 463706c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 463806c34b88Smrgfi 463906c34b88Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 464006c34b88Smrg [Compiler flag to turn off builtin functions]) 464106c34b88Smrg])# _LT_COMPILER_NO_RTTI 4642c43cc173Smrg 4643c43cc173Smrg 464406c34b88Smrg# _LT_CMD_GLOBAL_SYMBOLS 464506c34b88Smrg# ---------------------- 464606c34b88Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 464706c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 464806c34b88SmrgAC_REQUIRE([AC_PROG_CC])dnl 464906c34b88SmrgAC_REQUIRE([AC_PROG_AWK])dnl 465006c34b88SmrgAC_REQUIRE([LT_PATH_NM])dnl 465106c34b88SmrgAC_REQUIRE([LT_PATH_LD])dnl 465206c34b88Smrgm4_require([_LT_DECL_SED])dnl 465306c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 465406c34b88Smrgm4_require([_LT_TAG_COMPILER])dnl 4655c43cc173Smrg 465606c34b88Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 465706c34b88SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 465806c34b88SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 465906c34b88Smrg[ 466006c34b88Smrg# These are sane defaults that work on at least a few old systems. 466106c34b88Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4662c43cc173Smrg 466306c34b88Smrg# Character class describing NM global symbol codes. 466406c34b88Smrgsymcode='[[BCDEGRST]]' 4665c43cc173Smrg 466606c34b88Smrg# Regexp to match symbols that can be accessed directly from C. 466706c34b88Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 466837eb1ca1Smrg 466906c34b88Smrg# Define system-specific variables. 467006c34b88Smrgcase $host_os in 467106c34b88Smrgaix*) 467206c34b88Smrg symcode='[[BCDT]]' 467306c34b88Smrg ;; 467406c34b88Smrgcygwin* | mingw* | pw32* | cegcc*) 467506c34b88Smrg symcode='[[ABCDGISTW]]' 467606c34b88Smrg ;; 467706c34b88Smrghpux*) 467806c34b88Smrg if test "$host_cpu" = ia64; then 467906c34b88Smrg symcode='[[ABCDEGRST]]' 4680c27c18e8Smrg fi 4681c27c18e8Smrg ;; 468206c34b88Smrgirix* | nonstopux*) 468306c34b88Smrg symcode='[[BCDEGRST]]' 468406c34b88Smrg ;; 468506c34b88Smrgosf*) 468606c34b88Smrg symcode='[[BCDEGQRST]]' 468706c34b88Smrg ;; 468806c34b88Smrgsolaris*) 468906c34b88Smrg symcode='[[BDRT]]' 469006c34b88Smrg ;; 469106c34b88Smrgsco3.2v5*) 469206c34b88Smrg symcode='[[DT]]' 469306c34b88Smrg ;; 469406c34b88Smrgsysv4.2uw2*) 469506c34b88Smrg symcode='[[DT]]' 469606c34b88Smrg ;; 469706c34b88Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 469806c34b88Smrg symcode='[[ABDT]]' 469906c34b88Smrg ;; 470006c34b88Smrgsysv4) 470106c34b88Smrg symcode='[[DFNSTU]]' 470206c34b88Smrg ;; 4703c27c18e8Smrgesac 4704c43cc173Smrg 470506c34b88Smrg# If we're using GNU nm, then use its standard symbol codes. 470606c34b88Smrgcase `$NM -V 2>&1` in 470706c34b88Smrg*GNU* | *'with BFD'*) 470806c34b88Smrg symcode='[[ABCDGIRSTW]]' ;; 470906c34b88Smrgesac 4710c27c18e8Smrg 471106c34b88Smrg# Transform an extracted symbol line into a proper C declaration. 471206c34b88Smrg# Some systems (esp. on ia64) link data and code symbols differently, 471306c34b88Smrg# so use this general approach. 471406c34b88Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4715c27c18e8Smrg 471606c34b88Smrg# Transform an extracted symbol line into symbol name and symbol address 471706c34b88Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 471806c34b88Smrglt_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'" 4719c43cc173Smrg 472006c34b88Smrg# Handle CRLF in mingw tool chain 472106c34b88Smrgopt_cr= 472206c34b88Smrgcase $build_os in 472306c34b88Smrgmingw*) 472406c34b88Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 472506c34b88Smrg ;; 472606c34b88Smrgesac 472706c34b88Smrg 472806c34b88Smrg# Try without a prefix underscore, then with it. 472906c34b88Smrgfor ac_symprfx in "" "_"; do 473006c34b88Smrg 473106c34b88Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 473206c34b88Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 473306c34b88Smrg 473406c34b88Smrg # Write the raw and C identifiers. 473506c34b88Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 473606c34b88Smrg # Fake it for dumpbin and say T for any non-static function 473706c34b88Smrg # and D for any global variable. 473806c34b88Smrg # Also find C++ and __fastcall symbols from MSVC++, 473906c34b88Smrg # which start with @ or ?. 474006c34b88Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 474106c34b88Smrg" {last_section=section; section=\$ 3};"\ 474206c34b88Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 474306c34b88Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 474406c34b88Smrg" \$ 0!~/External *\|/{next};"\ 474506c34b88Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 474606c34b88Smrg" {if(hide[section]) next};"\ 474706c34b88Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 474806c34b88Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 474906c34b88Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 475006c34b88Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 475106c34b88Smrg" ' prfx=^$ac_symprfx]" 475206c34b88Smrg else 475306c34b88Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 475406c34b88Smrg fi 475506c34b88Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4756c43cc173Smrg 475706c34b88Smrg # Check to see that the pipe works correctly. 475806c34b88Smrg pipe_works=no 4759c43cc173Smrg 476006c34b88Smrg rm -f conftest* 476106c34b88Smrg cat > conftest.$ac_ext <<_LT_EOF 476206c34b88Smrg#ifdef __cplusplus 476306c34b88Smrgextern "C" { 476406c34b88Smrg#endif 476506c34b88Smrgchar nm_test_var; 476606c34b88Smrgvoid nm_test_func(void); 476706c34b88Smrgvoid nm_test_func(void){} 476806c34b88Smrg#ifdef __cplusplus 476906c34b88Smrg} 477006c34b88Smrg#endif 477106c34b88Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 477206c34b88Smrg_LT_EOF 4773c43cc173Smrg 477406c34b88Smrg if AC_TRY_EVAL(ac_compile); then 477506c34b88Smrg # Now try to grab the symbols. 477606c34b88Smrg nlist=conftest.nm 477706c34b88Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 477806c34b88Smrg # Try sorting and uniquifying the output. 477906c34b88Smrg if sort "$nlist" | uniq > "$nlist"T; then 478006c34b88Smrg mv -f "$nlist"T "$nlist" 478106c34b88Smrg else 478206c34b88Smrg rm -f "$nlist"T 478306c34b88Smrg fi 4784c43cc173Smrg 478506c34b88Smrg # Make sure that we snagged all the symbols we need. 478606c34b88Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 478706c34b88Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 478806c34b88Smrg cat <<_LT_EOF > conftest.$ac_ext 478906c34b88Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 479006c34b88Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 479106c34b88Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 479206c34b88Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 479306c34b88Smrg# define LT@&t@_DLSYM_CONST 479406c34b88Smrg#elif defined(__osf__) 479506c34b88Smrg/* This system does not cope well with relocations in const data. */ 479606c34b88Smrg# define LT@&t@_DLSYM_CONST 479706c34b88Smrg#else 479806c34b88Smrg# define LT@&t@_DLSYM_CONST const 479906c34b88Smrg#endif 4800c43cc173Smrg 480106c34b88Smrg#ifdef __cplusplus 480206c34b88Smrgextern "C" { 480306c34b88Smrg#endif 4804c43cc173Smrg 480506c34b88Smrg_LT_EOF 480606c34b88Smrg # Now generate the symbol file. 480706c34b88Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4808c27c18e8Smrg 480906c34b88Smrg cat <<_LT_EOF >> conftest.$ac_ext 4810c27c18e8Smrg 481106c34b88Smrg/* The mapping between symbol names and symbols. */ 481206c34b88SmrgLT@&t@_DLSYM_CONST struct { 481306c34b88Smrg const char *name; 481406c34b88Smrg void *address; 481506c34b88Smrg} 481606c34b88Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 481706c34b88Smrg{ 481806c34b88Smrg { "@PROGRAM@", (void *) 0 }, 481906c34b88Smrg_LT_EOF 482006c34b88Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 482106c34b88Smrg cat <<\_LT_EOF >> conftest.$ac_ext 482206c34b88Smrg {0, (void *) 0} 482306c34b88Smrg}; 4824c27c18e8Smrg 482506c34b88Smrg/* This works around a problem in FreeBSD linker */ 482606c34b88Smrg#ifdef FREEBSD_WORKAROUND 482706c34b88Smrgstatic const void *lt_preloaded_setup() { 482806c34b88Smrg return lt__PROGRAM__LTX_preloaded_symbols; 482906c34b88Smrg} 483006c34b88Smrg#endif 4831c43cc173Smrg 483206c34b88Smrg#ifdef __cplusplus 483306c34b88Smrg} 483406c34b88Smrg#endif 483506c34b88Smrg_LT_EOF 483606c34b88Smrg # Now try linking the two files. 483706c34b88Smrg mv conftest.$ac_objext conftstm.$ac_objext 483806c34b88Smrg lt_globsym_save_LIBS=$LIBS 483906c34b88Smrg lt_globsym_save_CFLAGS=$CFLAGS 484006c34b88Smrg LIBS="conftstm.$ac_objext" 484106c34b88Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 484206c34b88Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 484306c34b88Smrg pipe_works=yes 484406c34b88Smrg fi 484506c34b88Smrg LIBS=$lt_globsym_save_LIBS 484606c34b88Smrg CFLAGS=$lt_globsym_save_CFLAGS 484706c34b88Smrg else 484806c34b88Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 484906c34b88Smrg fi 485006c34b88Smrg else 485106c34b88Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 485206c34b88Smrg fi 485306c34b88Smrg else 485406c34b88Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4855c27c18e8Smrg fi 485606c34b88Smrg else 485706c34b88Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 485806c34b88Smrg cat conftest.$ac_ext >&5 485906c34b88Smrg fi 486006c34b88Smrg rm -rf conftest* conftst* 4861c43cc173Smrg 486206c34b88Smrg # Do not use the global_symbol_pipe unless it works. 486306c34b88Smrg if test "$pipe_works" = yes; then 486406c34b88Smrg break 486506c34b88Smrg else 486606c34b88Smrg lt_cv_sys_global_symbol_pipe= 486706c34b88Smrg fi 486806c34b88Smrgdone 486906c34b88Smrg]) 487006c34b88Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 487106c34b88Smrg lt_cv_sys_global_symbol_to_cdecl= 4872c27c18e8Smrgfi 487306c34b88Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 487406c34b88Smrg AC_MSG_RESULT(failed) 487537eb1ca1Smrgelse 487606c34b88Smrg AC_MSG_RESULT(ok) 487737eb1ca1Smrgfi 4878c27c18e8Smrg 487906c34b88Smrg# Response file support. 488006c34b88Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 488106c34b88Smrg nm_file_list_spec='@' 488206c34b88Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 488306c34b88Smrg nm_file_list_spec='@' 488406c34b88Smrgfi 4885c43cc173Smrg 488606c34b88Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 488706c34b88Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 488806c34b88Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 488906c34b88Smrg [Transform the output of nm in a proper C declaration]) 489006c34b88Smrg_LT_DECL([global_symbol_to_c_name_address], 489106c34b88Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 489206c34b88Smrg [Transform the output of nm in a C name address pair]) 489306c34b88Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 489406c34b88Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 489506c34b88Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 489606c34b88Smrg_LT_DECL([], [nm_file_list_spec], [1], 489706c34b88Smrg [Specify filename containing input files for $NM]) 489806c34b88Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4899c43cc173Smrg 4900c27c18e8Smrg 490106c34b88Smrg# _LT_COMPILER_PIC([TAGNAME]) 490206c34b88Smrg# --------------------------- 490306c34b88Smrgm4_defun([_LT_COMPILER_PIC], 490406c34b88Smrg[m4_require([_LT_TAG_COMPILER])dnl 490506c34b88Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 490606c34b88Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 490706c34b88Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4908c27c18e8Smrg 490906c34b88Smrgm4_if([$1], [CXX], [ 491006c34b88Smrg # C++ specific cases for pic, static, wl, etc. 491106c34b88Smrg if test "$GXX" = yes; then 491206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 491306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4914c27c18e8Smrg 491506c34b88Smrg case $host_os in 491606c34b88Smrg aix*) 491706c34b88Smrg # All AIX code is PIC. 491806c34b88Smrg if test "$host_cpu" = ia64; then 491906c34b88Smrg # AIX 5 now supports IA64 processor 492006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 492106c34b88Smrg fi 492206c34b88Smrg ;; 4923c27c18e8Smrg 492406c34b88Smrg amigaos*) 492506c34b88Smrg case $host_cpu in 492606c34b88Smrg powerpc) 492706c34b88Smrg # see comment about AmigaOS4 .so support 492806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 492906c34b88Smrg ;; 493006c34b88Smrg m68k) 493106c34b88Smrg # FIXME: we need at least 68020 code to build shared libraries, but 493206c34b88Smrg # adding the `-m68020' flag to GCC prevents building anything better, 493306c34b88Smrg # like `-m68040'. 493406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 493506c34b88Smrg ;; 493606c34b88Smrg esac 493706c34b88Smrg ;; 4938c27c18e8Smrg 493906c34b88Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 494006c34b88Smrg # PIC is the default for these OSes. 494106c34b88Smrg ;; 494206c34b88Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 494306c34b88Smrg # This hack is so that the source file can tell whether it is being 494406c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 494506c34b88Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 494606c34b88Smrg # (--disable-auto-import) libraries 494706c34b88Smrg m4_if([$1], [GCJ], [], 494806c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 494906c34b88Smrg ;; 495006c34b88Smrg darwin* | rhapsody*) 495106c34b88Smrg # PIC is the default on this platform 495206c34b88Smrg # Common symbols not allowed in MH_DYLIB files 495306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 495406c34b88Smrg ;; 495506c34b88Smrg *djgpp*) 495606c34b88Smrg # DJGPP does not support shared libraries at all 495706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 495806c34b88Smrg ;; 495906c34b88Smrg haiku*) 496006c34b88Smrg # PIC is the default for Haiku. 496106c34b88Smrg # The "-static" flag exists, but is broken. 496206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 496306c34b88Smrg ;; 496406c34b88Smrg interix[[3-9]]*) 496506c34b88Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 496606c34b88Smrg # Instead, we relocate shared libraries at runtime. 496706c34b88Smrg ;; 496806c34b88Smrg sysv4*MP*) 496906c34b88Smrg if test -d /usr/nec; then 497006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 497106c34b88Smrg fi 497206c34b88Smrg ;; 497306c34b88Smrg hpux*) 497406c34b88Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 497506c34b88Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 497606c34b88Smrg # sets the default TLS model and affects inlining. 497706c34b88Smrg case $host_cpu in 497806c34b88Smrg hppa*64*) 497906c34b88Smrg ;; 498006c34b88Smrg *) 498106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 498206c34b88Smrg ;; 498306c34b88Smrg esac 498406c34b88Smrg ;; 498506c34b88Smrg *qnx* | *nto*) 498606c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 498706c34b88Smrg # it will coredump. 498806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 498906c34b88Smrg ;; 499006c34b88Smrg *) 499106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 499206c34b88Smrg ;; 499306c34b88Smrg esac 4994c27c18e8Smrg else 499506c34b88Smrg case $host_os in 499606c34b88Smrg aix[[4-9]]*) 499706c34b88Smrg # All AIX code is PIC. 499806c34b88Smrg if test "$host_cpu" = ia64; then 499906c34b88Smrg # AIX 5 now supports IA64 processor 500006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 500106c34b88Smrg else 500206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 500306c34b88Smrg fi 500406c34b88Smrg ;; 500506c34b88Smrg chorus*) 500606c34b88Smrg case $cc_basename in 500706c34b88Smrg cxch68*) 500806c34b88Smrg # Green Hills C++ Compiler 500906c34b88Smrg # _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" 501006c34b88Smrg ;; 501106c34b88Smrg esac 501206c34b88Smrg ;; 501306c34b88Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 501406c34b88Smrg # This hack is so that the source file can tell whether it is being 501506c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 501606c34b88Smrg m4_if([$1], [GCJ], [], 501706c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 501806c34b88Smrg ;; 501906c34b88Smrg dgux*) 502006c34b88Smrg case $cc_basename in 502106c34b88Smrg ec++*) 502206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 502306c34b88Smrg ;; 502406c34b88Smrg ghcx*) 502506c34b88Smrg # Green Hills C++ Compiler 502606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 502706c34b88Smrg ;; 502806c34b88Smrg *) 502906c34b88Smrg ;; 503006c34b88Smrg esac 503106c34b88Smrg ;; 503206c34b88Smrg freebsd* | dragonfly*) 503306c34b88Smrg # FreeBSD uses GNU C++ 503406c34b88Smrg ;; 503506c34b88Smrg hpux9* | hpux10* | hpux11*) 503606c34b88Smrg case $cc_basename in 503706c34b88Smrg CC*) 503806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 503906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 504006c34b88Smrg if test "$host_cpu" != ia64; then 504106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 504206c34b88Smrg fi 504306c34b88Smrg ;; 504406c34b88Smrg aCC*) 504506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 504606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 504706c34b88Smrg case $host_cpu in 504806c34b88Smrg hppa*64*|ia64*) 504906c34b88Smrg # +Z the default 505006c34b88Smrg ;; 505106c34b88Smrg *) 505206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 505306c34b88Smrg ;; 505406c34b88Smrg esac 505506c34b88Smrg ;; 505606c34b88Smrg *) 505706c34b88Smrg ;; 505806c34b88Smrg esac 505906c34b88Smrg ;; 506006c34b88Smrg interix*) 506106c34b88Smrg # This is c89, which is MS Visual C++ (no shared libs) 506206c34b88Smrg # Anyone wants to do a port? 506306c34b88Smrg ;; 506406c34b88Smrg irix5* | irix6* | nonstopux*) 506506c34b88Smrg case $cc_basename in 506606c34b88Smrg CC*) 506706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 506806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 506906c34b88Smrg # CC pic flag -KPIC is the default. 507006c34b88Smrg ;; 507106c34b88Smrg *) 507206c34b88Smrg ;; 507306c34b88Smrg esac 507406c34b88Smrg ;; 507506c34b88Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 507606c34b88Smrg case $cc_basename in 507706c34b88Smrg KCC*) 507806c34b88Smrg # KAI C++ Compiler 507906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 508006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 508106c34b88Smrg ;; 508206c34b88Smrg ecpc* ) 508306c34b88Smrg # old Intel C++ for x86_64 which still supported -KPIC. 508406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 508506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 508606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 508706c34b88Smrg ;; 508806c34b88Smrg icpc* ) 508906c34b88Smrg # Intel C++, used to be incompatible with GCC. 509006c34b88Smrg # ICC 10 doesn't accept -KPIC any more. 509106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 509206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 509306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 509406c34b88Smrg ;; 509506c34b88Smrg pgCC* | pgcpp*) 509606c34b88Smrg # Portland Group C++ compiler 509706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 509806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 509906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 510006c34b88Smrg ;; 510106c34b88Smrg cxx*) 510206c34b88Smrg # Compaq C++ 510306c34b88Smrg # Make sure the PIC flag is empty. It appears that all Alpha 510406c34b88Smrg # Linux and Compaq Tru64 Unix objects are PIC. 510506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 510606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 510706c34b88Smrg ;; 510806c34b88Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 510906c34b88Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 511006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 511106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 511206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 511306c34b88Smrg ;; 511406c34b88Smrg *) 511506c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 511606c34b88Smrg *Sun\ C*) 511706c34b88Smrg # Sun C++ 5.9 511806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 511906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 512006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 512106c34b88Smrg ;; 512206c34b88Smrg esac 512306c34b88Smrg ;; 512406c34b88Smrg esac 512506c34b88Smrg ;; 512606c34b88Smrg lynxos*) 512706c34b88Smrg ;; 512806c34b88Smrg m88k*) 512906c34b88Smrg ;; 513006c34b88Smrg mvs*) 513106c34b88Smrg case $cc_basename in 513206c34b88Smrg cxx*) 513306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 513406c34b88Smrg ;; 513506c34b88Smrg *) 513606c34b88Smrg ;; 513706c34b88Smrg esac 513806c34b88Smrg ;; 513906c34b88Smrg netbsd*) 514006c34b88Smrg ;; 514106c34b88Smrg *qnx* | *nto*) 514206c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 514306c34b88Smrg # it will coredump. 514406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 514506c34b88Smrg ;; 514606c34b88Smrg osf3* | osf4* | osf5*) 514706c34b88Smrg case $cc_basename in 514806c34b88Smrg KCC*) 514906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 515006c34b88Smrg ;; 515106c34b88Smrg RCC*) 515206c34b88Smrg # Rational C++ 2.4.1 515306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 515406c34b88Smrg ;; 515506c34b88Smrg cxx*) 515606c34b88Smrg # Digital/Compaq C++ 515706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 515806c34b88Smrg # Make sure the PIC flag is empty. It appears that all Alpha 515906c34b88Smrg # Linux and Compaq Tru64 Unix objects are PIC. 516006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 516106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 516206c34b88Smrg ;; 516306c34b88Smrg *) 516406c34b88Smrg ;; 516506c34b88Smrg esac 516606c34b88Smrg ;; 516706c34b88Smrg psos*) 516806c34b88Smrg ;; 516906c34b88Smrg solaris*) 517006c34b88Smrg case $cc_basename in 517106c34b88Smrg CC* | sunCC*) 517206c34b88Smrg # Sun C++ 4.2, 5.x and Centerline C++ 517306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 517406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 517506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 517606c34b88Smrg ;; 517706c34b88Smrg gcx*) 517806c34b88Smrg # Green Hills C++ Compiler 517906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 518006c34b88Smrg ;; 518106c34b88Smrg *) 518206c34b88Smrg ;; 518306c34b88Smrg esac 518406c34b88Smrg ;; 518506c34b88Smrg sunos4*) 518606c34b88Smrg case $cc_basename in 518706c34b88Smrg CC*) 518806c34b88Smrg # Sun C++ 4.x 518906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 519006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 519106c34b88Smrg ;; 519206c34b88Smrg lcc*) 519306c34b88Smrg # Lucid 519406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 519506c34b88Smrg ;; 519606c34b88Smrg *) 519706c34b88Smrg ;; 519806c34b88Smrg esac 519906c34b88Smrg ;; 520006c34b88Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 520106c34b88Smrg case $cc_basename in 520206c34b88Smrg CC*) 520306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 520506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 520606c34b88Smrg ;; 520706c34b88Smrg esac 520806c34b88Smrg ;; 520906c34b88Smrg tandem*) 521006c34b88Smrg case $cc_basename in 521106c34b88Smrg NCC*) 521206c34b88Smrg # NonStop-UX NCC 3.20 521306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 521406c34b88Smrg ;; 521506c34b88Smrg *) 521606c34b88Smrg ;; 521706c34b88Smrg esac 521806c34b88Smrg ;; 521906c34b88Smrg vxworks*) 522006c34b88Smrg ;; 522106c34b88Smrg *) 522206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 522306c34b88Smrg ;; 522406c34b88Smrg esac 5225c27c18e8Smrg fi 522606c34b88Smrg], 522706c34b88Smrg[ 522806c34b88Smrg if test "$GCC" = yes; then 522906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 523006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5231c43cc173Smrg 523206c34b88Smrg case $host_os in 523306c34b88Smrg aix*) 523406c34b88Smrg # All AIX code is PIC. 523506c34b88Smrg if test "$host_cpu" = ia64; then 523606c34b88Smrg # AIX 5 now supports IA64 processor 523706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523806c34b88Smrg fi 523906c34b88Smrg ;; 5240c43cc173Smrg 524106c34b88Smrg amigaos*) 524206c34b88Smrg case $host_cpu in 524306c34b88Smrg powerpc) 524406c34b88Smrg # see comment about AmigaOS4 .so support 524506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 524606c34b88Smrg ;; 524706c34b88Smrg m68k) 524806c34b88Smrg # FIXME: we need at least 68020 code to build shared libraries, but 524906c34b88Smrg # adding the `-m68020' flag to GCC prevents building anything better, 525006c34b88Smrg # like `-m68040'. 525106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 525206c34b88Smrg ;; 525306c34b88Smrg esac 525406c34b88Smrg ;; 5255c43cc173Smrg 525606c34b88Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 525706c34b88Smrg # PIC is the default for these OSes. 525806c34b88Smrg ;; 5259c27c18e8Smrg 526006c34b88Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 526106c34b88Smrg # This hack is so that the source file can tell whether it is being 526206c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 526306c34b88Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 526406c34b88Smrg # (--disable-auto-import) libraries 526506c34b88Smrg m4_if([$1], [GCJ], [], 526606c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 526706c34b88Smrg ;; 5268c43cc173Smrg 526906c34b88Smrg darwin* | rhapsody*) 527006c34b88Smrg # PIC is the default on this platform 527106c34b88Smrg # Common symbols not allowed in MH_DYLIB files 527206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 527306c34b88Smrg ;; 5274c43cc173Smrg 527506c34b88Smrg haiku*) 527606c34b88Smrg # PIC is the default for Haiku. 527706c34b88Smrg # The "-static" flag exists, but is broken. 527806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 527906c34b88Smrg ;; 5280c43cc173Smrg 528106c34b88Smrg hpux*) 528206c34b88Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 528306c34b88Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 528406c34b88Smrg # sets the default TLS model and affects inlining. 528506c34b88Smrg case $host_cpu in 528606c34b88Smrg hppa*64*) 528706c34b88Smrg # +Z the default 528806c34b88Smrg ;; 528906c34b88Smrg *) 529006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 529106c34b88Smrg ;; 529206c34b88Smrg esac 529306c34b88Smrg ;; 5294c27c18e8Smrg 529506c34b88Smrg interix[[3-9]]*) 529606c34b88Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 529706c34b88Smrg # Instead, we relocate shared libraries at runtime. 529806c34b88Smrg ;; 5299c43cc173Smrg 530006c34b88Smrg msdosdjgpp*) 530106c34b88Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 530206c34b88Smrg # on systems that don't support them. 530306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 530406c34b88Smrg enable_shared=no 530506c34b88Smrg ;; 5306c43cc173Smrg 530706c34b88Smrg *nto* | *qnx*) 530806c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 530906c34b88Smrg # it will coredump. 531006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 531106c34b88Smrg ;; 5312c27c18e8Smrg 531306c34b88Smrg sysv4*MP*) 531406c34b88Smrg if test -d /usr/nec; then 531506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 531606c34b88Smrg fi 531706c34b88Smrg ;; 5318c27c18e8Smrg 531906c34b88Smrg *) 532006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 532106c34b88Smrg ;; 532206c34b88Smrg esac 5323c43cc173Smrg 532406c34b88Smrg case $cc_basename in 532506c34b88Smrg nvcc*) # Cuda Compiler Driver 2.2 532606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 532706c34b88Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 532806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 532906c34b88Smrg fi 533006c34b88Smrg ;; 533106c34b88Smrg esac 533206c34b88Smrg else 533306c34b88Smrg # PORTME Check for flag to pass linker flags through the system compiler. 533406c34b88Smrg case $host_os in 533506c34b88Smrg aix*) 533606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 533706c34b88Smrg if test "$host_cpu" = ia64; then 533806c34b88Smrg # AIX 5 now supports IA64 processor 533906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 534006c34b88Smrg else 534106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 534206c34b88Smrg fi 534306c34b88Smrg ;; 5344c27c18e8Smrg 534506c34b88Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 534606c34b88Smrg # This hack is so that the source file can tell whether it is being 534706c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 534806c34b88Smrg m4_if([$1], [GCJ], [], 534906c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 535006c34b88Smrg ;; 5351c43cc173Smrg 535206c34b88Smrg hpux9* | hpux10* | hpux11*) 535306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 535406c34b88Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 535506c34b88Smrg # not for PA HP-UX. 535606c34b88Smrg case $host_cpu in 535706c34b88Smrg hppa*64*|ia64*) 535806c34b88Smrg # +Z the default 535906c34b88Smrg ;; 536006c34b88Smrg *) 536106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5362c27c18e8Smrg ;; 536306c34b88Smrg esac 536406c34b88Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 536506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 536606c34b88Smrg ;; 5367c43cc173Smrg 536806c34b88Smrg irix5* | irix6* | nonstopux*) 536906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 537006c34b88Smrg # PIC (with -KPIC) is the default. 537106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 537206c34b88Smrg ;; 5373c43cc173Smrg 537406c34b88Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 537506c34b88Smrg case $cc_basename in 537606c34b88Smrg # old Intel for x86_64 which still supported -KPIC. 537706c34b88Smrg ecc*) 537806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 537906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 538006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 538106c34b88Smrg ;; 538206c34b88Smrg # icc used to be incompatible with GCC. 538306c34b88Smrg # ICC 10 doesn't accept -KPIC any more. 538406c34b88Smrg icc* | ifort*) 538506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 538606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 538706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 538806c34b88Smrg ;; 538906c34b88Smrg # Lahey Fortran 8.1. 539006c34b88Smrg lf95*) 539106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 539206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 539306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 539406c34b88Smrg ;; 539506c34b88Smrg nagfor*) 539606c34b88Smrg # NAG Fortran compiler 539706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 539806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 539906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 540006c34b88Smrg ;; 540106c34b88Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 540206c34b88Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 540306c34b88Smrg # which looks to be a dead project) 540406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 540506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 540606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 540706c34b88Smrg ;; 540806c34b88Smrg ccc*) 540906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 541006c34b88Smrg # All Alpha code is PIC. 541106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 541206c34b88Smrg ;; 541306c34b88Smrg xl* | bgxl* | bgf* | mpixl*) 541406c34b88Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 541506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 541606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 541706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 541806c34b88Smrg ;; 541906c34b88Smrg *) 542006c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 542106c34b88Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 542206c34b88Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 542306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 542406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 542506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 542606c34b88Smrg ;; 542706c34b88Smrg *Sun\ F* | *Sun*Fortran*) 542806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 542906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 543006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 543106c34b88Smrg ;; 543206c34b88Smrg *Sun\ C*) 543306c34b88Smrg # Sun C 5.9 543406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 543506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 543606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 543706c34b88Smrg ;; 543806c34b88Smrg *Intel*\ [[CF]]*Compiler*) 543906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 544006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 544106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5442b789ec8aSmrg ;; 544306c34b88Smrg *Portland\ Group*) 544406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 544506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 544606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5447b789ec8aSmrg ;; 5448b789ec8aSmrg esac 5449b789ec8aSmrg ;; 545006c34b88Smrg esac 545106c34b88Smrg ;; 5452c43cc173Smrg 545306c34b88Smrg newsos6) 545406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 545506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 545606c34b88Smrg ;; 5457c27c18e8Smrg 545806c34b88Smrg *nto* | *qnx*) 545906c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 546006c34b88Smrg # it will coredump. 546106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 546206c34b88Smrg ;; 5463c43cc173Smrg 546406c34b88Smrg osf3* | osf4* | osf5*) 546506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 546606c34b88Smrg # All OSF/1 code is PIC. 546706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 546806c34b88Smrg ;; 5469c43cc173Smrg 547006c34b88Smrg rdos*) 547106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 547206c34b88Smrg ;; 5473c43cc173Smrg 547406c34b88Smrg solaris*) 547506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 547606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 547706c34b88Smrg case $cc_basename in 547806c34b88Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 547906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 548006c34b88Smrg *) 548106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 548206c34b88Smrg esac 548306c34b88Smrg ;; 5484c43cc173Smrg 548506c34b88Smrg sunos4*) 548606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 548706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 548806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 548906c34b88Smrg ;; 549037eb1ca1Smrg 549106c34b88Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 549206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 549306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 549406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549506c34b88Smrg ;; 5496c27c18e8Smrg 549706c34b88Smrg sysv4*MP*) 549806c34b88Smrg if test -d /usr/nec ;then 549906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 550006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 550106c34b88Smrg fi 550206c34b88Smrg ;; 5503c43cc173Smrg 550406c34b88Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 550506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 550706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 550806c34b88Smrg ;; 5509c27c18e8Smrg 551006c34b88Smrg unicos*) 551106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 551206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 551306c34b88Smrg ;; 5514c27c18e8Smrg 551506c34b88Smrg uts4*) 551606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 551706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 551806c34b88Smrg ;; 5519c43cc173Smrg 552006c34b88Smrg *) 552106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 552206c34b88Smrg ;; 552306c34b88Smrg esac 552406c34b88Smrg fi 552506c34b88Smrg]) 552606c34b88Smrgcase $host_os in 552706c34b88Smrg # For platforms which do not support PIC, -DPIC is meaningless: 552806c34b88Smrg *djgpp*) 552906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 553006c34b88Smrg ;; 553106c34b88Smrg *) 553206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 553306c34b88Smrg ;; 553406c34b88Smrgesac 5535c27c18e8Smrg 553606c34b88SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 553706c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 553806c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 553906c34b88Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5540c43cc173Smrg 554106c34b88Smrg# 554206c34b88Smrg# Check to make sure the PIC flag actually works. 554306c34b88Smrg# 554406c34b88Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 554506c34b88Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 554606c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 554706c34b88Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 554806c34b88Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 554906c34b88Smrg "" | " "*) ;; 555006c34b88Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 555106c34b88Smrg esac], 555206c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 555306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 555406c34b88Smrgfi 555506c34b88Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 555606c34b88Smrg [Additional compiler flags for building library objects]) 5557c27c18e8Smrg 555806c34b88Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 555906c34b88Smrg [How to pass a linker flag through the compiler]) 556006c34b88Smrg# 556106c34b88Smrg# Check to make sure the static flag actually works. 556206c34b88Smrg# 556306c34b88Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 556406c34b88Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 556506c34b88Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 556606c34b88Smrg $lt_tmp_static_flag, 556706c34b88Smrg [], 556806c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 556906c34b88Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 557006c34b88Smrg [Compiler flag to prevent dynamic linking]) 557106c34b88Smrg])# _LT_COMPILER_PIC 5572c27c18e8Smrg 5573c27c18e8Smrg 557406c34b88Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 557506c34b88Smrg# ---------------------------- 557606c34b88Smrg# See if the linker supports building shared libraries. 557706c34b88Smrgm4_defun([_LT_LINKER_SHLIBS], 557806c34b88Smrg[AC_REQUIRE([LT_PATH_LD])dnl 557906c34b88SmrgAC_REQUIRE([LT_PATH_NM])dnl 558006c34b88Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 558106c34b88Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 558206c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 558306c34b88Smrgm4_require([_LT_DECL_SED])dnl 558406c34b88Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 558506c34b88Smrgm4_require([_LT_TAG_COMPILER])dnl 558606c34b88SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 558706c34b88Smrgm4_if([$1], [CXX], [ 558806c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 558906c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 559006c34b88Smrg case $host_os in 559106c34b88Smrg aix[[4-9]]*) 559206c34b88Smrg # If we're using GNU nm, then we don't want the "-C" option. 559306c34b88Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 559406c34b88Smrg # Also, AIX nm treats weak defined symbols like other global defined 559506c34b88Smrg # symbols, whereas GNU nm marks them as "W". 559606c34b88Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 559706c34b88Smrg _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' 559806c34b88Smrg else 559906c34b88Smrg _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' 560006c34b88Smrg fi 560106c34b88Smrg ;; 560206c34b88Smrg pw32*) 560306c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 560406c34b88Smrg ;; 560506c34b88Smrg cygwin* | mingw* | cegcc*) 560606c34b88Smrg case $cc_basename in 560706c34b88Smrg cl*) 560806c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 560906c34b88Smrg ;; 561006c34b88Smrg *) 561106c34b88Smrg _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' 561206c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 561306c34b88Smrg ;; 561406c34b88Smrg esac 561506c34b88Smrg ;; 561606c34b88Smrg *) 561706c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 561806c34b88Smrg ;; 561906c34b88Smrg esac 562006c34b88Smrg], [ 562106c34b88Smrg runpath_var= 562206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 562306c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 562406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)= 562506c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 562606c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 562706c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 562806c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 562906c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 563006c34b88Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 563106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 563206c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 563306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 563406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 563506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 563606c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 563706c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=no 563806c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 563906c34b88Smrg _LT_TAGVAR(module_cmds, $1)= 564006c34b88Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 564106c34b88Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 564206c34b88Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 564306c34b88Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 564406c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 564506c34b88Smrg # include_expsyms should be a list of space-separated symbols to be *always* 564606c34b88Smrg # included in the symbol list 564706c34b88Smrg _LT_TAGVAR(include_expsyms, $1)= 564806c34b88Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 564906c34b88Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 565006c34b88Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 565106c34b88Smrg # as well as any symbol that contains `d'. 565206c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 565306c34b88Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 565406c34b88Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 565506c34b88Smrg # the symbol is explicitly referenced. Since portable code cannot 565606c34b88Smrg # rely on this symbol name, it's probably fine to never include it in 565706c34b88Smrg # preloaded symbol tables. 565806c34b88Smrg # Exclude shared library initialization/finalization symbols. 565906c34b88Smrgdnl Note also adjust exclude_expsyms for C++ above. 566006c34b88Smrg extract_expsyms_cmds= 5661c43cc173Smrg 566206c34b88Smrg case $host_os in 566306c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 566406c34b88Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 566506c34b88Smrg # When not using gcc, we currently assume that we are using 566606c34b88Smrg # Microsoft Visual C++. 566706c34b88Smrg if test "$GCC" != yes; then 566806c34b88Smrg with_gnu_ld=no 566906c34b88Smrg fi 567006c34b88Smrg ;; 567106c34b88Smrg interix*) 567206c34b88Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 567306c34b88Smrg with_gnu_ld=yes 567406c34b88Smrg ;; 567506c34b88Smrg openbsd*) 567606c34b88Smrg with_gnu_ld=no 567706c34b88Smrg ;; 567806c34b88Smrg esac 5679c43cc173Smrg 568006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 568121e67964Smrg 568206c34b88Smrg # On some targets, GNU ld is compatible enough with the native linker 568306c34b88Smrg # that we're better off using the native interface for both. 568406c34b88Smrg lt_use_gnu_ld_interface=no 568506c34b88Smrg if test "$with_gnu_ld" = yes; then 568606c34b88Smrg case $host_os in 568706c34b88Smrg aix*) 568806c34b88Smrg # The AIX port of GNU ld has always aspired to compatibility 568906c34b88Smrg # with the native linker. However, as the warning in the GNU ld 569006c34b88Smrg # block says, versions before 2.19.5* couldn't really create working 569106c34b88Smrg # shared libraries, regardless of the interface used. 569206c34b88Smrg case `$LD -v 2>&1` in 569306c34b88Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 569406c34b88Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 569506c34b88Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5696c27c18e8Smrg *) 569706c34b88Smrg lt_use_gnu_ld_interface=yes 5698c27c18e8Smrg ;; 5699c27c18e8Smrg esac 5700c27c18e8Smrg ;; 570106c34b88Smrg *) 570206c34b88Smrg lt_use_gnu_ld_interface=yes 570306c34b88Smrg ;; 570406c34b88Smrg esac 570506c34b88Smrg fi 5706c43cc173Smrg 570706c34b88Smrg if test "$lt_use_gnu_ld_interface" = yes; then 570806c34b88Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 570906c34b88Smrg wlarc='${wl}' 571006c34b88Smrg 571106c34b88Smrg # Set some defaults for GNU ld with shared library support. These 571206c34b88Smrg # are reset later if shared libraries are not supported. Putting them 571306c34b88Smrg # here allows them to be overridden if necessary. 571406c34b88Smrg runpath_var=LD_RUN_PATH 571506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 571606c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 571706c34b88Smrg # ancient GNU ld didn't support --whole-archive et. al. 571806c34b88Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 571906c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 572006c34b88Smrg else 572106c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 572206c34b88Smrg fi 572306c34b88Smrg supports_anon_versioning=no 572406c34b88Smrg case `$LD -v 2>&1` in 572506c34b88Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 572606c34b88Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 572706c34b88Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 572806c34b88Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 572906c34b88Smrg *\ 2.11.*) ;; # other 2.11 versions 573006c34b88Smrg *) supports_anon_versioning=yes ;; 573106c34b88Smrg esac 573206c34b88Smrg 573306c34b88Smrg # See if GNU ld supports shared libraries. 573406c34b88Smrg case $host_os in 573506c34b88Smrg aix[[3-9]]*) 573606c34b88Smrg # On AIX/PPC, the GNU linker is very broken 573706c34b88Smrg if test "$host_cpu" != ia64; then 5738c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 573906c34b88Smrg cat <<_LT_EOF 1>&2 5740c43cc173Smrg 574106c34b88Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 574206c34b88Smrg*** to be unable to reliably create shared libraries on AIX. 574306c34b88Smrg*** Therefore, libtool is disabling shared libraries support. If you 574406c34b88Smrg*** really care for shared libraries, you may want to install binutils 574506c34b88Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 574606c34b88Smrg*** You will then need to restart the configuration process. 5747c43cc173Smrg 574806c34b88Smrg_LT_EOF 574906c34b88Smrg fi 575006c34b88Smrg ;; 5751c43cc173Smrg 575206c34b88Smrg amigaos*) 575306c34b88Smrg case $host_cpu in 575406c34b88Smrg powerpc) 575506c34b88Smrg # see comment about AmigaOS4 .so support 575606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 575706c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 575806c34b88Smrg ;; 575906c34b88Smrg m68k) 576006c34b88Smrg _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)' 576106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 576206c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 576306c34b88Smrg ;; 576406c34b88Smrg esac 576506c34b88Smrg ;; 5766c43cc173Smrg 576706c34b88Smrg beos*) 576806c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 576906c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 577006c34b88Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 577106c34b88Smrg # support --undefined. This deserves some investigation. FIXME 577206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 577306c34b88Smrg else 577406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 577506c34b88Smrg fi 577606c34b88Smrg ;; 577706c34b88Smrg 577806c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 577906c34b88Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 578006c34b88Smrg # as there is no search path for DLLs. 578106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 578206c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 578306c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 578406c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 578506c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 578606c34b88Smrg _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' 578706c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 578806c34b88Smrg 578906c34b88Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 579006c34b88Smrg _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' 579106c34b88Smrg # If the export-symbols file already is a .def file (1st line 579206c34b88Smrg # is EXPORTS), use it as is; otherwise, prepend... 579306c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 579406c34b88Smrg cp $export_symbols $output_objdir/$soname.def; 579506c34b88Smrg else 579606c34b88Smrg echo EXPORTS > $output_objdir/$soname.def; 579706c34b88Smrg cat $export_symbols >> $output_objdir/$soname.def; 579806c34b88Smrg fi~ 579906c34b88Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 580006c34b88Smrg else 580106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 580206c34b88Smrg fi 580306c34b88Smrg ;; 580406c34b88Smrg 580506c34b88Smrg haiku*) 580606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 580706c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 580806c34b88Smrg ;; 580906c34b88Smrg 581006c34b88Smrg interix[[3-9]]*) 581106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 581206c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 581306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 581406c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 581506c34b88Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 581606c34b88Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 581706c34b88Smrg # default) and relocated if they conflict, which is a slow very memory 581806c34b88Smrg # consuming and fragmenting process. To avoid this, we pick a random, 581906c34b88Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 582006c34b88Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 582106c34b88Smrg _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' 582206c34b88Smrg _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' 582306c34b88Smrg ;; 582406c34b88Smrg 582506c34b88Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 582606c34b88Smrg tmp_diet=no 582706c34b88Smrg if test "$host_os" = linux-dietlibc; then 582806c34b88Smrg case $cc_basename in 582906c34b88Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 583006c34b88Smrg esac 583106c34b88Smrg fi 583206c34b88Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 583306c34b88Smrg && test "$tmp_diet" = no 583406c34b88Smrg then 583506c34b88Smrg tmp_addflag=' $pic_flag' 583606c34b88Smrg tmp_sharedflag='-shared' 583706c34b88Smrg case $cc_basename,$host_cpu in 583806c34b88Smrg pgcc*) # Portland Group C compiler 583906c34b88Smrg _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' 584006c34b88Smrg tmp_addflag=' $pic_flag' 584106c34b88Smrg ;; 584206c34b88Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 584306c34b88Smrg # Portland Group f77 and f90 compilers 584406c34b88Smrg _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' 584506c34b88Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 584606c34b88Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 584706c34b88Smrg tmp_addflag=' -i_dynamic' ;; 584806c34b88Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 584906c34b88Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 585006c34b88Smrg ifc* | ifort*) # Intel Fortran compiler 585106c34b88Smrg tmp_addflag=' -nofor_main' ;; 585206c34b88Smrg lf95*) # Lahey Fortran 8.1 585306c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 585406c34b88Smrg tmp_sharedflag='--shared' ;; 585506c34b88Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 585606c34b88Smrg tmp_sharedflag='-qmkshrobj' 585706c34b88Smrg tmp_addflag= ;; 585806c34b88Smrg nvcc*) # Cuda Compiler Driver 2.2 585906c34b88Smrg _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' 586006c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 586106c34b88Smrg ;; 586206c34b88Smrg esac 586306c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 586406c34b88Smrg *Sun\ C*) # Sun C 5.9 586506c34b88Smrg _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' 586606c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 586706c34b88Smrg tmp_sharedflag='-G' ;; 586806c34b88Smrg *Sun\ F*) # Sun Fortran 8.3 586906c34b88Smrg tmp_sharedflag='-G' ;; 587006c34b88Smrg esac 587106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5872c43cc173Smrg 587306c34b88Smrg if test "x$supports_anon_versioning" = xyes; then 587406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 587506c34b88Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 587606c34b88Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 587706c34b88Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 587806c34b88Smrg fi 5879c43cc173Smrg 588006c34b88Smrg case $cc_basename in 588106c34b88Smrg xlf* | bgf* | bgxlf* | mpixlf*) 588206c34b88Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 588306c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 588406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 588506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 588606c34b88Smrg if test "x$supports_anon_versioning" = xyes; then 588706c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 588806c34b88Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 588906c34b88Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 589006c34b88Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5891c27c18e8Smrg fi 589206c34b88Smrg ;; 589306c34b88Smrg esac 589406c34b88Smrg else 589506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 589606c34b88Smrg fi 589706c34b88Smrg ;; 5898c27c18e8Smrg 589906c34b88Smrg netbsd*) 590006c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 590106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 590206c34b88Smrg wlarc= 590306c34b88Smrg else 590406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 590506c34b88Smrg _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' 590606c34b88Smrg fi 590706c34b88Smrg ;; 5908c27c18e8Smrg 590906c34b88Smrg solaris*) 591006c34b88Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 591106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 591206c34b88Smrg cat <<_LT_EOF 1>&2 5913c27c18e8Smrg 591406c34b88Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 591506c34b88Smrg*** create shared libraries on Solaris systems. Therefore, libtool 591606c34b88Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 591706c34b88Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 591806c34b88Smrg*** your PATH or compiler configuration so that the native linker is 591906c34b88Smrg*** used, and then restart. 5920c43cc173Smrg 592106c34b88Smrg_LT_EOF 592206c34b88Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 592306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 592406c34b88Smrg _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' 592506c34b88Smrg else 592606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 592706c34b88Smrg fi 592806c34b88Smrg ;; 5929c43cc173Smrg 593006c34b88Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 593106c34b88Smrg case `$LD -v 2>&1` in 593206c34b88Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 593306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 593406c34b88Smrg cat <<_LT_EOF 1>&2 5935c27c18e8Smrg 593606c34b88Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 593706c34b88Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 593806c34b88Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 593906c34b88Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 594006c34b88Smrg*** your PATH or compiler configuration so that the native linker is 594106c34b88Smrg*** used, and then restart. 5942c27c18e8Smrg 594306c34b88Smrg_LT_EOF 594406c34b88Smrg ;; 594506c34b88Smrg *) 594606c34b88Smrg # For security reasons, it is highly recommended that you always 594706c34b88Smrg # use absolute paths for naming shared libraries, and exclude the 594806c34b88Smrg # DT_RUNPATH tag from executables and libraries. But doing so 594906c34b88Smrg # requires that you compile everything twice, which is a pain. 595006c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 595106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 595206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 595306c34b88Smrg _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' 595406c34b88Smrg else 595506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 595606c34b88Smrg fi 595706c34b88Smrg ;; 595806c34b88Smrg esac 595906c34b88Smrg ;; 5960c27c18e8Smrg 596106c34b88Smrg sunos4*) 596206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 596306c34b88Smrg wlarc= 596406c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 596506c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 596606c34b88Smrg ;; 5967c43cc173Smrg 596806c34b88Smrg *) 596906c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 597006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 597106c34b88Smrg _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' 597206c34b88Smrg else 597306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 597406c34b88Smrg fi 597506c34b88Smrg ;; 597606c34b88Smrg esac 5977c43cc173Smrg 597806c34b88Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 597906c34b88Smrg runpath_var= 598006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 598106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 598206c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 598306c34b88Smrg fi 598406c34b88Smrg else 598506c34b88Smrg # PORTME fill in a description of your system's linker (not GNU ld) 598606c34b88Smrg case $host_os in 598706c34b88Smrg aix3*) 598806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 598906c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 599006c34b88Smrg _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' 599106c34b88Smrg # Note: this linker hardcodes the directories in LIBPATH if there 599206c34b88Smrg # are no directories specified by -L. 599306c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 599406c34b88Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 599506c34b88Smrg # Neither direct hardcoding nor static linking is supported with a 599606c34b88Smrg # broken collect2. 599706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 599806c34b88Smrg fi 599906c34b88Smrg ;; 6000c43cc173Smrg 600106c34b88Smrg aix[[4-9]]*) 600206c34b88Smrg if test "$host_cpu" = ia64; then 600306c34b88Smrg # On IA64, the linker does run time linking by default, so we don't 600406c34b88Smrg # have to do anything special. 600506c34b88Smrg aix_use_runtimelinking=no 600606c34b88Smrg exp_sym_flag='-Bexport' 600706c34b88Smrg no_entry_flag="" 600806c34b88Smrg else 600906c34b88Smrg # If we're using GNU nm, then we don't want the "-C" option. 601006c34b88Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 601106c34b88Smrg # Also, AIX nm treats weak defined symbols like other global 601206c34b88Smrg # defined symbols, whereas GNU nm marks them as "W". 601306c34b88Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 601406c34b88Smrg _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' 601506c34b88Smrg else 601606c34b88Smrg _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' 601706c34b88Smrg fi 601806c34b88Smrg aix_use_runtimelinking=no 6019c27c18e8Smrg 602006c34b88Smrg # Test if we are trying to use run time linking or normal 602106c34b88Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 602206c34b88Smrg # need to do runtime linking. 602306c34b88Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 602406c34b88Smrg for ld_flag in $LDFLAGS; do 602506c34b88Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 602606c34b88Smrg aix_use_runtimelinking=yes 602706c34b88Smrg break 602806c34b88Smrg fi 602906c34b88Smrg done 603006c34b88Smrg ;; 603106c34b88Smrg esac 6032c43cc173Smrg 603306c34b88Smrg exp_sym_flag='-bexport' 603406c34b88Smrg no_entry_flag='-bnoentry' 603506c34b88Smrg fi 6036c43cc173Smrg 603706c34b88Smrg # When large executables or shared objects are built, AIX ld can 603806c34b88Smrg # have problems creating the table of contents. If linking a library 603906c34b88Smrg # or program results in "error TOC overflow" add -mminimal-toc to 604006c34b88Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 604106c34b88Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6042c43cc173Smrg 604306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='' 604406c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 604506c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 604606c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 604706c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 604806c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6049c27c18e8Smrg 605006c34b88Smrg if test "$GCC" = yes; then 605106c34b88Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 605206c34b88Smrg # We only want to do this on AIX 4.2 and lower, the check 605306c34b88Smrg # below for broken collect2 doesn't work under 4.3+ 605406c34b88Smrg collect2name=`${CC} -print-prog-name=collect2` 605506c34b88Smrg if test -f "$collect2name" && 605606c34b88Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 605706c34b88Smrg then 605806c34b88Smrg # We have reworked collect2 605906c34b88Smrg : 606006c34b88Smrg else 606106c34b88Smrg # We have old collect2 606206c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 606306c34b88Smrg # It fails to find uninstalled libraries when the uninstalled 606406c34b88Smrg # path is not listed in the libpath. Setting hardcode_minus_L 606506c34b88Smrg # to unsupported forces relinking 606606c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 606706c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 606806c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 606906c34b88Smrg fi 607006c34b88Smrg ;; 607106c34b88Smrg esac 607206c34b88Smrg shared_flag='-shared' 607306c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 607406c34b88Smrg shared_flag="$shared_flag "'${wl}-G' 607506c34b88Smrg fi 607606c34b88Smrg else 607706c34b88Smrg # not using gcc 607806c34b88Smrg if test "$host_cpu" = ia64; then 607906c34b88Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 608006c34b88Smrg # chokes on -Wl,-G. The following line is correct: 608106c34b88Smrg shared_flag='-G' 608206c34b88Smrg else 608306c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 608406c34b88Smrg shared_flag='${wl}-G' 608506c34b88Smrg else 608606c34b88Smrg shared_flag='${wl}-bM:SRE' 608706c34b88Smrg fi 608806c34b88Smrg fi 608906c34b88Smrg fi 6090c27c18e8Smrg 609106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 609206c34b88Smrg # It seems that -bexpall does not export symbols beginning with 609306c34b88Smrg # underscore (_), so it is better to generate a list of symbols to export. 609406c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 609506c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 609606c34b88Smrg # Warning - without using the other runtime loading flags (-brtl), 609706c34b88Smrg # -berok will link without error, but may produce a broken library. 609806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 609906c34b88Smrg # Determine the default libpath from the value encoded in an 610006c34b88Smrg # empty executable. 610106c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 610206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 610306c34b88Smrg _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" 610406c34b88Smrg else 610506c34b88Smrg if test "$host_cpu" = ia64; then 610606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 610706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 610806c34b88Smrg _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" 610906c34b88Smrg else 611006c34b88Smrg # Determine the default libpath from the value encoded in an 611106c34b88Smrg # empty executable. 611206c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 611306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 611406c34b88Smrg # Warning - without using the other run time loading flags, 611506c34b88Smrg # -berok will link without error, but may produce a broken library. 611606c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 611706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 611806c34b88Smrg if test "$with_gnu_ld" = yes; then 611906c34b88Smrg # We only use this code for GNU lds that support --whole-archive. 612006c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 612106c34b88Smrg else 612206c34b88Smrg # Exported symbols can be pulled into shared objects from archives 612306c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 612406c34b88Smrg fi 612506c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 612606c34b88Smrg # This is similar to how AIX traditionally builds its shared libraries. 612706c34b88Smrg _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' 612806c34b88Smrg fi 612906c34b88Smrg fi 613006c34b88Smrg ;; 6131c27c18e8Smrg 613206c34b88Smrg amigaos*) 613306c34b88Smrg case $host_cpu in 613406c34b88Smrg powerpc) 613506c34b88Smrg # see comment about AmigaOS4 .so support 613606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 613706c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 613806c34b88Smrg ;; 613906c34b88Smrg m68k) 614006c34b88Smrg _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)' 614106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 614206c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6143c27c18e8Smrg ;; 614406c34b88Smrg esac 614506c34b88Smrg ;; 6146c43cc173Smrg 614706c34b88Smrg bsdi[[45]]*) 614806c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 614906c34b88Smrg ;; 6150c43cc173Smrg 615106c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 615206c34b88Smrg # When not using gcc, we currently assume that we are using 615306c34b88Smrg # Microsoft Visual C++. 615406c34b88Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 615506c34b88Smrg # no search path for DLLs. 6156c27c18e8Smrg case $cc_basename in 615706c34b88Smrg cl*) 615806c34b88Smrg # Native MSVC 615906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 616006c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 616106c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 616206c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='@' 616306c34b88Smrg # Tell ltmain to make .lib files, not .a files. 616406c34b88Smrg libext=lib 616506c34b88Smrg # Tell ltmain to make .dll files, not .so files. 616606c34b88Smrg shrext_cmds=".dll" 616706c34b88Smrg # FIXME: Setting linknames here is a bad hack. 616806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 616906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 617006c34b88Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 617106c34b88Smrg else 617206c34b88Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 617306c34b88Smrg fi~ 617406c34b88Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 617506c34b88Smrg linknames=' 617606c34b88Smrg # The linker will not automatically build a static lib if we build a DLL. 617706c34b88Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 617806c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 617906c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 618006c34b88Smrg _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' 618106c34b88Smrg # Don't use ranlib 618206c34b88Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 618306c34b88Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 618406c34b88Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 618506c34b88Smrg case $lt_outputfile in 618606c34b88Smrg *.exe|*.EXE) ;; 618706c34b88Smrg *) 618806c34b88Smrg lt_outputfile="$lt_outputfile.exe" 618906c34b88Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 619006c34b88Smrg ;; 619106c34b88Smrg esac~ 619206c34b88Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 619306c34b88Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 619406c34b88Smrg $RM "$lt_outputfile.manifest"; 619506c34b88Smrg fi' 619606c34b88Smrg ;; 619706c34b88Smrg *) 619806c34b88Smrg # Assume MSVC wrapper 619906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 620006c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 620106c34b88Smrg # Tell ltmain to make .lib files, not .a files. 620206c34b88Smrg libext=lib 620306c34b88Smrg # Tell ltmain to make .dll files, not .so files. 620406c34b88Smrg shrext_cmds=".dll" 620506c34b88Smrg # FIXME: Setting linknames here is a bad hack. 620606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 620706c34b88Smrg # The linker will automatically build a .lib file if we build a DLL. 620806c34b88Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 620906c34b88Smrg # FIXME: Should let the user specify the lib program. 621006c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 621106c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 621206c34b88Smrg ;; 6213c27c18e8Smrg esac 6214c27c18e8Smrg ;; 6215c43cc173Smrg 621606c34b88Smrg darwin* | rhapsody*) 621706c34b88Smrg _LT_DARWIN_LINKER_FEATURES($1) 6218c27c18e8Smrg ;; 6219c43cc173Smrg 622006c34b88Smrg dgux*) 622106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 622206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 622306c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 622406c34b88Smrg ;; 6225c27c18e8Smrg 622606c34b88Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 622706c34b88Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 622806c34b88Smrg # does not break anything, and helps significantly (at the cost of a little 622906c34b88Smrg # extra space). 623006c34b88Smrg freebsd2.2*) 623106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 623206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 623306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 623406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 623506c34b88Smrg ;; 6236c27c18e8Smrg 623706c34b88Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 623806c34b88Smrg freebsd2.*) 623906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 624006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 624106c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 624206c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 624306c34b88Smrg ;; 6244c27c18e8Smrg 624506c34b88Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 624606c34b88Smrg freebsd* | dragonfly*) 624706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 624806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 624906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 625006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 625106c34b88Smrg ;; 6252c43cc173Smrg 625306c34b88Smrg hpux9*) 625406c34b88Smrg if test "$GCC" = yes; then 625506c34b88Smrg _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' 625606c34b88Smrg else 625706c34b88Smrg _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' 625806c34b88Smrg fi 625906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 626006c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 626106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6262c43cc173Smrg 626306c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 626406c34b88Smrg # but as the default location of the library. 626506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 626606c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 626706c34b88Smrg ;; 6268c43cc173Smrg 626906c34b88Smrg hpux10*) 627006c34b88Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 627106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 627206c34b88Smrg else 627306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 627406c34b88Smrg fi 627506c34b88Smrg if test "$with_gnu_ld" = no; then 627606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 627706c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 627806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 627906c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 628006c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 628106c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 628206c34b88Smrg # but as the default location of the library. 628306c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 628406c34b88Smrg fi 628506c34b88Smrg ;; 6286b789ec8aSmrg 628706c34b88Smrg hpux11*) 628806c34b88Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 628906c34b88Smrg case $host_cpu in 629006c34b88Smrg hppa*64*) 629106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 629206c34b88Smrg ;; 629306c34b88Smrg ia64*) 629406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 629506c34b88Smrg ;; 629606c34b88Smrg *) 629706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 629806c34b88Smrg ;; 629906c34b88Smrg esac 630006c34b88Smrg else 630106c34b88Smrg case $host_cpu in 630206c34b88Smrg hppa*64*) 630306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 630406c34b88Smrg ;; 630506c34b88Smrg ia64*) 630606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 630706c34b88Smrg ;; 630806c34b88Smrg *) 630906c34b88Smrg m4_if($1, [], [ 631006c34b88Smrg # Older versions of the 11.00 compiler do not understand -b yet 631106c34b88Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 631206c34b88Smrg _LT_LINKER_OPTION([if $CC understands -b], 631306c34b88Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 631406c34b88Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 631506c34b88Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 631606c34b88Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 631706c34b88Smrg ;; 631806c34b88Smrg esac 631906c34b88Smrg fi 632006c34b88Smrg if test "$with_gnu_ld" = no; then 632106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 632206c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6323c43cc173Smrg 632406c34b88Smrg case $host_cpu in 632506c34b88Smrg hppa*64*|ia64*) 632606c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 632706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 632806c34b88Smrg ;; 632906c34b88Smrg *) 633006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 633106c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 633206c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 633306c34b88Smrg 633406c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 633506c34b88Smrg # but as the default location of the library. 633606c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 633706c34b88Smrg ;; 633806c34b88Smrg esac 633906c34b88Smrg fi 634006c34b88Smrg ;; 634106c34b88Smrg 634206c34b88Smrg irix5* | irix6* | nonstopux*) 634306c34b88Smrg if test "$GCC" = yes; then 634406c34b88Smrg _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' 634506c34b88Smrg # Try to use the -exported_symbol ld option, if it does not 634606c34b88Smrg # work, assume that -exports_file does not work either and 634706c34b88Smrg # implicitly export all symbols. 634806c34b88Smrg # This should be the same for all languages, so no per-tag cache variable. 634906c34b88Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 635006c34b88Smrg [lt_cv_irix_exported_symbol], 635106c34b88Smrg [save_LDFLAGS="$LDFLAGS" 635206c34b88Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 635306c34b88Smrg AC_LINK_IFELSE( 635406c34b88Smrg [AC_LANG_SOURCE( 635506c34b88Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 635606c34b88Smrg [C++], [[int foo (void) { return 0; }]], 635706c34b88Smrg [Fortran 77], [[ 6358c27c18e8Smrg subroutine foo 635906c34b88Smrg end]], 636006c34b88Smrg [Fortran], [[ 6361c27c18e8Smrg subroutine foo 636206c34b88Smrg end]])])], 636306c34b88Smrg [lt_cv_irix_exported_symbol=yes], 636406c34b88Smrg [lt_cv_irix_exported_symbol=no]) 636506c34b88Smrg LDFLAGS="$save_LDFLAGS"]) 636606c34b88Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 636706c34b88Smrg _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' 636806c34b88Smrg fi 636906c34b88Smrg else 637006c34b88Smrg _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' 637106c34b88Smrg _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' 637206c34b88Smrg fi 637306c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 637406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 637506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 637606c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 637706c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 637806c34b88Smrg ;; 6379b789ec8aSmrg 638006c34b88Smrg netbsd*) 638106c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 638206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 638306c34b88Smrg else 638406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 638506c34b88Smrg fi 638606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 638706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 638806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 638906c34b88Smrg ;; 6390b789ec8aSmrg 639106c34b88Smrg newsos6) 639206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 639306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 639406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 639506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 639606c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 639706c34b88Smrg ;; 6398c43cc173Smrg 639906c34b88Smrg *nto* | *qnx*) 640006c34b88Smrg ;; 6401c43cc173Smrg 640206c34b88Smrg openbsd*) 640306c34b88Smrg if test -f /usr/libexec/ld.so; then 640406c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 640506c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 640606c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 640706c34b88Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 640806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 640906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 641006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 641106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 641206c34b88Smrg else 641306c34b88Smrg case $host_os in 641406c34b88Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 641506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 641606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 641706c34b88Smrg ;; 641806c34b88Smrg *) 641906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 642006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 642106c34b88Smrg ;; 642206c34b88Smrg esac 642306c34b88Smrg fi 642406c34b88Smrg else 642506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 642606c34b88Smrg fi 642706c34b88Smrg ;; 6428c43cc173Smrg 642906c34b88Smrg os2*) 643006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 643106c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 643206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 643306c34b88Smrg _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' 643406c34b88Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 643506c34b88Smrg ;; 6436c43cc173Smrg 643706c34b88Smrg osf3*) 643806c34b88Smrg if test "$GCC" = yes; then 643906c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 644006c34b88Smrg _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' 644106c34b88Smrg else 644206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 644306c34b88Smrg _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' 644406c34b88Smrg fi 644506c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 644606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 644706c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 644806c34b88Smrg ;; 6449c43cc173Smrg 645006c34b88Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 645106c34b88Smrg if test "$GCC" = yes; then 645206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 645306c34b88Smrg _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' 645406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 645506c34b88Smrg else 645606c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 645706c34b88Smrg _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' 645806c34b88Smrg _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~ 645906c34b88Smrg $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' 646006c34b88Smrg 646106c34b88Smrg # Both c and cxx compiler support -rpath directly 646206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 646306c34b88Smrg fi 646406c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 646506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 646606c34b88Smrg ;; 646706c34b88Smrg 646806c34b88Smrg solaris*) 646906c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 647006c34b88Smrg if test "$GCC" = yes; then 647106c34b88Smrg wlarc='${wl}' 647206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 647306c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 647406c34b88Smrg $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' 647506c34b88Smrg else 647606c34b88Smrg case `$CC -V 2>&1` in 647706c34b88Smrg *"Compilers 5.0"*) 647806c34b88Smrg wlarc='' 647906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 648006c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 648106c34b88Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 648206c34b88Smrg ;; 648306c34b88Smrg *) 648406c34b88Smrg wlarc='${wl}' 648506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 648606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 648706c34b88Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 648806c34b88Smrg ;; 648906c34b88Smrg esac 649006c34b88Smrg fi 649106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 649206c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 649306c34b88Smrg case $host_os in 649406c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 649506c34b88Smrg *) 649606c34b88Smrg # The compiler driver will combine and reorder linker options, 649706c34b88Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 649806c34b88Smrg # but is careful enough not to reorder. 649906c34b88Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 650006c34b88Smrg if test "$GCC" = yes; then 650106c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 650206c34b88Smrg else 650306c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 650406c34b88Smrg fi 650506c34b88Smrg ;; 650606c34b88Smrg esac 650706c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 650806c34b88Smrg ;; 6509c43cc173Smrg 651006c34b88Smrg sunos4*) 651106c34b88Smrg if test "x$host_vendor" = xsequent; then 651206c34b88Smrg # Use $CC to link under sequent, because it throws in some extra .o 651306c34b88Smrg # files that make .init and .fini sections work. 651406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 651506c34b88Smrg else 651606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 651706c34b88Smrg fi 651806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 651906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 652006c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 652106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 652206c34b88Smrg ;; 6523c43cc173Smrg 652406c34b88Smrg sysv4) 652506c34b88Smrg case $host_vendor in 652606c34b88Smrg sni) 652706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 652806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 652906c34b88Smrg ;; 653006c34b88Smrg siemens) 653106c34b88Smrg ## LD is ld it makes a PLAMLIB 653206c34b88Smrg ## CC just makes a GrossModule. 653306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 653406c34b88Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 653506c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 653606c34b88Smrg ;; 653706c34b88Smrg motorola) 653806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 653906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 654006c34b88Smrg ;; 654106c34b88Smrg esac 654206c34b88Smrg runpath_var='LD_RUN_PATH' 654306c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 654406c34b88Smrg ;; 6545c43cc173Smrg 654606c34b88Smrg sysv4.3*) 654706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 654806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 654906c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 655006c34b88Smrg ;; 6551c43cc173Smrg 655206c34b88Smrg sysv4*MP*) 655306c34b88Smrg if test -d /usr/nec; then 655406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 655506c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 655606c34b88Smrg runpath_var=LD_RUN_PATH 655706c34b88Smrg hardcode_runpath_var=yes 655806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 655906c34b88Smrg fi 656006c34b88Smrg ;; 6561c43cc173Smrg 656206c34b88Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 656306c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 656406c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 656506c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 656606c34b88Smrg runpath_var='LD_RUN_PATH' 6567c43cc173Smrg 656806c34b88Smrg if test "$GCC" = yes; then 656906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 657006c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 657106c34b88Smrg else 657206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 657306c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 657406c34b88Smrg fi 657506c34b88Smrg ;; 6576c43cc173Smrg 657706c34b88Smrg sysv5* | sco3.2v5* | sco5v6*) 657806c34b88Smrg # Note: We can NOT use -z defs as we might desire, because we do not 657906c34b88Smrg # link with -lc, and that would cause any symbols used from libc to 658006c34b88Smrg # always be unresolved, which means just about no library would 658106c34b88Smrg # ever link correctly. If we're not using GNU ld we use -z text 658206c34b88Smrg # though, which does catch some bad symbols but isn't as heavy-handed 658306c34b88Smrg # as -z defs. 658406c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 658506c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 658606c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 658706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 658806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 658906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 659006c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 659106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 659206c34b88Smrg runpath_var='LD_RUN_PATH' 6593c43cc173Smrg 659406c34b88Smrg if test "$GCC" = yes; then 659506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659706c34b88Smrg else 659806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 660006c34b88Smrg fi 6601c27c18e8Smrg ;; 6602c43cc173Smrg 660306c34b88Smrg uts4*) 660406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 660506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 660606c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 660706c34b88Smrg ;; 6608c27c18e8Smrg 660906c34b88Smrg *) 661006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6611c27c18e8Smrg ;; 6612c27c18e8Smrg esac 6613c43cc173Smrg 661406c34b88Smrg if test x$host_vendor = xsni; then 661506c34b88Smrg case $host in 661606c34b88Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 661706c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 661806c34b88Smrg ;; 661906c34b88Smrg esac 6620c27c18e8Smrg fi 662106c34b88Smrg fi 6622c27c18e8Smrg]) 662306c34b88SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 662406c34b88Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6625c43cc173Smrg 662606c34b88Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 662706c34b88Smrg 662806c34b88Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 662906c34b88Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 663006c34b88Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 663106c34b88Smrg [The commands to extract the exported symbol list from a shared archive]) 663206c34b88Smrg 663306c34b88Smrg# 663406c34b88Smrg# Do we need to explicitly link libc? 663506c34b88Smrg# 663606c34b88Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 663706c34b88Smrgx|xyes) 663806c34b88Smrg # Assume -lc should be added 663906c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 664006c34b88Smrg 664106c34b88Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 664206c34b88Smrg case $_LT_TAGVAR(archive_cmds, $1) in 664306c34b88Smrg *'~'*) 664406c34b88Smrg # FIXME: we may have to deal with multi-command sequences. 664506c34b88Smrg ;; 664606c34b88Smrg '$CC '*) 664706c34b88Smrg # Test whether the compiler implicitly links with -lc since on some 664806c34b88Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 664906c34b88Smrg # to ld, don't add -lc before -lgcc. 665006c34b88Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 665106c34b88Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 665206c34b88Smrg [$RM conftest* 665306c34b88Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 665406c34b88Smrg 665506c34b88Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 665606c34b88Smrg soname=conftest 665706c34b88Smrg lib=conftest 665806c34b88Smrg libobjs=conftest.$ac_objext 665906c34b88Smrg deplibs= 666006c34b88Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 666106c34b88Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 666206c34b88Smrg compiler_flags=-v 666306c34b88Smrg linker_flags=-v 666406c34b88Smrg verstring= 666506c34b88Smrg output_objdir=. 666606c34b88Smrg libname=conftest 666706c34b88Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 666806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 666906c34b88Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 667006c34b88Smrg then 667106c34b88Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 667206c34b88Smrg else 667306c34b88Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 667406c34b88Smrg fi 667506c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 667606c34b88Smrg else 667706c34b88Smrg cat conftest.err 1>&5 667806c34b88Smrg fi 667906c34b88Smrg $RM conftest* 668006c34b88Smrg ]) 668106c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 668206c34b88Smrg ;; 668306c34b88Smrg esac 668406c34b88Smrg fi 668506c34b88Smrg ;; 668606c34b88Smrgesac 6687c27c18e8Smrg 668806c34b88Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 668906c34b88Smrg [Whether or not to add -lc for building shared libraries]) 669006c34b88Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 669106c34b88Smrg [enable_shared_with_static_runtimes], [0], 669206c34b88Smrg [Whether or not to disallow shared libs when runtime libs are static]) 669306c34b88Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 669406c34b88Smrg [Compiler flag to allow reflexive dlopens]) 669506c34b88Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 669606c34b88Smrg [Compiler flag to generate shared objects directly from archives]) 669706c34b88Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 669806c34b88Smrg [Whether the compiler copes with passing no objects directly]) 669906c34b88Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 670006c34b88Smrg [Create an old-style archive from a shared archive]) 670106c34b88Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 670206c34b88Smrg [Create a temporary old-style archive to link instead of a shared archive]) 670306c34b88Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 670406c34b88Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 670506c34b88Smrg_LT_TAGDECL([], [module_cmds], [2], 670606c34b88Smrg [Commands used to build a loadable module if different from building 670706c34b88Smrg a shared archive.]) 670806c34b88Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 670906c34b88Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 671006c34b88Smrg [Whether we are building with GNU ld or not]) 671106c34b88Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 671206c34b88Smrg [Flag that allows shared libraries with undefined symbols to be built]) 671306c34b88Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 671406c34b88Smrg [Flag that enforces no undefined symbols]) 671506c34b88Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 671606c34b88Smrg [Flag to hardcode $libdir into a binary during linking. 671706c34b88Smrg This must work even if $libdir does not exist]) 671806c34b88Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 671906c34b88Smrg [Whether we need a single "-rpath" flag with a separated argument]) 672006c34b88Smrg_LT_TAGDECL([], [hardcode_direct], [0], 672106c34b88Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 672206c34b88Smrg DIR into the resulting binary]) 672306c34b88Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 672406c34b88Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 672506c34b88Smrg DIR into the resulting binary and the resulting library dependency is 672606c34b88Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 672706c34b88Smrg library is relocated]) 672806c34b88Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 672906c34b88Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 673006c34b88Smrg into the resulting binary]) 673106c34b88Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 673206c34b88Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 673306c34b88Smrg into the resulting binary]) 673406c34b88Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 673506c34b88Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 673606c34b88Smrg into the library and all subsequent libraries and executables linked 673706c34b88Smrg against it]) 673806c34b88Smrg_LT_TAGDECL([], [inherit_rpath], [0], 673906c34b88Smrg [Set to yes if linker adds runtime paths of dependent libraries 674006c34b88Smrg to runtime path list]) 674106c34b88Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 674206c34b88Smrg [Whether libtool must link a program against all its dependency libraries]) 674306c34b88Smrg_LT_TAGDECL([], [always_export_symbols], [0], 674406c34b88Smrg [Set to "yes" if exported symbols are required]) 674506c34b88Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 674606c34b88Smrg [The commands to list exported symbols]) 674706c34b88Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 674806c34b88Smrg [Symbols that should not be listed in the preloaded symbols]) 674906c34b88Smrg_LT_TAGDECL([], [include_expsyms], [1], 675006c34b88Smrg [Symbols that must always be exported]) 675106c34b88Smrg_LT_TAGDECL([], [prelink_cmds], [2], 675206c34b88Smrg [Commands necessary for linking programs (against libraries) with templates]) 675306c34b88Smrg_LT_TAGDECL([], [postlink_cmds], [2], 675406c34b88Smrg [Commands necessary for finishing linking programs]) 675506c34b88Smrg_LT_TAGDECL([], [file_list_spec], [1], 675606c34b88Smrg [Specify filename containing input files]) 675706c34b88Smrgdnl FIXME: Not yet implemented 675806c34b88Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 675906c34b88Smrgdnl [Compiler flag to generate thread safe objects]) 676006c34b88Smrg])# _LT_LINKER_SHLIBS 6761c27c18e8Smrg 6762c43cc173Smrg 676306c34b88Smrg# _LT_LANG_C_CONFIG([TAG]) 676406c34b88Smrg# ------------------------ 676506c34b88Smrg# Ensure that the configuration variables for a C compiler are suitably 676606c34b88Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 676706c34b88Smrg# the compiler configuration to `libtool'. 676806c34b88Smrgm4_defun([_LT_LANG_C_CONFIG], 676906c34b88Smrg[m4_require([_LT_DECL_EGREP])dnl 677006c34b88Smrglt_save_CC="$CC" 677106c34b88SmrgAC_LANG_PUSH(C) 6772c43cc173Smrg 677306c34b88Smrg# Source file extension for C test sources. 677406c34b88Smrgac_ext=c 6775c43cc173Smrg 677606c34b88Smrg# Object file extension for compiled C test sources. 6777c27c18e8Smrgobjext=o 6778c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 6779c27c18e8Smrg 678006c34b88Smrg# Code to be used in simple compile tests 678106c34b88Smrglt_simple_compile_test_code="int some_variable = 0;" 6782c43cc173Smrg 678306c34b88Smrg# Code to be used in simple link tests 678406c34b88Smrglt_simple_link_test_code='int main(){return(0);}' 6785c43cc173Smrg 678606c34b88Smrg_LT_TAG_COMPILER 678706c34b88Smrg# Save the default compiler, since it gets overwritten when the other 678806c34b88Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 678906c34b88Smrgcompiler_DEFAULT=$CC 6790c27c18e8Smrg 679106c34b88Smrg# save warnings/boilerplate of simple test code 679206c34b88Smrg_LT_COMPILER_BOILERPLATE 679306c34b88Smrg_LT_LINKER_BOILERPLATE 6794c27c18e8Smrg 679506c34b88Smrgif test -n "$compiler"; then 679606c34b88Smrg _LT_COMPILER_NO_RTTI($1) 679706c34b88Smrg _LT_COMPILER_PIC($1) 679806c34b88Smrg _LT_COMPILER_C_O($1) 679906c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 680006c34b88Smrg _LT_LINKER_SHLIBS($1) 680106c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 680206c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 680306c34b88Smrg LT_SYS_DLOPEN_SELF 680406c34b88Smrg _LT_CMD_STRIPLIB 6805c27c18e8Smrg 680606c34b88Smrg # Report which library types will actually be built 680706c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 680806c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 6809c27c18e8Smrg 681006c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 681106c34b88Smrg test "$can_build_shared" = "no" && enable_shared=no 6812c27c18e8Smrg 681306c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 681406c34b88Smrg # are all built from PIC. 681506c34b88Smrg case $host_os in 681606c34b88Smrg aix3*) 681706c34b88Smrg test "$enable_shared" = yes && enable_static=no 681806c34b88Smrg if test -n "$RANLIB"; then 681906c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 682006c34b88Smrg postinstall_cmds='$RANLIB $lib' 682106c34b88Smrg fi 682206c34b88Smrg ;; 6823c43cc173Smrg 682406c34b88Smrg aix[[4-9]]*) 682506c34b88Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 682606c34b88Smrg test "$enable_shared" = yes && enable_static=no 682706c34b88Smrg fi 682806c34b88Smrg ;; 682906c34b88Smrg esac 683006c34b88Smrg AC_MSG_RESULT([$enable_shared]) 6831c43cc173Smrg 683206c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 683306c34b88Smrg # Make sure either enable_shared or enable_static is yes. 683406c34b88Smrg test "$enable_shared" = yes || enable_static=yes 683506c34b88Smrg AC_MSG_RESULT([$enable_static]) 6836c43cc173Smrg 683706c34b88Smrg _LT_CONFIG($1) 683806c34b88Smrgfi 683906c34b88SmrgAC_LANG_POP 684006c34b88SmrgCC="$lt_save_CC" 684106c34b88Smrg])# _LT_LANG_C_CONFIG 684237eb1ca1Smrg 684306c34b88Smrg 684406c34b88Smrg# _LT_LANG_CXX_CONFIG([TAG]) 684506c34b88Smrg# -------------------------- 684606c34b88Smrg# Ensure that the configuration variables for a C++ compiler are suitably 684706c34b88Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 684806c34b88Smrg# the compiler configuration to `libtool'. 684906c34b88Smrgm4_defun([_LT_LANG_CXX_CONFIG], 685006c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 685106c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 685206c34b88Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 685306c34b88Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 685406c34b88Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 685506c34b88Smrg (test "X$CXX" != "Xg++"))) ; then 685606c34b88Smrg AC_PROG_CXXCPP 685706c34b88Smrgelse 685806c34b88Smrg _lt_caught_CXX_error=yes 685937eb1ca1Smrgfi 6860c27c18e8Smrg 686106c34b88SmrgAC_LANG_PUSH(C++) 6862c27c18e8Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6863c27c18e8Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6864c27c18e8Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6865c27c18e8Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 686606c34b88Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6867c27c18e8Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6868c27c18e8Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6869c27c18e8Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6870c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6871c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6872c27c18e8Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 687306c34b88Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6874c27c18e8Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6875c27c18e8Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6876c27c18e8Smrg_LT_TAGVAR(module_cmds, $1)= 6877c27c18e8Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6878c27c18e8Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6879c27c18e8Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 688037eb1ca1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 688137eb1ca1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6882c27c18e8Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6883c27c18e8Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6884c27c18e8Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6885c27c18e8Smrg 688606c34b88Smrg# Source file extension for C++ test sources. 688706c34b88Smrgac_ext=cpp 6888c27c18e8Smrg 688906c34b88Smrg# Object file extension for compiled C++ test sources. 6890c27c18e8Smrgobjext=o 6891c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 6892c27c18e8Smrg 6893c27c18e8Smrg# No sense in running all these tests if we already determined that 689406c34b88Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6895c27c18e8Smrg# are currently assumed to apply to all compilers on this platform, 6896c27c18e8Smrg# and will be corrupted by setting them based on a non-working compiler. 689706c34b88Smrgif test "$_lt_caught_CXX_error" != yes; then 6898c27c18e8Smrg # Code to be used in simple compile tests 689906c34b88Smrg lt_simple_compile_test_code="int some_variable = 0;" 6900c43cc173Smrg 6901c27c18e8Smrg # Code to be used in simple link tests 690206c34b88Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6903c43cc173Smrg 6904c27c18e8Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6905c27c18e8Smrg _LT_TAG_COMPILER 6906c43cc173Smrg 6907c27c18e8Smrg # save warnings/boilerplate of simple test code 6908c27c18e8Smrg _LT_COMPILER_BOILERPLATE 6909c27c18e8Smrg _LT_LINKER_BOILERPLATE 6910c43cc173Smrg 6911c27c18e8Smrg # Allow CC to be a program name with arguments. 691206c34b88Smrg lt_save_CC=$CC 6913b789ec8aSmrg lt_save_CFLAGS=$CFLAGS 691406c34b88Smrg lt_save_LD=$LD 691506c34b88Smrg lt_save_GCC=$GCC 691606c34b88Smrg GCC=$GXX 691706c34b88Smrg lt_save_with_gnu_ld=$with_gnu_ld 691806c34b88Smrg lt_save_path_LD=$lt_cv_path_LD 691906c34b88Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 692006c34b88Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 692106c34b88Smrg else 692206c34b88Smrg $as_unset lt_cv_prog_gnu_ld 692306c34b88Smrg fi 692406c34b88Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 692506c34b88Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 692606c34b88Smrg else 692706c34b88Smrg $as_unset lt_cv_path_LD 692806c34b88Smrg fi 692906c34b88Smrg test -z "${LDCXX+set}" || LD=$LDCXX 693006c34b88Smrg CC=${CXX-"c++"} 693106c34b88Smrg CFLAGS=$CXXFLAGS 6932c27c18e8Smrg compiler=$CC 6933c27c18e8Smrg _LT_TAGVAR(compiler, $1)=$CC 6934c27c18e8Smrg _LT_CC_BASENAME([$compiler]) 6935c27c18e8Smrg 6936c27c18e8Smrg if test -n "$compiler"; then 693706c34b88Smrg # We don't want -fno-exception when compiling C++ code, so set the 693806c34b88Smrg # no_builtin_flag separately 693906c34b88Smrg if test "$GXX" = yes; then 694006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 694106c34b88Smrg else 694206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 694306c34b88Smrg fi 6944c27c18e8Smrg 694506c34b88Smrg if test "$GXX" = yes; then 694606c34b88Smrg # Set up default GNU C++ configuration 6947c27c18e8Smrg 694806c34b88Smrg LT_PATH_LD 694906c34b88Smrg 695006c34b88Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 695106c34b88Smrg # archiving commands below assume that GNU ld is being used. 695206c34b88Smrg if test "$with_gnu_ld" = yes; then 695306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 695406c34b88Smrg _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' 695506c34b88Smrg 695606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 695706c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 695806c34b88Smrg 695906c34b88Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 696006c34b88Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 696106c34b88Smrg # investigate it a little bit more. (MM) 696206c34b88Smrg wlarc='${wl}' 696306c34b88Smrg 696406c34b88Smrg # ancient GNU ld didn't support --whole-archive et. al. 696506c34b88Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 696606c34b88Smrg $GREP 'no-whole-archive' > /dev/null; then 696706c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 696806c34b88Smrg else 696906c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 697006c34b88Smrg fi 697106c34b88Smrg else 697206c34b88Smrg with_gnu_ld=no 697306c34b88Smrg wlarc= 697406c34b88Smrg 697506c34b88Smrg # A generic and very simple default shared library creation 697606c34b88Smrg # command for GNU C++ for the case where it uses the native 697706c34b88Smrg # linker, instead of GNU ld. If possible, this setting should 697806c34b88Smrg # overridden to take advantage of the native linker features on 697906c34b88Smrg # the platform it is being used on. 698006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 698106c34b88Smrg fi 698206c34b88Smrg 698306c34b88Smrg # Commands to make compiler produce verbose output that lists 698406c34b88Smrg # what "hidden" libraries, object files and flags are used when 698506c34b88Smrg # linking a shared library. 698606c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 698706c34b88Smrg 698806c34b88Smrg else 698906c34b88Smrg GXX=no 699006c34b88Smrg with_gnu_ld=no 699106c34b88Smrg wlarc= 699206c34b88Smrg fi 699306c34b88Smrg 699406c34b88Smrg # PORTME: fill in a description of your system's C++ link characteristics 699506c34b88Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 699606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6997c43cc173Smrg case $host_os in 6998c27c18e8Smrg aix3*) 699906c34b88Smrg # FIXME: insert proper C++ library support 700006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7001c27c18e8Smrg ;; 700221e67964Smrg aix[[4-9]]*) 700306c34b88Smrg if test "$host_cpu" = ia64; then 700406c34b88Smrg # On IA64, the linker does run time linking by default, so we don't 700506c34b88Smrg # have to do anything special. 700606c34b88Smrg aix_use_runtimelinking=no 700706c34b88Smrg exp_sym_flag='-Bexport' 700806c34b88Smrg no_entry_flag="" 700906c34b88Smrg else 701006c34b88Smrg aix_use_runtimelinking=no 7011c27c18e8Smrg 701206c34b88Smrg # Test if we are trying to use run time linking or normal 701306c34b88Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 701406c34b88Smrg # need to do runtime linking. 701506c34b88Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 701606c34b88Smrg for ld_flag in $LDFLAGS; do 701706c34b88Smrg case $ld_flag in 701806c34b88Smrg *-brtl*) 701906c34b88Smrg aix_use_runtimelinking=yes 702006c34b88Smrg break 702106c34b88Smrg ;; 702206c34b88Smrg esac 702306c34b88Smrg done 702406c34b88Smrg ;; 702506c34b88Smrg esac 7026c27c18e8Smrg 702706c34b88Smrg exp_sym_flag='-bexport' 702806c34b88Smrg no_entry_flag='-bnoentry' 702906c34b88Smrg fi 7030c27c18e8Smrg 703106c34b88Smrg # When large executables or shared objects are built, AIX ld can 703206c34b88Smrg # have problems creating the table of contents. If linking a library 703306c34b88Smrg # or program results in "error TOC overflow" add -mminimal-toc to 703406c34b88Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 703506c34b88Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7036c27c18e8Smrg 703706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='' 703806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 703906c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 704006c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 704106c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 704206c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7043c27c18e8Smrg 704406c34b88Smrg if test "$GXX" = yes; then 704506c34b88Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 704606c34b88Smrg # We only want to do this on AIX 4.2 and lower, the check 704706c34b88Smrg # below for broken collect2 doesn't work under 4.3+ 704806c34b88Smrg collect2name=`${CC} -print-prog-name=collect2` 704906c34b88Smrg if test -f "$collect2name" && 705006c34b88Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 705106c34b88Smrg then 705206c34b88Smrg # We have reworked collect2 705306c34b88Smrg : 705406c34b88Smrg else 705506c34b88Smrg # We have old collect2 705606c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 705706c34b88Smrg # It fails to find uninstalled libraries when the uninstalled 705806c34b88Smrg # path is not listed in the libpath. Setting hardcode_minus_L 705906c34b88Smrg # to unsupported forces relinking 706006c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 706106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 706206c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 706306c34b88Smrg fi 706406c34b88Smrg esac 706506c34b88Smrg shared_flag='-shared' 706606c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 706706c34b88Smrg shared_flag="$shared_flag "'${wl}-G' 706806c34b88Smrg fi 706906c34b88Smrg else 707006c34b88Smrg # not using gcc 707106c34b88Smrg if test "$host_cpu" = ia64; then 707206c34b88Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 707306c34b88Smrg # chokes on -Wl,-G. The following line is correct: 707406c34b88Smrg shared_flag='-G' 707506c34b88Smrg else 707606c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 707706c34b88Smrg shared_flag='${wl}-G' 707806c34b88Smrg else 707906c34b88Smrg shared_flag='${wl}-bM:SRE' 708006c34b88Smrg fi 708106c34b88Smrg fi 708206c34b88Smrg fi 708321e67964Smrg 708406c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 708506c34b88Smrg # It seems that -bexpall does not export symbols beginning with 708606c34b88Smrg # underscore (_), so it is better to generate a list of symbols to 708706c34b88Smrg # export. 708806c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 708906c34b88Smrg if test "$aix_use_runtimelinking" = yes; then 709006c34b88Smrg # Warning - without using the other runtime loading flags (-brtl), 709106c34b88Smrg # -berok will link without error, but may produce a broken library. 709206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 709306c34b88Smrg # Determine the default libpath from the value encoded in an empty 709406c34b88Smrg # executable. 709506c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 709606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 709721e67964Smrg 709806c34b88Smrg _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" 709906c34b88Smrg else 710006c34b88Smrg if test "$host_cpu" = ia64; then 710106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 710206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 710306c34b88Smrg _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" 710406c34b88Smrg else 710506c34b88Smrg # Determine the default libpath from the value encoded in an 710606c34b88Smrg # empty executable. 710706c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 710806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 710906c34b88Smrg # Warning - without using the other run time loading flags, 711006c34b88Smrg # -berok will link without error, but may produce a broken library. 711106c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 711206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 711306c34b88Smrg if test "$with_gnu_ld" = yes; then 711406c34b88Smrg # We only use this code for GNU lds that support --whole-archive. 711506c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 711606c34b88Smrg else 711706c34b88Smrg # Exported symbols can be pulled into shared objects from archives 711806c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 711906c34b88Smrg fi 712006c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 712106c34b88Smrg # This is similar to how AIX traditionally builds its shared 712206c34b88Smrg # libraries. 712306c34b88Smrg _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' 712406c34b88Smrg fi 712506c34b88Smrg fi 712606c34b88Smrg ;; 712721e67964Smrg 712806c34b88Smrg beos*) 712906c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 713006c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 713106c34b88Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 713206c34b88Smrg # support --undefined. This deserves some investigation. FIXME 713306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 713406c34b88Smrg else 713506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 713606c34b88Smrg fi 713706c34b88Smrg ;; 713821e67964Smrg 713906c34b88Smrg chorus*) 714006c34b88Smrg case $cc_basename in 714106c34b88Smrg *) 714206c34b88Smrg # FIXME: insert proper C++ library support 714306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 714406c34b88Smrg ;; 714506c34b88Smrg esac 714606c34b88Smrg ;; 7147c27c18e8Smrg 714806c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 714906c34b88Smrg case $GXX,$cc_basename in 715006c34b88Smrg ,cl* | no,cl*) 715106c34b88Smrg # Native MSVC 715206c34b88Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 715306c34b88Smrg # no search path for DLLs. 715406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 715506c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 715606c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 715706c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='@' 715806c34b88Smrg # Tell ltmain to make .lib files, not .a files. 715906c34b88Smrg libext=lib 716006c34b88Smrg # Tell ltmain to make .dll files, not .so files. 716106c34b88Smrg shrext_cmds=".dll" 716206c34b88Smrg # FIXME: Setting linknames here is a bad hack. 716306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 716406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 716506c34b88Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 716606c34b88Smrg else 716706c34b88Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 716806c34b88Smrg fi~ 716906c34b88Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 717006c34b88Smrg linknames=' 717106c34b88Smrg # The linker will not automatically build a static lib if we build a DLL. 717206c34b88Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 717306c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 717406c34b88Smrg # Don't use ranlib 717506c34b88Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 717606c34b88Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 717706c34b88Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 717806c34b88Smrg case $lt_outputfile in 717906c34b88Smrg *.exe|*.EXE) ;; 718006c34b88Smrg *) 718106c34b88Smrg lt_outputfile="$lt_outputfile.exe" 718206c34b88Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 718306c34b88Smrg ;; 718406c34b88Smrg esac~ 718506c34b88Smrg func_to_tool_file "$lt_outputfile"~ 718606c34b88Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 718706c34b88Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 718806c34b88Smrg $RM "$lt_outputfile.manifest"; 718906c34b88Smrg fi' 719006c34b88Smrg ;; 719106c34b88Smrg *) 719206c34b88Smrg # g++ 719306c34b88Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 719406c34b88Smrg # as there is no search path for DLLs. 719506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 719606c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 719706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 719806c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 719906c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7200c27c18e8Smrg 720106c34b88Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 720206c34b88Smrg _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' 720306c34b88Smrg # If the export-symbols file already is a .def file (1st line 720406c34b88Smrg # is EXPORTS), use it as is; otherwise, prepend... 720506c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 720606c34b88Smrg cp $export_symbols $output_objdir/$soname.def; 720706c34b88Smrg else 720806c34b88Smrg echo EXPORTS > $output_objdir/$soname.def; 720906c34b88Smrg cat $export_symbols >> $output_objdir/$soname.def; 721006c34b88Smrg fi~ 721106c34b88Smrg $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' 721206c34b88Smrg else 721306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 721406c34b88Smrg fi 721506c34b88Smrg ;; 721606c34b88Smrg esac 721706c34b88Smrg ;; 721806c34b88Smrg darwin* | rhapsody*) 721906c34b88Smrg _LT_DARWIN_LINKER_FEATURES($1) 722006c34b88Smrg ;; 7221c27c18e8Smrg 722206c34b88Smrg dgux*) 722306c34b88Smrg case $cc_basename in 722406c34b88Smrg ec++*) 722506c34b88Smrg # FIXME: insert proper C++ library support 722606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 722706c34b88Smrg ;; 722806c34b88Smrg ghcx*) 722906c34b88Smrg # Green Hills C++ Compiler 723006c34b88Smrg # FIXME: insert proper C++ library support 723106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723206c34b88Smrg ;; 723306c34b88Smrg *) 723406c34b88Smrg # FIXME: insert proper C++ library support 723506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723606c34b88Smrg ;; 723706c34b88Smrg esac 723806c34b88Smrg ;; 7239c27c18e8Smrg 724006c34b88Smrg freebsd2.*) 724106c34b88Smrg # C++ shared libraries reported to be fairly broken before 724206c34b88Smrg # switch to ELF 724306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 724406c34b88Smrg ;; 7245c27c18e8Smrg 724606c34b88Smrg freebsd-elf*) 724706c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 724806c34b88Smrg ;; 7249c27c18e8Smrg 725006c34b88Smrg freebsd* | dragonfly*) 725106c34b88Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 725206c34b88Smrg # conventions 725306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 725406c34b88Smrg ;; 7255c27c18e8Smrg 725606c34b88Smrg gnu*) 725706c34b88Smrg ;; 7258c27c18e8Smrg 725906c34b88Smrg haiku*) 726006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 726106c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 726206c34b88Smrg ;; 7263c27c18e8Smrg 726406c34b88Smrg hpux9*) 726506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 726606c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 726706c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 726806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 726906c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 727006c34b88Smrg # but as the default 727106c34b88Smrg # location of the library. 7272c27c18e8Smrg 727306c34b88Smrg case $cc_basename in 727406c34b88Smrg CC*) 727506c34b88Smrg # FIXME: insert proper C++ library support 727606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 727706c34b88Smrg ;; 727806c34b88Smrg aCC*) 727906c34b88Smrg _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' 728006c34b88Smrg # Commands to make compiler produce verbose output that lists 728106c34b88Smrg # what "hidden" libraries, object files and flags are used when 728206c34b88Smrg # linking a shared library. 728306c34b88Smrg # 728406c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 728506c34b88Smrg # explicitly linking system object files so we need to strip them 728606c34b88Smrg # from the output so that they don't get included in the library 728706c34b88Smrg # dependencies. 728806c34b88Smrg 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"' 728906c34b88Smrg ;; 729006c34b88Smrg *) 729106c34b88Smrg if test "$GXX" = yes; then 729206c34b88Smrg _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' 729306c34b88Smrg else 729406c34b88Smrg # FIXME: insert proper C++ library support 729506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 729606c34b88Smrg fi 729706c34b88Smrg ;; 729806c34b88Smrg esac 729906c34b88Smrg ;; 7300c27c18e8Smrg 730106c34b88Smrg hpux10*|hpux11*) 730206c34b88Smrg if test $with_gnu_ld = no; then 730306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 730406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7305c27c18e8Smrg 730606c34b88Smrg case $host_cpu in 730706c34b88Smrg hppa*64*|ia64*) 730806c34b88Smrg ;; 730906c34b88Smrg *) 731006c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 731106c34b88Smrg ;; 731206c34b88Smrg esac 731306c34b88Smrg fi 731406c34b88Smrg case $host_cpu in 731506c34b88Smrg hppa*64*|ia64*) 731606c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 731706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 731806c34b88Smrg ;; 731906c34b88Smrg *) 732006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 732106c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 732206c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 732306c34b88Smrg # but as the default 732406c34b88Smrg # location of the library. 732506c34b88Smrg ;; 732606c34b88Smrg esac 7327c27c18e8Smrg 732806c34b88Smrg case $cc_basename in 732906c34b88Smrg CC*) 733006c34b88Smrg # FIXME: insert proper C++ library support 733106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 733206c34b88Smrg ;; 733306c34b88Smrg aCC*) 733406c34b88Smrg case $host_cpu in 733506c34b88Smrg hppa*64*) 733606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 733706c34b88Smrg ;; 733806c34b88Smrg ia64*) 733906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 734006c34b88Smrg ;; 734106c34b88Smrg *) 734206c34b88Smrg _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' 734306c34b88Smrg ;; 734406c34b88Smrg esac 734506c34b88Smrg # Commands to make compiler produce verbose output that lists 734606c34b88Smrg # what "hidden" libraries, object files and flags are used when 734706c34b88Smrg # linking a shared library. 734806c34b88Smrg # 734906c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 735006c34b88Smrg # explicitly linking system object files so we need to strip them 735106c34b88Smrg # from the output so that they don't get included in the library 735206c34b88Smrg # dependencies. 735306c34b88Smrg 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"' 735406c34b88Smrg ;; 735506c34b88Smrg *) 735606c34b88Smrg if test "$GXX" = yes; then 735706c34b88Smrg if test $with_gnu_ld = no; then 735806c34b88Smrg case $host_cpu in 735906c34b88Smrg hppa*64*) 736006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 736106c34b88Smrg ;; 736206c34b88Smrg ia64*) 736306c34b88Smrg _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' 736406c34b88Smrg ;; 736506c34b88Smrg *) 736606c34b88Smrg _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' 736706c34b88Smrg ;; 736806c34b88Smrg esac 736906c34b88Smrg fi 737006c34b88Smrg else 737106c34b88Smrg # FIXME: insert proper C++ library support 737206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 737306c34b88Smrg fi 737406c34b88Smrg ;; 737506c34b88Smrg esac 737606c34b88Smrg ;; 7377c27c18e8Smrg 737806c34b88Smrg interix[[3-9]]*) 737906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 738006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 738106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 738206c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 738306c34b88Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 738406c34b88Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 738506c34b88Smrg # default) and relocated if they conflict, which is a slow very memory 738606c34b88Smrg # consuming and fragmenting process. To avoid this, we pick a random, 738706c34b88Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 738806c34b88Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 738906c34b88Smrg _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' 739006c34b88Smrg _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' 739106c34b88Smrg ;; 739206c34b88Smrg irix5* | irix6*) 739306c34b88Smrg case $cc_basename in 739406c34b88Smrg CC*) 739506c34b88Smrg # SGI C++ 739606c34b88Smrg _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' 7397f1ee322dSmrg 739806c34b88Smrg # Archives containing C++ object files must be created using 739906c34b88Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 740006c34b88Smrg # necessary to make sure instantiated templates are included 740106c34b88Smrg # in the archive. 740206c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 740306c34b88Smrg ;; 740406c34b88Smrg *) 740506c34b88Smrg if test "$GXX" = yes; then 740606c34b88Smrg if test "$with_gnu_ld" = no; then 740706c34b88Smrg _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' 740806c34b88Smrg else 740906c34b88Smrg _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' 741006c34b88Smrg fi 741106c34b88Smrg fi 741206c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 741306c34b88Smrg ;; 741406c34b88Smrg esac 741506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 741606c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 741706c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 741806c34b88Smrg ;; 7419f1ee322dSmrg 742006c34b88Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 742106c34b88Smrg case $cc_basename in 742206c34b88Smrg KCC*) 742306c34b88Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7424f1ee322dSmrg 742506c34b88Smrg # KCC will only create a shared library if the output file 742606c34b88Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 742706c34b88Smrg # to its proper name (with version) after linking. 742806c34b88Smrg _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' 742906c34b88Smrg _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' 743006c34b88Smrg # Commands to make compiler produce verbose output that lists 743106c34b88Smrg # what "hidden" libraries, object files and flags are used when 743206c34b88Smrg # linking a shared library. 743306c34b88Smrg # 743406c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 743506c34b88Smrg # explicitly linking system object files so we need to strip them 743606c34b88Smrg # from the output so that they don't get included in the library 743706c34b88Smrg # dependencies. 743806c34b88Smrg 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"' 7439f1ee322dSmrg 744006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 744106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7442f1ee322dSmrg 744306c34b88Smrg # Archives containing C++ object files must be created using 744406c34b88Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 744506c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 744606c34b88Smrg ;; 744706c34b88Smrg icpc* | ecpc* ) 744806c34b88Smrg # Intel C++ 744906c34b88Smrg with_gnu_ld=yes 745006c34b88Smrg # version 8.0 and above of icpc choke on multiply defined symbols 745106c34b88Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 745206c34b88Smrg # earlier do not add the objects themselves. 745306c34b88Smrg case `$CC -V 2>&1` in 745406c34b88Smrg *"Version 7."*) 745506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 745606c34b88Smrg _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' 745706c34b88Smrg ;; 745806c34b88Smrg *) # Version 8.0 or newer 745906c34b88Smrg tmp_idyn= 746006c34b88Smrg case $host_cpu in 746106c34b88Smrg ia64*) tmp_idyn=' -i_dynamic';; 746206c34b88Smrg esac 746306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 746406c34b88Smrg _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' 746506c34b88Smrg ;; 746606c34b88Smrg esac 746706c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 746806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 746906c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 747006c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 747106c34b88Smrg ;; 747206c34b88Smrg pgCC* | pgcpp*) 747306c34b88Smrg # Portland Group C++ compiler 747406c34b88Smrg case `$CC -V` in 747506c34b88Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 747606c34b88Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 747706c34b88Smrg rm -rf $tpldir~ 747806c34b88Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 747906c34b88Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 748006c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 748106c34b88Smrg rm -rf $tpldir~ 748206c34b88Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 748306c34b88Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 748406c34b88Smrg $RANLIB $oldlib' 748506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 748606c34b88Smrg rm -rf $tpldir~ 748706c34b88Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 748806c34b88Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 748906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 749006c34b88Smrg rm -rf $tpldir~ 749106c34b88Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 749206c34b88Smrg $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' 749306c34b88Smrg ;; 749406c34b88Smrg *) # Version 6 and above use weak symbols 749506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 749606c34b88Smrg _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' 749706c34b88Smrg ;; 749806c34b88Smrg esac 7499f1ee322dSmrg 750006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 750106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 750206c34b88Smrg _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' 750306c34b88Smrg ;; 750406c34b88Smrg cxx*) 750506c34b88Smrg # Compaq C++ 750606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 750706c34b88Smrg _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' 7508f1ee322dSmrg 750906c34b88Smrg runpath_var=LD_RUN_PATH 751006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 751106c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7512f1ee322dSmrg 751306c34b88Smrg # Commands to make compiler produce verbose output that lists 751406c34b88Smrg # what "hidden" libraries, object files and flags are used when 751506c34b88Smrg # linking a shared library. 751606c34b88Smrg # 751706c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 751806c34b88Smrg # explicitly linking system object files so we need to strip them 751906c34b88Smrg # from the output so that they don't get included in the library 752006c34b88Smrg # dependencies. 752106c34b88Smrg 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' 752206c34b88Smrg ;; 752306c34b88Smrg xl* | mpixl* | bgxl*) 752406c34b88Smrg # IBM XL 8.0 on PPC, with GNU ld 752506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 752606c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 752706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 752806c34b88Smrg if test "x$supports_anon_versioning" = xyes; then 752906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 753006c34b88Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 753106c34b88Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 753206c34b88Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 753306c34b88Smrg fi 753406c34b88Smrg ;; 753506c34b88Smrg *) 753606c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 753706c34b88Smrg *Sun\ C*) 753806c34b88Smrg # Sun C++ 5.9 753906c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 754006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 754106c34b88Smrg _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' 754206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 754306c34b88Smrg _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' 754406c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7545f1ee322dSmrg 754606c34b88Smrg # Not sure whether something based on 754706c34b88Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 754806c34b88Smrg # would be better. 754906c34b88Smrg output_verbose_link_cmd='func_echo_all' 7550f1ee322dSmrg 755106c34b88Smrg # Archives containing C++ object files must be created using 755206c34b88Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 755306c34b88Smrg # necessary to make sure instantiated templates are included 755406c34b88Smrg # in the archive. 755506c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 755606c34b88Smrg ;; 755706c34b88Smrg esac 755806c34b88Smrg ;; 755906c34b88Smrg esac 756006c34b88Smrg ;; 7561f1ee322dSmrg 756206c34b88Smrg lynxos*) 756306c34b88Smrg # FIXME: insert proper C++ library support 756406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 756506c34b88Smrg ;; 7566f1ee322dSmrg 756706c34b88Smrg m88k*) 756806c34b88Smrg # FIXME: insert proper C++ library support 756906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 757006c34b88Smrg ;; 7571f1ee322dSmrg 757206c34b88Smrg mvs*) 757306c34b88Smrg case $cc_basename in 757406c34b88Smrg cxx*) 757506c34b88Smrg # FIXME: insert proper C++ library support 757606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 757706c34b88Smrg ;; 757806c34b88Smrg *) 757906c34b88Smrg # FIXME: insert proper C++ library support 758006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 758106c34b88Smrg ;; 758206c34b88Smrg esac 758306c34b88Smrg ;; 7584f1ee322dSmrg 758506c34b88Smrg netbsd*) 758606c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 758706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 758806c34b88Smrg wlarc= 758906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 759006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 759106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 759206c34b88Smrg fi 759306c34b88Smrg # Workaround some broken pre-1.5 toolchains 759406c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 759506c34b88Smrg ;; 7596f1ee322dSmrg 759706c34b88Smrg *nto* | *qnx*) 759806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 759906c34b88Smrg ;; 7600c27c18e8Smrg 760106c34b88Smrg openbsd2*) 760206c34b88Smrg # C++ shared libraries are fairly broken 760306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 760406c34b88Smrg ;; 760521e67964Smrg 760606c34b88Smrg openbsd*) 760706c34b88Smrg if test -f /usr/libexec/ld.so; then 760806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 760906c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 761006c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 761106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 761206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 761306c34b88Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 761406c34b88Smrg _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' 761506c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 761606c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 761706c34b88Smrg fi 761806c34b88Smrg output_verbose_link_cmd=func_echo_all 761906c34b88Smrg else 762006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 762106c34b88Smrg fi 762206c34b88Smrg ;; 762321e67964Smrg 762406c34b88Smrg osf3* | osf4* | osf5*) 762506c34b88Smrg case $cc_basename in 762606c34b88Smrg KCC*) 762706c34b88Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 762821e67964Smrg 762906c34b88Smrg # KCC will only create a shared library if the output file 763006c34b88Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 763106c34b88Smrg # to its proper name (with version) after linking. 763206c34b88Smrg _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' 763321e67964Smrg 763406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 763506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 763621e67964Smrg 763706c34b88Smrg # Archives containing C++ object files must be created using 763806c34b88Smrg # the KAI C++ compiler. 763906c34b88Smrg case $host in 764006c34b88Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 764106c34b88Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 764206c34b88Smrg esac 764306c34b88Smrg ;; 764406c34b88Smrg RCC*) 764506c34b88Smrg # Rational C++ 2.4.1 764606c34b88Smrg # FIXME: insert proper C++ library support 764706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 764806c34b88Smrg ;; 764906c34b88Smrg cxx*) 765006c34b88Smrg case $host in 765106c34b88Smrg osf3*) 765206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 765306c34b88Smrg _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' 765406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 765506c34b88Smrg ;; 765606c34b88Smrg *) 765706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 765806c34b88Smrg _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' 765906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 766006c34b88Smrg echo "-hidden">> $lib.exp~ 766106c34b88Smrg $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~ 766206c34b88Smrg $RM $lib.exp' 766306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 766406c34b88Smrg ;; 766506c34b88Smrg esac 766621e67964Smrg 766706c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 766821e67964Smrg 766906c34b88Smrg # Commands to make compiler produce verbose output that lists 767006c34b88Smrg # what "hidden" libraries, object files and flags are used when 767106c34b88Smrg # linking a shared library. 767206c34b88Smrg # 767306c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 767406c34b88Smrg # explicitly linking system object files so we need to strip them 767506c34b88Smrg # from the output so that they don't get included in the library 767606c34b88Smrg # dependencies. 767706c34b88Smrg 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"' 767806c34b88Smrg ;; 767906c34b88Smrg *) 768006c34b88Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 768106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 768206c34b88Smrg case $host in 768306c34b88Smrg osf3*) 768406c34b88Smrg _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' 768506c34b88Smrg ;; 768606c34b88Smrg *) 768706c34b88Smrg _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' 768806c34b88Smrg ;; 768906c34b88Smrg esac 769021e67964Smrg 769106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 769206c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 769321e67964Smrg 769406c34b88Smrg # Commands to make compiler produce verbose output that lists 769506c34b88Smrg # what "hidden" libraries, object files and flags are used when 769606c34b88Smrg # linking a shared library. 769706c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 769821e67964Smrg 769906c34b88Smrg else 770006c34b88Smrg # FIXME: insert proper C++ library support 770106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 770206c34b88Smrg fi 770306c34b88Smrg ;; 770406c34b88Smrg esac 770506c34b88Smrg ;; 770621e67964Smrg 770706c34b88Smrg psos*) 770806c34b88Smrg # FIXME: insert proper C++ library support 770906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 771006c34b88Smrg ;; 771121e67964Smrg 771206c34b88Smrg sunos4*) 771306c34b88Smrg case $cc_basename in 771406c34b88Smrg CC*) 771506c34b88Smrg # Sun C++ 4.x 771606c34b88Smrg # FIXME: insert proper C++ library support 771706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 771806c34b88Smrg ;; 771906c34b88Smrg lcc*) 772006c34b88Smrg # Lucid 772106c34b88Smrg # FIXME: insert proper C++ library support 772206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 772306c34b88Smrg ;; 772406c34b88Smrg *) 772506c34b88Smrg # FIXME: insert proper C++ library support 772606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 772706c34b88Smrg ;; 772806c34b88Smrg esac 772906c34b88Smrg ;; 773021e67964Smrg 773106c34b88Smrg solaris*) 773206c34b88Smrg case $cc_basename in 773306c34b88Smrg CC* | sunCC*) 773406c34b88Smrg # Sun C++ 4.2, 5.x and Centerline C++ 773506c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 773606c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 773706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 773806c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 773906c34b88Smrg $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' 7740f1ee322dSmrg 774106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 774206c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 774306c34b88Smrg case $host_os in 774406c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 774506c34b88Smrg *) 774606c34b88Smrg # The compiler driver will combine and reorder linker options, 774706c34b88Smrg # but understands `-z linker_flag'. 774806c34b88Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 774906c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 775006c34b88Smrg ;; 775106c34b88Smrg esac 775206c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7753f1ee322dSmrg 775406c34b88Smrg output_verbose_link_cmd='func_echo_all' 775521e67964Smrg 775606c34b88Smrg # Archives containing C++ object files must be created using 775706c34b88Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 775806c34b88Smrg # necessary to make sure instantiated templates are included 775906c34b88Smrg # in the archive. 776006c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 776106c34b88Smrg ;; 776206c34b88Smrg gcx*) 776306c34b88Smrg # Green Hills C++ Compiler 776406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 776521e67964Smrg 776606c34b88Smrg # The C++ compiler must be used to create the archive. 776706c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 776806c34b88Smrg ;; 776906c34b88Smrg *) 777006c34b88Smrg # GNU C++ compiler with Solaris linker 777106c34b88Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 777206c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 777306c34b88Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 777406c34b88Smrg _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' 777506c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 777606c34b88Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 777721e67964Smrg 777806c34b88Smrg # Commands to make compiler produce verbose output that lists 777906c34b88Smrg # what "hidden" libraries, object files and flags are used when 778006c34b88Smrg # linking a shared library. 778106c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 778206c34b88Smrg else 778306c34b88Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 778406c34b88Smrg # platform. 778506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 778606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 778706c34b88Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 778821e67964Smrg 778906c34b88Smrg # Commands to make compiler produce verbose output that lists 779006c34b88Smrg # what "hidden" libraries, object files and flags are used when 779106c34b88Smrg # linking a shared library. 779206c34b88Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 779306c34b88Smrg fi 779421e67964Smrg 779506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 779606c34b88Smrg case $host_os in 779706c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 779806c34b88Smrg *) 779906c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 780006c34b88Smrg ;; 780106c34b88Smrg esac 780206c34b88Smrg fi 780306c34b88Smrg ;; 780406c34b88Smrg esac 780506c34b88Smrg ;; 780621e67964Smrg 780706c34b88Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 780806c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 780906c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 781006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 781106c34b88Smrg runpath_var='LD_RUN_PATH' 781221e67964Smrg 781306c34b88Smrg case $cc_basename in 781406c34b88Smrg CC*) 781506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781706c34b88Smrg ;; 781806c34b88Smrg *) 781906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 782006c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 782106c34b88Smrg ;; 782206c34b88Smrg esac 782306c34b88Smrg ;; 782421e67964Smrg 782506c34b88Smrg sysv5* | sco3.2v5* | sco5v6*) 782606c34b88Smrg # Note: We can NOT use -z defs as we might desire, because we do not 782706c34b88Smrg # link with -lc, and that would cause any symbols used from libc to 782806c34b88Smrg # always be unresolved, which means just about no library would 782906c34b88Smrg # ever link correctly. If we're not using GNU ld we use -z text 783006c34b88Smrg # though, which does catch some bad symbols but isn't as heavy-handed 783106c34b88Smrg # as -z defs. 783206c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 783306c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 783406c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 783506c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 783606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 783706c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 783806c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 783906c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 784006c34b88Smrg runpath_var='LD_RUN_PATH' 7841c27c18e8Smrg 784206c34b88Smrg case $cc_basename in 784306c34b88Smrg CC*) 784406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 784506c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 784606c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 784706c34b88Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 784806c34b88Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 784906c34b88Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 785006c34b88Smrg ;; 785106c34b88Smrg *) 785206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 785306c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 785406c34b88Smrg ;; 785506c34b88Smrg esac 785606c34b88Smrg ;; 785721e67964Smrg 785806c34b88Smrg tandem*) 785906c34b88Smrg case $cc_basename in 786006c34b88Smrg NCC*) 786106c34b88Smrg # NonStop-UX NCC 3.20 786206c34b88Smrg # FIXME: insert proper C++ library support 786306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 786406c34b88Smrg ;; 786506c34b88Smrg *) 786606c34b88Smrg # FIXME: insert proper C++ library support 786706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 786806c34b88Smrg ;; 786906c34b88Smrg esac 787006c34b88Smrg ;; 7871c27c18e8Smrg 787206c34b88Smrg vxworks*) 787306c34b88Smrg # FIXME: insert proper C++ library support 787406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 787506c34b88Smrg ;; 7876c27c18e8Smrg 787706c34b88Smrg *) 787806c34b88Smrg # FIXME: insert proper C++ library support 787906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 788006c34b88Smrg ;; 788106c34b88Smrg esac 7882c27c18e8Smrg 788306c34b88Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 788406c34b88Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7885c27c18e8Smrg 788606c34b88Smrg _LT_TAGVAR(GCC, $1)="$GXX" 788706c34b88Smrg _LT_TAGVAR(LD, $1)="$LD" 7888c27c18e8Smrg 788906c34b88Smrg ## CAVEAT EMPTOR: 789006c34b88Smrg ## There is no encapsulation within the following macros, do not change 789106c34b88Smrg ## the running order or otherwise move them around unless you know exactly 789206c34b88Smrg ## what you are doing... 789306c34b88Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 789406c34b88Smrg _LT_COMPILER_PIC($1) 789506c34b88Smrg _LT_COMPILER_C_O($1) 789606c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 789706c34b88Smrg _LT_LINKER_SHLIBS($1) 789806c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 789906c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 790021e67964Smrg 790106c34b88Smrg _LT_CONFIG($1) 790206c34b88Smrg fi # test -n "$compiler" 790321e67964Smrg 790406c34b88Smrg CC=$lt_save_CC 790506c34b88Smrg CFLAGS=$lt_save_CFLAGS 790606c34b88Smrg LDCXX=$LD 790706c34b88Smrg LD=$lt_save_LD 790806c34b88Smrg GCC=$lt_save_GCC 790906c34b88Smrg with_gnu_ld=$lt_save_with_gnu_ld 791006c34b88Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 791106c34b88Smrg lt_cv_path_LD=$lt_save_path_LD 791206c34b88Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 791306c34b88Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 791406c34b88Smrgfi # test "$_lt_caught_CXX_error" != yes 791521e67964Smrg 791606c34b88SmrgAC_LANG_POP 791706c34b88Smrg])# _LT_LANG_CXX_CONFIG 7918c27c18e8Smrg 7919b789ec8aSmrg 792006c34b88Smrg# _LT_FUNC_STRIPNAME_CNF 792106c34b88Smrg# ---------------------- 792206c34b88Smrg# func_stripname_cnf prefix suffix name 792306c34b88Smrg# strip PREFIX and SUFFIX off of NAME. 792406c34b88Smrg# PREFIX and SUFFIX must not contain globbing or regex special 792506c34b88Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 792606c34b88Smrg# dot (in which case that matches only a dot). 792706c34b88Smrg# 792806c34b88Smrg# This function is identical to the (non-XSI) version of func_stripname, 792906c34b88Smrg# except this one can be used by m4 code that may be executed by configure, 793006c34b88Smrg# rather than the libtool script. 793106c34b88Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 793206c34b88SmrgAC_REQUIRE([_LT_DECL_SED]) 793306c34b88SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 793406c34b88Smrgfunc_stripname_cnf () 793506c34b88Smrg{ 793606c34b88Smrg case ${2} in 793706c34b88Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 793806c34b88Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 793906c34b88Smrg esac 794006c34b88Smrg} # func_stripname_cnf 794106c34b88Smrg])# _LT_FUNC_STRIPNAME_CNF 7942b789ec8aSmrg 794306c34b88Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 794406c34b88Smrg# --------------------------------- 794506c34b88Smrg# Figure out "hidden" library dependencies from verbose 794606c34b88Smrg# compiler output when linking a shared library. 794706c34b88Smrg# Parse the compiler output and extract the necessary 794806c34b88Smrg# objects, libraries and library flags. 794906c34b88Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 795006c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 795106c34b88SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 795206c34b88Smrg# Dependencies to place before and after the object being linked: 795306c34b88Smrg_LT_TAGVAR(predep_objects, $1)= 795406c34b88Smrg_LT_TAGVAR(postdep_objects, $1)= 795506c34b88Smrg_LT_TAGVAR(predeps, $1)= 795606c34b88Smrg_LT_TAGVAR(postdeps, $1)= 795706c34b88Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7958c27c18e8Smrg 795906c34b88Smrgdnl we can't use the lt_simple_compile_test_code here, 796006c34b88Smrgdnl because it contains code intended for an executable, 796106c34b88Smrgdnl not a library. It's possible we should let each 796206c34b88Smrgdnl tag define a new lt_????_link_test_code variable, 796306c34b88Smrgdnl but it's only used here... 796406c34b88Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 796506c34b88Smrgint a; 796606c34b88Smrgvoid foo (void) { a = 0; } 796706c34b88Smrg_LT_EOF 796806c34b88Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 796906c34b88Smrgclass Foo 797006c34b88Smrg{ 797106c34b88Smrgpublic: 797206c34b88Smrg Foo (void) { a = 0; } 797306c34b88Smrgprivate: 797406c34b88Smrg int a; 797506c34b88Smrg}; 797606c34b88Smrg_LT_EOF 797706c34b88Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 797806c34b88Smrg subroutine foo 797906c34b88Smrg implicit none 798006c34b88Smrg integer*4 a 798106c34b88Smrg a=0 798206c34b88Smrg return 798306c34b88Smrg end 798406c34b88Smrg_LT_EOF 798506c34b88Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 798606c34b88Smrg subroutine foo 798706c34b88Smrg implicit none 798806c34b88Smrg integer a 798906c34b88Smrg a=0 799006c34b88Smrg return 799106c34b88Smrg end 799206c34b88Smrg_LT_EOF 799306c34b88Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 799406c34b88Smrgpublic class foo { 799506c34b88Smrg private int a; 799606c34b88Smrg public void bar (void) { 799706c34b88Smrg a = 0; 799806c34b88Smrg } 799906c34b88Smrg}; 800006c34b88Smrg_LT_EOF 800106c34b88Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 800206c34b88Smrgpackage foo 800306c34b88Smrgfunc foo() { 800406c34b88Smrg} 800506c34b88Smrg_LT_EOF 800606c34b88Smrg]) 8007c27c18e8Smrg 800806c34b88Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 800906c34b88Smrgcase "$CC $CFLAGS " in #( 801006c34b88Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 801106c34b88Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 801206c34b88Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 801306c34b88Smrgesac 8014c27c18e8Smrg 801506c34b88Smrgdnl Parse the compiler output and extract the necessary 801606c34b88Smrgdnl objects, libraries and library flags. 801706c34b88Smrgif AC_TRY_EVAL(ac_compile); then 801806c34b88Smrg # Parse the compiler output and extract the necessary 801906c34b88Smrg # objects, libraries and library flags. 8020c27c18e8Smrg 802106c34b88Smrg # Sentinel used to keep track of whether or not we are before 802206c34b88Smrg # the conftest object file. 802306c34b88Smrg pre_test_object_deps_done=no 8024c27c18e8Smrg 802506c34b88Smrg for p in `eval "$output_verbose_link_cmd"`; do 802606c34b88Smrg case ${prev}${p} in 802706c34b88Smrg 802806c34b88Smrg -L* | -R* | -l*) 802906c34b88Smrg # Some compilers place space between "-{L,R}" and the path. 803006c34b88Smrg # Remove the space. 803106c34b88Smrg if test $p = "-L" || 803206c34b88Smrg test $p = "-R"; then 803306c34b88Smrg prev=$p 803406c34b88Smrg continue 803506c34b88Smrg fi 803606c34b88Smrg 803706c34b88Smrg # Expand the sysroot to ease extracting the directories later. 803806c34b88Smrg if test -z "$prev"; then 803906c34b88Smrg case $p in 804006c34b88Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 804106c34b88Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 804206c34b88Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 804306c34b88Smrg esac 804406c34b88Smrg fi 804506c34b88Smrg case $p in 804606c34b88Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 804706c34b88Smrg esac 804806c34b88Smrg if test "$pre_test_object_deps_done" = no; then 804906c34b88Smrg case ${prev} in 805006c34b88Smrg -L | -R) 805106c34b88Smrg # Internal compiler library paths should come after those 805206c34b88Smrg # provided the user. The postdeps already come after the 805306c34b88Smrg # user supplied libs so there is no need to process them. 805406c34b88Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 805506c34b88Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 805606c34b88Smrg else 805706c34b88Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 805806c34b88Smrg fi 805906c34b88Smrg ;; 806006c34b88Smrg # The "-l" case would never come before the object being 806106c34b88Smrg # linked, so don't bother handling this case. 806206c34b88Smrg esac 806306c34b88Smrg else 806406c34b88Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 806506c34b88Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 806606c34b88Smrg else 806706c34b88Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 806806c34b88Smrg fi 806906c34b88Smrg fi 807006c34b88Smrg prev= 807106c34b88Smrg ;; 8072c27c18e8Smrg 807306c34b88Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 807406c34b88Smrg *.$objext) 807506c34b88Smrg # This assumes that the test object file only shows up 807606c34b88Smrg # once in the compiler output. 807706c34b88Smrg if test "$p" = "conftest.$objext"; then 807806c34b88Smrg pre_test_object_deps_done=yes 807906c34b88Smrg continue 808006c34b88Smrg fi 8081c27c18e8Smrg 808206c34b88Smrg if test "$pre_test_object_deps_done" = no; then 808306c34b88Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 808406c34b88Smrg _LT_TAGVAR(predep_objects, $1)="$p" 808506c34b88Smrg else 808606c34b88Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 808706c34b88Smrg fi 808806c34b88Smrg else 808906c34b88Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 809006c34b88Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 809106c34b88Smrg else 809206c34b88Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 809306c34b88Smrg fi 809406c34b88Smrg fi 809506c34b88Smrg ;; 8096c27c18e8Smrg 809706c34b88Smrg *) ;; # Ignore the rest. 8098c27c18e8Smrg 809906c34b88Smrg esac 810006c34b88Smrg done 8101c27c18e8Smrg 810206c34b88Smrg # Clean up. 810306c34b88Smrg rm -f a.out a.exe 8104b789ec8aSmrgelse 810506c34b88Smrg echo "libtool.m4: error: problem compiling $1 test program" 8106b789ec8aSmrgfi 8107c27c18e8Smrg 810806c34b88Smrg$RM -f confest.$objext 810906c34b88SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 811021e67964Smrg 811106c34b88Smrg# PORTME: override above test on systems where it is broken 811206c34b88Smrgm4_if([$1], [CXX], 811306c34b88Smrg[case $host_os in 811406c34b88Smrginterix[[3-9]]*) 811506c34b88Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 811606c34b88Smrg # hack all around it, let's just trust "g++" to DTRT. 811706c34b88Smrg _LT_TAGVAR(predep_objects,$1)= 811806c34b88Smrg _LT_TAGVAR(postdep_objects,$1)= 811906c34b88Smrg _LT_TAGVAR(postdeps,$1)= 812006c34b88Smrg ;; 812106c34b88Smrg 812206c34b88Smrglinux*) 812306c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 812406c34b88Smrg *Sun\ C*) 812506c34b88Smrg # Sun C++ 5.9 812606c34b88Smrg 812706c34b88Smrg # The more standards-conforming stlport4 library is 812806c34b88Smrg # incompatible with the Cstd library. Avoid specifying 812906c34b88Smrg # it if it's in CXXFLAGS. Ignore libCrun as 813006c34b88Smrg # -library=stlport4 depends on it. 813106c34b88Smrg case " $CXX $CXXFLAGS " in 813206c34b88Smrg *" -library=stlport4 "*) 813306c34b88Smrg solaris_use_stlport4=yes 813406c34b88Smrg ;; 8135b789ec8aSmrg esac 813606c34b88Smrg 813706c34b88Smrg if test "$solaris_use_stlport4" != yes; then 813806c34b88Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 813906c34b88Smrg fi 8140b789ec8aSmrg ;; 814106c34b88Smrg esac 814206c34b88Smrg ;; 8143b789ec8aSmrg 814406c34b88Smrgsolaris*) 814506c34b88Smrg case $cc_basename in 814606c34b88Smrg CC* | sunCC*) 814706c34b88Smrg # The more standards-conforming stlport4 library is 814806c34b88Smrg # incompatible with the Cstd library. Avoid specifying 814906c34b88Smrg # it if it's in CXXFLAGS. Ignore libCrun as 815006c34b88Smrg # -library=stlport4 depends on it. 815106c34b88Smrg case " $CXX $CXXFLAGS " in 815206c34b88Smrg *" -library=stlport4 "*) 815306c34b88Smrg solaris_use_stlport4=yes 815406c34b88Smrg ;; 8155b789ec8aSmrg esac 815606c34b88Smrg 815706c34b88Smrg # Adding this requires a known-good setup of shared libraries for 815806c34b88Smrg # Sun compiler versions before 5.6, else PIC objects from an old 815906c34b88Smrg # archive will be linked into the output, leading to subtle bugs. 816006c34b88Smrg if test "$solaris_use_stlport4" != yes; then 816106c34b88Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 816206c34b88Smrg fi 8163b789ec8aSmrg ;; 816406c34b88Smrg esac 816506c34b88Smrg ;; 8166b789ec8aSmrgesac 8167b789ec8aSmrg]) 816821e67964Smrg 816906c34b88Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 817006c34b88Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 817106c34b88Smrgesac 817206c34b88Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 817306c34b88Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 817406c34b88Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 817506c34b88Smrgfi 817606c34b88Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 817706c34b88Smrg [The directories searched by this compiler when creating a shared library]) 817806c34b88Smrg_LT_TAGDECL([], [predep_objects], [1], 817906c34b88Smrg [Dependencies to place before and after the objects being linked to 818006c34b88Smrg create a shared library]) 818106c34b88Smrg_LT_TAGDECL([], [postdep_objects], [1]) 818206c34b88Smrg_LT_TAGDECL([], [predeps], [1]) 818306c34b88Smrg_LT_TAGDECL([], [postdeps], [1]) 818406c34b88Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 818506c34b88Smrg [The library search path used internally by the compiler when linking 818606c34b88Smrg a shared library]) 818706c34b88Smrg])# _LT_SYS_HIDDEN_LIBDEPS 818821e67964Smrg 818921e67964Smrg 819006c34b88Smrg# _LT_LANG_F77_CONFIG([TAG]) 819106c34b88Smrg# -------------------------- 819206c34b88Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 819306c34b88Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 819406c34b88Smrg# to write the compiler configuration to `libtool'. 819506c34b88Smrgm4_defun([_LT_LANG_F77_CONFIG], 819606c34b88Smrg[AC_LANG_PUSH(Fortran 77) 819706c34b88Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 819806c34b88Smrg _lt_disable_F77=yes 819906c34b88Smrgfi 820021e67964Smrg 820106c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 820206c34b88Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 820306c34b88Smrg_LT_TAGVAR(always_export_symbols, $1)=no 820406c34b88Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 820506c34b88Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 820606c34b88Smrg_LT_TAGVAR(hardcode_direct, $1)=no 820706c34b88Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 820806c34b88Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 820906c34b88Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 821006c34b88Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 821106c34b88Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 821206c34b88Smrg_LT_TAGVAR(inherit_rpath, $1)=no 821306c34b88Smrg_LT_TAGVAR(module_cmds, $1)= 821406c34b88Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 821506c34b88Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 821606c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 821706c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 821806c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 821906c34b88Smrg_LT_TAGVAR(no_undefined_flag, $1)= 822006c34b88Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 822106c34b88Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 822221e67964Smrg 822306c34b88Smrg# Source file extension for f77 test sources. 822406c34b88Smrgac_ext=f 822521e67964Smrg 822606c34b88Smrg# Object file extension for compiled f77 test sources. 822706c34b88Smrgobjext=o 822806c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 822921e67964Smrg 823006c34b88Smrg# No sense in running all these tests if we already determined that 823106c34b88Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 823206c34b88Smrg# are currently assumed to apply to all compilers on this platform, 823306c34b88Smrg# and will be corrupted by setting them based on a non-working compiler. 823406c34b88Smrgif test "$_lt_disable_F77" != yes; then 823506c34b88Smrg # Code to be used in simple compile tests 823606c34b88Smrg lt_simple_compile_test_code="\ 823706c34b88Smrg subroutine t 823806c34b88Smrg return 823906c34b88Smrg end 824006c34b88Smrg" 824121e67964Smrg 824206c34b88Smrg # Code to be used in simple link tests 824306c34b88Smrg lt_simple_link_test_code="\ 824406c34b88Smrg program t 824506c34b88Smrg end 824606c34b88Smrg" 8247c27c18e8Smrg 824806c34b88Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 824906c34b88Smrg _LT_TAG_COMPILER 8250c27c18e8Smrg 825106c34b88Smrg # save warnings/boilerplate of simple test code 825206c34b88Smrg _LT_COMPILER_BOILERPLATE 825306c34b88Smrg _LT_LINKER_BOILERPLATE 825421e67964Smrg 825506c34b88Smrg # Allow CC to be a program name with arguments. 825606c34b88Smrg lt_save_CC="$CC" 825706c34b88Smrg lt_save_GCC=$GCC 825806c34b88Smrg lt_save_CFLAGS=$CFLAGS 825906c34b88Smrg CC=${F77-"f77"} 826006c34b88Smrg CFLAGS=$FFLAGS 826106c34b88Smrg compiler=$CC 826206c34b88Smrg _LT_TAGVAR(compiler, $1)=$CC 826306c34b88Smrg _LT_CC_BASENAME([$compiler]) 826406c34b88Smrg GCC=$G77 826506c34b88Smrg if test -n "$compiler"; then 826606c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 826706c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 826821e67964Smrg 826906c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 827006c34b88Smrg test "$can_build_shared" = "no" && enable_shared=no 8271c27c18e8Smrg 827206c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 827306c34b88Smrg # are all built from PIC. 827406c34b88Smrg case $host_os in 827506c34b88Smrg aix3*) 827606c34b88Smrg test "$enable_shared" = yes && enable_static=no 827706c34b88Smrg if test -n "$RANLIB"; then 827806c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 827906c34b88Smrg postinstall_cmds='$RANLIB $lib' 828006c34b88Smrg fi 828106c34b88Smrg ;; 828206c34b88Smrg aix[[4-9]]*) 828306c34b88Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 828406c34b88Smrg test "$enable_shared" = yes && enable_static=no 828506c34b88Smrg fi 828606c34b88Smrg ;; 828706c34b88Smrg esac 828806c34b88Smrg AC_MSG_RESULT([$enable_shared]) 828921e67964Smrg 829006c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 829106c34b88Smrg # Make sure either enable_shared or enable_static is yes. 829206c34b88Smrg test "$enable_shared" = yes || enable_static=yes 829306c34b88Smrg AC_MSG_RESULT([$enable_static]) 829421e67964Smrg 829506c34b88Smrg _LT_TAGVAR(GCC, $1)="$G77" 829606c34b88Smrg _LT_TAGVAR(LD, $1)="$LD" 829721e67964Smrg 829806c34b88Smrg ## CAVEAT EMPTOR: 829906c34b88Smrg ## There is no encapsulation within the following macros, do not change 830006c34b88Smrg ## the running order or otherwise move them around unless you know exactly 830106c34b88Smrg ## what you are doing... 830206c34b88Smrg _LT_COMPILER_PIC($1) 830306c34b88Smrg _LT_COMPILER_C_O($1) 830406c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 830506c34b88Smrg _LT_LINKER_SHLIBS($1) 830606c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 830706c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8308c27c18e8Smrg 830906c34b88Smrg _LT_CONFIG($1) 831006c34b88Smrg fi # test -n "$compiler" 8311c27c18e8Smrg 831206c34b88Smrg GCC=$lt_save_GCC 831306c34b88Smrg CC="$lt_save_CC" 831406c34b88Smrg CFLAGS="$lt_save_CFLAGS" 831506c34b88Smrgfi # test "$_lt_disable_F77" != yes 8316c27c18e8Smrg 831706c34b88SmrgAC_LANG_POP 831806c34b88Smrg])# _LT_LANG_F77_CONFIG 831921e67964Smrg 832021e67964Smrg 832106c34b88Smrg# _LT_LANG_FC_CONFIG([TAG]) 832206c34b88Smrg# ------------------------- 832306c34b88Smrg# Ensure that the configuration variables for a Fortran compiler are 832406c34b88Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 832506c34b88Smrg# to write the compiler configuration to `libtool'. 832606c34b88Smrgm4_defun([_LT_LANG_FC_CONFIG], 832706c34b88Smrg[AC_LANG_PUSH(Fortran) 832821e67964Smrg 832906c34b88Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 833006c34b88Smrg _lt_disable_FC=yes 833106c34b88Smrgfi 833221e67964Smrg 833306c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 833406c34b88Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 833506c34b88Smrg_LT_TAGVAR(always_export_symbols, $1)=no 833606c34b88Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 833706c34b88Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 833806c34b88Smrg_LT_TAGVAR(hardcode_direct, $1)=no 833906c34b88Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 834006c34b88Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 834106c34b88Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 834206c34b88Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 834306c34b88Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 834406c34b88Smrg_LT_TAGVAR(inherit_rpath, $1)=no 834506c34b88Smrg_LT_TAGVAR(module_cmds, $1)= 834606c34b88Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 834706c34b88Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 834806c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 834906c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 835006c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 835106c34b88Smrg_LT_TAGVAR(no_undefined_flag, $1)= 835206c34b88Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 835306c34b88Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 835421e67964Smrg 835506c34b88Smrg# Source file extension for fc test sources. 835606c34b88Smrgac_ext=${ac_fc_srcext-f} 835721e67964Smrg 835806c34b88Smrg# Object file extension for compiled fc test sources. 835906c34b88Smrgobjext=o 836006c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 836121e67964Smrg 836206c34b88Smrg# No sense in running all these tests if we already determined that 836306c34b88Smrg# the FC compiler isn't working. Some variables (like enable_shared) 836406c34b88Smrg# are currently assumed to apply to all compilers on this platform, 836506c34b88Smrg# and will be corrupted by setting them based on a non-working compiler. 836606c34b88Smrgif test "$_lt_disable_FC" != yes; then 836706c34b88Smrg # Code to be used in simple compile tests 836806c34b88Smrg lt_simple_compile_test_code="\ 836906c34b88Smrg subroutine t 837006c34b88Smrg return 837106c34b88Smrg end 837206c34b88Smrg" 837321e67964Smrg 837406c34b88Smrg # Code to be used in simple link tests 837506c34b88Smrg lt_simple_link_test_code="\ 837606c34b88Smrg program t 837706c34b88Smrg end 837806c34b88Smrg" 837921e67964Smrg 838006c34b88Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 838106c34b88Smrg _LT_TAG_COMPILER 838221e67964Smrg 838306c34b88Smrg # save warnings/boilerplate of simple test code 838406c34b88Smrg _LT_COMPILER_BOILERPLATE 838506c34b88Smrg _LT_LINKER_BOILERPLATE 838621e67964Smrg 838706c34b88Smrg # Allow CC to be a program name with arguments. 838806c34b88Smrg lt_save_CC="$CC" 838906c34b88Smrg lt_save_GCC=$GCC 839006c34b88Smrg lt_save_CFLAGS=$CFLAGS 839106c34b88Smrg CC=${FC-"f95"} 839206c34b88Smrg CFLAGS=$FCFLAGS 839306c34b88Smrg compiler=$CC 839406c34b88Smrg GCC=$ac_cv_fc_compiler_gnu 839521e67964Smrg 839606c34b88Smrg _LT_TAGVAR(compiler, $1)=$CC 839706c34b88Smrg _LT_CC_BASENAME([$compiler]) 8398c27c18e8Smrg 839906c34b88Smrg if test -n "$compiler"; then 840006c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 840106c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 840206c34b88Smrg 840306c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 840406c34b88Smrg test "$can_build_shared" = "no" && enable_shared=no 840506c34b88Smrg 840606c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 840706c34b88Smrg # are all built from PIC. 840806c34b88Smrg case $host_os in 840906c34b88Smrg aix3*) 841006c34b88Smrg test "$enable_shared" = yes && enable_static=no 841106c34b88Smrg if test -n "$RANLIB"; then 841206c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 841306c34b88Smrg postinstall_cmds='$RANLIB $lib' 841406c34b88Smrg fi 841506c34b88Smrg ;; 841606c34b88Smrg aix[[4-9]]*) 841706c34b88Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 841806c34b88Smrg test "$enable_shared" = yes && enable_static=no 8419c27c18e8Smrg fi 842006c34b88Smrg ;; 842106c34b88Smrg esac 842206c34b88Smrg AC_MSG_RESULT([$enable_shared]) 842321e67964Smrg 842406c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 842506c34b88Smrg # Make sure either enable_shared or enable_static is yes. 842606c34b88Smrg test "$enable_shared" = yes || enable_static=yes 842706c34b88Smrg AC_MSG_RESULT([$enable_static]) 842821e67964Smrg 842906c34b88Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 843006c34b88Smrg _LT_TAGVAR(LD, $1)="$LD" 843121e67964Smrg 843206c34b88Smrg ## CAVEAT EMPTOR: 843306c34b88Smrg ## There is no encapsulation within the following macros, do not change 843406c34b88Smrg ## the running order or otherwise move them around unless you know exactly 843506c34b88Smrg ## what you are doing... 843606c34b88Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 843706c34b88Smrg _LT_COMPILER_PIC($1) 843806c34b88Smrg _LT_COMPILER_C_O($1) 843906c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 844006c34b88Smrg _LT_LINKER_SHLIBS($1) 844106c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 844206c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8443c27c18e8Smrg 844406c34b88Smrg _LT_CONFIG($1) 844506c34b88Smrg fi # test -n "$compiler" 844621e67964Smrg 844706c34b88Smrg GCC=$lt_save_GCC 844806c34b88Smrg CC=$lt_save_CC 844906c34b88Smrg CFLAGS=$lt_save_CFLAGS 845006c34b88Smrgfi # test "$_lt_disable_FC" != yes 845121e67964Smrg 845206c34b88SmrgAC_LANG_POP 845306c34b88Smrg])# _LT_LANG_FC_CONFIG 845421e67964Smrg 845521e67964Smrg 845606c34b88Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 845706c34b88Smrg# -------------------------- 845806c34b88Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 845906c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 846006c34b88Smrg# to write the compiler configuration to `libtool'. 846106c34b88Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 846206c34b88Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 846306c34b88SmrgAC_LANG_SAVE 846421e67964Smrg 846506c34b88Smrg# Source file extension for Java test sources. 846606c34b88Smrgac_ext=java 846721e67964Smrg 846806c34b88Smrg# Object file extension for compiled Java test sources. 846906c34b88Smrgobjext=o 847006c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 847121e67964Smrg 847206c34b88Smrg# Code to be used in simple compile tests 847306c34b88Smrglt_simple_compile_test_code="class foo {}" 847421e67964Smrg 847506c34b88Smrg# Code to be used in simple link tests 847606c34b88Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 847721e67964Smrg 847806c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 847906c34b88Smrg_LT_TAG_COMPILER 848021e67964Smrg 848106c34b88Smrg# save warnings/boilerplate of simple test code 848206c34b88Smrg_LT_COMPILER_BOILERPLATE 848306c34b88Smrg_LT_LINKER_BOILERPLATE 848421e67964Smrg 848506c34b88Smrg# Allow CC to be a program name with arguments. 848606c34b88Smrglt_save_CC=$CC 848706c34b88Smrglt_save_CFLAGS=$CFLAGS 848806c34b88Smrglt_save_GCC=$GCC 848906c34b88SmrgGCC=yes 849006c34b88SmrgCC=${GCJ-"gcj"} 849106c34b88SmrgCFLAGS=$GCJFLAGS 849206c34b88Smrgcompiler=$CC 849306c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 849406c34b88Smrg_LT_TAGVAR(LD, $1)="$LD" 849506c34b88Smrg_LT_CC_BASENAME([$compiler]) 849621e67964Smrg 849706c34b88Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 849806c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 849921e67964Smrg 850006c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 850106c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 850206c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 850321e67964Smrg 850406c34b88Smrgif test -n "$compiler"; then 850506c34b88Smrg _LT_COMPILER_NO_RTTI($1) 850606c34b88Smrg _LT_COMPILER_PIC($1) 850706c34b88Smrg _LT_COMPILER_C_O($1) 850806c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 850906c34b88Smrg _LT_LINKER_SHLIBS($1) 851006c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 851121e67964Smrg 851206c34b88Smrg _LT_CONFIG($1) 851306c34b88Smrgfi 851421e67964Smrg 851506c34b88SmrgAC_LANG_RESTORE 851621e67964Smrg 851706c34b88SmrgGCC=$lt_save_GCC 851806c34b88SmrgCC=$lt_save_CC 851906c34b88SmrgCFLAGS=$lt_save_CFLAGS 852006c34b88Smrg])# _LT_LANG_GCJ_CONFIG 852121e67964Smrg 852221e67964Smrg 852306c34b88Smrg# _LT_LANG_GO_CONFIG([TAG]) 852406c34b88Smrg# -------------------------- 852506c34b88Smrg# Ensure that the configuration variables for the GNU Go compiler 852606c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 852706c34b88Smrg# to write the compiler configuration to `libtool'. 852806c34b88Smrgm4_defun([_LT_LANG_GO_CONFIG], 852906c34b88Smrg[AC_REQUIRE([LT_PROG_GO])dnl 853006c34b88SmrgAC_LANG_SAVE 853106c34b88Smrg 853206c34b88Smrg# Source file extension for Go test sources. 853306c34b88Smrgac_ext=go 853421e67964Smrg 853506c34b88Smrg# Object file extension for compiled Go test sources. 853606c34b88Smrgobjext=o 853706c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 853821e67964Smrg 853906c34b88Smrg# Code to be used in simple compile tests 854006c34b88Smrglt_simple_compile_test_code="package main; func main() { }" 854121e67964Smrg 854206c34b88Smrg# Code to be used in simple link tests 854306c34b88Smrglt_simple_link_test_code='package main; func main() { }' 854421e67964Smrg 854506c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 854606c34b88Smrg_LT_TAG_COMPILER 854721e67964Smrg 854806c34b88Smrg# save warnings/boilerplate of simple test code 854906c34b88Smrg_LT_COMPILER_BOILERPLATE 855006c34b88Smrg_LT_LINKER_BOILERPLATE 8551c27c18e8Smrg 855206c34b88Smrg# Allow CC to be a program name with arguments. 855306c34b88Smrglt_save_CC=$CC 855406c34b88Smrglt_save_CFLAGS=$CFLAGS 855506c34b88Smrglt_save_GCC=$GCC 855606c34b88SmrgGCC=yes 855706c34b88SmrgCC=${GOC-"gccgo"} 855806c34b88SmrgCFLAGS=$GOFLAGS 855906c34b88Smrgcompiler=$CC 856006c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 856106c34b88Smrg_LT_TAGVAR(LD, $1)="$LD" 856206c34b88Smrg_LT_CC_BASENAME([$compiler]) 856321e67964Smrg 856406c34b88Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 856506c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 856621e67964Smrg 856706c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 856806c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 856906c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 857021e67964Smrg 857106c34b88Smrgif test -n "$compiler"; then 857206c34b88Smrg _LT_COMPILER_NO_RTTI($1) 857306c34b88Smrg _LT_COMPILER_PIC($1) 857406c34b88Smrg _LT_COMPILER_C_O($1) 857506c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 857606c34b88Smrg _LT_LINKER_SHLIBS($1) 857706c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 857821e67964Smrg 857906c34b88Smrg _LT_CONFIG($1) 858006c34b88Smrgfi 858121e67964Smrg 858206c34b88SmrgAC_LANG_RESTORE 8583c27c18e8Smrg 858406c34b88SmrgGCC=$lt_save_GCC 858506c34b88SmrgCC=$lt_save_CC 858606c34b88SmrgCFLAGS=$lt_save_CFLAGS 858706c34b88Smrg])# _LT_LANG_GO_CONFIG 8588c27c18e8Smrg 8589c27c18e8Smrg 859006c34b88Smrg# _LT_LANG_RC_CONFIG([TAG]) 859106c34b88Smrg# ------------------------- 859206c34b88Smrg# Ensure that the configuration variables for the Windows resource compiler 859306c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 859406c34b88Smrg# to write the compiler configuration to `libtool'. 859506c34b88Smrgm4_defun([_LT_LANG_RC_CONFIG], 859606c34b88Smrg[AC_REQUIRE([LT_PROG_RC])dnl 859706c34b88SmrgAC_LANG_SAVE 8598c27c18e8Smrg 859906c34b88Smrg# Source file extension for RC test sources. 860006c34b88Smrgac_ext=rc 8601c27c18e8Smrg 860206c34b88Smrg# Object file extension for compiled RC test sources. 860306c34b88Smrgobjext=o 860406c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 8605c27c18e8Smrg 860606c34b88Smrg# Code to be used in simple compile tests 860706c34b88Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8608c27c18e8Smrg 860906c34b88Smrg# Code to be used in simple link tests 861006c34b88Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 8611c27c18e8Smrg 861206c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 861306c34b88Smrg_LT_TAG_COMPILER 8614c27c18e8Smrg 861506c34b88Smrg# save warnings/boilerplate of simple test code 861606c34b88Smrg_LT_COMPILER_BOILERPLATE 861706c34b88Smrg_LT_LINKER_BOILERPLATE 8618c27c18e8Smrg 861906c34b88Smrg# Allow CC to be a program name with arguments. 862006c34b88Smrglt_save_CC="$CC" 862106c34b88Smrglt_save_CFLAGS=$CFLAGS 862206c34b88Smrglt_save_GCC=$GCC 862306c34b88SmrgGCC= 862406c34b88SmrgCC=${RC-"windres"} 862506c34b88SmrgCFLAGS= 862606c34b88Smrgcompiler=$CC 862706c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 862806c34b88Smrg_LT_CC_BASENAME([$compiler]) 862906c34b88Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8630c27c18e8Smrg 863106c34b88Smrgif test -n "$compiler"; then 863206c34b88Smrg : 863306c34b88Smrg _LT_CONFIG($1) 863406c34b88Smrgfi 8635c27c18e8Smrg 863606c34b88SmrgGCC=$lt_save_GCC 863706c34b88SmrgAC_LANG_RESTORE 863806c34b88SmrgCC=$lt_save_CC 863906c34b88SmrgCFLAGS=$lt_save_CFLAGS 864006c34b88Smrg])# _LT_LANG_RC_CONFIG 8641c27c18e8Smrg 8642c27c18e8Smrg 864306c34b88Smrg# LT_PROG_GCJ 864406c34b88Smrg# ----------- 864506c34b88SmrgAC_DEFUN([LT_PROG_GCJ], 864606c34b88Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 864706c34b88Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 864806c34b88Smrg [AC_CHECK_TOOL(GCJ, gcj,) 864906c34b88Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 865006c34b88Smrg AC_SUBST(GCJFLAGS)])])[]dnl 865106c34b88Smrg]) 8652c27c18e8Smrg 865306c34b88Smrg# Old name: 865406c34b88SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 865506c34b88Smrgdnl aclocal-1.4 backwards compatibility: 865606c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 865721e67964Smrg 865821e67964Smrg 865906c34b88Smrg# LT_PROG_GO 866006c34b88Smrg# ---------- 866106c34b88SmrgAC_DEFUN([LT_PROG_GO], 866206c34b88Smrg[AC_CHECK_TOOL(GOC, gccgo,) 866306c34b88Smrg]) 8664c27c18e8Smrg 866521e67964Smrg 866606c34b88Smrg# LT_PROG_RC 866706c34b88Smrg# ---------- 866806c34b88SmrgAC_DEFUN([LT_PROG_RC], 866906c34b88Smrg[AC_CHECK_TOOL(RC, windres,) 867006c34b88Smrg]) 867121e67964Smrg 867206c34b88Smrg# Old name: 867306c34b88SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 867406c34b88Smrgdnl aclocal-1.4 backwards compatibility: 867506c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 867621e67964Smrg 867721e67964Smrg 867806c34b88Smrg# _LT_DECL_EGREP 867906c34b88Smrg# -------------- 868006c34b88Smrg# If we don't have a new enough Autoconf to choose the best grep 868106c34b88Smrg# available, choose the one first in the user's PATH. 868206c34b88Smrgm4_defun([_LT_DECL_EGREP], 868306c34b88Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 868406c34b88SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 868506c34b88Smrgtest -z "$GREP" && GREP=grep 868606c34b88Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 868706c34b88Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 868806c34b88Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 868906c34b88Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 869006c34b88SmrgAC_SUBST([GREP]) 869106c34b88Smrg]) 869221e67964Smrg 869306c34b88Smrg 869406c34b88Smrg# _LT_DECL_OBJDUMP 869506c34b88Smrg# -------------- 869606c34b88Smrg# If we don't have a new enough Autoconf to choose the best objdump 869706c34b88Smrg# available, choose the one first in the user's PATH. 869806c34b88Smrgm4_defun([_LT_DECL_OBJDUMP], 869906c34b88Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 870006c34b88Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 870106c34b88Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 870206c34b88SmrgAC_SUBST([OBJDUMP]) 870321e67964Smrg]) 870421e67964Smrg 870506c34b88Smrg# _LT_DECL_DLLTOOL 870606c34b88Smrg# ---------------- 870706c34b88Smrg# Ensure DLLTOOL variable is set. 870806c34b88Smrgm4_defun([_LT_DECL_DLLTOOL], 870906c34b88Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 871006c34b88Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 871106c34b88Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 871206c34b88SmrgAC_SUBST([DLLTOOL]) 871306c34b88Smrg]) 871421e67964Smrg 871506c34b88Smrg# _LT_DECL_SED 871606c34b88Smrg# ------------ 871706c34b88Smrg# Check for a fully-functional sed program, that truncates 871806c34b88Smrg# as few characters as possible. Prefer GNU sed if found. 871906c34b88Smrgm4_defun([_LT_DECL_SED], 872006c34b88Smrg[AC_PROG_SED 872106c34b88Smrgtest -z "$SED" && SED=sed 872206c34b88SmrgXsed="$SED -e 1s/^X//" 872306c34b88Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 872406c34b88Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 872506c34b88Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 872606c34b88Smrg])# _LT_DECL_SED 872721e67964Smrg 872806c34b88Smrgm4_ifndef([AC_PROG_SED], [ 872906c34b88Smrg# NOTE: This macro has been submitted for inclusion into # 873006c34b88Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 873106c34b88Smrg# a released version of Autoconf we should remove this # 873206c34b88Smrg# macro and use it instead. # 873321e67964Smrg 873406c34b88Smrgm4_defun([AC_PROG_SED], 873506c34b88Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 873606c34b88SmrgAC_CACHE_VAL(lt_cv_path_SED, 873706c34b88Smrg[# Loop through the user's path and test for sed and gsed. 873806c34b88Smrg# Then use that list of sed's as ones to test for truncation. 873906c34b88Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 874006c34b88Smrgfor as_dir in $PATH 874106c34b88Smrgdo 874206c34b88Smrg IFS=$as_save_IFS 874306c34b88Smrg test -z "$as_dir" && as_dir=. 874406c34b88Smrg for lt_ac_prog in sed gsed; do 874506c34b88Smrg for ac_exec_ext in '' $ac_executable_extensions; do 874606c34b88Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 874706c34b88Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 874806c34b88Smrg fi 874906c34b88Smrg done 875006c34b88Smrg done 875106c34b88Smrgdone 875206c34b88SmrgIFS=$as_save_IFS 875306c34b88Smrglt_ac_max=0 875406c34b88Smrglt_ac_count=0 875506c34b88Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 875606c34b88Smrg# along with /bin/sed that truncates output. 875706c34b88Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 875806c34b88Smrg test ! -f $lt_ac_sed && continue 875906c34b88Smrg cat /dev/null > conftest.in 876006c34b88Smrg lt_ac_count=0 876106c34b88Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 876206c34b88Smrg # Check for GNU sed and select it if it is found. 876306c34b88Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 876406c34b88Smrg lt_cv_path_SED=$lt_ac_sed 876506c34b88Smrg break 876606c34b88Smrg fi 876706c34b88Smrg while true; do 876806c34b88Smrg cat conftest.in conftest.in >conftest.tmp 876906c34b88Smrg mv conftest.tmp conftest.in 877006c34b88Smrg cp conftest.in conftest.nl 877106c34b88Smrg echo >>conftest.nl 877206c34b88Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 877306c34b88Smrg cmp -s conftest.out conftest.nl || break 877406c34b88Smrg # 10000 chars as input seems more than enough 877506c34b88Smrg test $lt_ac_count -gt 10 && break 877606c34b88Smrg lt_ac_count=`expr $lt_ac_count + 1` 877706c34b88Smrg if test $lt_ac_count -gt $lt_ac_max; then 877806c34b88Smrg lt_ac_max=$lt_ac_count 877906c34b88Smrg lt_cv_path_SED=$lt_ac_sed 878006c34b88Smrg fi 878106c34b88Smrg done 878206c34b88Smrgdone 878321e67964Smrg]) 878406c34b88SmrgSED=$lt_cv_path_SED 878506c34b88SmrgAC_SUBST([SED]) 878606c34b88SmrgAC_MSG_RESULT([$SED]) 878706c34b88Smrg])#AC_PROG_SED 878806c34b88Smrg])#m4_ifndef 8789c43cc173Smrg 879006c34b88Smrg# Old name: 879106c34b88SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 879206c34b88Smrgdnl aclocal-1.4 backwards compatibility: 879306c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8794c27c18e8Smrg 8795c27c18e8Smrg 879606c34b88Smrg# _LT_CHECK_SHELL_FEATURES 879706c34b88Smrg# ------------------------ 879806c34b88Smrg# Find out whether the shell is Bourne or XSI compatible, 879906c34b88Smrg# or has some other useful features. 880006c34b88Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 880106c34b88Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 880206c34b88Smrg# Try some XSI features 880306c34b88Smrgxsi_shell=no 880406c34b88Smrg( _lt_dummy="a/b/c" 880506c34b88Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 880606c34b88Smrg = c,a/b,b/c, \ 880706c34b88Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 880806c34b88Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 880906c34b88Smrg && xsi_shell=yes 881006c34b88SmrgAC_MSG_RESULT([$xsi_shell]) 881106c34b88Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8812c27c18e8Smrg 881306c34b88SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 881406c34b88Smrglt_shell_append=no 881506c34b88Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 881606c34b88Smrg >/dev/null 2>&1 \ 881706c34b88Smrg && lt_shell_append=yes 881806c34b88SmrgAC_MSG_RESULT([$lt_shell_append]) 881906c34b88Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8820c27c18e8Smrg 882106c34b88Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 882206c34b88Smrg lt_unset=unset 882306c34b88Smrgelse 882406c34b88Smrg lt_unset=false 882506c34b88Smrgfi 882606c34b88Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 882706c34b88Smrg 882806c34b88Smrg# test EBCDIC or ASCII 882906c34b88Smrgcase `echo X|tr X '\101'` in 883006c34b88Smrg A) # ASCII based system 883106c34b88Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 883206c34b88Smrg lt_SP2NL='tr \040 \012' 883306c34b88Smrg lt_NL2SP='tr \015\012 \040\040' 883406c34b88Smrg ;; 883506c34b88Smrg *) # EBCDIC based system 883606c34b88Smrg lt_SP2NL='tr \100 \n' 883706c34b88Smrg lt_NL2SP='tr \r\n \100\100' 883806c34b88Smrg ;; 883906c34b88Smrgesac 884006c34b88Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 884106c34b88Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 884206c34b88Smrg])# _LT_CHECK_SHELL_FEATURES 884306c34b88Smrg 884406c34b88Smrg 884506c34b88Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 884606c34b88Smrg# ------------------------------------------------------ 884706c34b88Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 884806c34b88Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 884906c34b88Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 885006c34b88Smrg[dnl { 885106c34b88Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 885206c34b88Smrg$1 ()\ 885306c34b88Smrg{\ 885406c34b88Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 885506c34b88Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 885606c34b88Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 885706c34b88Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 885806c34b88Smrgtest 0 -eq $? || _lt_function_replace_fail=: 885906c34b88Smrg]) 8860c27c18e8Smrg 8861c43cc173Smrg 886206c34b88Smrg# _LT_PROG_REPLACE_SHELLFNS 886306c34b88Smrg# ------------------------- 886406c34b88Smrg# Replace existing portable implementations of several shell functions with 886506c34b88Smrg# equivalent extended shell implementations where those features are available.. 886606c34b88Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 886706c34b88Smrg[if test x"$xsi_shell" = xyes; then 886806c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 886906c34b88Smrg case ${1} in 887006c34b88Smrg */*) func_dirname_result="${1%/*}${2}" ;; 887106c34b88Smrg * ) func_dirname_result="${3}" ;; 887206c34b88Smrg esac]) 887337eb1ca1Smrg 887406c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 887506c34b88Smrg func_basename_result="${1##*/}"]) 8876c43cc173Smrg 887706c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 887806c34b88Smrg case ${1} in 887906c34b88Smrg */*) func_dirname_result="${1%/*}${2}" ;; 888006c34b88Smrg * ) func_dirname_result="${3}" ;; 888106c34b88Smrg esac 888206c34b88Smrg func_basename_result="${1##*/}"]) 8883c43cc173Smrg 888406c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 888506c34b88Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 888606c34b88Smrg # positional parameters, so assign one to ordinary parameter first. 888706c34b88Smrg func_stripname_result=${3} 888806c34b88Smrg func_stripname_result=${func_stripname_result#"${1}"} 888906c34b88Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 8890c43cc173Smrg 889106c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 889206c34b88Smrg func_split_long_opt_name=${1%%=*} 889306c34b88Smrg func_split_long_opt_arg=${1#*=}]) 8894c43cc173Smrg 889506c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 889606c34b88Smrg func_split_short_opt_arg=${1#??} 889706c34b88Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 8898c43cc173Smrg 889906c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 890006c34b88Smrg case ${1} in 890106c34b88Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 890206c34b88Smrg *) func_lo2o_result=${1} ;; 890306c34b88Smrg esac]) 8904c43cc173Smrg 890506c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 8906c43cc173Smrg 890706c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 8908c43cc173Smrg 890906c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 891006c34b88Smrgfi 8911c43cc173Smrg 891206c34b88Smrgif test x"$lt_shell_append" = xyes; then 891306c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 8914c43cc173Smrg 891506c34b88Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 891606c34b88Smrg func_quote_for_eval "${2}" 891706c34b88Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 891806c34b88Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 8919c43cc173Smrg 892006c34b88Smrg # Save a `func_append' function call where possible by direct use of '+=' 892106c34b88Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 892206c34b88Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 892306c34b88Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 892406c34b88Smrg test 0 -eq $? || _lt_function_replace_fail=: 892506c34b88Smrgelse 892606c34b88Smrg # Save a `func_append' function call even when '+=' is not available 892706c34b88Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 892806c34b88Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 892906c34b88Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 893006c34b88Smrg test 0 -eq $? || _lt_function_replace_fail=: 893106c34b88Smrgfi 8932c43cc173Smrg 893306c34b88Smrgif test x"$_lt_function_replace_fail" = x":"; then 893406c34b88Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 893506c34b88Smrgfi 893606c34b88Smrg]) 8937c43cc173Smrg 893806c34b88Smrg# _LT_PATH_CONVERSION_FUNCTIONS 893906c34b88Smrg# ----------------------------- 894006c34b88Smrg# Determine which file name conversion functions should be used by 894106c34b88Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 894206c34b88Smrg# for certain cross-compile configurations and native mingw. 894306c34b88Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 894406c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 894506c34b88SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 894606c34b88SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 894706c34b88SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 894806c34b88Smrg[case $host in 894906c34b88Smrg *-*-mingw* ) 895006c34b88Smrg case $build in 895106c34b88Smrg *-*-mingw* ) # actually msys 895206c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 895306c34b88Smrg ;; 895406c34b88Smrg *-*-cygwin* ) 895506c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 895606c34b88Smrg ;; 895706c34b88Smrg * ) # otherwise, assume *nix 895806c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 895906c34b88Smrg ;; 896006c34b88Smrg esac 896106c34b88Smrg ;; 896206c34b88Smrg *-*-cygwin* ) 896306c34b88Smrg case $build in 896406c34b88Smrg *-*-mingw* ) # actually msys 896506c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 896606c34b88Smrg ;; 896706c34b88Smrg *-*-cygwin* ) 896806c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 896906c34b88Smrg ;; 897006c34b88Smrg * ) # otherwise, assume *nix 897106c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 897206c34b88Smrg ;; 897306c34b88Smrg esac 897406c34b88Smrg ;; 897506c34b88Smrg * ) # unhandled hosts (and "normal" native builds) 897606c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 897706c34b88Smrg ;; 897806c34b88Smrgesac 897906c34b88Smrg]) 898006c34b88Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 898106c34b88SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 898206c34b88Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 898306c34b88Smrg [0], [convert $build file names to $host format])dnl 898406c34b88Smrg 898506c34b88SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 898606c34b88SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 898706c34b88Smrg[#assume ordinary cross tools, or native build. 898806c34b88Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 898906c34b88Smrgcase $host in 899006c34b88Smrg *-*-mingw* ) 899106c34b88Smrg case $build in 899206c34b88Smrg *-*-mingw* ) # actually msys 899306c34b88Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 899406c34b88Smrg ;; 899506c34b88Smrg esac 899606c34b88Smrg ;; 899706c34b88Smrgesac 899806c34b88Smrg]) 899906c34b88Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 900006c34b88SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 900106c34b88Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 900206c34b88Smrg [0], [convert $build files to toolchain format])dnl 900306c34b88Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 9004c43cc173Smrg 900506c34b88Smrg# Helper functions for option handling. -*- Autoconf -*- 900606c34b88Smrg# 900706c34b88Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 900806c34b88Smrg# Inc. 900906c34b88Smrg# Written by Gary V. Vaughan, 2004 901006c34b88Smrg# 901106c34b88Smrg# This file is free software; the Free Software Foundation gives 901206c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 901306c34b88Smrg# modifications, as long as this notice is preserved. 9014c43cc173Smrg 901506c34b88Smrg# serial 7 ltoptions.m4 9016c43cc173Smrg 901706c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 901806c34b88SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9019f1ee322dSmrg 9020f1ee322dSmrg 902106c34b88Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 902206c34b88Smrg# ------------------------------------------ 902306c34b88Smrgm4_define([_LT_MANGLE_OPTION], 902406c34b88Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 902589069ce9Smrg 9026c43cc173Smrg 902706c34b88Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 902806c34b88Smrg# --------------------------------------- 902906c34b88Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 903006c34b88Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 903106c34b88Smrg# saved as a flag. 903206c34b88Smrgm4_define([_LT_SET_OPTION], 903306c34b88Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 903406c34b88Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 903506c34b88Smrg _LT_MANGLE_DEFUN([$1], [$2]), 903606c34b88Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 903706c34b88Smrg]) 9038c43cc173Smrg 9039c43cc173Smrg 904006c34b88Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 904106c34b88Smrg# ------------------------------------------------------------ 904206c34b88Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 904306c34b88Smrgm4_define([_LT_IF_OPTION], 904406c34b88Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9045c43cc173Smrg 9046c27c18e8Smrg 904706c34b88Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 904806c34b88Smrg# ------------------------------------------------------- 904906c34b88Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 905006c34b88Smrg# are set. 905106c34b88Smrgm4_define([_LT_UNLESS_OPTIONS], 905206c34b88Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 905306c34b88Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 905406c34b88Smrg [m4_define([$0_found])])])[]dnl 905506c34b88Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 905606c34b88Smrg])[]dnl 905706c34b88Smrg]) 905821e67964Smrg 905921e67964Smrg 906006c34b88Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 906106c34b88Smrg# ---------------------------------------- 906206c34b88Smrg# OPTION-LIST is a space-separated list of Libtool options associated 906306c34b88Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 906406c34b88Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 906506c34b88Smrg# the unknown option and exit. 906606c34b88Smrgm4_defun([_LT_SET_OPTIONS], 906706c34b88Smrg[# Set options 906806c34b88Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 906906c34b88Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 907021e67964Smrg 907106c34b88Smrgm4_if([$1],[LT_INIT],[ 907206c34b88Smrg dnl 907306c34b88Smrg dnl Simply set some default values (i.e off) if boolean options were not 907406c34b88Smrg dnl specified: 907506c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 907606c34b88Smrg ]) 907706c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 907806c34b88Smrg ]) 907906c34b88Smrg dnl 908006c34b88Smrg dnl If no reference was made to various pairs of opposing options, then 908106c34b88Smrg dnl we run the default mode handler for the pair. For example, if neither 908206c34b88Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 908306c34b88Smrg dnl archives by default: 908406c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 908506c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 908606c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 908706c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 908806c34b88Smrg [_LT_ENABLE_FAST_INSTALL]) 908906c34b88Smrg ]) 909006c34b88Smrg])# _LT_SET_OPTIONS 9091c43cc173Smrg 9092c43cc173Smrg 9093c43cc173Smrg 909406c34b88Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 909506c34b88Smrg# ----------------------------------------- 909606c34b88Smrgm4_define([_LT_MANGLE_DEFUN], 909706c34b88Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9098c43cc173Smrg 9099c43cc173Smrg 910006c34b88Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 910106c34b88Smrg# ----------------------------------------------- 910206c34b88Smrgm4_define([LT_OPTION_DEFINE], 910306c34b88Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 910406c34b88Smrg])# LT_OPTION_DEFINE 9105c43cc173Smrg 9106c43cc173Smrg 910706c34b88Smrg# dlopen 910806c34b88Smrg# ------ 910906c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 911006c34b88Smrg]) 9111c43cc173Smrg 911206c34b88SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 911306c34b88Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 911406c34b88SmrgAC_DIAGNOSE([obsolete], 911506c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 911606c34b88Smrgput the `dlopen' option into LT_INIT's first parameter.]) 911706c34b88Smrg]) 9118c43cc173Smrg 911906c34b88Smrgdnl aclocal-1.4 backwards compatibility: 912006c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9121c43cc173Smrg 9122c43cc173Smrg 912306c34b88Smrg# win32-dll 912406c34b88Smrg# --------- 912506c34b88Smrg# Declare package support for building win32 dll's. 912606c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 912706c34b88Smrg[enable_win32_dll=yes 9128c43cc173Smrg 912906c34b88Smrgcase $host in 913006c34b88Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 913106c34b88Smrg AC_CHECK_TOOL(AS, as, false) 913206c34b88Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 913306c34b88Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 913406c34b88Smrg ;; 913506c34b88Smrgesac 9136c27c18e8Smrg 913706c34b88Smrgtest -z "$AS" && AS=as 913806c34b88Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 913989069ce9Smrg 914006c34b88Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 914106c34b88Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 914289069ce9Smrg 914306c34b88Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 914406c34b88Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 914506c34b88Smrg])# win32-dll 9146c43cc173Smrg 914706c34b88SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 914806c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 914906c34b88Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 915006c34b88SmrgAC_DIAGNOSE([obsolete], 915106c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 915206c34b88Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 915306c34b88Smrg]) 9154c43cc173Smrg 915506c34b88Smrgdnl aclocal-1.4 backwards compatibility: 915606c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9157c43cc173Smrg 9158c43cc173Smrg 915906c34b88Smrg# _LT_ENABLE_SHARED([DEFAULT]) 916006c34b88Smrg# ---------------------------- 916106c34b88Smrg# implement the --enable-shared flag, and supports the `shared' and 916206c34b88Smrg# `disable-shared' LT_INIT options. 916306c34b88Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 916406c34b88Smrgm4_define([_LT_ENABLE_SHARED], 916506c34b88Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 916606c34b88SmrgAC_ARG_ENABLE([shared], 916706c34b88Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 916806c34b88Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 916906c34b88Smrg [p=${PACKAGE-default} 917006c34b88Smrg case $enableval in 917106c34b88Smrg yes) enable_shared=yes ;; 917206c34b88Smrg no) enable_shared=no ;; 917306c34b88Smrg *) 917406c34b88Smrg enable_shared=no 917506c34b88Smrg # Look at the argument we got. We use all the common list separators. 917606c34b88Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 917706c34b88Smrg for pkg in $enableval; do 917806c34b88Smrg IFS="$lt_save_ifs" 917906c34b88Smrg if test "X$pkg" = "X$p"; then 918006c34b88Smrg enable_shared=yes 918106c34b88Smrg fi 918206c34b88Smrg done 918306c34b88Smrg IFS="$lt_save_ifs" 918406c34b88Smrg ;; 918506c34b88Smrg esac], 918606c34b88Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9187c43cc173Smrg 918806c34b88Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 918906c34b88Smrg [Whether or not to build shared libraries]) 919006c34b88Smrg])# _LT_ENABLE_SHARED 9191c43cc173Smrg 919206c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 919306c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9194c43cc173Smrg 919506c34b88Smrg# Old names: 919606c34b88SmrgAC_DEFUN([AC_ENABLE_SHARED], 919706c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 919806c34b88Smrg]) 9199c43cc173Smrg 920006c34b88SmrgAC_DEFUN([AC_DISABLE_SHARED], 920106c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 920206c34b88Smrg]) 9203c43cc173Smrg 920406c34b88SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 920506c34b88SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9206c43cc173Smrg 920706c34b88Smrgdnl aclocal-1.4 backwards compatibility: 920806c34b88Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 920906c34b88Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9210c43cc173Smrg 9211c43cc173Smrg 9212c27c18e8Smrg 921306c34b88Smrg# _LT_ENABLE_STATIC([DEFAULT]) 921406c34b88Smrg# ---------------------------- 921506c34b88Smrg# implement the --enable-static flag, and support the `static' and 921606c34b88Smrg# `disable-static' LT_INIT options. 921706c34b88Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 921806c34b88Smrgm4_define([_LT_ENABLE_STATIC], 921906c34b88Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 922006c34b88SmrgAC_ARG_ENABLE([static], 922106c34b88Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 922206c34b88Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 922306c34b88Smrg [p=${PACKAGE-default} 922406c34b88Smrg case $enableval in 922506c34b88Smrg yes) enable_static=yes ;; 922606c34b88Smrg no) enable_static=no ;; 922706c34b88Smrg *) 922806c34b88Smrg enable_static=no 922906c34b88Smrg # Look at the argument we got. We use all the common list separators. 923006c34b88Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 923106c34b88Smrg for pkg in $enableval; do 923206c34b88Smrg IFS="$lt_save_ifs" 923306c34b88Smrg if test "X$pkg" = "X$p"; then 923406c34b88Smrg enable_static=yes 923506c34b88Smrg fi 923606c34b88Smrg done 923706c34b88Smrg IFS="$lt_save_ifs" 923806c34b88Smrg ;; 923906c34b88Smrg esac], 924006c34b88Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 924189069ce9Smrg 924206c34b88Smrg _LT_DECL([build_old_libs], [enable_static], [0], 924306c34b88Smrg [Whether or not to build static libraries]) 924406c34b88Smrg])# _LT_ENABLE_STATIC 9245c43cc173Smrg 924606c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 924706c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 924889069ce9Smrg 924906c34b88Smrg# Old names: 925006c34b88SmrgAC_DEFUN([AC_ENABLE_STATIC], 925106c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 925206c34b88Smrg]) 9253c43cc173Smrg 925406c34b88SmrgAC_DEFUN([AC_DISABLE_STATIC], 925506c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 925606c34b88Smrg]) 9257c27c18e8Smrg 925806c34b88SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 925906c34b88SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9260c43cc173Smrg 926106c34b88Smrgdnl aclocal-1.4 backwards compatibility: 926206c34b88Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 926306c34b88Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9264c27c18e8Smrg 9265c43cc173Smrg 9266b789ec8aSmrg 926706c34b88Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 926806c34b88Smrg# ---------------------------------- 926906c34b88Smrg# implement the --enable-fast-install flag, and support the `fast-install' 927006c34b88Smrg# and `disable-fast-install' LT_INIT options. 927106c34b88Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 927206c34b88Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 927306c34b88Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 927406c34b88SmrgAC_ARG_ENABLE([fast-install], 927506c34b88Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 927606c34b88Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 927706c34b88Smrg [p=${PACKAGE-default} 927806c34b88Smrg case $enableval in 927906c34b88Smrg yes) enable_fast_install=yes ;; 928006c34b88Smrg no) enable_fast_install=no ;; 928106c34b88Smrg *) 928206c34b88Smrg enable_fast_install=no 928306c34b88Smrg # Look at the argument we got. We use all the common list separators. 928406c34b88Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 928506c34b88Smrg for pkg in $enableval; do 928606c34b88Smrg IFS="$lt_save_ifs" 928706c34b88Smrg if test "X$pkg" = "X$p"; then 928806c34b88Smrg enable_fast_install=yes 928906c34b88Smrg fi 929006c34b88Smrg done 929106c34b88Smrg IFS="$lt_save_ifs" 929206c34b88Smrg ;; 929306c34b88Smrg esac], 929406c34b88Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 929589069ce9Smrg 929606c34b88Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 929706c34b88Smrg [Whether or not to optimize for fast installation])dnl 929806c34b88Smrg])# _LT_ENABLE_FAST_INSTALL 929989069ce9Smrg 930006c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 930106c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9302f1ee322dSmrg 930306c34b88Smrg# Old names: 930406c34b88SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 930506c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 930606c34b88SmrgAC_DIAGNOSE([obsolete], 930706c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 930806c34b88Smrgthe `fast-install' option into LT_INIT's first parameter.]) 930906c34b88Smrg]) 9310f1ee322dSmrg 931106c34b88SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 931206c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 931306c34b88SmrgAC_DIAGNOSE([obsolete], 931406c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 931506c34b88Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 931606c34b88Smrg]) 931789069ce9Smrg 931806c34b88Smrgdnl aclocal-1.4 backwards compatibility: 931906c34b88Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 932006c34b88Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 932189069ce9Smrg 9322c43cc173Smrg 932306c34b88Smrg# _LT_WITH_PIC([MODE]) 932406c34b88Smrg# -------------------- 932506c34b88Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 932606c34b88Smrg# LT_INIT options. 932706c34b88Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 932806c34b88Smrgm4_define([_LT_WITH_PIC], 932906c34b88Smrg[AC_ARG_WITH([pic], 933006c34b88Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 933106c34b88Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 933206c34b88Smrg [lt_p=${PACKAGE-default} 933306c34b88Smrg case $withval in 933406c34b88Smrg yes|no) pic_mode=$withval ;; 933506c34b88Smrg *) 933606c34b88Smrg pic_mode=default 933706c34b88Smrg # Look at the argument we got. We use all the common list separators. 933806c34b88Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 933906c34b88Smrg for lt_pkg in $withval; do 934006c34b88Smrg IFS="$lt_save_ifs" 934106c34b88Smrg if test "X$lt_pkg" = "X$lt_p"; then 934206c34b88Smrg pic_mode=yes 934306c34b88Smrg fi 934406c34b88Smrg done 934506c34b88Smrg IFS="$lt_save_ifs" 934606c34b88Smrg ;; 934706c34b88Smrg esac], 934806c34b88Smrg [pic_mode=default]) 934989069ce9Smrg 935006c34b88Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9351c43cc173Smrg 935206c34b88Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 935306c34b88Smrg])# _LT_WITH_PIC 935437eb1ca1Smrg 935506c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 935606c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 935789069ce9Smrg 935806c34b88Smrg# Old name: 935906c34b88SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 936006c34b88Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 936106c34b88SmrgAC_DIAGNOSE([obsolete], 936206c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 936306c34b88Smrgput the `pic-only' option into LT_INIT's first parameter.]) 936406c34b88Smrg]) 936589069ce9Smrg 936606c34b88Smrgdnl aclocal-1.4 backwards compatibility: 936706c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 936889069ce9Smrg 936989069ce9Smrg 937006c34b88Smrgm4_define([_LTDL_MODE], []) 937106c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 937206c34b88Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 937306c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 937406c34b88Smrg [m4_define([_LTDL_MODE], [recursive])]) 937506c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 937606c34b88Smrg [m4_define([_LTDL_MODE], [subproject])]) 937706c34b88Smrg 937806c34b88Smrgm4_define([_LTDL_TYPE], []) 937906c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 938006c34b88Smrg [m4_define([_LTDL_TYPE], [installable])]) 938106c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 938206c34b88Smrg [m4_define([_LTDL_TYPE], [convenience])]) 938306c34b88Smrg 938406c34b88Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9385b789ec8aSmrg# 938606c34b88Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 938706c34b88Smrg# Written by Gary V. Vaughan, 2004 9388b789ec8aSmrg# 938906c34b88Smrg# This file is free software; the Free Software Foundation gives 939006c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 939106c34b88Smrg# modifications, as long as this notice is preserved. 939289069ce9Smrg 939306c34b88Smrg# serial 6 ltsugar.m4 9394f1ee322dSmrg 939506c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 939606c34b88SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 939789069ce9Smrg 939806c34b88Smrg 939906c34b88Smrg# lt_join(SEP, ARG1, [ARG2...]) 940006c34b88Smrg# ----------------------------- 940106c34b88Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 940206c34b88Smrg# associated separator. 940306c34b88Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 940406c34b88Smrg# versions in m4sugar had bugs. 940506c34b88Smrgm4_define([lt_join], 940606c34b88Smrg[m4_if([$#], [1], [], 940706c34b88Smrg [$#], [2], [[$2]], 940806c34b88Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 940906c34b88Smrgm4_define([_lt_join], 941006c34b88Smrg[m4_if([$#$2], [2], [], 941106c34b88Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 941206c34b88Smrg 941306c34b88Smrg 941406c34b88Smrg# lt_car(LIST) 941506c34b88Smrg# lt_cdr(LIST) 941606c34b88Smrg# ------------ 941706c34b88Smrg# Manipulate m4 lists. 941806c34b88Smrg# These macros are necessary as long as will still need to support 941906c34b88Smrg# Autoconf-2.59 which quotes differently. 942006c34b88Smrgm4_define([lt_car], [[$1]]) 942106c34b88Smrgm4_define([lt_cdr], 942206c34b88Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 942306c34b88Smrg [$#], 1, [], 942406c34b88Smrg [m4_dquote(m4_shift($@))])]) 942506c34b88Smrgm4_define([lt_unquote], $1) 942606c34b88Smrg 942706c34b88Smrg 942806c34b88Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 942906c34b88Smrg# ------------------------------------------ 943006c34b88Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 943106c34b88Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 943206c34b88Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 943306c34b88Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 943406c34b88Smrg# than defined and empty). 9435b789ec8aSmrg# 943606c34b88Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 943706c34b88Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 943806c34b88Smrgm4_define([lt_append], 943906c34b88Smrg[m4_define([$1], 944006c34b88Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 944106c34b88Smrg 944206c34b88Smrg 944306c34b88Smrg 944406c34b88Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 944506c34b88Smrg# ---------------------------------------------------------- 944606c34b88Smrg# Produce a SEP delimited list of all paired combinations of elements of 944706c34b88Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 944806c34b88Smrg# has the form PREFIXmINFIXSUFFIXn. 944906c34b88Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 945006c34b88Smrgm4_define([lt_combine], 945106c34b88Smrg[m4_if(m4_eval([$# > 3]), [1], 945206c34b88Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 945306c34b88Smrg[[m4_foreach([_Lt_prefix], [$2], 945406c34b88Smrg [m4_foreach([_Lt_suffix], 945506c34b88Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 945606c34b88Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 945706c34b88Smrg 945806c34b88Smrg 945906c34b88Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 946006c34b88Smrg# ----------------------------------------------------------------------- 946106c34b88Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 946206c34b88Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 946306c34b88Smrgm4_define([lt_if_append_uniq], 946406c34b88Smrg[m4_ifdef([$1], 946506c34b88Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 946606c34b88Smrg [lt_append([$1], [$2], [$3])$4], 946706c34b88Smrg [$5])], 946806c34b88Smrg [lt_append([$1], [$2], [$3])$4])]) 946906c34b88Smrg 947006c34b88Smrg 947106c34b88Smrg# lt_dict_add(DICT, KEY, VALUE) 947206c34b88Smrg# ----------------------------- 947306c34b88Smrgm4_define([lt_dict_add], 947406c34b88Smrg[m4_define([$1($2)], [$3])]) 947506c34b88Smrg 947606c34b88Smrg 947706c34b88Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 947806c34b88Smrg# -------------------------------------------- 947906c34b88Smrgm4_define([lt_dict_add_subkey], 948006c34b88Smrg[m4_define([$1($2:$3)], [$4])]) 948106c34b88Smrg 948206c34b88Smrg 948306c34b88Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 948406c34b88Smrg# ---------------------------------- 948506c34b88Smrgm4_define([lt_dict_fetch], 948606c34b88Smrg[m4_ifval([$3], 948706c34b88Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 948806c34b88Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9489c43cc173Smrg 9490c43cc173Smrg 949106c34b88Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 949206c34b88Smrg# ----------------------------------------------------------------- 949306c34b88Smrgm4_define([lt_if_dict_fetch], 949406c34b88Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 949506c34b88Smrg [$5], 949606c34b88Smrg [$6])]) 949706c34b88Smrg 949806c34b88Smrg 949906c34b88Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 950006c34b88Smrg# -------------------------------------------------------------- 950106c34b88Smrgm4_define([lt_dict_filter], 950206c34b88Smrg[m4_if([$5], [], [], 950306c34b88Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 950406c34b88Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 950506c34b88Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 950606c34b88Smrg]) 950706c34b88Smrg 950806c34b88Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 9509b789ec8aSmrg# 951006c34b88Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 951106c34b88Smrg# Written by Scott James Remnant, 2004 9512b789ec8aSmrg# 951306c34b88Smrg# This file is free software; the Free Software Foundation gives 951406c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 951506c34b88Smrg# modifications, as long as this notice is preserved. 951606c34b88Smrg 951706c34b88Smrg# @configure_input@ 951806c34b88Smrg 951906c34b88Smrg# serial 3337 ltversion.m4 952006c34b88Smrg# This file is part of GNU Libtool 952106c34b88Smrg 952206c34b88Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 952306c34b88Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 952406c34b88Smrg 952506c34b88SmrgAC_DEFUN([LTVERSION_VERSION], 952606c34b88Smrg[macro_version='2.4.2' 952706c34b88Smrgmacro_revision='1.3337' 952806c34b88Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 952906c34b88Smrg_LT_DECL(, macro_revision, 0) 953006c34b88Smrg]) 953106c34b88Smrg 953206c34b88Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9533b789ec8aSmrg# 953406c34b88Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 953506c34b88Smrg# Written by Scott James Remnant, 2004. 953606c34b88Smrg# 953706c34b88Smrg# This file is free software; the Free Software Foundation gives 953806c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 953906c34b88Smrg# modifications, as long as this notice is preserved. 9540b789ec8aSmrg 954106c34b88Smrg# serial 5 lt~obsolete.m4 954206c34b88Smrg 954306c34b88Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 9544b789ec8aSmrg# 954506c34b88Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 954606c34b88Smrg# which have later been changed to m4_define as they aren't part of the 954706c34b88Smrg# exported API, or moved to Autoconf or Automake where they belong. 9548b789ec8aSmrg# 954906c34b88Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 955006c34b88Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 955106c34b88Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 955206c34b88Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 955306c34b88Smrg# and doesn't know about Autoconf macros at all.) 9554b789ec8aSmrg# 955506c34b88Smrg# So we provide this file, which has a silly filename so it's always 955606c34b88Smrg# included after everything else. This provides aclocal with the 955706c34b88Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 955806c34b88Smrg# because those macros already exist, or will be overwritten later. 955906c34b88Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 956006c34b88Smrg# 956106c34b88Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 956206c34b88Smrg# Yes, that means every name once taken will need to remain here until 956306c34b88Smrg# we give up compatibility with versions before 1.7, at which point 956406c34b88Smrg# we need to keep only those names which we still refer to. 9565b789ec8aSmrg 956606c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 956706c34b88SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 956806c34b88Smrg 956906c34b88Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 957006c34b88Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 957106c34b88Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 957206c34b88Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 957306c34b88Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 957406c34b88Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 957506c34b88Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 957606c34b88Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 957706c34b88Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 957806c34b88Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 957906c34b88Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 958006c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 958106c34b88Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 958206c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 958306c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 958406c34b88Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 958506c34b88Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 958606c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 958706c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 958806c34b88Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 958906c34b88Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 959006c34b88Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 959106c34b88Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 959206c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 959306c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 959406c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 959506c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 959606c34b88Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 959706c34b88Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 959806c34b88Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 959906c34b88Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 960006c34b88Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 960106c34b88Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 960206c34b88Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 960306c34b88Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 960406c34b88Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 960506c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 960606c34b88Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 960706c34b88Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 960806c34b88Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 960906c34b88Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 961006c34b88Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 961106c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 961206c34b88Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 961306c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 961406c34b88Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 961506c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 961606c34b88Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 961706c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 961806c34b88Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 961906c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 962006c34b88Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 962106c34b88Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 962206c34b88Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 962306c34b88Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 962406c34b88Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 962506c34b88Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 962606c34b88Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 962706c34b88Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 962806c34b88Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 962906c34b88Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 963006c34b88Smrg 963106c34b88Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 963206c34b88Smrg# serial 1 (pkg-config-0.24) 963306c34b88Smrg# 963406c34b88Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9635b789ec8aSmrg# 963606c34b88Smrg# This program is free software; you can redistribute it and/or modify 963706c34b88Smrg# it under the terms of the GNU General Public License as published by 963806c34b88Smrg# the Free Software Foundation; either version 2 of the License, or 963906c34b88Smrg# (at your option) any later version. 9640b789ec8aSmrg# 964106c34b88Smrg# This program is distributed in the hope that it will be useful, but 964206c34b88Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 964306c34b88Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 964406c34b88Smrg# General Public License for more details. 9645b789ec8aSmrg# 964606c34b88Smrg# You should have received a copy of the GNU General Public License 964706c34b88Smrg# along with this program; if not, write to the Free Software 964806c34b88Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 964906c34b88Smrg# 965006c34b88Smrg# As a special exception to the GNU General Public License, if you 965106c34b88Smrg# distribute this file as part of a program that contains a 965206c34b88Smrg# configuration script generated by Autoconf, you may include it under 965306c34b88Smrg# the same distribution terms that you use for the rest of that program. 965406c34b88Smrg 965506c34b88Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 965606c34b88Smrg# ---------------------------------- 965706c34b88SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 965806c34b88Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 965906c34b88Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 966006c34b88SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 966106c34b88SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 966206c34b88SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 966306c34b88Smrg 966406c34b88Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 966506c34b88Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 966606c34b88Smrgfi 966706c34b88Smrgif test -n "$PKG_CONFIG"; then 966806c34b88Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 966906c34b88Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 967006c34b88Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 967106c34b88Smrg AC_MSG_RESULT([yes]) 967206c34b88Smrg else 967306c34b88Smrg AC_MSG_RESULT([no]) 967406c34b88Smrg PKG_CONFIG="" 967506c34b88Smrg fi 967606c34b88Smrgfi[]dnl 967706c34b88Smrg])# PKG_PROG_PKG_CONFIG 9678b789ec8aSmrg 967906c34b88Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9680b789ec8aSmrg# 968106c34b88Smrg# Check to see whether a particular set of modules exists. Similar 968206c34b88Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9683b789ec8aSmrg# 968406c34b88Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 968506c34b88Smrg# only at the first occurence in configure.ac, so if the first place 968606c34b88Smrg# it's called might be skipped (such as if it is within an "if", you 968706c34b88Smrg# have to call PKG_CHECK_EXISTS manually 968806c34b88Smrg# -------------------------------------------------------------- 968906c34b88SmrgAC_DEFUN([PKG_CHECK_EXISTS], 969006c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 969106c34b88Smrgif test -n "$PKG_CONFIG" && \ 969206c34b88Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 969306c34b88Smrg m4_default([$2], [:]) 969406c34b88Smrgm4_ifvaln([$3], [else 969506c34b88Smrg $3])dnl 969606c34b88Smrgfi]) 9697b789ec8aSmrg 969806c34b88Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 969906c34b88Smrg# --------------------------------------------- 970006c34b88Smrgm4_define([_PKG_CONFIG], 970106c34b88Smrg[if test -n "$$1"; then 970206c34b88Smrg pkg_cv_[]$1="$$1" 970306c34b88Smrg elif test -n "$PKG_CONFIG"; then 970406c34b88Smrg PKG_CHECK_EXISTS([$3], 970506c34b88Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 970606c34b88Smrg [pkg_failed=yes]) 970706c34b88Smrg else 970806c34b88Smrg pkg_failed=untried 970906c34b88Smrgfi[]dnl 971006c34b88Smrg])# _PKG_CONFIG 971106c34b88Smrg 971206c34b88Smrg# _PKG_SHORT_ERRORS_SUPPORTED 971306c34b88Smrg# ----------------------------- 971406c34b88SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 971506c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 971606c34b88Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 971706c34b88Smrg _pkg_short_errors_supported=yes 971806c34b88Smrgelse 971906c34b88Smrg _pkg_short_errors_supported=no 972006c34b88Smrgfi[]dnl 972106c34b88Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 972206c34b88Smrg 972306c34b88Smrg 972406c34b88Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 972506c34b88Smrg# [ACTION-IF-NOT-FOUND]) 9726f1ee322dSmrg# 9727f1ee322dSmrg# 972806c34b88Smrg# Note that if there is a possibility the first call to 972906c34b88Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 973006c34b88Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9731f1ee322dSmrg# 9732f1ee322dSmrg# 973306c34b88Smrg# -------------------------------------------------------------- 973406c34b88SmrgAC_DEFUN([PKG_CHECK_MODULES], 973506c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 973606c34b88SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 973706c34b88SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9738f1ee322dSmrg 973906c34b88Smrgpkg_failed=no 974006c34b88SmrgAC_MSG_CHECKING([for $1]) 974106c34b88Smrg 974206c34b88Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 974306c34b88Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 974406c34b88Smrg 974506c34b88Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 974606c34b88Smrgand $1[]_LIBS to avoid the need to call pkg-config. 974706c34b88SmrgSee the pkg-config man page for more details.]) 974806c34b88Smrg 974906c34b88Smrgif test $pkg_failed = yes; then 975006c34b88Smrg AC_MSG_RESULT([no]) 975106c34b88Smrg _PKG_SHORT_ERRORS_SUPPORTED 975206c34b88Smrg if test $_pkg_short_errors_supported = yes; then 975306c34b88Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 975406c34b88Smrg else 975506c34b88Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 975606c34b88Smrg fi 975706c34b88Smrg # Put the nasty error message in config.log where it belongs 975806c34b88Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 975906c34b88Smrg 976006c34b88Smrg m4_default([$4], [AC_MSG_ERROR( 976106c34b88Smrg[Package requirements ($2) were not met: 976206c34b88Smrg 976306c34b88Smrg$$1_PKG_ERRORS 976406c34b88Smrg 976506c34b88SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 976606c34b88Smrginstalled software in a non-standard prefix. 976706c34b88Smrg 976806c34b88Smrg_PKG_TEXT]) 976906c34b88Smrg ]) 977006c34b88Smrgelif test $pkg_failed = untried; then 977106c34b88Smrg AC_MSG_RESULT([no]) 977206c34b88Smrg m4_default([$4], [AC_MSG_FAILURE( 977306c34b88Smrg[The pkg-config script could not be found or is too old. Make sure it 977406c34b88Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 977506c34b88Smrgpath to pkg-config. 977606c34b88Smrg 977706c34b88Smrg_PKG_TEXT 977806c34b88Smrg 977906c34b88SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 978006c34b88Smrg ]) 978106c34b88Smrgelse 978206c34b88Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 978306c34b88Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 978406c34b88Smrg AC_MSG_RESULT([yes]) 978506c34b88Smrg $3 978606c34b88Smrgfi[]dnl 978706c34b88Smrg])# PKG_CHECK_MODULES 978806c34b88Smrg 978906c34b88Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 979006c34b88Smrgdnl 979106c34b88Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 979206c34b88Smrgdnl 979306c34b88Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 979406c34b88Smrgdnl copy of this software and associated documentation files (the "Software"), 979506c34b88Smrgdnl to deal in the Software without restriction, including without limitation 979606c34b88Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 979706c34b88Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 979806c34b88Smrgdnl Software is furnished to do so, subject to the following conditions: 979906c34b88Smrgdnl 980006c34b88Smrgdnl The above copyright notice and this permission notice (including the next 980106c34b88Smrgdnl paragraph) shall be included in all copies or substantial portions of the 980206c34b88Smrgdnl Software. 980306c34b88Smrgdnl 980406c34b88Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 980506c34b88Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 980606c34b88Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 980706c34b88Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 980806c34b88Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 980906c34b88Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 981006c34b88Smrgdnl DEALINGS IN THE SOFTWARE. 981106c34b88Smrg 981206c34b88Smrg# XORG_MACROS_VERSION(required-version) 981306c34b88Smrg# ------------------------------------- 981406c34b88Smrg# Minimum version: 1.1.0 9815b789ec8aSmrg# 981606c34b88Smrg# If you're using a macro added in Version 1.1 or newer, include this in 981706c34b88Smrg# your configure.ac with the minimum required version, such as: 981806c34b88Smrg# XORG_MACROS_VERSION(1.1) 9819b789ec8aSmrg# 982006c34b88Smrg# To ensure that this macro is defined, also add: 982106c34b88Smrg# m4_ifndef([XORG_MACROS_VERSION], 982206c34b88Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9823b789ec8aSmrg# 9824f1ee322dSmrg# 982506c34b88Smrg# See the "minimum version" comment for each macro you use to see what 982606c34b88Smrg# version you require. 982706c34b88Smrgm4_defun([XORG_MACROS_VERSION],[ 982806c34b88Smrgm4_define([vers_have], [1.17]) 982906c34b88Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 983006c34b88Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 983106c34b88Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 983206c34b88Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 983306c34b88Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 983406c34b88Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 983506c34b88Smrgm4_undefine([vers_have]) 983606c34b88Smrgm4_undefine([maj_have]) 983706c34b88Smrgm4_undefine([maj_needed]) 983806c34b88Smrg]) # XORG_MACROS_VERSION 983906c34b88Smrg 984006c34b88Smrg# XORG_PROG_RAWCPP() 984106c34b88Smrg# ------------------ 984206c34b88Smrg# Minimum version: 1.0.0 984306c34b88Smrg# 984406c34b88Smrg# Find cpp program and necessary flags for use in pre-processing text files 984506c34b88Smrg# such as man pages and config files 984606c34b88SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 984706c34b88SmrgAC_REQUIRE([AC_PROG_CPP]) 984806c34b88SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 984906c34b88Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 985006c34b88Smrg 985106c34b88Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 985206c34b88Smrg# which is not the best choice for supporting other OS'es, but covers most 985306c34b88Smrg# of the ones we need for now. 985406c34b88SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 985506c34b88SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 985606c34b88Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 985706c34b88Smrg AC_MSG_RESULT([no]) 985806c34b88Smrgelse 985906c34b88Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 986006c34b88Smrg RAWCPPFLAGS=-undef 986106c34b88Smrg AC_MSG_RESULT([yes]) 986206c34b88Smrg # under Cygwin unix is still defined even with -undef 986306c34b88Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 986406c34b88Smrg RAWCPPFLAGS="-undef -ansi" 986506c34b88Smrg AC_MSG_RESULT([yes, with -ansi]) 986606c34b88Smrg else 986706c34b88Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 986806c34b88Smrg fi 986906c34b88Smrgfi 987006c34b88Smrgrm -f conftest.$ac_ext 987106c34b88Smrg 987206c34b88SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 987306c34b88SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 987406c34b88Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 987506c34b88Smrg AC_MSG_RESULT([no]) 987606c34b88Smrgelse 987706c34b88Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 987806c34b88Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 987906c34b88Smrg AC_MSG_RESULT([yes]) 988006c34b88Smrg else 988106c34b88Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 988206c34b88Smrg fi 988306c34b88Smrgfi 988406c34b88Smrgrm -f conftest.$ac_ext 988506c34b88SmrgAC_SUBST(RAWCPPFLAGS) 988606c34b88Smrg]) # XORG_PROG_RAWCPP 988706c34b88Smrg 988806c34b88Smrg# XORG_MANPAGE_SECTIONS() 988906c34b88Smrg# ----------------------- 989006c34b88Smrg# Minimum version: 1.0.0 9891b789ec8aSmrg# 989206c34b88Smrg# Determine which sections man pages go in for the different man page types 989306c34b88Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 989406c34b88Smrg# Not sure if there's any better way than just hardcoding by OS name. 989506c34b88Smrg# Override default settings by setting environment variables 989606c34b88Smrg# Added MAN_SUBSTS in version 1.8 989706c34b88Smrg# Added AC_PROG_SED in version 1.8 9898b789ec8aSmrg 989906c34b88SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 990006c34b88SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 990106c34b88SmrgAC_REQUIRE([AC_PROG_SED]) 990206c34b88Smrg 990306c34b88Smrgif test x$APP_MAN_SUFFIX = x ; then 990406c34b88Smrg APP_MAN_SUFFIX=1 990506c34b88Smrgfi 990606c34b88Smrgif test x$APP_MAN_DIR = x ; then 990706c34b88Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9908b789ec8aSmrgfi 9909c43cc173Smrg 991006c34b88Smrgif test x$LIB_MAN_SUFFIX = x ; then 991106c34b88Smrg LIB_MAN_SUFFIX=3 991206c34b88Smrgfi 991306c34b88Smrgif test x$LIB_MAN_DIR = x ; then 991406c34b88Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9915b789ec8aSmrgfi 9916c43cc173Smrg 991706c34b88Smrgif test x$FILE_MAN_SUFFIX = x ; then 991806c34b88Smrg case $host_os in 991906c34b88Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 992006c34b88Smrg *) FILE_MAN_SUFFIX=5 ;; 992106c34b88Smrg esac 992206c34b88Smrgfi 992306c34b88Smrgif test x$FILE_MAN_DIR = x ; then 992406c34b88Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9925b789ec8aSmrgfi 992637eb1ca1Smrg 992706c34b88Smrgif test x$MISC_MAN_SUFFIX = x ; then 992806c34b88Smrg case $host_os in 992906c34b88Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 993006c34b88Smrg *) MISC_MAN_SUFFIX=7 ;; 993106c34b88Smrg esac 993206c34b88Smrgfi 993306c34b88Smrgif test x$MISC_MAN_DIR = x ; then 993406c34b88Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9935b789ec8aSmrgfi 9936b789ec8aSmrg 993706c34b88Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 993806c34b88Smrg case $host_os in 993906c34b88Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 994006c34b88Smrg *) DRIVER_MAN_SUFFIX=4 ;; 994106c34b88Smrg esac 994206c34b88Smrgfi 994306c34b88Smrgif test x$DRIVER_MAN_DIR = x ; then 994406c34b88Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 994506c34b88Smrgfi 9946b789ec8aSmrg 994706c34b88Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 994806c34b88Smrg case $host_os in 994906c34b88Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 995006c34b88Smrg *) ADMIN_MAN_SUFFIX=8 ;; 995106c34b88Smrg esac 995206c34b88Smrgfi 995306c34b88Smrgif test x$ADMIN_MAN_DIR = x ; then 995406c34b88Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9955b789ec8aSmrgfi 9956c43cc173Smrg 995706c34b88Smrg 995806c34b88SmrgAC_SUBST([APP_MAN_SUFFIX]) 995906c34b88SmrgAC_SUBST([LIB_MAN_SUFFIX]) 996006c34b88SmrgAC_SUBST([FILE_MAN_SUFFIX]) 996106c34b88SmrgAC_SUBST([MISC_MAN_SUFFIX]) 996206c34b88SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 996306c34b88SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 996406c34b88SmrgAC_SUBST([APP_MAN_DIR]) 996506c34b88SmrgAC_SUBST([LIB_MAN_DIR]) 996606c34b88SmrgAC_SUBST([FILE_MAN_DIR]) 996706c34b88SmrgAC_SUBST([MISC_MAN_DIR]) 996806c34b88SmrgAC_SUBST([DRIVER_MAN_DIR]) 996906c34b88SmrgAC_SUBST([ADMIN_MAN_DIR]) 997006c34b88Smrg 997106c34b88SmrgXORG_MAN_PAGE="X Version 11" 997206c34b88SmrgAC_SUBST([XORG_MAN_PAGE]) 997306c34b88SmrgMAN_SUBSTS="\ 997406c34b88Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 997506c34b88Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 997606c34b88Smrg -e 's|__xservername__|Xorg|g' \ 997706c34b88Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 997806c34b88Smrg -e 's|__xorgconfdir__|xorg.conf.d|g' \ 997906c34b88Smrg -e 's|__projectroot__|\$(prefix)|g' \ 998006c34b88Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 998106c34b88Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 998206c34b88Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 998306c34b88Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 998406c34b88Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 998506c34b88Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 998606c34b88Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 998706c34b88SmrgAC_SUBST([MAN_SUBSTS]) 998806c34b88Smrg 998906c34b88Smrg]) # XORG_MANPAGE_SECTIONS 999006c34b88Smrg 999106c34b88Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 999206c34b88Smrg# ------------------------ 999306c34b88Smrg# Minimum version: 1.7.0 9994b789ec8aSmrg# 999506c34b88Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 999606c34b88Smrg# provided by xorg-sgml-doctools, if installed. 999706c34b88SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 999806c34b88SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 999906c34b88SmrgXORG_SGML_PATH= 1000006c34b88SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1000106c34b88Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1000206c34b88Smrg [m4_ifval([$1],[:], 1000306c34b88Smrg [if test x"$cross_compiling" != x"yes" ; then 1000406c34b88Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1000506c34b88Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1000606c34b88Smrg fi]) 1000706c34b88Smrg ]) 1000806c34b88Smrg 1000906c34b88Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1001006c34b88Smrg# the path and the name of the doc stylesheet 1001106c34b88Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1001206c34b88Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1001306c34b88Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1001406c34b88Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10015b789ec8aSmrgelse 1001606c34b88Smrg AC_MSG_RESULT([no]) 10017b789ec8aSmrgfi 10018b789ec8aSmrg 1001906c34b88SmrgAC_SUBST(XORG_SGML_PATH) 1002006c34b88SmrgAC_SUBST(STYLESHEET_SRCDIR) 1002106c34b88SmrgAC_SUBST(XSL_STYLESHEET) 1002206c34b88SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1002306c34b88Smrg]) # XORG_CHECK_SGML_DOCTOOLS 1002406c34b88Smrg 1002506c34b88Smrg# XORG_CHECK_LINUXDOC 1002606c34b88Smrg# ------------------- 1002706c34b88Smrg# Minimum version: 1.0.0 10028f1ee322dSmrg# 1002906c34b88Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1003006c34b88Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1003106c34b88Smrg# Whether or not the necessary tools and files are found can be checked 1003206c34b88Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1003306c34b88SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1003406c34b88SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1003506c34b88SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10036f1ee322dSmrg 1003706c34b88SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10038f1ee322dSmrg 1003906c34b88SmrgAC_MSG_CHECKING([whether to build documentation]) 10040f1ee322dSmrg 1004106c34b88Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1004206c34b88Smrg BUILDDOC=yes 1004306c34b88Smrgelse 1004406c34b88Smrg BUILDDOC=no 10045f1ee322dSmrgfi 10046f1ee322dSmrg 1004706c34b88SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10048f1ee322dSmrg 1004906c34b88SmrgAC_MSG_RESULT([$BUILDDOC]) 10050c43cc173Smrg 1005106c34b88SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10052c43cc173Smrg 1005306c34b88Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1005406c34b88Smrg BUILDPDFDOC=yes 1005589069ce9Smrgelse 1005606c34b88Smrg BUILDPDFDOC=no 1005721e67964Smrgfi 10058c43cc173Smrg 1005906c34b88SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10060b789ec8aSmrg 1006106c34b88SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10062c43cc173Smrg 1006306c34b88SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1006406c34b88SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1006506c34b88SmrgMAKE_PDF="$PS2PDF" 1006606c34b88SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10067c43cc173Smrg 1006806c34b88SmrgAC_SUBST(MAKE_TEXT) 1006906c34b88SmrgAC_SUBST(MAKE_PS) 1007006c34b88SmrgAC_SUBST(MAKE_PDF) 1007106c34b88SmrgAC_SUBST(MAKE_HTML) 1007206c34b88Smrg]) # XORG_CHECK_LINUXDOC 100733e256790Smrg 1007406c34b88Smrg# XORG_CHECK_DOCBOOK 1007506c34b88Smrg# ------------------- 1007606c34b88Smrg# Minimum version: 1.0.0 1007706c34b88Smrg# 1007806c34b88Smrg# Checks for the ability to build output formats from SGML DocBook source. 1007906c34b88Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1008006c34b88Smrg# indicates whether the necessary tools and files are found and, if set, 1008106c34b88Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1008206c34b88SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1008306c34b88SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 100843e256790Smrg 1008506c34b88SmrgBUILDTXTDOC=no 1008606c34b88SmrgBUILDPDFDOC=no 1008706c34b88SmrgBUILDPSDOC=no 1008806c34b88SmrgBUILDHTMLDOC=no 10089c43cc173Smrg 1009006c34b88SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1009106c34b88SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1009206c34b88SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1009306c34b88SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10094c43cc173Smrg 1009506c34b88SmrgAC_MSG_CHECKING([whether to build text documentation]) 1009606c34b88Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1009706c34b88Smrg test x$BUILD_TXTDOC != xno; then 1009806c34b88Smrg BUILDTXTDOC=yes 1009906c34b88Smrgfi 1010006c34b88SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1010106c34b88SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1010221e67964Smrg 1010306c34b88SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1010406c34b88Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1010506c34b88Smrg test x$BUILD_PDFDOC != xno; then 1010606c34b88Smrg BUILDPDFDOC=yes 1010706c34b88Smrgfi 1010806c34b88SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1010906c34b88SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10110c43cc173Smrg 1011106c34b88SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1011206c34b88Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1011306c34b88Smrg test x$BUILD_PSDOC != xno; then 1011406c34b88Smrg BUILDPSDOC=yes 1011506c34b88Smrgfi 1011606c34b88SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1011706c34b88SmrgAC_MSG_RESULT([$BUILDPSDOC]) 10118c43cc173Smrg 1011906c34b88SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1012006c34b88Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1012106c34b88Smrg test x$BUILD_HTMLDOC != xno; then 1012206c34b88Smrg BUILDHTMLDOC=yes 10123b789ec8aSmrgfi 1012406c34b88SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1012506c34b88SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10126c43cc173Smrg 1012706c34b88SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1012806c34b88SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1012906c34b88SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1013006c34b88SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10131c43cc173Smrg 1013206c34b88SmrgAC_SUBST(MAKE_TEXT) 1013306c34b88SmrgAC_SUBST(MAKE_PS) 1013406c34b88SmrgAC_SUBST(MAKE_PDF) 1013506c34b88SmrgAC_SUBST(MAKE_HTML) 1013606c34b88Smrg]) # XORG_CHECK_DOCBOOK 1013721e67964Smrg 1013806c34b88Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1013906c34b88Smrg# ---------------- 1014006c34b88Smrg# Minimum version: 1.5.0 1014106c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10142f1ee322dSmrg# 1014306c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 1014406c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 1014506c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1014606c34b88Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1014706c34b88Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1014806c34b88Smrg# --with-xmlto assumes 'auto'. 10149f1ee322dSmrg# 1015006c34b88Smrg# Interface to module: 1015106c34b88Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1015206c34b88Smrg# XMLTO: returns the path of the xmlto program found 1015306c34b88Smrg# returns the path set by the user in the environment 1015406c34b88Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1015506c34b88Smrg# 'no' user instructs the module not to use xmlto 10156f1ee322dSmrg# 1015706c34b88Smrg# Added in version 1.10.0 1015806c34b88Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1015906c34b88Smrg# xmlto for text output requires either lynx, links, or w3m browsers 10160f1ee322dSmrg# 1016106c34b88Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10162f1ee322dSmrg# 1016306c34b88SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1016406c34b88SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1016506c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 1016606c34b88SmrgAC_ARG_WITH(xmlto, 1016706c34b88Smrg AS_HELP_STRING([--with-xmlto], 1016806c34b88Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1016906c34b88Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1017006c34b88Smrgm4_undefine([_defopt]) 10171f1ee322dSmrg 1017206c34b88Smrgif test "x$use_xmlto" = x"auto"; then 1017306c34b88Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1017406c34b88Smrg if test "x$XMLTO" = "x"; then 1017506c34b88Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1017606c34b88Smrg have_xmlto=no 1017706c34b88Smrg else 1017806c34b88Smrg have_xmlto=yes 1017906c34b88Smrg fi 1018006c34b88Smrgelif test "x$use_xmlto" = x"yes" ; then 1018106c34b88Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1018206c34b88Smrg if test "x$XMLTO" = "x"; then 1018306c34b88Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1018406c34b88Smrg fi 1018506c34b88Smrg have_xmlto=yes 1018606c34b88Smrgelif test "x$use_xmlto" = x"no" ; then 1018706c34b88Smrg if test "x$XMLTO" != "x"; then 1018806c34b88Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1018906c34b88Smrg fi 1019006c34b88Smrg have_xmlto=no 1019106c34b88Smrgelse 1019206c34b88Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10193f1ee322dSmrgfi 10194f1ee322dSmrg 1019506c34b88Smrg# Test for a minimum version of xmlto, if provided. 1019606c34b88Smrgm4_ifval([$1], 1019706c34b88Smrg[if test "$have_xmlto" = yes; then 1019806c34b88Smrg # scrape the xmlto version 1019906c34b88Smrg AC_MSG_CHECKING([the xmlto version]) 1020006c34b88Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1020106c34b88Smrg AC_MSG_RESULT([$xmlto_version]) 1020206c34b88Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1020306c34b88Smrg [if test "x$use_xmlto" = xauto; then 1020406c34b88Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1020506c34b88Smrg have_xmlto=no 1020606c34b88Smrg else 1020706c34b88Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1020806c34b88Smrg fi]) 1020906c34b88Smrgfi]) 10210f1ee322dSmrg 1021106c34b88Smrg# Test for the ability of xmlto to generate a text target 1021206c34b88Smrghave_xmlto_text=no 1021306c34b88Smrgcat > conftest.xml << "EOF" 1021406c34b88SmrgEOF 1021506c34b88SmrgAS_IF([test "$have_xmlto" = yes], 1021606c34b88Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1021706c34b88Smrg [have_xmlto_text=yes], 1021806c34b88Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1021906c34b88Smrgrm -f conftest.xml 1022006c34b88SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1022106c34b88SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1022206c34b88Smrg]) # XORG_WITH_XMLTO 10223f1ee322dSmrg 1022406c34b88Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1022506c34b88Smrg# -------------------------------------------- 1022606c34b88Smrg# Minimum version: 1.12.0 1022706c34b88Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1022806c34b88Smrg# 1022906c34b88Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1023006c34b88Smrg# XML-based language used for the transformation of XML documents. 1023106c34b88Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1023206c34b88Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1023306c34b88Smrg# The XSLT processor is often used as a standalone tool for transformations. 1023406c34b88Smrg# It should not be assumed that this tool is used only to work with documnetation. 1023506c34b88Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1023606c34b88Smrg# 1023706c34b88Smrg# Interface to module: 1023806c34b88Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1023906c34b88Smrg# XSLTPROC: returns the path of the xsltproc program found 1024006c34b88Smrg# returns the path set by the user in the environment 1024106c34b88Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1024206c34b88Smrg# 'no' user instructs the module not to use xsltproc 1024306c34b88Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1024406c34b88Smrg# 1024506c34b88Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1024606c34b88Smrg# 1024706c34b88SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1024806c34b88SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1024906c34b88Smrg# Preserves the interface, should it be implemented later 1025006c34b88Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1025106c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 1025206c34b88SmrgAC_ARG_WITH(xsltproc, 1025306c34b88Smrg AS_HELP_STRING([--with-xsltproc], 1025406c34b88Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1025506c34b88Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1025606c34b88Smrgm4_undefine([_defopt]) 10257f1ee322dSmrg 1025806c34b88Smrgif test "x$use_xsltproc" = x"auto"; then 1025906c34b88Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1026006c34b88Smrg if test "x$XSLTPROC" = "x"; then 1026106c34b88Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1026206c34b88Smrg have_xsltproc=no 1026306c34b88Smrg else 1026406c34b88Smrg have_xsltproc=yes 1026506c34b88Smrg fi 1026606c34b88Smrgelif test "x$use_xsltproc" = x"yes" ; then 1026706c34b88Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1026806c34b88Smrg if test "x$XSLTPROC" = "x"; then 1026906c34b88Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1027006c34b88Smrg fi 1027106c34b88Smrg have_xsltproc=yes 1027206c34b88Smrgelif test "x$use_xsltproc" = x"no" ; then 1027306c34b88Smrg if test "x$XSLTPROC" != "x"; then 1027406c34b88Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1027506c34b88Smrg fi 1027606c34b88Smrg have_xsltproc=no 1027706c34b88Smrgelse 1027806c34b88Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1027906c34b88Smrgfi 10280f1ee322dSmrg 1028106c34b88SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1028206c34b88Smrg]) # XORG_WITH_XSLTPROC 1028306c34b88Smrg 1028406c34b88Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1028506c34b88Smrg# ---------------------------------------- 1028606c34b88Smrg# Minimum version: 1.15.0 10287f1ee322dSmrg# 1028806c34b88Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1028906c34b88Smrg# scanning arbitrary text files, extracting information from those text files, 1029006c34b88Smrg# and printing reports based on that information. 10291f1ee322dSmrg# 1029206c34b88Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 10293f1ee322dSmrg# 1029406c34b88Smrg# Interface to module: 1029506c34b88Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1029606c34b88Smrg# PERL: returns the path of the perl program found 1029706c34b88Smrg# returns the path set by the user in the environment 1029806c34b88Smrg# --with-perl: 'yes' user instructs the module to use perl 1029906c34b88Smrg# 'no' user instructs the module not to use perl 1030006c34b88Smrg# have_perl: returns yes if perl found in PATH or no 1030106c34b88Smrg# 1030206c34b88Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1030306c34b88Smrg# 1030406c34b88SmrgAC_DEFUN([XORG_WITH_PERL],[ 1030506c34b88SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1030606c34b88Smrg# Preserves the interface, should it be implemented later 1030706c34b88Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1030806c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 1030906c34b88SmrgAC_ARG_WITH(perl, 1031006c34b88Smrg AS_HELP_STRING([--with-perl], 1031106c34b88Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1031206c34b88Smrg [use_perl=$withval], [use_perl=]_defopt) 1031306c34b88Smrgm4_undefine([_defopt]) 10314f1ee322dSmrg 1031506c34b88Smrgif test "x$use_perl" = x"auto"; then 1031606c34b88Smrg AC_PATH_PROG([PERL], [perl]) 1031706c34b88Smrg if test "x$PERL" = "x"; then 1031806c34b88Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1031906c34b88Smrg have_perl=no 1032006c34b88Smrg else 1032106c34b88Smrg have_perl=yes 1032206c34b88Smrg fi 1032306c34b88Smrgelif test "x$use_perl" = x"yes" ; then 1032406c34b88Smrg AC_PATH_PROG([PERL], [perl]) 1032506c34b88Smrg if test "x$PERL" = "x"; then 1032606c34b88Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1032706c34b88Smrg fi 1032806c34b88Smrg have_perl=yes 1032906c34b88Smrgelif test "x$use_perl" = x"no" ; then 1033006c34b88Smrg if test "x$PERL" != "x"; then 1033106c34b88Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1033206c34b88Smrg fi 1033306c34b88Smrg have_perl=no 10334f1ee322dSmrgelse 1033506c34b88Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10336f1ee322dSmrgfi 10337f1ee322dSmrg 1033806c34b88SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1033906c34b88Smrg]) # XORG_WITH_PERL 10340f1ee322dSmrg 1034106c34b88Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1034206c34b88Smrg# ---------------- 1034306c34b88Smrg# Minimum version: 1.5.0 1034406c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1034506c34b88Smrg# 1034606c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 1034706c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 1034806c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1034906c34b88Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1035006c34b88Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1035106c34b88Smrg# --with-asciidoc assumes 'auto'. 1035206c34b88Smrg# 1035306c34b88Smrg# Interface to module: 1035406c34b88Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1035506c34b88Smrg# ASCIIDOC: returns the path of the asciidoc program found 1035606c34b88Smrg# returns the path set by the user in the environment 1035706c34b88Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1035806c34b88Smrg# 'no' user instructs the module not to use asciidoc 1035906c34b88Smrg# 1036006c34b88Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1036106c34b88Smrg# 1036206c34b88SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1036306c34b88SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1036406c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 1036506c34b88SmrgAC_ARG_WITH(asciidoc, 1036606c34b88Smrg AS_HELP_STRING([--with-asciidoc], 1036706c34b88Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1036806c34b88Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1036906c34b88Smrgm4_undefine([_defopt]) 10370f1ee322dSmrg 1037106c34b88Smrgif test "x$use_asciidoc" = x"auto"; then 1037206c34b88Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1037306c34b88Smrg if test "x$ASCIIDOC" = "x"; then 1037406c34b88Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1037506c34b88Smrg have_asciidoc=no 1037606c34b88Smrg else 1037706c34b88Smrg have_asciidoc=yes 1037806c34b88Smrg fi 1037906c34b88Smrgelif test "x$use_asciidoc" = x"yes" ; then 1038006c34b88Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1038106c34b88Smrg if test "x$ASCIIDOC" = "x"; then 1038206c34b88Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1038306c34b88Smrg fi 1038406c34b88Smrg have_asciidoc=yes 1038506c34b88Smrgelif test "x$use_asciidoc" = x"no" ; then 1038606c34b88Smrg if test "x$ASCIIDOC" != "x"; then 1038706c34b88Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1038806c34b88Smrg fi 1038906c34b88Smrg have_asciidoc=no 10390f1ee322dSmrgelse 1039106c34b88Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10392f1ee322dSmrgfi 1039306c34b88Smrgm4_ifval([$1], 1039406c34b88Smrg[if test "$have_asciidoc" = yes; then 1039506c34b88Smrg # scrape the asciidoc version 1039606c34b88Smrg AC_MSG_CHECKING([the asciidoc version]) 1039706c34b88Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1039806c34b88Smrg AC_MSG_RESULT([$asciidoc_version]) 1039906c34b88Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1040006c34b88Smrg [if test "x$use_asciidoc" = xauto; then 1040106c34b88Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1040206c34b88Smrg have_asciidoc=no 1040306c34b88Smrg else 1040406c34b88Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1040506c34b88Smrg fi]) 1040606c34b88Smrgfi]) 1040706c34b88SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1040806c34b88Smrg]) # XORG_WITH_ASCIIDOC 10409f1ee322dSmrg 1041006c34b88Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1041106c34b88Smrg# -------------------------------- 1041206c34b88Smrg# Minimum version: 1.5.0 1041306c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1041406c34b88Smrg# 1041506c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 1041606c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 1041706c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1041806c34b88Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1041906c34b88Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1042006c34b88Smrg# --with-doxygen assumes 'auto'. 1042106c34b88Smrg# 1042206c34b88Smrg# Interface to module: 1042306c34b88Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1042406c34b88Smrg# DOXYGEN: returns the path of the doxygen program found 1042506c34b88Smrg# returns the path set by the user in the environment 1042606c34b88Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1042706c34b88Smrg# 'no' user instructs the module not to use doxygen 1042806c34b88Smrg# 1042906c34b88Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1043006c34b88Smrg# 1043106c34b88SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1043206c34b88SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1043306c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 1043406c34b88SmrgAC_ARG_WITH(doxygen, 1043506c34b88Smrg AS_HELP_STRING([--with-doxygen], 1043606c34b88Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1043706c34b88Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1043806c34b88Smrgm4_undefine([_defopt]) 1043906c34b88Smrg 1044006c34b88Smrgif test "x$use_doxygen" = x"auto"; then 1044106c34b88Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1044206c34b88Smrg if test "x$DOXYGEN" = "x"; then 1044306c34b88Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1044406c34b88Smrg have_doxygen=no 1044506c34b88Smrg else 1044606c34b88Smrg have_doxygen=yes 1044706c34b88Smrg fi 1044806c34b88Smrgelif test "x$use_doxygen" = x"yes" ; then 1044906c34b88Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1045006c34b88Smrg if test "x$DOXYGEN" = "x"; then 1045106c34b88Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1045206c34b88Smrg fi 1045306c34b88Smrg have_doxygen=yes 1045406c34b88Smrgelif test "x$use_doxygen" = x"no" ; then 1045506c34b88Smrg if test "x$DOXYGEN" != "x"; then 1045606c34b88Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1045706c34b88Smrg fi 1045806c34b88Smrg have_doxygen=no 1045906c34b88Smrgelse 1046006c34b88Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1046106c34b88Smrgfi 1046206c34b88Smrgm4_ifval([$1], 1046306c34b88Smrg[if test "$have_doxygen" = yes; then 1046406c34b88Smrg # scrape the doxygen version 1046506c34b88Smrg AC_MSG_CHECKING([the doxygen version]) 1046606c34b88Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1046706c34b88Smrg AC_MSG_RESULT([$doxygen_version]) 1046806c34b88Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1046906c34b88Smrg [if test "x$use_doxygen" = xauto; then 1047006c34b88Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1047106c34b88Smrg have_doxygen=no 1047206c34b88Smrg else 1047306c34b88Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1047406c34b88Smrg fi]) 1047506c34b88Smrgfi]) 1047606c34b88SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1047706c34b88Smrg]) # XORG_WITH_DOXYGEN 10478f1ee322dSmrg 1047906c34b88Smrg# XORG_WITH_GROFF([DEFAULT]) 1048006c34b88Smrg# ---------------- 1048106c34b88Smrg# Minimum version: 1.6.0 1048206c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10483c43cc173Smrg# 1048406c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 1048506c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 1048606c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1048706c34b88Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1048806c34b88Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1048906c34b88Smrg# --with-groff assumes 'auto'. 1049037eb1ca1Smrg# 1049106c34b88Smrg# Interface to module: 1049206c34b88Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1049306c34b88Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1049406c34b88Smrg# HAVE_GROFF_MS: the -ms macros package 1049506c34b88Smrg# GROFF: returns the path of the groff program found 1049606c34b88Smrg# returns the path set by the user in the environment 1049706c34b88Smrg# --with-groff: 'yes' user instructs the module to use groff 1049806c34b88Smrg# 'no' user instructs the module not to use groff 10499f1ee322dSmrg# 1050006c34b88Smrg# Added in version 1.9.0: 1050106c34b88Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1050206c34b88Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1050306c34b88Smrg# psselect from the psutils package. 1050406c34b88Smrg# the ghostcript package. Refer to the grohtml man pages 10505b789ec8aSmrg# 1050606c34b88Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10507f1ee322dSmrg# 1050806c34b88Smrg# OS and distros often splits groff in a basic and full package, the former 1050906c34b88Smrg# having the groff program and the later having devices, fonts and macros 1051006c34b88Smrg# Checking for the groff executable is not enough. 1051106c34b88Smrg# 1051206c34b88Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1051306c34b88Smrg# unset HAVE_GROFF or GROFF env variables. 1051406c34b88Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1051506c34b88Smrg# 1051606c34b88SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1051706c34b88SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1051806c34b88Smrgm4_define([_defopt], m4_default([$1], [auto])) 1051906c34b88SmrgAC_ARG_WITH(groff, 1052006c34b88Smrg AS_HELP_STRING([--with-groff], 1052106c34b88Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1052206c34b88Smrg [use_groff=$withval], [use_groff=]_defopt) 1052306c34b88Smrgm4_undefine([_defopt]) 10524f1ee322dSmrg 1052506c34b88Smrgif test "x$use_groff" = x"auto"; then 1052606c34b88Smrg AC_PATH_PROG([GROFF], [groff]) 1052706c34b88Smrg if test "x$GROFF" = "x"; then 1052806c34b88Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1052906c34b88Smrg have_groff=no 1053006c34b88Smrg else 1053106c34b88Smrg have_groff=yes 1053206c34b88Smrg fi 1053306c34b88Smrgelif test "x$use_groff" = x"yes" ; then 1053406c34b88Smrg AC_PATH_PROG([GROFF], [groff]) 1053506c34b88Smrg if test "x$GROFF" = "x"; then 1053606c34b88Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1053706c34b88Smrg fi 1053806c34b88Smrg have_groff=yes 1053906c34b88Smrgelif test "x$use_groff" = x"no" ; then 1054006c34b88Smrg if test "x$GROFF" != "x"; then 1054106c34b88Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1054206c34b88Smrg fi 1054306c34b88Smrg have_groff=no 1054406c34b88Smrgelse 1054506c34b88Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 105463e256790Smrgfi 105473e256790Smrg 1054806c34b88Smrg# We have groff, test for the presence of the macro packages 1054906c34b88Smrgif test "x$have_groff" = x"yes"; then 1055006c34b88Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1055106c34b88Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1055206c34b88Smrg groff_ms_works=yes 1055306c34b88Smrg else 1055406c34b88Smrg groff_ms_works=no 1055506c34b88Smrg fi 1055606c34b88Smrg AC_MSG_RESULT([$groff_ms_works]) 1055706c34b88Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1055806c34b88Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1055906c34b88Smrg groff_mm_works=yes 1056006c34b88Smrg else 1056106c34b88Smrg groff_mm_works=no 1056206c34b88Smrg fi 1056306c34b88Smrg AC_MSG_RESULT([$groff_mm_works]) 1056406c34b88Smrgfi 105653e256790Smrg 1056606c34b88Smrg# We have groff, test for HTML dependencies, one command per package 1056706c34b88Smrgif test "x$have_groff" = x"yes"; then 1056806c34b88Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1056906c34b88Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1057006c34b88Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1057106c34b88Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1057206c34b88Smrg have_groff_html=yes 1057306c34b88Smrg else 1057406c34b88Smrg have_groff_html=no 1057506c34b88Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1057606c34b88Smrg fi 1057706c34b88Smrgfi 1057837eb1ca1Smrg 1057906c34b88Smrg# Set Automake conditionals for Makefiles 1058006c34b88SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1058106c34b88SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1058206c34b88SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1058306c34b88SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1058406c34b88Smrg]) # XORG_WITH_GROFF 1058537eb1ca1Smrg 1058606c34b88Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1058706c34b88Smrg# --------------------------------------- 1058806c34b88Smrg# Minimum version: 1.6.0 1058906c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1059006c34b88Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10591b789ec8aSmrg# 1059206c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 1059306c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 1059406c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1059506c34b88Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1059606c34b88Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1059706c34b88Smrg# --with-fop assumes 'auto'. 10598b789ec8aSmrg# 1059906c34b88Smrg# Interface to module: 1060006c34b88Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1060106c34b88Smrg# FOP: returns the path of the fop program found 1060206c34b88Smrg# returns the path set by the user in the environment 1060306c34b88Smrg# --with-fop: 'yes' user instructs the module to use fop 1060406c34b88Smrg# 'no' user instructs the module not to use fop 10605b789ec8aSmrg# 1060606c34b88Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1060737eb1ca1Smrg# 1060806c34b88SmrgAC_DEFUN([XORG_WITH_FOP],[ 1060906c34b88SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1061006c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 1061106c34b88SmrgAC_ARG_WITH(fop, 1061206c34b88Smrg AS_HELP_STRING([--with-fop], 1061306c34b88Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1061406c34b88Smrg [use_fop=$withval], [use_fop=]_defopt) 1061506c34b88Smrgm4_undefine([_defopt]) 10616f1ee322dSmrg 1061706c34b88Smrgif test "x$use_fop" = x"auto"; then 1061806c34b88Smrg AC_PATH_PROG([FOP], [fop]) 1061906c34b88Smrg if test "x$FOP" = "x"; then 1062006c34b88Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1062106c34b88Smrg have_fop=no 1062206c34b88Smrg else 1062306c34b88Smrg have_fop=yes 1062406c34b88Smrg fi 1062506c34b88Smrgelif test "x$use_fop" = x"yes" ; then 1062606c34b88Smrg AC_PATH_PROG([FOP], [fop]) 1062706c34b88Smrg if test "x$FOP" = "x"; then 1062806c34b88Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1062906c34b88Smrg fi 1063006c34b88Smrg have_fop=yes 1063106c34b88Smrgelif test "x$use_fop" = x"no" ; then 1063206c34b88Smrg if test "x$FOP" != "x"; then 1063306c34b88Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1063406c34b88Smrg fi 1063506c34b88Smrg have_fop=no 1063606c34b88Smrgelse 1063706c34b88Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1063806c34b88Smrgfi 1063937eb1ca1Smrg 1064006c34b88Smrg# Test for a minimum version of fop, if provided. 1064106c34b88Smrgm4_ifval([$1], 1064206c34b88Smrg[if test "$have_fop" = yes; then 1064306c34b88Smrg # scrape the fop version 1064406c34b88Smrg AC_MSG_CHECKING([for fop minimum version]) 1064506c34b88Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1064606c34b88Smrg AC_MSG_RESULT([$fop_version]) 1064706c34b88Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1064806c34b88Smrg [if test "x$use_fop" = xauto; then 1064906c34b88Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1065006c34b88Smrg have_fop=no 1065106c34b88Smrg else 1065206c34b88Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1065306c34b88Smrg fi]) 1065406c34b88Smrgfi]) 1065506c34b88SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1065606c34b88Smrg]) # XORG_WITH_FOP 1065737eb1ca1Smrg 1065806c34b88Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1065906c34b88Smrg# ---------------- 1066006c34b88Smrg# Minimum version: 1.6.0 1066106c34b88Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1066206c34b88Smrg# 1066306c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 1066406c34b88Smrg# not at the appropriate level. This macro enables a module to test for the 1066506c34b88Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1066606c34b88Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1066706c34b88Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1066806c34b88Smrg# --with-ps2pdf assumes 'auto'. 1066906c34b88Smrg# 1067006c34b88Smrg# Interface to module: 1067106c34b88Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1067206c34b88Smrg# PS2PDF: returns the path of the ps2pdf program found 1067306c34b88Smrg# returns the path set by the user in the environment 1067406c34b88Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1067506c34b88Smrg# 'no' user instructs the module not to use ps2pdf 1067606c34b88Smrg# 1067706c34b88Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1067806c34b88Smrg# 1067906c34b88SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1068006c34b88SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1068106c34b88Smrgm4_define([_defopt], m4_default([$1], [auto])) 1068206c34b88SmrgAC_ARG_WITH(ps2pdf, 1068306c34b88Smrg AS_HELP_STRING([--with-ps2pdf], 1068406c34b88Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1068506c34b88Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1068606c34b88Smrgm4_undefine([_defopt]) 1068737eb1ca1Smrg 1068806c34b88Smrgif test "x$use_ps2pdf" = x"auto"; then 1068906c34b88Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1069006c34b88Smrg if test "x$PS2PDF" = "x"; then 1069106c34b88Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1069206c34b88Smrg have_ps2pdf=no 1069306c34b88Smrg else 1069406c34b88Smrg have_ps2pdf=yes 1069506c34b88Smrg fi 1069606c34b88Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1069706c34b88Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1069806c34b88Smrg if test "x$PS2PDF" = "x"; then 1069906c34b88Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1070006c34b88Smrg fi 1070106c34b88Smrg have_ps2pdf=yes 1070206c34b88Smrgelif test "x$use_ps2pdf" = x"no" ; then 1070306c34b88Smrg if test "x$PS2PDF" != "x"; then 1070406c34b88Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1070506c34b88Smrg fi 1070606c34b88Smrg have_ps2pdf=no 1070706c34b88Smrgelse 1070806c34b88Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1070906c34b88Smrgfi 1071006c34b88SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1071106c34b88Smrg]) # XORG_WITH_PS2PDF 1071237eb1ca1Smrg 1071306c34b88Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1071406c34b88Smrg# ---------------- 1071506c34b88Smrg# Minimum version: 1.6.0 10716b789ec8aSmrg# 1071706c34b88Smrg# Documentation tools are not always available on all platforms and sometimes 1071806c34b88Smrg# not at the appropriate level. This macro enables a builder to skip all 1071906c34b88Smrg# documentation targets except traditional man pages. 1072006c34b88Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1072106c34b88Smrg# maximum flexibilty in controlling documentation building. 1072206c34b88Smrg# Refer to: 1072306c34b88Smrg# XORG_WITH_XMLTO --with-xmlto 1072406c34b88Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1072506c34b88Smrg# XORG_WITH_DOXYGEN --with-doxygen 1072606c34b88Smrg# XORG_WITH_FOP --with-fop 1072706c34b88Smrg# XORG_WITH_GROFF --with-groff 1072806c34b88Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1072906c34b88Smrg# 1073006c34b88Smrg# Interface to module: 1073106c34b88Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1073206c34b88Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1073306c34b88Smrg# 'no' user instructs the module not to generate docs 1073406c34b88Smrg# parm1: specify the default value, yes or no. 1073506c34b88Smrg# 1073606c34b88SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1073706c34b88Smrgm4_define([docs_default], m4_default([$1], [yes])) 1073806c34b88SmrgAC_ARG_ENABLE(docs, 1073906c34b88Smrg AS_HELP_STRING([--enable-docs], 1074006c34b88Smrg [Enable building the documentation (default: ]docs_default[)]), 1074106c34b88Smrg [build_docs=$enableval], [build_docs=]docs_default) 1074206c34b88Smrgm4_undefine([docs_default]) 1074306c34b88SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1074406c34b88SmrgAC_MSG_CHECKING([whether to build documentation]) 1074506c34b88SmrgAC_MSG_RESULT([$build_docs]) 1074606c34b88Smrg]) # XORG_ENABLE_DOCS 10747f1ee322dSmrg 1074806c34b88Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1074906c34b88Smrg# ---------------- 1075006c34b88Smrg# Minimum version: 1.6.0 1075189069ce9Smrg# 1075206c34b88Smrg# This macro enables a builder to skip all developer documentation. 1075306c34b88Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1075406c34b88Smrg# maximum flexibilty in controlling documentation building. 1075506c34b88Smrg# Refer to: 1075606c34b88Smrg# XORG_WITH_XMLTO --with-xmlto 1075706c34b88Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1075806c34b88Smrg# XORG_WITH_DOXYGEN --with-doxygen 1075906c34b88Smrg# XORG_WITH_FOP --with-fop 1076006c34b88Smrg# XORG_WITH_GROFF --with-groff 1076106c34b88Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1076289069ce9Smrg# 1076306c34b88Smrg# Interface to module: 1076406c34b88Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1076506c34b88Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1076606c34b88Smrg# 'no' user instructs the module not to generate developer docs 1076706c34b88Smrg# parm1: specify the default value, yes or no. 1076889069ce9Smrg# 1076906c34b88SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1077006c34b88Smrgm4_define([devel_default], m4_default([$1], [yes])) 1077106c34b88SmrgAC_ARG_ENABLE(devel-docs, 1077206c34b88Smrg AS_HELP_STRING([--enable-devel-docs], 1077306c34b88Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1077406c34b88Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1077506c34b88Smrgm4_undefine([devel_default]) 1077606c34b88SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1077706c34b88SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1077806c34b88SmrgAC_MSG_RESULT([$build_devel_docs]) 1077906c34b88Smrg]) # XORG_ENABLE_DEVEL_DOCS 1078006c34b88Smrg 1078106c34b88Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1078206c34b88Smrg# ---------------- 1078306c34b88Smrg# Minimum version: 1.6.0 1078406c34b88Smrg# 1078506c34b88Smrg# This macro enables a builder to skip all functional specification targets. 1078606c34b88Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1078706c34b88Smrg# maximum flexibilty in controlling documentation building. 1078806c34b88Smrg# Refer to: 1078906c34b88Smrg# XORG_WITH_XMLTO --with-xmlto 1079006c34b88Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1079106c34b88Smrg# XORG_WITH_DOXYGEN --with-doxygen 1079206c34b88Smrg# XORG_WITH_FOP --with-fop 1079306c34b88Smrg# XORG_WITH_GROFF --with-groff 1079406c34b88Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1079589069ce9Smrg# 1079606c34b88Smrg# Interface to module: 1079706c34b88Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1079806c34b88Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1079906c34b88Smrg# 'no' user instructs the module not to generate specs 1080006c34b88Smrg# parm1: specify the default value, yes or no. 1080189069ce9Smrg# 1080206c34b88SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1080306c34b88Smrgm4_define([spec_default], m4_default([$1], [yes])) 1080406c34b88SmrgAC_ARG_ENABLE(specs, 1080506c34b88Smrg AS_HELP_STRING([--enable-specs], 1080606c34b88Smrg [Enable building the specs (default: ]spec_default[)]), 1080706c34b88Smrg [build_specs=$enableval], [build_specs=]spec_default) 1080806c34b88Smrgm4_undefine([spec_default]) 1080906c34b88SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1081006c34b88SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1081106c34b88SmrgAC_MSG_RESULT([$build_specs]) 1081206c34b88Smrg]) # XORG_ENABLE_SPECS 1081337eb1ca1Smrg 1081406c34b88Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1081506c34b88Smrg# ---------------------------------------------- 1081606c34b88Smrg# Minimum version: 1.13.0 1081789069ce9Smrg# 1081806c34b88Smrg# This macro enables a builder to enable/disable unit testing 1081906c34b88Smrg# It makes no assumption about the test cases implementation 1082006c34b88Smrg# Test cases may or may not use Automake "Support for test suites" 1082106c34b88Smrg# They may or may not use the software utility library GLib 1082289069ce9Smrg# 1082306c34b88Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1082406c34b88Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1082506c34b88Smrg# The variable enable_unit_tests is used by other macros in this file. 1082689069ce9Smrg# 1082706c34b88Smrg# Interface to module: 1082806c34b88Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1082906c34b88Smrg# enable_unit_tests: used in configure.ac for additional configuration 1083006c34b88Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1083106c34b88Smrg# 'no' user instructs the module not to build tests 1083206c34b88Smrg# parm1: specify the default value, yes or no. 1083306c34b88Smrg# 1083406c34b88SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1083506c34b88SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1083606c34b88SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1083706c34b88SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1083806c34b88Smrgm4_define([_defopt], m4_default([$1], [auto])) 1083906c34b88SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1084006c34b88Smrg [Enable building unit test cases (default: ]_defopt[)]), 1084106c34b88Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1084206c34b88Smrgm4_undefine([_defopt]) 1084306c34b88SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1084406c34b88SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1084506c34b88SmrgAC_MSG_RESULT([$enable_unit_tests]) 1084606c34b88Smrg]) # XORG_ENABLE_UNIT_TESTS 10847b789ec8aSmrg 1084806c34b88Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1084906c34b88Smrg# ------------------------------------------------------ 1085006c34b88Smrg# Minimum version: 1.17.0 1085106c34b88Smrg# 1085206c34b88Smrg# This macro enables a builder to enable/disable integration testing 1085306c34b88Smrg# It makes no assumption about the test cases' implementation 1085406c34b88Smrg# Test cases may or may not use Automake "Support for test suites" 1085506c34b88Smrg# 1085606c34b88Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1085706c34b88Smrg# usually requires less dependencies and may be built and run under less 1085806c34b88Smrg# stringent environments than integration tests. 1085906c34b88Smrg# 1086006c34b88Smrg# Interface to module: 1086106c34b88Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1086206c34b88Smrg# enable_integration_tests: used in configure.ac for additional configuration 1086306c34b88Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1086406c34b88Smrg# 'no' user instructs the module not to build tests 1086506c34b88Smrg# parm1: specify the default value, yes or no. 1086606c34b88Smrg# 1086706c34b88SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1086806c34b88SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1086906c34b88Smrgm4_define([_defopt], m4_default([$1], [auto])) 1087006c34b88SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1087106c34b88Smrg [Enable building integration test cases (default: ]_defopt[)]), 1087206c34b88Smrg [enable_integration_tests=$enableval], 1087306c34b88Smrg [enable_integration_tests=]_defopt) 1087406c34b88Smrgm4_undefine([_defopt]) 1087506c34b88SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1087606c34b88Smrg [test "x$enable_integration_tests" != xno]) 1087706c34b88SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1087806c34b88SmrgAC_MSG_RESULT([$enable_integration_tests]) 1087906c34b88Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 10880b789ec8aSmrg 1088106c34b88Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1088206c34b88Smrg# ---------------------------------------- 1088306c34b88Smrg# Minimum version: 1.13.0 1088406c34b88Smrg# 1088506c34b88Smrg# GLib is a library which provides advanced data structures and functions. 1088606c34b88Smrg# This macro enables a module to test for the presence of Glib. 1088706c34b88Smrg# 1088806c34b88Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1088906c34b88Smrg# Otherwise the value of $enable_unit_tests is blank. 1089006c34b88Smrg# 1089106c34b88Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1089206c34b88Smrg# test support usually requires less dependencies and may be built and run under 1089306c34b88Smrg# less stringent environments than integration tests. 1089406c34b88Smrg# 1089506c34b88Smrg# Interface to module: 1089606c34b88Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1089706c34b88Smrg# with_glib: used in configure.ac to know if GLib has been found 1089806c34b88Smrg# --with-glib: 'yes' user instructs the module to use glib 1089906c34b88Smrg# 'no' user instructs the module not to use glib 1090006c34b88Smrg# 1090106c34b88SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1090206c34b88SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1090306c34b88Smrgm4_define([_defopt], m4_default([$2], [auto])) 1090406c34b88SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1090506c34b88Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1090606c34b88Smrg [with_glib=$withval], [with_glib=]_defopt) 1090706c34b88Smrgm4_undefine([_defopt]) 10908b789ec8aSmrg 1090906c34b88Smrghave_glib=no 1091006c34b88Smrg# Do not probe GLib if user explicitly disabled unit testing 1091106c34b88Smrgif test "x$enable_unit_tests" != x"no"; then 1091206c34b88Smrg # Do not probe GLib if user explicitly disabled it 1091306c34b88Smrg if test "x$with_glib" != x"no"; then 1091406c34b88Smrg m4_ifval( 1091506c34b88Smrg [$1], 1091606c34b88Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1091706c34b88Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1091806c34b88Smrg ) 1091906c34b88Smrg fi 1092006c34b88Smrgfi 10921b789ec8aSmrg 1092206c34b88Smrg# Not having GLib when unit testing has been explicitly requested is an error 1092306c34b88Smrgif test "x$enable_unit_tests" = x"yes"; then 1092406c34b88Smrg if test "x$have_glib" = x"no"; then 1092506c34b88Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1092606c34b88Smrg fi 1092789069ce9Smrgfi 10928b789ec8aSmrg 1092906c34b88Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1093006c34b88Smrgif test "x$enable_unit_tests" = x"no"; then 1093106c34b88Smrg if test "x$with_glib" = x"yes"; then 1093206c34b88Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1093306c34b88Smrg fi 1093406c34b88Smrgfi 10935b789ec8aSmrg 1093606c34b88Smrg# Not having GLib when it has been explicitly requested is an error 1093706c34b88Smrgif test "x$with_glib" = x"yes"; then 1093806c34b88Smrg if test "x$have_glib" = x"no"; then 1093906c34b88Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1094006c34b88Smrg fi 1094106c34b88Smrgfi 10942b789ec8aSmrg 1094306c34b88SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1094406c34b88Smrg]) # XORG_WITH_GLIB 10945b789ec8aSmrg 1094606c34b88Smrg# XORG_LD_WRAP([required|optional]) 1094706c34b88Smrg# --------------------------------- 1094806c34b88Smrg# Minimum version: 1.13.0 1094906c34b88Smrg# 1095006c34b88Smrg# Check if linker supports -wrap, passed via compiler flags 1095106c34b88Smrg# 1095206c34b88Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1095306c34b88Smrg# Otherwise the value of $enable_unit_tests is blank. 1095406c34b88Smrg# 1095506c34b88Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1095606c34b88Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1095706c34b88Smrg# available, an argument of "optional" allows use when some unit tests require 1095806c34b88Smrg# ld -wrap and others do not. 1095906c34b88Smrg# 1096006c34b88SmrgAC_DEFUN([XORG_LD_WRAP],[ 1096106c34b88SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1096206c34b88Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1096306c34b88Smrg void __wrap_exit(int status) { return; }], 1096406c34b88Smrg [exit(0);])]) 1096506c34b88Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1096606c34b88Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1096706c34b88Smrg if test "x$have_ld_wrap" = x"no"; then 1096806c34b88Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1096906c34b88Smrg fi 1097006c34b88Smrgfi 1097106c34b88SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1097206c34b88Smrg# 1097306c34b88Smrg]) # XORG_LD_WRAP 10974b789ec8aSmrg 1097506c34b88Smrg# XORG_CHECK_LINKER_FLAGS 1097606c34b88Smrg# ----------------------- 1097706c34b88Smrg# SYNOPSIS 1097806c34b88Smrg# 1097906c34b88Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1098006c34b88Smrg# 1098106c34b88Smrg# DESCRIPTION 1098206c34b88Smrg# 1098306c34b88Smrg# Check whether the given linker FLAGS work with the current language's 1098406c34b88Smrg# linker, or whether they give an error. 1098506c34b88Smrg# 1098606c34b88Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1098706c34b88Smrg# success/failure. 1098806c34b88Smrg# 1098906c34b88Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1099006c34b88Smrg# 1099106c34b88Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1099206c34b88Smrg# 1099306c34b88Smrg# LICENSE 1099406c34b88Smrg# 1099506c34b88Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1099606c34b88Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1099706c34b88Smrg# Copyright (c) 2009 Matteo Frigo 1099806c34b88Smrg# 1099906c34b88Smrg# This program is free software: you can redistribute it and/or modify it 1100006c34b88Smrg# under the terms of the GNU General Public License as published by the 1100106c34b88Smrg# Free Software Foundation, either version 3 of the License, or (at your 1100206c34b88Smrg# option) any later version. 1100306c34b88Smrg# 1100406c34b88Smrg# This program is distributed in the hope that it will be useful, but 1100506c34b88Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1100606c34b88Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1100706c34b88Smrg# Public License for more details. 1100806c34b88Smrg# 1100906c34b88Smrg# You should have received a copy of the GNU General Public License along 1101006c34b88Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1101106c34b88Smrg# 1101206c34b88Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1101306c34b88Smrg# gives unlimited permission to copy, distribute and modify the configure 1101406c34b88Smrg# scripts that are the output of Autoconf when processing the Macro. You 1101506c34b88Smrg# need not follow the terms of the GNU General Public License when using 1101606c34b88Smrg# or distributing such scripts, even though portions of the text of the 1101706c34b88Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1101806c34b88Smrg# all other use of the material that constitutes the Autoconf Macro. 1101906c34b88Smrg# 1102006c34b88Smrg# This special exception to the GPL applies to versions of the Autoconf 1102106c34b88Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1102206c34b88Smrg# modified version of the Autoconf Macro, you may extend this special 1102306c34b88Smrg# exception to the GPL to apply to your modified version as well.# 1102406c34b88SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1102506c34b88Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1102606c34b88Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1102706c34b88SmrgAS_LITERAL_IF([$1], 1102806c34b88Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1102906c34b88Smrg ax_save_FLAGS=$LDFLAGS 1103006c34b88Smrg LDFLAGS="$1" 1103106c34b88Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1103206c34b88Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1103306c34b88Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1103406c34b88Smrg LDFLAGS=$ax_save_FLAGS])], 1103506c34b88Smrg [ax_save_FLAGS=$LDFLAGS 1103606c34b88Smrg LDFLAGS="$1" 1103706c34b88Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1103806c34b88Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1103906c34b88Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1104006c34b88Smrg LDFLAGS=$ax_save_FLAGS]) 1104106c34b88Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1104206c34b88SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1104306c34b88Smrgif test "x$xorg_check_linker_flags" = xyes; then 1104406c34b88Smrg m4_default([$2], :) 1104506c34b88Smrgelse 1104606c34b88Smrg m4_default([$3], :) 1104706c34b88Smrgfi 1104806c34b88Smrg]) # XORG_CHECK_LINKER_FLAGS 11049b789ec8aSmrg 1105006c34b88Smrg# XORG_MEMORY_CHECK_FLAGS 1105106c34b88Smrg# ----------------------- 1105206c34b88Smrg# Minimum version: 1.16.0 11053b789ec8aSmrg# 1105406c34b88Smrg# This macro attempts to find appropriate memory checking functionality 1105506c34b88Smrg# for various platforms which unit testing code may use to catch various 1105606c34b88Smrg# forms of memory allocation and access errors in testing. 11057b789ec8aSmrg# 1105806c34b88Smrg# Interface to module: 1105906c34b88Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1106006c34b88Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1106106c34b88Smrg# 1106206c34b88Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1106306c34b88Smrg# 1106406c34b88SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11065b789ec8aSmrg 1106606c34b88SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1106706c34b88SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1106806c34b88Smrg [Environment variables to enable memory checking in tests]) 11069b789ec8aSmrg 1107006c34b88Smrg# Check for different types of support on different platforms 1107106c34b88Smrgcase $host_os in 1107206c34b88Smrg solaris*) 1107306c34b88Smrg AC_CHECK_LIB([umem], [umem_alloc], 1107406c34b88Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1107506c34b88Smrg ;; 1107606c34b88Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1107706c34b88Smrg # both directly and inverted, so should not be 0 or 255. 1107806c34b88Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1107906c34b88Smrg ;; 1108006c34b88Smrg darwin*) 1108106c34b88Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1108206c34b88Smrg ;; 1108306c34b88Smrg *bsd*) 1108406c34b88Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1108506c34b88Smrg ;; 1108606c34b88Smrgesac 1108789069ce9Smrg 1108806c34b88Smrg# User supplied flags override default flags 1108906c34b88Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1109006c34b88Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 110913e256790Smrgfi 11092b789ec8aSmrg 1109306c34b88SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1109406c34b88Smrg]) # XORG_WITH_LINT 11095b789ec8aSmrg 1109606c34b88Smrg# XORG_CHECK_MALLOC_ZERO 1109706c34b88Smrg# ---------------------- 1109806c34b88Smrg# Minimum version: 1.0.0 1109989069ce9Smrg# 1110006c34b88Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1110106c34b88Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1110206c34b88Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1110306c34b88SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1110406c34b88SmrgAC_ARG_ENABLE(malloc0returnsnull, 1110506c34b88Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1110606c34b88Smrg [malloc(0) returns NULL (default: auto)]), 1110706c34b88Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1110806c34b88Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11109b789ec8aSmrg 1111006c34b88SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1111106c34b88Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1111206c34b88Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1111306c34b88Smrg#include <stdlib.h> 1111406c34b88Smrg],[ 1111506c34b88Smrg char *m0, *r0, *c0, *p; 1111606c34b88Smrg m0 = malloc(0); 1111706c34b88Smrg p = malloc(10); 1111806c34b88Smrg r0 = realloc(p,0); 1111906c34b88Smrg c0 = calloc(0,10); 1112006c34b88Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1112106c34b88Smrg])], 1112206c34b88Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1112306c34b88Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1112406c34b88Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1112506c34b88Smrgfi 1112606c34b88SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11127f1ee322dSmrg 1112806c34b88Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1112906c34b88Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1113006c34b88Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1113106c34b88Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1113206c34b88Smrgelse 1113306c34b88Smrg MALLOC_ZERO_CFLAGS="" 1113406c34b88Smrg XMALLOC_ZERO_CFLAGS="" 1113506c34b88Smrg XTMALLOC_ZERO_CFLAGS="" 1113689069ce9Smrgfi 1113737eb1ca1Smrg 1113806c34b88SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1113906c34b88SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1114006c34b88SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1114106c34b88Smrg]) # XORG_CHECK_MALLOC_ZERO 1114206c34b88Smrg 1114306c34b88Smrg# XORG_WITH_LINT() 1114406c34b88Smrg# ---------------- 1114506c34b88Smrg# Minimum version: 1.1.0 1114689069ce9Smrg# 1114706c34b88Smrg# This macro enables the use of a tool that flags some suspicious and 1114806c34b88Smrg# non-portable constructs (likely to be bugs) in C language source code. 1114906c34b88Smrg# It will attempt to locate the tool and use appropriate options. 1115006c34b88Smrg# There are various lint type tools on different platforms. 1115106c34b88Smrg# 1115206c34b88Smrg# Interface to module: 1115306c34b88Smrg# LINT: returns the path to the tool found on the platform 1115406c34b88Smrg# or the value set to LINT on the configure cmd line 1115506c34b88Smrg# also an Automake conditional 1115606c34b88Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1115706c34b88Smrg# 1115806c34b88Smrg# --with-lint: 'yes' user instructs the module to use lint 1115906c34b88Smrg# 'no' user instructs the module not to use lint (default) 1116006c34b88Smrg# 1116106c34b88Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1116206c34b88Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1116306c34b88Smrg# 1116406c34b88SmrgAC_DEFUN([XORG_WITH_LINT],[ 1116506c34b88Smrg 1116606c34b88SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1116706c34b88SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1116806c34b88SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1116906c34b88Smrg [Use a lint-style source code checker (default: disabled)])], 1117006c34b88Smrg [use_lint=$withval], [use_lint=no]) 11171b789ec8aSmrg 1117206c34b88Smrg# Obtain platform specific info like program name and options 1117306c34b88Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1117406c34b88Smrgcase $host_os in 1117506c34b88Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1117606c34b88Smrg lint_name=splint 1117706c34b88Smrg lint_options="-badflag" 1117806c34b88Smrg ;; 1117906c34b88Smrg *freebsd* | *netbsd*) 1118006c34b88Smrg lint_name=lint 1118106c34b88Smrg lint_options="-u -b" 1118206c34b88Smrg ;; 1118306c34b88Smrg *solaris*) 1118406c34b88Smrg lint_name=lint 1118506c34b88Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1118606c34b88Smrg ;; 1118706c34b88Smrgesac 11188b789ec8aSmrg 1118906c34b88Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1119006c34b88Smrgif test "x$use_lint" = x"yes" ; then 1119106c34b88Smrg AC_PATH_PROG([LINT], [$lint_name]) 1119206c34b88Smrg if test "x$LINT" = "x"; then 1119306c34b88Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1119406c34b88Smrg fi 1119506c34b88Smrgelif test "x$use_lint" = x"no" ; then 1119606c34b88Smrg if test "x$LINT" != "x"; then 1119706c34b88Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1119806c34b88Smrg fi 11199b789ec8aSmrgelse 1120006c34b88Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1120189069ce9Smrgfi 1120237eb1ca1Smrg 1120306c34b88Smrg# User supplied flags override default flags 1120406c34b88Smrgif test "x$LINT_FLAGS" != "x"; then 1120506c34b88Smrg lint_options=$LINT_FLAGS 1120606c34b88Smrgfi 1120706c34b88Smrg 1120806c34b88SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1120906c34b88SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1121006c34b88Smrg 1121106c34b88Smrg]) # XORG_WITH_LINT 11212b789ec8aSmrg 1121306c34b88Smrg# XORG_LINT_LIBRARY(LIBNAME) 1121406c34b88Smrg# -------------------------- 1121506c34b88Smrg# Minimum version: 1.1.0 1121689069ce9Smrg# 1121706c34b88Smrg# Sets up flags for building lint libraries for checking programs that call 1121806c34b88Smrg# functions in the library. 1121906c34b88Smrg# 1122006c34b88Smrg# Interface to module: 1122106c34b88Smrg# LINTLIB - Automake variable with the name of lint library file to make 1122206c34b88Smrg# MAKE_LINT_LIB - Automake conditional 1122306c34b88Smrg# 1122406c34b88Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1122506c34b88Smrg# - 'no' user instructs the module not to create a lint library (default) 11226b789ec8aSmrg 1122706c34b88SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1122806c34b88SmrgAC_REQUIRE([XORG_WITH_LINT]) 1122906c34b88SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1123006c34b88Smrg [Create lint library (default: disabled)])], 1123106c34b88Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11232b789ec8aSmrg 1123306c34b88Smrgif test "x$make_lint_lib" = x"yes" ; then 1123406c34b88Smrg LINTLIB=llib-l$1.ln 1123506c34b88Smrg if test "x$LINT" = "x"; then 1123606c34b88Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1123706c34b88Smrg fi 1123806c34b88Smrgelif test "x$make_lint_lib" != x"no" ; then 1123906c34b88Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1124089069ce9Smrgfi 1124137eb1ca1Smrg 1124206c34b88SmrgAC_SUBST(LINTLIB) 1124306c34b88SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1124406c34b88Smrg 1124506c34b88Smrg]) # XORG_LINT_LIBRARY 11246b789ec8aSmrg 1124706c34b88Smrg# XORG_COMPILER_BRAND 1124806c34b88Smrg# ------------------- 1124906c34b88Smrg# Minimum version: 1.14.0 112503e256790Smrg# 1125106c34b88Smrg# Checks for various brands of compilers and sets flags as appropriate: 1125206c34b88Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1125306c34b88Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1125406c34b88Smrg# clang compiler - sets CLANGCC to "yes" 1125506c34b88Smrg# Intel compiler - sets INTELCC to "yes" 1125606c34b88Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1125706c34b88Smrg# 1125806c34b88SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1125906c34b88SmrgAC_LANG_CASE( 1126006c34b88Smrg [C], [ 1126106c34b88Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1126206c34b88Smrg ], 1126306c34b88Smrg [C++], [ 1126406c34b88Smrg AC_REQUIRE([AC_PROG_CXX]) 1126506c34b88Smrg ] 1126606c34b88Smrg) 1126706c34b88SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1126806c34b88SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1126906c34b88SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1127006c34b88Smrg]) # XORG_COMPILER_BRAND 1127106c34b88Smrg 1127206c34b88Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1127306c34b88Smrg# --------------- 1127406c34b88Smrg# Minimum version: 1.16.0 1127506c34b88Smrg# 1127606c34b88Smrg# Test if the compiler works when passed the given flag as a command line argument. 1127706c34b88Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1127806c34b88Smrg# next flag in the list until there are no more options. 1127906c34b88Smrg# 1128006c34b88Smrg# Note that this does not guarantee that the compiler supports the flag as some 1128106c34b88Smrg# compilers will simply ignore arguments that they do not understand, but we do 1128206c34b88Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1128306c34b88Smrg# -Werror=unused-command-line-argument 1128406c34b88Smrg# 1128506c34b88SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1128606c34b88Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1128706c34b88Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1128837eb1ca1Smrg 1128906c34b88SmrgAC_LANG_COMPILER_REQUIRE 11290b789ec8aSmrg 1129106c34b88SmrgAC_LANG_CASE( 1129206c34b88Smrg [C], [ 1129306c34b88Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1129406c34b88Smrg define([PREFIX], [C]) 1129506c34b88Smrg define([CACHE_PREFIX], [cc]) 1129606c34b88Smrg define([COMPILER], [$CC]) 1129706c34b88Smrg ], 1129806c34b88Smrg [C++], [ 1129906c34b88Smrg define([PREFIX], [CXX]) 1130006c34b88Smrg define([CACHE_PREFIX], [cxx]) 1130106c34b88Smrg define([COMPILER], [$CXX]) 1130206c34b88Smrg ] 1130306c34b88Smrg) 11304b789ec8aSmrg 1130506c34b88Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11306b789ec8aSmrg 1130706c34b88Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1130806c34b88Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1130906c34b88Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1131006c34b88Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1131106c34b88Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1131206c34b88Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1131306c34b88Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1131406c34b88Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1131506c34b88Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1131689069ce9Smrgfi 1131706c34b88Smrg 1131806c34b88Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1131906c34b88Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1132006c34b88Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1132106c34b88Smrg fi 1132206c34b88Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1132306c34b88Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1132406c34b88Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1132506c34b88Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1132606c34b88Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1132706c34b88Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1132806c34b88Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1132906c34b88Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1133089069ce9Smrgfi 11331b789ec8aSmrg 1133206c34b88Smrgfound="no" 1133306c34b88Smrgm4_foreach([flag], m4_cdr($@), [ 1133406c34b88Smrg if test $found = "no" ; then 1133506c34b88Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1133606c34b88Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1133706c34b88Smrg fi 11338b789ec8aSmrg 1133906c34b88Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 1134006c34b88Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1134106c34b88Smrg fi 11342b789ec8aSmrg 1134306c34b88Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11344b789ec8aSmrg 1134506c34b88Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1134606c34b88Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1134706c34b88Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1134806c34b88Smrg AC_CACHE_VAL($cacheid, 1134906c34b88Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1135006c34b88Smrg [eval $cacheid=yes], 1135106c34b88Smrg [eval $cacheid=no])]) 11352b789ec8aSmrg 1135306c34b88Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11354c43cc173Smrg 1135506c34b88Smrg eval supported=\$$cacheid 1135606c34b88Smrg AC_MSG_RESULT([$supported]) 1135706c34b88Smrg if test "$supported" = "yes" ; then 1135806c34b88Smrg $1="$$1 ]flag[" 1135906c34b88Smrg found="yes" 1136006c34b88Smrg fi 1136106c34b88Smrg fi 1136206c34b88Smrg]) 1136306c34b88Smrg]) # XORG_TESTSET_CFLAG 113643e256790Smrg 1136506c34b88Smrg# XORG_COMPILER_FLAGS 11366b789ec8aSmrg# --------------- 1136706c34b88Smrg# Minimum version: 1.16.0 1136806c34b88Smrg# 1136906c34b88Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1137006c34b88Smrg# arguments supported by the selected compiler which do NOT alter the generated 1137106c34b88Smrg# code. These arguments will cause the compiler to print various warnings 1137206c34b88Smrg# during compilation AND turn a conservative set of warnings into errors. 1137306c34b88Smrg# 1137406c34b88Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1137506c34b88Smrg# future versions of util-macros as options are added to new compilers. 1137606c34b88Smrg# 1137706c34b88SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1137806c34b88SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 113793e256790Smrg 1138006c34b88SmrgAC_ARG_ENABLE(selective-werror, 1138106c34b88Smrg AS_HELP_STRING([--disable-selective-werror], 1138206c34b88Smrg [Turn off selective compiler errors. (default: enabled)]), 1138306c34b88Smrg [SELECTIVE_WERROR=$enableval], 1138406c34b88Smrg [SELECTIVE_WERROR=yes]) 11385f1ee322dSmrg 1138606c34b88SmrgAC_LANG_CASE( 1138706c34b88Smrg [C], [ 1138806c34b88Smrg define([PREFIX], [C]) 1138906c34b88Smrg ], 1139006c34b88Smrg [C++], [ 1139106c34b88Smrg define([PREFIX], [CXX]) 1139206c34b88Smrg ] 1139306c34b88Smrg) 1139406c34b88Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1139506c34b88Smrgif test "x$SUNCC" = "xyes"; then 1139606c34b88Smrg [BASE_]PREFIX[FLAGS]="-v" 11397b789ec8aSmrgelse 1139806c34b88Smrg [BASE_]PREFIX[FLAGS]="" 11399f1ee322dSmrgfi 11400c43cc173Smrg 1140106c34b88Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1140206c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1140306c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1140406c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1140506c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11406c43cc173Smrg 1140706c34b88SmrgAC_LANG_CASE( 1140806c34b88Smrg [C], [ 1140906c34b88Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1141006c34b88Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1141106c34b88Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1141206c34b88Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1141306c34b88Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 1141406c34b88Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1141506c34b88Smrg ] 1141606c34b88Smrg) 11417c43cc173Smrg 1141806c34b88Smrg# This chunk adds additional warnings that could catch undesired effects. 1141906c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1142006c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1142106c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1142206c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1142306c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1142406c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1142506c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1142606c34b88Smrg 1142706c34b88Smrg# These are currently disabled because they are noisy. They will be enabled 1142806c34b88Smrg# in the future once the codebase is sufficiently modernized to silence 1142906c34b88Smrg# them. For now, I don't want them to drown out the other warnings. 1143006c34b88Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1143106c34b88Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1143206c34b88Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1143306c34b88Smrg 1143406c34b88Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1143506c34b88Smrg# when there are problems that should be fixed. 1143606c34b88Smrg 1143706c34b88Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1143806c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1143906c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1144006c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1144106c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1144206c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1144306c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1144406c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1144506c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1144606c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1144706c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1144806c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1144906c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1145006c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11451f1ee322dSmrgelse 1145206c34b88SmrgAC_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]) 1145306c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1145406c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1145506c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1145606c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1145706c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1145806c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1145906c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1146006c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1146106c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1146206c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1146306c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1146406c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1146506c34b88SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11466f1ee322dSmrgfi 11467c43cc173Smrg 1146806c34b88SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1146906c34b88Smrg]) # XORG_COMPILER_FLAGS 11470c27c18e8Smrg 1147106c34b88Smrg# XORG_CWARNFLAGS 1147206c34b88Smrg# --------------- 1147306c34b88Smrg# Minimum version: 1.2.0 1147406c34b88Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11475b789ec8aSmrg# 1147606c34b88Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1147706c34b88Smrg# 1147806c34b88Smrg# This function is deprecated because it defines -fno-strict-aliasing 1147906c34b88Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1148006c34b88Smrg# is needed, then it should be added explicitly in the module when 1148106c34b88Smrg# it is updated to use BASE_CFLAGS. 1148206c34b88Smrg# 1148306c34b88SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1148406c34b88SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1148506c34b88SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1148606c34b88SmrgAC_LANG_CASE( 1148706c34b88Smrg [C], [ 1148806c34b88Smrg CWARNFLAGS="$BASE_CFLAGS" 1148906c34b88Smrg if test "x$GCC" = xyes ; then 1149006c34b88Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1149106c34b88Smrg fi 1149206c34b88Smrg AC_SUBST(CWARNFLAGS) 1149306c34b88Smrg ] 1149406c34b88Smrg) 1149506c34b88Smrg]) # XORG_CWARNFLAGS 1149637eb1ca1Smrg 1149706c34b88Smrg# XORG_STRICT_OPTION 1149806c34b88Smrg# ----------------------- 1149906c34b88Smrg# Minimum version: 1.3.0 1150006c34b88Smrg# 1150106c34b88Smrg# Add configure option to enable strict compilation flags, such as treating 1150206c34b88Smrg# warnings as fatal errors. 1150306c34b88Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1150406c34b88Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1150506c34b88Smrg# 1150606c34b88Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1150706c34b88Smrg# when strict compilation is unconditionally desired. 1150806c34b88SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1150906c34b88SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1151006c34b88SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1151137eb1ca1Smrg 1151206c34b88SmrgAC_ARG_ENABLE(strict-compilation, 1151306c34b88Smrg AS_HELP_STRING([--enable-strict-compilation], 1151406c34b88Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1151506c34b88Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11516c27c18e8Smrg 1151706c34b88SmrgAC_LANG_CASE( 1151806c34b88Smrg [C], [ 1151906c34b88Smrg define([PREFIX], [C]) 1152006c34b88Smrg ], 1152106c34b88Smrg [C++], [ 1152206c34b88Smrg define([PREFIX], [CXX]) 1152306c34b88Smrg ] 1152406c34b88Smrg) 11525b789ec8aSmrg 1152606c34b88Smrg[STRICT_]PREFIX[FLAGS]="" 1152706c34b88SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1152806c34b88SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11529b789ec8aSmrg 1153006c34b88Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1153106c34b88Smrg# activate it with -Werror, so we add it here explicitly. 1153206c34b88SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11533c27c18e8Smrg 1153406c34b88Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1153506c34b88Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1153606c34b88Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1153706c34b88Smrgfi 1153806c34b88SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1153906c34b88SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1154006c34b88SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1154106c34b88Smrg]) # XORG_STRICT_OPTION 1154289069ce9Smrg 1154306c34b88Smrg# XORG_DEFAULT_OPTIONS 11544c27c18e8Smrg# -------------------- 1154506c34b88Smrg# Minimum version: 1.3.0 11546c27c18e8Smrg# 1154706c34b88Smrg# Defines default options for X.Org modules. 11548c27c18e8Smrg# 1154906c34b88SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1155006c34b88SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1155106c34b88SmrgXORG_COMPILER_FLAGS 1155206c34b88SmrgXORG_CWARNFLAGS 1155306c34b88SmrgXORG_STRICT_OPTION 1155406c34b88SmrgXORG_RELEASE_VERSION 1155506c34b88SmrgXORG_CHANGELOG 1155606c34b88SmrgXORG_INSTALL 1155706c34b88SmrgXORG_MANPAGE_SECTIONS 1155806c34b88Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1155906c34b88Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1156006c34b88Smrg]) # XORG_DEFAULT_OPTIONS 115613e256790Smrg 1156206c34b88Smrg# XORG_INSTALL() 1156306c34b88Smrg# ---------------- 1156406c34b88Smrg# Minimum version: 1.4.0 1156506c34b88Smrg# 1156606c34b88Smrg# Defines the variable INSTALL_CMD as the command to copy 1156706c34b88Smrg# INSTALL from $prefix/share/util-macros. 1156806c34b88Smrg# 1156906c34b88SmrgAC_DEFUN([XORG_INSTALL], [ 1157006c34b88SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1157106c34b88Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1157206c34b88SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1157306c34b88Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1157406c34b88Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1157506c34b88Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1157606c34b88SmrgAC_SUBST([INSTALL_CMD]) 1157706c34b88Smrg]) # XORG_INSTALL 1157806c34b88Smrgdnl Copyright 2005 Red Hat, Inc 1157906c34b88Smrgdnl 1158006c34b88Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1158106c34b88Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1158206c34b88Smrgdnl the above copyright notice appear in all copies and that both that 1158306c34b88Smrgdnl copyright notice and this permission notice appear in supporting 1158406c34b88Smrgdnl documentation. 1158506c34b88Smrgdnl 1158606c34b88Smrgdnl The above copyright notice and this permission notice shall be included 1158706c34b88Smrgdnl in all copies or substantial portions of the Software. 1158806c34b88Smrgdnl 1158906c34b88Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1159006c34b88Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1159106c34b88Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1159206c34b88Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1159306c34b88Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1159406c34b88Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1159506c34b88Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1159606c34b88Smrgdnl 1159706c34b88Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1159806c34b88Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1159906c34b88Smrgdnl other dealings in this Software without prior written authorization 1160006c34b88Smrgdnl from the copyright holders. 1160106c34b88Smrgdnl 11602c43cc173Smrg 1160306c34b88Smrg# XORG_RELEASE_VERSION 1160406c34b88Smrg# -------------------- 1160506c34b88Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1160606c34b88Smrg 1160706c34b88SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1160806c34b88Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1160906c34b88Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1161006c34b88Smrg [Major version of this package]) 1161106c34b88Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1161206c34b88Smrg if test "x$PVM" = "x"; then 1161306c34b88Smrg PVM="0" 1161406c34b88Smrg fi 1161506c34b88Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1161606c34b88Smrg [$PVM], 1161706c34b88Smrg [Minor version of this package]) 1161806c34b88Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1161906c34b88Smrg if test "x$PVP" = "x"; then 1162006c34b88Smrg PVP="0" 1162106c34b88Smrg fi 1162206c34b88Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1162306c34b88Smrg [$PVP], 1162406c34b88Smrg [Patch version of this package]) 1162506c34b88Smrg]) 1162621e67964Smrg 1162706c34b88Smrg# XORG_CHANGELOG() 1162806c34b88Smrg# ---------------- 1162906c34b88Smrg# Minimum version: 1.2.0 1163006c34b88Smrg# 1163106c34b88Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1163206c34b88Smrg# ChangeLog from git. 1163306c34b88Smrg# 1163406c34b88Smrg# 1163506c34b88SmrgAC_DEFUN([XORG_CHANGELOG], [ 1163606c34b88SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1163706c34b88Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1163806c34b88Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1163906c34b88Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1164006c34b88SmrgAC_SUBST([CHANGELOG_CMD]) 1164106c34b88Smrg]) # XORG_CHANGELOG 11642c43cc173Smrg 11643