aclocal.m4 revision 88cd5fc2
188cd5fc2Smrg# generated automatically by aclocal 1.14.1 -*- Autoconf -*- 288cd5fc2Smrg 388cd5fc2Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 488cd5fc2Smrg 588cd5fc2Smrg# This file is free software; the Free Software Foundation 688cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 788cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 888cd5fc2Smrg 988cd5fc2Smrg# This program is distributed in the hope that it will be useful, 1088cd5fc2Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1188cd5fc2Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1288cd5fc2Smrg# PARTICULAR PURPOSE. 1388cd5fc2Smrg 1488cd5fc2Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1588cd5fc2Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1688cd5fc2Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1788cd5fc2Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 1888cd5fc2Smrg[m4_warning([this file was generated for autoconf 2.69. 1988cd5fc2SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2088cd5fc2SmrgIf you have problems, you may need to regenerate the build system entirely. 2188cd5fc2SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 2288cd5fc2Smrg 2388cd5fc2Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 2488cd5fc2Smrg# 2588cd5fc2Smrg# This file is free software; the Free Software Foundation 2688cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 2788cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 2888cd5fc2Smrg 2988cd5fc2Smrg# AM_AUTOMAKE_VERSION(VERSION) 3088cd5fc2Smrg# ---------------------------- 3188cd5fc2Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3288cd5fc2Smrg# generated from the m4 files accompanying Automake X.Y. 3388cd5fc2Smrg# (This private macro should not be called outside this file.) 3488cd5fc2SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3588cd5fc2Smrg[am__api_version='1.14' 3688cd5fc2Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3788cd5fc2Smrgdnl require some minimum version. Point them to the right macro. 3888cd5fc2Smrgm4_if([$1], [1.14.1], [], 3988cd5fc2Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 4088cd5fc2Smrg]) 4188cd5fc2Smrg 4288cd5fc2Smrg# _AM_AUTOCONF_VERSION(VERSION) 4388cd5fc2Smrg# ----------------------------- 4488cd5fc2Smrg# aclocal traces this macro to find the Autoconf version. 4588cd5fc2Smrg# This is a private macro too. Using m4_define simplifies 4688cd5fc2Smrg# the logic in aclocal, which can simply ignore this definition. 4788cd5fc2Smrgm4_define([_AM_AUTOCONF_VERSION], []) 4888cd5fc2Smrg 4988cd5fc2Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 5088cd5fc2Smrg# ------------------------------- 5188cd5fc2Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5288cd5fc2Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5388cd5fc2SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5488cd5fc2Smrg[AM_AUTOMAKE_VERSION([1.14.1])dnl 5588cd5fc2Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5688cd5fc2Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5788cd5fc2Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5888cd5fc2Smrg 5988cd5fc2Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6088cd5fc2Smrg 6188cd5fc2Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 6288cd5fc2Smrg# 6388cd5fc2Smrg# This file is free software; the Free Software Foundation 6488cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 6588cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 6688cd5fc2Smrg 6788cd5fc2Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6888cd5fc2Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 6988cd5fc2Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 7088cd5fc2Smrg# 7188cd5fc2Smrg# Of course, Automake must honor this variable whenever it calls a 7288cd5fc2Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7388cd5fc2Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7488cd5fc2Smrg# depending on how configure is run. This is pretty annoying, since 7588cd5fc2Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7688cd5fc2Smrg# source directory, any form will work fine, but in subdirectories a 7788cd5fc2Smrg# relative path needs to be adjusted first. 7888cd5fc2Smrg# 7988cd5fc2Smrg# $ac_aux_dir/missing 8088cd5fc2Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8188cd5fc2Smrg# $top_srcdir/$ac_aux_dir/missing 8288cd5fc2Smrg# fails if $ac_aux_dir is absolute, 8388cd5fc2Smrg# fails when called from a subdirectory in a VPATH build with 8488cd5fc2Smrg# a relative $ac_aux_dir 8588cd5fc2Smrg# 8688cd5fc2Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8788cd5fc2Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8888cd5fc2Smrg# harmless because $srcdir is '.', but things will broke when you 8988cd5fc2Smrg# start a VPATH build or use an absolute $srcdir. 9088cd5fc2Smrg# 9188cd5fc2Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9288cd5fc2Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9388cd5fc2Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9488cd5fc2Smrg# and then we would define $MISSING as 9588cd5fc2Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9688cd5fc2Smrg# This will work as long as MISSING is not called from configure, because 9788cd5fc2Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9888cd5fc2Smrg# However there are other variables, like CC, which are often used in 9988cd5fc2Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10088cd5fc2Smrg# 10188cd5fc2Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10288cd5fc2Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10388cd5fc2Smrg# configured tree to be moved without reconfiguration. 10488cd5fc2Smrg 10588cd5fc2SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10688cd5fc2Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 10788cd5fc2Smrg# Expand $ac_aux_dir to an absolute path. 10888cd5fc2Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 10988cd5fc2Smrg]) 11088cd5fc2Smrg 11188cd5fc2Smrg# AM_CONDITIONAL -*- Autoconf -*- 11288cd5fc2Smrg 11388cd5fc2Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 11488cd5fc2Smrg# 11588cd5fc2Smrg# This file is free software; the Free Software Foundation 11688cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 11788cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 11888cd5fc2Smrg 11988cd5fc2Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12088cd5fc2Smrg# ------------------------------------- 12188cd5fc2Smrg# Define a conditional. 12288cd5fc2SmrgAC_DEFUN([AM_CONDITIONAL], 12388cd5fc2Smrg[AC_PREREQ([2.52])dnl 12488cd5fc2Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12588cd5fc2Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12688cd5fc2SmrgAC_SUBST([$1_TRUE])dnl 12788cd5fc2SmrgAC_SUBST([$1_FALSE])dnl 12888cd5fc2Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 12988cd5fc2Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13088cd5fc2Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13188cd5fc2Smrgif $2; then 13288cd5fc2Smrg $1_TRUE= 13388cd5fc2Smrg $1_FALSE='#' 13488cd5fc2Smrgelse 13588cd5fc2Smrg $1_TRUE='#' 13688cd5fc2Smrg $1_FALSE= 13788cd5fc2Smrgfi 13888cd5fc2SmrgAC_CONFIG_COMMANDS_PRE( 13988cd5fc2Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14088cd5fc2Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14188cd5fc2SmrgUsually this means the macro was only invoked conditionally.]]) 14288cd5fc2Smrgfi])]) 14388cd5fc2Smrg 14488cd5fc2Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 14588cd5fc2Smrg# 14688cd5fc2Smrg# This file is free software; the Free Software Foundation 14788cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 14888cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 14988cd5fc2Smrg 15088cd5fc2Smrg 15188cd5fc2Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 15288cd5fc2Smrg# written in clear, in which case automake, when reading aclocal.m4, 15388cd5fc2Smrg# will think it sees a *use*, and therefore will trigger all it's 15488cd5fc2Smrg# C support machinery. Also note that it means that autoscan, seeing 15588cd5fc2Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 15688cd5fc2Smrg 15788cd5fc2Smrg 15888cd5fc2Smrg# _AM_DEPENDENCIES(NAME) 15988cd5fc2Smrg# ---------------------- 16088cd5fc2Smrg# See how the compiler implements dependency checking. 16188cd5fc2Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 16288cd5fc2Smrg# We try a few techniques and use that to set a single cache variable. 16388cd5fc2Smrg# 16488cd5fc2Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 16588cd5fc2Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 16688cd5fc2Smrg# dependency, and given that the user is not expected to run this macro, 16788cd5fc2Smrg# just rely on AC_PROG_CC. 16888cd5fc2SmrgAC_DEFUN([_AM_DEPENDENCIES], 16988cd5fc2Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17088cd5fc2SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17188cd5fc2SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17288cd5fc2SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 17388cd5fc2Smrg 17488cd5fc2Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 17588cd5fc2Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 17688cd5fc2Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 17788cd5fc2Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 17888cd5fc2Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 17988cd5fc2Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18088cd5fc2Smrg [depcc="$$1" am_compiler_list=]) 18188cd5fc2Smrg 18288cd5fc2SmrgAC_CACHE_CHECK([dependency style of $depcc], 18388cd5fc2Smrg [am_cv_$1_dependencies_compiler_type], 18488cd5fc2Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18588cd5fc2Smrg # We make a subdir and do the tests there. Otherwise we can end up 18688cd5fc2Smrg # making bogus files that we don't know about and never remove. For 18788cd5fc2Smrg # instance it was reported that on HP-UX the gcc test will end up 18888cd5fc2Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 18988cd5fc2Smrg # in D". 19088cd5fc2Smrg rm -rf conftest.dir 19188cd5fc2Smrg mkdir conftest.dir 19288cd5fc2Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19388cd5fc2Smrg # using a relative directory. 19488cd5fc2Smrg cp "$am_depcomp" conftest.dir 19588cd5fc2Smrg cd conftest.dir 19688cd5fc2Smrg # We will build objects and dependencies in a subdirectory because 19788cd5fc2Smrg # it helps to detect inapplicable dependency modes. For instance 19888cd5fc2Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 19988cd5fc2Smrg # side effect of compilation, but ICC will put the dependencies in 20088cd5fc2Smrg # the current directory while Tru64 will put them in the object 20188cd5fc2Smrg # directory. 20288cd5fc2Smrg mkdir sub 20388cd5fc2Smrg 20488cd5fc2Smrg am_cv_$1_dependencies_compiler_type=none 20588cd5fc2Smrg if test "$am_compiler_list" = ""; then 20688cd5fc2Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 20788cd5fc2Smrg fi 20888cd5fc2Smrg am__universal=false 20988cd5fc2Smrg m4_case([$1], [CC], 21088cd5fc2Smrg [case " $depcc " in #( 21188cd5fc2Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21288cd5fc2Smrg esac], 21388cd5fc2Smrg [CXX], 21488cd5fc2Smrg [case " $depcc " in #( 21588cd5fc2Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21688cd5fc2Smrg esac]) 21788cd5fc2Smrg 21888cd5fc2Smrg for depmode in $am_compiler_list; do 21988cd5fc2Smrg # Setup a source with many dependencies, because some compilers 22088cd5fc2Smrg # like to wrap large dependency lists on column 80 (with \), and 22188cd5fc2Smrg # we should not choose a depcomp mode which is confused by this. 22288cd5fc2Smrg # 22388cd5fc2Smrg # We need to recreate these files for each test, as the compiler may 22488cd5fc2Smrg # overwrite some of them when testing with obscure command lines. 22588cd5fc2Smrg # This happens at least with the AIX C compiler. 22688cd5fc2Smrg : > sub/conftest.c 22788cd5fc2Smrg for i in 1 2 3 4 5 6; do 22888cd5fc2Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 22988cd5fc2Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 23088cd5fc2Smrg # Solaris 10 /bin/sh. 23188cd5fc2Smrg echo '/* dummy */' > sub/conftst$i.h 23288cd5fc2Smrg done 23388cd5fc2Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 23488cd5fc2Smrg 23588cd5fc2Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 23688cd5fc2Smrg # mode. It turns out that the SunPro C++ compiler does not properly 23788cd5fc2Smrg # handle '-M -o', and we need to detect this. Also, some Intel 23888cd5fc2Smrg # versions had trouble with output in subdirs. 23988cd5fc2Smrg am__obj=sub/conftest.${OBJEXT-o} 24088cd5fc2Smrg am__minus_obj="-o $am__obj" 24188cd5fc2Smrg case $depmode in 24288cd5fc2Smrg gcc) 24388cd5fc2Smrg # This depmode causes a compiler race in universal mode. 24488cd5fc2Smrg test "$am__universal" = false || continue 24588cd5fc2Smrg ;; 24688cd5fc2Smrg nosideeffect) 24788cd5fc2Smrg # After this tag, mechanisms are not by side-effect, so they'll 24888cd5fc2Smrg # only be used when explicitly requested. 24988cd5fc2Smrg if test "x$enable_dependency_tracking" = xyes; then 25088cd5fc2Smrg continue 25188cd5fc2Smrg else 25288cd5fc2Smrg break 25388cd5fc2Smrg fi 25488cd5fc2Smrg ;; 25588cd5fc2Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 25688cd5fc2Smrg # This compiler won't grok '-c -o', but also, the minuso test has 25788cd5fc2Smrg # not run yet. These depmodes are late enough in the game, and 25888cd5fc2Smrg # so weak that their functioning should not be impacted. 25988cd5fc2Smrg am__obj=conftest.${OBJEXT-o} 26088cd5fc2Smrg am__minus_obj= 26188cd5fc2Smrg ;; 26288cd5fc2Smrg none) break ;; 26388cd5fc2Smrg esac 26488cd5fc2Smrg if depmode=$depmode \ 26588cd5fc2Smrg source=sub/conftest.c object=$am__obj \ 26688cd5fc2Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 26788cd5fc2Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 26888cd5fc2Smrg >/dev/null 2>conftest.err && 26988cd5fc2Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27088cd5fc2Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27188cd5fc2Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27288cd5fc2Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27388cd5fc2Smrg # icc doesn't choke on unknown options, it will just issue warnings 27488cd5fc2Smrg # or remarks (even with -Werror). So we grep stderr for any message 27588cd5fc2Smrg # that says an option was ignored or not supported. 27688cd5fc2Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 27788cd5fc2Smrg # icc: Command line warning: ignoring option '-M'; no argument required 27888cd5fc2Smrg # The diagnosis changed in icc 8.0: 27988cd5fc2Smrg # icc: Command line remark: option '-MP' not supported 28088cd5fc2Smrg if (grep 'ignoring option' conftest.err || 28188cd5fc2Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28288cd5fc2Smrg am_cv_$1_dependencies_compiler_type=$depmode 28388cd5fc2Smrg break 28488cd5fc2Smrg fi 28588cd5fc2Smrg fi 28688cd5fc2Smrg done 28788cd5fc2Smrg 28888cd5fc2Smrg cd .. 28988cd5fc2Smrg rm -rf conftest.dir 29088cd5fc2Smrgelse 29188cd5fc2Smrg am_cv_$1_dependencies_compiler_type=none 29288cd5fc2Smrgfi 29388cd5fc2Smrg]) 29488cd5fc2SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29588cd5fc2SmrgAM_CONDITIONAL([am__fastdep$1], [ 29688cd5fc2Smrg test "x$enable_dependency_tracking" != xno \ 29788cd5fc2Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 29888cd5fc2Smrg]) 29988cd5fc2Smrg 30088cd5fc2Smrg 30188cd5fc2Smrg# AM_SET_DEPDIR 30288cd5fc2Smrg# ------------- 30388cd5fc2Smrg# Choose a directory name for dependency files. 30488cd5fc2Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 30588cd5fc2SmrgAC_DEFUN([AM_SET_DEPDIR], 30688cd5fc2Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 30788cd5fc2SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 30888cd5fc2Smrg]) 30988cd5fc2Smrg 31088cd5fc2Smrg 31188cd5fc2Smrg# AM_DEP_TRACK 31288cd5fc2Smrg# ------------ 31388cd5fc2SmrgAC_DEFUN([AM_DEP_TRACK], 31488cd5fc2Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 31588cd5fc2SmrgAS_HELP_STRING( 31688cd5fc2Smrg [--enable-dependency-tracking], 31788cd5fc2Smrg [do not reject slow dependency extractors]) 31888cd5fc2SmrgAS_HELP_STRING( 31988cd5fc2Smrg [--disable-dependency-tracking], 32088cd5fc2Smrg [speeds up one-time build])]) 32188cd5fc2Smrgif test "x$enable_dependency_tracking" != xno; then 32288cd5fc2Smrg am_depcomp="$ac_aux_dir/depcomp" 32388cd5fc2Smrg AMDEPBACKSLASH='\' 32488cd5fc2Smrg am__nodep='_no' 32588cd5fc2Smrgfi 32688cd5fc2SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32788cd5fc2SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32888cd5fc2Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32988cd5fc2SmrgAC_SUBST([am__nodep])dnl 33088cd5fc2Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 33188cd5fc2Smrg]) 33288cd5fc2Smrg 33388cd5fc2Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 33488cd5fc2Smrg 33588cd5fc2Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 33688cd5fc2Smrg# 33788cd5fc2Smrg# This file is free software; the Free Software Foundation 33888cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 33988cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 34088cd5fc2Smrg 34188cd5fc2Smrg 34288cd5fc2Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 34388cd5fc2Smrg# ------------------------------ 34488cd5fc2SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34588cd5fc2Smrg[{ 34688cd5fc2Smrg # Older Autoconf quotes --file arguments for eval, but not when files 34788cd5fc2Smrg # are listed without --file. Let's play safe and only enable the eval 34888cd5fc2Smrg # if we detect the quoting. 34988cd5fc2Smrg case $CONFIG_FILES in 35088cd5fc2Smrg *\'*) eval set x "$CONFIG_FILES" ;; 35188cd5fc2Smrg *) set x $CONFIG_FILES ;; 35288cd5fc2Smrg esac 35388cd5fc2Smrg shift 35488cd5fc2Smrg for mf 35588cd5fc2Smrg do 35688cd5fc2Smrg # Strip MF so we end up with the name of the file. 35788cd5fc2Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35888cd5fc2Smrg # Check whether this is an Automake generated Makefile or not. 35988cd5fc2Smrg # We used to match only the files named 'Makefile.in', but 36088cd5fc2Smrg # some people rename them; so instead we look at the file content. 36188cd5fc2Smrg # Grep'ing the first line is not enough: some people post-process 36288cd5fc2Smrg # each Makefile.in and add a new line on top of each file to say so. 36388cd5fc2Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36488cd5fc2Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36588cd5fc2Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36688cd5fc2Smrg dirpart=`AS_DIRNAME("$mf")` 36788cd5fc2Smrg else 36888cd5fc2Smrg continue 36988cd5fc2Smrg fi 37088cd5fc2Smrg # Extract the definition of DEPDIR, am__include, and am__quote 37188cd5fc2Smrg # from the Makefile without running 'make'. 37288cd5fc2Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37388cd5fc2Smrg test -z "$DEPDIR" && continue 37488cd5fc2Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37588cd5fc2Smrg test -z "$am__include" && continue 37688cd5fc2Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37788cd5fc2Smrg # Find all dependency output files, they are included files with 37888cd5fc2Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37988cd5fc2Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38088cd5fc2Smrg # expansion. 38188cd5fc2Smrg for file in `sed -n " 38288cd5fc2Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38388cd5fc2Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 38488cd5fc2Smrg # Make sure the directory exists. 38588cd5fc2Smrg test -f "$dirpart/$file" && continue 38688cd5fc2Smrg fdir=`AS_DIRNAME(["$file"])` 38788cd5fc2Smrg AS_MKDIR_P([$dirpart/$fdir]) 38888cd5fc2Smrg # echo "creating $dirpart/$file" 38988cd5fc2Smrg echo '# dummy' > "$dirpart/$file" 39088cd5fc2Smrg done 39188cd5fc2Smrg done 39288cd5fc2Smrg} 39388cd5fc2Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 39488cd5fc2Smrg 39588cd5fc2Smrg 39688cd5fc2Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39788cd5fc2Smrg# ----------------------------- 39888cd5fc2Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 39988cd5fc2Smrg# 40088cd5fc2Smrg# This code is only required when automatic dependency tracking 40188cd5fc2Smrg# is enabled. FIXME. This creates each '.P' file that we will 40288cd5fc2Smrg# need in order to bootstrap the dependency handling code. 40388cd5fc2SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40488cd5fc2Smrg[AC_CONFIG_COMMANDS([depfiles], 40588cd5fc2Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40688cd5fc2Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 40788cd5fc2Smrg]) 40888cd5fc2Smrg 40988cd5fc2Smrg# Do all the work for Automake. -*- Autoconf -*- 41088cd5fc2Smrg 41188cd5fc2Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 41288cd5fc2Smrg# 41388cd5fc2Smrg# This file is free software; the Free Software Foundation 41488cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 41588cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 41688cd5fc2Smrg 41788cd5fc2Smrg# This macro actually does too much. Some checks are only needed if 41888cd5fc2Smrg# your package does certain things. But this isn't really a big deal. 41988cd5fc2Smrg 42088cd5fc2Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 42188cd5fc2Smrgm4_define([AC_PROG_CC], 42288cd5fc2Smrgm4_defn([AC_PROG_CC]) 42388cd5fc2Smrg[_AM_PROG_CC_C_O 42488cd5fc2Smrg]) 42588cd5fc2Smrg 42688cd5fc2Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 42788cd5fc2Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 42888cd5fc2Smrg# ----------------------------------------------- 42988cd5fc2Smrg# The call with PACKAGE and VERSION arguments is the old style 43088cd5fc2Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 43188cd5fc2Smrg# and VERSION should now be passed to AC_INIT and removed from 43288cd5fc2Smrg# the call to AM_INIT_AUTOMAKE. 43388cd5fc2Smrg# We support both call styles for the transition. After 43488cd5fc2Smrg# the next Automake release, Autoconf can make the AC_INIT 43588cd5fc2Smrg# arguments mandatory, and then we can depend on a new Autoconf 43688cd5fc2Smrg# release and drop the old call support. 43788cd5fc2SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 43888cd5fc2Smrg[AC_PREREQ([2.65])dnl 43988cd5fc2Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 44088cd5fc2Smrgdnl the ones we care about. 44188cd5fc2Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 44288cd5fc2SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 44388cd5fc2SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 44488cd5fc2Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 44588cd5fc2Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 44688cd5fc2Smrg # is not polluted with repeated "-I." 44788cd5fc2Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 44888cd5fc2Smrg # test to see if srcdir already configured 44988cd5fc2Smrg if test -f $srcdir/config.status; then 45088cd5fc2Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 45188cd5fc2Smrg fi 45288cd5fc2Smrgfi 45388cd5fc2Smrg 45488cd5fc2Smrg# test whether we have cygpath 45588cd5fc2Smrgif test -z "$CYGPATH_W"; then 45688cd5fc2Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 45788cd5fc2Smrg CYGPATH_W='cygpath -w' 45888cd5fc2Smrg else 45988cd5fc2Smrg CYGPATH_W=echo 46088cd5fc2Smrg fi 46188cd5fc2Smrgfi 46288cd5fc2SmrgAC_SUBST([CYGPATH_W]) 46388cd5fc2Smrg 46488cd5fc2Smrg# Define the identity of the package. 46588cd5fc2Smrgdnl Distinguish between old-style and new-style calls. 46688cd5fc2Smrgm4_ifval([$2], 46788cd5fc2Smrg[AC_DIAGNOSE([obsolete], 46888cd5fc2Smrg [$0: two- and three-arguments forms are deprecated.]) 46988cd5fc2Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 47088cd5fc2Smrg AC_SUBST([PACKAGE], [$1])dnl 47188cd5fc2Smrg AC_SUBST([VERSION], [$2])], 47288cd5fc2Smrg[_AM_SET_OPTIONS([$1])dnl 47388cd5fc2Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 47488cd5fc2Smrgm4_if( 47588cd5fc2Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 47688cd5fc2Smrg [ok:ok],, 47788cd5fc2Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 47888cd5fc2Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 47988cd5fc2Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 48088cd5fc2Smrg 48188cd5fc2Smrg_AM_IF_OPTION([no-define],, 48288cd5fc2Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 48388cd5fc2Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 48488cd5fc2Smrg 48588cd5fc2Smrg# Some tools Automake needs. 48688cd5fc2SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 48788cd5fc2SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 48888cd5fc2SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 48988cd5fc2SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 49088cd5fc2SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 49188cd5fc2SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 49288cd5fc2SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 49388cd5fc2SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49488cd5fc2SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 49588cd5fc2SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 49688cd5fc2Smrg# For better backward compatibility. To be removed once Automake 1.9.x 49788cd5fc2Smrg# dies out for good. For more background, see: 49888cd5fc2Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 49988cd5fc2Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 50088cd5fc2SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 50188cd5fc2Smrg# We need awk for the "check" target. The system "awk" is bad on 50288cd5fc2Smrg# some platforms. 50388cd5fc2SmrgAC_REQUIRE([AC_PROG_AWK])dnl 50488cd5fc2SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50588cd5fc2SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50688cd5fc2Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50788cd5fc2Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50888cd5fc2Smrg [_AM_PROG_TAR([v7])])]) 50988cd5fc2Smrg_AM_IF_OPTION([no-dependencies],, 51088cd5fc2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 51188cd5fc2Smrg [_AM_DEPENDENCIES([CC])], 51288cd5fc2Smrg [m4_define([AC_PROG_CC], 51388cd5fc2Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 51488cd5fc2SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51588cd5fc2Smrg [_AM_DEPENDENCIES([CXX])], 51688cd5fc2Smrg [m4_define([AC_PROG_CXX], 51788cd5fc2Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 51888cd5fc2SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51988cd5fc2Smrg [_AM_DEPENDENCIES([OBJC])], 52088cd5fc2Smrg [m4_define([AC_PROG_OBJC], 52188cd5fc2Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 52288cd5fc2SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 52388cd5fc2Smrg [_AM_DEPENDENCIES([OBJCXX])], 52488cd5fc2Smrg [m4_define([AC_PROG_OBJCXX], 52588cd5fc2Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 52688cd5fc2Smrg]) 52788cd5fc2SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 52888cd5fc2Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 52988cd5fc2Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 53088cd5fc2Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 53188cd5fc2SmrgAC_CONFIG_COMMANDS_PRE(dnl 53288cd5fc2Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 53388cd5fc2Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 53488cd5fc2Smrg 53588cd5fc2Smrg# POSIX will say in a future version that running "rm -f" with no argument 53688cd5fc2Smrg# is OK; and we want to be able to make that assumption in our Makefile 53788cd5fc2Smrg# recipes. So use an aggressive probe to check that the usage we want is 53888cd5fc2Smrg# actually supported "in the wild" to an acceptable degree. 53988cd5fc2Smrg# See automake bug#10828. 54088cd5fc2Smrg# To make any issue more visible, cause the running configure to be aborted 54188cd5fc2Smrg# by default if the 'rm' program in use doesn't match our expectations; the 54288cd5fc2Smrg# user can still override this though. 54388cd5fc2Smrgif rm -f && rm -fr && rm -rf; then : OK; else 54488cd5fc2Smrg cat >&2 <<'END' 54588cd5fc2SmrgOops! 54688cd5fc2Smrg 54788cd5fc2SmrgYour 'rm' program seems unable to run without file operands specified 54888cd5fc2Smrgon the command line, even when the '-f' option is present. This is contrary 54988cd5fc2Smrgto the behaviour of most rm programs out there, and not conforming with 55088cd5fc2Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 55188cd5fc2Smrg 55288cd5fc2SmrgPlease tell bug-automake@gnu.org about your system, including the value 55388cd5fc2Smrgof your $PATH and any error possibly output before this message. This 55488cd5fc2Smrgcan help us improve future automake versions. 55588cd5fc2Smrg 55688cd5fc2SmrgEND 55788cd5fc2Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 55888cd5fc2Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 55988cd5fc2Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 56088cd5fc2Smrg echo >&2 56188cd5fc2Smrg else 56288cd5fc2Smrg cat >&2 <<'END' 56388cd5fc2SmrgAborting the configuration process, to ensure you take notice of the issue. 56488cd5fc2Smrg 56588cd5fc2SmrgYou can download and install GNU coreutils to get an 'rm' implementation 56688cd5fc2Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 56788cd5fc2Smrg 56888cd5fc2SmrgIf you want to complete the configuration process using your problematic 56988cd5fc2Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 57088cd5fc2Smrgto "yes", and re-run configure. 57188cd5fc2Smrg 57288cd5fc2SmrgEND 57388cd5fc2Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 57488cd5fc2Smrg fi 57588cd5fc2Smrgfi 57688cd5fc2Smrg]) 57788cd5fc2Smrg 57888cd5fc2Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 57988cd5fc2Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 58088cd5fc2Smrgdnl mangled by Autoconf and run in a shell conditional statement. 58188cd5fc2Smrgm4_define([_AC_COMPILER_EXEEXT], 58288cd5fc2Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 58388cd5fc2Smrg 58488cd5fc2Smrg# When config.status generates a header, we must update the stamp-h file. 58588cd5fc2Smrg# This file resides in the same directory as the config header 58688cd5fc2Smrg# that is generated. The stamp files are numbered to have different names. 58788cd5fc2Smrg 58888cd5fc2Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 58988cd5fc2Smrg# loop where config.status creates the headers, so we can generate 59088cd5fc2Smrg# our stamp files there. 59188cd5fc2SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 59288cd5fc2Smrg[# Compute $1's index in $config_headers. 59388cd5fc2Smrg_am_arg=$1 59488cd5fc2Smrg_am_stamp_count=1 59588cd5fc2Smrgfor _am_header in $config_headers :; do 59688cd5fc2Smrg case $_am_header in 59788cd5fc2Smrg $_am_arg | $_am_arg:* ) 59888cd5fc2Smrg break ;; 59988cd5fc2Smrg * ) 60088cd5fc2Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 60188cd5fc2Smrg esac 60288cd5fc2Smrgdone 60388cd5fc2Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 60488cd5fc2Smrg 60588cd5fc2Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 60688cd5fc2Smrg# 60788cd5fc2Smrg# This file is free software; the Free Software Foundation 60888cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 60988cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 61088cd5fc2Smrg 61188cd5fc2Smrg# AM_PROG_INSTALL_SH 61288cd5fc2Smrg# ------------------ 61388cd5fc2Smrg# Define $install_sh. 61488cd5fc2SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 61588cd5fc2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 61688cd5fc2Smrgif test x"${install_sh}" != xset; then 61788cd5fc2Smrg case $am_aux_dir in 61888cd5fc2Smrg *\ * | *\ *) 61988cd5fc2Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 62088cd5fc2Smrg *) 62188cd5fc2Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 62288cd5fc2Smrg esac 62388cd5fc2Smrgfi 62488cd5fc2SmrgAC_SUBST([install_sh])]) 62588cd5fc2Smrg 62688cd5fc2Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 62788cd5fc2Smrg# 62888cd5fc2Smrg# This file is free software; the Free Software Foundation 62988cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 63088cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 63188cd5fc2Smrg 63288cd5fc2Smrg# Check whether the underlying file-system supports filenames 63388cd5fc2Smrg# with a leading dot. For instance MS-DOS doesn't. 63488cd5fc2SmrgAC_DEFUN([AM_SET_LEADING_DOT], 63588cd5fc2Smrg[rm -rf .tst 2>/dev/null 63688cd5fc2Smrgmkdir .tst 2>/dev/null 63788cd5fc2Smrgif test -d .tst; then 63888cd5fc2Smrg am__leading_dot=. 63988cd5fc2Smrgelse 64088cd5fc2Smrg am__leading_dot=_ 64188cd5fc2Smrgfi 64288cd5fc2Smrgrmdir .tst 2>/dev/null 64388cd5fc2SmrgAC_SUBST([am__leading_dot])]) 64488cd5fc2Smrg 64588cd5fc2Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 64688cd5fc2Smrg# From Jim Meyering 64788cd5fc2Smrg 64888cd5fc2Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 64988cd5fc2Smrg# 65088cd5fc2Smrg# This file is free software; the Free Software Foundation 65188cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 65288cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 65388cd5fc2Smrg 65488cd5fc2Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 65588cd5fc2Smrg# ---------------------------------- 65688cd5fc2Smrg# Control maintainer-specific portions of Makefiles. 65788cd5fc2Smrg# Default is to disable them, unless 'enable' is passed literally. 65888cd5fc2Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 65988cd5fc2Smrg# can override the default with the --enable/--disable switch. 66088cd5fc2SmrgAC_DEFUN([AM_MAINTAINER_MODE], 66188cd5fc2Smrg[m4_case(m4_default([$1], [disable]), 66288cd5fc2Smrg [enable], [m4_define([am_maintainer_other], [disable])], 66388cd5fc2Smrg [disable], [m4_define([am_maintainer_other], [enable])], 66488cd5fc2Smrg [m4_define([am_maintainer_other], [enable]) 66588cd5fc2Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 66688cd5fc2SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 66788cd5fc2Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 66888cd5fc2Smrg AC_ARG_ENABLE([maintainer-mode], 66988cd5fc2Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 67088cd5fc2Smrg am_maintainer_other[ make rules and dependencies not useful 67188cd5fc2Smrg (and sometimes confusing) to the casual installer])], 67288cd5fc2Smrg [USE_MAINTAINER_MODE=$enableval], 67388cd5fc2Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 67488cd5fc2Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 67588cd5fc2Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 67688cd5fc2Smrg MAINT=$MAINTAINER_MODE_TRUE 67788cd5fc2Smrg AC_SUBST([MAINT])dnl 67888cd5fc2Smrg] 67988cd5fc2Smrg) 68088cd5fc2Smrg 68188cd5fc2Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 68288cd5fc2Smrg 68388cd5fc2Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 68488cd5fc2Smrg# 68588cd5fc2Smrg# This file is free software; the Free Software Foundation 68688cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 68788cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 68888cd5fc2Smrg 68988cd5fc2Smrg# AM_MAKE_INCLUDE() 69088cd5fc2Smrg# ----------------- 69188cd5fc2Smrg# Check to see how make treats includes. 69288cd5fc2SmrgAC_DEFUN([AM_MAKE_INCLUDE], 69388cd5fc2Smrg[am_make=${MAKE-make} 69488cd5fc2Smrgcat > confinc << 'END' 69588cd5fc2Smrgam__doit: 69688cd5fc2Smrg @echo this is the am__doit target 69788cd5fc2Smrg.PHONY: am__doit 69888cd5fc2SmrgEND 69988cd5fc2Smrg# If we don't find an include directive, just comment out the code. 70088cd5fc2SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 70188cd5fc2Smrgam__include="#" 70288cd5fc2Smrgam__quote= 70388cd5fc2Smrg_am_result=none 70488cd5fc2Smrg# First try GNU make style include. 70588cd5fc2Smrgecho "include confinc" > confmf 70688cd5fc2Smrg# Ignore all kinds of additional output from 'make'. 70788cd5fc2Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 70888cd5fc2Smrg*the\ am__doit\ target*) 70988cd5fc2Smrg am__include=include 71088cd5fc2Smrg am__quote= 71188cd5fc2Smrg _am_result=GNU 71288cd5fc2Smrg ;; 71388cd5fc2Smrgesac 71488cd5fc2Smrg# Now try BSD make style include. 71588cd5fc2Smrgif test "$am__include" = "#"; then 71688cd5fc2Smrg echo '.include "confinc"' > confmf 71788cd5fc2Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 71888cd5fc2Smrg *the\ am__doit\ target*) 71988cd5fc2Smrg am__include=.include 72088cd5fc2Smrg am__quote="\"" 72188cd5fc2Smrg _am_result=BSD 72288cd5fc2Smrg ;; 72388cd5fc2Smrg esac 72488cd5fc2Smrgfi 72588cd5fc2SmrgAC_SUBST([am__include]) 72688cd5fc2SmrgAC_SUBST([am__quote]) 72788cd5fc2SmrgAC_MSG_RESULT([$_am_result]) 72888cd5fc2Smrgrm -f confinc confmf 72988cd5fc2Smrg]) 73088cd5fc2Smrg 73188cd5fc2Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 73288cd5fc2Smrg 73388cd5fc2Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 73488cd5fc2Smrg# 73588cd5fc2Smrg# This file is free software; the Free Software Foundation 73688cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 73788cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 73888cd5fc2Smrg 73988cd5fc2Smrg# AM_MISSING_PROG(NAME, PROGRAM) 74088cd5fc2Smrg# ------------------------------ 74188cd5fc2SmrgAC_DEFUN([AM_MISSING_PROG], 74288cd5fc2Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 74388cd5fc2Smrg$1=${$1-"${am_missing_run}$2"} 74488cd5fc2SmrgAC_SUBST($1)]) 74588cd5fc2Smrg 74688cd5fc2Smrg# AM_MISSING_HAS_RUN 74788cd5fc2Smrg# ------------------ 74888cd5fc2Smrg# Define MISSING if not defined so far and test if it is modern enough. 74988cd5fc2Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 75088cd5fc2SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 75188cd5fc2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 75288cd5fc2SmrgAC_REQUIRE_AUX_FILE([missing])dnl 75388cd5fc2Smrgif test x"${MISSING+set}" != xset; then 75488cd5fc2Smrg case $am_aux_dir in 75588cd5fc2Smrg *\ * | *\ *) 75688cd5fc2Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 75788cd5fc2Smrg *) 75888cd5fc2Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 75988cd5fc2Smrg esac 76088cd5fc2Smrgfi 76188cd5fc2Smrg# Use eval to expand $SHELL 76288cd5fc2Smrgif eval "$MISSING --is-lightweight"; then 76388cd5fc2Smrg am_missing_run="$MISSING " 76488cd5fc2Smrgelse 76588cd5fc2Smrg am_missing_run= 76688cd5fc2Smrg AC_MSG_WARN(['missing' script is too old or missing]) 76788cd5fc2Smrgfi 76888cd5fc2Smrg]) 76988cd5fc2Smrg 77088cd5fc2Smrg# Helper functions for option handling. -*- Autoconf -*- 77188cd5fc2Smrg 77288cd5fc2Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 77388cd5fc2Smrg# 77488cd5fc2Smrg# This file is free software; the Free Software Foundation 77588cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 77688cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 77788cd5fc2Smrg 77888cd5fc2Smrg# _AM_MANGLE_OPTION(NAME) 77988cd5fc2Smrg# ----------------------- 78088cd5fc2SmrgAC_DEFUN([_AM_MANGLE_OPTION], 78188cd5fc2Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 78288cd5fc2Smrg 78388cd5fc2Smrg# _AM_SET_OPTION(NAME) 78488cd5fc2Smrg# -------------------- 78588cd5fc2Smrg# Set option NAME. Presently that only means defining a flag for this option. 78688cd5fc2SmrgAC_DEFUN([_AM_SET_OPTION], 78788cd5fc2Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 78888cd5fc2Smrg 78988cd5fc2Smrg# _AM_SET_OPTIONS(OPTIONS) 79088cd5fc2Smrg# ------------------------ 79188cd5fc2Smrg# OPTIONS is a space-separated list of Automake options. 79288cd5fc2SmrgAC_DEFUN([_AM_SET_OPTIONS], 79388cd5fc2Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 79488cd5fc2Smrg 79588cd5fc2Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 79688cd5fc2Smrg# ------------------------------------------- 79788cd5fc2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 79888cd5fc2SmrgAC_DEFUN([_AM_IF_OPTION], 79988cd5fc2Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 80088cd5fc2Smrg 80188cd5fc2Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 80288cd5fc2Smrg# 80388cd5fc2Smrg# This file is free software; the Free Software Foundation 80488cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 80588cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 80688cd5fc2Smrg 80788cd5fc2Smrg# _AM_PROG_CC_C_O 80888cd5fc2Smrg# --------------- 80988cd5fc2Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 81088cd5fc2Smrg# to automatically call this. 81188cd5fc2SmrgAC_DEFUN([_AM_PROG_CC_C_O], 81288cd5fc2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 81388cd5fc2SmrgAC_REQUIRE_AUX_FILE([compile])dnl 81488cd5fc2SmrgAC_LANG_PUSH([C])dnl 81588cd5fc2SmrgAC_CACHE_CHECK( 81688cd5fc2Smrg [whether $CC understands -c and -o together], 81788cd5fc2Smrg [am_cv_prog_cc_c_o], 81888cd5fc2Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 81988cd5fc2Smrg # Make sure it works both with $CC and with simple cc. 82088cd5fc2Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 82188cd5fc2Smrg # compilers refuse to overwrite an existing .o file with -o, 82288cd5fc2Smrg # though they will create one. 82388cd5fc2Smrg am_cv_prog_cc_c_o=yes 82488cd5fc2Smrg for am_i in 1 2; do 82588cd5fc2Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 82688cd5fc2Smrg && test -f conftest2.$ac_objext; then 82788cd5fc2Smrg : OK 82888cd5fc2Smrg else 82988cd5fc2Smrg am_cv_prog_cc_c_o=no 83088cd5fc2Smrg break 83188cd5fc2Smrg fi 83288cd5fc2Smrg done 83388cd5fc2Smrg rm -f core conftest* 83488cd5fc2Smrg unset am_i]) 83588cd5fc2Smrgif test "$am_cv_prog_cc_c_o" != yes; then 83688cd5fc2Smrg # Losing compiler, so override with the script. 83788cd5fc2Smrg # FIXME: It is wrong to rewrite CC. 83888cd5fc2Smrg # But if we don't then we get into trouble of one sort or another. 83988cd5fc2Smrg # A longer-term fix would be to have automake use am__CC in this case, 84088cd5fc2Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 84188cd5fc2Smrg CC="$am_aux_dir/compile $CC" 84288cd5fc2Smrgfi 84388cd5fc2SmrgAC_LANG_POP([C])]) 84488cd5fc2Smrg 84588cd5fc2Smrg# For backward compatibility. 84688cd5fc2SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 84788cd5fc2Smrg 84888cd5fc2Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 84988cd5fc2Smrg# 85088cd5fc2Smrg# This file is free software; the Free Software Foundation 85188cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 85288cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 85388cd5fc2Smrg 85488cd5fc2Smrg# AM_RUN_LOG(COMMAND) 85588cd5fc2Smrg# ------------------- 85688cd5fc2Smrg# Run COMMAND, save the exit status in ac_status, and log it. 85788cd5fc2Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 85888cd5fc2SmrgAC_DEFUN([AM_RUN_LOG], 85988cd5fc2Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 86088cd5fc2Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 86188cd5fc2Smrg ac_status=$? 86288cd5fc2Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 86388cd5fc2Smrg (exit $ac_status); }]) 86488cd5fc2Smrg 86588cd5fc2Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 86688cd5fc2Smrg 86788cd5fc2Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 86888cd5fc2Smrg# 86988cd5fc2Smrg# This file is free software; the Free Software Foundation 87088cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 87188cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 87288cd5fc2Smrg 87388cd5fc2Smrg# AM_SANITY_CHECK 87488cd5fc2Smrg# --------------- 87588cd5fc2SmrgAC_DEFUN([AM_SANITY_CHECK], 87688cd5fc2Smrg[AC_MSG_CHECKING([whether build environment is sane]) 87788cd5fc2Smrg# Reject unsafe characters in $srcdir or the absolute working directory 87888cd5fc2Smrg# name. Accept space and tab only in the latter. 87988cd5fc2Smrgam_lf=' 88088cd5fc2Smrg' 88188cd5fc2Smrgcase `pwd` in 88288cd5fc2Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 88388cd5fc2Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 88488cd5fc2Smrgesac 88588cd5fc2Smrgcase $srcdir in 88688cd5fc2Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 88788cd5fc2Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 88888cd5fc2Smrgesac 88988cd5fc2Smrg 89088cd5fc2Smrg# Do 'set' in a subshell so we don't clobber the current shell's 89188cd5fc2Smrg# arguments. Must try -L first in case configure is actually a 89288cd5fc2Smrg# symlink; some systems play weird games with the mod time of symlinks 89388cd5fc2Smrg# (eg FreeBSD returns the mod time of the symlink's containing 89488cd5fc2Smrg# directory). 89588cd5fc2Smrgif ( 89688cd5fc2Smrg am_has_slept=no 89788cd5fc2Smrg for am_try in 1 2; do 89888cd5fc2Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 89988cd5fc2Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 90088cd5fc2Smrg if test "$[*]" = "X"; then 90188cd5fc2Smrg # -L didn't work. 90288cd5fc2Smrg set X `ls -t "$srcdir/configure" conftest.file` 90388cd5fc2Smrg fi 90488cd5fc2Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 90588cd5fc2Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 90688cd5fc2Smrg 90788cd5fc2Smrg # If neither matched, then we have a broken ls. This can happen 90888cd5fc2Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 90988cd5fc2Smrg # broken ls alias from the environment. This has actually 91088cd5fc2Smrg # happened. Such a system could not be considered "sane". 91188cd5fc2Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 91288cd5fc2Smrg alias in your environment]) 91388cd5fc2Smrg fi 91488cd5fc2Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 91588cd5fc2Smrg break 91688cd5fc2Smrg fi 91788cd5fc2Smrg # Just in case. 91888cd5fc2Smrg sleep 1 91988cd5fc2Smrg am_has_slept=yes 92088cd5fc2Smrg done 92188cd5fc2Smrg test "$[2]" = conftest.file 92288cd5fc2Smrg ) 92388cd5fc2Smrgthen 92488cd5fc2Smrg # Ok. 92588cd5fc2Smrg : 92688cd5fc2Smrgelse 92788cd5fc2Smrg AC_MSG_ERROR([newly created file is older than distributed files! 92888cd5fc2SmrgCheck your system clock]) 92988cd5fc2Smrgfi 93088cd5fc2SmrgAC_MSG_RESULT([yes]) 93188cd5fc2Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 93288cd5fc2Smrg# generated files are strictly newer. 93388cd5fc2Smrgam_sleep_pid= 93488cd5fc2Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 93588cd5fc2Smrg ( sleep 1 ) & 93688cd5fc2Smrg am_sleep_pid=$! 93788cd5fc2Smrgfi 93888cd5fc2SmrgAC_CONFIG_COMMANDS_PRE( 93988cd5fc2Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 94088cd5fc2Smrg if test -n "$am_sleep_pid"; then 94188cd5fc2Smrg # Hide warnings about reused PIDs. 94288cd5fc2Smrg wait $am_sleep_pid 2>/dev/null 94388cd5fc2Smrg fi 94488cd5fc2Smrg AC_MSG_RESULT([done])]) 94588cd5fc2Smrgrm -f conftest.file 94688cd5fc2Smrg]) 94788cd5fc2Smrg 94888cd5fc2Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 94988cd5fc2Smrg# 95088cd5fc2Smrg# This file is free software; the Free Software Foundation 95188cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 95288cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 95388cd5fc2Smrg 95488cd5fc2Smrg# AM_SILENT_RULES([DEFAULT]) 95588cd5fc2Smrg# -------------------------- 95688cd5fc2Smrg# Enable less verbose build rules; with the default set to DEFAULT 95788cd5fc2Smrg# ("yes" being less verbose, "no" or empty being verbose). 95888cd5fc2SmrgAC_DEFUN([AM_SILENT_RULES], 95988cd5fc2Smrg[AC_ARG_ENABLE([silent-rules], [dnl 96088cd5fc2SmrgAS_HELP_STRING( 96188cd5fc2Smrg [--enable-silent-rules], 96288cd5fc2Smrg [less verbose build output (undo: "make V=1")]) 96388cd5fc2SmrgAS_HELP_STRING( 96488cd5fc2Smrg [--disable-silent-rules], 96588cd5fc2Smrg [verbose build output (undo: "make V=0")])dnl 96688cd5fc2Smrg]) 96788cd5fc2Smrgcase $enable_silent_rules in @%:@ ((( 96888cd5fc2Smrg yes) AM_DEFAULT_VERBOSITY=0;; 96988cd5fc2Smrg no) AM_DEFAULT_VERBOSITY=1;; 97088cd5fc2Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 97188cd5fc2Smrgesac 97288cd5fc2Smrgdnl 97388cd5fc2Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 97488cd5fc2Smrgdnl do not support nested variable expansions. 97588cd5fc2Smrgdnl See automake bug#9928 and bug#10237. 97688cd5fc2Smrgam_make=${MAKE-make} 97788cd5fc2SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 97888cd5fc2Smrg [am_cv_make_support_nested_variables], 97988cd5fc2Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 98088cd5fc2SmrgBAR0=false 98188cd5fc2SmrgBAR1=true 98288cd5fc2SmrgV=1 98388cd5fc2Smrgam__doit: 98488cd5fc2Smrg @$(TRUE) 98588cd5fc2Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 98688cd5fc2Smrg am_cv_make_support_nested_variables=yes 98788cd5fc2Smrgelse 98888cd5fc2Smrg am_cv_make_support_nested_variables=no 98988cd5fc2Smrgfi]) 99088cd5fc2Smrgif test $am_cv_make_support_nested_variables = yes; then 99188cd5fc2Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 99288cd5fc2Smrg AM_V='$(V)' 99388cd5fc2Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 99488cd5fc2Smrgelse 99588cd5fc2Smrg AM_V=$AM_DEFAULT_VERBOSITY 99688cd5fc2Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 99788cd5fc2Smrgfi 99888cd5fc2SmrgAC_SUBST([AM_V])dnl 99988cd5fc2SmrgAM_SUBST_NOTMAKE([AM_V])dnl 100088cd5fc2SmrgAC_SUBST([AM_DEFAULT_V])dnl 100188cd5fc2SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 100288cd5fc2SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 100388cd5fc2SmrgAM_BACKSLASH='\' 100488cd5fc2SmrgAC_SUBST([AM_BACKSLASH])dnl 100588cd5fc2Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 100688cd5fc2Smrg]) 100788cd5fc2Smrg 100888cd5fc2Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 100988cd5fc2Smrg# 101088cd5fc2Smrg# This file is free software; the Free Software Foundation 101188cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 101288cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 101388cd5fc2Smrg 101488cd5fc2Smrg# AM_PROG_INSTALL_STRIP 101588cd5fc2Smrg# --------------------- 101688cd5fc2Smrg# One issue with vendor 'install' (even GNU) is that you can't 101788cd5fc2Smrg# specify the program used to strip binaries. This is especially 101888cd5fc2Smrg# annoying in cross-compiling environments, where the build's strip 101988cd5fc2Smrg# is unlikely to handle the host's binaries. 102088cd5fc2Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 102188cd5fc2Smrg# always use install-sh in "make install-strip", and initialize 102288cd5fc2Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 102388cd5fc2SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 102488cd5fc2Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 102588cd5fc2Smrg# Installed binaries are usually stripped using 'strip' when the user 102688cd5fc2Smrg# run "make install-strip". However 'strip' might not be the right 102788cd5fc2Smrg# tool to use in cross-compilation environments, therefore Automake 102888cd5fc2Smrg# will honor the 'STRIP' environment variable to overrule this program. 102988cd5fc2Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 103088cd5fc2Smrgif test "$cross_compiling" != no; then 103188cd5fc2Smrg AC_CHECK_TOOL([STRIP], [strip], :) 103288cd5fc2Smrgfi 103388cd5fc2SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 103488cd5fc2SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 103588cd5fc2Smrg 103688cd5fc2Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 103788cd5fc2Smrg# 103888cd5fc2Smrg# This file is free software; the Free Software Foundation 103988cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 104088cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 104188cd5fc2Smrg 104288cd5fc2Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 104388cd5fc2Smrg# --------------------------- 104488cd5fc2Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 104588cd5fc2Smrg# This macro is traced by Automake. 104688cd5fc2SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 104788cd5fc2Smrg 104888cd5fc2Smrg# AM_SUBST_NOTMAKE(VARIABLE) 104988cd5fc2Smrg# -------------------------- 105088cd5fc2Smrg# Public sister of _AM_SUBST_NOTMAKE. 105188cd5fc2SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 105288cd5fc2Smrg 105388cd5fc2Smrg# Check how to create a tarball. -*- Autoconf -*- 105488cd5fc2Smrg 105588cd5fc2Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 105688cd5fc2Smrg# 105788cd5fc2Smrg# This file is free software; the Free Software Foundation 105888cd5fc2Smrg# gives unlimited permission to copy and/or distribute it, 105988cd5fc2Smrg# with or without modifications, as long as this notice is preserved. 106088cd5fc2Smrg 106188cd5fc2Smrg# _AM_PROG_TAR(FORMAT) 106288cd5fc2Smrg# -------------------- 106388cd5fc2Smrg# Check how to create a tarball in format FORMAT. 106488cd5fc2Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 106588cd5fc2Smrg# 106688cd5fc2Smrg# Substitute a variable $(am__tar) that is a command 106788cd5fc2Smrg# writing to stdout a FORMAT-tarball containing the directory 106888cd5fc2Smrg# $tardir. 106988cd5fc2Smrg# tardir=directory && $(am__tar) > result.tar 107088cd5fc2Smrg# 107188cd5fc2Smrg# Substitute a variable $(am__untar) that extract such 107288cd5fc2Smrg# a tarball read from stdin. 107388cd5fc2Smrg# $(am__untar) < result.tar 107488cd5fc2Smrg# 107588cd5fc2SmrgAC_DEFUN([_AM_PROG_TAR], 107688cd5fc2Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 107788cd5fc2Smrg# in the wild :-( We should find a proper way to deprecate it ... 107888cd5fc2SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 107988cd5fc2Smrg 108088cd5fc2Smrg# We'll loop over all known methods to create a tar archive until one works. 108188cd5fc2Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 108288cd5fc2Smrg 108388cd5fc2Smrgm4_if([$1], [v7], 108488cd5fc2Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 108588cd5fc2Smrg 108688cd5fc2Smrg [m4_case([$1], 108788cd5fc2Smrg [ustar], 108888cd5fc2Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 108988cd5fc2Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 109088cd5fc2Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 109188cd5fc2Smrg # and bug#13588). 109288cd5fc2Smrg am_max_uid=2097151 # 2^21 - 1 109388cd5fc2Smrg am_max_gid=$am_max_uid 109488cd5fc2Smrg # The $UID and $GID variables are not portable, so we need to resort 109588cd5fc2Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 109688cd5fc2Smrg # below are definitely unexpected, so allow the users to see them 109788cd5fc2Smrg # (that is, avoid stderr redirection). 109888cd5fc2Smrg am_uid=`id -u || echo unknown` 109988cd5fc2Smrg am_gid=`id -g || echo unknown` 110088cd5fc2Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 110188cd5fc2Smrg if test $am_uid -le $am_max_uid; then 110288cd5fc2Smrg AC_MSG_RESULT([yes]) 110388cd5fc2Smrg else 110488cd5fc2Smrg AC_MSG_RESULT([no]) 110588cd5fc2Smrg _am_tools=none 110688cd5fc2Smrg fi 110788cd5fc2Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 110888cd5fc2Smrg if test $am_gid -le $am_max_gid; then 110988cd5fc2Smrg AC_MSG_RESULT([yes]) 111088cd5fc2Smrg else 111188cd5fc2Smrg AC_MSG_RESULT([no]) 111288cd5fc2Smrg _am_tools=none 111388cd5fc2Smrg fi], 111488cd5fc2Smrg 111588cd5fc2Smrg [pax], 111688cd5fc2Smrg [], 111788cd5fc2Smrg 111888cd5fc2Smrg [m4_fatal([Unknown tar format])]) 111988cd5fc2Smrg 112088cd5fc2Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 112188cd5fc2Smrg 112288cd5fc2Smrg # Go ahead even if we have the value already cached. We do so because we 112388cd5fc2Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 112488cd5fc2Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 112588cd5fc2Smrg 112688cd5fc2Smrg for _am_tool in $_am_tools; do 112788cd5fc2Smrg case $_am_tool in 112888cd5fc2Smrg gnutar) 112988cd5fc2Smrg for _am_tar in tar gnutar gtar; do 113088cd5fc2Smrg AM_RUN_LOG([$_am_tar --version]) && break 113188cd5fc2Smrg done 113288cd5fc2Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 113388cd5fc2Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 113488cd5fc2Smrg am__untar="$_am_tar -xf -" 113588cd5fc2Smrg ;; 113688cd5fc2Smrg plaintar) 113788cd5fc2Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 113888cd5fc2Smrg # ustar tarball either. 113988cd5fc2Smrg (tar --version) >/dev/null 2>&1 && continue 114088cd5fc2Smrg am__tar='tar chf - "$$tardir"' 114188cd5fc2Smrg am__tar_='tar chf - "$tardir"' 114288cd5fc2Smrg am__untar='tar xf -' 114388cd5fc2Smrg ;; 114488cd5fc2Smrg pax) 114588cd5fc2Smrg am__tar='pax -L -x $1 -w "$$tardir"' 114688cd5fc2Smrg am__tar_='pax -L -x $1 -w "$tardir"' 114788cd5fc2Smrg am__untar='pax -r' 114888cd5fc2Smrg ;; 114988cd5fc2Smrg cpio) 115088cd5fc2Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 115188cd5fc2Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 115288cd5fc2Smrg am__untar='cpio -i -H $1 -d' 115388cd5fc2Smrg ;; 115488cd5fc2Smrg none) 115588cd5fc2Smrg am__tar=false 115688cd5fc2Smrg am__tar_=false 115788cd5fc2Smrg am__untar=false 115888cd5fc2Smrg ;; 115988cd5fc2Smrg esac 116088cd5fc2Smrg 116188cd5fc2Smrg # If the value was cached, stop now. We just wanted to have am__tar 116288cd5fc2Smrg # and am__untar set. 116388cd5fc2Smrg test -n "${am_cv_prog_tar_$1}" && break 116488cd5fc2Smrg 116588cd5fc2Smrg # tar/untar a dummy directory, and stop if the command works. 116688cd5fc2Smrg rm -rf conftest.dir 116788cd5fc2Smrg mkdir conftest.dir 116888cd5fc2Smrg echo GrepMe > conftest.dir/file 116988cd5fc2Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 117088cd5fc2Smrg rm -rf conftest.dir 117188cd5fc2Smrg if test -s conftest.tar; then 117288cd5fc2Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 117388cd5fc2Smrg AM_RUN_LOG([cat conftest.dir/file]) 117488cd5fc2Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 117588cd5fc2Smrg fi 117688cd5fc2Smrg done 117788cd5fc2Smrg rm -rf conftest.dir 117888cd5fc2Smrg 117988cd5fc2Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 118088cd5fc2Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 118188cd5fc2Smrg 118288cd5fc2SmrgAC_SUBST([am__tar]) 118388cd5fc2SmrgAC_SUBST([am__untar]) 118488cd5fc2Smrg]) # _AM_PROG_TAR 118588cd5fc2Smrg 118688cd5fc2Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 118788cd5fc2Smrg# 118888cd5fc2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 118988cd5fc2Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 119088cd5fc2Smrg# Foundation, Inc. 119188cd5fc2Smrg# Written by Gordon Matzigkeit, 1996 119288cd5fc2Smrg# 119388cd5fc2Smrg# This file is free software; the Free Software Foundation gives 119488cd5fc2Smrg# unlimited permission to copy and/or distribute it, with or without 119588cd5fc2Smrg# modifications, as long as this notice is preserved. 119688cd5fc2Smrg 119788cd5fc2Smrgm4_define([_LT_COPYING], [dnl 119888cd5fc2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 119988cd5fc2Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 120088cd5fc2Smrg# Foundation, Inc. 120188cd5fc2Smrg# Written by Gordon Matzigkeit, 1996 120288cd5fc2Smrg# 120388cd5fc2Smrg# This file is part of GNU Libtool. 120488cd5fc2Smrg# 120588cd5fc2Smrg# GNU Libtool is free software; you can redistribute it and/or 120688cd5fc2Smrg# modify it under the terms of the GNU General Public License as 120788cd5fc2Smrg# published by the Free Software Foundation; either version 2 of 120888cd5fc2Smrg# the License, or (at your option) any later version. 120988cd5fc2Smrg# 121088cd5fc2Smrg# As a special exception to the GNU General Public License, 121188cd5fc2Smrg# if you distribute this file as part of a program or library that 121288cd5fc2Smrg# is built using GNU Libtool, you may include this file under the 121388cd5fc2Smrg# same distribution terms that you use for the rest of that program. 121488cd5fc2Smrg# 121588cd5fc2Smrg# GNU Libtool is distributed in the hope that it will be useful, 121688cd5fc2Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 121788cd5fc2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 121888cd5fc2Smrg# GNU General Public License for more details. 121988cd5fc2Smrg# 122088cd5fc2Smrg# You should have received a copy of the GNU General Public License 122188cd5fc2Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 122288cd5fc2Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 122388cd5fc2Smrg# obtained by writing to the Free Software Foundation, Inc., 122488cd5fc2Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 122588cd5fc2Smrg]) 122688cd5fc2Smrg 122788cd5fc2Smrg# serial 57 LT_INIT 122888cd5fc2Smrg 122988cd5fc2Smrg 123088cd5fc2Smrg# LT_PREREQ(VERSION) 123188cd5fc2Smrg# ------------------ 123288cd5fc2Smrg# Complain and exit if this libtool version is less that VERSION. 123388cd5fc2Smrgm4_defun([LT_PREREQ], 123488cd5fc2Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 123588cd5fc2Smrg [m4_default([$3], 123688cd5fc2Smrg [m4_fatal([Libtool version $1 or higher is required], 123788cd5fc2Smrg 63)])], 123888cd5fc2Smrg [$2])]) 123988cd5fc2Smrg 124088cd5fc2Smrg 124188cd5fc2Smrg# _LT_CHECK_BUILDDIR 124288cd5fc2Smrg# ------------------ 124388cd5fc2Smrg# Complain if the absolute build directory name contains unusual characters 124488cd5fc2Smrgm4_defun([_LT_CHECK_BUILDDIR], 124588cd5fc2Smrg[case `pwd` in 124688cd5fc2Smrg *\ * | *\ *) 124788cd5fc2Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 124888cd5fc2Smrgesac 124988cd5fc2Smrg]) 125088cd5fc2Smrg 125188cd5fc2Smrg 125288cd5fc2Smrg# LT_INIT([OPTIONS]) 125388cd5fc2Smrg# ------------------ 125488cd5fc2SmrgAC_DEFUN([LT_INIT], 125588cd5fc2Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 125688cd5fc2SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 125788cd5fc2SmrgAC_BEFORE([$0], [LT_LANG])dnl 125888cd5fc2SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 125988cd5fc2SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 126088cd5fc2Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 126188cd5fc2Smrg 126288cd5fc2Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 126388cd5fc2Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 126488cd5fc2Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 126588cd5fc2Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 126688cd5fc2Smrgdnl unless we require an AC_DEFUNed macro: 126788cd5fc2SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 126888cd5fc2SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 126988cd5fc2SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 127088cd5fc2SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 127188cd5fc2Smrgm4_require([_LT_PROG_LTMAIN])dnl 127288cd5fc2Smrg 127388cd5fc2Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 127488cd5fc2Smrg 127588cd5fc2Smrgdnl Parse OPTIONS 127688cd5fc2Smrg_LT_SET_OPTIONS([$0], [$1]) 127788cd5fc2Smrg 127888cd5fc2Smrg# This can be used to rebuild libtool when needed 127988cd5fc2SmrgLIBTOOL_DEPS="$ltmain" 128088cd5fc2Smrg 128188cd5fc2Smrg# Always use our own libtool. 128288cd5fc2SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 128388cd5fc2SmrgAC_SUBST(LIBTOOL)dnl 128488cd5fc2Smrg 128588cd5fc2Smrg_LT_SETUP 128688cd5fc2Smrg 128788cd5fc2Smrg# Only expand once: 128888cd5fc2Smrgm4_define([LT_INIT]) 128988cd5fc2Smrg])# LT_INIT 129088cd5fc2Smrg 129188cd5fc2Smrg# Old names: 129288cd5fc2SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 129388cd5fc2SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 129488cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 129588cd5fc2Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 129688cd5fc2Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 129788cd5fc2Smrg 129888cd5fc2Smrg 129988cd5fc2Smrg# _LT_CC_BASENAME(CC) 130088cd5fc2Smrg# ------------------- 130188cd5fc2Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 130288cd5fc2Smrgm4_defun([_LT_CC_BASENAME], 130388cd5fc2Smrg[for cc_temp in $1""; do 130488cd5fc2Smrg case $cc_temp in 130588cd5fc2Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 130688cd5fc2Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 130788cd5fc2Smrg \-*) ;; 130888cd5fc2Smrg *) break;; 130988cd5fc2Smrg esac 131088cd5fc2Smrgdone 131188cd5fc2Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 131288cd5fc2Smrg]) 131388cd5fc2Smrg 131488cd5fc2Smrg 131588cd5fc2Smrg# _LT_FILEUTILS_DEFAULTS 131688cd5fc2Smrg# ---------------------- 131788cd5fc2Smrg# It is okay to use these file commands and assume they have been set 131888cd5fc2Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 131988cd5fc2Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 132088cd5fc2Smrg[: ${CP="cp -f"} 132188cd5fc2Smrg: ${MV="mv -f"} 132288cd5fc2Smrg: ${RM="rm -f"} 132388cd5fc2Smrg])# _LT_FILEUTILS_DEFAULTS 132488cd5fc2Smrg 132588cd5fc2Smrg 132688cd5fc2Smrg# _LT_SETUP 132788cd5fc2Smrg# --------- 132888cd5fc2Smrgm4_defun([_LT_SETUP], 132988cd5fc2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 133088cd5fc2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 133188cd5fc2SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 133288cd5fc2SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 133388cd5fc2Smrg 133488cd5fc2Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 133588cd5fc2Smrgdnl 133688cd5fc2Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 133788cd5fc2Smrg_LT_DECL([], [host], [0])dnl 133888cd5fc2Smrg_LT_DECL([], [host_os], [0])dnl 133988cd5fc2Smrgdnl 134088cd5fc2Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 134188cd5fc2Smrg_LT_DECL([], [build], [0])dnl 134288cd5fc2Smrg_LT_DECL([], [build_os], [0])dnl 134388cd5fc2Smrgdnl 134488cd5fc2SmrgAC_REQUIRE([AC_PROG_CC])dnl 134588cd5fc2SmrgAC_REQUIRE([LT_PATH_LD])dnl 134688cd5fc2SmrgAC_REQUIRE([LT_PATH_NM])dnl 134788cd5fc2Smrgdnl 134888cd5fc2SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 134988cd5fc2Smrgtest -z "$LN_S" && LN_S="ln -s" 135088cd5fc2Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 135188cd5fc2Smrgdnl 135288cd5fc2SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 135388cd5fc2Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 135488cd5fc2Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 135588cd5fc2Smrgdnl 135688cd5fc2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 135788cd5fc2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 135888cd5fc2Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 135988cd5fc2Smrgm4_require([_LT_CMD_RELOAD])dnl 136088cd5fc2Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 136188cd5fc2Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 136288cd5fc2Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 136388cd5fc2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 136488cd5fc2Smrgm4_require([_LT_WITH_SYSROOT])dnl 136588cd5fc2Smrg 136688cd5fc2Smrg_LT_CONFIG_LIBTOOL_INIT([ 136788cd5fc2Smrg# See if we are running on zsh, and set the options which allow our 136888cd5fc2Smrg# commands through without removal of \ escapes INIT. 136988cd5fc2Smrgif test -n "\${ZSH_VERSION+set}" ; then 137088cd5fc2Smrg setopt NO_GLOB_SUBST 137188cd5fc2Smrgfi 137288cd5fc2Smrg]) 137388cd5fc2Smrgif test -n "${ZSH_VERSION+set}" ; then 137488cd5fc2Smrg setopt NO_GLOB_SUBST 137588cd5fc2Smrgfi 137688cd5fc2Smrg 137788cd5fc2Smrg_LT_CHECK_OBJDIR 137888cd5fc2Smrg 137988cd5fc2Smrgm4_require([_LT_TAG_COMPILER])dnl 138088cd5fc2Smrg 138188cd5fc2Smrgcase $host_os in 138288cd5fc2Smrgaix3*) 138388cd5fc2Smrg # AIX sometimes has problems with the GCC collect2 program. For some 138488cd5fc2Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 138588cd5fc2Smrg # vanish in a puff of smoke. 138688cd5fc2Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 138788cd5fc2Smrg COLLECT_NAMES= 138888cd5fc2Smrg export COLLECT_NAMES 138988cd5fc2Smrg fi 139088cd5fc2Smrg ;; 139188cd5fc2Smrgesac 139288cd5fc2Smrg 139388cd5fc2Smrg# Global variables: 139488cd5fc2Smrgofile=libtool 139588cd5fc2Smrgcan_build_shared=yes 139688cd5fc2Smrg 139788cd5fc2Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 139888cd5fc2Smrg# which needs '.lib'). 139988cd5fc2Smrglibext=a 140088cd5fc2Smrg 140188cd5fc2Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 140288cd5fc2Smrg 140388cd5fc2Smrgold_CC="$CC" 140488cd5fc2Smrgold_CFLAGS="$CFLAGS" 140588cd5fc2Smrg 140688cd5fc2Smrg# Set sane defaults for various variables 140788cd5fc2Smrgtest -z "$CC" && CC=cc 140888cd5fc2Smrgtest -z "$LTCC" && LTCC=$CC 140988cd5fc2Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 141088cd5fc2Smrgtest -z "$LD" && LD=ld 141188cd5fc2Smrgtest -z "$ac_objext" && ac_objext=o 141288cd5fc2Smrg 141388cd5fc2Smrg_LT_CC_BASENAME([$compiler]) 141488cd5fc2Smrg 141588cd5fc2Smrg# Only perform the check for file, if the check method requires it 141688cd5fc2Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 141788cd5fc2Smrgcase $deplibs_check_method in 141888cd5fc2Smrgfile_magic*) 141988cd5fc2Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 142088cd5fc2Smrg _LT_PATH_MAGIC 142188cd5fc2Smrg fi 142288cd5fc2Smrg ;; 142388cd5fc2Smrgesac 142488cd5fc2Smrg 142588cd5fc2Smrg# Use C for the default configuration in the libtool script 142688cd5fc2SmrgLT_SUPPORTED_TAG([CC]) 142788cd5fc2Smrg_LT_LANG_C_CONFIG 142888cd5fc2Smrg_LT_LANG_DEFAULT_CONFIG 142988cd5fc2Smrg_LT_CONFIG_COMMANDS 143088cd5fc2Smrg])# _LT_SETUP 143188cd5fc2Smrg 143288cd5fc2Smrg 143388cd5fc2Smrg# _LT_PREPARE_SED_QUOTE_VARS 143488cd5fc2Smrg# -------------------------- 143588cd5fc2Smrg# Define a few sed substitution that help us do robust quoting. 143688cd5fc2Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 143788cd5fc2Smrg[# Backslashify metacharacters that are still active within 143888cd5fc2Smrg# double-quoted strings. 143988cd5fc2Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 144088cd5fc2Smrg 144188cd5fc2Smrg# Same as above, but do not quote variable references. 144288cd5fc2Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 144388cd5fc2Smrg 144488cd5fc2Smrg# Sed substitution to delay expansion of an escaped shell variable in a 144588cd5fc2Smrg# double_quote_subst'ed string. 144688cd5fc2Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 144788cd5fc2Smrg 144888cd5fc2Smrg# Sed substitution to delay expansion of an escaped single quote. 144988cd5fc2Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 145088cd5fc2Smrg 145188cd5fc2Smrg# Sed substitution to avoid accidental globbing in evaled expressions 145288cd5fc2Smrgno_glob_subst='s/\*/\\\*/g' 145388cd5fc2Smrg]) 145488cd5fc2Smrg 145588cd5fc2Smrg# _LT_PROG_LTMAIN 145688cd5fc2Smrg# --------------- 145788cd5fc2Smrg# Note that this code is called both from `configure', and `config.status' 145888cd5fc2Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 145988cd5fc2Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 146088cd5fc2Smrg# so we pass a copy along to make sure it has a sensible value anyway. 146188cd5fc2Smrgm4_defun([_LT_PROG_LTMAIN], 146288cd5fc2Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 146388cd5fc2Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 146488cd5fc2Smrgltmain="$ac_aux_dir/ltmain.sh" 146588cd5fc2Smrg])# _LT_PROG_LTMAIN 146688cd5fc2Smrg 146788cd5fc2Smrg 146888cd5fc2Smrg 146988cd5fc2Smrg# So that we can recreate a full libtool script including additional 147088cd5fc2Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 147188cd5fc2Smrg# in macros and then make a single call at the end using the `libtool' 147288cd5fc2Smrg# label. 147388cd5fc2Smrg 147488cd5fc2Smrg 147588cd5fc2Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 147688cd5fc2Smrg# ---------------------------------------- 147788cd5fc2Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 147888cd5fc2Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 147988cd5fc2Smrg[m4_ifval([$1], 148088cd5fc2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 148188cd5fc2Smrg [$1 148288cd5fc2Smrg])])]) 148388cd5fc2Smrg 148488cd5fc2Smrg# Initialize. 148588cd5fc2Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 148688cd5fc2Smrg 148788cd5fc2Smrg 148888cd5fc2Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 148988cd5fc2Smrg# ------------------------------ 149088cd5fc2Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 149188cd5fc2Smrgm4_define([_LT_CONFIG_LIBTOOL], 149288cd5fc2Smrg[m4_ifval([$1], 149388cd5fc2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 149488cd5fc2Smrg [$1 149588cd5fc2Smrg])])]) 149688cd5fc2Smrg 149788cd5fc2Smrg# Initialize. 149888cd5fc2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 149988cd5fc2Smrg 150088cd5fc2Smrg 150188cd5fc2Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 150288cd5fc2Smrg# ----------------------------------------------------- 150388cd5fc2Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 150488cd5fc2Smrg[_LT_CONFIG_LIBTOOL([$1]) 150588cd5fc2Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 150688cd5fc2Smrg]) 150788cd5fc2Smrg 150888cd5fc2Smrg 150988cd5fc2Smrg# _LT_FORMAT_COMMENT([COMMENT]) 151088cd5fc2Smrg# ----------------------------- 151188cd5fc2Smrg# Add leading comment marks to the start of each line, and a trailing 151288cd5fc2Smrg# full-stop to the whole comment if one is not present already. 151388cd5fc2Smrgm4_define([_LT_FORMAT_COMMENT], 151488cd5fc2Smrg[m4_ifval([$1], [ 151588cd5fc2Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 151688cd5fc2Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 151788cd5fc2Smrg)]) 151888cd5fc2Smrg 151988cd5fc2Smrg 152088cd5fc2Smrg 152188cd5fc2Smrg 152288cd5fc2Smrg 152388cd5fc2Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 152488cd5fc2Smrg# ------------------------------------------------------------------- 152588cd5fc2Smrg# CONFIGNAME is the name given to the value in the libtool script. 152688cd5fc2Smrg# VARNAME is the (base) name used in the configure script. 152788cd5fc2Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 152888cd5fc2Smrg# VARNAME. Any other value will be used directly. 152988cd5fc2Smrgm4_define([_LT_DECL], 153088cd5fc2Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 153188cd5fc2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 153288cd5fc2Smrg [m4_ifval([$1], [$1], [$2])]) 153388cd5fc2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 153488cd5fc2Smrg m4_ifval([$4], 153588cd5fc2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 153688cd5fc2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 153788cd5fc2Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 153888cd5fc2Smrg]) 153988cd5fc2Smrg 154088cd5fc2Smrg 154188cd5fc2Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 154288cd5fc2Smrg# -------------------------------------------------------- 154388cd5fc2Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 154488cd5fc2Smrg 154588cd5fc2Smrg 154688cd5fc2Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 154788cd5fc2Smrg# ------------------------------------------------ 154888cd5fc2Smrgm4_define([lt_decl_tag_varnames], 154988cd5fc2Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 155088cd5fc2Smrg 155188cd5fc2Smrg 155288cd5fc2Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 155388cd5fc2Smrg# --------------------------------------------------------- 155488cd5fc2Smrgm4_define([_lt_decl_filter], 155588cd5fc2Smrg[m4_case([$#], 155688cd5fc2Smrg [0], [m4_fatal([$0: too few arguments: $#])], 155788cd5fc2Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 155888cd5fc2Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 155988cd5fc2Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 156088cd5fc2Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 156188cd5fc2Smrg]) 156288cd5fc2Smrg 156388cd5fc2Smrg 156488cd5fc2Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 156588cd5fc2Smrg# -------------------------------------------------- 156688cd5fc2Smrgm4_define([lt_decl_quote_varnames], 156788cd5fc2Smrg[_lt_decl_filter([value], [1], $@)]) 156888cd5fc2Smrg 156988cd5fc2Smrg 157088cd5fc2Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 157188cd5fc2Smrg# --------------------------------------------------- 157288cd5fc2Smrgm4_define([lt_decl_dquote_varnames], 157388cd5fc2Smrg[_lt_decl_filter([value], [2], $@)]) 157488cd5fc2Smrg 157588cd5fc2Smrg 157688cd5fc2Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 157788cd5fc2Smrg# --------------------------------------------------- 157888cd5fc2Smrgm4_define([lt_decl_varnames_tagged], 157988cd5fc2Smrg[m4_assert([$# <= 2])dnl 158088cd5fc2Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 158188cd5fc2Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 158288cd5fc2Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 158388cd5fc2Smrgm4_define([_lt_decl_varnames_tagged], 158488cd5fc2Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 158588cd5fc2Smrg 158688cd5fc2Smrg 158788cd5fc2Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 158888cd5fc2Smrg# ------------------------------------------------ 158988cd5fc2Smrgm4_define([lt_decl_all_varnames], 159088cd5fc2Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 159188cd5fc2Smrg m4_if([$2], [], 159288cd5fc2Smrg m4_quote(lt_decl_varnames), 159388cd5fc2Smrg m4_quote(m4_shift($@))))[]dnl 159488cd5fc2Smrg]) 159588cd5fc2Smrgm4_define([_lt_decl_all_varnames], 159688cd5fc2Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 159788cd5fc2Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 159888cd5fc2Smrg]) 159988cd5fc2Smrg 160088cd5fc2Smrg 160188cd5fc2Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 160288cd5fc2Smrg# ------------------------------------ 160388cd5fc2Smrg# Quote a variable value, and forward it to `config.status' so that its 160488cd5fc2Smrg# declaration there will have the same value as in `configure'. VARNAME 160588cd5fc2Smrg# must have a single quote delimited value for this to work. 160688cd5fc2Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 160788cd5fc2Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 160888cd5fc2Smrg 160988cd5fc2Smrg 161088cd5fc2Smrg# _LT_CONFIG_STATUS_DECLARATIONS 161188cd5fc2Smrg# ------------------------------ 161288cd5fc2Smrg# We delimit libtool config variables with single quotes, so when 161388cd5fc2Smrg# we write them to config.status, we have to be sure to quote all 161488cd5fc2Smrg# embedded single quotes properly. In configure, this macro expands 161588cd5fc2Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 161688cd5fc2Smrg# 161788cd5fc2Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 161888cd5fc2Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 161988cd5fc2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 162088cd5fc2Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 162188cd5fc2Smrg 162288cd5fc2Smrg 162388cd5fc2Smrg# _LT_LIBTOOL_TAGS 162488cd5fc2Smrg# ---------------- 162588cd5fc2Smrg# Output comment and list of tags supported by the script 162688cd5fc2Smrgm4_defun([_LT_LIBTOOL_TAGS], 162788cd5fc2Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 162888cd5fc2Smrgavailable_tags="_LT_TAGS"dnl 162988cd5fc2Smrg]) 163088cd5fc2Smrg 163188cd5fc2Smrg 163288cd5fc2Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 163388cd5fc2Smrg# ----------------------------------- 163488cd5fc2Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 163588cd5fc2Smrg# expand to a commented shell variable setting: 163688cd5fc2Smrg# 163788cd5fc2Smrg# # Some comment about what VAR is for. 163888cd5fc2Smrg# visible_name=$lt_internal_name 163988cd5fc2Smrgm4_define([_LT_LIBTOOL_DECLARE], 164088cd5fc2Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 164188cd5fc2Smrg [description])))[]dnl 164288cd5fc2Smrgm4_pushdef([_libtool_name], 164388cd5fc2Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 164488cd5fc2Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 164588cd5fc2Smrg [0], [_libtool_name=[$]$1], 164688cd5fc2Smrg [1], [_libtool_name=$lt_[]$1], 164788cd5fc2Smrg [2], [_libtool_name=$lt_[]$1], 164888cd5fc2Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 164988cd5fc2Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 165088cd5fc2Smrg]) 165188cd5fc2Smrg 165288cd5fc2Smrg 165388cd5fc2Smrg# _LT_LIBTOOL_CONFIG_VARS 165488cd5fc2Smrg# ----------------------- 165588cd5fc2Smrg# Produce commented declarations of non-tagged libtool config variables 165688cd5fc2Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 165788cd5fc2Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 165888cd5fc2Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 165988cd5fc2Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 166088cd5fc2Smrg[m4_foreach([_lt_var], 166188cd5fc2Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 166288cd5fc2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 166388cd5fc2Smrg 166488cd5fc2Smrg 166588cd5fc2Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 166688cd5fc2Smrg# ------------------------- 166788cd5fc2Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 166888cd5fc2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 166988cd5fc2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 167088cd5fc2Smrg 167188cd5fc2Smrg 167288cd5fc2Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 167388cd5fc2Smrg# ------------------------------ 167488cd5fc2Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 167588cd5fc2Smrg 167688cd5fc2Smrg 167788cd5fc2Smrg# _LT_CONFIG_COMMANDS 167888cd5fc2Smrg# ------------------- 167988cd5fc2Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 168088cd5fc2Smrg# variables for single and double quote escaping we saved from calls 168188cd5fc2Smrg# to _LT_DECL, we can put quote escaped variables declarations 168288cd5fc2Smrg# into `config.status', and then the shell code to quote escape them in 168388cd5fc2Smrg# for loops in `config.status'. Finally, any additional code accumulated 168488cd5fc2Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 168588cd5fc2Smrgm4_defun([_LT_CONFIG_COMMANDS], 168688cd5fc2Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 168788cd5fc2Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 168888cd5fc2Smrg dnl instead of duplicating it all over again into config.status, 168988cd5fc2Smrg dnl then we will have config.status run $CONFIG_LT later, so it 169088cd5fc2Smrg dnl needs to know what name is stored there: 169188cd5fc2Smrg [AC_CONFIG_COMMANDS([libtool], 169288cd5fc2Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 169388cd5fc2Smrg dnl If the libtool generation code is destined for config.status, 169488cd5fc2Smrg dnl expand the accumulated commands and init code now: 169588cd5fc2Smrg [AC_CONFIG_COMMANDS([libtool], 169688cd5fc2Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 169788cd5fc2Smrg])#_LT_CONFIG_COMMANDS 169888cd5fc2Smrg 169988cd5fc2Smrg 170088cd5fc2Smrg# Initialize. 170188cd5fc2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 170288cd5fc2Smrg[ 170388cd5fc2Smrg 170488cd5fc2Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 170588cd5fc2Smrg# if CDPATH is set. 170688cd5fc2Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 170788cd5fc2Smrg 170888cd5fc2Smrgsed_quote_subst='$sed_quote_subst' 170988cd5fc2Smrgdouble_quote_subst='$double_quote_subst' 171088cd5fc2Smrgdelay_variable_subst='$delay_variable_subst' 171188cd5fc2Smrg_LT_CONFIG_STATUS_DECLARATIONS 171288cd5fc2SmrgLTCC='$LTCC' 171388cd5fc2SmrgLTCFLAGS='$LTCFLAGS' 171488cd5fc2Smrgcompiler='$compiler_DEFAULT' 171588cd5fc2Smrg 171688cd5fc2Smrg# A function that is used when there is no print builtin or printf. 171788cd5fc2Smrgfunc_fallback_echo () 171888cd5fc2Smrg{ 171988cd5fc2Smrg eval 'cat <<_LTECHO_EOF 172088cd5fc2Smrg\$[]1 172188cd5fc2Smrg_LTECHO_EOF' 172288cd5fc2Smrg} 172388cd5fc2Smrg 172488cd5fc2Smrg# Quote evaled strings. 172588cd5fc2Smrgfor var in lt_decl_all_varnames([[ \ 172688cd5fc2Smrg]], lt_decl_quote_varnames); do 172788cd5fc2Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 172888cd5fc2Smrg *[[\\\\\\\`\\"\\\$]]*) 172988cd5fc2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 173088cd5fc2Smrg ;; 173188cd5fc2Smrg *) 173288cd5fc2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 173388cd5fc2Smrg ;; 173488cd5fc2Smrg esac 173588cd5fc2Smrgdone 173688cd5fc2Smrg 173788cd5fc2Smrg# Double-quote double-evaled strings. 173888cd5fc2Smrgfor var in lt_decl_all_varnames([[ \ 173988cd5fc2Smrg]], lt_decl_dquote_varnames); do 174088cd5fc2Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 174188cd5fc2Smrg *[[\\\\\\\`\\"\\\$]]*) 174288cd5fc2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 174388cd5fc2Smrg ;; 174488cd5fc2Smrg *) 174588cd5fc2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 174688cd5fc2Smrg ;; 174788cd5fc2Smrg esac 174888cd5fc2Smrgdone 174988cd5fc2Smrg 175088cd5fc2Smrg_LT_OUTPUT_LIBTOOL_INIT 175188cd5fc2Smrg]) 175288cd5fc2Smrg 175388cd5fc2Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 175488cd5fc2Smrg# ------------------------------------ 175588cd5fc2Smrg# Generate a child script FILE with all initialization necessary to 175688cd5fc2Smrg# reuse the environment learned by the parent script, and make the 175788cd5fc2Smrg# file executable. If COMMENT is supplied, it is inserted after the 175888cd5fc2Smrg# `#!' sequence but before initialization text begins. After this 175988cd5fc2Smrg# macro, additional text can be appended to FILE to form the body of 176088cd5fc2Smrg# the child script. The macro ends with non-zero status if the 176188cd5fc2Smrg# file could not be fully written (such as if the disk is full). 176288cd5fc2Smrgm4_ifdef([AS_INIT_GENERATED], 176388cd5fc2Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 176488cd5fc2Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 176588cd5fc2Smrg[m4_require([AS_PREPARE])]dnl 176688cd5fc2Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 176788cd5fc2Smrg[lt_write_fail=0 176888cd5fc2Smrgcat >$1 <<_ASEOF || lt_write_fail=1 176988cd5fc2Smrg#! $SHELL 177088cd5fc2Smrg# Generated by $as_me. 177188cd5fc2Smrg$2 177288cd5fc2SmrgSHELL=\${CONFIG_SHELL-$SHELL} 177388cd5fc2Smrgexport SHELL 177488cd5fc2Smrg_ASEOF 177588cd5fc2Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 177688cd5fc2SmrgAS_SHELL_SANITIZE 177788cd5fc2Smrg_AS_PREPARE 177888cd5fc2Smrgexec AS_MESSAGE_FD>&1 177988cd5fc2Smrg_ASEOF 178088cd5fc2Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 178188cd5fc2Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 178288cd5fc2Smrg 178388cd5fc2Smrg# LT_OUTPUT 178488cd5fc2Smrg# --------- 178588cd5fc2Smrg# This macro allows early generation of the libtool script (before 178688cd5fc2Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 178788cd5fc2Smrg# tests. 178888cd5fc2SmrgAC_DEFUN([LT_OUTPUT], 178988cd5fc2Smrg[: ${CONFIG_LT=./config.lt} 179088cd5fc2SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 179188cd5fc2Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 179288cd5fc2Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 179388cd5fc2Smrg 179488cd5fc2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 179588cd5fc2Smrglt_cl_silent=false 179688cd5fc2Smrgexec AS_MESSAGE_LOG_FD>>config.log 179788cd5fc2Smrg{ 179888cd5fc2Smrg echo 179988cd5fc2Smrg AS_BOX([Running $as_me.]) 180088cd5fc2Smrg} >&AS_MESSAGE_LOG_FD 180188cd5fc2Smrg 180288cd5fc2Smrglt_cl_help="\ 180388cd5fc2Smrg\`$as_me' creates a local libtool stub from the current configuration, 180488cd5fc2Smrgfor use in further configure time tests before the real libtool is 180588cd5fc2Smrggenerated. 180688cd5fc2Smrg 180788cd5fc2SmrgUsage: $[0] [[OPTIONS]] 180888cd5fc2Smrg 180988cd5fc2Smrg -h, --help print this help, then exit 181088cd5fc2Smrg -V, --version print version number, then exit 181188cd5fc2Smrg -q, --quiet do not print progress messages 181288cd5fc2Smrg -d, --debug don't remove temporary files 181388cd5fc2Smrg 181488cd5fc2SmrgReport bugs to <bug-libtool@gnu.org>." 181588cd5fc2Smrg 181688cd5fc2Smrglt_cl_version="\ 181788cd5fc2Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 181888cd5fc2Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 181988cd5fc2Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 182088cd5fc2Smrg 182188cd5fc2SmrgCopyright (C) 2011 Free Software Foundation, Inc. 182288cd5fc2SmrgThis config.lt script is free software; the Free Software Foundation 182388cd5fc2Smrggives unlimited permision to copy, distribute and modify it." 182488cd5fc2Smrg 182588cd5fc2Smrgwhile test $[#] != 0 182688cd5fc2Smrgdo 182788cd5fc2Smrg case $[1] in 182888cd5fc2Smrg --version | --v* | -V ) 182988cd5fc2Smrg echo "$lt_cl_version"; exit 0 ;; 183088cd5fc2Smrg --help | --h* | -h ) 183188cd5fc2Smrg echo "$lt_cl_help"; exit 0 ;; 183288cd5fc2Smrg --debug | --d* | -d ) 183388cd5fc2Smrg debug=: ;; 183488cd5fc2Smrg --quiet | --q* | --silent | --s* | -q ) 183588cd5fc2Smrg lt_cl_silent=: ;; 183688cd5fc2Smrg 183788cd5fc2Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 183888cd5fc2SmrgTry \`$[0] --help' for more information.]) ;; 183988cd5fc2Smrg 184088cd5fc2Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 184188cd5fc2SmrgTry \`$[0] --help' for more information.]) ;; 184288cd5fc2Smrg esac 184388cd5fc2Smrg shift 184488cd5fc2Smrgdone 184588cd5fc2Smrg 184688cd5fc2Smrgif $lt_cl_silent; then 184788cd5fc2Smrg exec AS_MESSAGE_FD>/dev/null 184888cd5fc2Smrgfi 184988cd5fc2Smrg_LTEOF 185088cd5fc2Smrg 185188cd5fc2Smrgcat >>"$CONFIG_LT" <<_LTEOF 185288cd5fc2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 185388cd5fc2Smrg_LTEOF 185488cd5fc2Smrg 185588cd5fc2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 185688cd5fc2SmrgAC_MSG_NOTICE([creating $ofile]) 185788cd5fc2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 185888cd5fc2SmrgAS_EXIT(0) 185988cd5fc2Smrg_LTEOF 186088cd5fc2Smrgchmod +x "$CONFIG_LT" 186188cd5fc2Smrg 186288cd5fc2Smrg# configure is writing to config.log, but config.lt does its own redirection, 186388cd5fc2Smrg# appending to config.log, which fails on DOS, as config.log is still kept 186488cd5fc2Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 186588cd5fc2Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 186688cd5fc2Smrglt_cl_success=: 186788cd5fc2Smrgtest "$silent" = yes && 186888cd5fc2Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 186988cd5fc2Smrgexec AS_MESSAGE_LOG_FD>/dev/null 187088cd5fc2Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 187188cd5fc2Smrgexec AS_MESSAGE_LOG_FD>>config.log 187288cd5fc2Smrg$lt_cl_success || AS_EXIT(1) 187388cd5fc2Smrg])# LT_OUTPUT 187488cd5fc2Smrg 187588cd5fc2Smrg 187688cd5fc2Smrg# _LT_CONFIG(TAG) 187788cd5fc2Smrg# --------------- 187888cd5fc2Smrg# If TAG is the built-in tag, create an initial libtool script with a 187988cd5fc2Smrg# default configuration from the untagged config vars. Otherwise add code 188088cd5fc2Smrg# to config.status for appending the configuration named by TAG from the 188188cd5fc2Smrg# matching tagged config vars. 188288cd5fc2Smrgm4_defun([_LT_CONFIG], 188388cd5fc2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 188488cd5fc2Smrg_LT_CONFIG_SAVE_COMMANDS([ 188588cd5fc2Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 188688cd5fc2Smrg m4_if(_LT_TAG, [C], [ 188788cd5fc2Smrg # See if we are running on zsh, and set the options which allow our 188888cd5fc2Smrg # commands through without removal of \ escapes. 188988cd5fc2Smrg if test -n "${ZSH_VERSION+set}" ; then 189088cd5fc2Smrg setopt NO_GLOB_SUBST 189188cd5fc2Smrg fi 189288cd5fc2Smrg 189388cd5fc2Smrg cfgfile="${ofile}T" 189488cd5fc2Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 189588cd5fc2Smrg $RM "$cfgfile" 189688cd5fc2Smrg 189788cd5fc2Smrg cat <<_LT_EOF >> "$cfgfile" 189888cd5fc2Smrg#! $SHELL 189988cd5fc2Smrg 190088cd5fc2Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 190188cd5fc2Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 190288cd5fc2Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 190388cd5fc2Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 190488cd5fc2Smrg# 190588cd5fc2Smrg_LT_COPYING 190688cd5fc2Smrg_LT_LIBTOOL_TAGS 190788cd5fc2Smrg 190888cd5fc2Smrg# ### BEGIN LIBTOOL CONFIG 190988cd5fc2Smrg_LT_LIBTOOL_CONFIG_VARS 191088cd5fc2Smrg_LT_LIBTOOL_TAG_VARS 191188cd5fc2Smrg# ### END LIBTOOL CONFIG 191288cd5fc2Smrg 191388cd5fc2Smrg_LT_EOF 191488cd5fc2Smrg 191588cd5fc2Smrg case $host_os in 191688cd5fc2Smrg aix3*) 191788cd5fc2Smrg cat <<\_LT_EOF >> "$cfgfile" 191888cd5fc2Smrg# AIX sometimes has problems with the GCC collect2 program. For some 191988cd5fc2Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 192088cd5fc2Smrg# vanish in a puff of smoke. 192188cd5fc2Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 192288cd5fc2Smrg COLLECT_NAMES= 192388cd5fc2Smrg export COLLECT_NAMES 192488cd5fc2Smrgfi 192588cd5fc2Smrg_LT_EOF 192688cd5fc2Smrg ;; 192788cd5fc2Smrg esac 192888cd5fc2Smrg 192988cd5fc2Smrg _LT_PROG_LTMAIN 193088cd5fc2Smrg 193188cd5fc2Smrg # We use sed instead of cat because bash on DJGPP gets confused if 193288cd5fc2Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 193388cd5fc2Smrg # text mode, it properly converts lines to CR/LF. This bash problem 193488cd5fc2Smrg # is reportedly fixed, but why not run on old versions too? 193588cd5fc2Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 193688cd5fc2Smrg || (rm -f "$cfgfile"; exit 1) 193788cd5fc2Smrg 193888cd5fc2Smrg _LT_PROG_REPLACE_SHELLFNS 193988cd5fc2Smrg 194088cd5fc2Smrg mv -f "$cfgfile" "$ofile" || 194188cd5fc2Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 194288cd5fc2Smrg chmod +x "$ofile" 194388cd5fc2Smrg], 194488cd5fc2Smrg[cat <<_LT_EOF >> "$ofile" 194588cd5fc2Smrg 194688cd5fc2Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 194788cd5fc2Smrgdnl in a comment (ie after a #). 194888cd5fc2Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 194988cd5fc2Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 195088cd5fc2Smrg# ### END LIBTOOL TAG CONFIG: $1 195188cd5fc2Smrg_LT_EOF 195288cd5fc2Smrg])dnl /m4_if 195388cd5fc2Smrg], 195488cd5fc2Smrg[m4_if([$1], [], [ 195588cd5fc2Smrg PACKAGE='$PACKAGE' 195688cd5fc2Smrg VERSION='$VERSION' 195788cd5fc2Smrg TIMESTAMP='$TIMESTAMP' 195888cd5fc2Smrg RM='$RM' 195988cd5fc2Smrg ofile='$ofile'], []) 196088cd5fc2Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 196188cd5fc2Smrg])# _LT_CONFIG 196288cd5fc2Smrg 196388cd5fc2Smrg 196488cd5fc2Smrg# LT_SUPPORTED_TAG(TAG) 196588cd5fc2Smrg# --------------------- 196688cd5fc2Smrg# Trace this macro to discover what tags are supported by the libtool 196788cd5fc2Smrg# --tag option, using: 196888cd5fc2Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 196988cd5fc2SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 197088cd5fc2Smrg 197188cd5fc2Smrg 197288cd5fc2Smrg# C support is built-in for now 197388cd5fc2Smrgm4_define([_LT_LANG_C_enabled], []) 197488cd5fc2Smrgm4_define([_LT_TAGS], []) 197588cd5fc2Smrg 197688cd5fc2Smrg 197788cd5fc2Smrg# LT_LANG(LANG) 197888cd5fc2Smrg# ------------- 197988cd5fc2Smrg# Enable libtool support for the given language if not already enabled. 198088cd5fc2SmrgAC_DEFUN([LT_LANG], 198188cd5fc2Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 198288cd5fc2Smrgm4_case([$1], 198388cd5fc2Smrg [C], [_LT_LANG(C)], 198488cd5fc2Smrg [C++], [_LT_LANG(CXX)], 198588cd5fc2Smrg [Go], [_LT_LANG(GO)], 198688cd5fc2Smrg [Java], [_LT_LANG(GCJ)], 198788cd5fc2Smrg [Fortran 77], [_LT_LANG(F77)], 198888cd5fc2Smrg [Fortran], [_LT_LANG(FC)], 198988cd5fc2Smrg [Windows Resource], [_LT_LANG(RC)], 199088cd5fc2Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 199188cd5fc2Smrg [_LT_LANG($1)], 199288cd5fc2Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 199388cd5fc2Smrg])# LT_LANG 199488cd5fc2Smrg 199588cd5fc2Smrg 199688cd5fc2Smrg# _LT_LANG(LANGNAME) 199788cd5fc2Smrg# ------------------ 199888cd5fc2Smrgm4_defun([_LT_LANG], 199988cd5fc2Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 200088cd5fc2Smrg [LT_SUPPORTED_TAG([$1])dnl 200188cd5fc2Smrg m4_append([_LT_TAGS], [$1 ])dnl 200288cd5fc2Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 200388cd5fc2Smrg _LT_LANG_$1_CONFIG($1)])dnl 200488cd5fc2Smrg])# _LT_LANG 200588cd5fc2Smrg 200688cd5fc2Smrg 200788cd5fc2Smrgm4_ifndef([AC_PROG_GO], [ 200888cd5fc2Smrg# NOTE: This macro has been submitted for inclusion into # 200988cd5fc2Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 201088cd5fc2Smrg# a released version of Autoconf we should remove this # 201188cd5fc2Smrg# macro and use it instead. # 201288cd5fc2Smrgm4_defun([AC_PROG_GO], 201388cd5fc2Smrg[AC_LANG_PUSH(Go)dnl 201488cd5fc2SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 201588cd5fc2SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 201688cd5fc2Smrg_AC_ARG_VAR_LDFLAGS()dnl 201788cd5fc2SmrgAC_CHECK_TOOL(GOC, gccgo) 201888cd5fc2Smrgif test -z "$GOC"; then 201988cd5fc2Smrg if test -n "$ac_tool_prefix"; then 202088cd5fc2Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 202188cd5fc2Smrg fi 202288cd5fc2Smrgfi 202388cd5fc2Smrgif test -z "$GOC"; then 202488cd5fc2Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 202588cd5fc2Smrgfi 202688cd5fc2Smrg])#m4_defun 202788cd5fc2Smrg])#m4_ifndef 202888cd5fc2Smrg 202988cd5fc2Smrg 203088cd5fc2Smrg# _LT_LANG_DEFAULT_CONFIG 203188cd5fc2Smrg# ----------------------- 203288cd5fc2Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 203388cd5fc2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 203488cd5fc2Smrg [LT_LANG(CXX)], 203588cd5fc2Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 203688cd5fc2Smrg 203788cd5fc2SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 203888cd5fc2Smrg [LT_LANG(F77)], 203988cd5fc2Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 204088cd5fc2Smrg 204188cd5fc2SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 204288cd5fc2Smrg [LT_LANG(FC)], 204388cd5fc2Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 204488cd5fc2Smrg 204588cd5fc2Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 204688cd5fc2Smrgdnl pulling things in needlessly. 204788cd5fc2SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 204888cd5fc2Smrg [LT_LANG(GCJ)], 204988cd5fc2Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 205088cd5fc2Smrg [LT_LANG(GCJ)], 205188cd5fc2Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 205288cd5fc2Smrg [LT_LANG(GCJ)], 205388cd5fc2Smrg [m4_ifdef([AC_PROG_GCJ], 205488cd5fc2Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 205588cd5fc2Smrg m4_ifdef([A][M_PROG_GCJ], 205688cd5fc2Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 205788cd5fc2Smrg m4_ifdef([LT_PROG_GCJ], 205888cd5fc2Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 205988cd5fc2Smrg 206088cd5fc2SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 206188cd5fc2Smrg [LT_LANG(GO)], 206288cd5fc2Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 206388cd5fc2Smrg 206488cd5fc2SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 206588cd5fc2Smrg [LT_LANG(RC)], 206688cd5fc2Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 206788cd5fc2Smrg])# _LT_LANG_DEFAULT_CONFIG 206888cd5fc2Smrg 206988cd5fc2Smrg# Obsolete macros: 207088cd5fc2SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 207188cd5fc2SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 207288cd5fc2SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 207388cd5fc2SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 207488cd5fc2SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 207588cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 207688cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 207788cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 207888cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 207988cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 208088cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 208188cd5fc2Smrg 208288cd5fc2Smrg 208388cd5fc2Smrg# _LT_TAG_COMPILER 208488cd5fc2Smrg# ---------------- 208588cd5fc2Smrgm4_defun([_LT_TAG_COMPILER], 208688cd5fc2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 208788cd5fc2Smrg 208888cd5fc2Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 208988cd5fc2Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 209088cd5fc2Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 209188cd5fc2Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 209288cd5fc2Smrg 209388cd5fc2Smrg# If no C compiler was specified, use CC. 209488cd5fc2SmrgLTCC=${LTCC-"$CC"} 209588cd5fc2Smrg 209688cd5fc2Smrg# If no C compiler flags were specified, use CFLAGS. 209788cd5fc2SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 209888cd5fc2Smrg 209988cd5fc2Smrg# Allow CC to be a program name with arguments. 210088cd5fc2Smrgcompiler=$CC 210188cd5fc2Smrg])# _LT_TAG_COMPILER 210288cd5fc2Smrg 210388cd5fc2Smrg 210488cd5fc2Smrg# _LT_COMPILER_BOILERPLATE 210588cd5fc2Smrg# ------------------------ 210688cd5fc2Smrg# Check for compiler boilerplate output or warnings with 210788cd5fc2Smrg# the simple compiler test code. 210888cd5fc2Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 210988cd5fc2Smrg[m4_require([_LT_DECL_SED])dnl 211088cd5fc2Smrgac_outfile=conftest.$ac_objext 211188cd5fc2Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 211288cd5fc2Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 211388cd5fc2Smrg_lt_compiler_boilerplate=`cat conftest.err` 211488cd5fc2Smrg$RM conftest* 211588cd5fc2Smrg])# _LT_COMPILER_BOILERPLATE 211688cd5fc2Smrg 211788cd5fc2Smrg 211888cd5fc2Smrg# _LT_LINKER_BOILERPLATE 211988cd5fc2Smrg# ---------------------- 212088cd5fc2Smrg# Check for linker boilerplate output or warnings with 212188cd5fc2Smrg# the simple link test code. 212288cd5fc2Smrgm4_defun([_LT_LINKER_BOILERPLATE], 212388cd5fc2Smrg[m4_require([_LT_DECL_SED])dnl 212488cd5fc2Smrgac_outfile=conftest.$ac_objext 212588cd5fc2Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 212688cd5fc2Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 212788cd5fc2Smrg_lt_linker_boilerplate=`cat conftest.err` 212888cd5fc2Smrg$RM -r conftest* 212988cd5fc2Smrg])# _LT_LINKER_BOILERPLATE 213088cd5fc2Smrg 213188cd5fc2Smrg# _LT_REQUIRED_DARWIN_CHECKS 213288cd5fc2Smrg# ------------------------- 213388cd5fc2Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 213488cd5fc2Smrg case $host_os in 213588cd5fc2Smrg rhapsody* | darwin*) 213688cd5fc2Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 213788cd5fc2Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 213888cd5fc2Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 213988cd5fc2Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 214088cd5fc2Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 214188cd5fc2Smrg _LT_DECL([], [DSYMUTIL], [1], 214288cd5fc2Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 214388cd5fc2Smrg _LT_DECL([], [NMEDIT], [1], 214488cd5fc2Smrg [Tool to change global to local symbols on Mac OS X]) 214588cd5fc2Smrg _LT_DECL([], [LIPO], [1], 214688cd5fc2Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 214788cd5fc2Smrg _LT_DECL([], [OTOOL], [1], 214888cd5fc2Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 214988cd5fc2Smrg _LT_DECL([], [OTOOL64], [1], 215088cd5fc2Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 215188cd5fc2Smrg 215288cd5fc2Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 215388cd5fc2Smrg [lt_cv_apple_cc_single_mod=no 215488cd5fc2Smrg if test -z "${LT_MULTI_MODULE}"; then 215588cd5fc2Smrg # By default we will add the -single_module flag. You can override 215688cd5fc2Smrg # by either setting the environment variable LT_MULTI_MODULE 215788cd5fc2Smrg # non-empty at configure time, or by adding -multi_module to the 215888cd5fc2Smrg # link flags. 215988cd5fc2Smrg rm -rf libconftest.dylib* 216088cd5fc2Smrg echo "int foo(void){return 1;}" > conftest.c 216188cd5fc2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 216288cd5fc2Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 216388cd5fc2Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 216488cd5fc2Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 216588cd5fc2Smrg _lt_result=$? 216688cd5fc2Smrg # If there is a non-empty error log, and "single_module" 216788cd5fc2Smrg # appears in it, assume the flag caused a linker warning 216888cd5fc2Smrg if test -s conftest.err && $GREP single_module conftest.err; then 216988cd5fc2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 217088cd5fc2Smrg # Otherwise, if the output was created with a 0 exit code from 217188cd5fc2Smrg # the compiler, it worked. 217288cd5fc2Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 217388cd5fc2Smrg lt_cv_apple_cc_single_mod=yes 217488cd5fc2Smrg else 217588cd5fc2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 217688cd5fc2Smrg fi 217788cd5fc2Smrg rm -rf libconftest.dylib* 217888cd5fc2Smrg rm -f conftest.* 217988cd5fc2Smrg fi]) 218088cd5fc2Smrg 218188cd5fc2Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 218288cd5fc2Smrg [lt_cv_ld_exported_symbols_list], 218388cd5fc2Smrg [lt_cv_ld_exported_symbols_list=no 218488cd5fc2Smrg save_LDFLAGS=$LDFLAGS 218588cd5fc2Smrg echo "_main" > conftest.sym 218688cd5fc2Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 218788cd5fc2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 218888cd5fc2Smrg [lt_cv_ld_exported_symbols_list=yes], 218988cd5fc2Smrg [lt_cv_ld_exported_symbols_list=no]) 219088cd5fc2Smrg LDFLAGS="$save_LDFLAGS" 219188cd5fc2Smrg ]) 219288cd5fc2Smrg 219388cd5fc2Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 219488cd5fc2Smrg [lt_cv_ld_force_load=no 219588cd5fc2Smrg cat > conftest.c << _LT_EOF 219688cd5fc2Smrgint forced_loaded() { return 2;} 219788cd5fc2Smrg_LT_EOF 219888cd5fc2Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 219988cd5fc2Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 220088cd5fc2Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 220188cd5fc2Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 220288cd5fc2Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 220388cd5fc2Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 220488cd5fc2Smrg cat > conftest.c << _LT_EOF 220588cd5fc2Smrgint main() { return 0;} 220688cd5fc2Smrg_LT_EOF 220788cd5fc2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 220888cd5fc2Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 220988cd5fc2Smrg _lt_result=$? 221088cd5fc2Smrg if test -s conftest.err && $GREP force_load conftest.err; then 221188cd5fc2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 221288cd5fc2Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 221388cd5fc2Smrg lt_cv_ld_force_load=yes 221488cd5fc2Smrg else 221588cd5fc2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 221688cd5fc2Smrg fi 221788cd5fc2Smrg rm -f conftest.err libconftest.a conftest conftest.c 221888cd5fc2Smrg rm -rf conftest.dSYM 221988cd5fc2Smrg ]) 222088cd5fc2Smrg case $host_os in 222188cd5fc2Smrg rhapsody* | darwin1.[[012]]) 222288cd5fc2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 222388cd5fc2Smrg darwin1.*) 222488cd5fc2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 222588cd5fc2Smrg darwin*) # darwin 5.x on 222688cd5fc2Smrg # if running on 10.5 or later, the deployment target defaults 222788cd5fc2Smrg # to the OS version, if on x86, and 10.4, the deployment 222888cd5fc2Smrg # target defaults to 10.4. Don't you love it? 222988cd5fc2Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 223088cd5fc2Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 223188cd5fc2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 223288cd5fc2Smrg 10.[[012]]*) 223388cd5fc2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 223488cd5fc2Smrg 10.*) 223588cd5fc2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 223688cd5fc2Smrg esac 223788cd5fc2Smrg ;; 223888cd5fc2Smrg esac 223988cd5fc2Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 224088cd5fc2Smrg _lt_dar_single_mod='$single_module' 224188cd5fc2Smrg fi 224288cd5fc2Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 224388cd5fc2Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 224488cd5fc2Smrg else 224588cd5fc2Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 224688cd5fc2Smrg fi 224788cd5fc2Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 224888cd5fc2Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 224988cd5fc2Smrg else 225088cd5fc2Smrg _lt_dsymutil= 225188cd5fc2Smrg fi 225288cd5fc2Smrg ;; 225388cd5fc2Smrg esac 225488cd5fc2Smrg]) 225588cd5fc2Smrg 225688cd5fc2Smrg 225788cd5fc2Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 225888cd5fc2Smrg# --------------------------------- 225988cd5fc2Smrg# Checks for linker and compiler features on darwin 226088cd5fc2Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 226188cd5fc2Smrg[ 226288cd5fc2Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 226388cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 226488cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 226588cd5fc2Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 226688cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 226788cd5fc2Smrg if test "$lt_cv_ld_force_load" = "yes"; then 226888cd5fc2Smrg _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\"`' 226988cd5fc2Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 227088cd5fc2Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 227188cd5fc2Smrg else 227288cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 227388cd5fc2Smrg fi 227488cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 227588cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 227688cd5fc2Smrg case $cc_basename in 227788cd5fc2Smrg ifort*) _lt_dar_can_shared=yes ;; 227888cd5fc2Smrg *) _lt_dar_can_shared=$GCC ;; 227988cd5fc2Smrg esac 228088cd5fc2Smrg if test "$_lt_dar_can_shared" = "yes"; then 228188cd5fc2Smrg output_verbose_link_cmd=func_echo_all 228288cd5fc2Smrg _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}" 228388cd5fc2Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 228488cd5fc2Smrg _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}" 228588cd5fc2Smrg _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}" 228688cd5fc2Smrg m4_if([$1], [CXX], 228788cd5fc2Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 228888cd5fc2Smrg _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}" 228988cd5fc2Smrg _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}" 229088cd5fc2Smrg fi 229188cd5fc2Smrg],[]) 229288cd5fc2Smrg else 229388cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 229488cd5fc2Smrg fi 229588cd5fc2Smrg]) 229688cd5fc2Smrg 229788cd5fc2Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 229888cd5fc2Smrg# ---------------------------------- 229988cd5fc2Smrg# Links a minimal program and checks the executable 230088cd5fc2Smrg# for the system default hardcoded library path. In most cases, 230188cd5fc2Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 230288cd5fc2Smrg# the location of the communication and MPI libs are included too. 230388cd5fc2Smrg# If we don't find anything, use the default library path according 230488cd5fc2Smrg# to the aix ld manual. 230588cd5fc2Smrg# Store the results from the different compilers for each TAGNAME. 230688cd5fc2Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 230788cd5fc2Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 230888cd5fc2Smrg[m4_require([_LT_DECL_SED])dnl 230988cd5fc2Smrgif test "${lt_cv_aix_libpath+set}" = set; then 231088cd5fc2Smrg aix_libpath=$lt_cv_aix_libpath 231188cd5fc2Smrgelse 231288cd5fc2Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 231388cd5fc2Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 231488cd5fc2Smrg lt_aix_libpath_sed='[ 231588cd5fc2Smrg /Import File Strings/,/^$/ { 231688cd5fc2Smrg /^0/ { 231788cd5fc2Smrg s/^0 *\([^ ]*\) *$/\1/ 231888cd5fc2Smrg p 231988cd5fc2Smrg } 232088cd5fc2Smrg }]' 232188cd5fc2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 232288cd5fc2Smrg # Check for a 64-bit object if we didn't find anything. 232388cd5fc2Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 232488cd5fc2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 232588cd5fc2Smrg fi],[]) 232688cd5fc2Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 232788cd5fc2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 232888cd5fc2Smrg fi 232988cd5fc2Smrg ]) 233088cd5fc2Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 233188cd5fc2Smrgfi 233288cd5fc2Smrg])# _LT_SYS_MODULE_PATH_AIX 233388cd5fc2Smrg 233488cd5fc2Smrg 233588cd5fc2Smrg# _LT_SHELL_INIT(ARG) 233688cd5fc2Smrg# ------------------- 233788cd5fc2Smrgm4_define([_LT_SHELL_INIT], 233888cd5fc2Smrg[m4_divert_text([M4SH-INIT], [$1 233988cd5fc2Smrg])])# _LT_SHELL_INIT 234088cd5fc2Smrg 234188cd5fc2Smrg 234288cd5fc2Smrg 234388cd5fc2Smrg# _LT_PROG_ECHO_BACKSLASH 234488cd5fc2Smrg# ----------------------- 234588cd5fc2Smrg# Find how we can fake an echo command that does not interpret backslash. 234688cd5fc2Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 234788cd5fc2Smrg# of the generated configure script which will find a shell with a builtin 234888cd5fc2Smrg# printf (which we can use as an echo command). 234988cd5fc2Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 235088cd5fc2Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 235188cd5fc2SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 235288cd5fc2SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 235388cd5fc2Smrg 235488cd5fc2SmrgAC_MSG_CHECKING([how to print strings]) 235588cd5fc2Smrg# Test print first, because it will be a builtin if present. 235688cd5fc2Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 235788cd5fc2Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 235888cd5fc2Smrg ECHO='print -r --' 235988cd5fc2Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 236088cd5fc2Smrg ECHO='printf %s\n' 236188cd5fc2Smrgelse 236288cd5fc2Smrg # Use this function as a fallback that always works. 236388cd5fc2Smrg func_fallback_echo () 236488cd5fc2Smrg { 236588cd5fc2Smrg eval 'cat <<_LTECHO_EOF 236688cd5fc2Smrg$[]1 236788cd5fc2Smrg_LTECHO_EOF' 236888cd5fc2Smrg } 236988cd5fc2Smrg ECHO='func_fallback_echo' 237088cd5fc2Smrgfi 237188cd5fc2Smrg 237288cd5fc2Smrg# func_echo_all arg... 237388cd5fc2Smrg# Invoke $ECHO with all args, space-separated. 237488cd5fc2Smrgfunc_echo_all () 237588cd5fc2Smrg{ 237688cd5fc2Smrg $ECHO "$*" 237788cd5fc2Smrg} 237888cd5fc2Smrg 237988cd5fc2Smrgcase "$ECHO" in 238088cd5fc2Smrg printf*) AC_MSG_RESULT([printf]) ;; 238188cd5fc2Smrg print*) AC_MSG_RESULT([print -r]) ;; 238288cd5fc2Smrg *) AC_MSG_RESULT([cat]) ;; 238388cd5fc2Smrgesac 238488cd5fc2Smrg 238588cd5fc2Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 238688cd5fc2Smrg[_AS_DETECT_SUGGESTED([ 238788cd5fc2Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 238888cd5fc2Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 238988cd5fc2Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 239088cd5fc2Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 239188cd5fc2Smrg PATH=/empty FPATH=/empty; export PATH FPATH 239288cd5fc2Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 239388cd5fc2Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 239488cd5fc2Smrg 239588cd5fc2Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 239688cd5fc2Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 239788cd5fc2Smrg])# _LT_PROG_ECHO_BACKSLASH 239888cd5fc2Smrg 239988cd5fc2Smrg 240088cd5fc2Smrg# _LT_WITH_SYSROOT 240188cd5fc2Smrg# ---------------- 240288cd5fc2SmrgAC_DEFUN([_LT_WITH_SYSROOT], 240388cd5fc2Smrg[AC_MSG_CHECKING([for sysroot]) 240488cd5fc2SmrgAC_ARG_WITH([sysroot], 240588cd5fc2Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 240688cd5fc2Smrg (or the compiler's sysroot if not specified).], 240788cd5fc2Smrg[], [with_sysroot=no]) 240888cd5fc2Smrg 240988cd5fc2Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 241088cd5fc2Smrgdnl in case the user passed a directory name. 241188cd5fc2Smrglt_sysroot= 241288cd5fc2Smrgcase ${with_sysroot} in #( 241388cd5fc2Smrg yes) 241488cd5fc2Smrg if test "$GCC" = yes; then 241588cd5fc2Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 241688cd5fc2Smrg fi 241788cd5fc2Smrg ;; #( 241888cd5fc2Smrg /*) 241988cd5fc2Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 242088cd5fc2Smrg ;; #( 242188cd5fc2Smrg no|'') 242288cd5fc2Smrg ;; #( 242388cd5fc2Smrg *) 242488cd5fc2Smrg AC_MSG_RESULT([${with_sysroot}]) 242588cd5fc2Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 242688cd5fc2Smrg ;; 242788cd5fc2Smrgesac 242888cd5fc2Smrg 242988cd5fc2Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 243088cd5fc2Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 243188cd5fc2Smrg[dependent libraries, and in which our libraries should be installed.])]) 243288cd5fc2Smrg 243388cd5fc2Smrg# _LT_ENABLE_LOCK 243488cd5fc2Smrg# --------------- 243588cd5fc2Smrgm4_defun([_LT_ENABLE_LOCK], 243688cd5fc2Smrg[AC_ARG_ENABLE([libtool-lock], 243788cd5fc2Smrg [AS_HELP_STRING([--disable-libtool-lock], 243888cd5fc2Smrg [avoid locking (might break parallel builds)])]) 243988cd5fc2Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 244088cd5fc2Smrg 244188cd5fc2Smrg# Some flags need to be propagated to the compiler or linker for good 244288cd5fc2Smrg# libtool support. 244388cd5fc2Smrgcase $host in 244488cd5fc2Smrgia64-*-hpux*) 244588cd5fc2Smrg # Find out which ABI we are using. 244688cd5fc2Smrg echo 'int i;' > conftest.$ac_ext 244788cd5fc2Smrg if AC_TRY_EVAL(ac_compile); then 244888cd5fc2Smrg case `/usr/bin/file conftest.$ac_objext` in 244988cd5fc2Smrg *ELF-32*) 245088cd5fc2Smrg HPUX_IA64_MODE="32" 245188cd5fc2Smrg ;; 245288cd5fc2Smrg *ELF-64*) 245388cd5fc2Smrg HPUX_IA64_MODE="64" 245488cd5fc2Smrg ;; 245588cd5fc2Smrg esac 245688cd5fc2Smrg fi 245788cd5fc2Smrg rm -rf conftest* 245888cd5fc2Smrg ;; 245988cd5fc2Smrg*-*-irix6*) 246088cd5fc2Smrg # Find out which ABI we are using. 246188cd5fc2Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 246288cd5fc2Smrg if AC_TRY_EVAL(ac_compile); then 246388cd5fc2Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 246488cd5fc2Smrg case `/usr/bin/file conftest.$ac_objext` in 246588cd5fc2Smrg *32-bit*) 246688cd5fc2Smrg LD="${LD-ld} -melf32bsmip" 246788cd5fc2Smrg ;; 246888cd5fc2Smrg *N32*) 246988cd5fc2Smrg LD="${LD-ld} -melf32bmipn32" 247088cd5fc2Smrg ;; 247188cd5fc2Smrg *64-bit*) 247288cd5fc2Smrg LD="${LD-ld} -melf64bmip" 247388cd5fc2Smrg ;; 247488cd5fc2Smrg esac 247588cd5fc2Smrg else 247688cd5fc2Smrg case `/usr/bin/file conftest.$ac_objext` in 247788cd5fc2Smrg *32-bit*) 247888cd5fc2Smrg LD="${LD-ld} -32" 247988cd5fc2Smrg ;; 248088cd5fc2Smrg *N32*) 248188cd5fc2Smrg LD="${LD-ld} -n32" 248288cd5fc2Smrg ;; 248388cd5fc2Smrg *64-bit*) 248488cd5fc2Smrg LD="${LD-ld} -64" 248588cd5fc2Smrg ;; 248688cd5fc2Smrg esac 248788cd5fc2Smrg fi 248888cd5fc2Smrg fi 248988cd5fc2Smrg rm -rf conftest* 249088cd5fc2Smrg ;; 249188cd5fc2Smrg 249288cd5fc2Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 249388cd5fc2Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 249488cd5fc2Smrg # Find out which ABI we are using. 249588cd5fc2Smrg echo 'int i;' > conftest.$ac_ext 249688cd5fc2Smrg if AC_TRY_EVAL(ac_compile); then 249788cd5fc2Smrg case `/usr/bin/file conftest.o` in 249888cd5fc2Smrg *32-bit*) 249988cd5fc2Smrg case $host in 250088cd5fc2Smrg x86_64-*kfreebsd*-gnu) 250188cd5fc2Smrg LD="${LD-ld} -m elf_i386_fbsd" 250288cd5fc2Smrg ;; 250388cd5fc2Smrg x86_64-*linux*) 250488cd5fc2Smrg LD="${LD-ld} -m elf_i386" 250588cd5fc2Smrg ;; 250688cd5fc2Smrg ppc64-*linux*|powerpc64-*linux*) 250788cd5fc2Smrg LD="${LD-ld} -m elf32ppclinux" 250888cd5fc2Smrg ;; 250988cd5fc2Smrg s390x-*linux*) 251088cd5fc2Smrg LD="${LD-ld} -m elf_s390" 251188cd5fc2Smrg ;; 251288cd5fc2Smrg sparc64-*linux*) 251388cd5fc2Smrg LD="${LD-ld} -m elf32_sparc" 251488cd5fc2Smrg ;; 251588cd5fc2Smrg esac 251688cd5fc2Smrg ;; 251788cd5fc2Smrg *64-bit*) 251888cd5fc2Smrg case $host in 251988cd5fc2Smrg x86_64-*kfreebsd*-gnu) 252088cd5fc2Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 252188cd5fc2Smrg ;; 252288cd5fc2Smrg x86_64-*linux*) 252388cd5fc2Smrg LD="${LD-ld} -m elf_x86_64" 252488cd5fc2Smrg ;; 252588cd5fc2Smrg ppc*-*linux*|powerpc*-*linux*) 252688cd5fc2Smrg LD="${LD-ld} -m elf64ppc" 252788cd5fc2Smrg ;; 252888cd5fc2Smrg s390*-*linux*|s390*-*tpf*) 252988cd5fc2Smrg LD="${LD-ld} -m elf64_s390" 253088cd5fc2Smrg ;; 253188cd5fc2Smrg sparc*-*linux*) 253288cd5fc2Smrg LD="${LD-ld} -m elf64_sparc" 253388cd5fc2Smrg ;; 253488cd5fc2Smrg esac 253588cd5fc2Smrg ;; 253688cd5fc2Smrg esac 253788cd5fc2Smrg fi 253888cd5fc2Smrg rm -rf conftest* 253988cd5fc2Smrg ;; 254088cd5fc2Smrg 254188cd5fc2Smrg*-*-sco3.2v5*) 254288cd5fc2Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 254388cd5fc2Smrg SAVE_CFLAGS="$CFLAGS" 254488cd5fc2Smrg CFLAGS="$CFLAGS -belf" 254588cd5fc2Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 254688cd5fc2Smrg [AC_LANG_PUSH(C) 254788cd5fc2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 254888cd5fc2Smrg AC_LANG_POP]) 254988cd5fc2Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 255088cd5fc2Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 255188cd5fc2Smrg CFLAGS="$SAVE_CFLAGS" 255288cd5fc2Smrg fi 255388cd5fc2Smrg ;; 255488cd5fc2Smrg*-*solaris*) 255588cd5fc2Smrg # Find out which ABI we are using. 255688cd5fc2Smrg echo 'int i;' > conftest.$ac_ext 255788cd5fc2Smrg if AC_TRY_EVAL(ac_compile); then 255888cd5fc2Smrg case `/usr/bin/file conftest.o` in 255988cd5fc2Smrg *64-bit*) 256088cd5fc2Smrg case $lt_cv_prog_gnu_ld in 256188cd5fc2Smrg yes*) 256288cd5fc2Smrg case $host in 256388cd5fc2Smrg i?86-*-solaris*) 256488cd5fc2Smrg LD="${LD-ld} -m elf_x86_64" 256588cd5fc2Smrg ;; 256688cd5fc2Smrg sparc*-*-solaris*) 256788cd5fc2Smrg LD="${LD-ld} -m elf64_sparc" 256888cd5fc2Smrg ;; 256988cd5fc2Smrg esac 257088cd5fc2Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 257188cd5fc2Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 257288cd5fc2Smrg LD="${LD-ld}_sol2" 257388cd5fc2Smrg fi 257488cd5fc2Smrg ;; 257588cd5fc2Smrg *) 257688cd5fc2Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 257788cd5fc2Smrg LD="${LD-ld} -64" 257888cd5fc2Smrg fi 257988cd5fc2Smrg ;; 258088cd5fc2Smrg esac 258188cd5fc2Smrg ;; 258288cd5fc2Smrg esac 258388cd5fc2Smrg fi 258488cd5fc2Smrg rm -rf conftest* 258588cd5fc2Smrg ;; 258688cd5fc2Smrgesac 258788cd5fc2Smrg 258888cd5fc2Smrgneed_locks="$enable_libtool_lock" 258988cd5fc2Smrg])# _LT_ENABLE_LOCK 259088cd5fc2Smrg 259188cd5fc2Smrg 259288cd5fc2Smrg# _LT_PROG_AR 259388cd5fc2Smrg# ----------- 259488cd5fc2Smrgm4_defun([_LT_PROG_AR], 259588cd5fc2Smrg[AC_CHECK_TOOLS(AR, [ar], false) 259688cd5fc2Smrg: ${AR=ar} 259788cd5fc2Smrg: ${AR_FLAGS=cru} 259888cd5fc2Smrg_LT_DECL([], [AR], [1], [The archiver]) 259988cd5fc2Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 260088cd5fc2Smrg 260188cd5fc2SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 260288cd5fc2Smrg [lt_cv_ar_at_file=no 260388cd5fc2Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 260488cd5fc2Smrg [echo conftest.$ac_objext > conftest.lst 260588cd5fc2Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 260688cd5fc2Smrg AC_TRY_EVAL([lt_ar_try]) 260788cd5fc2Smrg if test "$ac_status" -eq 0; then 260888cd5fc2Smrg # Ensure the archiver fails upon bogus file names. 260988cd5fc2Smrg rm -f conftest.$ac_objext libconftest.a 261088cd5fc2Smrg AC_TRY_EVAL([lt_ar_try]) 261188cd5fc2Smrg if test "$ac_status" -ne 0; then 261288cd5fc2Smrg lt_cv_ar_at_file=@ 261388cd5fc2Smrg fi 261488cd5fc2Smrg fi 261588cd5fc2Smrg rm -f conftest.* libconftest.a 261688cd5fc2Smrg ]) 261788cd5fc2Smrg ]) 261888cd5fc2Smrg 261988cd5fc2Smrgif test "x$lt_cv_ar_at_file" = xno; then 262088cd5fc2Smrg archiver_list_spec= 262188cd5fc2Smrgelse 262288cd5fc2Smrg archiver_list_spec=$lt_cv_ar_at_file 262388cd5fc2Smrgfi 262488cd5fc2Smrg_LT_DECL([], [archiver_list_spec], [1], 262588cd5fc2Smrg [How to feed a file listing to the archiver]) 262688cd5fc2Smrg])# _LT_PROG_AR 262788cd5fc2Smrg 262888cd5fc2Smrg 262988cd5fc2Smrg# _LT_CMD_OLD_ARCHIVE 263088cd5fc2Smrg# ------------------- 263188cd5fc2Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 263288cd5fc2Smrg[_LT_PROG_AR 263388cd5fc2Smrg 263488cd5fc2SmrgAC_CHECK_TOOL(STRIP, strip, :) 263588cd5fc2Smrgtest -z "$STRIP" && STRIP=: 263688cd5fc2Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 263788cd5fc2Smrg 263888cd5fc2SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 263988cd5fc2Smrgtest -z "$RANLIB" && RANLIB=: 264088cd5fc2Smrg_LT_DECL([], [RANLIB], [1], 264188cd5fc2Smrg [Commands used to install an old-style archive]) 264288cd5fc2Smrg 264388cd5fc2Smrg# Determine commands to create old-style static archives. 264488cd5fc2Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 264588cd5fc2Smrgold_postinstall_cmds='chmod 644 $oldlib' 264688cd5fc2Smrgold_postuninstall_cmds= 264788cd5fc2Smrg 264888cd5fc2Smrgif test -n "$RANLIB"; then 264988cd5fc2Smrg case $host_os in 265088cd5fc2Smrg openbsd*) 265188cd5fc2Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 265288cd5fc2Smrg ;; 265388cd5fc2Smrg *) 265488cd5fc2Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 265588cd5fc2Smrg ;; 265688cd5fc2Smrg esac 265788cd5fc2Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 265888cd5fc2Smrgfi 265988cd5fc2Smrg 266088cd5fc2Smrgcase $host_os in 266188cd5fc2Smrg darwin*) 266288cd5fc2Smrg lock_old_archive_extraction=yes ;; 266388cd5fc2Smrg *) 266488cd5fc2Smrg lock_old_archive_extraction=no ;; 266588cd5fc2Smrgesac 266688cd5fc2Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 266788cd5fc2Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 266888cd5fc2Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 266988cd5fc2Smrg [Commands used to build an old-style archive]) 267088cd5fc2Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 267188cd5fc2Smrg [Whether to use a lock for old archive extraction]) 267288cd5fc2Smrg])# _LT_CMD_OLD_ARCHIVE 267388cd5fc2Smrg 267488cd5fc2Smrg 267588cd5fc2Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 267688cd5fc2Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 267788cd5fc2Smrg# ---------------------------------------------------------------- 267888cd5fc2Smrg# Check whether the given compiler option works 267988cd5fc2SmrgAC_DEFUN([_LT_COMPILER_OPTION], 268088cd5fc2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 268188cd5fc2Smrgm4_require([_LT_DECL_SED])dnl 268288cd5fc2SmrgAC_CACHE_CHECK([$1], [$2], 268388cd5fc2Smrg [$2=no 268488cd5fc2Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 268588cd5fc2Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 268688cd5fc2Smrg lt_compiler_flag="$3" 268788cd5fc2Smrg # Insert the option either (1) after the last *FLAGS variable, or 268888cd5fc2Smrg # (2) before a word containing "conftest.", or (3) at the end. 268988cd5fc2Smrg # Note that $ac_compile itself does not contain backslashes and begins 269088cd5fc2Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 269188cd5fc2Smrg # The option is referenced via a variable to avoid confusing sed. 269288cd5fc2Smrg lt_compile=`echo "$ac_compile" | $SED \ 269388cd5fc2Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 269488cd5fc2Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 269588cd5fc2Smrg -e 's:$: $lt_compiler_flag:'` 269688cd5fc2Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 269788cd5fc2Smrg (eval "$lt_compile" 2>conftest.err) 269888cd5fc2Smrg ac_status=$? 269988cd5fc2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 270088cd5fc2Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 270188cd5fc2Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 270288cd5fc2Smrg # The compiler can only warn and ignore the option if not recognized 270388cd5fc2Smrg # So say no if there are warnings other than the usual output. 270488cd5fc2Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 270588cd5fc2Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 270688cd5fc2Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 270788cd5fc2Smrg $2=yes 270888cd5fc2Smrg fi 270988cd5fc2Smrg fi 271088cd5fc2Smrg $RM conftest* 271188cd5fc2Smrg]) 271288cd5fc2Smrg 271388cd5fc2Smrgif test x"[$]$2" = xyes; then 271488cd5fc2Smrg m4_if([$5], , :, [$5]) 271588cd5fc2Smrgelse 271688cd5fc2Smrg m4_if([$6], , :, [$6]) 271788cd5fc2Smrgfi 271888cd5fc2Smrg])# _LT_COMPILER_OPTION 271988cd5fc2Smrg 272088cd5fc2Smrg# Old name: 272188cd5fc2SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 272288cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 272388cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 272488cd5fc2Smrg 272588cd5fc2Smrg 272688cd5fc2Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 272788cd5fc2Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 272888cd5fc2Smrg# ---------------------------------------------------- 272988cd5fc2Smrg# Check whether the given linker option works 273088cd5fc2SmrgAC_DEFUN([_LT_LINKER_OPTION], 273188cd5fc2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 273288cd5fc2Smrgm4_require([_LT_DECL_SED])dnl 273388cd5fc2SmrgAC_CACHE_CHECK([$1], [$2], 273488cd5fc2Smrg [$2=no 273588cd5fc2Smrg save_LDFLAGS="$LDFLAGS" 273688cd5fc2Smrg LDFLAGS="$LDFLAGS $3" 273788cd5fc2Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 273888cd5fc2Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 273988cd5fc2Smrg # The linker can only warn and ignore the option if not recognized 274088cd5fc2Smrg # So say no if there are warnings 274188cd5fc2Smrg if test -s conftest.err; then 274288cd5fc2Smrg # Append any errors to the config.log. 274388cd5fc2Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 274488cd5fc2Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 274588cd5fc2Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 274688cd5fc2Smrg if diff conftest.exp conftest.er2 >/dev/null; then 274788cd5fc2Smrg $2=yes 274888cd5fc2Smrg fi 274988cd5fc2Smrg else 275088cd5fc2Smrg $2=yes 275188cd5fc2Smrg fi 275288cd5fc2Smrg fi 275388cd5fc2Smrg $RM -r conftest* 275488cd5fc2Smrg LDFLAGS="$save_LDFLAGS" 275588cd5fc2Smrg]) 275688cd5fc2Smrg 275788cd5fc2Smrgif test x"[$]$2" = xyes; then 275888cd5fc2Smrg m4_if([$4], , :, [$4]) 275988cd5fc2Smrgelse 276088cd5fc2Smrg m4_if([$5], , :, [$5]) 276188cd5fc2Smrgfi 276288cd5fc2Smrg])# _LT_LINKER_OPTION 276388cd5fc2Smrg 276488cd5fc2Smrg# Old name: 276588cd5fc2SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 276688cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 276788cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 276888cd5fc2Smrg 276988cd5fc2Smrg 277088cd5fc2Smrg# LT_CMD_MAX_LEN 277188cd5fc2Smrg#--------------- 277288cd5fc2SmrgAC_DEFUN([LT_CMD_MAX_LEN], 277388cd5fc2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 277488cd5fc2Smrg# find the maximum length of command line arguments 277588cd5fc2SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 277688cd5fc2SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 277788cd5fc2Smrg i=0 277888cd5fc2Smrg teststring="ABCD" 277988cd5fc2Smrg 278088cd5fc2Smrg case $build_os in 278188cd5fc2Smrg msdosdjgpp*) 278288cd5fc2Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 278388cd5fc2Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 278488cd5fc2Smrg # during glob expansion). Even if it were fixed, the result of this 278588cd5fc2Smrg # check would be larger than it should be. 278688cd5fc2Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 278788cd5fc2Smrg ;; 278888cd5fc2Smrg 278988cd5fc2Smrg gnu*) 279088cd5fc2Smrg # Under GNU Hurd, this test is not required because there is 279188cd5fc2Smrg # no limit to the length of command line arguments. 279288cd5fc2Smrg # Libtool will interpret -1 as no limit whatsoever 279388cd5fc2Smrg lt_cv_sys_max_cmd_len=-1; 279488cd5fc2Smrg ;; 279588cd5fc2Smrg 279688cd5fc2Smrg cygwin* | mingw* | cegcc*) 279788cd5fc2Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 279888cd5fc2Smrg # about 5 minutes as the teststring grows exponentially. 279988cd5fc2Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 280088cd5fc2Smrg # you end up with a "frozen" computer, even though with patience 280188cd5fc2Smrg # the test eventually succeeds (with a max line length of 256k). 280288cd5fc2Smrg # Instead, let's just punt: use the minimum linelength reported by 280388cd5fc2Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 280488cd5fc2Smrg lt_cv_sys_max_cmd_len=8192; 280588cd5fc2Smrg ;; 280688cd5fc2Smrg 280788cd5fc2Smrg mint*) 280888cd5fc2Smrg # On MiNT this can take a long time and run out of memory. 280988cd5fc2Smrg lt_cv_sys_max_cmd_len=8192; 281088cd5fc2Smrg ;; 281188cd5fc2Smrg 281288cd5fc2Smrg amigaos*) 281388cd5fc2Smrg # On AmigaOS with pdksh, this test takes hours, literally. 281488cd5fc2Smrg # So we just punt and use a minimum line length of 8192. 281588cd5fc2Smrg lt_cv_sys_max_cmd_len=8192; 281688cd5fc2Smrg ;; 281788cd5fc2Smrg 281888cd5fc2Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 281988cd5fc2Smrg # This has been around since 386BSD, at least. Likely further. 282088cd5fc2Smrg if test -x /sbin/sysctl; then 282188cd5fc2Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 282288cd5fc2Smrg elif test -x /usr/sbin/sysctl; then 282388cd5fc2Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 282488cd5fc2Smrg else 282588cd5fc2Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 282688cd5fc2Smrg fi 282788cd5fc2Smrg # And add a safety zone 282888cd5fc2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 282988cd5fc2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 283088cd5fc2Smrg ;; 283188cd5fc2Smrg 283288cd5fc2Smrg interix*) 283388cd5fc2Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 283488cd5fc2Smrg lt_cv_sys_max_cmd_len=196608 283588cd5fc2Smrg ;; 283688cd5fc2Smrg 283788cd5fc2Smrg os2*) 283888cd5fc2Smrg # The test takes a long time on OS/2. 283988cd5fc2Smrg lt_cv_sys_max_cmd_len=8192 284088cd5fc2Smrg ;; 284188cd5fc2Smrg 284288cd5fc2Smrg osf*) 284388cd5fc2Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 284488cd5fc2Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 284588cd5fc2Smrg # nice to cause kernel panics so lets avoid the loop below. 284688cd5fc2Smrg # First set a reasonable default. 284788cd5fc2Smrg lt_cv_sys_max_cmd_len=16384 284888cd5fc2Smrg # 284988cd5fc2Smrg if test -x /sbin/sysconfig; then 285088cd5fc2Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 285188cd5fc2Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 285288cd5fc2Smrg esac 285388cd5fc2Smrg fi 285488cd5fc2Smrg ;; 285588cd5fc2Smrg sco3.2v5*) 285688cd5fc2Smrg lt_cv_sys_max_cmd_len=102400 285788cd5fc2Smrg ;; 285888cd5fc2Smrg sysv5* | sco5v6* | sysv4.2uw2*) 285988cd5fc2Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 286088cd5fc2Smrg if test -n "$kargmax"; then 286188cd5fc2Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 286288cd5fc2Smrg else 286388cd5fc2Smrg lt_cv_sys_max_cmd_len=32768 286488cd5fc2Smrg fi 286588cd5fc2Smrg ;; 286688cd5fc2Smrg *) 286788cd5fc2Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 286888cd5fc2Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 286988cd5fc2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 287088cd5fc2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 287188cd5fc2Smrg else 287288cd5fc2Smrg # Make teststring a little bigger before we do anything with it. 287388cd5fc2Smrg # a 1K string should be a reasonable start. 287488cd5fc2Smrg for i in 1 2 3 4 5 6 7 8 ; do 287588cd5fc2Smrg teststring=$teststring$teststring 287688cd5fc2Smrg done 287788cd5fc2Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 287888cd5fc2Smrg # If test is not a shell built-in, we'll probably end up computing a 287988cd5fc2Smrg # maximum length that is only half of the actual maximum length, but 288088cd5fc2Smrg # we can't tell. 288188cd5fc2Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 288288cd5fc2Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 288388cd5fc2Smrg test $i != 17 # 1/2 MB should be enough 288488cd5fc2Smrg do 288588cd5fc2Smrg i=`expr $i + 1` 288688cd5fc2Smrg teststring=$teststring$teststring 288788cd5fc2Smrg done 288888cd5fc2Smrg # Only check the string length outside the loop. 288988cd5fc2Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 289088cd5fc2Smrg teststring= 289188cd5fc2Smrg # Add a significant safety factor because C++ compilers can tack on 289288cd5fc2Smrg # massive amounts of additional arguments before passing them to the 289388cd5fc2Smrg # linker. It appears as though 1/2 is a usable value. 289488cd5fc2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 289588cd5fc2Smrg fi 289688cd5fc2Smrg ;; 289788cd5fc2Smrg esac 289888cd5fc2Smrg]) 289988cd5fc2Smrgif test -n $lt_cv_sys_max_cmd_len ; then 290088cd5fc2Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 290188cd5fc2Smrgelse 290288cd5fc2Smrg AC_MSG_RESULT(none) 290388cd5fc2Smrgfi 290488cd5fc2Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 290588cd5fc2Smrg_LT_DECL([], [max_cmd_len], [0], 290688cd5fc2Smrg [What is the maximum length of a command?]) 290788cd5fc2Smrg])# LT_CMD_MAX_LEN 290888cd5fc2Smrg 290988cd5fc2Smrg# Old name: 291088cd5fc2SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 291188cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 291288cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 291388cd5fc2Smrg 291488cd5fc2Smrg 291588cd5fc2Smrg# _LT_HEADER_DLFCN 291688cd5fc2Smrg# ---------------- 291788cd5fc2Smrgm4_defun([_LT_HEADER_DLFCN], 291888cd5fc2Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 291988cd5fc2Smrg])# _LT_HEADER_DLFCN 292088cd5fc2Smrg 292188cd5fc2Smrg 292288cd5fc2Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 292388cd5fc2Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 292488cd5fc2Smrg# ---------------------------------------------------------------- 292588cd5fc2Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 292688cd5fc2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 292788cd5fc2Smrgif test "$cross_compiling" = yes; then : 292888cd5fc2Smrg [$4] 292988cd5fc2Smrgelse 293088cd5fc2Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 293188cd5fc2Smrg lt_status=$lt_dlunknown 293288cd5fc2Smrg cat > conftest.$ac_ext <<_LT_EOF 293388cd5fc2Smrg[#line $LINENO "configure" 293488cd5fc2Smrg#include "confdefs.h" 293588cd5fc2Smrg 293688cd5fc2Smrg#if HAVE_DLFCN_H 293788cd5fc2Smrg#include <dlfcn.h> 293888cd5fc2Smrg#endif 293988cd5fc2Smrg 294088cd5fc2Smrg#include <stdio.h> 294188cd5fc2Smrg 294288cd5fc2Smrg#ifdef RTLD_GLOBAL 294388cd5fc2Smrg# define LT_DLGLOBAL RTLD_GLOBAL 294488cd5fc2Smrg#else 294588cd5fc2Smrg# ifdef DL_GLOBAL 294688cd5fc2Smrg# define LT_DLGLOBAL DL_GLOBAL 294788cd5fc2Smrg# else 294888cd5fc2Smrg# define LT_DLGLOBAL 0 294988cd5fc2Smrg# endif 295088cd5fc2Smrg#endif 295188cd5fc2Smrg 295288cd5fc2Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 295388cd5fc2Smrg find out it does not work in some platform. */ 295488cd5fc2Smrg#ifndef LT_DLLAZY_OR_NOW 295588cd5fc2Smrg# ifdef RTLD_LAZY 295688cd5fc2Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 295788cd5fc2Smrg# else 295888cd5fc2Smrg# ifdef DL_LAZY 295988cd5fc2Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 296088cd5fc2Smrg# else 296188cd5fc2Smrg# ifdef RTLD_NOW 296288cd5fc2Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 296388cd5fc2Smrg# else 296488cd5fc2Smrg# ifdef DL_NOW 296588cd5fc2Smrg# define LT_DLLAZY_OR_NOW DL_NOW 296688cd5fc2Smrg# else 296788cd5fc2Smrg# define LT_DLLAZY_OR_NOW 0 296888cd5fc2Smrg# endif 296988cd5fc2Smrg# endif 297088cd5fc2Smrg# endif 297188cd5fc2Smrg# endif 297288cd5fc2Smrg#endif 297388cd5fc2Smrg 297488cd5fc2Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 297588cd5fc2Smrg correspondingly for the symbols needed. */ 297688cd5fc2Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 297788cd5fc2Smrgint fnord () __attribute__((visibility("default"))); 297888cd5fc2Smrg#endif 297988cd5fc2Smrg 298088cd5fc2Smrgint fnord () { return 42; } 298188cd5fc2Smrgint main () 298288cd5fc2Smrg{ 298388cd5fc2Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 298488cd5fc2Smrg int status = $lt_dlunknown; 298588cd5fc2Smrg 298688cd5fc2Smrg if (self) 298788cd5fc2Smrg { 298888cd5fc2Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 298988cd5fc2Smrg else 299088cd5fc2Smrg { 299188cd5fc2Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 299288cd5fc2Smrg else puts (dlerror ()); 299388cd5fc2Smrg } 299488cd5fc2Smrg /* dlclose (self); */ 299588cd5fc2Smrg } 299688cd5fc2Smrg else 299788cd5fc2Smrg puts (dlerror ()); 299888cd5fc2Smrg 299988cd5fc2Smrg return status; 300088cd5fc2Smrg}] 300188cd5fc2Smrg_LT_EOF 300288cd5fc2Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 300388cd5fc2Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 300488cd5fc2Smrg lt_status=$? 300588cd5fc2Smrg case x$lt_status in 300688cd5fc2Smrg x$lt_dlno_uscore) $1 ;; 300788cd5fc2Smrg x$lt_dlneed_uscore) $2 ;; 300888cd5fc2Smrg x$lt_dlunknown|x*) $3 ;; 300988cd5fc2Smrg esac 301088cd5fc2Smrg else : 301188cd5fc2Smrg # compilation failed 301288cd5fc2Smrg $3 301388cd5fc2Smrg fi 301488cd5fc2Smrgfi 301588cd5fc2Smrgrm -fr conftest* 301688cd5fc2Smrg])# _LT_TRY_DLOPEN_SELF 301788cd5fc2Smrg 301888cd5fc2Smrg 301988cd5fc2Smrg# LT_SYS_DLOPEN_SELF 302088cd5fc2Smrg# ------------------ 302188cd5fc2SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 302288cd5fc2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 302388cd5fc2Smrgif test "x$enable_dlopen" != xyes; then 302488cd5fc2Smrg enable_dlopen=unknown 302588cd5fc2Smrg enable_dlopen_self=unknown 302688cd5fc2Smrg enable_dlopen_self_static=unknown 302788cd5fc2Smrgelse 302888cd5fc2Smrg lt_cv_dlopen=no 302988cd5fc2Smrg lt_cv_dlopen_libs= 303088cd5fc2Smrg 303188cd5fc2Smrg case $host_os in 303288cd5fc2Smrg beos*) 303388cd5fc2Smrg lt_cv_dlopen="load_add_on" 303488cd5fc2Smrg lt_cv_dlopen_libs= 303588cd5fc2Smrg lt_cv_dlopen_self=yes 303688cd5fc2Smrg ;; 303788cd5fc2Smrg 303888cd5fc2Smrg mingw* | pw32* | cegcc*) 303988cd5fc2Smrg lt_cv_dlopen="LoadLibrary" 304088cd5fc2Smrg lt_cv_dlopen_libs= 304188cd5fc2Smrg ;; 304288cd5fc2Smrg 304388cd5fc2Smrg cygwin*) 304488cd5fc2Smrg lt_cv_dlopen="dlopen" 304588cd5fc2Smrg lt_cv_dlopen_libs= 304688cd5fc2Smrg ;; 304788cd5fc2Smrg 304888cd5fc2Smrg darwin*) 304988cd5fc2Smrg # if libdl is installed we need to link against it 305088cd5fc2Smrg AC_CHECK_LIB([dl], [dlopen], 305188cd5fc2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 305288cd5fc2Smrg lt_cv_dlopen="dyld" 305388cd5fc2Smrg lt_cv_dlopen_libs= 305488cd5fc2Smrg lt_cv_dlopen_self=yes 305588cd5fc2Smrg ]) 305688cd5fc2Smrg ;; 305788cd5fc2Smrg 305888cd5fc2Smrg *) 305988cd5fc2Smrg AC_CHECK_FUNC([shl_load], 306088cd5fc2Smrg [lt_cv_dlopen="shl_load"], 306188cd5fc2Smrg [AC_CHECK_LIB([dld], [shl_load], 306288cd5fc2Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 306388cd5fc2Smrg [AC_CHECK_FUNC([dlopen], 306488cd5fc2Smrg [lt_cv_dlopen="dlopen"], 306588cd5fc2Smrg [AC_CHECK_LIB([dl], [dlopen], 306688cd5fc2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 306788cd5fc2Smrg [AC_CHECK_LIB([svld], [dlopen], 306888cd5fc2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 306988cd5fc2Smrg [AC_CHECK_LIB([dld], [dld_link], 307088cd5fc2Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 307188cd5fc2Smrg ]) 307288cd5fc2Smrg ]) 307388cd5fc2Smrg ]) 307488cd5fc2Smrg ]) 307588cd5fc2Smrg ]) 307688cd5fc2Smrg ;; 307788cd5fc2Smrg esac 307888cd5fc2Smrg 307988cd5fc2Smrg if test "x$lt_cv_dlopen" != xno; then 308088cd5fc2Smrg enable_dlopen=yes 308188cd5fc2Smrg else 308288cd5fc2Smrg enable_dlopen=no 308388cd5fc2Smrg fi 308488cd5fc2Smrg 308588cd5fc2Smrg case $lt_cv_dlopen in 308688cd5fc2Smrg dlopen) 308788cd5fc2Smrg save_CPPFLAGS="$CPPFLAGS" 308888cd5fc2Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 308988cd5fc2Smrg 309088cd5fc2Smrg save_LDFLAGS="$LDFLAGS" 309188cd5fc2Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 309288cd5fc2Smrg 309388cd5fc2Smrg save_LIBS="$LIBS" 309488cd5fc2Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 309588cd5fc2Smrg 309688cd5fc2Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 309788cd5fc2Smrg lt_cv_dlopen_self, [dnl 309888cd5fc2Smrg _LT_TRY_DLOPEN_SELF( 309988cd5fc2Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 310088cd5fc2Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 310188cd5fc2Smrg ]) 310288cd5fc2Smrg 310388cd5fc2Smrg if test "x$lt_cv_dlopen_self" = xyes; then 310488cd5fc2Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 310588cd5fc2Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 310688cd5fc2Smrg lt_cv_dlopen_self_static, [dnl 310788cd5fc2Smrg _LT_TRY_DLOPEN_SELF( 310888cd5fc2Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 310988cd5fc2Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 311088cd5fc2Smrg ]) 311188cd5fc2Smrg fi 311288cd5fc2Smrg 311388cd5fc2Smrg CPPFLAGS="$save_CPPFLAGS" 311488cd5fc2Smrg LDFLAGS="$save_LDFLAGS" 311588cd5fc2Smrg LIBS="$save_LIBS" 311688cd5fc2Smrg ;; 311788cd5fc2Smrg esac 311888cd5fc2Smrg 311988cd5fc2Smrg case $lt_cv_dlopen_self in 312088cd5fc2Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 312188cd5fc2Smrg *) enable_dlopen_self=unknown ;; 312288cd5fc2Smrg esac 312388cd5fc2Smrg 312488cd5fc2Smrg case $lt_cv_dlopen_self_static in 312588cd5fc2Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 312688cd5fc2Smrg *) enable_dlopen_self_static=unknown ;; 312788cd5fc2Smrg esac 312888cd5fc2Smrgfi 312988cd5fc2Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 313088cd5fc2Smrg [Whether dlopen is supported]) 313188cd5fc2Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 313288cd5fc2Smrg [Whether dlopen of programs is supported]) 313388cd5fc2Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 313488cd5fc2Smrg [Whether dlopen of statically linked programs is supported]) 313588cd5fc2Smrg])# LT_SYS_DLOPEN_SELF 313688cd5fc2Smrg 313788cd5fc2Smrg# Old name: 313888cd5fc2SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 313988cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 314088cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 314188cd5fc2Smrg 314288cd5fc2Smrg 314388cd5fc2Smrg# _LT_COMPILER_C_O([TAGNAME]) 314488cd5fc2Smrg# --------------------------- 314588cd5fc2Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 314688cd5fc2Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 314788cd5fc2Smrgm4_defun([_LT_COMPILER_C_O], 314888cd5fc2Smrg[m4_require([_LT_DECL_SED])dnl 314988cd5fc2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 315088cd5fc2Smrgm4_require([_LT_TAG_COMPILER])dnl 315188cd5fc2SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 315288cd5fc2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 315388cd5fc2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 315488cd5fc2Smrg $RM -r conftest 2>/dev/null 315588cd5fc2Smrg mkdir conftest 315688cd5fc2Smrg cd conftest 315788cd5fc2Smrg mkdir out 315888cd5fc2Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 315988cd5fc2Smrg 316088cd5fc2Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 316188cd5fc2Smrg # Insert the option either (1) after the last *FLAGS variable, or 316288cd5fc2Smrg # (2) before a word containing "conftest.", or (3) at the end. 316388cd5fc2Smrg # Note that $ac_compile itself does not contain backslashes and begins 316488cd5fc2Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 316588cd5fc2Smrg lt_compile=`echo "$ac_compile" | $SED \ 316688cd5fc2Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 316788cd5fc2Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 316888cd5fc2Smrg -e 's:$: $lt_compiler_flag:'` 316988cd5fc2Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 317088cd5fc2Smrg (eval "$lt_compile" 2>out/conftest.err) 317188cd5fc2Smrg ac_status=$? 317288cd5fc2Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 317388cd5fc2Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 317488cd5fc2Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 317588cd5fc2Smrg then 317688cd5fc2Smrg # The compiler can only warn and ignore the option if not recognized 317788cd5fc2Smrg # So say no if there are warnings 317888cd5fc2Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 317988cd5fc2Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 318088cd5fc2Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 318188cd5fc2Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 318288cd5fc2Smrg fi 318388cd5fc2Smrg fi 318488cd5fc2Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 318588cd5fc2Smrg $RM conftest* 318688cd5fc2Smrg # SGI C++ compiler will create directory out/ii_files/ for 318788cd5fc2Smrg # template instantiation 318888cd5fc2Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 318988cd5fc2Smrg $RM out/* && rmdir out 319088cd5fc2Smrg cd .. 319188cd5fc2Smrg $RM -r conftest 319288cd5fc2Smrg $RM conftest* 319388cd5fc2Smrg]) 319488cd5fc2Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 319588cd5fc2Smrg [Does compiler simultaneously support -c and -o options?]) 319688cd5fc2Smrg])# _LT_COMPILER_C_O 319788cd5fc2Smrg 319888cd5fc2Smrg 319988cd5fc2Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 320088cd5fc2Smrg# ---------------------------------- 320188cd5fc2Smrg# Check to see if we can do hard links to lock some files if needed 320288cd5fc2Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 320388cd5fc2Smrg[m4_require([_LT_ENABLE_LOCK])dnl 320488cd5fc2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 320588cd5fc2Smrg_LT_COMPILER_C_O([$1]) 320688cd5fc2Smrg 320788cd5fc2Smrghard_links="nottested" 320888cd5fc2Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 320988cd5fc2Smrg # do not overwrite the value of need_locks provided by the user 321088cd5fc2Smrg AC_MSG_CHECKING([if we can lock with hard links]) 321188cd5fc2Smrg hard_links=yes 321288cd5fc2Smrg $RM conftest* 321388cd5fc2Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 321488cd5fc2Smrg touch conftest.a 321588cd5fc2Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 321688cd5fc2Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 321788cd5fc2Smrg AC_MSG_RESULT([$hard_links]) 321888cd5fc2Smrg if test "$hard_links" = no; then 321988cd5fc2Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 322088cd5fc2Smrg need_locks=warn 322188cd5fc2Smrg fi 322288cd5fc2Smrgelse 322388cd5fc2Smrg need_locks=no 322488cd5fc2Smrgfi 322588cd5fc2Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 322688cd5fc2Smrg])# _LT_COMPILER_FILE_LOCKS 322788cd5fc2Smrg 322888cd5fc2Smrg 322988cd5fc2Smrg# _LT_CHECK_OBJDIR 323088cd5fc2Smrg# ---------------- 323188cd5fc2Smrgm4_defun([_LT_CHECK_OBJDIR], 323288cd5fc2Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 323388cd5fc2Smrg[rm -f .libs 2>/dev/null 323488cd5fc2Smrgmkdir .libs 2>/dev/null 323588cd5fc2Smrgif test -d .libs; then 323688cd5fc2Smrg lt_cv_objdir=.libs 323788cd5fc2Smrgelse 323888cd5fc2Smrg # MS-DOS does not allow filenames that begin with a dot. 323988cd5fc2Smrg lt_cv_objdir=_libs 324088cd5fc2Smrgfi 324188cd5fc2Smrgrmdir .libs 2>/dev/null]) 324288cd5fc2Smrgobjdir=$lt_cv_objdir 324388cd5fc2Smrg_LT_DECL([], [objdir], [0], 324488cd5fc2Smrg [The name of the directory that contains temporary libtool files])dnl 324588cd5fc2Smrgm4_pattern_allow([LT_OBJDIR])dnl 324688cd5fc2SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 324788cd5fc2Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 324888cd5fc2Smrg])# _LT_CHECK_OBJDIR 324988cd5fc2Smrg 325088cd5fc2Smrg 325188cd5fc2Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 325288cd5fc2Smrg# -------------------------------------- 325388cd5fc2Smrg# Check hardcoding attributes. 325488cd5fc2Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 325588cd5fc2Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 325688cd5fc2Smrg_LT_TAGVAR(hardcode_action, $1)= 325788cd5fc2Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 325888cd5fc2Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 325988cd5fc2Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 326088cd5fc2Smrg 326188cd5fc2Smrg # We can hardcode non-existent directories. 326288cd5fc2Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 326388cd5fc2Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 326488cd5fc2Smrg # have to relink, otherwise we might link with an installed library 326588cd5fc2Smrg # when we should be linking with a yet-to-be-installed one 326688cd5fc2Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 326788cd5fc2Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 326888cd5fc2Smrg # Linking always hardcodes the temporary library directory. 326988cd5fc2Smrg _LT_TAGVAR(hardcode_action, $1)=relink 327088cd5fc2Smrg else 327188cd5fc2Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 327288cd5fc2Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 327388cd5fc2Smrg fi 327488cd5fc2Smrgelse 327588cd5fc2Smrg # We cannot hardcode anything, or else we can only hardcode existing 327688cd5fc2Smrg # directories. 327788cd5fc2Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 327888cd5fc2Smrgfi 327988cd5fc2SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 328088cd5fc2Smrg 328188cd5fc2Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 328288cd5fc2Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 328388cd5fc2Smrg # Fast installation is not supported 328488cd5fc2Smrg enable_fast_install=no 328588cd5fc2Smrgelif test "$shlibpath_overrides_runpath" = yes || 328688cd5fc2Smrg test "$enable_shared" = no; then 328788cd5fc2Smrg # Fast installation is not necessary 328888cd5fc2Smrg enable_fast_install=needless 328988cd5fc2Smrgfi 329088cd5fc2Smrg_LT_TAGDECL([], [hardcode_action], [0], 329188cd5fc2Smrg [How to hardcode a shared library path into an executable]) 329288cd5fc2Smrg])# _LT_LINKER_HARDCODE_LIBPATH 329388cd5fc2Smrg 329488cd5fc2Smrg 329588cd5fc2Smrg# _LT_CMD_STRIPLIB 329688cd5fc2Smrg# ---------------- 329788cd5fc2Smrgm4_defun([_LT_CMD_STRIPLIB], 329888cd5fc2Smrg[m4_require([_LT_DECL_EGREP]) 329988cd5fc2Smrgstriplib= 330088cd5fc2Smrgold_striplib= 330188cd5fc2SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 330288cd5fc2Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 330388cd5fc2Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 330488cd5fc2Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 330588cd5fc2Smrg AC_MSG_RESULT([yes]) 330688cd5fc2Smrgelse 330788cd5fc2Smrg# FIXME - insert some real tests, host_os isn't really good enough 330888cd5fc2Smrg case $host_os in 330988cd5fc2Smrg darwin*) 331088cd5fc2Smrg if test -n "$STRIP" ; then 331188cd5fc2Smrg striplib="$STRIP -x" 331288cd5fc2Smrg old_striplib="$STRIP -S" 331388cd5fc2Smrg AC_MSG_RESULT([yes]) 331488cd5fc2Smrg else 331588cd5fc2Smrg AC_MSG_RESULT([no]) 331688cd5fc2Smrg fi 331788cd5fc2Smrg ;; 331888cd5fc2Smrg *) 331988cd5fc2Smrg AC_MSG_RESULT([no]) 332088cd5fc2Smrg ;; 332188cd5fc2Smrg esac 332288cd5fc2Smrgfi 332388cd5fc2Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 332488cd5fc2Smrg_LT_DECL([], [striplib], [1]) 332588cd5fc2Smrg])# _LT_CMD_STRIPLIB 332688cd5fc2Smrg 332788cd5fc2Smrg 332888cd5fc2Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 332988cd5fc2Smrg# ----------------------------- 333088cd5fc2Smrg# PORTME Fill in your ld.so characteristics 333188cd5fc2Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 333288cd5fc2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 333388cd5fc2Smrgm4_require([_LT_DECL_EGREP])dnl 333488cd5fc2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 333588cd5fc2Smrgm4_require([_LT_DECL_OBJDUMP])dnl 333688cd5fc2Smrgm4_require([_LT_DECL_SED])dnl 333788cd5fc2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 333888cd5fc2SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 333988cd5fc2Smrgm4_if([$1], 334088cd5fc2Smrg [], [ 334188cd5fc2Smrgif test "$GCC" = yes; then 334288cd5fc2Smrg case $host_os in 334388cd5fc2Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 334488cd5fc2Smrg *) lt_awk_arg="/^libraries:/" ;; 334588cd5fc2Smrg esac 334688cd5fc2Smrg case $host_os in 334788cd5fc2Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 334888cd5fc2Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 334988cd5fc2Smrg esac 335088cd5fc2Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 335188cd5fc2Smrg case $lt_search_path_spec in 335288cd5fc2Smrg *\;*) 335388cd5fc2Smrg # if the path contains ";" then we assume it to be the separator 335488cd5fc2Smrg # otherwise default to the standard path separator (i.e. ":") - it is 335588cd5fc2Smrg # assumed that no part of a normal pathname contains ";" but that should 335688cd5fc2Smrg # okay in the real world where ";" in dirpaths is itself problematic. 335788cd5fc2Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 335888cd5fc2Smrg ;; 335988cd5fc2Smrg *) 336088cd5fc2Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 336188cd5fc2Smrg ;; 336288cd5fc2Smrg esac 336388cd5fc2Smrg # Ok, now we have the path, separated by spaces, we can step through it 336488cd5fc2Smrg # and add multilib dir if necessary. 336588cd5fc2Smrg lt_tmp_lt_search_path_spec= 336688cd5fc2Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 336788cd5fc2Smrg for lt_sys_path in $lt_search_path_spec; do 336888cd5fc2Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 336988cd5fc2Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 337088cd5fc2Smrg else 337188cd5fc2Smrg test -d "$lt_sys_path" && \ 337288cd5fc2Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 337388cd5fc2Smrg fi 337488cd5fc2Smrg done 337588cd5fc2Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 337688cd5fc2SmrgBEGIN {RS=" "; FS="/|\n";} { 337788cd5fc2Smrg lt_foo=""; 337888cd5fc2Smrg lt_count=0; 337988cd5fc2Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 338088cd5fc2Smrg if ($lt_i != "" && $lt_i != ".") { 338188cd5fc2Smrg if ($lt_i == "..") { 338288cd5fc2Smrg lt_count++; 338388cd5fc2Smrg } else { 338488cd5fc2Smrg if (lt_count == 0) { 338588cd5fc2Smrg lt_foo="/" $lt_i lt_foo; 338688cd5fc2Smrg } else { 338788cd5fc2Smrg lt_count--; 338888cd5fc2Smrg } 338988cd5fc2Smrg } 339088cd5fc2Smrg } 339188cd5fc2Smrg } 339288cd5fc2Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 339388cd5fc2Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 339488cd5fc2Smrg}'` 339588cd5fc2Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 339688cd5fc2Smrg # for these hosts. 339788cd5fc2Smrg case $host_os in 339888cd5fc2Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 339988cd5fc2Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 340088cd5fc2Smrg esac 340188cd5fc2Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 340288cd5fc2Smrgelse 340388cd5fc2Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 340488cd5fc2Smrgfi]) 340588cd5fc2Smrglibrary_names_spec= 340688cd5fc2Smrglibname_spec='lib$name' 340788cd5fc2Smrgsoname_spec= 340888cd5fc2Smrgshrext_cmds=".so" 340988cd5fc2Smrgpostinstall_cmds= 341088cd5fc2Smrgpostuninstall_cmds= 341188cd5fc2Smrgfinish_cmds= 341288cd5fc2Smrgfinish_eval= 341388cd5fc2Smrgshlibpath_var= 341488cd5fc2Smrgshlibpath_overrides_runpath=unknown 341588cd5fc2Smrgversion_type=none 341688cd5fc2Smrgdynamic_linker="$host_os ld.so" 341788cd5fc2Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 341888cd5fc2Smrgneed_lib_prefix=unknown 341988cd5fc2Smrghardcode_into_libs=no 342088cd5fc2Smrg 342188cd5fc2Smrg# when you set need_version to no, make sure it does not cause -set_version 342288cd5fc2Smrg# flags to be left without arguments 342388cd5fc2Smrgneed_version=unknown 342488cd5fc2Smrg 342588cd5fc2Smrgcase $host_os in 342688cd5fc2Smrgaix3*) 342788cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 342888cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 342988cd5fc2Smrg shlibpath_var=LIBPATH 343088cd5fc2Smrg 343188cd5fc2Smrg # AIX 3 has no versioning support, so we append a major version to the name. 343288cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 343388cd5fc2Smrg ;; 343488cd5fc2Smrg 343588cd5fc2Smrgaix[[4-9]]*) 343688cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 343788cd5fc2Smrg need_lib_prefix=no 343888cd5fc2Smrg need_version=no 343988cd5fc2Smrg hardcode_into_libs=yes 344088cd5fc2Smrg if test "$host_cpu" = ia64; then 344188cd5fc2Smrg # AIX 5 supports IA64 344288cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 344388cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 344488cd5fc2Smrg else 344588cd5fc2Smrg # With GCC up to 2.95.x, collect2 would create an import file 344688cd5fc2Smrg # for dependence libraries. The import file would start with 344788cd5fc2Smrg # the line `#! .'. This would cause the generated library to 344888cd5fc2Smrg # depend on `.', always an invalid library. This was fixed in 344988cd5fc2Smrg # development snapshots of GCC prior to 3.0. 345088cd5fc2Smrg case $host_os in 345188cd5fc2Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 345288cd5fc2Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 345388cd5fc2Smrg echo ' yes ' 345488cd5fc2Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 345588cd5fc2Smrg : 345688cd5fc2Smrg else 345788cd5fc2Smrg can_build_shared=no 345888cd5fc2Smrg fi 345988cd5fc2Smrg ;; 346088cd5fc2Smrg esac 346188cd5fc2Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 346288cd5fc2Smrg # soname into executable. Probably we can add versioning support to 346388cd5fc2Smrg # collect2, so additional links can be useful in future. 346488cd5fc2Smrg if test "$aix_use_runtimelinking" = yes; then 346588cd5fc2Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 346688cd5fc2Smrg # instead of lib<name>.a to let people know that these are not 346788cd5fc2Smrg # typical AIX shared libraries. 346888cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 346988cd5fc2Smrg else 347088cd5fc2Smrg # We preserve .a as extension for shared libraries through AIX4.2 347188cd5fc2Smrg # and later when we are not doing run time linking. 347288cd5fc2Smrg library_names_spec='${libname}${release}.a $libname.a' 347388cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 347488cd5fc2Smrg fi 347588cd5fc2Smrg shlibpath_var=LIBPATH 347688cd5fc2Smrg fi 347788cd5fc2Smrg ;; 347888cd5fc2Smrg 347988cd5fc2Smrgamigaos*) 348088cd5fc2Smrg case $host_cpu in 348188cd5fc2Smrg powerpc) 348288cd5fc2Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 348388cd5fc2Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 348488cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 348588cd5fc2Smrg ;; 348688cd5fc2Smrg m68k) 348788cd5fc2Smrg library_names_spec='$libname.ixlibrary $libname.a' 348888cd5fc2Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 348988cd5fc2Smrg 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' 349088cd5fc2Smrg ;; 349188cd5fc2Smrg esac 349288cd5fc2Smrg ;; 349388cd5fc2Smrg 349488cd5fc2Smrgbeos*) 349588cd5fc2Smrg library_names_spec='${libname}${shared_ext}' 349688cd5fc2Smrg dynamic_linker="$host_os ld.so" 349788cd5fc2Smrg shlibpath_var=LIBRARY_PATH 349888cd5fc2Smrg ;; 349988cd5fc2Smrg 350088cd5fc2Smrgbsdi[[45]]*) 350188cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 350288cd5fc2Smrg need_version=no 350388cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 350488cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 350588cd5fc2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 350688cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 350788cd5fc2Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 350888cd5fc2Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 350988cd5fc2Smrg # the default ld.so.conf also contains /usr/contrib/lib and 351088cd5fc2Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 351188cd5fc2Smrg # libtool to hard-code these into programs 351288cd5fc2Smrg ;; 351388cd5fc2Smrg 351488cd5fc2Smrgcygwin* | mingw* | pw32* | cegcc*) 351588cd5fc2Smrg version_type=windows 351688cd5fc2Smrg shrext_cmds=".dll" 351788cd5fc2Smrg need_version=no 351888cd5fc2Smrg need_lib_prefix=no 351988cd5fc2Smrg 352088cd5fc2Smrg case $GCC,$cc_basename in 352188cd5fc2Smrg yes,*) 352288cd5fc2Smrg # gcc 352388cd5fc2Smrg library_names_spec='$libname.dll.a' 352488cd5fc2Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 352588cd5fc2Smrg postinstall_cmds='base_file=`basename \${file}`~ 352688cd5fc2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 352788cd5fc2Smrg dldir=$destdir/`dirname \$dlpath`~ 352888cd5fc2Smrg test -d \$dldir || mkdir -p \$dldir~ 352988cd5fc2Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 353088cd5fc2Smrg chmod a+x \$dldir/$dlname~ 353188cd5fc2Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 353288cd5fc2Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 353388cd5fc2Smrg fi' 353488cd5fc2Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 353588cd5fc2Smrg dlpath=$dir/\$dldll~ 353688cd5fc2Smrg $RM \$dlpath' 353788cd5fc2Smrg shlibpath_overrides_runpath=yes 353888cd5fc2Smrg 353988cd5fc2Smrg case $host_os in 354088cd5fc2Smrg cygwin*) 354188cd5fc2Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 354288cd5fc2Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 354388cd5fc2Smrgm4_if([$1], [],[ 354488cd5fc2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 354588cd5fc2Smrg ;; 354688cd5fc2Smrg mingw* | cegcc*) 354788cd5fc2Smrg # MinGW DLLs use traditional 'lib' prefix 354888cd5fc2Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 354988cd5fc2Smrg ;; 355088cd5fc2Smrg pw32*) 355188cd5fc2Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 355288cd5fc2Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 355388cd5fc2Smrg ;; 355488cd5fc2Smrg esac 355588cd5fc2Smrg dynamic_linker='Win32 ld.exe' 355688cd5fc2Smrg ;; 355788cd5fc2Smrg 355888cd5fc2Smrg *,cl*) 355988cd5fc2Smrg # Native MSVC 356088cd5fc2Smrg libname_spec='$name' 356188cd5fc2Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 356288cd5fc2Smrg library_names_spec='${libname}.dll.lib' 356388cd5fc2Smrg 356488cd5fc2Smrg case $build_os in 356588cd5fc2Smrg mingw*) 356688cd5fc2Smrg sys_lib_search_path_spec= 356788cd5fc2Smrg lt_save_ifs=$IFS 356888cd5fc2Smrg IFS=';' 356988cd5fc2Smrg for lt_path in $LIB 357088cd5fc2Smrg do 357188cd5fc2Smrg IFS=$lt_save_ifs 357288cd5fc2Smrg # Let DOS variable expansion print the short 8.3 style file name. 357388cd5fc2Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 357488cd5fc2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 357588cd5fc2Smrg done 357688cd5fc2Smrg IFS=$lt_save_ifs 357788cd5fc2Smrg # Convert to MSYS style. 357888cd5fc2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 357988cd5fc2Smrg ;; 358088cd5fc2Smrg cygwin*) 358188cd5fc2Smrg # Convert to unix form, then to dos form, then back to unix form 358288cd5fc2Smrg # but this time dos style (no spaces!) so that the unix form looks 358388cd5fc2Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 358488cd5fc2Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 358588cd5fc2Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 358688cd5fc2Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 358788cd5fc2Smrg ;; 358888cd5fc2Smrg *) 358988cd5fc2Smrg sys_lib_search_path_spec="$LIB" 359088cd5fc2Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 359188cd5fc2Smrg # It is most probably a Windows format PATH. 359288cd5fc2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 359388cd5fc2Smrg else 359488cd5fc2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 359588cd5fc2Smrg fi 359688cd5fc2Smrg # FIXME: find the short name or the path components, as spaces are 359788cd5fc2Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 359888cd5fc2Smrg ;; 359988cd5fc2Smrg esac 360088cd5fc2Smrg 360188cd5fc2Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 360288cd5fc2Smrg postinstall_cmds='base_file=`basename \${file}`~ 360388cd5fc2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 360488cd5fc2Smrg dldir=$destdir/`dirname \$dlpath`~ 360588cd5fc2Smrg test -d \$dldir || mkdir -p \$dldir~ 360688cd5fc2Smrg $install_prog $dir/$dlname \$dldir/$dlname' 360788cd5fc2Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 360888cd5fc2Smrg dlpath=$dir/\$dldll~ 360988cd5fc2Smrg $RM \$dlpath' 361088cd5fc2Smrg shlibpath_overrides_runpath=yes 361188cd5fc2Smrg dynamic_linker='Win32 link.exe' 361288cd5fc2Smrg ;; 361388cd5fc2Smrg 361488cd5fc2Smrg *) 361588cd5fc2Smrg # Assume MSVC wrapper 361688cd5fc2Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 361788cd5fc2Smrg dynamic_linker='Win32 ld.exe' 361888cd5fc2Smrg ;; 361988cd5fc2Smrg esac 362088cd5fc2Smrg # FIXME: first we should search . and the directory the executable is in 362188cd5fc2Smrg shlibpath_var=PATH 362288cd5fc2Smrg ;; 362388cd5fc2Smrg 362488cd5fc2Smrgdarwin* | rhapsody*) 362588cd5fc2Smrg dynamic_linker="$host_os dyld" 362688cd5fc2Smrg version_type=darwin 362788cd5fc2Smrg need_lib_prefix=no 362888cd5fc2Smrg need_version=no 362988cd5fc2Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 363088cd5fc2Smrg soname_spec='${libname}${release}${major}$shared_ext' 363188cd5fc2Smrg shlibpath_overrides_runpath=yes 363288cd5fc2Smrg shlibpath_var=DYLD_LIBRARY_PATH 363388cd5fc2Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 363488cd5fc2Smrgm4_if([$1], [],[ 363588cd5fc2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 363688cd5fc2Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 363788cd5fc2Smrg ;; 363888cd5fc2Smrg 363988cd5fc2Smrgdgux*) 364088cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 364188cd5fc2Smrg need_lib_prefix=no 364288cd5fc2Smrg need_version=no 364388cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 364488cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 364588cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 364688cd5fc2Smrg ;; 364788cd5fc2Smrg 364888cd5fc2Smrgfreebsd* | dragonfly*) 364988cd5fc2Smrg # DragonFly does not have aout. When/if they implement a new 365088cd5fc2Smrg # versioning mechanism, adjust this. 365188cd5fc2Smrg if test -x /usr/bin/objformat; then 365288cd5fc2Smrg objformat=`/usr/bin/objformat` 365388cd5fc2Smrg else 365488cd5fc2Smrg case $host_os in 365588cd5fc2Smrg freebsd[[23]].*) objformat=aout ;; 365688cd5fc2Smrg *) objformat=elf ;; 365788cd5fc2Smrg esac 365888cd5fc2Smrg fi 365988cd5fc2Smrg version_type=freebsd-$objformat 366088cd5fc2Smrg case $version_type in 366188cd5fc2Smrg freebsd-elf*) 366288cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 366388cd5fc2Smrg need_version=no 366488cd5fc2Smrg need_lib_prefix=no 366588cd5fc2Smrg ;; 366688cd5fc2Smrg freebsd-*) 366788cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 366888cd5fc2Smrg need_version=yes 366988cd5fc2Smrg ;; 367088cd5fc2Smrg esac 367188cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 367288cd5fc2Smrg case $host_os in 367388cd5fc2Smrg freebsd2.*) 367488cd5fc2Smrg shlibpath_overrides_runpath=yes 367588cd5fc2Smrg ;; 367688cd5fc2Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 367788cd5fc2Smrg shlibpath_overrides_runpath=yes 367888cd5fc2Smrg hardcode_into_libs=yes 367988cd5fc2Smrg ;; 368088cd5fc2Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 368188cd5fc2Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 368288cd5fc2Smrg shlibpath_overrides_runpath=no 368388cd5fc2Smrg hardcode_into_libs=yes 368488cd5fc2Smrg ;; 368588cd5fc2Smrg *) # from 4.6 on, and DragonFly 368688cd5fc2Smrg shlibpath_overrides_runpath=yes 368788cd5fc2Smrg hardcode_into_libs=yes 368888cd5fc2Smrg ;; 368988cd5fc2Smrg esac 369088cd5fc2Smrg ;; 369188cd5fc2Smrg 369288cd5fc2Smrggnu*) 369388cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 369488cd5fc2Smrg need_lib_prefix=no 369588cd5fc2Smrg need_version=no 369688cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 369788cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 369888cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 369988cd5fc2Smrg shlibpath_overrides_runpath=no 370088cd5fc2Smrg hardcode_into_libs=yes 370188cd5fc2Smrg ;; 370288cd5fc2Smrg 370388cd5fc2Smrghaiku*) 370488cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 370588cd5fc2Smrg need_lib_prefix=no 370688cd5fc2Smrg need_version=no 370788cd5fc2Smrg dynamic_linker="$host_os runtime_loader" 370888cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 370988cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 371088cd5fc2Smrg shlibpath_var=LIBRARY_PATH 371188cd5fc2Smrg shlibpath_overrides_runpath=yes 371288cd5fc2Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 371388cd5fc2Smrg hardcode_into_libs=yes 371488cd5fc2Smrg ;; 371588cd5fc2Smrg 371688cd5fc2Smrghpux9* | hpux10* | hpux11*) 371788cd5fc2Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 371888cd5fc2Smrg # link against other versions. 371988cd5fc2Smrg version_type=sunos 372088cd5fc2Smrg need_lib_prefix=no 372188cd5fc2Smrg need_version=no 372288cd5fc2Smrg case $host_cpu in 372388cd5fc2Smrg ia64*) 372488cd5fc2Smrg shrext_cmds='.so' 372588cd5fc2Smrg hardcode_into_libs=yes 372688cd5fc2Smrg dynamic_linker="$host_os dld.so" 372788cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 372888cd5fc2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 372988cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 373088cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 373188cd5fc2Smrg if test "X$HPUX_IA64_MODE" = X32; then 373288cd5fc2Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 373388cd5fc2Smrg else 373488cd5fc2Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 373588cd5fc2Smrg fi 373688cd5fc2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 373788cd5fc2Smrg ;; 373888cd5fc2Smrg hppa*64*) 373988cd5fc2Smrg shrext_cmds='.sl' 374088cd5fc2Smrg hardcode_into_libs=yes 374188cd5fc2Smrg dynamic_linker="$host_os dld.sl" 374288cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 374388cd5fc2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 374488cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 374588cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 374688cd5fc2Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 374788cd5fc2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 374888cd5fc2Smrg ;; 374988cd5fc2Smrg *) 375088cd5fc2Smrg shrext_cmds='.sl' 375188cd5fc2Smrg dynamic_linker="$host_os dld.sl" 375288cd5fc2Smrg shlibpath_var=SHLIB_PATH 375388cd5fc2Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 375488cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 375588cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 375688cd5fc2Smrg ;; 375788cd5fc2Smrg esac 375888cd5fc2Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 375988cd5fc2Smrg postinstall_cmds='chmod 555 $lib' 376088cd5fc2Smrg # or fails outright, so override atomically: 376188cd5fc2Smrg install_override_mode=555 376288cd5fc2Smrg ;; 376388cd5fc2Smrg 376488cd5fc2Smrginterix[[3-9]]*) 376588cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 376688cd5fc2Smrg need_lib_prefix=no 376788cd5fc2Smrg need_version=no 376888cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 376988cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 377088cd5fc2Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 377188cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 377288cd5fc2Smrg shlibpath_overrides_runpath=no 377388cd5fc2Smrg hardcode_into_libs=yes 377488cd5fc2Smrg ;; 377588cd5fc2Smrg 377688cd5fc2Smrgirix5* | irix6* | nonstopux*) 377788cd5fc2Smrg case $host_os in 377888cd5fc2Smrg nonstopux*) version_type=nonstopux ;; 377988cd5fc2Smrg *) 378088cd5fc2Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 378188cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 378288cd5fc2Smrg else 378388cd5fc2Smrg version_type=irix 378488cd5fc2Smrg fi ;; 378588cd5fc2Smrg esac 378688cd5fc2Smrg need_lib_prefix=no 378788cd5fc2Smrg need_version=no 378888cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 378988cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 379088cd5fc2Smrg case $host_os in 379188cd5fc2Smrg irix5* | nonstopux*) 379288cd5fc2Smrg libsuff= shlibsuff= 379388cd5fc2Smrg ;; 379488cd5fc2Smrg *) 379588cd5fc2Smrg case $LD in # libtool.m4 will add one of these switches to LD 379688cd5fc2Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 379788cd5fc2Smrg libsuff= shlibsuff= libmagic=32-bit;; 379888cd5fc2Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 379988cd5fc2Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 380088cd5fc2Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 380188cd5fc2Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 380288cd5fc2Smrg *) libsuff= shlibsuff= libmagic=never-match;; 380388cd5fc2Smrg esac 380488cd5fc2Smrg ;; 380588cd5fc2Smrg esac 380688cd5fc2Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 380788cd5fc2Smrg shlibpath_overrides_runpath=no 380888cd5fc2Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 380988cd5fc2Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 381088cd5fc2Smrg hardcode_into_libs=yes 381188cd5fc2Smrg ;; 381288cd5fc2Smrg 381388cd5fc2Smrg# No shared lib support for Linux oldld, aout, or coff. 381488cd5fc2Smrglinux*oldld* | linux*aout* | linux*coff*) 381588cd5fc2Smrg dynamic_linker=no 381688cd5fc2Smrg ;; 381788cd5fc2Smrg 381888cd5fc2Smrg# This must be glibc/ELF. 381988cd5fc2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 382088cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 382188cd5fc2Smrg need_lib_prefix=no 382288cd5fc2Smrg need_version=no 382388cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 382488cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 382588cd5fc2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 382688cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 382788cd5fc2Smrg shlibpath_overrides_runpath=no 382888cd5fc2Smrg 382988cd5fc2Smrg # Some binutils ld are patched to set DT_RUNPATH 383088cd5fc2Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 383188cd5fc2Smrg [lt_cv_shlibpath_overrides_runpath=no 383288cd5fc2Smrg save_LDFLAGS=$LDFLAGS 383388cd5fc2Smrg save_libdir=$libdir 383488cd5fc2Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 383588cd5fc2Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 383688cd5fc2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 383788cd5fc2Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 383888cd5fc2Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 383988cd5fc2Smrg LDFLAGS=$save_LDFLAGS 384088cd5fc2Smrg libdir=$save_libdir 384188cd5fc2Smrg ]) 384288cd5fc2Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 384388cd5fc2Smrg 384488cd5fc2Smrg # This implies no fast_install, which is unacceptable. 384588cd5fc2Smrg # Some rework will be needed to allow for fast_install 384688cd5fc2Smrg # before this can be enabled. 384788cd5fc2Smrg hardcode_into_libs=yes 384888cd5fc2Smrg 384988cd5fc2Smrg # Append ld.so.conf contents to the search path 385088cd5fc2Smrg if test -f /etc/ld.so.conf; then 385188cd5fc2Smrg 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' ' '` 385288cd5fc2Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 385388cd5fc2Smrg fi 385488cd5fc2Smrg 385588cd5fc2Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 385688cd5fc2Smrg # powerpc, because MkLinux only supported shared libraries with the 385788cd5fc2Smrg # GNU dynamic linker. Since this was broken with cross compilers, 385888cd5fc2Smrg # most powerpc-linux boxes support dynamic linking these days and 385988cd5fc2Smrg # people can always --disable-shared, the test was removed, and we 386088cd5fc2Smrg # assume the GNU/Linux dynamic linker is in use. 386188cd5fc2Smrg dynamic_linker='GNU/Linux ld.so' 386288cd5fc2Smrg ;; 386388cd5fc2Smrg 386488cd5fc2Smrgnetbsdelf*-gnu) 386588cd5fc2Smrg version_type=linux 386688cd5fc2Smrg need_lib_prefix=no 386788cd5fc2Smrg need_version=no 386888cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 386988cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 387088cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 387188cd5fc2Smrg shlibpath_overrides_runpath=no 387288cd5fc2Smrg hardcode_into_libs=yes 387388cd5fc2Smrg dynamic_linker='NetBSD ld.elf_so' 387488cd5fc2Smrg ;; 387588cd5fc2Smrg 387688cd5fc2Smrgnetbsd*) 387788cd5fc2Smrg version_type=sunos 387888cd5fc2Smrg need_lib_prefix=no 387988cd5fc2Smrg need_version=no 388088cd5fc2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 388188cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 388288cd5fc2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 388388cd5fc2Smrg dynamic_linker='NetBSD (a.out) ld.so' 388488cd5fc2Smrg else 388588cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 388688cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 388788cd5fc2Smrg dynamic_linker='NetBSD ld.elf_so' 388888cd5fc2Smrg fi 388988cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 389088cd5fc2Smrg shlibpath_overrides_runpath=yes 389188cd5fc2Smrg hardcode_into_libs=yes 389288cd5fc2Smrg ;; 389388cd5fc2Smrg 389488cd5fc2Smrgnewsos6) 389588cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 389688cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 389788cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 389888cd5fc2Smrg shlibpath_overrides_runpath=yes 389988cd5fc2Smrg ;; 390088cd5fc2Smrg 390188cd5fc2Smrg*nto* | *qnx*) 390288cd5fc2Smrg version_type=qnx 390388cd5fc2Smrg need_lib_prefix=no 390488cd5fc2Smrg need_version=no 390588cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 390688cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 390788cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 390888cd5fc2Smrg shlibpath_overrides_runpath=no 390988cd5fc2Smrg hardcode_into_libs=yes 391088cd5fc2Smrg dynamic_linker='ldqnx.so' 391188cd5fc2Smrg ;; 391288cd5fc2Smrg 391388cd5fc2Smrgopenbsd*) 391488cd5fc2Smrg version_type=sunos 391588cd5fc2Smrg sys_lib_dlsearch_path_spec="/usr/lib" 391688cd5fc2Smrg need_lib_prefix=no 391788cd5fc2Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 391888cd5fc2Smrg case $host_os in 391988cd5fc2Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 392088cd5fc2Smrg *) need_version=no ;; 392188cd5fc2Smrg esac 392288cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 392388cd5fc2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 392488cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 392588cd5fc2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 392688cd5fc2Smrg case $host_os in 392788cd5fc2Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 392888cd5fc2Smrg shlibpath_overrides_runpath=no 392988cd5fc2Smrg ;; 393088cd5fc2Smrg *) 393188cd5fc2Smrg shlibpath_overrides_runpath=yes 393288cd5fc2Smrg ;; 393388cd5fc2Smrg esac 393488cd5fc2Smrg else 393588cd5fc2Smrg shlibpath_overrides_runpath=yes 393688cd5fc2Smrg fi 393788cd5fc2Smrg ;; 393888cd5fc2Smrg 393988cd5fc2Smrgos2*) 394088cd5fc2Smrg libname_spec='$name' 394188cd5fc2Smrg shrext_cmds=".dll" 394288cd5fc2Smrg need_lib_prefix=no 394388cd5fc2Smrg library_names_spec='$libname${shared_ext} $libname.a' 394488cd5fc2Smrg dynamic_linker='OS/2 ld.exe' 394588cd5fc2Smrg shlibpath_var=LIBPATH 394688cd5fc2Smrg ;; 394788cd5fc2Smrg 394888cd5fc2Smrgosf3* | osf4* | osf5*) 394988cd5fc2Smrg version_type=osf 395088cd5fc2Smrg need_lib_prefix=no 395188cd5fc2Smrg need_version=no 395288cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 395388cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 395488cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 395588cd5fc2Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 395688cd5fc2Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 395788cd5fc2Smrg ;; 395888cd5fc2Smrg 395988cd5fc2Smrgrdos*) 396088cd5fc2Smrg dynamic_linker=no 396188cd5fc2Smrg ;; 396288cd5fc2Smrg 396388cd5fc2Smrgsolaris*) 396488cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 396588cd5fc2Smrg need_lib_prefix=no 396688cd5fc2Smrg need_version=no 396788cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 396888cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 396988cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 397088cd5fc2Smrg shlibpath_overrides_runpath=yes 397188cd5fc2Smrg hardcode_into_libs=yes 397288cd5fc2Smrg # ldd complains unless libraries are executable 397388cd5fc2Smrg postinstall_cmds='chmod +x $lib' 397488cd5fc2Smrg ;; 397588cd5fc2Smrg 397688cd5fc2Smrgsunos4*) 397788cd5fc2Smrg version_type=sunos 397888cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 397988cd5fc2Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 398088cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 398188cd5fc2Smrg shlibpath_overrides_runpath=yes 398288cd5fc2Smrg if test "$with_gnu_ld" = yes; then 398388cd5fc2Smrg need_lib_prefix=no 398488cd5fc2Smrg fi 398588cd5fc2Smrg need_version=yes 398688cd5fc2Smrg ;; 398788cd5fc2Smrg 398888cd5fc2Smrgsysv4 | sysv4.3*) 398988cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 399088cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 399188cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 399288cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 399388cd5fc2Smrg case $host_vendor in 399488cd5fc2Smrg sni) 399588cd5fc2Smrg shlibpath_overrides_runpath=no 399688cd5fc2Smrg need_lib_prefix=no 399788cd5fc2Smrg runpath_var=LD_RUN_PATH 399888cd5fc2Smrg ;; 399988cd5fc2Smrg siemens) 400088cd5fc2Smrg need_lib_prefix=no 400188cd5fc2Smrg ;; 400288cd5fc2Smrg motorola) 400388cd5fc2Smrg need_lib_prefix=no 400488cd5fc2Smrg need_version=no 400588cd5fc2Smrg shlibpath_overrides_runpath=no 400688cd5fc2Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 400788cd5fc2Smrg ;; 400888cd5fc2Smrg esac 400988cd5fc2Smrg ;; 401088cd5fc2Smrg 401188cd5fc2Smrgsysv4*MP*) 401288cd5fc2Smrg if test -d /usr/nec ;then 401388cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 401488cd5fc2Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 401588cd5fc2Smrg soname_spec='$libname${shared_ext}.$major' 401688cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 401788cd5fc2Smrg fi 401888cd5fc2Smrg ;; 401988cd5fc2Smrg 402088cd5fc2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 402188cd5fc2Smrg version_type=freebsd-elf 402288cd5fc2Smrg need_lib_prefix=no 402388cd5fc2Smrg need_version=no 402488cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 402588cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 402688cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 402788cd5fc2Smrg shlibpath_overrides_runpath=yes 402888cd5fc2Smrg hardcode_into_libs=yes 402988cd5fc2Smrg if test "$with_gnu_ld" = yes; then 403088cd5fc2Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 403188cd5fc2Smrg else 403288cd5fc2Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 403388cd5fc2Smrg case $host_os in 403488cd5fc2Smrg sco3.2v5*) 403588cd5fc2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 403688cd5fc2Smrg ;; 403788cd5fc2Smrg esac 403888cd5fc2Smrg fi 403988cd5fc2Smrg sys_lib_dlsearch_path_spec='/usr/lib' 404088cd5fc2Smrg ;; 404188cd5fc2Smrg 404288cd5fc2Smrgtpf*) 404388cd5fc2Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 404488cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 404588cd5fc2Smrg need_lib_prefix=no 404688cd5fc2Smrg need_version=no 404788cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 404888cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 404988cd5fc2Smrg shlibpath_overrides_runpath=no 405088cd5fc2Smrg hardcode_into_libs=yes 405188cd5fc2Smrg ;; 405288cd5fc2Smrg 405388cd5fc2Smrguts4*) 405488cd5fc2Smrg version_type=linux # correct to gnu/linux during the next big refactor 405588cd5fc2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 405688cd5fc2Smrg soname_spec='${libname}${release}${shared_ext}$major' 405788cd5fc2Smrg shlibpath_var=LD_LIBRARY_PATH 405888cd5fc2Smrg ;; 405988cd5fc2Smrg 406088cd5fc2Smrg*) 406188cd5fc2Smrg dynamic_linker=no 406288cd5fc2Smrg ;; 406388cd5fc2Smrgesac 406488cd5fc2SmrgAC_MSG_RESULT([$dynamic_linker]) 406588cd5fc2Smrgtest "$dynamic_linker" = no && can_build_shared=no 406688cd5fc2Smrg 406788cd5fc2Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 406888cd5fc2Smrgif test "$GCC" = yes; then 406988cd5fc2Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 407088cd5fc2Smrgfi 407188cd5fc2Smrg 407288cd5fc2Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 407388cd5fc2Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 407488cd5fc2Smrgfi 407588cd5fc2Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 407688cd5fc2Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 407788cd5fc2Smrgfi 407888cd5fc2Smrg 407988cd5fc2Smrg_LT_DECL([], [variables_saved_for_relink], [1], 408088cd5fc2Smrg [Variables whose values should be saved in libtool wrapper scripts and 408188cd5fc2Smrg restored at link time]) 408288cd5fc2Smrg_LT_DECL([], [need_lib_prefix], [0], 408388cd5fc2Smrg [Do we need the "lib" prefix for modules?]) 408488cd5fc2Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 408588cd5fc2Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 408688cd5fc2Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 408788cd5fc2Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 408888cd5fc2Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 408988cd5fc2Smrg [Is shlibpath searched before the hard-coded library search path?]) 409088cd5fc2Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 409188cd5fc2Smrg_LT_DECL([], [library_names_spec], [1], 409288cd5fc2Smrg [[List of archive names. First name is the real one, the rest are links. 409388cd5fc2Smrg The last name is the one that the linker finds with -lNAME]]) 409488cd5fc2Smrg_LT_DECL([], [soname_spec], [1], 409588cd5fc2Smrg [[The coded name of the library, if different from the real name]]) 409688cd5fc2Smrg_LT_DECL([], [install_override_mode], [1], 409788cd5fc2Smrg [Permission mode override for installation of shared libraries]) 409888cd5fc2Smrg_LT_DECL([], [postinstall_cmds], [2], 409988cd5fc2Smrg [Command to use after installation of a shared archive]) 410088cd5fc2Smrg_LT_DECL([], [postuninstall_cmds], [2], 410188cd5fc2Smrg [Command to use after uninstallation of a shared archive]) 410288cd5fc2Smrg_LT_DECL([], [finish_cmds], [2], 410388cd5fc2Smrg [Commands used to finish a libtool library installation in a directory]) 410488cd5fc2Smrg_LT_DECL([], [finish_eval], [1], 410588cd5fc2Smrg [[As "finish_cmds", except a single script fragment to be evaled but 410688cd5fc2Smrg not shown]]) 410788cd5fc2Smrg_LT_DECL([], [hardcode_into_libs], [0], 410888cd5fc2Smrg [Whether we should hardcode library paths into libraries]) 410988cd5fc2Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 411088cd5fc2Smrg [Compile-time system search path for libraries]) 411188cd5fc2Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 411288cd5fc2Smrg [Run-time system search path for libraries]) 411388cd5fc2Smrg])# _LT_SYS_DYNAMIC_LINKER 411488cd5fc2Smrg 411588cd5fc2Smrg 411688cd5fc2Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 411788cd5fc2Smrg# -------------------------- 411888cd5fc2Smrg# find a file program which can recognize shared library 411988cd5fc2SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 412088cd5fc2Smrg[m4_require([_LT_DECL_EGREP])dnl 412188cd5fc2SmrgAC_MSG_CHECKING([for $1]) 412288cd5fc2SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 412388cd5fc2Smrg[case $MAGIC_CMD in 412488cd5fc2Smrg[[\\/*] | ?:[\\/]*]) 412588cd5fc2Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 412688cd5fc2Smrg ;; 412788cd5fc2Smrg*) 412888cd5fc2Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 412988cd5fc2Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 413088cd5fc2Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 413188cd5fc2Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 413288cd5fc2Smrgdnl not every word. This closes a longstanding sh security hole. 413388cd5fc2Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 413488cd5fc2Smrg for ac_dir in $ac_dummy; do 413588cd5fc2Smrg IFS="$lt_save_ifs" 413688cd5fc2Smrg test -z "$ac_dir" && ac_dir=. 413788cd5fc2Smrg if test -f $ac_dir/$1; then 413888cd5fc2Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 413988cd5fc2Smrg if test -n "$file_magic_test_file"; then 414088cd5fc2Smrg case $deplibs_check_method in 414188cd5fc2Smrg "file_magic "*) 414288cd5fc2Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 414388cd5fc2Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 414488cd5fc2Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 414588cd5fc2Smrg $EGREP "$file_magic_regex" > /dev/null; then 414688cd5fc2Smrg : 414788cd5fc2Smrg else 414888cd5fc2Smrg cat <<_LT_EOF 1>&2 414988cd5fc2Smrg 415088cd5fc2Smrg*** Warning: the command libtool uses to detect shared libraries, 415188cd5fc2Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 415288cd5fc2Smrg*** The result is that libtool may fail to recognize shared libraries 415388cd5fc2Smrg*** as such. This will affect the creation of libtool libraries that 415488cd5fc2Smrg*** depend on shared libraries, but programs linked with such libtool 415588cd5fc2Smrg*** libraries will work regardless of this problem. Nevertheless, you 415688cd5fc2Smrg*** may want to report the problem to your system manager and/or to 415788cd5fc2Smrg*** bug-libtool@gnu.org 415888cd5fc2Smrg 415988cd5fc2Smrg_LT_EOF 416088cd5fc2Smrg fi ;; 416188cd5fc2Smrg esac 416288cd5fc2Smrg fi 416388cd5fc2Smrg break 416488cd5fc2Smrg fi 416588cd5fc2Smrg done 416688cd5fc2Smrg IFS="$lt_save_ifs" 416788cd5fc2Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 416888cd5fc2Smrg ;; 416988cd5fc2Smrgesac]) 417088cd5fc2SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 417188cd5fc2Smrgif test -n "$MAGIC_CMD"; then 417288cd5fc2Smrg AC_MSG_RESULT($MAGIC_CMD) 417388cd5fc2Smrgelse 417488cd5fc2Smrg AC_MSG_RESULT(no) 417588cd5fc2Smrgfi 417688cd5fc2Smrg_LT_DECL([], [MAGIC_CMD], [0], 417788cd5fc2Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 417888cd5fc2Smrg])# _LT_PATH_TOOL_PREFIX 417988cd5fc2Smrg 418088cd5fc2Smrg# Old name: 418188cd5fc2SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 418288cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 418388cd5fc2Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 418488cd5fc2Smrg 418588cd5fc2Smrg 418688cd5fc2Smrg# _LT_PATH_MAGIC 418788cd5fc2Smrg# -------------- 418888cd5fc2Smrg# find a file program which can recognize a shared library 418988cd5fc2Smrgm4_defun([_LT_PATH_MAGIC], 419088cd5fc2Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 419188cd5fc2Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 419288cd5fc2Smrg if test -n "$ac_tool_prefix"; then 419388cd5fc2Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 419488cd5fc2Smrg else 419588cd5fc2Smrg MAGIC_CMD=: 419688cd5fc2Smrg fi 419788cd5fc2Smrgfi 419888cd5fc2Smrg])# _LT_PATH_MAGIC 419988cd5fc2Smrg 420088cd5fc2Smrg 420188cd5fc2Smrg# LT_PATH_LD 420288cd5fc2Smrg# ---------- 420388cd5fc2Smrg# find the pathname to the GNU or non-GNU linker 420488cd5fc2SmrgAC_DEFUN([LT_PATH_LD], 420588cd5fc2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 420688cd5fc2SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 420788cd5fc2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 420888cd5fc2Smrgm4_require([_LT_DECL_SED])dnl 420988cd5fc2Smrgm4_require([_LT_DECL_EGREP])dnl 421088cd5fc2Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 421188cd5fc2Smrg 421288cd5fc2SmrgAC_ARG_WITH([gnu-ld], 421388cd5fc2Smrg [AS_HELP_STRING([--with-gnu-ld], 421488cd5fc2Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 421588cd5fc2Smrg [test "$withval" = no || with_gnu_ld=yes], 421688cd5fc2Smrg [with_gnu_ld=no])dnl 421788cd5fc2Smrg 421888cd5fc2Smrgac_prog=ld 421988cd5fc2Smrgif test "$GCC" = yes; then 422088cd5fc2Smrg # Check if gcc -print-prog-name=ld gives a path. 422188cd5fc2Smrg AC_MSG_CHECKING([for ld used by $CC]) 422288cd5fc2Smrg case $host in 422388cd5fc2Smrg *-*-mingw*) 422488cd5fc2Smrg # gcc leaves a trailing carriage return which upsets mingw 422588cd5fc2Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 422688cd5fc2Smrg *) 422788cd5fc2Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 422888cd5fc2Smrg esac 422988cd5fc2Smrg case $ac_prog in 423088cd5fc2Smrg # Accept absolute paths. 423188cd5fc2Smrg [[\\/]]* | ?:[[\\/]]*) 423288cd5fc2Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 423388cd5fc2Smrg # Canonicalize the pathname of ld 423488cd5fc2Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 423588cd5fc2Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 423688cd5fc2Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 423788cd5fc2Smrg done 423888cd5fc2Smrg test -z "$LD" && LD="$ac_prog" 423988cd5fc2Smrg ;; 424088cd5fc2Smrg "") 424188cd5fc2Smrg # If it fails, then pretend we aren't using GCC. 424288cd5fc2Smrg ac_prog=ld 424388cd5fc2Smrg ;; 424488cd5fc2Smrg *) 424588cd5fc2Smrg # If it is relative, then search for the first ld in PATH. 424688cd5fc2Smrg with_gnu_ld=unknown 424788cd5fc2Smrg ;; 424888cd5fc2Smrg esac 424988cd5fc2Smrgelif test "$with_gnu_ld" = yes; then 425088cd5fc2Smrg AC_MSG_CHECKING([for GNU ld]) 425188cd5fc2Smrgelse 425288cd5fc2Smrg AC_MSG_CHECKING([for non-GNU ld]) 425388cd5fc2Smrgfi 425488cd5fc2SmrgAC_CACHE_VAL(lt_cv_path_LD, 425588cd5fc2Smrg[if test -z "$LD"; then 425688cd5fc2Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 425788cd5fc2Smrg for ac_dir in $PATH; do 425888cd5fc2Smrg IFS="$lt_save_ifs" 425988cd5fc2Smrg test -z "$ac_dir" && ac_dir=. 426088cd5fc2Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 426188cd5fc2Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 426288cd5fc2Smrg # Check to see if the program is GNU ld. I'd rather use --version, 426388cd5fc2Smrg # but apparently some variants of GNU ld only accept -v. 426488cd5fc2Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 426588cd5fc2Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 426688cd5fc2Smrg *GNU* | *'with BFD'*) 426788cd5fc2Smrg test "$with_gnu_ld" != no && break 426888cd5fc2Smrg ;; 426988cd5fc2Smrg *) 427088cd5fc2Smrg test "$with_gnu_ld" != yes && break 427188cd5fc2Smrg ;; 427288cd5fc2Smrg esac 427388cd5fc2Smrg fi 427488cd5fc2Smrg done 427588cd5fc2Smrg IFS="$lt_save_ifs" 427688cd5fc2Smrgelse 427788cd5fc2Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 427888cd5fc2Smrgfi]) 427988cd5fc2SmrgLD="$lt_cv_path_LD" 428088cd5fc2Smrgif test -n "$LD"; then 428188cd5fc2Smrg AC_MSG_RESULT($LD) 428288cd5fc2Smrgelse 428388cd5fc2Smrg AC_MSG_RESULT(no) 428488cd5fc2Smrgfi 428588cd5fc2Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 428688cd5fc2Smrg_LT_PATH_LD_GNU 428788cd5fc2SmrgAC_SUBST([LD]) 428888cd5fc2Smrg 428988cd5fc2Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 429088cd5fc2Smrg])# LT_PATH_LD 429188cd5fc2Smrg 429288cd5fc2Smrg# Old names: 429388cd5fc2SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 429488cd5fc2SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 429588cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 429688cd5fc2Smrgdnl AC_DEFUN([AM_PROG_LD], []) 429788cd5fc2Smrgdnl AC_DEFUN([AC_PROG_LD], []) 429888cd5fc2Smrg 429988cd5fc2Smrg 430088cd5fc2Smrg# _LT_PATH_LD_GNU 430188cd5fc2Smrg#- -------------- 430288cd5fc2Smrgm4_defun([_LT_PATH_LD_GNU], 430388cd5fc2Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 430488cd5fc2Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 430588cd5fc2Smrgcase `$LD -v 2>&1 </dev/null` in 430688cd5fc2Smrg*GNU* | *'with BFD'*) 430788cd5fc2Smrg lt_cv_prog_gnu_ld=yes 430888cd5fc2Smrg ;; 430988cd5fc2Smrg*) 431088cd5fc2Smrg lt_cv_prog_gnu_ld=no 431188cd5fc2Smrg ;; 431288cd5fc2Smrgesac]) 431388cd5fc2Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 431488cd5fc2Smrg])# _LT_PATH_LD_GNU 431588cd5fc2Smrg 431688cd5fc2Smrg 431788cd5fc2Smrg# _LT_CMD_RELOAD 431888cd5fc2Smrg# -------------- 431988cd5fc2Smrg# find reload flag for linker 432088cd5fc2Smrg# -- PORTME Some linkers may need a different reload flag. 432188cd5fc2Smrgm4_defun([_LT_CMD_RELOAD], 432288cd5fc2Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 432388cd5fc2Smrg lt_cv_ld_reload_flag, 432488cd5fc2Smrg [lt_cv_ld_reload_flag='-r']) 432588cd5fc2Smrgreload_flag=$lt_cv_ld_reload_flag 432688cd5fc2Smrgcase $reload_flag in 432788cd5fc2Smrg"" | " "*) ;; 432888cd5fc2Smrg*) reload_flag=" $reload_flag" ;; 432988cd5fc2Smrgesac 433088cd5fc2Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 433188cd5fc2Smrgcase $host_os in 433288cd5fc2Smrg cygwin* | mingw* | pw32* | cegcc*) 433388cd5fc2Smrg if test "$GCC" != yes; then 433488cd5fc2Smrg reload_cmds=false 433588cd5fc2Smrg fi 433688cd5fc2Smrg ;; 433788cd5fc2Smrg darwin*) 433888cd5fc2Smrg if test "$GCC" = yes; then 433988cd5fc2Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 434088cd5fc2Smrg else 434188cd5fc2Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 434288cd5fc2Smrg fi 434388cd5fc2Smrg ;; 434488cd5fc2Smrgesac 434588cd5fc2Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 434688cd5fc2Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 434788cd5fc2Smrg])# _LT_CMD_RELOAD 434888cd5fc2Smrg 434988cd5fc2Smrg 435088cd5fc2Smrg# _LT_CHECK_MAGIC_METHOD 435188cd5fc2Smrg# ---------------------- 435288cd5fc2Smrg# how to check for library dependencies 435388cd5fc2Smrg# -- PORTME fill in with the dynamic library characteristics 435488cd5fc2Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 435588cd5fc2Smrg[m4_require([_LT_DECL_EGREP]) 435688cd5fc2Smrgm4_require([_LT_DECL_OBJDUMP]) 435788cd5fc2SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 435888cd5fc2Smrglt_cv_deplibs_check_method, 435988cd5fc2Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 436088cd5fc2Smrglt_cv_file_magic_test_file= 436188cd5fc2Smrglt_cv_deplibs_check_method='unknown' 436288cd5fc2Smrg# Need to set the preceding variable on all platforms that support 436388cd5fc2Smrg# interlibrary dependencies. 436488cd5fc2Smrg# 'none' -- dependencies not supported. 436588cd5fc2Smrg# `unknown' -- same as none, but documents that we really don't know. 436688cd5fc2Smrg# 'pass_all' -- all dependencies passed with no checks. 436788cd5fc2Smrg# 'test_compile' -- check by making test program. 436888cd5fc2Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 436988cd5fc2Smrg# which responds to the $file_magic_cmd with a given extended regex. 437088cd5fc2Smrg# If you have `file' or equivalent on your system and you're not sure 437188cd5fc2Smrg# whether `pass_all' will *always* work, you probably want this one. 437288cd5fc2Smrg 437388cd5fc2Smrgcase $host_os in 437488cd5fc2Smrgaix[[4-9]]*) 437588cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 437688cd5fc2Smrg ;; 437788cd5fc2Smrg 437888cd5fc2Smrgbeos*) 437988cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 438088cd5fc2Smrg ;; 438188cd5fc2Smrg 438288cd5fc2Smrgbsdi[[45]]*) 438388cd5fc2Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 438488cd5fc2Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 438588cd5fc2Smrg lt_cv_file_magic_test_file=/shlib/libc.so 438688cd5fc2Smrg ;; 438788cd5fc2Smrg 438888cd5fc2Smrgcygwin*) 438988cd5fc2Smrg # func_win32_libid is a shell function defined in ltmain.sh 439088cd5fc2Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 439188cd5fc2Smrg lt_cv_file_magic_cmd='func_win32_libid' 439288cd5fc2Smrg ;; 439388cd5fc2Smrg 439488cd5fc2Smrgmingw* | pw32*) 439588cd5fc2Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 439688cd5fc2Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 439788cd5fc2Smrg # unless we find 'file', for example because we are cross-compiling. 439888cd5fc2Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 439988cd5fc2Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 440088cd5fc2Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 440188cd5fc2Smrg lt_cv_file_magic_cmd='func_win32_libid' 440288cd5fc2Smrg else 440388cd5fc2Smrg # Keep this pattern in sync with the one in func_win32_libid. 440488cd5fc2Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 440588cd5fc2Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 440688cd5fc2Smrg fi 440788cd5fc2Smrg ;; 440888cd5fc2Smrg 440988cd5fc2Smrgcegcc*) 441088cd5fc2Smrg # use the weaker test based on 'objdump'. See mingw*. 441188cd5fc2Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 441288cd5fc2Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 441388cd5fc2Smrg ;; 441488cd5fc2Smrg 441588cd5fc2Smrgdarwin* | rhapsody*) 441688cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 441788cd5fc2Smrg ;; 441888cd5fc2Smrg 441988cd5fc2Smrgfreebsd* | dragonfly*) 442088cd5fc2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 442188cd5fc2Smrg case $host_cpu in 442288cd5fc2Smrg i*86 ) 442388cd5fc2Smrg # Not sure whether the presence of OpenBSD here was a mistake. 442488cd5fc2Smrg # Let's accept both of them until this is cleared up. 442588cd5fc2Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 442688cd5fc2Smrg lt_cv_file_magic_cmd=/usr/bin/file 442788cd5fc2Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 442888cd5fc2Smrg ;; 442988cd5fc2Smrg esac 443088cd5fc2Smrg else 443188cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 443288cd5fc2Smrg fi 443388cd5fc2Smrg ;; 443488cd5fc2Smrg 443588cd5fc2Smrggnu*) 443688cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 443788cd5fc2Smrg ;; 443888cd5fc2Smrg 443988cd5fc2Smrghaiku*) 444088cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 444188cd5fc2Smrg ;; 444288cd5fc2Smrg 444388cd5fc2Smrghpux10.20* | hpux11*) 444488cd5fc2Smrg lt_cv_file_magic_cmd=/usr/bin/file 444588cd5fc2Smrg case $host_cpu in 444688cd5fc2Smrg ia64*) 444788cd5fc2Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 444888cd5fc2Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 444988cd5fc2Smrg ;; 445088cd5fc2Smrg hppa*64*) 445188cd5fc2Smrg [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]'] 445288cd5fc2Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 445388cd5fc2Smrg ;; 445488cd5fc2Smrg *) 445588cd5fc2Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 445688cd5fc2Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 445788cd5fc2Smrg ;; 445888cd5fc2Smrg esac 445988cd5fc2Smrg ;; 446088cd5fc2Smrg 446188cd5fc2Smrginterix[[3-9]]*) 446288cd5fc2Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 446388cd5fc2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 446488cd5fc2Smrg ;; 446588cd5fc2Smrg 446688cd5fc2Smrgirix5* | irix6* | nonstopux*) 446788cd5fc2Smrg case $LD in 446888cd5fc2Smrg *-32|*"-32 ") libmagic=32-bit;; 446988cd5fc2Smrg *-n32|*"-n32 ") libmagic=N32;; 447088cd5fc2Smrg *-64|*"-64 ") libmagic=64-bit;; 447188cd5fc2Smrg *) libmagic=never-match;; 447288cd5fc2Smrg esac 447388cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 447488cd5fc2Smrg ;; 447588cd5fc2Smrg 447688cd5fc2Smrg# This must be glibc/ELF. 447788cd5fc2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 447888cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 447988cd5fc2Smrg ;; 448088cd5fc2Smrg 448188cd5fc2Smrgnetbsd* | netbsdelf*-gnu) 448288cd5fc2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 448388cd5fc2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 448488cd5fc2Smrg else 448588cd5fc2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 448688cd5fc2Smrg fi 448788cd5fc2Smrg ;; 448888cd5fc2Smrg 448988cd5fc2Smrgnewos6*) 449088cd5fc2Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 449188cd5fc2Smrg lt_cv_file_magic_cmd=/usr/bin/file 449288cd5fc2Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 449388cd5fc2Smrg ;; 449488cd5fc2Smrg 449588cd5fc2Smrg*nto* | *qnx*) 449688cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 449788cd5fc2Smrg ;; 449888cd5fc2Smrg 449988cd5fc2Smrgopenbsd*) 450088cd5fc2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 450188cd5fc2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 450288cd5fc2Smrg else 450388cd5fc2Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 450488cd5fc2Smrg fi 450588cd5fc2Smrg ;; 450688cd5fc2Smrg 450788cd5fc2Smrgosf3* | osf4* | osf5*) 450888cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 450988cd5fc2Smrg ;; 451088cd5fc2Smrg 451188cd5fc2Smrgrdos*) 451288cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 451388cd5fc2Smrg ;; 451488cd5fc2Smrg 451588cd5fc2Smrgsolaris*) 451688cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 451788cd5fc2Smrg ;; 451888cd5fc2Smrg 451988cd5fc2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 452088cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 452188cd5fc2Smrg ;; 452288cd5fc2Smrg 452388cd5fc2Smrgsysv4 | sysv4.3*) 452488cd5fc2Smrg case $host_vendor in 452588cd5fc2Smrg motorola) 452688cd5fc2Smrg 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]]' 452788cd5fc2Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 452888cd5fc2Smrg ;; 452988cd5fc2Smrg ncr) 453088cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 453188cd5fc2Smrg ;; 453288cd5fc2Smrg sequent) 453388cd5fc2Smrg lt_cv_file_magic_cmd='/bin/file' 453488cd5fc2Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 453588cd5fc2Smrg ;; 453688cd5fc2Smrg sni) 453788cd5fc2Smrg lt_cv_file_magic_cmd='/bin/file' 453888cd5fc2Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 453988cd5fc2Smrg lt_cv_file_magic_test_file=/lib/libc.so 454088cd5fc2Smrg ;; 454188cd5fc2Smrg siemens) 454288cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 454388cd5fc2Smrg ;; 454488cd5fc2Smrg pc) 454588cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 454688cd5fc2Smrg ;; 454788cd5fc2Smrg esac 454888cd5fc2Smrg ;; 454988cd5fc2Smrg 455088cd5fc2Smrgtpf*) 455188cd5fc2Smrg lt_cv_deplibs_check_method=pass_all 455288cd5fc2Smrg ;; 455388cd5fc2Smrgesac 455488cd5fc2Smrg]) 455588cd5fc2Smrg 455688cd5fc2Smrgfile_magic_glob= 455788cd5fc2Smrgwant_nocaseglob=no 455888cd5fc2Smrgif test "$build" = "$host"; then 455988cd5fc2Smrg case $host_os in 456088cd5fc2Smrg mingw* | pw32*) 456188cd5fc2Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 456288cd5fc2Smrg want_nocaseglob=yes 456388cd5fc2Smrg else 456488cd5fc2Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 456588cd5fc2Smrg fi 456688cd5fc2Smrg ;; 456788cd5fc2Smrg esac 456888cd5fc2Smrgfi 456988cd5fc2Smrg 457088cd5fc2Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 457188cd5fc2Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 457288cd5fc2Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 457388cd5fc2Smrg 457488cd5fc2Smrg_LT_DECL([], [deplibs_check_method], [1], 457588cd5fc2Smrg [Method to check whether dependent libraries are shared objects]) 457688cd5fc2Smrg_LT_DECL([], [file_magic_cmd], [1], 457788cd5fc2Smrg [Command to use when deplibs_check_method = "file_magic"]) 457888cd5fc2Smrg_LT_DECL([], [file_magic_glob], [1], 457988cd5fc2Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 458088cd5fc2Smrg_LT_DECL([], [want_nocaseglob], [1], 458188cd5fc2Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 458288cd5fc2Smrg])# _LT_CHECK_MAGIC_METHOD 458388cd5fc2Smrg 458488cd5fc2Smrg 458588cd5fc2Smrg# LT_PATH_NM 458688cd5fc2Smrg# ---------- 458788cd5fc2Smrg# find the pathname to a BSD- or MS-compatible name lister 458888cd5fc2SmrgAC_DEFUN([LT_PATH_NM], 458988cd5fc2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 459088cd5fc2SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 459188cd5fc2Smrg[if test -n "$NM"; then 459288cd5fc2Smrg # Let the user override the test. 459388cd5fc2Smrg lt_cv_path_NM="$NM" 459488cd5fc2Smrgelse 459588cd5fc2Smrg lt_nm_to_check="${ac_tool_prefix}nm" 459688cd5fc2Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 459788cd5fc2Smrg lt_nm_to_check="$lt_nm_to_check nm" 459888cd5fc2Smrg fi 459988cd5fc2Smrg for lt_tmp_nm in $lt_nm_to_check; do 460088cd5fc2Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 460188cd5fc2Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 460288cd5fc2Smrg IFS="$lt_save_ifs" 460388cd5fc2Smrg test -z "$ac_dir" && ac_dir=. 460488cd5fc2Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 460588cd5fc2Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 460688cd5fc2Smrg # Check to see if the nm accepts a BSD-compat flag. 460788cd5fc2Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 460888cd5fc2Smrg # nm: unknown option "B" ignored 460988cd5fc2Smrg # Tru64's nm complains that /dev/null is an invalid object file 461088cd5fc2Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 461188cd5fc2Smrg */dev/null* | *'Invalid file or object type'*) 461288cd5fc2Smrg lt_cv_path_NM="$tmp_nm -B" 461388cd5fc2Smrg break 461488cd5fc2Smrg ;; 461588cd5fc2Smrg *) 461688cd5fc2Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 461788cd5fc2Smrg */dev/null*) 461888cd5fc2Smrg lt_cv_path_NM="$tmp_nm -p" 461988cd5fc2Smrg break 462088cd5fc2Smrg ;; 462188cd5fc2Smrg *) 462288cd5fc2Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 462388cd5fc2Smrg continue # so that we can try to find one that supports BSD flags 462488cd5fc2Smrg ;; 462588cd5fc2Smrg esac 462688cd5fc2Smrg ;; 462788cd5fc2Smrg esac 462888cd5fc2Smrg fi 462988cd5fc2Smrg done 463088cd5fc2Smrg IFS="$lt_save_ifs" 463188cd5fc2Smrg done 463288cd5fc2Smrg : ${lt_cv_path_NM=no} 463388cd5fc2Smrgfi]) 463488cd5fc2Smrgif test "$lt_cv_path_NM" != "no"; then 463588cd5fc2Smrg NM="$lt_cv_path_NM" 463688cd5fc2Smrgelse 463788cd5fc2Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 463888cd5fc2Smrg if test -n "$DUMPBIN"; then : 463988cd5fc2Smrg # Let the user override the test. 464088cd5fc2Smrg else 464188cd5fc2Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 464288cd5fc2Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 464388cd5fc2Smrg *COFF*) 464488cd5fc2Smrg DUMPBIN="$DUMPBIN -symbols" 464588cd5fc2Smrg ;; 464688cd5fc2Smrg *) 464788cd5fc2Smrg DUMPBIN=: 464888cd5fc2Smrg ;; 464988cd5fc2Smrg esac 465088cd5fc2Smrg fi 465188cd5fc2Smrg AC_SUBST([DUMPBIN]) 465288cd5fc2Smrg if test "$DUMPBIN" != ":"; then 465388cd5fc2Smrg NM="$DUMPBIN" 465488cd5fc2Smrg fi 465588cd5fc2Smrgfi 465688cd5fc2Smrgtest -z "$NM" && NM=nm 465788cd5fc2SmrgAC_SUBST([NM]) 465888cd5fc2Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 465988cd5fc2Smrg 466088cd5fc2SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 466188cd5fc2Smrg [lt_cv_nm_interface="BSD nm" 466288cd5fc2Smrg echo "int some_variable = 0;" > conftest.$ac_ext 466388cd5fc2Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 466488cd5fc2Smrg (eval "$ac_compile" 2>conftest.err) 466588cd5fc2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 466688cd5fc2Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 466788cd5fc2Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 466888cd5fc2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 466988cd5fc2Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 467088cd5fc2Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 467188cd5fc2Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 467288cd5fc2Smrg lt_cv_nm_interface="MS dumpbin" 467388cd5fc2Smrg fi 467488cd5fc2Smrg rm -f conftest*]) 467588cd5fc2Smrg])# LT_PATH_NM 467688cd5fc2Smrg 467788cd5fc2Smrg# Old names: 467888cd5fc2SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 467988cd5fc2SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 468088cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 468188cd5fc2Smrgdnl AC_DEFUN([AM_PROG_NM], []) 468288cd5fc2Smrgdnl AC_DEFUN([AC_PROG_NM], []) 468388cd5fc2Smrg 468488cd5fc2Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 468588cd5fc2Smrg# -------------------------------- 468688cd5fc2Smrg# how to determine the name of the shared library 468788cd5fc2Smrg# associated with a specific link library. 468888cd5fc2Smrg# -- PORTME fill in with the dynamic library characteristics 468988cd5fc2Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 469088cd5fc2Smrg[m4_require([_LT_DECL_EGREP]) 469188cd5fc2Smrgm4_require([_LT_DECL_OBJDUMP]) 469288cd5fc2Smrgm4_require([_LT_DECL_DLLTOOL]) 469388cd5fc2SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 469488cd5fc2Smrglt_cv_sharedlib_from_linklib_cmd, 469588cd5fc2Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 469688cd5fc2Smrg 469788cd5fc2Smrgcase $host_os in 469888cd5fc2Smrgcygwin* | mingw* | pw32* | cegcc*) 469988cd5fc2Smrg # two different shell functions defined in ltmain.sh 470088cd5fc2Smrg # decide which to use based on capabilities of $DLLTOOL 470188cd5fc2Smrg case `$DLLTOOL --help 2>&1` in 470288cd5fc2Smrg *--identify-strict*) 470388cd5fc2Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 470488cd5fc2Smrg ;; 470588cd5fc2Smrg *) 470688cd5fc2Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 470788cd5fc2Smrg ;; 470888cd5fc2Smrg esac 470988cd5fc2Smrg ;; 471088cd5fc2Smrg*) 471188cd5fc2Smrg # fallback: assume linklib IS sharedlib 471288cd5fc2Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 471388cd5fc2Smrg ;; 471488cd5fc2Smrgesac 471588cd5fc2Smrg]) 471688cd5fc2Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 471788cd5fc2Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 471888cd5fc2Smrg 471988cd5fc2Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 472088cd5fc2Smrg [Command to associate shared and link libraries]) 472188cd5fc2Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 472288cd5fc2Smrg 472388cd5fc2Smrg 472488cd5fc2Smrg# _LT_PATH_MANIFEST_TOOL 472588cd5fc2Smrg# ---------------------- 472688cd5fc2Smrg# locate the manifest tool 472788cd5fc2Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 472888cd5fc2Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 472988cd5fc2Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 473088cd5fc2SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 473188cd5fc2Smrg [lt_cv_path_mainfest_tool=no 473288cd5fc2Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 473388cd5fc2Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 473488cd5fc2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 473588cd5fc2Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 473688cd5fc2Smrg lt_cv_path_mainfest_tool=yes 473788cd5fc2Smrg fi 473888cd5fc2Smrg rm -f conftest*]) 473988cd5fc2Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 474088cd5fc2Smrg MANIFEST_TOOL=: 474188cd5fc2Smrgfi 474288cd5fc2Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 474388cd5fc2Smrg])# _LT_PATH_MANIFEST_TOOL 474488cd5fc2Smrg 474588cd5fc2Smrg 474688cd5fc2Smrg# LT_LIB_M 474788cd5fc2Smrg# -------- 474888cd5fc2Smrg# check for math library 474988cd5fc2SmrgAC_DEFUN([LT_LIB_M], 475088cd5fc2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 475188cd5fc2SmrgLIBM= 475288cd5fc2Smrgcase $host in 475388cd5fc2Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 475488cd5fc2Smrg # These system don't have libm, or don't need it 475588cd5fc2Smrg ;; 475688cd5fc2Smrg*-ncr-sysv4.3*) 475788cd5fc2Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 475888cd5fc2Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 475988cd5fc2Smrg ;; 476088cd5fc2Smrg*) 476188cd5fc2Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 476288cd5fc2Smrg ;; 476388cd5fc2Smrgesac 476488cd5fc2SmrgAC_SUBST([LIBM]) 476588cd5fc2Smrg])# LT_LIB_M 476688cd5fc2Smrg 476788cd5fc2Smrg# Old name: 476888cd5fc2SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 476988cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 477088cd5fc2Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 477188cd5fc2Smrg 477288cd5fc2Smrg 477388cd5fc2Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 477488cd5fc2Smrg# ------------------------------- 477588cd5fc2Smrgm4_defun([_LT_COMPILER_NO_RTTI], 477688cd5fc2Smrg[m4_require([_LT_TAG_COMPILER])dnl 477788cd5fc2Smrg 477888cd5fc2Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 477988cd5fc2Smrg 478088cd5fc2Smrgif test "$GCC" = yes; then 478188cd5fc2Smrg case $cc_basename in 478288cd5fc2Smrg nvcc*) 478388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 478488cd5fc2Smrg *) 478588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 478688cd5fc2Smrg esac 478788cd5fc2Smrg 478888cd5fc2Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 478988cd5fc2Smrg lt_cv_prog_compiler_rtti_exceptions, 479088cd5fc2Smrg [-fno-rtti -fno-exceptions], [], 479188cd5fc2Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 479288cd5fc2Smrgfi 479388cd5fc2Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 479488cd5fc2Smrg [Compiler flag to turn off builtin functions]) 479588cd5fc2Smrg])# _LT_COMPILER_NO_RTTI 479688cd5fc2Smrg 479788cd5fc2Smrg 479888cd5fc2Smrg# _LT_CMD_GLOBAL_SYMBOLS 479988cd5fc2Smrg# ---------------------- 480088cd5fc2Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 480188cd5fc2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 480288cd5fc2SmrgAC_REQUIRE([AC_PROG_CC])dnl 480388cd5fc2SmrgAC_REQUIRE([AC_PROG_AWK])dnl 480488cd5fc2SmrgAC_REQUIRE([LT_PATH_NM])dnl 480588cd5fc2SmrgAC_REQUIRE([LT_PATH_LD])dnl 480688cd5fc2Smrgm4_require([_LT_DECL_SED])dnl 480788cd5fc2Smrgm4_require([_LT_DECL_EGREP])dnl 480888cd5fc2Smrgm4_require([_LT_TAG_COMPILER])dnl 480988cd5fc2Smrg 481088cd5fc2Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 481188cd5fc2SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 481288cd5fc2SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 481388cd5fc2Smrg[ 481488cd5fc2Smrg# These are sane defaults that work on at least a few old systems. 481588cd5fc2Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 481688cd5fc2Smrg 481788cd5fc2Smrg# Character class describing NM global symbol codes. 481888cd5fc2Smrgsymcode='[[BCDEGRST]]' 481988cd5fc2Smrg 482088cd5fc2Smrg# Regexp to match symbols that can be accessed directly from C. 482188cd5fc2Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 482288cd5fc2Smrg 482388cd5fc2Smrg# Define system-specific variables. 482488cd5fc2Smrgcase $host_os in 482588cd5fc2Smrgaix*) 482688cd5fc2Smrg symcode='[[BCDT]]' 482788cd5fc2Smrg ;; 482888cd5fc2Smrgcygwin* | mingw* | pw32* | cegcc*) 482988cd5fc2Smrg symcode='[[ABCDGISTW]]' 483088cd5fc2Smrg ;; 483188cd5fc2Smrghpux*) 483288cd5fc2Smrg if test "$host_cpu" = ia64; then 483388cd5fc2Smrg symcode='[[ABCDEGRST]]' 483488cd5fc2Smrg fi 483588cd5fc2Smrg ;; 483688cd5fc2Smrgirix* | nonstopux*) 483788cd5fc2Smrg symcode='[[BCDEGRST]]' 483888cd5fc2Smrg ;; 483988cd5fc2Smrgosf*) 484088cd5fc2Smrg symcode='[[BCDEGQRST]]' 484188cd5fc2Smrg ;; 484288cd5fc2Smrgsolaris*) 484388cd5fc2Smrg symcode='[[BDRT]]' 484488cd5fc2Smrg ;; 484588cd5fc2Smrgsco3.2v5*) 484688cd5fc2Smrg symcode='[[DT]]' 484788cd5fc2Smrg ;; 484888cd5fc2Smrgsysv4.2uw2*) 484988cd5fc2Smrg symcode='[[DT]]' 485088cd5fc2Smrg ;; 485188cd5fc2Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 485288cd5fc2Smrg symcode='[[ABDT]]' 485388cd5fc2Smrg ;; 485488cd5fc2Smrgsysv4) 485588cd5fc2Smrg symcode='[[DFNSTU]]' 485688cd5fc2Smrg ;; 485788cd5fc2Smrgesac 485888cd5fc2Smrg 485988cd5fc2Smrg# If we're using GNU nm, then use its standard symbol codes. 486088cd5fc2Smrgcase `$NM -V 2>&1` in 486188cd5fc2Smrg*GNU* | *'with BFD'*) 486288cd5fc2Smrg symcode='[[ABCDGIRSTW]]' ;; 486388cd5fc2Smrgesac 486488cd5fc2Smrg 486588cd5fc2Smrg# Transform an extracted symbol line into a proper C declaration. 486688cd5fc2Smrg# Some systems (esp. on ia64) link data and code symbols differently, 486788cd5fc2Smrg# so use this general approach. 486888cd5fc2Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 486988cd5fc2Smrg 487088cd5fc2Smrg# Transform an extracted symbol line into symbol name and symbol address 487188cd5fc2Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 487288cd5fc2Smrglt_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'" 487388cd5fc2Smrg 487488cd5fc2Smrg# Handle CRLF in mingw tool chain 487588cd5fc2Smrgopt_cr= 487688cd5fc2Smrgcase $build_os in 487788cd5fc2Smrgmingw*) 487888cd5fc2Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 487988cd5fc2Smrg ;; 488088cd5fc2Smrgesac 488188cd5fc2Smrg 488288cd5fc2Smrg# Try without a prefix underscore, then with it. 488388cd5fc2Smrgfor ac_symprfx in "" "_"; do 488488cd5fc2Smrg 488588cd5fc2Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 488688cd5fc2Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 488788cd5fc2Smrg 488888cd5fc2Smrg # Write the raw and C identifiers. 488988cd5fc2Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 489088cd5fc2Smrg # Fake it for dumpbin and say T for any non-static function 489188cd5fc2Smrg # and D for any global variable. 489288cd5fc2Smrg # Also find C++ and __fastcall symbols from MSVC++, 489388cd5fc2Smrg # which start with @ or ?. 489488cd5fc2Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 489588cd5fc2Smrg" {last_section=section; section=\$ 3};"\ 489688cd5fc2Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 489788cd5fc2Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 489888cd5fc2Smrg" \$ 0!~/External *\|/{next};"\ 489988cd5fc2Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 490088cd5fc2Smrg" {if(hide[section]) next};"\ 490188cd5fc2Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 490288cd5fc2Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 490388cd5fc2Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 490488cd5fc2Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 490588cd5fc2Smrg" ' prfx=^$ac_symprfx]" 490688cd5fc2Smrg else 490788cd5fc2Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 490888cd5fc2Smrg fi 490988cd5fc2Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 491088cd5fc2Smrg 491188cd5fc2Smrg # Check to see that the pipe works correctly. 491288cd5fc2Smrg pipe_works=no 491388cd5fc2Smrg 491488cd5fc2Smrg rm -f conftest* 491588cd5fc2Smrg cat > conftest.$ac_ext <<_LT_EOF 491688cd5fc2Smrg#ifdef __cplusplus 491788cd5fc2Smrgextern "C" { 491888cd5fc2Smrg#endif 491988cd5fc2Smrgchar nm_test_var; 492088cd5fc2Smrgvoid nm_test_func(void); 492188cd5fc2Smrgvoid nm_test_func(void){} 492288cd5fc2Smrg#ifdef __cplusplus 492388cd5fc2Smrg} 492488cd5fc2Smrg#endif 492588cd5fc2Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 492688cd5fc2Smrg_LT_EOF 492788cd5fc2Smrg 492888cd5fc2Smrg if AC_TRY_EVAL(ac_compile); then 492988cd5fc2Smrg # Now try to grab the symbols. 493088cd5fc2Smrg nlist=conftest.nm 493188cd5fc2Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 493288cd5fc2Smrg # Try sorting and uniquifying the output. 493388cd5fc2Smrg if sort "$nlist" | uniq > "$nlist"T; then 493488cd5fc2Smrg mv -f "$nlist"T "$nlist" 493588cd5fc2Smrg else 493688cd5fc2Smrg rm -f "$nlist"T 493788cd5fc2Smrg fi 493888cd5fc2Smrg 493988cd5fc2Smrg # Make sure that we snagged all the symbols we need. 494088cd5fc2Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 494188cd5fc2Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 494288cd5fc2Smrg cat <<_LT_EOF > conftest.$ac_ext 494388cd5fc2Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 494488cd5fc2Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 494588cd5fc2Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 494688cd5fc2Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 494788cd5fc2Smrg# define LT@&t@_DLSYM_CONST 494888cd5fc2Smrg#elif defined(__osf__) 494988cd5fc2Smrg/* This system does not cope well with relocations in const data. */ 495088cd5fc2Smrg# define LT@&t@_DLSYM_CONST 495188cd5fc2Smrg#else 495288cd5fc2Smrg# define LT@&t@_DLSYM_CONST const 495388cd5fc2Smrg#endif 495488cd5fc2Smrg 495588cd5fc2Smrg#ifdef __cplusplus 495688cd5fc2Smrgextern "C" { 495788cd5fc2Smrg#endif 495888cd5fc2Smrg 495988cd5fc2Smrg_LT_EOF 496088cd5fc2Smrg # Now generate the symbol file. 496188cd5fc2Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 496288cd5fc2Smrg 496388cd5fc2Smrg cat <<_LT_EOF >> conftest.$ac_ext 496488cd5fc2Smrg 496588cd5fc2Smrg/* The mapping between symbol names and symbols. */ 496688cd5fc2SmrgLT@&t@_DLSYM_CONST struct { 496788cd5fc2Smrg const char *name; 496888cd5fc2Smrg void *address; 496988cd5fc2Smrg} 497088cd5fc2Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 497188cd5fc2Smrg{ 497288cd5fc2Smrg { "@PROGRAM@", (void *) 0 }, 497388cd5fc2Smrg_LT_EOF 497488cd5fc2Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 497588cd5fc2Smrg cat <<\_LT_EOF >> conftest.$ac_ext 497688cd5fc2Smrg {0, (void *) 0} 497788cd5fc2Smrg}; 497888cd5fc2Smrg 497988cd5fc2Smrg/* This works around a problem in FreeBSD linker */ 498088cd5fc2Smrg#ifdef FREEBSD_WORKAROUND 498188cd5fc2Smrgstatic const void *lt_preloaded_setup() { 498288cd5fc2Smrg return lt__PROGRAM__LTX_preloaded_symbols; 498388cd5fc2Smrg} 498488cd5fc2Smrg#endif 498588cd5fc2Smrg 498688cd5fc2Smrg#ifdef __cplusplus 498788cd5fc2Smrg} 498888cd5fc2Smrg#endif 498988cd5fc2Smrg_LT_EOF 499088cd5fc2Smrg # Now try linking the two files. 499188cd5fc2Smrg mv conftest.$ac_objext conftstm.$ac_objext 499288cd5fc2Smrg lt_globsym_save_LIBS=$LIBS 499388cd5fc2Smrg lt_globsym_save_CFLAGS=$CFLAGS 499488cd5fc2Smrg LIBS="conftstm.$ac_objext" 499588cd5fc2Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 499688cd5fc2Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 499788cd5fc2Smrg pipe_works=yes 499888cd5fc2Smrg fi 499988cd5fc2Smrg LIBS=$lt_globsym_save_LIBS 500088cd5fc2Smrg CFLAGS=$lt_globsym_save_CFLAGS 500188cd5fc2Smrg else 500288cd5fc2Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 500388cd5fc2Smrg fi 500488cd5fc2Smrg else 500588cd5fc2Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 500688cd5fc2Smrg fi 500788cd5fc2Smrg else 500888cd5fc2Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 500988cd5fc2Smrg fi 501088cd5fc2Smrg else 501188cd5fc2Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 501288cd5fc2Smrg cat conftest.$ac_ext >&5 501388cd5fc2Smrg fi 501488cd5fc2Smrg rm -rf conftest* conftst* 501588cd5fc2Smrg 501688cd5fc2Smrg # Do not use the global_symbol_pipe unless it works. 501788cd5fc2Smrg if test "$pipe_works" = yes; then 501888cd5fc2Smrg break 501988cd5fc2Smrg else 502088cd5fc2Smrg lt_cv_sys_global_symbol_pipe= 502188cd5fc2Smrg fi 502288cd5fc2Smrgdone 502388cd5fc2Smrg]) 502488cd5fc2Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 502588cd5fc2Smrg lt_cv_sys_global_symbol_to_cdecl= 502688cd5fc2Smrgfi 502788cd5fc2Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 502888cd5fc2Smrg AC_MSG_RESULT(failed) 502988cd5fc2Smrgelse 503088cd5fc2Smrg AC_MSG_RESULT(ok) 503188cd5fc2Smrgfi 503288cd5fc2Smrg 503388cd5fc2Smrg# Response file support. 503488cd5fc2Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 503588cd5fc2Smrg nm_file_list_spec='@' 503688cd5fc2Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 503788cd5fc2Smrg nm_file_list_spec='@' 503888cd5fc2Smrgfi 503988cd5fc2Smrg 504088cd5fc2Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 504188cd5fc2Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 504288cd5fc2Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 504388cd5fc2Smrg [Transform the output of nm in a proper C declaration]) 504488cd5fc2Smrg_LT_DECL([global_symbol_to_c_name_address], 504588cd5fc2Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 504688cd5fc2Smrg [Transform the output of nm in a C name address pair]) 504788cd5fc2Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 504888cd5fc2Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 504988cd5fc2Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 505088cd5fc2Smrg_LT_DECL([], [nm_file_list_spec], [1], 505188cd5fc2Smrg [Specify filename containing input files for $NM]) 505288cd5fc2Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 505388cd5fc2Smrg 505488cd5fc2Smrg 505588cd5fc2Smrg# _LT_COMPILER_PIC([TAGNAME]) 505688cd5fc2Smrg# --------------------------- 505788cd5fc2Smrgm4_defun([_LT_COMPILER_PIC], 505888cd5fc2Smrg[m4_require([_LT_TAG_COMPILER])dnl 505988cd5fc2Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 506088cd5fc2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 506188cd5fc2Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 506288cd5fc2Smrg 506388cd5fc2Smrgm4_if([$1], [CXX], [ 506488cd5fc2Smrg # C++ specific cases for pic, static, wl, etc. 506588cd5fc2Smrg if test "$GXX" = yes; then 506688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 506788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 506888cd5fc2Smrg 506988cd5fc2Smrg case $host_os in 507088cd5fc2Smrg aix*) 507188cd5fc2Smrg # All AIX code is PIC. 507288cd5fc2Smrg if test "$host_cpu" = ia64; then 507388cd5fc2Smrg # AIX 5 now supports IA64 processor 507488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 507588cd5fc2Smrg fi 507688cd5fc2Smrg ;; 507788cd5fc2Smrg 507888cd5fc2Smrg amigaos*) 507988cd5fc2Smrg case $host_cpu in 508088cd5fc2Smrg powerpc) 508188cd5fc2Smrg # see comment about AmigaOS4 .so support 508288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 508388cd5fc2Smrg ;; 508488cd5fc2Smrg m68k) 508588cd5fc2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 508688cd5fc2Smrg # adding the `-m68020' flag to GCC prevents building anything better, 508788cd5fc2Smrg # like `-m68040'. 508888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 508988cd5fc2Smrg ;; 509088cd5fc2Smrg esac 509188cd5fc2Smrg ;; 509288cd5fc2Smrg 509388cd5fc2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 509488cd5fc2Smrg # PIC is the default for these OSes. 509588cd5fc2Smrg ;; 509688cd5fc2Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 509788cd5fc2Smrg # This hack is so that the source file can tell whether it is being 509888cd5fc2Smrg # built for inclusion in a dll (and should export symbols for example). 509988cd5fc2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 510088cd5fc2Smrg # (--disable-auto-import) libraries 510188cd5fc2Smrg m4_if([$1], [GCJ], [], 510288cd5fc2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 510388cd5fc2Smrg ;; 510488cd5fc2Smrg darwin* | rhapsody*) 510588cd5fc2Smrg # PIC is the default on this platform 510688cd5fc2Smrg # Common symbols not allowed in MH_DYLIB files 510788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 510888cd5fc2Smrg ;; 510988cd5fc2Smrg *djgpp*) 511088cd5fc2Smrg # DJGPP does not support shared libraries at all 511188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 511288cd5fc2Smrg ;; 511388cd5fc2Smrg haiku*) 511488cd5fc2Smrg # PIC is the default for Haiku. 511588cd5fc2Smrg # The "-static" flag exists, but is broken. 511688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 511788cd5fc2Smrg ;; 511888cd5fc2Smrg interix[[3-9]]*) 511988cd5fc2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 512088cd5fc2Smrg # Instead, we relocate shared libraries at runtime. 512188cd5fc2Smrg ;; 512288cd5fc2Smrg sysv4*MP*) 512388cd5fc2Smrg if test -d /usr/nec; then 512488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 512588cd5fc2Smrg fi 512688cd5fc2Smrg ;; 512788cd5fc2Smrg hpux*) 512888cd5fc2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 512988cd5fc2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 513088cd5fc2Smrg # sets the default TLS model and affects inlining. 513188cd5fc2Smrg case $host_cpu in 513288cd5fc2Smrg hppa*64*) 513388cd5fc2Smrg ;; 513488cd5fc2Smrg *) 513588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 513688cd5fc2Smrg ;; 513788cd5fc2Smrg esac 513888cd5fc2Smrg ;; 513988cd5fc2Smrg *qnx* | *nto*) 514088cd5fc2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 514188cd5fc2Smrg # it will coredump. 514288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 514388cd5fc2Smrg ;; 514488cd5fc2Smrg *) 514588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 514688cd5fc2Smrg ;; 514788cd5fc2Smrg esac 514888cd5fc2Smrg else 514988cd5fc2Smrg case $host_os in 515088cd5fc2Smrg aix[[4-9]]*) 515188cd5fc2Smrg # All AIX code is PIC. 515288cd5fc2Smrg if test "$host_cpu" = ia64; then 515388cd5fc2Smrg # AIX 5 now supports IA64 processor 515488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 515588cd5fc2Smrg else 515688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 515788cd5fc2Smrg fi 515888cd5fc2Smrg ;; 515988cd5fc2Smrg chorus*) 516088cd5fc2Smrg case $cc_basename in 516188cd5fc2Smrg cxch68*) 516288cd5fc2Smrg # Green Hills C++ Compiler 516388cd5fc2Smrg # _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" 516488cd5fc2Smrg ;; 516588cd5fc2Smrg esac 516688cd5fc2Smrg ;; 516788cd5fc2Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 516888cd5fc2Smrg # This hack is so that the source file can tell whether it is being 516988cd5fc2Smrg # built for inclusion in a dll (and should export symbols for example). 517088cd5fc2Smrg m4_if([$1], [GCJ], [], 517188cd5fc2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 517288cd5fc2Smrg ;; 517388cd5fc2Smrg dgux*) 517488cd5fc2Smrg case $cc_basename in 517588cd5fc2Smrg ec++*) 517688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 517788cd5fc2Smrg ;; 517888cd5fc2Smrg ghcx*) 517988cd5fc2Smrg # Green Hills C++ Compiler 518088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 518188cd5fc2Smrg ;; 518288cd5fc2Smrg *) 518388cd5fc2Smrg ;; 518488cd5fc2Smrg esac 518588cd5fc2Smrg ;; 518688cd5fc2Smrg freebsd* | dragonfly*) 518788cd5fc2Smrg # FreeBSD uses GNU C++ 518888cd5fc2Smrg ;; 518988cd5fc2Smrg hpux9* | hpux10* | hpux11*) 519088cd5fc2Smrg case $cc_basename in 519188cd5fc2Smrg CC*) 519288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 519388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 519488cd5fc2Smrg if test "$host_cpu" != ia64; then 519588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 519688cd5fc2Smrg fi 519788cd5fc2Smrg ;; 519888cd5fc2Smrg aCC*) 519988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 520188cd5fc2Smrg case $host_cpu in 520288cd5fc2Smrg hppa*64*|ia64*) 520388cd5fc2Smrg # +Z the default 520488cd5fc2Smrg ;; 520588cd5fc2Smrg *) 520688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 520788cd5fc2Smrg ;; 520888cd5fc2Smrg esac 520988cd5fc2Smrg ;; 521088cd5fc2Smrg *) 521188cd5fc2Smrg ;; 521288cd5fc2Smrg esac 521388cd5fc2Smrg ;; 521488cd5fc2Smrg interix*) 521588cd5fc2Smrg # This is c89, which is MS Visual C++ (no shared libs) 521688cd5fc2Smrg # Anyone wants to do a port? 521788cd5fc2Smrg ;; 521888cd5fc2Smrg irix5* | irix6* | nonstopux*) 521988cd5fc2Smrg case $cc_basename in 522088cd5fc2Smrg CC*) 522188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 522388cd5fc2Smrg # CC pic flag -KPIC is the default. 522488cd5fc2Smrg ;; 522588cd5fc2Smrg *) 522688cd5fc2Smrg ;; 522788cd5fc2Smrg esac 522888cd5fc2Smrg ;; 522988cd5fc2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 523088cd5fc2Smrg case $cc_basename in 523188cd5fc2Smrg KCC*) 523288cd5fc2Smrg # KAI C++ Compiler 523388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 523488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 523588cd5fc2Smrg ;; 523688cd5fc2Smrg ecpc* ) 523788cd5fc2Smrg # old Intel C++ for x86_64 which still supported -KPIC. 523888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 523988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 524088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 524188cd5fc2Smrg ;; 524288cd5fc2Smrg icpc* ) 524388cd5fc2Smrg # Intel C++, used to be incompatible with GCC. 524488cd5fc2Smrg # ICC 10 doesn't accept -KPIC any more. 524588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 524688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 524788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 524888cd5fc2Smrg ;; 524988cd5fc2Smrg pgCC* | pgcpp*) 525088cd5fc2Smrg # Portland Group C++ compiler 525188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 525288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 525388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 525488cd5fc2Smrg ;; 525588cd5fc2Smrg cxx*) 525688cd5fc2Smrg # Compaq C++ 525788cd5fc2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 525888cd5fc2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 525988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 526088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 526188cd5fc2Smrg ;; 526288cd5fc2Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 526388cd5fc2Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 526488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 526588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 526688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 526788cd5fc2Smrg ;; 526888cd5fc2Smrg *) 526988cd5fc2Smrg case `$CC -V 2>&1 | sed 5q` in 527088cd5fc2Smrg *Sun\ C*) 527188cd5fc2Smrg # Sun C++ 5.9 527288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 527388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 527488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 527588cd5fc2Smrg ;; 527688cd5fc2Smrg esac 527788cd5fc2Smrg ;; 527888cd5fc2Smrg esac 527988cd5fc2Smrg ;; 528088cd5fc2Smrg lynxos*) 528188cd5fc2Smrg ;; 528288cd5fc2Smrg m88k*) 528388cd5fc2Smrg ;; 528488cd5fc2Smrg mvs*) 528588cd5fc2Smrg case $cc_basename in 528688cd5fc2Smrg cxx*) 528788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 528888cd5fc2Smrg ;; 528988cd5fc2Smrg *) 529088cd5fc2Smrg ;; 529188cd5fc2Smrg esac 529288cd5fc2Smrg ;; 529388cd5fc2Smrg netbsd* | netbsdelf*-gnu) 529488cd5fc2Smrg ;; 529588cd5fc2Smrg *qnx* | *nto*) 529688cd5fc2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 529788cd5fc2Smrg # it will coredump. 529888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 529988cd5fc2Smrg ;; 530088cd5fc2Smrg osf3* | osf4* | osf5*) 530188cd5fc2Smrg case $cc_basename in 530288cd5fc2Smrg KCC*) 530388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 530488cd5fc2Smrg ;; 530588cd5fc2Smrg RCC*) 530688cd5fc2Smrg # Rational C++ 2.4.1 530788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 530888cd5fc2Smrg ;; 530988cd5fc2Smrg cxx*) 531088cd5fc2Smrg # Digital/Compaq C++ 531188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 531288cd5fc2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 531388cd5fc2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 531488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 531588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 531688cd5fc2Smrg ;; 531788cd5fc2Smrg *) 531888cd5fc2Smrg ;; 531988cd5fc2Smrg esac 532088cd5fc2Smrg ;; 532188cd5fc2Smrg psos*) 532288cd5fc2Smrg ;; 532388cd5fc2Smrg solaris*) 532488cd5fc2Smrg case $cc_basename in 532588cd5fc2Smrg CC* | sunCC*) 532688cd5fc2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 532788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 532888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 532988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 533088cd5fc2Smrg ;; 533188cd5fc2Smrg gcx*) 533288cd5fc2Smrg # Green Hills C++ Compiler 533388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 533488cd5fc2Smrg ;; 533588cd5fc2Smrg *) 533688cd5fc2Smrg ;; 533788cd5fc2Smrg esac 533888cd5fc2Smrg ;; 533988cd5fc2Smrg sunos4*) 534088cd5fc2Smrg case $cc_basename in 534188cd5fc2Smrg CC*) 534288cd5fc2Smrg # Sun C++ 4.x 534388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 534488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 534588cd5fc2Smrg ;; 534688cd5fc2Smrg lcc*) 534788cd5fc2Smrg # Lucid 534888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 534988cd5fc2Smrg ;; 535088cd5fc2Smrg *) 535188cd5fc2Smrg ;; 535288cd5fc2Smrg esac 535388cd5fc2Smrg ;; 535488cd5fc2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 535588cd5fc2Smrg case $cc_basename in 535688cd5fc2Smrg CC*) 535788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 535888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 535988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 536088cd5fc2Smrg ;; 536188cd5fc2Smrg esac 536288cd5fc2Smrg ;; 536388cd5fc2Smrg tandem*) 536488cd5fc2Smrg case $cc_basename in 536588cd5fc2Smrg NCC*) 536688cd5fc2Smrg # NonStop-UX NCC 3.20 536788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 536888cd5fc2Smrg ;; 536988cd5fc2Smrg *) 537088cd5fc2Smrg ;; 537188cd5fc2Smrg esac 537288cd5fc2Smrg ;; 537388cd5fc2Smrg vxworks*) 537488cd5fc2Smrg ;; 537588cd5fc2Smrg *) 537688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 537788cd5fc2Smrg ;; 537888cd5fc2Smrg esac 537988cd5fc2Smrg fi 538088cd5fc2Smrg], 538188cd5fc2Smrg[ 538288cd5fc2Smrg if test "$GCC" = yes; then 538388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 538488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 538588cd5fc2Smrg 538688cd5fc2Smrg case $host_os in 538788cd5fc2Smrg aix*) 538888cd5fc2Smrg # All AIX code is PIC. 538988cd5fc2Smrg if test "$host_cpu" = ia64; then 539088cd5fc2Smrg # AIX 5 now supports IA64 processor 539188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 539288cd5fc2Smrg fi 539388cd5fc2Smrg ;; 539488cd5fc2Smrg 539588cd5fc2Smrg amigaos*) 539688cd5fc2Smrg case $host_cpu in 539788cd5fc2Smrg powerpc) 539888cd5fc2Smrg # see comment about AmigaOS4 .so support 539988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 540088cd5fc2Smrg ;; 540188cd5fc2Smrg m68k) 540288cd5fc2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 540388cd5fc2Smrg # adding the `-m68020' flag to GCC prevents building anything better, 540488cd5fc2Smrg # like `-m68040'. 540588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 540688cd5fc2Smrg ;; 540788cd5fc2Smrg esac 540888cd5fc2Smrg ;; 540988cd5fc2Smrg 541088cd5fc2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 541188cd5fc2Smrg # PIC is the default for these OSes. 541288cd5fc2Smrg ;; 541388cd5fc2Smrg 541488cd5fc2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 541588cd5fc2Smrg # This hack is so that the source file can tell whether it is being 541688cd5fc2Smrg # built for inclusion in a dll (and should export symbols for example). 541788cd5fc2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 541888cd5fc2Smrg # (--disable-auto-import) libraries 541988cd5fc2Smrg m4_if([$1], [GCJ], [], 542088cd5fc2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 542188cd5fc2Smrg ;; 542288cd5fc2Smrg 542388cd5fc2Smrg darwin* | rhapsody*) 542488cd5fc2Smrg # PIC is the default on this platform 542588cd5fc2Smrg # Common symbols not allowed in MH_DYLIB files 542688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 542788cd5fc2Smrg ;; 542888cd5fc2Smrg 542988cd5fc2Smrg haiku*) 543088cd5fc2Smrg # PIC is the default for Haiku. 543188cd5fc2Smrg # The "-static" flag exists, but is broken. 543288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 543388cd5fc2Smrg ;; 543488cd5fc2Smrg 543588cd5fc2Smrg hpux*) 543688cd5fc2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 543788cd5fc2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 543888cd5fc2Smrg # sets the default TLS model and affects inlining. 543988cd5fc2Smrg case $host_cpu in 544088cd5fc2Smrg hppa*64*) 544188cd5fc2Smrg # +Z the default 544288cd5fc2Smrg ;; 544388cd5fc2Smrg *) 544488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 544588cd5fc2Smrg ;; 544688cd5fc2Smrg esac 544788cd5fc2Smrg ;; 544888cd5fc2Smrg 544988cd5fc2Smrg interix[[3-9]]*) 545088cd5fc2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 545188cd5fc2Smrg # Instead, we relocate shared libraries at runtime. 545288cd5fc2Smrg ;; 545388cd5fc2Smrg 545488cd5fc2Smrg msdosdjgpp*) 545588cd5fc2Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 545688cd5fc2Smrg # on systems that don't support them. 545788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 545888cd5fc2Smrg enable_shared=no 545988cd5fc2Smrg ;; 546088cd5fc2Smrg 546188cd5fc2Smrg *nto* | *qnx*) 546288cd5fc2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 546388cd5fc2Smrg # it will coredump. 546488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 546588cd5fc2Smrg ;; 546688cd5fc2Smrg 546788cd5fc2Smrg sysv4*MP*) 546888cd5fc2Smrg if test -d /usr/nec; then 546988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 547088cd5fc2Smrg fi 547188cd5fc2Smrg ;; 547288cd5fc2Smrg 547388cd5fc2Smrg *) 547488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 547588cd5fc2Smrg ;; 547688cd5fc2Smrg esac 547788cd5fc2Smrg 547888cd5fc2Smrg case $cc_basename in 547988cd5fc2Smrg nvcc*) # Cuda Compiler Driver 2.2 548088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 548188cd5fc2Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 548288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 548388cd5fc2Smrg fi 548488cd5fc2Smrg ;; 548588cd5fc2Smrg esac 548688cd5fc2Smrg else 548788cd5fc2Smrg # PORTME Check for flag to pass linker flags through the system compiler. 548888cd5fc2Smrg case $host_os in 548988cd5fc2Smrg aix*) 549088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 549188cd5fc2Smrg if test "$host_cpu" = ia64; then 549288cd5fc2Smrg # AIX 5 now supports IA64 processor 549388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549488cd5fc2Smrg else 549588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 549688cd5fc2Smrg fi 549788cd5fc2Smrg ;; 549888cd5fc2Smrg 549988cd5fc2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 550088cd5fc2Smrg # This hack is so that the source file can tell whether it is being 550188cd5fc2Smrg # built for inclusion in a dll (and should export symbols for example). 550288cd5fc2Smrg m4_if([$1], [GCJ], [], 550388cd5fc2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 550488cd5fc2Smrg ;; 550588cd5fc2Smrg 550688cd5fc2Smrg hpux9* | hpux10* | hpux11*) 550788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550888cd5fc2Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 550988cd5fc2Smrg # not for PA HP-UX. 551088cd5fc2Smrg case $host_cpu in 551188cd5fc2Smrg hppa*64*|ia64*) 551288cd5fc2Smrg # +Z the default 551388cd5fc2Smrg ;; 551488cd5fc2Smrg *) 551588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 551688cd5fc2Smrg ;; 551788cd5fc2Smrg esac 551888cd5fc2Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 551988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 552088cd5fc2Smrg ;; 552188cd5fc2Smrg 552288cd5fc2Smrg irix5* | irix6* | nonstopux*) 552388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 552488cd5fc2Smrg # PIC (with -KPIC) is the default. 552588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 552688cd5fc2Smrg ;; 552788cd5fc2Smrg 552888cd5fc2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 552988cd5fc2Smrg case $cc_basename in 553088cd5fc2Smrg # old Intel for x86_64 which still supported -KPIC. 553188cd5fc2Smrg ecc*) 553288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 553388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 553488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 553588cd5fc2Smrg ;; 553688cd5fc2Smrg # icc used to be incompatible with GCC. 553788cd5fc2Smrg # ICC 10 doesn't accept -KPIC any more. 553888cd5fc2Smrg icc* | ifort*) 553988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 554088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 554188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 554288cd5fc2Smrg ;; 554388cd5fc2Smrg # Lahey Fortran 8.1. 554488cd5fc2Smrg lf95*) 554588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 554688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 554788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 554888cd5fc2Smrg ;; 554988cd5fc2Smrg nagfor*) 555088cd5fc2Smrg # NAG Fortran compiler 555188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 555288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 555388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 555488cd5fc2Smrg ;; 555588cd5fc2Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 555688cd5fc2Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 555788cd5fc2Smrg # which looks to be a dead project) 555888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 555988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 556088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 556188cd5fc2Smrg ;; 556288cd5fc2Smrg ccc*) 556388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 556488cd5fc2Smrg # All Alpha code is PIC. 556588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 556688cd5fc2Smrg ;; 556788cd5fc2Smrg xl* | bgxl* | bgf* | mpixl*) 556888cd5fc2Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 556988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 557088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 557188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 557288cd5fc2Smrg ;; 557388cd5fc2Smrg *) 557488cd5fc2Smrg case `$CC -V 2>&1 | sed 5q` in 557588cd5fc2Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 557688cd5fc2Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 557788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 557888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 557988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 558088cd5fc2Smrg ;; 558188cd5fc2Smrg *Sun\ F* | *Sun*Fortran*) 558288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 558388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 558488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 558588cd5fc2Smrg ;; 558688cd5fc2Smrg *Sun\ C*) 558788cd5fc2Smrg # Sun C 5.9 558888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 558988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 559088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 559188cd5fc2Smrg ;; 559288cd5fc2Smrg *Intel*\ [[CF]]*Compiler*) 559388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 559488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 559588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 559688cd5fc2Smrg ;; 559788cd5fc2Smrg *Portland\ Group*) 559888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 559988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 560088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 560188cd5fc2Smrg ;; 560288cd5fc2Smrg esac 560388cd5fc2Smrg ;; 560488cd5fc2Smrg esac 560588cd5fc2Smrg ;; 560688cd5fc2Smrg 560788cd5fc2Smrg newsos6) 560888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 560988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 561088cd5fc2Smrg ;; 561188cd5fc2Smrg 561288cd5fc2Smrg *nto* | *qnx*) 561388cd5fc2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 561488cd5fc2Smrg # it will coredump. 561588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 561688cd5fc2Smrg ;; 561788cd5fc2Smrg 561888cd5fc2Smrg osf3* | osf4* | osf5*) 561988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 562088cd5fc2Smrg # All OSF/1 code is PIC. 562188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 562288cd5fc2Smrg ;; 562388cd5fc2Smrg 562488cd5fc2Smrg rdos*) 562588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 562688cd5fc2Smrg ;; 562788cd5fc2Smrg 562888cd5fc2Smrg solaris*) 562988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 563088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 563188cd5fc2Smrg case $cc_basename in 563288cd5fc2Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 563388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 563488cd5fc2Smrg *) 563588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 563688cd5fc2Smrg esac 563788cd5fc2Smrg ;; 563888cd5fc2Smrg 563988cd5fc2Smrg sunos4*) 564088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 564188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 564288cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 564388cd5fc2Smrg ;; 564488cd5fc2Smrg 564588cd5fc2Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 564688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 564788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 564888cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 564988cd5fc2Smrg ;; 565088cd5fc2Smrg 565188cd5fc2Smrg sysv4*MP*) 565288cd5fc2Smrg if test -d /usr/nec ;then 565388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 565488cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 565588cd5fc2Smrg fi 565688cd5fc2Smrg ;; 565788cd5fc2Smrg 565888cd5fc2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 565988cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 566088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 566188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 566288cd5fc2Smrg ;; 566388cd5fc2Smrg 566488cd5fc2Smrg unicos*) 566588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 566688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 566788cd5fc2Smrg ;; 566888cd5fc2Smrg 566988cd5fc2Smrg uts4*) 567088cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 567188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 567288cd5fc2Smrg ;; 567388cd5fc2Smrg 567488cd5fc2Smrg *) 567588cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 567688cd5fc2Smrg ;; 567788cd5fc2Smrg esac 567888cd5fc2Smrg fi 567988cd5fc2Smrg]) 568088cd5fc2Smrgcase $host_os in 568188cd5fc2Smrg # For platforms which do not support PIC, -DPIC is meaningless: 568288cd5fc2Smrg *djgpp*) 568388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 568488cd5fc2Smrg ;; 568588cd5fc2Smrg *) 568688cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 568788cd5fc2Smrg ;; 568888cd5fc2Smrgesac 568988cd5fc2Smrg 569088cd5fc2SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 569188cd5fc2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 569288cd5fc2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 569388cd5fc2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 569488cd5fc2Smrg 569588cd5fc2Smrg# 569688cd5fc2Smrg# Check to make sure the PIC flag actually works. 569788cd5fc2Smrg# 569888cd5fc2Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 569988cd5fc2Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 570088cd5fc2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 570188cd5fc2Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 570288cd5fc2Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 570388cd5fc2Smrg "" | " "*) ;; 570488cd5fc2Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 570588cd5fc2Smrg esac], 570688cd5fc2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 570788cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 570888cd5fc2Smrgfi 570988cd5fc2Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 571088cd5fc2Smrg [Additional compiler flags for building library objects]) 571188cd5fc2Smrg 571288cd5fc2Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 571388cd5fc2Smrg [How to pass a linker flag through the compiler]) 571488cd5fc2Smrg# 571588cd5fc2Smrg# Check to make sure the static flag actually works. 571688cd5fc2Smrg# 571788cd5fc2Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 571888cd5fc2Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 571988cd5fc2Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 572088cd5fc2Smrg $lt_tmp_static_flag, 572188cd5fc2Smrg [], 572288cd5fc2Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 572388cd5fc2Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 572488cd5fc2Smrg [Compiler flag to prevent dynamic linking]) 572588cd5fc2Smrg])# _LT_COMPILER_PIC 572688cd5fc2Smrg 572788cd5fc2Smrg 572888cd5fc2Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 572988cd5fc2Smrg# ---------------------------- 573088cd5fc2Smrg# See if the linker supports building shared libraries. 573188cd5fc2Smrgm4_defun([_LT_LINKER_SHLIBS], 573288cd5fc2Smrg[AC_REQUIRE([LT_PATH_LD])dnl 573388cd5fc2SmrgAC_REQUIRE([LT_PATH_NM])dnl 573488cd5fc2Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 573588cd5fc2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 573688cd5fc2Smrgm4_require([_LT_DECL_EGREP])dnl 573788cd5fc2Smrgm4_require([_LT_DECL_SED])dnl 573888cd5fc2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 573988cd5fc2Smrgm4_require([_LT_TAG_COMPILER])dnl 574088cd5fc2SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 574188cd5fc2Smrgm4_if([$1], [CXX], [ 574288cd5fc2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 574388cd5fc2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 574488cd5fc2Smrg case $host_os in 574588cd5fc2Smrg aix[[4-9]]*) 574688cd5fc2Smrg # If we're using GNU nm, then we don't want the "-C" option. 574788cd5fc2Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 574888cd5fc2Smrg # Also, AIX nm treats weak defined symbols like other global defined 574988cd5fc2Smrg # symbols, whereas GNU nm marks them as "W". 575088cd5fc2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 575188cd5fc2Smrg _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' 575288cd5fc2Smrg else 575388cd5fc2Smrg _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' 575488cd5fc2Smrg fi 575588cd5fc2Smrg ;; 575688cd5fc2Smrg pw32*) 575788cd5fc2Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 575888cd5fc2Smrg ;; 575988cd5fc2Smrg cygwin* | mingw* | cegcc*) 576088cd5fc2Smrg case $cc_basename in 576188cd5fc2Smrg cl*) 576288cd5fc2Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 576388cd5fc2Smrg ;; 576488cd5fc2Smrg *) 576588cd5fc2Smrg _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' 576688cd5fc2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 576788cd5fc2Smrg ;; 576888cd5fc2Smrg esac 576988cd5fc2Smrg ;; 577088cd5fc2Smrg linux* | k*bsd*-gnu | gnu*) 577188cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 577288cd5fc2Smrg ;; 577388cd5fc2Smrg *) 577488cd5fc2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 577588cd5fc2Smrg ;; 577688cd5fc2Smrg esac 577788cd5fc2Smrg], [ 577888cd5fc2Smrg runpath_var= 577988cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 578088cd5fc2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 578188cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)= 578288cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 578388cd5fc2Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 578488cd5fc2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 578588cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 578688cd5fc2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 578788cd5fc2Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 578888cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 578988cd5fc2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 579088cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 579188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 579288cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 579388cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 579488cd5fc2Smrg _LT_TAGVAR(inherit_rpath, $1)=no 579588cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 579688cd5fc2Smrg _LT_TAGVAR(module_cmds, $1)= 579788cd5fc2Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 579888cd5fc2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 579988cd5fc2Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 580088cd5fc2Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 580188cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 580288cd5fc2Smrg # include_expsyms should be a list of space-separated symbols to be *always* 580388cd5fc2Smrg # included in the symbol list 580488cd5fc2Smrg _LT_TAGVAR(include_expsyms, $1)= 580588cd5fc2Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 580688cd5fc2Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 580788cd5fc2Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 580888cd5fc2Smrg # as well as any symbol that contains `d'. 580988cd5fc2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 581088cd5fc2Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 581188cd5fc2Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 581288cd5fc2Smrg # the symbol is explicitly referenced. Since portable code cannot 581388cd5fc2Smrg # rely on this symbol name, it's probably fine to never include it in 581488cd5fc2Smrg # preloaded symbol tables. 581588cd5fc2Smrg # Exclude shared library initialization/finalization symbols. 581688cd5fc2Smrgdnl Note also adjust exclude_expsyms for C++ above. 581788cd5fc2Smrg extract_expsyms_cmds= 581888cd5fc2Smrg 581988cd5fc2Smrg case $host_os in 582088cd5fc2Smrg cygwin* | mingw* | pw32* | cegcc*) 582188cd5fc2Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 582288cd5fc2Smrg # When not using gcc, we currently assume that we are using 582388cd5fc2Smrg # Microsoft Visual C++. 582488cd5fc2Smrg if test "$GCC" != yes; then 582588cd5fc2Smrg with_gnu_ld=no 582688cd5fc2Smrg fi 582788cd5fc2Smrg ;; 582888cd5fc2Smrg interix*) 582988cd5fc2Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 583088cd5fc2Smrg with_gnu_ld=yes 583188cd5fc2Smrg ;; 583288cd5fc2Smrg openbsd*) 583388cd5fc2Smrg with_gnu_ld=no 583488cd5fc2Smrg ;; 583588cd5fc2Smrg linux* | k*bsd*-gnu | gnu*) 583688cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 583788cd5fc2Smrg ;; 583888cd5fc2Smrg esac 583988cd5fc2Smrg 584088cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 584188cd5fc2Smrg 584288cd5fc2Smrg # On some targets, GNU ld is compatible enough with the native linker 584388cd5fc2Smrg # that we're better off using the native interface for both. 584488cd5fc2Smrg lt_use_gnu_ld_interface=no 584588cd5fc2Smrg if test "$with_gnu_ld" = yes; then 584688cd5fc2Smrg case $host_os in 584788cd5fc2Smrg aix*) 584888cd5fc2Smrg # The AIX port of GNU ld has always aspired to compatibility 584988cd5fc2Smrg # with the native linker. However, as the warning in the GNU ld 585088cd5fc2Smrg # block says, versions before 2.19.5* couldn't really create working 585188cd5fc2Smrg # shared libraries, regardless of the interface used. 585288cd5fc2Smrg case `$LD -v 2>&1` in 585388cd5fc2Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 585488cd5fc2Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 585588cd5fc2Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 585688cd5fc2Smrg *) 585788cd5fc2Smrg lt_use_gnu_ld_interface=yes 585888cd5fc2Smrg ;; 585988cd5fc2Smrg esac 586088cd5fc2Smrg ;; 586188cd5fc2Smrg *) 586288cd5fc2Smrg lt_use_gnu_ld_interface=yes 586388cd5fc2Smrg ;; 586488cd5fc2Smrg esac 586588cd5fc2Smrg fi 586688cd5fc2Smrg 586788cd5fc2Smrg if test "$lt_use_gnu_ld_interface" = yes; then 586888cd5fc2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 586988cd5fc2Smrg wlarc='${wl}' 587088cd5fc2Smrg 587188cd5fc2Smrg # Set some defaults for GNU ld with shared library support. These 587288cd5fc2Smrg # are reset later if shared libraries are not supported. Putting them 587388cd5fc2Smrg # here allows them to be overridden if necessary. 587488cd5fc2Smrg runpath_var=LD_RUN_PATH 587588cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 587688cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 587788cd5fc2Smrg # ancient GNU ld didn't support --whole-archive et. al. 587888cd5fc2Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 587988cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 588088cd5fc2Smrg else 588188cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 588288cd5fc2Smrg fi 588388cd5fc2Smrg supports_anon_versioning=no 588488cd5fc2Smrg case `$LD -v 2>&1` in 588588cd5fc2Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 588688cd5fc2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 588788cd5fc2Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 588888cd5fc2Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 588988cd5fc2Smrg *\ 2.11.*) ;; # other 2.11 versions 589088cd5fc2Smrg *) supports_anon_versioning=yes ;; 589188cd5fc2Smrg esac 589288cd5fc2Smrg 589388cd5fc2Smrg # See if GNU ld supports shared libraries. 589488cd5fc2Smrg case $host_os in 589588cd5fc2Smrg aix[[3-9]]*) 589688cd5fc2Smrg # On AIX/PPC, the GNU linker is very broken 589788cd5fc2Smrg if test "$host_cpu" != ia64; then 589888cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 589988cd5fc2Smrg cat <<_LT_EOF 1>&2 590088cd5fc2Smrg 590188cd5fc2Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 590288cd5fc2Smrg*** to be unable to reliably create shared libraries on AIX. 590388cd5fc2Smrg*** Therefore, libtool is disabling shared libraries support. If you 590488cd5fc2Smrg*** really care for shared libraries, you may want to install binutils 590588cd5fc2Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 590688cd5fc2Smrg*** You will then need to restart the configuration process. 590788cd5fc2Smrg 590888cd5fc2Smrg_LT_EOF 590988cd5fc2Smrg fi 591088cd5fc2Smrg ;; 591188cd5fc2Smrg 591288cd5fc2Smrg amigaos*) 591388cd5fc2Smrg case $host_cpu in 591488cd5fc2Smrg powerpc) 591588cd5fc2Smrg # see comment about AmigaOS4 .so support 591688cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 591788cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 591888cd5fc2Smrg ;; 591988cd5fc2Smrg m68k) 592088cd5fc2Smrg _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)' 592188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 592288cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 592388cd5fc2Smrg ;; 592488cd5fc2Smrg esac 592588cd5fc2Smrg ;; 592688cd5fc2Smrg 592788cd5fc2Smrg beos*) 592888cd5fc2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 592988cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 593088cd5fc2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 593188cd5fc2Smrg # support --undefined. This deserves some investigation. FIXME 593288cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 593388cd5fc2Smrg else 593488cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 593588cd5fc2Smrg fi 593688cd5fc2Smrg ;; 593788cd5fc2Smrg 593888cd5fc2Smrg cygwin* | mingw* | pw32* | cegcc*) 593988cd5fc2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 594088cd5fc2Smrg # as there is no search path for DLLs. 594188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 594288cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 594388cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 594488cd5fc2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 594588cd5fc2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 594688cd5fc2Smrg _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' 594788cd5fc2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 594888cd5fc2Smrg 594988cd5fc2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 595088cd5fc2Smrg _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' 595188cd5fc2Smrg # If the export-symbols file already is a .def file (1st line 595288cd5fc2Smrg # is EXPORTS), use it as is; otherwise, prepend... 595388cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 595488cd5fc2Smrg cp $export_symbols $output_objdir/$soname.def; 595588cd5fc2Smrg else 595688cd5fc2Smrg echo EXPORTS > $output_objdir/$soname.def; 595788cd5fc2Smrg cat $export_symbols >> $output_objdir/$soname.def; 595888cd5fc2Smrg fi~ 595988cd5fc2Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 596088cd5fc2Smrg else 596188cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 596288cd5fc2Smrg fi 596388cd5fc2Smrg ;; 596488cd5fc2Smrg 596588cd5fc2Smrg haiku*) 596688cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 596788cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 596888cd5fc2Smrg ;; 596988cd5fc2Smrg 597088cd5fc2Smrg interix[[3-9]]*) 597188cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 597288cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 597388cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 597488cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 597588cd5fc2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 597688cd5fc2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 597788cd5fc2Smrg # default) and relocated if they conflict, which is a slow very memory 597888cd5fc2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 597988cd5fc2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 598088cd5fc2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 598188cd5fc2Smrg _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' 598288cd5fc2Smrg _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' 598388cd5fc2Smrg ;; 598488cd5fc2Smrg 598588cd5fc2Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 598688cd5fc2Smrg tmp_diet=no 598788cd5fc2Smrg if test "$host_os" = linux-dietlibc; then 598888cd5fc2Smrg case $cc_basename in 598988cd5fc2Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 599088cd5fc2Smrg esac 599188cd5fc2Smrg fi 599288cd5fc2Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 599388cd5fc2Smrg && test "$tmp_diet" = no 599488cd5fc2Smrg then 599588cd5fc2Smrg tmp_addflag=' $pic_flag' 599688cd5fc2Smrg tmp_sharedflag='-shared' 599788cd5fc2Smrg case $cc_basename,$host_cpu in 599888cd5fc2Smrg pgcc*) # Portland Group C compiler 599988cd5fc2Smrg _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' 600088cd5fc2Smrg tmp_addflag=' $pic_flag' 600188cd5fc2Smrg ;; 600288cd5fc2Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 600388cd5fc2Smrg # Portland Group f77 and f90 compilers 600488cd5fc2Smrg _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' 600588cd5fc2Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 600688cd5fc2Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 600788cd5fc2Smrg tmp_addflag=' -i_dynamic' ;; 600888cd5fc2Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 600988cd5fc2Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 601088cd5fc2Smrg ifc* | ifort*) # Intel Fortran compiler 601188cd5fc2Smrg tmp_addflag=' -nofor_main' ;; 601288cd5fc2Smrg lf95*) # Lahey Fortran 8.1 601388cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 601488cd5fc2Smrg tmp_sharedflag='--shared' ;; 601588cd5fc2Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 601688cd5fc2Smrg tmp_sharedflag='-qmkshrobj' 601788cd5fc2Smrg tmp_addflag= ;; 601888cd5fc2Smrg nvcc*) # Cuda Compiler Driver 2.2 601988cd5fc2Smrg _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' 602088cd5fc2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 602188cd5fc2Smrg ;; 602288cd5fc2Smrg esac 602388cd5fc2Smrg case `$CC -V 2>&1 | sed 5q` in 602488cd5fc2Smrg *Sun\ C*) # Sun C 5.9 602588cd5fc2Smrg _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' 602688cd5fc2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 602788cd5fc2Smrg tmp_sharedflag='-G' ;; 602888cd5fc2Smrg *Sun\ F*) # Sun Fortran 8.3 602988cd5fc2Smrg tmp_sharedflag='-G' ;; 603088cd5fc2Smrg esac 603188cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 603288cd5fc2Smrg 603388cd5fc2Smrg if test "x$supports_anon_versioning" = xyes; then 603488cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 603588cd5fc2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 603688cd5fc2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 603788cd5fc2Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 603888cd5fc2Smrg fi 603988cd5fc2Smrg 604088cd5fc2Smrg case $cc_basename in 604188cd5fc2Smrg xlf* | bgf* | bgxlf* | mpixlf*) 604288cd5fc2Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 604388cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 604488cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 604588cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 604688cd5fc2Smrg if test "x$supports_anon_versioning" = xyes; then 604788cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 604888cd5fc2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 604988cd5fc2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 605088cd5fc2Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 605188cd5fc2Smrg fi 605288cd5fc2Smrg ;; 605388cd5fc2Smrg esac 605488cd5fc2Smrg else 605588cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 605688cd5fc2Smrg fi 605788cd5fc2Smrg ;; 605888cd5fc2Smrg 605988cd5fc2Smrg netbsd* | netbsdelf*-gnu) 606088cd5fc2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 606188cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 606288cd5fc2Smrg wlarc= 606388cd5fc2Smrg else 606488cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 606588cd5fc2Smrg _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' 606688cd5fc2Smrg fi 606788cd5fc2Smrg ;; 606888cd5fc2Smrg 606988cd5fc2Smrg solaris*) 607088cd5fc2Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 607188cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 607288cd5fc2Smrg cat <<_LT_EOF 1>&2 607388cd5fc2Smrg 607488cd5fc2Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 607588cd5fc2Smrg*** create shared libraries on Solaris systems. Therefore, libtool 607688cd5fc2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 607788cd5fc2Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 607888cd5fc2Smrg*** your PATH or compiler configuration so that the native linker is 607988cd5fc2Smrg*** used, and then restart. 608088cd5fc2Smrg 608188cd5fc2Smrg_LT_EOF 608288cd5fc2Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 608388cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 608488cd5fc2Smrg _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' 608588cd5fc2Smrg else 608688cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 608788cd5fc2Smrg fi 608888cd5fc2Smrg ;; 608988cd5fc2Smrg 609088cd5fc2Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 609188cd5fc2Smrg case `$LD -v 2>&1` in 609288cd5fc2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 609388cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 609488cd5fc2Smrg cat <<_LT_EOF 1>&2 609588cd5fc2Smrg 609688cd5fc2Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 609788cd5fc2Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 609888cd5fc2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 609988cd5fc2Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 610088cd5fc2Smrg*** your PATH or compiler configuration so that the native linker is 610188cd5fc2Smrg*** used, and then restart. 610288cd5fc2Smrg 610388cd5fc2Smrg_LT_EOF 610488cd5fc2Smrg ;; 610588cd5fc2Smrg *) 610688cd5fc2Smrg # For security reasons, it is highly recommended that you always 610788cd5fc2Smrg # use absolute paths for naming shared libraries, and exclude the 610888cd5fc2Smrg # DT_RUNPATH tag from executables and libraries. But doing so 610988cd5fc2Smrg # requires that you compile everything twice, which is a pain. 611088cd5fc2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 611188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 611288cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 611388cd5fc2Smrg _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' 611488cd5fc2Smrg else 611588cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 611688cd5fc2Smrg fi 611788cd5fc2Smrg ;; 611888cd5fc2Smrg esac 611988cd5fc2Smrg ;; 612088cd5fc2Smrg 612188cd5fc2Smrg sunos4*) 612288cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 612388cd5fc2Smrg wlarc= 612488cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 612588cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 612688cd5fc2Smrg ;; 612788cd5fc2Smrg 612888cd5fc2Smrg *) 612988cd5fc2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 613088cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 613188cd5fc2Smrg _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' 613288cd5fc2Smrg else 613388cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 613488cd5fc2Smrg fi 613588cd5fc2Smrg ;; 613688cd5fc2Smrg esac 613788cd5fc2Smrg 613888cd5fc2Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 613988cd5fc2Smrg runpath_var= 614088cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 614188cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 614288cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 614388cd5fc2Smrg fi 614488cd5fc2Smrg else 614588cd5fc2Smrg # PORTME fill in a description of your system's linker (not GNU ld) 614688cd5fc2Smrg case $host_os in 614788cd5fc2Smrg aix3*) 614888cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 614988cd5fc2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 615088cd5fc2Smrg _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' 615188cd5fc2Smrg # Note: this linker hardcodes the directories in LIBPATH if there 615288cd5fc2Smrg # are no directories specified by -L. 615388cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 615488cd5fc2Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 615588cd5fc2Smrg # Neither direct hardcoding nor static linking is supported with a 615688cd5fc2Smrg # broken collect2. 615788cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 615888cd5fc2Smrg fi 615988cd5fc2Smrg ;; 616088cd5fc2Smrg 616188cd5fc2Smrg aix[[4-9]]*) 616288cd5fc2Smrg if test "$host_cpu" = ia64; then 616388cd5fc2Smrg # On IA64, the linker does run time linking by default, so we don't 616488cd5fc2Smrg # have to do anything special. 616588cd5fc2Smrg aix_use_runtimelinking=no 616688cd5fc2Smrg exp_sym_flag='-Bexport' 616788cd5fc2Smrg no_entry_flag="" 616888cd5fc2Smrg else 616988cd5fc2Smrg # If we're using GNU nm, then we don't want the "-C" option. 617088cd5fc2Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 617188cd5fc2Smrg # Also, AIX nm treats weak defined symbols like other global 617288cd5fc2Smrg # defined symbols, whereas GNU nm marks them as "W". 617388cd5fc2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 617488cd5fc2Smrg _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' 617588cd5fc2Smrg else 617688cd5fc2Smrg _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' 617788cd5fc2Smrg fi 617888cd5fc2Smrg aix_use_runtimelinking=no 617988cd5fc2Smrg 618088cd5fc2Smrg # Test if we are trying to use run time linking or normal 618188cd5fc2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 618288cd5fc2Smrg # need to do runtime linking. 618388cd5fc2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 618488cd5fc2Smrg for ld_flag in $LDFLAGS; do 618588cd5fc2Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 618688cd5fc2Smrg aix_use_runtimelinking=yes 618788cd5fc2Smrg break 618888cd5fc2Smrg fi 618988cd5fc2Smrg done 619088cd5fc2Smrg ;; 619188cd5fc2Smrg esac 619288cd5fc2Smrg 619388cd5fc2Smrg exp_sym_flag='-bexport' 619488cd5fc2Smrg no_entry_flag='-bnoentry' 619588cd5fc2Smrg fi 619688cd5fc2Smrg 619788cd5fc2Smrg # When large executables or shared objects are built, AIX ld can 619888cd5fc2Smrg # have problems creating the table of contents. If linking a library 619988cd5fc2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 620088cd5fc2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 620188cd5fc2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 620288cd5fc2Smrg 620388cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='' 620488cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 620588cd5fc2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 620688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 620788cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 620888cd5fc2Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 620988cd5fc2Smrg 621088cd5fc2Smrg if test "$GCC" = yes; then 621188cd5fc2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 621288cd5fc2Smrg # We only want to do this on AIX 4.2 and lower, the check 621388cd5fc2Smrg # below for broken collect2 doesn't work under 4.3+ 621488cd5fc2Smrg collect2name=`${CC} -print-prog-name=collect2` 621588cd5fc2Smrg if test -f "$collect2name" && 621688cd5fc2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 621788cd5fc2Smrg then 621888cd5fc2Smrg # We have reworked collect2 621988cd5fc2Smrg : 622088cd5fc2Smrg else 622188cd5fc2Smrg # We have old collect2 622288cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 622388cd5fc2Smrg # It fails to find uninstalled libraries when the uninstalled 622488cd5fc2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 622588cd5fc2Smrg # to unsupported forces relinking 622688cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 622788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 622888cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 622988cd5fc2Smrg fi 623088cd5fc2Smrg ;; 623188cd5fc2Smrg esac 623288cd5fc2Smrg shared_flag='-shared' 623388cd5fc2Smrg if test "$aix_use_runtimelinking" = yes; then 623488cd5fc2Smrg shared_flag="$shared_flag "'${wl}-G' 623588cd5fc2Smrg fi 623688cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 623788cd5fc2Smrg else 623888cd5fc2Smrg # not using gcc 623988cd5fc2Smrg if test "$host_cpu" = ia64; then 624088cd5fc2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 624188cd5fc2Smrg # chokes on -Wl,-G. The following line is correct: 624288cd5fc2Smrg shared_flag='-G' 624388cd5fc2Smrg else 624488cd5fc2Smrg if test "$aix_use_runtimelinking" = yes; then 624588cd5fc2Smrg shared_flag='${wl}-G' 624688cd5fc2Smrg else 624788cd5fc2Smrg shared_flag='${wl}-bM:SRE' 624888cd5fc2Smrg fi 624988cd5fc2Smrg fi 625088cd5fc2Smrg fi 625188cd5fc2Smrg 625288cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 625388cd5fc2Smrg # It seems that -bexpall does not export symbols beginning with 625488cd5fc2Smrg # underscore (_), so it is better to generate a list of symbols to export. 625588cd5fc2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 625688cd5fc2Smrg if test "$aix_use_runtimelinking" = yes; then 625788cd5fc2Smrg # Warning - without using the other runtime loading flags (-brtl), 625888cd5fc2Smrg # -berok will link without error, but may produce a broken library. 625988cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 626088cd5fc2Smrg # Determine the default libpath from the value encoded in an 626188cd5fc2Smrg # empty executable. 626288cd5fc2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 626388cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 626488cd5fc2Smrg _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" 626588cd5fc2Smrg else 626688cd5fc2Smrg if test "$host_cpu" = ia64; then 626788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 626888cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 626988cd5fc2Smrg _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" 627088cd5fc2Smrg else 627188cd5fc2Smrg # Determine the default libpath from the value encoded in an 627288cd5fc2Smrg # empty executable. 627388cd5fc2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 627488cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 627588cd5fc2Smrg # Warning - without using the other run time loading flags, 627688cd5fc2Smrg # -berok will link without error, but may produce a broken library. 627788cd5fc2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 627888cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 627988cd5fc2Smrg if test "$with_gnu_ld" = yes; then 628088cd5fc2Smrg # We only use this code for GNU lds that support --whole-archive. 628188cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 628288cd5fc2Smrg else 628388cd5fc2Smrg # Exported symbols can be pulled into shared objects from archives 628488cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 628588cd5fc2Smrg fi 628688cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 628788cd5fc2Smrg # This is similar to how AIX traditionally builds its shared libraries. 628888cd5fc2Smrg _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' 628988cd5fc2Smrg fi 629088cd5fc2Smrg fi 629188cd5fc2Smrg ;; 629288cd5fc2Smrg 629388cd5fc2Smrg amigaos*) 629488cd5fc2Smrg case $host_cpu in 629588cd5fc2Smrg powerpc) 629688cd5fc2Smrg # see comment about AmigaOS4 .so support 629788cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 629888cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 629988cd5fc2Smrg ;; 630088cd5fc2Smrg m68k) 630188cd5fc2Smrg _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)' 630288cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 630388cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 630488cd5fc2Smrg ;; 630588cd5fc2Smrg esac 630688cd5fc2Smrg ;; 630788cd5fc2Smrg 630888cd5fc2Smrg bsdi[[45]]*) 630988cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 631088cd5fc2Smrg ;; 631188cd5fc2Smrg 631288cd5fc2Smrg cygwin* | mingw* | pw32* | cegcc*) 631388cd5fc2Smrg # When not using gcc, we currently assume that we are using 631488cd5fc2Smrg # Microsoft Visual C++. 631588cd5fc2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 631688cd5fc2Smrg # no search path for DLLs. 631788cd5fc2Smrg case $cc_basename in 631888cd5fc2Smrg cl*) 631988cd5fc2Smrg # Native MSVC 632088cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 632188cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 632288cd5fc2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 632388cd5fc2Smrg _LT_TAGVAR(file_list_spec, $1)='@' 632488cd5fc2Smrg # Tell ltmain to make .lib files, not .a files. 632588cd5fc2Smrg libext=lib 632688cd5fc2Smrg # Tell ltmain to make .dll files, not .so files. 632788cd5fc2Smrg shrext_cmds=".dll" 632888cd5fc2Smrg # FIXME: Setting linknames here is a bad hack. 632988cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 633088cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 633188cd5fc2Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 633288cd5fc2Smrg else 633388cd5fc2Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 633488cd5fc2Smrg fi~ 633588cd5fc2Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 633688cd5fc2Smrg linknames=' 633788cd5fc2Smrg # The linker will not automatically build a static lib if we build a DLL. 633888cd5fc2Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 633988cd5fc2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 634088cd5fc2Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 634188cd5fc2Smrg _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' 634288cd5fc2Smrg # Don't use ranlib 634388cd5fc2Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 634488cd5fc2Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 634588cd5fc2Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 634688cd5fc2Smrg case $lt_outputfile in 634788cd5fc2Smrg *.exe|*.EXE) ;; 634888cd5fc2Smrg *) 634988cd5fc2Smrg lt_outputfile="$lt_outputfile.exe" 635088cd5fc2Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 635188cd5fc2Smrg ;; 635288cd5fc2Smrg esac~ 635388cd5fc2Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 635488cd5fc2Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 635588cd5fc2Smrg $RM "$lt_outputfile.manifest"; 635688cd5fc2Smrg fi' 635788cd5fc2Smrg ;; 635888cd5fc2Smrg *) 635988cd5fc2Smrg # Assume MSVC wrapper 636088cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 636188cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 636288cd5fc2Smrg # Tell ltmain to make .lib files, not .a files. 636388cd5fc2Smrg libext=lib 636488cd5fc2Smrg # Tell ltmain to make .dll files, not .so files. 636588cd5fc2Smrg shrext_cmds=".dll" 636688cd5fc2Smrg # FIXME: Setting linknames here is a bad hack. 636788cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 636888cd5fc2Smrg # The linker will automatically build a .lib file if we build a DLL. 636988cd5fc2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 637088cd5fc2Smrg # FIXME: Should let the user specify the lib program. 637188cd5fc2Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 637288cd5fc2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 637388cd5fc2Smrg ;; 637488cd5fc2Smrg esac 637588cd5fc2Smrg ;; 637688cd5fc2Smrg 637788cd5fc2Smrg darwin* | rhapsody*) 637888cd5fc2Smrg _LT_DARWIN_LINKER_FEATURES($1) 637988cd5fc2Smrg ;; 638088cd5fc2Smrg 638188cd5fc2Smrg dgux*) 638288cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 638388cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 638488cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 638588cd5fc2Smrg ;; 638688cd5fc2Smrg 638788cd5fc2Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 638888cd5fc2Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 638988cd5fc2Smrg # does not break anything, and helps significantly (at the cost of a little 639088cd5fc2Smrg # extra space). 639188cd5fc2Smrg freebsd2.2*) 639288cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 639388cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 639488cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 639588cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 639688cd5fc2Smrg ;; 639788cd5fc2Smrg 639888cd5fc2Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 639988cd5fc2Smrg freebsd2.*) 640088cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 640188cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 640288cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 640388cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 640488cd5fc2Smrg ;; 640588cd5fc2Smrg 640688cd5fc2Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 640788cd5fc2Smrg freebsd* | dragonfly*) 640888cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 640988cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 641088cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 641188cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 641288cd5fc2Smrg ;; 641388cd5fc2Smrg 641488cd5fc2Smrg hpux9*) 641588cd5fc2Smrg if test "$GCC" = yes; then 641688cd5fc2Smrg _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' 641788cd5fc2Smrg else 641888cd5fc2Smrg _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' 641988cd5fc2Smrg fi 642088cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 642188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 642288cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 642388cd5fc2Smrg 642488cd5fc2Smrg # hardcode_minus_L: Not really in the search PATH, 642588cd5fc2Smrg # but as the default location of the library. 642688cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 642788cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 642888cd5fc2Smrg ;; 642988cd5fc2Smrg 643088cd5fc2Smrg hpux10*) 643188cd5fc2Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 643288cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 643388cd5fc2Smrg else 643488cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 643588cd5fc2Smrg fi 643688cd5fc2Smrg if test "$with_gnu_ld" = no; then 643788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 643888cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 643988cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 644088cd5fc2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 644188cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 644288cd5fc2Smrg # hardcode_minus_L: Not really in the search PATH, 644388cd5fc2Smrg # but as the default location of the library. 644488cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 644588cd5fc2Smrg fi 644688cd5fc2Smrg ;; 644788cd5fc2Smrg 644888cd5fc2Smrg hpux11*) 644988cd5fc2Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 645088cd5fc2Smrg case $host_cpu in 645188cd5fc2Smrg hppa*64*) 645288cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 645388cd5fc2Smrg ;; 645488cd5fc2Smrg ia64*) 645588cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 645688cd5fc2Smrg ;; 645788cd5fc2Smrg *) 645888cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 645988cd5fc2Smrg ;; 646088cd5fc2Smrg esac 646188cd5fc2Smrg else 646288cd5fc2Smrg case $host_cpu in 646388cd5fc2Smrg hppa*64*) 646488cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 646588cd5fc2Smrg ;; 646688cd5fc2Smrg ia64*) 646788cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 646888cd5fc2Smrg ;; 646988cd5fc2Smrg *) 647088cd5fc2Smrg m4_if($1, [], [ 647188cd5fc2Smrg # Older versions of the 11.00 compiler do not understand -b yet 647288cd5fc2Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 647388cd5fc2Smrg _LT_LINKER_OPTION([if $CC understands -b], 647488cd5fc2Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 647588cd5fc2Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 647688cd5fc2Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 647788cd5fc2Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 647888cd5fc2Smrg ;; 647988cd5fc2Smrg esac 648088cd5fc2Smrg fi 648188cd5fc2Smrg if test "$with_gnu_ld" = no; then 648288cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 648388cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 648488cd5fc2Smrg 648588cd5fc2Smrg case $host_cpu in 648688cd5fc2Smrg hppa*64*|ia64*) 648788cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 648888cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 648988cd5fc2Smrg ;; 649088cd5fc2Smrg *) 649188cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 649288cd5fc2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 649388cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 649488cd5fc2Smrg 649588cd5fc2Smrg # hardcode_minus_L: Not really in the search PATH, 649688cd5fc2Smrg # but as the default location of the library. 649788cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 649888cd5fc2Smrg ;; 649988cd5fc2Smrg esac 650088cd5fc2Smrg fi 650188cd5fc2Smrg ;; 650288cd5fc2Smrg 650388cd5fc2Smrg irix5* | irix6* | nonstopux*) 650488cd5fc2Smrg if test "$GCC" = yes; then 650588cd5fc2Smrg _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' 650688cd5fc2Smrg # Try to use the -exported_symbol ld option, if it does not 650788cd5fc2Smrg # work, assume that -exports_file does not work either and 650888cd5fc2Smrg # implicitly export all symbols. 650988cd5fc2Smrg # This should be the same for all languages, so no per-tag cache variable. 651088cd5fc2Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 651188cd5fc2Smrg [lt_cv_irix_exported_symbol], 651288cd5fc2Smrg [save_LDFLAGS="$LDFLAGS" 651388cd5fc2Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 651488cd5fc2Smrg AC_LINK_IFELSE( 651588cd5fc2Smrg [AC_LANG_SOURCE( 651688cd5fc2Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 651788cd5fc2Smrg [C++], [[int foo (void) { return 0; }]], 651888cd5fc2Smrg [Fortran 77], [[ 651988cd5fc2Smrg subroutine foo 652088cd5fc2Smrg end]], 652188cd5fc2Smrg [Fortran], [[ 652288cd5fc2Smrg subroutine foo 652388cd5fc2Smrg end]])])], 652488cd5fc2Smrg [lt_cv_irix_exported_symbol=yes], 652588cd5fc2Smrg [lt_cv_irix_exported_symbol=no]) 652688cd5fc2Smrg LDFLAGS="$save_LDFLAGS"]) 652788cd5fc2Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 652888cd5fc2Smrg _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' 652988cd5fc2Smrg fi 653088cd5fc2Smrg else 653188cd5fc2Smrg _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' 653288cd5fc2Smrg _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' 653388cd5fc2Smrg fi 653488cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 653588cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 653688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 653788cd5fc2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 653888cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 653988cd5fc2Smrg ;; 654088cd5fc2Smrg 654188cd5fc2Smrg netbsd* | netbsdelf*-gnu) 654288cd5fc2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 654388cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 654488cd5fc2Smrg else 654588cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 654688cd5fc2Smrg fi 654788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 654888cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 654988cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 655088cd5fc2Smrg ;; 655188cd5fc2Smrg 655288cd5fc2Smrg newsos6) 655388cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 655488cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 655588cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 655688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 655788cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 655888cd5fc2Smrg ;; 655988cd5fc2Smrg 656088cd5fc2Smrg *nto* | *qnx*) 656188cd5fc2Smrg ;; 656288cd5fc2Smrg 656388cd5fc2Smrg openbsd*) 656488cd5fc2Smrg if test -f /usr/libexec/ld.so; then 656588cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 656688cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 656788cd5fc2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 656888cd5fc2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 656988cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 657088cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 657188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 657288cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 657388cd5fc2Smrg else 657488cd5fc2Smrg case $host_os in 657588cd5fc2Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 657688cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 657788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 657888cd5fc2Smrg ;; 657988cd5fc2Smrg *) 658088cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 658188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 658288cd5fc2Smrg ;; 658388cd5fc2Smrg esac 658488cd5fc2Smrg fi 658588cd5fc2Smrg else 658688cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 658788cd5fc2Smrg fi 658888cd5fc2Smrg ;; 658988cd5fc2Smrg 659088cd5fc2Smrg os2*) 659188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 659288cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 659388cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 659488cd5fc2Smrg _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' 659588cd5fc2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 659688cd5fc2Smrg ;; 659788cd5fc2Smrg 659888cd5fc2Smrg osf3*) 659988cd5fc2Smrg if test "$GCC" = yes; then 660088cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 660188cd5fc2Smrg _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' 660288cd5fc2Smrg else 660388cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 660488cd5fc2Smrg _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' 660588cd5fc2Smrg fi 660688cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 660788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 660888cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 660988cd5fc2Smrg ;; 661088cd5fc2Smrg 661188cd5fc2Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 661288cd5fc2Smrg if test "$GCC" = yes; then 661388cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 661488cd5fc2Smrg _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' 661588cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 661688cd5fc2Smrg else 661788cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 661888cd5fc2Smrg _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' 661988cd5fc2Smrg _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~ 662088cd5fc2Smrg $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' 662188cd5fc2Smrg 662288cd5fc2Smrg # Both c and cxx compiler support -rpath directly 662388cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 662488cd5fc2Smrg fi 662588cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 662688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 662788cd5fc2Smrg ;; 662888cd5fc2Smrg 662988cd5fc2Smrg solaris*) 663088cd5fc2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 663188cd5fc2Smrg if test "$GCC" = yes; then 663288cd5fc2Smrg wlarc='${wl}' 663388cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 663488cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 663588cd5fc2Smrg $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' 663688cd5fc2Smrg else 663788cd5fc2Smrg case `$CC -V 2>&1` in 663888cd5fc2Smrg *"Compilers 5.0"*) 663988cd5fc2Smrg wlarc='' 664088cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 664188cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 664288cd5fc2Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 664388cd5fc2Smrg ;; 664488cd5fc2Smrg *) 664588cd5fc2Smrg wlarc='${wl}' 664688cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 664788cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 664888cd5fc2Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 664988cd5fc2Smrg ;; 665088cd5fc2Smrg esac 665188cd5fc2Smrg fi 665288cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 665388cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 665488cd5fc2Smrg case $host_os in 665588cd5fc2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 665688cd5fc2Smrg *) 665788cd5fc2Smrg # The compiler driver will combine and reorder linker options, 665888cd5fc2Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 665988cd5fc2Smrg # but is careful enough not to reorder. 666088cd5fc2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 666188cd5fc2Smrg if test "$GCC" = yes; then 666288cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 666388cd5fc2Smrg else 666488cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 666588cd5fc2Smrg fi 666688cd5fc2Smrg ;; 666788cd5fc2Smrg esac 666888cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 666988cd5fc2Smrg ;; 667088cd5fc2Smrg 667188cd5fc2Smrg sunos4*) 667288cd5fc2Smrg if test "x$host_vendor" = xsequent; then 667388cd5fc2Smrg # Use $CC to link under sequent, because it throws in some extra .o 667488cd5fc2Smrg # files that make .init and .fini sections work. 667588cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 667688cd5fc2Smrg else 667788cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 667888cd5fc2Smrg fi 667988cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 668088cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 668188cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 668288cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 668388cd5fc2Smrg ;; 668488cd5fc2Smrg 668588cd5fc2Smrg sysv4) 668688cd5fc2Smrg case $host_vendor in 668788cd5fc2Smrg sni) 668888cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 668988cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 669088cd5fc2Smrg ;; 669188cd5fc2Smrg siemens) 669288cd5fc2Smrg ## LD is ld it makes a PLAMLIB 669388cd5fc2Smrg ## CC just makes a GrossModule. 669488cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 669588cd5fc2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 669688cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 669788cd5fc2Smrg ;; 669888cd5fc2Smrg motorola) 669988cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 670088cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 670188cd5fc2Smrg ;; 670288cd5fc2Smrg esac 670388cd5fc2Smrg runpath_var='LD_RUN_PATH' 670488cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 670588cd5fc2Smrg ;; 670688cd5fc2Smrg 670788cd5fc2Smrg sysv4.3*) 670888cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 670988cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 671088cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 671188cd5fc2Smrg ;; 671288cd5fc2Smrg 671388cd5fc2Smrg sysv4*MP*) 671488cd5fc2Smrg if test -d /usr/nec; then 671588cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 671688cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 671788cd5fc2Smrg runpath_var=LD_RUN_PATH 671888cd5fc2Smrg hardcode_runpath_var=yes 671988cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 672088cd5fc2Smrg fi 672188cd5fc2Smrg ;; 672288cd5fc2Smrg 672388cd5fc2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 672488cd5fc2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 672588cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 672688cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 672788cd5fc2Smrg runpath_var='LD_RUN_PATH' 672888cd5fc2Smrg 672988cd5fc2Smrg if test "$GCC" = yes; then 673088cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 673188cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 673288cd5fc2Smrg else 673388cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 673488cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 673588cd5fc2Smrg fi 673688cd5fc2Smrg ;; 673788cd5fc2Smrg 673888cd5fc2Smrg sysv5* | sco3.2v5* | sco5v6*) 673988cd5fc2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 674088cd5fc2Smrg # link with -lc, and that would cause any symbols used from libc to 674188cd5fc2Smrg # always be unresolved, which means just about no library would 674288cd5fc2Smrg # ever link correctly. If we're not using GNU ld we use -z text 674388cd5fc2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 674488cd5fc2Smrg # as -z defs. 674588cd5fc2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 674688cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 674788cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 674888cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 674988cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 675088cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 675188cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 675288cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 675388cd5fc2Smrg runpath_var='LD_RUN_PATH' 675488cd5fc2Smrg 675588cd5fc2Smrg if test "$GCC" = yes; then 675688cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 675788cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 675888cd5fc2Smrg else 675988cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 676088cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 676188cd5fc2Smrg fi 676288cd5fc2Smrg ;; 676388cd5fc2Smrg 676488cd5fc2Smrg uts4*) 676588cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 676688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 676788cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 676888cd5fc2Smrg ;; 676988cd5fc2Smrg 677088cd5fc2Smrg *) 677188cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 677288cd5fc2Smrg ;; 677388cd5fc2Smrg esac 677488cd5fc2Smrg 677588cd5fc2Smrg if test x$host_vendor = xsni; then 677688cd5fc2Smrg case $host in 677788cd5fc2Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 677888cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 677988cd5fc2Smrg ;; 678088cd5fc2Smrg esac 678188cd5fc2Smrg fi 678288cd5fc2Smrg fi 678388cd5fc2Smrg]) 678488cd5fc2SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 678588cd5fc2Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 678688cd5fc2Smrg 678788cd5fc2Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 678888cd5fc2Smrg 678988cd5fc2Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 679088cd5fc2Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 679188cd5fc2Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 679288cd5fc2Smrg [The commands to extract the exported symbol list from a shared archive]) 679388cd5fc2Smrg 679488cd5fc2Smrg# 679588cd5fc2Smrg# Do we need to explicitly link libc? 679688cd5fc2Smrg# 679788cd5fc2Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 679888cd5fc2Smrgx|xyes) 679988cd5fc2Smrg # Assume -lc should be added 680088cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 680188cd5fc2Smrg 680288cd5fc2Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 680388cd5fc2Smrg case $_LT_TAGVAR(archive_cmds, $1) in 680488cd5fc2Smrg *'~'*) 680588cd5fc2Smrg # FIXME: we may have to deal with multi-command sequences. 680688cd5fc2Smrg ;; 680788cd5fc2Smrg '$CC '*) 680888cd5fc2Smrg # Test whether the compiler implicitly links with -lc since on some 680988cd5fc2Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 681088cd5fc2Smrg # to ld, don't add -lc before -lgcc. 681188cd5fc2Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 681288cd5fc2Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 681388cd5fc2Smrg [$RM conftest* 681488cd5fc2Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 681588cd5fc2Smrg 681688cd5fc2Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 681788cd5fc2Smrg soname=conftest 681888cd5fc2Smrg lib=conftest 681988cd5fc2Smrg libobjs=conftest.$ac_objext 682088cd5fc2Smrg deplibs= 682188cd5fc2Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 682288cd5fc2Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 682388cd5fc2Smrg compiler_flags=-v 682488cd5fc2Smrg linker_flags=-v 682588cd5fc2Smrg verstring= 682688cd5fc2Smrg output_objdir=. 682788cd5fc2Smrg libname=conftest 682888cd5fc2Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 682988cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 683088cd5fc2Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 683188cd5fc2Smrg then 683288cd5fc2Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 683388cd5fc2Smrg else 683488cd5fc2Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 683588cd5fc2Smrg fi 683688cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 683788cd5fc2Smrg else 683888cd5fc2Smrg cat conftest.err 1>&5 683988cd5fc2Smrg fi 684088cd5fc2Smrg $RM conftest* 684188cd5fc2Smrg ]) 684288cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 684388cd5fc2Smrg ;; 684488cd5fc2Smrg esac 684588cd5fc2Smrg fi 684688cd5fc2Smrg ;; 684788cd5fc2Smrgesac 684888cd5fc2Smrg 684988cd5fc2Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 685088cd5fc2Smrg [Whether or not to add -lc for building shared libraries]) 685188cd5fc2Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 685288cd5fc2Smrg [enable_shared_with_static_runtimes], [0], 685388cd5fc2Smrg [Whether or not to disallow shared libs when runtime libs are static]) 685488cd5fc2Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 685588cd5fc2Smrg [Compiler flag to allow reflexive dlopens]) 685688cd5fc2Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 685788cd5fc2Smrg [Compiler flag to generate shared objects directly from archives]) 685888cd5fc2Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 685988cd5fc2Smrg [Whether the compiler copes with passing no objects directly]) 686088cd5fc2Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 686188cd5fc2Smrg [Create an old-style archive from a shared archive]) 686288cd5fc2Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 686388cd5fc2Smrg [Create a temporary old-style archive to link instead of a shared archive]) 686488cd5fc2Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 686588cd5fc2Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 686688cd5fc2Smrg_LT_TAGDECL([], [module_cmds], [2], 686788cd5fc2Smrg [Commands used to build a loadable module if different from building 686888cd5fc2Smrg a shared archive.]) 686988cd5fc2Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 687088cd5fc2Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 687188cd5fc2Smrg [Whether we are building with GNU ld or not]) 687288cd5fc2Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 687388cd5fc2Smrg [Flag that allows shared libraries with undefined symbols to be built]) 687488cd5fc2Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 687588cd5fc2Smrg [Flag that enforces no undefined symbols]) 687688cd5fc2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 687788cd5fc2Smrg [Flag to hardcode $libdir into a binary during linking. 687888cd5fc2Smrg This must work even if $libdir does not exist]) 687988cd5fc2Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 688088cd5fc2Smrg [Whether we need a single "-rpath" flag with a separated argument]) 688188cd5fc2Smrg_LT_TAGDECL([], [hardcode_direct], [0], 688288cd5fc2Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 688388cd5fc2Smrg DIR into the resulting binary]) 688488cd5fc2Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 688588cd5fc2Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 688688cd5fc2Smrg DIR into the resulting binary and the resulting library dependency is 688788cd5fc2Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 688888cd5fc2Smrg library is relocated]) 688988cd5fc2Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 689088cd5fc2Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 689188cd5fc2Smrg into the resulting binary]) 689288cd5fc2Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 689388cd5fc2Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 689488cd5fc2Smrg into the resulting binary]) 689588cd5fc2Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 689688cd5fc2Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 689788cd5fc2Smrg into the library and all subsequent libraries and executables linked 689888cd5fc2Smrg against it]) 689988cd5fc2Smrg_LT_TAGDECL([], [inherit_rpath], [0], 690088cd5fc2Smrg [Set to yes if linker adds runtime paths of dependent libraries 690188cd5fc2Smrg to runtime path list]) 690288cd5fc2Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 690388cd5fc2Smrg [Whether libtool must link a program against all its dependency libraries]) 690488cd5fc2Smrg_LT_TAGDECL([], [always_export_symbols], [0], 690588cd5fc2Smrg [Set to "yes" if exported symbols are required]) 690688cd5fc2Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 690788cd5fc2Smrg [The commands to list exported symbols]) 690888cd5fc2Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 690988cd5fc2Smrg [Symbols that should not be listed in the preloaded symbols]) 691088cd5fc2Smrg_LT_TAGDECL([], [include_expsyms], [1], 691188cd5fc2Smrg [Symbols that must always be exported]) 691288cd5fc2Smrg_LT_TAGDECL([], [prelink_cmds], [2], 691388cd5fc2Smrg [Commands necessary for linking programs (against libraries) with templates]) 691488cd5fc2Smrg_LT_TAGDECL([], [postlink_cmds], [2], 691588cd5fc2Smrg [Commands necessary for finishing linking programs]) 691688cd5fc2Smrg_LT_TAGDECL([], [file_list_spec], [1], 691788cd5fc2Smrg [Specify filename containing input files]) 691888cd5fc2Smrgdnl FIXME: Not yet implemented 691988cd5fc2Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 692088cd5fc2Smrgdnl [Compiler flag to generate thread safe objects]) 692188cd5fc2Smrg])# _LT_LINKER_SHLIBS 692288cd5fc2Smrg 692388cd5fc2Smrg 692488cd5fc2Smrg# _LT_LANG_C_CONFIG([TAG]) 692588cd5fc2Smrg# ------------------------ 692688cd5fc2Smrg# Ensure that the configuration variables for a C compiler are suitably 692788cd5fc2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 692888cd5fc2Smrg# the compiler configuration to `libtool'. 692988cd5fc2Smrgm4_defun([_LT_LANG_C_CONFIG], 693088cd5fc2Smrg[m4_require([_LT_DECL_EGREP])dnl 693188cd5fc2Smrglt_save_CC="$CC" 693288cd5fc2SmrgAC_LANG_PUSH(C) 693388cd5fc2Smrg 693488cd5fc2Smrg# Source file extension for C test sources. 693588cd5fc2Smrgac_ext=c 693688cd5fc2Smrg 693788cd5fc2Smrg# Object file extension for compiled C test sources. 693888cd5fc2Smrgobjext=o 693988cd5fc2Smrg_LT_TAGVAR(objext, $1)=$objext 694088cd5fc2Smrg 694188cd5fc2Smrg# Code to be used in simple compile tests 694288cd5fc2Smrglt_simple_compile_test_code="int some_variable = 0;" 694388cd5fc2Smrg 694488cd5fc2Smrg# Code to be used in simple link tests 694588cd5fc2Smrglt_simple_link_test_code='int main(){return(0);}' 694688cd5fc2Smrg 694788cd5fc2Smrg_LT_TAG_COMPILER 694888cd5fc2Smrg# Save the default compiler, since it gets overwritten when the other 694988cd5fc2Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 695088cd5fc2Smrgcompiler_DEFAULT=$CC 695188cd5fc2Smrg 695288cd5fc2Smrg# save warnings/boilerplate of simple test code 695388cd5fc2Smrg_LT_COMPILER_BOILERPLATE 695488cd5fc2Smrg_LT_LINKER_BOILERPLATE 695588cd5fc2Smrg 695688cd5fc2Smrgif test -n "$compiler"; then 695788cd5fc2Smrg _LT_COMPILER_NO_RTTI($1) 695888cd5fc2Smrg _LT_COMPILER_PIC($1) 695988cd5fc2Smrg _LT_COMPILER_C_O($1) 696088cd5fc2Smrg _LT_COMPILER_FILE_LOCKS($1) 696188cd5fc2Smrg _LT_LINKER_SHLIBS($1) 696288cd5fc2Smrg _LT_SYS_DYNAMIC_LINKER($1) 696388cd5fc2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 696488cd5fc2Smrg LT_SYS_DLOPEN_SELF 696588cd5fc2Smrg _LT_CMD_STRIPLIB 696688cd5fc2Smrg 696788cd5fc2Smrg # Report which library types will actually be built 696888cd5fc2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 696988cd5fc2Smrg AC_MSG_RESULT([$can_build_shared]) 697088cd5fc2Smrg 697188cd5fc2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 697288cd5fc2Smrg test "$can_build_shared" = "no" && enable_shared=no 697388cd5fc2Smrg 697488cd5fc2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 697588cd5fc2Smrg # are all built from PIC. 697688cd5fc2Smrg case $host_os in 697788cd5fc2Smrg aix3*) 697888cd5fc2Smrg test "$enable_shared" = yes && enable_static=no 697988cd5fc2Smrg if test -n "$RANLIB"; then 698088cd5fc2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 698188cd5fc2Smrg postinstall_cmds='$RANLIB $lib' 698288cd5fc2Smrg fi 698388cd5fc2Smrg ;; 698488cd5fc2Smrg 698588cd5fc2Smrg aix[[4-9]]*) 698688cd5fc2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 698788cd5fc2Smrg test "$enable_shared" = yes && enable_static=no 698888cd5fc2Smrg fi 698988cd5fc2Smrg ;; 699088cd5fc2Smrg esac 699188cd5fc2Smrg AC_MSG_RESULT([$enable_shared]) 699288cd5fc2Smrg 699388cd5fc2Smrg AC_MSG_CHECKING([whether to build static libraries]) 699488cd5fc2Smrg # Make sure either enable_shared or enable_static is yes. 699588cd5fc2Smrg test "$enable_shared" = yes || enable_static=yes 699688cd5fc2Smrg AC_MSG_RESULT([$enable_static]) 699788cd5fc2Smrg 699888cd5fc2Smrg _LT_CONFIG($1) 699988cd5fc2Smrgfi 700088cd5fc2SmrgAC_LANG_POP 700188cd5fc2SmrgCC="$lt_save_CC" 700288cd5fc2Smrg])# _LT_LANG_C_CONFIG 700388cd5fc2Smrg 700488cd5fc2Smrg 700588cd5fc2Smrg# _LT_LANG_CXX_CONFIG([TAG]) 700688cd5fc2Smrg# -------------------------- 700788cd5fc2Smrg# Ensure that the configuration variables for a C++ compiler are suitably 700888cd5fc2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 700988cd5fc2Smrg# the compiler configuration to `libtool'. 701088cd5fc2Smrgm4_defun([_LT_LANG_CXX_CONFIG], 701188cd5fc2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 701288cd5fc2Smrgm4_require([_LT_DECL_EGREP])dnl 701388cd5fc2Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 701488cd5fc2Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 701588cd5fc2Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 701688cd5fc2Smrg (test "X$CXX" != "Xg++"))) ; then 701788cd5fc2Smrg AC_PROG_CXXCPP 701888cd5fc2Smrgelse 701988cd5fc2Smrg _lt_caught_CXX_error=yes 702088cd5fc2Smrgfi 702188cd5fc2Smrg 702288cd5fc2SmrgAC_LANG_PUSH(C++) 702388cd5fc2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 702488cd5fc2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 702588cd5fc2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 702688cd5fc2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 702788cd5fc2Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 702888cd5fc2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 702988cd5fc2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 703088cd5fc2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 703188cd5fc2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 703288cd5fc2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 703388cd5fc2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 703488cd5fc2Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 703588cd5fc2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 703688cd5fc2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 703788cd5fc2Smrg_LT_TAGVAR(module_cmds, $1)= 703888cd5fc2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 703988cd5fc2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 704088cd5fc2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 704188cd5fc2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 704288cd5fc2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 704388cd5fc2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 704488cd5fc2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 704588cd5fc2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 704688cd5fc2Smrg 704788cd5fc2Smrg# Source file extension for C++ test sources. 704888cd5fc2Smrgac_ext=cpp 704988cd5fc2Smrg 705088cd5fc2Smrg# Object file extension for compiled C++ test sources. 705188cd5fc2Smrgobjext=o 705288cd5fc2Smrg_LT_TAGVAR(objext, $1)=$objext 705388cd5fc2Smrg 705488cd5fc2Smrg# No sense in running all these tests if we already determined that 705588cd5fc2Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 705688cd5fc2Smrg# are currently assumed to apply to all compilers on this platform, 705788cd5fc2Smrg# and will be corrupted by setting them based on a non-working compiler. 705888cd5fc2Smrgif test "$_lt_caught_CXX_error" != yes; then 705988cd5fc2Smrg # Code to be used in simple compile tests 706088cd5fc2Smrg lt_simple_compile_test_code="int some_variable = 0;" 706188cd5fc2Smrg 706288cd5fc2Smrg # Code to be used in simple link tests 706388cd5fc2Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 706488cd5fc2Smrg 706588cd5fc2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 706688cd5fc2Smrg _LT_TAG_COMPILER 706788cd5fc2Smrg 706888cd5fc2Smrg # save warnings/boilerplate of simple test code 706988cd5fc2Smrg _LT_COMPILER_BOILERPLATE 707088cd5fc2Smrg _LT_LINKER_BOILERPLATE 707188cd5fc2Smrg 707288cd5fc2Smrg # Allow CC to be a program name with arguments. 707388cd5fc2Smrg lt_save_CC=$CC 707488cd5fc2Smrg lt_save_CFLAGS=$CFLAGS 707588cd5fc2Smrg lt_save_LD=$LD 707688cd5fc2Smrg lt_save_GCC=$GCC 707788cd5fc2Smrg GCC=$GXX 707888cd5fc2Smrg lt_save_with_gnu_ld=$with_gnu_ld 707988cd5fc2Smrg lt_save_path_LD=$lt_cv_path_LD 708088cd5fc2Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 708188cd5fc2Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 708288cd5fc2Smrg else 708388cd5fc2Smrg $as_unset lt_cv_prog_gnu_ld 708488cd5fc2Smrg fi 708588cd5fc2Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 708688cd5fc2Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 708788cd5fc2Smrg else 708888cd5fc2Smrg $as_unset lt_cv_path_LD 708988cd5fc2Smrg fi 709088cd5fc2Smrg test -z "${LDCXX+set}" || LD=$LDCXX 709188cd5fc2Smrg CC=${CXX-"c++"} 709288cd5fc2Smrg CFLAGS=$CXXFLAGS 709388cd5fc2Smrg compiler=$CC 709488cd5fc2Smrg _LT_TAGVAR(compiler, $1)=$CC 709588cd5fc2Smrg _LT_CC_BASENAME([$compiler]) 709688cd5fc2Smrg 709788cd5fc2Smrg if test -n "$compiler"; then 709888cd5fc2Smrg # We don't want -fno-exception when compiling C++ code, so set the 709988cd5fc2Smrg # no_builtin_flag separately 710088cd5fc2Smrg if test "$GXX" = yes; then 710188cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 710288cd5fc2Smrg else 710388cd5fc2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 710488cd5fc2Smrg fi 710588cd5fc2Smrg 710688cd5fc2Smrg if test "$GXX" = yes; then 710788cd5fc2Smrg # Set up default GNU C++ configuration 710888cd5fc2Smrg 710988cd5fc2Smrg LT_PATH_LD 711088cd5fc2Smrg 711188cd5fc2Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 711288cd5fc2Smrg # archiving commands below assume that GNU ld is being used. 711388cd5fc2Smrg if test "$with_gnu_ld" = yes; then 711488cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 711588cd5fc2Smrg _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' 711688cd5fc2Smrg 711788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 711888cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 711988cd5fc2Smrg 712088cd5fc2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 712188cd5fc2Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 712288cd5fc2Smrg # investigate it a little bit more. (MM) 712388cd5fc2Smrg wlarc='${wl}' 712488cd5fc2Smrg 712588cd5fc2Smrg # ancient GNU ld didn't support --whole-archive et. al. 712688cd5fc2Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 712788cd5fc2Smrg $GREP 'no-whole-archive' > /dev/null; then 712888cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 712988cd5fc2Smrg else 713088cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 713188cd5fc2Smrg fi 713288cd5fc2Smrg else 713388cd5fc2Smrg with_gnu_ld=no 713488cd5fc2Smrg wlarc= 713588cd5fc2Smrg 713688cd5fc2Smrg # A generic and very simple default shared library creation 713788cd5fc2Smrg # command for GNU C++ for the case where it uses the native 713888cd5fc2Smrg # linker, instead of GNU ld. If possible, this setting should 713988cd5fc2Smrg # overridden to take advantage of the native linker features on 714088cd5fc2Smrg # the platform it is being used on. 714188cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 714288cd5fc2Smrg fi 714388cd5fc2Smrg 714488cd5fc2Smrg # Commands to make compiler produce verbose output that lists 714588cd5fc2Smrg # what "hidden" libraries, object files and flags are used when 714688cd5fc2Smrg # linking a shared library. 714788cd5fc2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 714888cd5fc2Smrg 714988cd5fc2Smrg else 715088cd5fc2Smrg GXX=no 715188cd5fc2Smrg with_gnu_ld=no 715288cd5fc2Smrg wlarc= 715388cd5fc2Smrg fi 715488cd5fc2Smrg 715588cd5fc2Smrg # PORTME: fill in a description of your system's C++ link characteristics 715688cd5fc2Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 715788cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 715888cd5fc2Smrg case $host_os in 715988cd5fc2Smrg aix3*) 716088cd5fc2Smrg # FIXME: insert proper C++ library support 716188cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 716288cd5fc2Smrg ;; 716388cd5fc2Smrg aix[[4-9]]*) 716488cd5fc2Smrg if test "$host_cpu" = ia64; then 716588cd5fc2Smrg # On IA64, the linker does run time linking by default, so we don't 716688cd5fc2Smrg # have to do anything special. 716788cd5fc2Smrg aix_use_runtimelinking=no 716888cd5fc2Smrg exp_sym_flag='-Bexport' 716988cd5fc2Smrg no_entry_flag="" 717088cd5fc2Smrg else 717188cd5fc2Smrg aix_use_runtimelinking=no 717288cd5fc2Smrg 717388cd5fc2Smrg # Test if we are trying to use run time linking or normal 717488cd5fc2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 717588cd5fc2Smrg # need to do runtime linking. 717688cd5fc2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 717788cd5fc2Smrg for ld_flag in $LDFLAGS; do 717888cd5fc2Smrg case $ld_flag in 717988cd5fc2Smrg *-brtl*) 718088cd5fc2Smrg aix_use_runtimelinking=yes 718188cd5fc2Smrg break 718288cd5fc2Smrg ;; 718388cd5fc2Smrg esac 718488cd5fc2Smrg done 718588cd5fc2Smrg ;; 718688cd5fc2Smrg esac 718788cd5fc2Smrg 718888cd5fc2Smrg exp_sym_flag='-bexport' 718988cd5fc2Smrg no_entry_flag='-bnoentry' 719088cd5fc2Smrg fi 719188cd5fc2Smrg 719288cd5fc2Smrg # When large executables or shared objects are built, AIX ld can 719388cd5fc2Smrg # have problems creating the table of contents. If linking a library 719488cd5fc2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 719588cd5fc2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 719688cd5fc2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 719788cd5fc2Smrg 719888cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='' 719988cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 720088cd5fc2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 720188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 720288cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 720388cd5fc2Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 720488cd5fc2Smrg 720588cd5fc2Smrg if test "$GXX" = yes; then 720688cd5fc2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 720788cd5fc2Smrg # We only want to do this on AIX 4.2 and lower, the check 720888cd5fc2Smrg # below for broken collect2 doesn't work under 4.3+ 720988cd5fc2Smrg collect2name=`${CC} -print-prog-name=collect2` 721088cd5fc2Smrg if test -f "$collect2name" && 721188cd5fc2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 721288cd5fc2Smrg then 721388cd5fc2Smrg # We have reworked collect2 721488cd5fc2Smrg : 721588cd5fc2Smrg else 721688cd5fc2Smrg # We have old collect2 721788cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 721888cd5fc2Smrg # It fails to find uninstalled libraries when the uninstalled 721988cd5fc2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 722088cd5fc2Smrg # to unsupported forces relinking 722188cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 722288cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 722388cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 722488cd5fc2Smrg fi 722588cd5fc2Smrg esac 722688cd5fc2Smrg shared_flag='-shared' 722788cd5fc2Smrg if test "$aix_use_runtimelinking" = yes; then 722888cd5fc2Smrg shared_flag="$shared_flag "'${wl}-G' 722988cd5fc2Smrg fi 723088cd5fc2Smrg else 723188cd5fc2Smrg # not using gcc 723288cd5fc2Smrg if test "$host_cpu" = ia64; then 723388cd5fc2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 723488cd5fc2Smrg # chokes on -Wl,-G. The following line is correct: 723588cd5fc2Smrg shared_flag='-G' 723688cd5fc2Smrg else 723788cd5fc2Smrg if test "$aix_use_runtimelinking" = yes; then 723888cd5fc2Smrg shared_flag='${wl}-G' 723988cd5fc2Smrg else 724088cd5fc2Smrg shared_flag='${wl}-bM:SRE' 724188cd5fc2Smrg fi 724288cd5fc2Smrg fi 724388cd5fc2Smrg fi 724488cd5fc2Smrg 724588cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 724688cd5fc2Smrg # It seems that -bexpall does not export symbols beginning with 724788cd5fc2Smrg # underscore (_), so it is better to generate a list of symbols to 724888cd5fc2Smrg # export. 724988cd5fc2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 725088cd5fc2Smrg if test "$aix_use_runtimelinking" = yes; then 725188cd5fc2Smrg # Warning - without using the other runtime loading flags (-brtl), 725288cd5fc2Smrg # -berok will link without error, but may produce a broken library. 725388cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 725488cd5fc2Smrg # Determine the default libpath from the value encoded in an empty 725588cd5fc2Smrg # executable. 725688cd5fc2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 725788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 725888cd5fc2Smrg 725988cd5fc2Smrg _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" 726088cd5fc2Smrg else 726188cd5fc2Smrg if test "$host_cpu" = ia64; then 726288cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 726388cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 726488cd5fc2Smrg _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" 726588cd5fc2Smrg else 726688cd5fc2Smrg # Determine the default libpath from the value encoded in an 726788cd5fc2Smrg # empty executable. 726888cd5fc2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 726988cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 727088cd5fc2Smrg # Warning - without using the other run time loading flags, 727188cd5fc2Smrg # -berok will link without error, but may produce a broken library. 727288cd5fc2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 727388cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 727488cd5fc2Smrg if test "$with_gnu_ld" = yes; then 727588cd5fc2Smrg # We only use this code for GNU lds that support --whole-archive. 727688cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 727788cd5fc2Smrg else 727888cd5fc2Smrg # Exported symbols can be pulled into shared objects from archives 727988cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 728088cd5fc2Smrg fi 728188cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 728288cd5fc2Smrg # This is similar to how AIX traditionally builds its shared 728388cd5fc2Smrg # libraries. 728488cd5fc2Smrg _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' 728588cd5fc2Smrg fi 728688cd5fc2Smrg fi 728788cd5fc2Smrg ;; 728888cd5fc2Smrg 728988cd5fc2Smrg beos*) 729088cd5fc2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 729188cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 729288cd5fc2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 729388cd5fc2Smrg # support --undefined. This deserves some investigation. FIXME 729488cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 729588cd5fc2Smrg else 729688cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 729788cd5fc2Smrg fi 729888cd5fc2Smrg ;; 729988cd5fc2Smrg 730088cd5fc2Smrg chorus*) 730188cd5fc2Smrg case $cc_basename in 730288cd5fc2Smrg *) 730388cd5fc2Smrg # FIXME: insert proper C++ library support 730488cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 730588cd5fc2Smrg ;; 730688cd5fc2Smrg esac 730788cd5fc2Smrg ;; 730888cd5fc2Smrg 730988cd5fc2Smrg cygwin* | mingw* | pw32* | cegcc*) 731088cd5fc2Smrg case $GXX,$cc_basename in 731188cd5fc2Smrg ,cl* | no,cl*) 731288cd5fc2Smrg # Native MSVC 731388cd5fc2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 731488cd5fc2Smrg # no search path for DLLs. 731588cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 731688cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 731788cd5fc2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 731888cd5fc2Smrg _LT_TAGVAR(file_list_spec, $1)='@' 731988cd5fc2Smrg # Tell ltmain to make .lib files, not .a files. 732088cd5fc2Smrg libext=lib 732188cd5fc2Smrg # Tell ltmain to make .dll files, not .so files. 732288cd5fc2Smrg shrext_cmds=".dll" 732388cd5fc2Smrg # FIXME: Setting linknames here is a bad hack. 732488cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 732588cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 732688cd5fc2Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 732788cd5fc2Smrg else 732888cd5fc2Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 732988cd5fc2Smrg fi~ 733088cd5fc2Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 733188cd5fc2Smrg linknames=' 733288cd5fc2Smrg # The linker will not automatically build a static lib if we build a DLL. 733388cd5fc2Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 733488cd5fc2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 733588cd5fc2Smrg # Don't use ranlib 733688cd5fc2Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 733788cd5fc2Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 733888cd5fc2Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 733988cd5fc2Smrg case $lt_outputfile in 734088cd5fc2Smrg *.exe|*.EXE) ;; 734188cd5fc2Smrg *) 734288cd5fc2Smrg lt_outputfile="$lt_outputfile.exe" 734388cd5fc2Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 734488cd5fc2Smrg ;; 734588cd5fc2Smrg esac~ 734688cd5fc2Smrg func_to_tool_file "$lt_outputfile"~ 734788cd5fc2Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 734888cd5fc2Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 734988cd5fc2Smrg $RM "$lt_outputfile.manifest"; 735088cd5fc2Smrg fi' 735188cd5fc2Smrg ;; 735288cd5fc2Smrg *) 735388cd5fc2Smrg # g++ 735488cd5fc2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 735588cd5fc2Smrg # as there is no search path for DLLs. 735688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 735788cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 735888cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 735988cd5fc2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 736088cd5fc2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 736188cd5fc2Smrg 736288cd5fc2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 736388cd5fc2Smrg _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' 736488cd5fc2Smrg # If the export-symbols file already is a .def file (1st line 736588cd5fc2Smrg # is EXPORTS), use it as is; otherwise, prepend... 736688cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 736788cd5fc2Smrg cp $export_symbols $output_objdir/$soname.def; 736888cd5fc2Smrg else 736988cd5fc2Smrg echo EXPORTS > $output_objdir/$soname.def; 737088cd5fc2Smrg cat $export_symbols >> $output_objdir/$soname.def; 737188cd5fc2Smrg fi~ 737288cd5fc2Smrg $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' 737388cd5fc2Smrg else 737488cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 737588cd5fc2Smrg fi 737688cd5fc2Smrg ;; 737788cd5fc2Smrg esac 737888cd5fc2Smrg ;; 737988cd5fc2Smrg darwin* | rhapsody*) 738088cd5fc2Smrg _LT_DARWIN_LINKER_FEATURES($1) 738188cd5fc2Smrg ;; 738288cd5fc2Smrg 738388cd5fc2Smrg dgux*) 738488cd5fc2Smrg case $cc_basename in 738588cd5fc2Smrg ec++*) 738688cd5fc2Smrg # FIXME: insert proper C++ library support 738788cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 738888cd5fc2Smrg ;; 738988cd5fc2Smrg ghcx*) 739088cd5fc2Smrg # Green Hills C++ Compiler 739188cd5fc2Smrg # FIXME: insert proper C++ library support 739288cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739388cd5fc2Smrg ;; 739488cd5fc2Smrg *) 739588cd5fc2Smrg # FIXME: insert proper C++ library support 739688cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739788cd5fc2Smrg ;; 739888cd5fc2Smrg esac 739988cd5fc2Smrg ;; 740088cd5fc2Smrg 740188cd5fc2Smrg freebsd2.*) 740288cd5fc2Smrg # C++ shared libraries reported to be fairly broken before 740388cd5fc2Smrg # switch to ELF 740488cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 740588cd5fc2Smrg ;; 740688cd5fc2Smrg 740788cd5fc2Smrg freebsd-elf*) 740888cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 740988cd5fc2Smrg ;; 741088cd5fc2Smrg 741188cd5fc2Smrg freebsd* | dragonfly*) 741288cd5fc2Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 741388cd5fc2Smrg # conventions 741488cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 741588cd5fc2Smrg ;; 741688cd5fc2Smrg 741788cd5fc2Smrg gnu*) 741888cd5fc2Smrg ;; 741988cd5fc2Smrg 742088cd5fc2Smrg haiku*) 742188cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 742288cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 742388cd5fc2Smrg ;; 742488cd5fc2Smrg 742588cd5fc2Smrg hpux9*) 742688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 742788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 742888cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 742988cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 743088cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 743188cd5fc2Smrg # but as the default 743288cd5fc2Smrg # location of the library. 743388cd5fc2Smrg 743488cd5fc2Smrg case $cc_basename in 743588cd5fc2Smrg CC*) 743688cd5fc2Smrg # FIXME: insert proper C++ library support 743788cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 743888cd5fc2Smrg ;; 743988cd5fc2Smrg aCC*) 744088cd5fc2Smrg _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' 744188cd5fc2Smrg # Commands to make compiler produce verbose output that lists 744288cd5fc2Smrg # what "hidden" libraries, object files and flags are used when 744388cd5fc2Smrg # linking a shared library. 744488cd5fc2Smrg # 744588cd5fc2Smrg # There doesn't appear to be a way to prevent this compiler from 744688cd5fc2Smrg # explicitly linking system object files so we need to strip them 744788cd5fc2Smrg # from the output so that they don't get included in the library 744888cd5fc2Smrg # dependencies. 744988cd5fc2Smrg 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"' 745088cd5fc2Smrg ;; 745188cd5fc2Smrg *) 745288cd5fc2Smrg if test "$GXX" = yes; then 745388cd5fc2Smrg _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' 745488cd5fc2Smrg else 745588cd5fc2Smrg # FIXME: insert proper C++ library support 745688cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 745788cd5fc2Smrg fi 745888cd5fc2Smrg ;; 745988cd5fc2Smrg esac 746088cd5fc2Smrg ;; 746188cd5fc2Smrg 746288cd5fc2Smrg hpux10*|hpux11*) 746388cd5fc2Smrg if test $with_gnu_ld = no; then 746488cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 746588cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 746688cd5fc2Smrg 746788cd5fc2Smrg case $host_cpu in 746888cd5fc2Smrg hppa*64*|ia64*) 746988cd5fc2Smrg ;; 747088cd5fc2Smrg *) 747188cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 747288cd5fc2Smrg ;; 747388cd5fc2Smrg esac 747488cd5fc2Smrg fi 747588cd5fc2Smrg case $host_cpu in 747688cd5fc2Smrg hppa*64*|ia64*) 747788cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 747888cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 747988cd5fc2Smrg ;; 748088cd5fc2Smrg *) 748188cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 748288cd5fc2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 748388cd5fc2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 748488cd5fc2Smrg # but as the default 748588cd5fc2Smrg # location of the library. 748688cd5fc2Smrg ;; 748788cd5fc2Smrg esac 748888cd5fc2Smrg 748988cd5fc2Smrg case $cc_basename in 749088cd5fc2Smrg CC*) 749188cd5fc2Smrg # FIXME: insert proper C++ library support 749288cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 749388cd5fc2Smrg ;; 749488cd5fc2Smrg aCC*) 749588cd5fc2Smrg case $host_cpu in 749688cd5fc2Smrg hppa*64*) 749788cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 749888cd5fc2Smrg ;; 749988cd5fc2Smrg ia64*) 750088cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 750188cd5fc2Smrg ;; 750288cd5fc2Smrg *) 750388cd5fc2Smrg _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' 750488cd5fc2Smrg ;; 750588cd5fc2Smrg esac 750688cd5fc2Smrg # Commands to make compiler produce verbose output that lists 750788cd5fc2Smrg # what "hidden" libraries, object files and flags are used when 750888cd5fc2Smrg # linking a shared library. 750988cd5fc2Smrg # 751088cd5fc2Smrg # There doesn't appear to be a way to prevent this compiler from 751188cd5fc2Smrg # explicitly linking system object files so we need to strip them 751288cd5fc2Smrg # from the output so that they don't get included in the library 751388cd5fc2Smrg # dependencies. 751488cd5fc2Smrg 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"' 751588cd5fc2Smrg ;; 751688cd5fc2Smrg *) 751788cd5fc2Smrg if test "$GXX" = yes; then 751888cd5fc2Smrg if test $with_gnu_ld = no; then 751988cd5fc2Smrg case $host_cpu in 752088cd5fc2Smrg hppa*64*) 752188cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 752288cd5fc2Smrg ;; 752388cd5fc2Smrg ia64*) 752488cd5fc2Smrg _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' 752588cd5fc2Smrg ;; 752688cd5fc2Smrg *) 752788cd5fc2Smrg _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' 752888cd5fc2Smrg ;; 752988cd5fc2Smrg esac 753088cd5fc2Smrg fi 753188cd5fc2Smrg else 753288cd5fc2Smrg # FIXME: insert proper C++ library support 753388cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 753488cd5fc2Smrg fi 753588cd5fc2Smrg ;; 753688cd5fc2Smrg esac 753788cd5fc2Smrg ;; 753888cd5fc2Smrg 753988cd5fc2Smrg interix[[3-9]]*) 754088cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 754188cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 754288cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 754388cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 754488cd5fc2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 754588cd5fc2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 754688cd5fc2Smrg # default) and relocated if they conflict, which is a slow very memory 754788cd5fc2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 754888cd5fc2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 754988cd5fc2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 755088cd5fc2Smrg _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' 755188cd5fc2Smrg _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' 755288cd5fc2Smrg ;; 755388cd5fc2Smrg irix5* | irix6*) 755488cd5fc2Smrg case $cc_basename in 755588cd5fc2Smrg CC*) 755688cd5fc2Smrg # SGI C++ 755788cd5fc2Smrg _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' 755888cd5fc2Smrg 755988cd5fc2Smrg # Archives containing C++ object files must be created using 756088cd5fc2Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 756188cd5fc2Smrg # necessary to make sure instantiated templates are included 756288cd5fc2Smrg # in the archive. 756388cd5fc2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 756488cd5fc2Smrg ;; 756588cd5fc2Smrg *) 756688cd5fc2Smrg if test "$GXX" = yes; then 756788cd5fc2Smrg if test "$with_gnu_ld" = no; then 756888cd5fc2Smrg _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' 756988cd5fc2Smrg else 757088cd5fc2Smrg _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' 757188cd5fc2Smrg fi 757288cd5fc2Smrg fi 757388cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 757488cd5fc2Smrg ;; 757588cd5fc2Smrg esac 757688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 757788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 757888cd5fc2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 757988cd5fc2Smrg ;; 758088cd5fc2Smrg 758188cd5fc2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 758288cd5fc2Smrg case $cc_basename in 758388cd5fc2Smrg KCC*) 758488cd5fc2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 758588cd5fc2Smrg 758688cd5fc2Smrg # KCC will only create a shared library if the output file 758788cd5fc2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 758888cd5fc2Smrg # to its proper name (with version) after linking. 758988cd5fc2Smrg _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' 759088cd5fc2Smrg _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' 759188cd5fc2Smrg # Commands to make compiler produce verbose output that lists 759288cd5fc2Smrg # what "hidden" libraries, object files and flags are used when 759388cd5fc2Smrg # linking a shared library. 759488cd5fc2Smrg # 759588cd5fc2Smrg # There doesn't appear to be a way to prevent this compiler from 759688cd5fc2Smrg # explicitly linking system object files so we need to strip them 759788cd5fc2Smrg # from the output so that they don't get included in the library 759888cd5fc2Smrg # dependencies. 759988cd5fc2Smrg 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"' 760088cd5fc2Smrg 760188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 760288cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 760388cd5fc2Smrg 760488cd5fc2Smrg # Archives containing C++ object files must be created using 760588cd5fc2Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 760688cd5fc2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 760788cd5fc2Smrg ;; 760888cd5fc2Smrg icpc* | ecpc* ) 760988cd5fc2Smrg # Intel C++ 761088cd5fc2Smrg with_gnu_ld=yes 761188cd5fc2Smrg # version 8.0 and above of icpc choke on multiply defined symbols 761288cd5fc2Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 761388cd5fc2Smrg # earlier do not add the objects themselves. 761488cd5fc2Smrg case `$CC -V 2>&1` in 761588cd5fc2Smrg *"Version 7."*) 761688cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 761788cd5fc2Smrg _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' 761888cd5fc2Smrg ;; 761988cd5fc2Smrg *) # Version 8.0 or newer 762088cd5fc2Smrg tmp_idyn= 762188cd5fc2Smrg case $host_cpu in 762288cd5fc2Smrg ia64*) tmp_idyn=' -i_dynamic';; 762388cd5fc2Smrg esac 762488cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 762588cd5fc2Smrg _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' 762688cd5fc2Smrg ;; 762788cd5fc2Smrg esac 762888cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 762988cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 763088cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 763188cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 763288cd5fc2Smrg ;; 763388cd5fc2Smrg pgCC* | pgcpp*) 763488cd5fc2Smrg # Portland Group C++ compiler 763588cd5fc2Smrg case `$CC -V` in 763688cd5fc2Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 763788cd5fc2Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 763888cd5fc2Smrg rm -rf $tpldir~ 763988cd5fc2Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 764088cd5fc2Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 764188cd5fc2Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 764288cd5fc2Smrg rm -rf $tpldir~ 764388cd5fc2Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 764488cd5fc2Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 764588cd5fc2Smrg $RANLIB $oldlib' 764688cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 764788cd5fc2Smrg rm -rf $tpldir~ 764888cd5fc2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 764988cd5fc2Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 765088cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 765188cd5fc2Smrg rm -rf $tpldir~ 765288cd5fc2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 765388cd5fc2Smrg $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' 765488cd5fc2Smrg ;; 765588cd5fc2Smrg *) # Version 6 and above use weak symbols 765688cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 765788cd5fc2Smrg _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' 765888cd5fc2Smrg ;; 765988cd5fc2Smrg esac 766088cd5fc2Smrg 766188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 766288cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 766388cd5fc2Smrg _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' 766488cd5fc2Smrg ;; 766588cd5fc2Smrg cxx*) 766688cd5fc2Smrg # Compaq C++ 766788cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 766888cd5fc2Smrg _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' 766988cd5fc2Smrg 767088cd5fc2Smrg runpath_var=LD_RUN_PATH 767188cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 767288cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 767388cd5fc2Smrg 767488cd5fc2Smrg # Commands to make compiler produce verbose output that lists 767588cd5fc2Smrg # what "hidden" libraries, object files and flags are used when 767688cd5fc2Smrg # linking a shared library. 767788cd5fc2Smrg # 767888cd5fc2Smrg # There doesn't appear to be a way to prevent this compiler from 767988cd5fc2Smrg # explicitly linking system object files so we need to strip them 768088cd5fc2Smrg # from the output so that they don't get included in the library 768188cd5fc2Smrg # dependencies. 768288cd5fc2Smrg 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' 768388cd5fc2Smrg ;; 768488cd5fc2Smrg xl* | mpixl* | bgxl*) 768588cd5fc2Smrg # IBM XL 8.0 on PPC, with GNU ld 768688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 768788cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 768888cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 768988cd5fc2Smrg if test "x$supports_anon_versioning" = xyes; then 769088cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 769188cd5fc2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 769288cd5fc2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 769388cd5fc2Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 769488cd5fc2Smrg fi 769588cd5fc2Smrg ;; 769688cd5fc2Smrg *) 769788cd5fc2Smrg case `$CC -V 2>&1 | sed 5q` in 769888cd5fc2Smrg *Sun\ C*) 769988cd5fc2Smrg # Sun C++ 5.9 770088cd5fc2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 770188cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 770288cd5fc2Smrg _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' 770388cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 770488cd5fc2Smrg _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' 770588cd5fc2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 770688cd5fc2Smrg 770788cd5fc2Smrg # Not sure whether something based on 770888cd5fc2Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 770988cd5fc2Smrg # would be better. 771088cd5fc2Smrg output_verbose_link_cmd='func_echo_all' 771188cd5fc2Smrg 771288cd5fc2Smrg # Archives containing C++ object files must be created using 771388cd5fc2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 771488cd5fc2Smrg # necessary to make sure instantiated templates are included 771588cd5fc2Smrg # in the archive. 771688cd5fc2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 771788cd5fc2Smrg ;; 771888cd5fc2Smrg esac 771988cd5fc2Smrg ;; 772088cd5fc2Smrg esac 772188cd5fc2Smrg ;; 772288cd5fc2Smrg 772388cd5fc2Smrg lynxos*) 772488cd5fc2Smrg # FIXME: insert proper C++ library support 772588cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 772688cd5fc2Smrg ;; 772788cd5fc2Smrg 772888cd5fc2Smrg m88k*) 772988cd5fc2Smrg # FIXME: insert proper C++ library support 773088cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 773188cd5fc2Smrg ;; 773288cd5fc2Smrg 773388cd5fc2Smrg mvs*) 773488cd5fc2Smrg case $cc_basename in 773588cd5fc2Smrg cxx*) 773688cd5fc2Smrg # FIXME: insert proper C++ library support 773788cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 773888cd5fc2Smrg ;; 773988cd5fc2Smrg *) 774088cd5fc2Smrg # FIXME: insert proper C++ library support 774188cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 774288cd5fc2Smrg ;; 774388cd5fc2Smrg esac 774488cd5fc2Smrg ;; 774588cd5fc2Smrg 774688cd5fc2Smrg netbsd*) 774788cd5fc2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 774888cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 774988cd5fc2Smrg wlarc= 775088cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 775188cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 775288cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 775388cd5fc2Smrg fi 775488cd5fc2Smrg # Workaround some broken pre-1.5 toolchains 775588cd5fc2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 775688cd5fc2Smrg ;; 775788cd5fc2Smrg 775888cd5fc2Smrg *nto* | *qnx*) 775988cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 776088cd5fc2Smrg ;; 776188cd5fc2Smrg 776288cd5fc2Smrg openbsd2*) 776388cd5fc2Smrg # C++ shared libraries are fairly broken 776488cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 776588cd5fc2Smrg ;; 776688cd5fc2Smrg 776788cd5fc2Smrg openbsd*) 776888cd5fc2Smrg if test -f /usr/libexec/ld.so; then 776988cd5fc2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 777088cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 777188cd5fc2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 777288cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 777388cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 777488cd5fc2Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 777588cd5fc2Smrg _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' 777688cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 777788cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 777888cd5fc2Smrg fi 777988cd5fc2Smrg output_verbose_link_cmd=func_echo_all 778088cd5fc2Smrg else 778188cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 778288cd5fc2Smrg fi 778388cd5fc2Smrg ;; 778488cd5fc2Smrg 778588cd5fc2Smrg osf3* | osf4* | osf5*) 778688cd5fc2Smrg case $cc_basename in 778788cd5fc2Smrg KCC*) 778888cd5fc2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 778988cd5fc2Smrg 779088cd5fc2Smrg # KCC will only create a shared library if the output file 779188cd5fc2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 779288cd5fc2Smrg # to its proper name (with version) after linking. 779388cd5fc2Smrg _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' 779488cd5fc2Smrg 779588cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 779688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 779788cd5fc2Smrg 779888cd5fc2Smrg # Archives containing C++ object files must be created using 779988cd5fc2Smrg # the KAI C++ compiler. 780088cd5fc2Smrg case $host in 780188cd5fc2Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 780288cd5fc2Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 780388cd5fc2Smrg esac 780488cd5fc2Smrg ;; 780588cd5fc2Smrg RCC*) 780688cd5fc2Smrg # Rational C++ 2.4.1 780788cd5fc2Smrg # FIXME: insert proper C++ library support 780888cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 780988cd5fc2Smrg ;; 781088cd5fc2Smrg cxx*) 781188cd5fc2Smrg case $host in 781288cd5fc2Smrg osf3*) 781388cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 781488cd5fc2Smrg _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' 781588cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 781688cd5fc2Smrg ;; 781788cd5fc2Smrg *) 781888cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 781988cd5fc2Smrg _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' 782088cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 782188cd5fc2Smrg echo "-hidden">> $lib.exp~ 782288cd5fc2Smrg $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~ 782388cd5fc2Smrg $RM $lib.exp' 782488cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 782588cd5fc2Smrg ;; 782688cd5fc2Smrg esac 782788cd5fc2Smrg 782888cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 782988cd5fc2Smrg 783088cd5fc2Smrg # Commands to make compiler produce verbose output that lists 783188cd5fc2Smrg # what "hidden" libraries, object files and flags are used when 783288cd5fc2Smrg # linking a shared library. 783388cd5fc2Smrg # 783488cd5fc2Smrg # There doesn't appear to be a way to prevent this compiler from 783588cd5fc2Smrg # explicitly linking system object files so we need to strip them 783688cd5fc2Smrg # from the output so that they don't get included in the library 783788cd5fc2Smrg # dependencies. 783888cd5fc2Smrg 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"' 783988cd5fc2Smrg ;; 784088cd5fc2Smrg *) 784188cd5fc2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 784288cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 784388cd5fc2Smrg case $host in 784488cd5fc2Smrg osf3*) 784588cd5fc2Smrg _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' 784688cd5fc2Smrg ;; 784788cd5fc2Smrg *) 784888cd5fc2Smrg _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' 784988cd5fc2Smrg ;; 785088cd5fc2Smrg esac 785188cd5fc2Smrg 785288cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 785388cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 785488cd5fc2Smrg 785588cd5fc2Smrg # Commands to make compiler produce verbose output that lists 785688cd5fc2Smrg # what "hidden" libraries, object files and flags are used when 785788cd5fc2Smrg # linking a shared library. 785888cd5fc2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 785988cd5fc2Smrg 786088cd5fc2Smrg else 786188cd5fc2Smrg # FIXME: insert proper C++ library support 786288cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 786388cd5fc2Smrg fi 786488cd5fc2Smrg ;; 786588cd5fc2Smrg esac 786688cd5fc2Smrg ;; 786788cd5fc2Smrg 786888cd5fc2Smrg psos*) 786988cd5fc2Smrg # FIXME: insert proper C++ library support 787088cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 787188cd5fc2Smrg ;; 787288cd5fc2Smrg 787388cd5fc2Smrg sunos4*) 787488cd5fc2Smrg case $cc_basename in 787588cd5fc2Smrg CC*) 787688cd5fc2Smrg # Sun C++ 4.x 787788cd5fc2Smrg # FIXME: insert proper C++ library support 787888cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 787988cd5fc2Smrg ;; 788088cd5fc2Smrg lcc*) 788188cd5fc2Smrg # Lucid 788288cd5fc2Smrg # FIXME: insert proper C++ library support 788388cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 788488cd5fc2Smrg ;; 788588cd5fc2Smrg *) 788688cd5fc2Smrg # FIXME: insert proper C++ library support 788788cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 788888cd5fc2Smrg ;; 788988cd5fc2Smrg esac 789088cd5fc2Smrg ;; 789188cd5fc2Smrg 789288cd5fc2Smrg solaris*) 789388cd5fc2Smrg case $cc_basename in 789488cd5fc2Smrg CC* | sunCC*) 789588cd5fc2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 789688cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 789788cd5fc2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 789888cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 789988cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 790088cd5fc2Smrg $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' 790188cd5fc2Smrg 790288cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 790388cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 790488cd5fc2Smrg case $host_os in 790588cd5fc2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 790688cd5fc2Smrg *) 790788cd5fc2Smrg # The compiler driver will combine and reorder linker options, 790888cd5fc2Smrg # but understands `-z linker_flag'. 790988cd5fc2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 791088cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 791188cd5fc2Smrg ;; 791288cd5fc2Smrg esac 791388cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 791488cd5fc2Smrg 791588cd5fc2Smrg output_verbose_link_cmd='func_echo_all' 791688cd5fc2Smrg 791788cd5fc2Smrg # Archives containing C++ object files must be created using 791888cd5fc2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 791988cd5fc2Smrg # necessary to make sure instantiated templates are included 792088cd5fc2Smrg # in the archive. 792188cd5fc2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 792288cd5fc2Smrg ;; 792388cd5fc2Smrg gcx*) 792488cd5fc2Smrg # Green Hills C++ Compiler 792588cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 792688cd5fc2Smrg 792788cd5fc2Smrg # The C++ compiler must be used to create the archive. 792888cd5fc2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 792988cd5fc2Smrg ;; 793088cd5fc2Smrg *) 793188cd5fc2Smrg # GNU C++ compiler with Solaris linker 793288cd5fc2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 793388cd5fc2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 793488cd5fc2Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 793588cd5fc2Smrg _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' 793688cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 793788cd5fc2Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 793888cd5fc2Smrg 793988cd5fc2Smrg # Commands to make compiler produce verbose output that lists 794088cd5fc2Smrg # what "hidden" libraries, object files and flags are used when 794188cd5fc2Smrg # linking a shared library. 794288cd5fc2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 794388cd5fc2Smrg else 794488cd5fc2Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 794588cd5fc2Smrg # platform. 794688cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 794788cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 794888cd5fc2Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 794988cd5fc2Smrg 795088cd5fc2Smrg # Commands to make compiler produce verbose output that lists 795188cd5fc2Smrg # what "hidden" libraries, object files and flags are used when 795288cd5fc2Smrg # linking a shared library. 795388cd5fc2Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 795488cd5fc2Smrg fi 795588cd5fc2Smrg 795688cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 795788cd5fc2Smrg case $host_os in 795888cd5fc2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 795988cd5fc2Smrg *) 796088cd5fc2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 796188cd5fc2Smrg ;; 796288cd5fc2Smrg esac 796388cd5fc2Smrg fi 796488cd5fc2Smrg ;; 796588cd5fc2Smrg esac 796688cd5fc2Smrg ;; 796788cd5fc2Smrg 796888cd5fc2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 796988cd5fc2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 797088cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 797188cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 797288cd5fc2Smrg runpath_var='LD_RUN_PATH' 797388cd5fc2Smrg 797488cd5fc2Smrg case $cc_basename in 797588cd5fc2Smrg CC*) 797688cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 797788cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 797888cd5fc2Smrg ;; 797988cd5fc2Smrg *) 798088cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 798188cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 798288cd5fc2Smrg ;; 798388cd5fc2Smrg esac 798488cd5fc2Smrg ;; 798588cd5fc2Smrg 798688cd5fc2Smrg sysv5* | sco3.2v5* | sco5v6*) 798788cd5fc2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 798888cd5fc2Smrg # link with -lc, and that would cause any symbols used from libc to 798988cd5fc2Smrg # always be unresolved, which means just about no library would 799088cd5fc2Smrg # ever link correctly. If we're not using GNU ld we use -z text 799188cd5fc2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 799288cd5fc2Smrg # as -z defs. 799388cd5fc2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 799488cd5fc2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 799588cd5fc2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 799688cd5fc2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 799788cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 799888cd5fc2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 799988cd5fc2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 800088cd5fc2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 800188cd5fc2Smrg runpath_var='LD_RUN_PATH' 800288cd5fc2Smrg 800388cd5fc2Smrg case $cc_basename in 800488cd5fc2Smrg CC*) 800588cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 800688cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 800788cd5fc2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 800888cd5fc2Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 800988cd5fc2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 801088cd5fc2Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 801188cd5fc2Smrg ;; 801288cd5fc2Smrg *) 801388cd5fc2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 801488cd5fc2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 801588cd5fc2Smrg ;; 801688cd5fc2Smrg esac 801788cd5fc2Smrg ;; 801888cd5fc2Smrg 801988cd5fc2Smrg tandem*) 802088cd5fc2Smrg case $cc_basename in 802188cd5fc2Smrg NCC*) 802288cd5fc2Smrg # NonStop-UX NCC 3.20 802388cd5fc2Smrg # FIXME: insert proper C++ library support 802488cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 802588cd5fc2Smrg ;; 802688cd5fc2Smrg *) 802788cd5fc2Smrg # FIXME: insert proper C++ library support 802888cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 802988cd5fc2Smrg ;; 803088cd5fc2Smrg esac 803188cd5fc2Smrg ;; 803288cd5fc2Smrg 803388cd5fc2Smrg vxworks*) 803488cd5fc2Smrg # FIXME: insert proper C++ library support 803588cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 803688cd5fc2Smrg ;; 803788cd5fc2Smrg 803888cd5fc2Smrg *) 803988cd5fc2Smrg # FIXME: insert proper C++ library support 804088cd5fc2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 804188cd5fc2Smrg ;; 804288cd5fc2Smrg esac 804388cd5fc2Smrg 804488cd5fc2Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 804588cd5fc2Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 804688cd5fc2Smrg 804788cd5fc2Smrg _LT_TAGVAR(GCC, $1)="$GXX" 804888cd5fc2Smrg _LT_TAGVAR(LD, $1)="$LD" 804988cd5fc2Smrg 805088cd5fc2Smrg ## CAVEAT EMPTOR: 805188cd5fc2Smrg ## There is no encapsulation within the following macros, do not change 805288cd5fc2Smrg ## the running order or otherwise move them around unless you know exactly 805388cd5fc2Smrg ## what you are doing... 805488cd5fc2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 805588cd5fc2Smrg _LT_COMPILER_PIC($1) 805688cd5fc2Smrg _LT_COMPILER_C_O($1) 805788cd5fc2Smrg _LT_COMPILER_FILE_LOCKS($1) 805888cd5fc2Smrg _LT_LINKER_SHLIBS($1) 805988cd5fc2Smrg _LT_SYS_DYNAMIC_LINKER($1) 806088cd5fc2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 806188cd5fc2Smrg 806288cd5fc2Smrg _LT_CONFIG($1) 806388cd5fc2Smrg fi # test -n "$compiler" 806488cd5fc2Smrg 806588cd5fc2Smrg CC=$lt_save_CC 806688cd5fc2Smrg CFLAGS=$lt_save_CFLAGS 806788cd5fc2Smrg LDCXX=$LD 806888cd5fc2Smrg LD=$lt_save_LD 806988cd5fc2Smrg GCC=$lt_save_GCC 807088cd5fc2Smrg with_gnu_ld=$lt_save_with_gnu_ld 807188cd5fc2Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 807288cd5fc2Smrg lt_cv_path_LD=$lt_save_path_LD 807388cd5fc2Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 807488cd5fc2Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 807588cd5fc2Smrgfi # test "$_lt_caught_CXX_error" != yes 807688cd5fc2Smrg 807788cd5fc2SmrgAC_LANG_POP 807888cd5fc2Smrg])# _LT_LANG_CXX_CONFIG 807988cd5fc2Smrg 808088cd5fc2Smrg 808188cd5fc2Smrg# _LT_FUNC_STRIPNAME_CNF 808288cd5fc2Smrg# ---------------------- 808388cd5fc2Smrg# func_stripname_cnf prefix suffix name 808488cd5fc2Smrg# strip PREFIX and SUFFIX off of NAME. 808588cd5fc2Smrg# PREFIX and SUFFIX must not contain globbing or regex special 808688cd5fc2Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 808788cd5fc2Smrg# dot (in which case that matches only a dot). 808888cd5fc2Smrg# 808988cd5fc2Smrg# This function is identical to the (non-XSI) version of func_stripname, 809088cd5fc2Smrg# except this one can be used by m4 code that may be executed by configure, 809188cd5fc2Smrg# rather than the libtool script. 809288cd5fc2Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 809388cd5fc2SmrgAC_REQUIRE([_LT_DECL_SED]) 809488cd5fc2SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 809588cd5fc2Smrgfunc_stripname_cnf () 809688cd5fc2Smrg{ 809788cd5fc2Smrg case ${2} in 809888cd5fc2Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 809988cd5fc2Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 810088cd5fc2Smrg esac 810188cd5fc2Smrg} # func_stripname_cnf 810288cd5fc2Smrg])# _LT_FUNC_STRIPNAME_CNF 810388cd5fc2Smrg 810488cd5fc2Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 810588cd5fc2Smrg# --------------------------------- 810688cd5fc2Smrg# Figure out "hidden" library dependencies from verbose 810788cd5fc2Smrg# compiler output when linking a shared library. 810888cd5fc2Smrg# Parse the compiler output and extract the necessary 810988cd5fc2Smrg# objects, libraries and library flags. 811088cd5fc2Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 811188cd5fc2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 811288cd5fc2SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 811388cd5fc2Smrg# Dependencies to place before and after the object being linked: 811488cd5fc2Smrg_LT_TAGVAR(predep_objects, $1)= 811588cd5fc2Smrg_LT_TAGVAR(postdep_objects, $1)= 811688cd5fc2Smrg_LT_TAGVAR(predeps, $1)= 811788cd5fc2Smrg_LT_TAGVAR(postdeps, $1)= 811888cd5fc2Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 811988cd5fc2Smrg 812088cd5fc2Smrgdnl we can't use the lt_simple_compile_test_code here, 812188cd5fc2Smrgdnl because it contains code intended for an executable, 812288cd5fc2Smrgdnl not a library. It's possible we should let each 812388cd5fc2Smrgdnl tag define a new lt_????_link_test_code variable, 812488cd5fc2Smrgdnl but it's only used here... 812588cd5fc2Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 812688cd5fc2Smrgint a; 812788cd5fc2Smrgvoid foo (void) { a = 0; } 812888cd5fc2Smrg_LT_EOF 812988cd5fc2Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 813088cd5fc2Smrgclass Foo 813188cd5fc2Smrg{ 813288cd5fc2Smrgpublic: 813388cd5fc2Smrg Foo (void) { a = 0; } 813488cd5fc2Smrgprivate: 813588cd5fc2Smrg int a; 813688cd5fc2Smrg}; 813788cd5fc2Smrg_LT_EOF 813888cd5fc2Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 813988cd5fc2Smrg subroutine foo 814088cd5fc2Smrg implicit none 814188cd5fc2Smrg integer*4 a 814288cd5fc2Smrg a=0 814388cd5fc2Smrg return 814488cd5fc2Smrg end 814588cd5fc2Smrg_LT_EOF 814688cd5fc2Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 814788cd5fc2Smrg subroutine foo 814888cd5fc2Smrg implicit none 814988cd5fc2Smrg integer a 815088cd5fc2Smrg a=0 815188cd5fc2Smrg return 815288cd5fc2Smrg end 815388cd5fc2Smrg_LT_EOF 815488cd5fc2Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 815588cd5fc2Smrgpublic class foo { 815688cd5fc2Smrg private int a; 815788cd5fc2Smrg public void bar (void) { 815888cd5fc2Smrg a = 0; 815988cd5fc2Smrg } 816088cd5fc2Smrg}; 816188cd5fc2Smrg_LT_EOF 816288cd5fc2Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 816388cd5fc2Smrgpackage foo 816488cd5fc2Smrgfunc foo() { 816588cd5fc2Smrg} 816688cd5fc2Smrg_LT_EOF 816788cd5fc2Smrg]) 816888cd5fc2Smrg 816988cd5fc2Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 817088cd5fc2Smrgcase "$CC $CFLAGS " in #( 817188cd5fc2Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 817288cd5fc2Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 817388cd5fc2Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 817488cd5fc2Smrgesac 817588cd5fc2Smrg 817688cd5fc2Smrgdnl Parse the compiler output and extract the necessary 817788cd5fc2Smrgdnl objects, libraries and library flags. 817888cd5fc2Smrgif AC_TRY_EVAL(ac_compile); then 817988cd5fc2Smrg # Parse the compiler output and extract the necessary 818088cd5fc2Smrg # objects, libraries and library flags. 818188cd5fc2Smrg 818288cd5fc2Smrg # Sentinel used to keep track of whether or not we are before 818388cd5fc2Smrg # the conftest object file. 818488cd5fc2Smrg pre_test_object_deps_done=no 818588cd5fc2Smrg 818688cd5fc2Smrg for p in `eval "$output_verbose_link_cmd"`; do 818788cd5fc2Smrg case ${prev}${p} in 818888cd5fc2Smrg 818988cd5fc2Smrg -L* | -R* | -l*) 819088cd5fc2Smrg # Some compilers place space between "-{L,R}" and the path. 819188cd5fc2Smrg # Remove the space. 819288cd5fc2Smrg if test $p = "-L" || 819388cd5fc2Smrg test $p = "-R"; then 819488cd5fc2Smrg prev=$p 819588cd5fc2Smrg continue 819688cd5fc2Smrg fi 819788cd5fc2Smrg 819888cd5fc2Smrg # Expand the sysroot to ease extracting the directories later. 819988cd5fc2Smrg if test -z "$prev"; then 820088cd5fc2Smrg case $p in 820188cd5fc2Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 820288cd5fc2Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 820388cd5fc2Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 820488cd5fc2Smrg esac 820588cd5fc2Smrg fi 820688cd5fc2Smrg case $p in 820788cd5fc2Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 820888cd5fc2Smrg esac 820988cd5fc2Smrg if test "$pre_test_object_deps_done" = no; then 821088cd5fc2Smrg case ${prev} in 821188cd5fc2Smrg -L | -R) 821288cd5fc2Smrg # Internal compiler library paths should come after those 821388cd5fc2Smrg # provided the user. The postdeps already come after the 821488cd5fc2Smrg # user supplied libs so there is no need to process them. 821588cd5fc2Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 821688cd5fc2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 821788cd5fc2Smrg else 821888cd5fc2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 821988cd5fc2Smrg fi 822088cd5fc2Smrg ;; 822188cd5fc2Smrg # The "-l" case would never come before the object being 822288cd5fc2Smrg # linked, so don't bother handling this case. 822388cd5fc2Smrg esac 822488cd5fc2Smrg else 822588cd5fc2Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 822688cd5fc2Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 822788cd5fc2Smrg else 822888cd5fc2Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 822988cd5fc2Smrg fi 823088cd5fc2Smrg fi 823188cd5fc2Smrg prev= 823288cd5fc2Smrg ;; 823388cd5fc2Smrg 823488cd5fc2Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 823588cd5fc2Smrg *.$objext) 823688cd5fc2Smrg # This assumes that the test object file only shows up 823788cd5fc2Smrg # once in the compiler output. 823888cd5fc2Smrg if test "$p" = "conftest.$objext"; then 823988cd5fc2Smrg pre_test_object_deps_done=yes 824088cd5fc2Smrg continue 824188cd5fc2Smrg fi 824288cd5fc2Smrg 824388cd5fc2Smrg if test "$pre_test_object_deps_done" = no; then 824488cd5fc2Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 824588cd5fc2Smrg _LT_TAGVAR(predep_objects, $1)="$p" 824688cd5fc2Smrg else 824788cd5fc2Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 824888cd5fc2Smrg fi 824988cd5fc2Smrg else 825088cd5fc2Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 825188cd5fc2Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 825288cd5fc2Smrg else 825388cd5fc2Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 825488cd5fc2Smrg fi 825588cd5fc2Smrg fi 825688cd5fc2Smrg ;; 825788cd5fc2Smrg 825888cd5fc2Smrg *) ;; # Ignore the rest. 825988cd5fc2Smrg 826088cd5fc2Smrg esac 826188cd5fc2Smrg done 826288cd5fc2Smrg 826388cd5fc2Smrg # Clean up. 826488cd5fc2Smrg rm -f a.out a.exe 826588cd5fc2Smrgelse 826688cd5fc2Smrg echo "libtool.m4: error: problem compiling $1 test program" 826788cd5fc2Smrgfi 826888cd5fc2Smrg 826988cd5fc2Smrg$RM -f confest.$objext 827088cd5fc2SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 827188cd5fc2Smrg 827288cd5fc2Smrg# PORTME: override above test on systems where it is broken 827388cd5fc2Smrgm4_if([$1], [CXX], 827488cd5fc2Smrg[case $host_os in 827588cd5fc2Smrginterix[[3-9]]*) 827688cd5fc2Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 827788cd5fc2Smrg # hack all around it, let's just trust "g++" to DTRT. 827888cd5fc2Smrg _LT_TAGVAR(predep_objects,$1)= 827988cd5fc2Smrg _LT_TAGVAR(postdep_objects,$1)= 828088cd5fc2Smrg _LT_TAGVAR(postdeps,$1)= 828188cd5fc2Smrg ;; 828288cd5fc2Smrg 828388cd5fc2Smrglinux*) 828488cd5fc2Smrg case `$CC -V 2>&1 | sed 5q` in 828588cd5fc2Smrg *Sun\ C*) 828688cd5fc2Smrg # Sun C++ 5.9 828788cd5fc2Smrg 828888cd5fc2Smrg # The more standards-conforming stlport4 library is 828988cd5fc2Smrg # incompatible with the Cstd library. Avoid specifying 829088cd5fc2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 829188cd5fc2Smrg # -library=stlport4 depends on it. 829288cd5fc2Smrg case " $CXX $CXXFLAGS " in 829388cd5fc2Smrg *" -library=stlport4 "*) 829488cd5fc2Smrg solaris_use_stlport4=yes 829588cd5fc2Smrg ;; 829688cd5fc2Smrg esac 829788cd5fc2Smrg 829888cd5fc2Smrg if test "$solaris_use_stlport4" != yes; then 829988cd5fc2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 830088cd5fc2Smrg fi 830188cd5fc2Smrg ;; 830288cd5fc2Smrg esac 830388cd5fc2Smrg ;; 830488cd5fc2Smrg 830588cd5fc2Smrgsolaris*) 830688cd5fc2Smrg case $cc_basename in 830788cd5fc2Smrg CC* | sunCC*) 830888cd5fc2Smrg # The more standards-conforming stlport4 library is 830988cd5fc2Smrg # incompatible with the Cstd library. Avoid specifying 831088cd5fc2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 831188cd5fc2Smrg # -library=stlport4 depends on it. 831288cd5fc2Smrg case " $CXX $CXXFLAGS " in 831388cd5fc2Smrg *" -library=stlport4 "*) 831488cd5fc2Smrg solaris_use_stlport4=yes 831588cd5fc2Smrg ;; 831688cd5fc2Smrg esac 831788cd5fc2Smrg 831888cd5fc2Smrg # Adding this requires a known-good setup of shared libraries for 831988cd5fc2Smrg # Sun compiler versions before 5.6, else PIC objects from an old 832088cd5fc2Smrg # archive will be linked into the output, leading to subtle bugs. 832188cd5fc2Smrg if test "$solaris_use_stlport4" != yes; then 832288cd5fc2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 832388cd5fc2Smrg fi 832488cd5fc2Smrg ;; 832588cd5fc2Smrg esac 832688cd5fc2Smrg ;; 832788cd5fc2Smrgesac 832888cd5fc2Smrg]) 832988cd5fc2Smrg 833088cd5fc2Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 833188cd5fc2Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 833288cd5fc2Smrgesac 833388cd5fc2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 833488cd5fc2Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 833588cd5fc2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 833688cd5fc2Smrgfi 833788cd5fc2Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 833888cd5fc2Smrg [The directories searched by this compiler when creating a shared library]) 833988cd5fc2Smrg_LT_TAGDECL([], [predep_objects], [1], 834088cd5fc2Smrg [Dependencies to place before and after the objects being linked to 834188cd5fc2Smrg create a shared library]) 834288cd5fc2Smrg_LT_TAGDECL([], [postdep_objects], [1]) 834388cd5fc2Smrg_LT_TAGDECL([], [predeps], [1]) 834488cd5fc2Smrg_LT_TAGDECL([], [postdeps], [1]) 834588cd5fc2Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 834688cd5fc2Smrg [The library search path used internally by the compiler when linking 834788cd5fc2Smrg a shared library]) 834888cd5fc2Smrg])# _LT_SYS_HIDDEN_LIBDEPS 834988cd5fc2Smrg 835088cd5fc2Smrg 835188cd5fc2Smrg# _LT_LANG_F77_CONFIG([TAG]) 835288cd5fc2Smrg# -------------------------- 835388cd5fc2Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 835488cd5fc2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 835588cd5fc2Smrg# to write the compiler configuration to `libtool'. 835688cd5fc2Smrgm4_defun([_LT_LANG_F77_CONFIG], 835788cd5fc2Smrg[AC_LANG_PUSH(Fortran 77) 835888cd5fc2Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 835988cd5fc2Smrg _lt_disable_F77=yes 836088cd5fc2Smrgfi 836188cd5fc2Smrg 836288cd5fc2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 836388cd5fc2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 836488cd5fc2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 836588cd5fc2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 836688cd5fc2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 836788cd5fc2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 836888cd5fc2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 836988cd5fc2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 837088cd5fc2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 837188cd5fc2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 837288cd5fc2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 837388cd5fc2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 837488cd5fc2Smrg_LT_TAGVAR(module_cmds, $1)= 837588cd5fc2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 837688cd5fc2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 837788cd5fc2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 837888cd5fc2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 837988cd5fc2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 838088cd5fc2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 838188cd5fc2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 838288cd5fc2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 838388cd5fc2Smrg 838488cd5fc2Smrg# Source file extension for f77 test sources. 838588cd5fc2Smrgac_ext=f 838688cd5fc2Smrg 838788cd5fc2Smrg# Object file extension for compiled f77 test sources. 838888cd5fc2Smrgobjext=o 838988cd5fc2Smrg_LT_TAGVAR(objext, $1)=$objext 839088cd5fc2Smrg 839188cd5fc2Smrg# No sense in running all these tests if we already determined that 839288cd5fc2Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 839388cd5fc2Smrg# are currently assumed to apply to all compilers on this platform, 839488cd5fc2Smrg# and will be corrupted by setting them based on a non-working compiler. 839588cd5fc2Smrgif test "$_lt_disable_F77" != yes; then 839688cd5fc2Smrg # Code to be used in simple compile tests 839788cd5fc2Smrg lt_simple_compile_test_code="\ 839888cd5fc2Smrg subroutine t 839988cd5fc2Smrg return 840088cd5fc2Smrg end 840188cd5fc2Smrg" 840288cd5fc2Smrg 840388cd5fc2Smrg # Code to be used in simple link tests 840488cd5fc2Smrg lt_simple_link_test_code="\ 840588cd5fc2Smrg program t 840688cd5fc2Smrg end 840788cd5fc2Smrg" 840888cd5fc2Smrg 840988cd5fc2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 841088cd5fc2Smrg _LT_TAG_COMPILER 841188cd5fc2Smrg 841288cd5fc2Smrg # save warnings/boilerplate of simple test code 841388cd5fc2Smrg _LT_COMPILER_BOILERPLATE 841488cd5fc2Smrg _LT_LINKER_BOILERPLATE 841588cd5fc2Smrg 841688cd5fc2Smrg # Allow CC to be a program name with arguments. 841788cd5fc2Smrg lt_save_CC="$CC" 841888cd5fc2Smrg lt_save_GCC=$GCC 841988cd5fc2Smrg lt_save_CFLAGS=$CFLAGS 842088cd5fc2Smrg CC=${F77-"f77"} 842188cd5fc2Smrg CFLAGS=$FFLAGS 842288cd5fc2Smrg compiler=$CC 842388cd5fc2Smrg _LT_TAGVAR(compiler, $1)=$CC 842488cd5fc2Smrg _LT_CC_BASENAME([$compiler]) 842588cd5fc2Smrg GCC=$G77 842688cd5fc2Smrg if test -n "$compiler"; then 842788cd5fc2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 842888cd5fc2Smrg AC_MSG_RESULT([$can_build_shared]) 842988cd5fc2Smrg 843088cd5fc2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 843188cd5fc2Smrg test "$can_build_shared" = "no" && enable_shared=no 843288cd5fc2Smrg 843388cd5fc2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 843488cd5fc2Smrg # are all built from PIC. 843588cd5fc2Smrg case $host_os in 843688cd5fc2Smrg aix3*) 843788cd5fc2Smrg test "$enable_shared" = yes && enable_static=no 843888cd5fc2Smrg if test -n "$RANLIB"; then 843988cd5fc2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 844088cd5fc2Smrg postinstall_cmds='$RANLIB $lib' 844188cd5fc2Smrg fi 844288cd5fc2Smrg ;; 844388cd5fc2Smrg aix[[4-9]]*) 844488cd5fc2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 844588cd5fc2Smrg test "$enable_shared" = yes && enable_static=no 844688cd5fc2Smrg fi 844788cd5fc2Smrg ;; 844888cd5fc2Smrg esac 844988cd5fc2Smrg AC_MSG_RESULT([$enable_shared]) 845088cd5fc2Smrg 845188cd5fc2Smrg AC_MSG_CHECKING([whether to build static libraries]) 845288cd5fc2Smrg # Make sure either enable_shared or enable_static is yes. 845388cd5fc2Smrg test "$enable_shared" = yes || enable_static=yes 845488cd5fc2Smrg AC_MSG_RESULT([$enable_static]) 845588cd5fc2Smrg 845688cd5fc2Smrg _LT_TAGVAR(GCC, $1)="$G77" 845788cd5fc2Smrg _LT_TAGVAR(LD, $1)="$LD" 845888cd5fc2Smrg 845988cd5fc2Smrg ## CAVEAT EMPTOR: 846088cd5fc2Smrg ## There is no encapsulation within the following macros, do not change 846188cd5fc2Smrg ## the running order or otherwise move them around unless you know exactly 846288cd5fc2Smrg ## what you are doing... 846388cd5fc2Smrg _LT_COMPILER_PIC($1) 846488cd5fc2Smrg _LT_COMPILER_C_O($1) 846588cd5fc2Smrg _LT_COMPILER_FILE_LOCKS($1) 846688cd5fc2Smrg _LT_LINKER_SHLIBS($1) 846788cd5fc2Smrg _LT_SYS_DYNAMIC_LINKER($1) 846888cd5fc2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 846988cd5fc2Smrg 847088cd5fc2Smrg _LT_CONFIG($1) 847188cd5fc2Smrg fi # test -n "$compiler" 847288cd5fc2Smrg 847388cd5fc2Smrg GCC=$lt_save_GCC 847488cd5fc2Smrg CC="$lt_save_CC" 847588cd5fc2Smrg CFLAGS="$lt_save_CFLAGS" 847688cd5fc2Smrgfi # test "$_lt_disable_F77" != yes 847788cd5fc2Smrg 847888cd5fc2SmrgAC_LANG_POP 847988cd5fc2Smrg])# _LT_LANG_F77_CONFIG 848088cd5fc2Smrg 848188cd5fc2Smrg 848288cd5fc2Smrg# _LT_LANG_FC_CONFIG([TAG]) 848388cd5fc2Smrg# ------------------------- 848488cd5fc2Smrg# Ensure that the configuration variables for a Fortran compiler are 848588cd5fc2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 848688cd5fc2Smrg# to write the compiler configuration to `libtool'. 848788cd5fc2Smrgm4_defun([_LT_LANG_FC_CONFIG], 848888cd5fc2Smrg[AC_LANG_PUSH(Fortran) 848988cd5fc2Smrg 849088cd5fc2Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 849188cd5fc2Smrg _lt_disable_FC=yes 849288cd5fc2Smrgfi 849388cd5fc2Smrg 849488cd5fc2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 849588cd5fc2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 849688cd5fc2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 849788cd5fc2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 849888cd5fc2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 849988cd5fc2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 850088cd5fc2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 850188cd5fc2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 850288cd5fc2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 850388cd5fc2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 850488cd5fc2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 850588cd5fc2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 850688cd5fc2Smrg_LT_TAGVAR(module_cmds, $1)= 850788cd5fc2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 850888cd5fc2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 850988cd5fc2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 851088cd5fc2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 851188cd5fc2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 851288cd5fc2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 851388cd5fc2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 851488cd5fc2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 851588cd5fc2Smrg 851688cd5fc2Smrg# Source file extension for fc test sources. 851788cd5fc2Smrgac_ext=${ac_fc_srcext-f} 851888cd5fc2Smrg 851988cd5fc2Smrg# Object file extension for compiled fc test sources. 852088cd5fc2Smrgobjext=o 852188cd5fc2Smrg_LT_TAGVAR(objext, $1)=$objext 852288cd5fc2Smrg 852388cd5fc2Smrg# No sense in running all these tests if we already determined that 852488cd5fc2Smrg# the FC compiler isn't working. Some variables (like enable_shared) 852588cd5fc2Smrg# are currently assumed to apply to all compilers on this platform, 852688cd5fc2Smrg# and will be corrupted by setting them based on a non-working compiler. 852788cd5fc2Smrgif test "$_lt_disable_FC" != yes; then 852888cd5fc2Smrg # Code to be used in simple compile tests 852988cd5fc2Smrg lt_simple_compile_test_code="\ 853088cd5fc2Smrg subroutine t 853188cd5fc2Smrg return 853288cd5fc2Smrg end 853388cd5fc2Smrg" 853488cd5fc2Smrg 853588cd5fc2Smrg # Code to be used in simple link tests 853688cd5fc2Smrg lt_simple_link_test_code="\ 853788cd5fc2Smrg program t 853888cd5fc2Smrg end 853988cd5fc2Smrg" 854088cd5fc2Smrg 854188cd5fc2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 854288cd5fc2Smrg _LT_TAG_COMPILER 854388cd5fc2Smrg 854488cd5fc2Smrg # save warnings/boilerplate of simple test code 854588cd5fc2Smrg _LT_COMPILER_BOILERPLATE 854688cd5fc2Smrg _LT_LINKER_BOILERPLATE 854788cd5fc2Smrg 854888cd5fc2Smrg # Allow CC to be a program name with arguments. 854988cd5fc2Smrg lt_save_CC="$CC" 855088cd5fc2Smrg lt_save_GCC=$GCC 855188cd5fc2Smrg lt_save_CFLAGS=$CFLAGS 855288cd5fc2Smrg CC=${FC-"f95"} 855388cd5fc2Smrg CFLAGS=$FCFLAGS 855488cd5fc2Smrg compiler=$CC 855588cd5fc2Smrg GCC=$ac_cv_fc_compiler_gnu 855688cd5fc2Smrg 855788cd5fc2Smrg _LT_TAGVAR(compiler, $1)=$CC 855888cd5fc2Smrg _LT_CC_BASENAME([$compiler]) 855988cd5fc2Smrg 856088cd5fc2Smrg if test -n "$compiler"; then 856188cd5fc2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 856288cd5fc2Smrg AC_MSG_RESULT([$can_build_shared]) 856388cd5fc2Smrg 856488cd5fc2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 856588cd5fc2Smrg test "$can_build_shared" = "no" && enable_shared=no 856688cd5fc2Smrg 856788cd5fc2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 856888cd5fc2Smrg # are all built from PIC. 856988cd5fc2Smrg case $host_os in 857088cd5fc2Smrg aix3*) 857188cd5fc2Smrg test "$enable_shared" = yes && enable_static=no 857288cd5fc2Smrg if test -n "$RANLIB"; then 857388cd5fc2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 857488cd5fc2Smrg postinstall_cmds='$RANLIB $lib' 857588cd5fc2Smrg fi 857688cd5fc2Smrg ;; 857788cd5fc2Smrg aix[[4-9]]*) 857888cd5fc2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 857988cd5fc2Smrg test "$enable_shared" = yes && enable_static=no 858088cd5fc2Smrg fi 858188cd5fc2Smrg ;; 858288cd5fc2Smrg esac 858388cd5fc2Smrg AC_MSG_RESULT([$enable_shared]) 858488cd5fc2Smrg 858588cd5fc2Smrg AC_MSG_CHECKING([whether to build static libraries]) 858688cd5fc2Smrg # Make sure either enable_shared or enable_static is yes. 858788cd5fc2Smrg test "$enable_shared" = yes || enable_static=yes 858888cd5fc2Smrg AC_MSG_RESULT([$enable_static]) 858988cd5fc2Smrg 859088cd5fc2Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 859188cd5fc2Smrg _LT_TAGVAR(LD, $1)="$LD" 859288cd5fc2Smrg 859388cd5fc2Smrg ## CAVEAT EMPTOR: 859488cd5fc2Smrg ## There is no encapsulation within the following macros, do not change 859588cd5fc2Smrg ## the running order or otherwise move them around unless you know exactly 859688cd5fc2Smrg ## what you are doing... 859788cd5fc2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 859888cd5fc2Smrg _LT_COMPILER_PIC($1) 859988cd5fc2Smrg _LT_COMPILER_C_O($1) 860088cd5fc2Smrg _LT_COMPILER_FILE_LOCKS($1) 860188cd5fc2Smrg _LT_LINKER_SHLIBS($1) 860288cd5fc2Smrg _LT_SYS_DYNAMIC_LINKER($1) 860388cd5fc2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 860488cd5fc2Smrg 860588cd5fc2Smrg _LT_CONFIG($1) 860688cd5fc2Smrg fi # test -n "$compiler" 860788cd5fc2Smrg 860888cd5fc2Smrg GCC=$lt_save_GCC 860988cd5fc2Smrg CC=$lt_save_CC 861088cd5fc2Smrg CFLAGS=$lt_save_CFLAGS 861188cd5fc2Smrgfi # test "$_lt_disable_FC" != yes 861288cd5fc2Smrg 861388cd5fc2SmrgAC_LANG_POP 861488cd5fc2Smrg])# _LT_LANG_FC_CONFIG 861588cd5fc2Smrg 861688cd5fc2Smrg 861788cd5fc2Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 861888cd5fc2Smrg# -------------------------- 861988cd5fc2Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 862088cd5fc2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 862188cd5fc2Smrg# to write the compiler configuration to `libtool'. 862288cd5fc2Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 862388cd5fc2Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 862488cd5fc2SmrgAC_LANG_SAVE 862588cd5fc2Smrg 862688cd5fc2Smrg# Source file extension for Java test sources. 862788cd5fc2Smrgac_ext=java 862888cd5fc2Smrg 862988cd5fc2Smrg# Object file extension for compiled Java test sources. 863088cd5fc2Smrgobjext=o 863188cd5fc2Smrg_LT_TAGVAR(objext, $1)=$objext 863288cd5fc2Smrg 863388cd5fc2Smrg# Code to be used in simple compile tests 863488cd5fc2Smrglt_simple_compile_test_code="class foo {}" 863588cd5fc2Smrg 863688cd5fc2Smrg# Code to be used in simple link tests 863788cd5fc2Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 863888cd5fc2Smrg 863988cd5fc2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 864088cd5fc2Smrg_LT_TAG_COMPILER 864188cd5fc2Smrg 864288cd5fc2Smrg# save warnings/boilerplate of simple test code 864388cd5fc2Smrg_LT_COMPILER_BOILERPLATE 864488cd5fc2Smrg_LT_LINKER_BOILERPLATE 864588cd5fc2Smrg 864688cd5fc2Smrg# Allow CC to be a program name with arguments. 864788cd5fc2Smrglt_save_CC=$CC 864888cd5fc2Smrglt_save_CFLAGS=$CFLAGS 864988cd5fc2Smrglt_save_GCC=$GCC 865088cd5fc2SmrgGCC=yes 865188cd5fc2SmrgCC=${GCJ-"gcj"} 865288cd5fc2SmrgCFLAGS=$GCJFLAGS 865388cd5fc2Smrgcompiler=$CC 865488cd5fc2Smrg_LT_TAGVAR(compiler, $1)=$CC 865588cd5fc2Smrg_LT_TAGVAR(LD, $1)="$LD" 865688cd5fc2Smrg_LT_CC_BASENAME([$compiler]) 865788cd5fc2Smrg 865888cd5fc2Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 865988cd5fc2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 866088cd5fc2Smrg 866188cd5fc2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 866288cd5fc2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 866388cd5fc2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 866488cd5fc2Smrg 866588cd5fc2Smrgif test -n "$compiler"; then 866688cd5fc2Smrg _LT_COMPILER_NO_RTTI($1) 866788cd5fc2Smrg _LT_COMPILER_PIC($1) 866888cd5fc2Smrg _LT_COMPILER_C_O($1) 866988cd5fc2Smrg _LT_COMPILER_FILE_LOCKS($1) 867088cd5fc2Smrg _LT_LINKER_SHLIBS($1) 867188cd5fc2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 867288cd5fc2Smrg 867388cd5fc2Smrg _LT_CONFIG($1) 867488cd5fc2Smrgfi 867588cd5fc2Smrg 867688cd5fc2SmrgAC_LANG_RESTORE 867788cd5fc2Smrg 867888cd5fc2SmrgGCC=$lt_save_GCC 867988cd5fc2SmrgCC=$lt_save_CC 868088cd5fc2SmrgCFLAGS=$lt_save_CFLAGS 868188cd5fc2Smrg])# _LT_LANG_GCJ_CONFIG 868288cd5fc2Smrg 868388cd5fc2Smrg 868488cd5fc2Smrg# _LT_LANG_GO_CONFIG([TAG]) 868588cd5fc2Smrg# -------------------------- 868688cd5fc2Smrg# Ensure that the configuration variables for the GNU Go compiler 868788cd5fc2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 868888cd5fc2Smrg# to write the compiler configuration to `libtool'. 868988cd5fc2Smrgm4_defun([_LT_LANG_GO_CONFIG], 869088cd5fc2Smrg[AC_REQUIRE([LT_PROG_GO])dnl 869188cd5fc2SmrgAC_LANG_SAVE 869288cd5fc2Smrg 869388cd5fc2Smrg# Source file extension for Go test sources. 869488cd5fc2Smrgac_ext=go 869588cd5fc2Smrg 869688cd5fc2Smrg# Object file extension for compiled Go test sources. 869788cd5fc2Smrgobjext=o 869888cd5fc2Smrg_LT_TAGVAR(objext, $1)=$objext 869988cd5fc2Smrg 870088cd5fc2Smrg# Code to be used in simple compile tests 870188cd5fc2Smrglt_simple_compile_test_code="package main; func main() { }" 870288cd5fc2Smrg 870388cd5fc2Smrg# Code to be used in simple link tests 870488cd5fc2Smrglt_simple_link_test_code='package main; func main() { }' 870588cd5fc2Smrg 870688cd5fc2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 870788cd5fc2Smrg_LT_TAG_COMPILER 870888cd5fc2Smrg 870988cd5fc2Smrg# save warnings/boilerplate of simple test code 871088cd5fc2Smrg_LT_COMPILER_BOILERPLATE 871188cd5fc2Smrg_LT_LINKER_BOILERPLATE 871288cd5fc2Smrg 871388cd5fc2Smrg# Allow CC to be a program name with arguments. 871488cd5fc2Smrglt_save_CC=$CC 871588cd5fc2Smrglt_save_CFLAGS=$CFLAGS 871688cd5fc2Smrglt_save_GCC=$GCC 871788cd5fc2SmrgGCC=yes 871888cd5fc2SmrgCC=${GOC-"gccgo"} 871988cd5fc2SmrgCFLAGS=$GOFLAGS 872088cd5fc2Smrgcompiler=$CC 872188cd5fc2Smrg_LT_TAGVAR(compiler, $1)=$CC 872288cd5fc2Smrg_LT_TAGVAR(LD, $1)="$LD" 872388cd5fc2Smrg_LT_CC_BASENAME([$compiler]) 872488cd5fc2Smrg 872588cd5fc2Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 872688cd5fc2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 872788cd5fc2Smrg 872888cd5fc2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 872988cd5fc2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 873088cd5fc2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 873188cd5fc2Smrg 873288cd5fc2Smrgif test -n "$compiler"; then 873388cd5fc2Smrg _LT_COMPILER_NO_RTTI($1) 873488cd5fc2Smrg _LT_COMPILER_PIC($1) 873588cd5fc2Smrg _LT_COMPILER_C_O($1) 873688cd5fc2Smrg _LT_COMPILER_FILE_LOCKS($1) 873788cd5fc2Smrg _LT_LINKER_SHLIBS($1) 873888cd5fc2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 873988cd5fc2Smrg 874088cd5fc2Smrg _LT_CONFIG($1) 874188cd5fc2Smrgfi 874288cd5fc2Smrg 874388cd5fc2SmrgAC_LANG_RESTORE 874488cd5fc2Smrg 874588cd5fc2SmrgGCC=$lt_save_GCC 874688cd5fc2SmrgCC=$lt_save_CC 874788cd5fc2SmrgCFLAGS=$lt_save_CFLAGS 874888cd5fc2Smrg])# _LT_LANG_GO_CONFIG 874988cd5fc2Smrg 875088cd5fc2Smrg 875188cd5fc2Smrg# _LT_LANG_RC_CONFIG([TAG]) 875288cd5fc2Smrg# ------------------------- 875388cd5fc2Smrg# Ensure that the configuration variables for the Windows resource compiler 875488cd5fc2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 875588cd5fc2Smrg# to write the compiler configuration to `libtool'. 875688cd5fc2Smrgm4_defun([_LT_LANG_RC_CONFIG], 875788cd5fc2Smrg[AC_REQUIRE([LT_PROG_RC])dnl 875888cd5fc2SmrgAC_LANG_SAVE 875988cd5fc2Smrg 876088cd5fc2Smrg# Source file extension for RC test sources. 876188cd5fc2Smrgac_ext=rc 876288cd5fc2Smrg 876388cd5fc2Smrg# Object file extension for compiled RC test sources. 876488cd5fc2Smrgobjext=o 876588cd5fc2Smrg_LT_TAGVAR(objext, $1)=$objext 876688cd5fc2Smrg 876788cd5fc2Smrg# Code to be used in simple compile tests 876888cd5fc2Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 876988cd5fc2Smrg 877088cd5fc2Smrg# Code to be used in simple link tests 877188cd5fc2Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 877288cd5fc2Smrg 877388cd5fc2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 877488cd5fc2Smrg_LT_TAG_COMPILER 877588cd5fc2Smrg 877688cd5fc2Smrg# save warnings/boilerplate of simple test code 877788cd5fc2Smrg_LT_COMPILER_BOILERPLATE 877888cd5fc2Smrg_LT_LINKER_BOILERPLATE 877988cd5fc2Smrg 878088cd5fc2Smrg# Allow CC to be a program name with arguments. 878188cd5fc2Smrglt_save_CC="$CC" 878288cd5fc2Smrglt_save_CFLAGS=$CFLAGS 878388cd5fc2Smrglt_save_GCC=$GCC 878488cd5fc2SmrgGCC= 878588cd5fc2SmrgCC=${RC-"windres"} 878688cd5fc2SmrgCFLAGS= 878788cd5fc2Smrgcompiler=$CC 878888cd5fc2Smrg_LT_TAGVAR(compiler, $1)=$CC 878988cd5fc2Smrg_LT_CC_BASENAME([$compiler]) 879088cd5fc2Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 879188cd5fc2Smrg 879288cd5fc2Smrgif test -n "$compiler"; then 879388cd5fc2Smrg : 879488cd5fc2Smrg _LT_CONFIG($1) 879588cd5fc2Smrgfi 879688cd5fc2Smrg 879788cd5fc2SmrgGCC=$lt_save_GCC 879888cd5fc2SmrgAC_LANG_RESTORE 879988cd5fc2SmrgCC=$lt_save_CC 880088cd5fc2SmrgCFLAGS=$lt_save_CFLAGS 880188cd5fc2Smrg])# _LT_LANG_RC_CONFIG 880288cd5fc2Smrg 880388cd5fc2Smrg 880488cd5fc2Smrg# LT_PROG_GCJ 880588cd5fc2Smrg# ----------- 880688cd5fc2SmrgAC_DEFUN([LT_PROG_GCJ], 880788cd5fc2Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 880888cd5fc2Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 880988cd5fc2Smrg [AC_CHECK_TOOL(GCJ, gcj,) 881088cd5fc2Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 881188cd5fc2Smrg AC_SUBST(GCJFLAGS)])])[]dnl 881288cd5fc2Smrg]) 881388cd5fc2Smrg 881488cd5fc2Smrg# Old name: 881588cd5fc2SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 881688cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 881788cd5fc2Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 881888cd5fc2Smrg 881988cd5fc2Smrg 882088cd5fc2Smrg# LT_PROG_GO 882188cd5fc2Smrg# ---------- 882288cd5fc2SmrgAC_DEFUN([LT_PROG_GO], 882388cd5fc2Smrg[AC_CHECK_TOOL(GOC, gccgo,) 882488cd5fc2Smrg]) 882588cd5fc2Smrg 882688cd5fc2Smrg 882788cd5fc2Smrg# LT_PROG_RC 882888cd5fc2Smrg# ---------- 882988cd5fc2SmrgAC_DEFUN([LT_PROG_RC], 883088cd5fc2Smrg[AC_CHECK_TOOL(RC, windres,) 883188cd5fc2Smrg]) 883288cd5fc2Smrg 883388cd5fc2Smrg# Old name: 883488cd5fc2SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 883588cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 883688cd5fc2Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 883788cd5fc2Smrg 883888cd5fc2Smrg 883988cd5fc2Smrg# _LT_DECL_EGREP 884088cd5fc2Smrg# -------------- 884188cd5fc2Smrg# If we don't have a new enough Autoconf to choose the best grep 884288cd5fc2Smrg# available, choose the one first in the user's PATH. 884388cd5fc2Smrgm4_defun([_LT_DECL_EGREP], 884488cd5fc2Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 884588cd5fc2SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 884688cd5fc2Smrgtest -z "$GREP" && GREP=grep 884788cd5fc2Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 884888cd5fc2Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 884988cd5fc2Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 885088cd5fc2Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 885188cd5fc2SmrgAC_SUBST([GREP]) 885288cd5fc2Smrg]) 885388cd5fc2Smrg 885488cd5fc2Smrg 885588cd5fc2Smrg# _LT_DECL_OBJDUMP 885688cd5fc2Smrg# -------------- 885788cd5fc2Smrg# If we don't have a new enough Autoconf to choose the best objdump 885888cd5fc2Smrg# available, choose the one first in the user's PATH. 885988cd5fc2Smrgm4_defun([_LT_DECL_OBJDUMP], 886088cd5fc2Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 886188cd5fc2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 886288cd5fc2Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 886388cd5fc2SmrgAC_SUBST([OBJDUMP]) 886488cd5fc2Smrg]) 886588cd5fc2Smrg 886688cd5fc2Smrg# _LT_DECL_DLLTOOL 886788cd5fc2Smrg# ---------------- 886888cd5fc2Smrg# Ensure DLLTOOL variable is set. 886988cd5fc2Smrgm4_defun([_LT_DECL_DLLTOOL], 887088cd5fc2Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 887188cd5fc2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 887288cd5fc2Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 887388cd5fc2SmrgAC_SUBST([DLLTOOL]) 887488cd5fc2Smrg]) 887588cd5fc2Smrg 887688cd5fc2Smrg# _LT_DECL_SED 887788cd5fc2Smrg# ------------ 887888cd5fc2Smrg# Check for a fully-functional sed program, that truncates 887988cd5fc2Smrg# as few characters as possible. Prefer GNU sed if found. 888088cd5fc2Smrgm4_defun([_LT_DECL_SED], 888188cd5fc2Smrg[AC_PROG_SED 888288cd5fc2Smrgtest -z "$SED" && SED=sed 888388cd5fc2SmrgXsed="$SED -e 1s/^X//" 888488cd5fc2Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 888588cd5fc2Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 888688cd5fc2Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 888788cd5fc2Smrg])# _LT_DECL_SED 888888cd5fc2Smrg 888988cd5fc2Smrgm4_ifndef([AC_PROG_SED], [ 889088cd5fc2Smrg# NOTE: This macro has been submitted for inclusion into # 889188cd5fc2Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 889288cd5fc2Smrg# a released version of Autoconf we should remove this # 889388cd5fc2Smrg# macro and use it instead. # 889488cd5fc2Smrg 889588cd5fc2Smrgm4_defun([AC_PROG_SED], 889688cd5fc2Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 889788cd5fc2SmrgAC_CACHE_VAL(lt_cv_path_SED, 889888cd5fc2Smrg[# Loop through the user's path and test for sed and gsed. 889988cd5fc2Smrg# Then use that list of sed's as ones to test for truncation. 890088cd5fc2Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 890188cd5fc2Smrgfor as_dir in $PATH 890288cd5fc2Smrgdo 890388cd5fc2Smrg IFS=$as_save_IFS 890488cd5fc2Smrg test -z "$as_dir" && as_dir=. 890588cd5fc2Smrg for lt_ac_prog in sed gsed; do 890688cd5fc2Smrg for ac_exec_ext in '' $ac_executable_extensions; do 890788cd5fc2Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 890888cd5fc2Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 890988cd5fc2Smrg fi 891088cd5fc2Smrg done 891188cd5fc2Smrg done 891288cd5fc2Smrgdone 891388cd5fc2SmrgIFS=$as_save_IFS 891488cd5fc2Smrglt_ac_max=0 891588cd5fc2Smrglt_ac_count=0 891688cd5fc2Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 891788cd5fc2Smrg# along with /bin/sed that truncates output. 891888cd5fc2Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 891988cd5fc2Smrg test ! -f $lt_ac_sed && continue 892088cd5fc2Smrg cat /dev/null > conftest.in 892188cd5fc2Smrg lt_ac_count=0 892288cd5fc2Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 892388cd5fc2Smrg # Check for GNU sed and select it if it is found. 892488cd5fc2Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 892588cd5fc2Smrg lt_cv_path_SED=$lt_ac_sed 892688cd5fc2Smrg break 892788cd5fc2Smrg fi 892888cd5fc2Smrg while true; do 892988cd5fc2Smrg cat conftest.in conftest.in >conftest.tmp 893088cd5fc2Smrg mv conftest.tmp conftest.in 893188cd5fc2Smrg cp conftest.in conftest.nl 893288cd5fc2Smrg echo >>conftest.nl 893388cd5fc2Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 893488cd5fc2Smrg cmp -s conftest.out conftest.nl || break 893588cd5fc2Smrg # 10000 chars as input seems more than enough 893688cd5fc2Smrg test $lt_ac_count -gt 10 && break 893788cd5fc2Smrg lt_ac_count=`expr $lt_ac_count + 1` 893888cd5fc2Smrg if test $lt_ac_count -gt $lt_ac_max; then 893988cd5fc2Smrg lt_ac_max=$lt_ac_count 894088cd5fc2Smrg lt_cv_path_SED=$lt_ac_sed 894188cd5fc2Smrg fi 894288cd5fc2Smrg done 894388cd5fc2Smrgdone 894488cd5fc2Smrg]) 894588cd5fc2SmrgSED=$lt_cv_path_SED 894688cd5fc2SmrgAC_SUBST([SED]) 894788cd5fc2SmrgAC_MSG_RESULT([$SED]) 894888cd5fc2Smrg])#AC_PROG_SED 894988cd5fc2Smrg])#m4_ifndef 895088cd5fc2Smrg 895188cd5fc2Smrg# Old name: 895288cd5fc2SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 895388cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 895488cd5fc2Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 895588cd5fc2Smrg 895688cd5fc2Smrg 895788cd5fc2Smrg# _LT_CHECK_SHELL_FEATURES 895888cd5fc2Smrg# ------------------------ 895988cd5fc2Smrg# Find out whether the shell is Bourne or XSI compatible, 896088cd5fc2Smrg# or has some other useful features. 896188cd5fc2Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 896288cd5fc2Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 896388cd5fc2Smrg# Try some XSI features 896488cd5fc2Smrgxsi_shell=no 896588cd5fc2Smrg( _lt_dummy="a/b/c" 896688cd5fc2Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 896788cd5fc2Smrg = c,a/b,b/c, \ 896888cd5fc2Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 896988cd5fc2Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 897088cd5fc2Smrg && xsi_shell=yes 897188cd5fc2SmrgAC_MSG_RESULT([$xsi_shell]) 897288cd5fc2Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 897388cd5fc2Smrg 897488cd5fc2SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 897588cd5fc2Smrglt_shell_append=no 897688cd5fc2Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 897788cd5fc2Smrg >/dev/null 2>&1 \ 897888cd5fc2Smrg && lt_shell_append=yes 897988cd5fc2SmrgAC_MSG_RESULT([$lt_shell_append]) 898088cd5fc2Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 898188cd5fc2Smrg 898288cd5fc2Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 898388cd5fc2Smrg lt_unset=unset 898488cd5fc2Smrgelse 898588cd5fc2Smrg lt_unset=false 898688cd5fc2Smrgfi 898788cd5fc2Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 898888cd5fc2Smrg 898988cd5fc2Smrg# test EBCDIC or ASCII 899088cd5fc2Smrgcase `echo X|tr X '\101'` in 899188cd5fc2Smrg A) # ASCII based system 899288cd5fc2Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 899388cd5fc2Smrg lt_SP2NL='tr \040 \012' 899488cd5fc2Smrg lt_NL2SP='tr \015\012 \040\040' 899588cd5fc2Smrg ;; 899688cd5fc2Smrg *) # EBCDIC based system 899788cd5fc2Smrg lt_SP2NL='tr \100 \n' 899888cd5fc2Smrg lt_NL2SP='tr \r\n \100\100' 899988cd5fc2Smrg ;; 900088cd5fc2Smrgesac 900188cd5fc2Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 900288cd5fc2Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 900388cd5fc2Smrg])# _LT_CHECK_SHELL_FEATURES 900488cd5fc2Smrg 900588cd5fc2Smrg 900688cd5fc2Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 900788cd5fc2Smrg# ------------------------------------------------------ 900888cd5fc2Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 900988cd5fc2Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 901088cd5fc2Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 901188cd5fc2Smrg[dnl { 901288cd5fc2Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 901388cd5fc2Smrg$1 ()\ 901488cd5fc2Smrg{\ 901588cd5fc2Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 901688cd5fc2Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 901788cd5fc2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 901888cd5fc2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 901988cd5fc2Smrgtest 0 -eq $? || _lt_function_replace_fail=: 902088cd5fc2Smrg]) 902188cd5fc2Smrg 902288cd5fc2Smrg 902388cd5fc2Smrg# _LT_PROG_REPLACE_SHELLFNS 902488cd5fc2Smrg# ------------------------- 902588cd5fc2Smrg# Replace existing portable implementations of several shell functions with 902688cd5fc2Smrg# equivalent extended shell implementations where those features are available.. 902788cd5fc2Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 902888cd5fc2Smrg[if test x"$xsi_shell" = xyes; then 902988cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 903088cd5fc2Smrg case ${1} in 903188cd5fc2Smrg */*) func_dirname_result="${1%/*}${2}" ;; 903288cd5fc2Smrg * ) func_dirname_result="${3}" ;; 903388cd5fc2Smrg esac]) 903488cd5fc2Smrg 903588cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 903688cd5fc2Smrg func_basename_result="${1##*/}"]) 903788cd5fc2Smrg 903888cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 903988cd5fc2Smrg case ${1} in 904088cd5fc2Smrg */*) func_dirname_result="${1%/*}${2}" ;; 904188cd5fc2Smrg * ) func_dirname_result="${3}" ;; 904288cd5fc2Smrg esac 904388cd5fc2Smrg func_basename_result="${1##*/}"]) 904488cd5fc2Smrg 904588cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 904688cd5fc2Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 904788cd5fc2Smrg # positional parameters, so assign one to ordinary parameter first. 904888cd5fc2Smrg func_stripname_result=${3} 904988cd5fc2Smrg func_stripname_result=${func_stripname_result#"${1}"} 905088cd5fc2Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 905188cd5fc2Smrg 905288cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 905388cd5fc2Smrg func_split_long_opt_name=${1%%=*} 905488cd5fc2Smrg func_split_long_opt_arg=${1#*=}]) 905588cd5fc2Smrg 905688cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 905788cd5fc2Smrg func_split_short_opt_arg=${1#??} 905888cd5fc2Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 905988cd5fc2Smrg 906088cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 906188cd5fc2Smrg case ${1} in 906288cd5fc2Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 906388cd5fc2Smrg *) func_lo2o_result=${1} ;; 906488cd5fc2Smrg esac]) 906588cd5fc2Smrg 906688cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 906788cd5fc2Smrg 906888cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 906988cd5fc2Smrg 907088cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 907188cd5fc2Smrgfi 907288cd5fc2Smrg 907388cd5fc2Smrgif test x"$lt_shell_append" = xyes; then 907488cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 907588cd5fc2Smrg 907688cd5fc2Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 907788cd5fc2Smrg func_quote_for_eval "${2}" 907888cd5fc2Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 907988cd5fc2Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 908088cd5fc2Smrg 908188cd5fc2Smrg # Save a `func_append' function call where possible by direct use of '+=' 908288cd5fc2Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 908388cd5fc2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 908488cd5fc2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 908588cd5fc2Smrg test 0 -eq $? || _lt_function_replace_fail=: 908688cd5fc2Smrgelse 908788cd5fc2Smrg # Save a `func_append' function call even when '+=' is not available 908888cd5fc2Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 908988cd5fc2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 909088cd5fc2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 909188cd5fc2Smrg test 0 -eq $? || _lt_function_replace_fail=: 909288cd5fc2Smrgfi 909388cd5fc2Smrg 909488cd5fc2Smrgif test x"$_lt_function_replace_fail" = x":"; then 909588cd5fc2Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 909688cd5fc2Smrgfi 909788cd5fc2Smrg]) 909888cd5fc2Smrg 909988cd5fc2Smrg# _LT_PATH_CONVERSION_FUNCTIONS 910088cd5fc2Smrg# ----------------------------- 910188cd5fc2Smrg# Determine which file name conversion functions should be used by 910288cd5fc2Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 910388cd5fc2Smrg# for certain cross-compile configurations and native mingw. 910488cd5fc2Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 910588cd5fc2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 910688cd5fc2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 910788cd5fc2SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 910888cd5fc2SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 910988cd5fc2Smrg[case $host in 911088cd5fc2Smrg *-*-mingw* ) 911188cd5fc2Smrg case $build in 911288cd5fc2Smrg *-*-mingw* ) # actually msys 911388cd5fc2Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 911488cd5fc2Smrg ;; 911588cd5fc2Smrg *-*-cygwin* ) 911688cd5fc2Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 911788cd5fc2Smrg ;; 911888cd5fc2Smrg * ) # otherwise, assume *nix 911988cd5fc2Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 912088cd5fc2Smrg ;; 912188cd5fc2Smrg esac 912288cd5fc2Smrg ;; 912388cd5fc2Smrg *-*-cygwin* ) 912488cd5fc2Smrg case $build in 912588cd5fc2Smrg *-*-mingw* ) # actually msys 912688cd5fc2Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 912788cd5fc2Smrg ;; 912888cd5fc2Smrg *-*-cygwin* ) 912988cd5fc2Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 913088cd5fc2Smrg ;; 913188cd5fc2Smrg * ) # otherwise, assume *nix 913288cd5fc2Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 913388cd5fc2Smrg ;; 913488cd5fc2Smrg esac 913588cd5fc2Smrg ;; 913688cd5fc2Smrg * ) # unhandled hosts (and "normal" native builds) 913788cd5fc2Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 913888cd5fc2Smrg ;; 913988cd5fc2Smrgesac 914088cd5fc2Smrg]) 914188cd5fc2Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 914288cd5fc2SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 914388cd5fc2Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 914488cd5fc2Smrg [0], [convert $build file names to $host format])dnl 914588cd5fc2Smrg 914688cd5fc2SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 914788cd5fc2SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 914888cd5fc2Smrg[#assume ordinary cross tools, or native build. 914988cd5fc2Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 915088cd5fc2Smrgcase $host in 915188cd5fc2Smrg *-*-mingw* ) 915288cd5fc2Smrg case $build in 915388cd5fc2Smrg *-*-mingw* ) # actually msys 915488cd5fc2Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 915588cd5fc2Smrg ;; 915688cd5fc2Smrg esac 915788cd5fc2Smrg ;; 915888cd5fc2Smrgesac 915988cd5fc2Smrg]) 916088cd5fc2Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 916188cd5fc2SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 916288cd5fc2Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 916388cd5fc2Smrg [0], [convert $build files to toolchain format])dnl 916488cd5fc2Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 916588cd5fc2Smrg 916688cd5fc2Smrg# Helper functions for option handling. -*- Autoconf -*- 916788cd5fc2Smrg# 916888cd5fc2Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 916988cd5fc2Smrg# Inc. 917088cd5fc2Smrg# Written by Gary V. Vaughan, 2004 917188cd5fc2Smrg# 917288cd5fc2Smrg# This file is free software; the Free Software Foundation gives 917388cd5fc2Smrg# unlimited permission to copy and/or distribute it, with or without 917488cd5fc2Smrg# modifications, as long as this notice is preserved. 917588cd5fc2Smrg 917688cd5fc2Smrg# serial 7 ltoptions.m4 917788cd5fc2Smrg 917888cd5fc2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 917988cd5fc2SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 918088cd5fc2Smrg 918188cd5fc2Smrg 918288cd5fc2Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 918388cd5fc2Smrg# ------------------------------------------ 918488cd5fc2Smrgm4_define([_LT_MANGLE_OPTION], 918588cd5fc2Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 918688cd5fc2Smrg 918788cd5fc2Smrg 918888cd5fc2Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 918988cd5fc2Smrg# --------------------------------------- 919088cd5fc2Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 919188cd5fc2Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 919288cd5fc2Smrg# saved as a flag. 919388cd5fc2Smrgm4_define([_LT_SET_OPTION], 919488cd5fc2Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 919588cd5fc2Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 919688cd5fc2Smrg _LT_MANGLE_DEFUN([$1], [$2]), 919788cd5fc2Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 919888cd5fc2Smrg]) 919988cd5fc2Smrg 920088cd5fc2Smrg 920188cd5fc2Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 920288cd5fc2Smrg# ------------------------------------------------------------ 920388cd5fc2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 920488cd5fc2Smrgm4_define([_LT_IF_OPTION], 920588cd5fc2Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 920688cd5fc2Smrg 920788cd5fc2Smrg 920888cd5fc2Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 920988cd5fc2Smrg# ------------------------------------------------------- 921088cd5fc2Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 921188cd5fc2Smrg# are set. 921288cd5fc2Smrgm4_define([_LT_UNLESS_OPTIONS], 921388cd5fc2Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 921488cd5fc2Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 921588cd5fc2Smrg [m4_define([$0_found])])])[]dnl 921688cd5fc2Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 921788cd5fc2Smrg])[]dnl 921888cd5fc2Smrg]) 921988cd5fc2Smrg 922088cd5fc2Smrg 922188cd5fc2Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 922288cd5fc2Smrg# ---------------------------------------- 922388cd5fc2Smrg# OPTION-LIST is a space-separated list of Libtool options associated 922488cd5fc2Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 922588cd5fc2Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 922688cd5fc2Smrg# the unknown option and exit. 922788cd5fc2Smrgm4_defun([_LT_SET_OPTIONS], 922888cd5fc2Smrg[# Set options 922988cd5fc2Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 923088cd5fc2Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 923188cd5fc2Smrg 923288cd5fc2Smrgm4_if([$1],[LT_INIT],[ 923388cd5fc2Smrg dnl 923488cd5fc2Smrg dnl Simply set some default values (i.e off) if boolean options were not 923588cd5fc2Smrg dnl specified: 923688cd5fc2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 923788cd5fc2Smrg ]) 923888cd5fc2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 923988cd5fc2Smrg ]) 924088cd5fc2Smrg dnl 924188cd5fc2Smrg dnl If no reference was made to various pairs of opposing options, then 924288cd5fc2Smrg dnl we run the default mode handler for the pair. For example, if neither 924388cd5fc2Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 924488cd5fc2Smrg dnl archives by default: 924588cd5fc2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 924688cd5fc2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 924788cd5fc2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 924888cd5fc2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 924988cd5fc2Smrg [_LT_ENABLE_FAST_INSTALL]) 925088cd5fc2Smrg ]) 925188cd5fc2Smrg])# _LT_SET_OPTIONS 925288cd5fc2Smrg 925388cd5fc2Smrg 925488cd5fc2Smrg 925588cd5fc2Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 925688cd5fc2Smrg# ----------------------------------------- 925788cd5fc2Smrgm4_define([_LT_MANGLE_DEFUN], 925888cd5fc2Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 925988cd5fc2Smrg 926088cd5fc2Smrg 926188cd5fc2Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 926288cd5fc2Smrg# ----------------------------------------------- 926388cd5fc2Smrgm4_define([LT_OPTION_DEFINE], 926488cd5fc2Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 926588cd5fc2Smrg])# LT_OPTION_DEFINE 926688cd5fc2Smrg 926788cd5fc2Smrg 926888cd5fc2Smrg# dlopen 926988cd5fc2Smrg# ------ 927088cd5fc2SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 927188cd5fc2Smrg]) 927288cd5fc2Smrg 927388cd5fc2SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 927488cd5fc2Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 927588cd5fc2SmrgAC_DIAGNOSE([obsolete], 927688cd5fc2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 927788cd5fc2Smrgput the `dlopen' option into LT_INIT's first parameter.]) 927888cd5fc2Smrg]) 927988cd5fc2Smrg 928088cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 928188cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 928288cd5fc2Smrg 928388cd5fc2Smrg 928488cd5fc2Smrg# win32-dll 928588cd5fc2Smrg# --------- 928688cd5fc2Smrg# Declare package support for building win32 dll's. 928788cd5fc2SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 928888cd5fc2Smrg[enable_win32_dll=yes 928988cd5fc2Smrg 929088cd5fc2Smrgcase $host in 929188cd5fc2Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 929288cd5fc2Smrg AC_CHECK_TOOL(AS, as, false) 929388cd5fc2Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 929488cd5fc2Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 929588cd5fc2Smrg ;; 929688cd5fc2Smrgesac 929788cd5fc2Smrg 929888cd5fc2Smrgtest -z "$AS" && AS=as 929988cd5fc2Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 930088cd5fc2Smrg 930188cd5fc2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 930288cd5fc2Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 930388cd5fc2Smrg 930488cd5fc2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 930588cd5fc2Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 930688cd5fc2Smrg])# win32-dll 930788cd5fc2Smrg 930888cd5fc2SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 930988cd5fc2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 931088cd5fc2Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 931188cd5fc2SmrgAC_DIAGNOSE([obsolete], 931288cd5fc2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 931388cd5fc2Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 931488cd5fc2Smrg]) 931588cd5fc2Smrg 931688cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 931788cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 931888cd5fc2Smrg 931988cd5fc2Smrg 932088cd5fc2Smrg# _LT_ENABLE_SHARED([DEFAULT]) 932188cd5fc2Smrg# ---------------------------- 932288cd5fc2Smrg# implement the --enable-shared flag, and supports the `shared' and 932388cd5fc2Smrg# `disable-shared' LT_INIT options. 932488cd5fc2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 932588cd5fc2Smrgm4_define([_LT_ENABLE_SHARED], 932688cd5fc2Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 932788cd5fc2SmrgAC_ARG_ENABLE([shared], 932888cd5fc2Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 932988cd5fc2Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 933088cd5fc2Smrg [p=${PACKAGE-default} 933188cd5fc2Smrg case $enableval in 933288cd5fc2Smrg yes) enable_shared=yes ;; 933388cd5fc2Smrg no) enable_shared=no ;; 933488cd5fc2Smrg *) 933588cd5fc2Smrg enable_shared=no 933688cd5fc2Smrg # Look at the argument we got. We use all the common list separators. 933788cd5fc2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 933888cd5fc2Smrg for pkg in $enableval; do 933988cd5fc2Smrg IFS="$lt_save_ifs" 934088cd5fc2Smrg if test "X$pkg" = "X$p"; then 934188cd5fc2Smrg enable_shared=yes 934288cd5fc2Smrg fi 934388cd5fc2Smrg done 934488cd5fc2Smrg IFS="$lt_save_ifs" 934588cd5fc2Smrg ;; 934688cd5fc2Smrg esac], 934788cd5fc2Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 934888cd5fc2Smrg 934988cd5fc2Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 935088cd5fc2Smrg [Whether or not to build shared libraries]) 935188cd5fc2Smrg])# _LT_ENABLE_SHARED 935288cd5fc2Smrg 935388cd5fc2SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 935488cd5fc2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 935588cd5fc2Smrg 935688cd5fc2Smrg# Old names: 935788cd5fc2SmrgAC_DEFUN([AC_ENABLE_SHARED], 935888cd5fc2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 935988cd5fc2Smrg]) 936088cd5fc2Smrg 936188cd5fc2SmrgAC_DEFUN([AC_DISABLE_SHARED], 936288cd5fc2Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 936388cd5fc2Smrg]) 936488cd5fc2Smrg 936588cd5fc2SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 936688cd5fc2SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 936788cd5fc2Smrg 936888cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 936988cd5fc2Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 937088cd5fc2Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 937188cd5fc2Smrg 937288cd5fc2Smrg 937388cd5fc2Smrg 937488cd5fc2Smrg# _LT_ENABLE_STATIC([DEFAULT]) 937588cd5fc2Smrg# ---------------------------- 937688cd5fc2Smrg# implement the --enable-static flag, and support the `static' and 937788cd5fc2Smrg# `disable-static' LT_INIT options. 937888cd5fc2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 937988cd5fc2Smrgm4_define([_LT_ENABLE_STATIC], 938088cd5fc2Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 938188cd5fc2SmrgAC_ARG_ENABLE([static], 938288cd5fc2Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 938388cd5fc2Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 938488cd5fc2Smrg [p=${PACKAGE-default} 938588cd5fc2Smrg case $enableval in 938688cd5fc2Smrg yes) enable_static=yes ;; 938788cd5fc2Smrg no) enable_static=no ;; 938888cd5fc2Smrg *) 938988cd5fc2Smrg enable_static=no 939088cd5fc2Smrg # Look at the argument we got. We use all the common list separators. 939188cd5fc2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 939288cd5fc2Smrg for pkg in $enableval; do 939388cd5fc2Smrg IFS="$lt_save_ifs" 939488cd5fc2Smrg if test "X$pkg" = "X$p"; then 939588cd5fc2Smrg enable_static=yes 939688cd5fc2Smrg fi 939788cd5fc2Smrg done 939888cd5fc2Smrg IFS="$lt_save_ifs" 939988cd5fc2Smrg ;; 940088cd5fc2Smrg esac], 940188cd5fc2Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 940288cd5fc2Smrg 940388cd5fc2Smrg _LT_DECL([build_old_libs], [enable_static], [0], 940488cd5fc2Smrg [Whether or not to build static libraries]) 940588cd5fc2Smrg])# _LT_ENABLE_STATIC 940688cd5fc2Smrg 940788cd5fc2SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 940888cd5fc2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 940988cd5fc2Smrg 941088cd5fc2Smrg# Old names: 941188cd5fc2SmrgAC_DEFUN([AC_ENABLE_STATIC], 941288cd5fc2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 941388cd5fc2Smrg]) 941488cd5fc2Smrg 941588cd5fc2SmrgAC_DEFUN([AC_DISABLE_STATIC], 941688cd5fc2Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 941788cd5fc2Smrg]) 941888cd5fc2Smrg 941988cd5fc2SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 942088cd5fc2SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 942188cd5fc2Smrg 942288cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 942388cd5fc2Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 942488cd5fc2Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 942588cd5fc2Smrg 942688cd5fc2Smrg 942788cd5fc2Smrg 942888cd5fc2Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 942988cd5fc2Smrg# ---------------------------------- 943088cd5fc2Smrg# implement the --enable-fast-install flag, and support the `fast-install' 943188cd5fc2Smrg# and `disable-fast-install' LT_INIT options. 943288cd5fc2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 943388cd5fc2Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 943488cd5fc2Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 943588cd5fc2SmrgAC_ARG_ENABLE([fast-install], 943688cd5fc2Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 943788cd5fc2Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 943888cd5fc2Smrg [p=${PACKAGE-default} 943988cd5fc2Smrg case $enableval in 944088cd5fc2Smrg yes) enable_fast_install=yes ;; 944188cd5fc2Smrg no) enable_fast_install=no ;; 944288cd5fc2Smrg *) 944388cd5fc2Smrg enable_fast_install=no 944488cd5fc2Smrg # Look at the argument we got. We use all the common list separators. 944588cd5fc2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 944688cd5fc2Smrg for pkg in $enableval; do 944788cd5fc2Smrg IFS="$lt_save_ifs" 944888cd5fc2Smrg if test "X$pkg" = "X$p"; then 944988cd5fc2Smrg enable_fast_install=yes 945088cd5fc2Smrg fi 945188cd5fc2Smrg done 945288cd5fc2Smrg IFS="$lt_save_ifs" 945388cd5fc2Smrg ;; 945488cd5fc2Smrg esac], 945588cd5fc2Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 945688cd5fc2Smrg 945788cd5fc2Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 945888cd5fc2Smrg [Whether or not to optimize for fast installation])dnl 945988cd5fc2Smrg])# _LT_ENABLE_FAST_INSTALL 946088cd5fc2Smrg 946188cd5fc2SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 946288cd5fc2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 946388cd5fc2Smrg 946488cd5fc2Smrg# Old names: 946588cd5fc2SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 946688cd5fc2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 946788cd5fc2SmrgAC_DIAGNOSE([obsolete], 946888cd5fc2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 946988cd5fc2Smrgthe `fast-install' option into LT_INIT's first parameter.]) 947088cd5fc2Smrg]) 947188cd5fc2Smrg 947288cd5fc2SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 947388cd5fc2Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 947488cd5fc2SmrgAC_DIAGNOSE([obsolete], 947588cd5fc2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 947688cd5fc2Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 947788cd5fc2Smrg]) 947888cd5fc2Smrg 947988cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 948088cd5fc2Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 948188cd5fc2Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 948288cd5fc2Smrg 948388cd5fc2Smrg 948488cd5fc2Smrg# _LT_WITH_PIC([MODE]) 948588cd5fc2Smrg# -------------------- 948688cd5fc2Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 948788cd5fc2Smrg# LT_INIT options. 948888cd5fc2Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 948988cd5fc2Smrgm4_define([_LT_WITH_PIC], 949088cd5fc2Smrg[AC_ARG_WITH([pic], 949188cd5fc2Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 949288cd5fc2Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 949388cd5fc2Smrg [lt_p=${PACKAGE-default} 949488cd5fc2Smrg case $withval in 949588cd5fc2Smrg yes|no) pic_mode=$withval ;; 949688cd5fc2Smrg *) 949788cd5fc2Smrg pic_mode=default 949888cd5fc2Smrg # Look at the argument we got. We use all the common list separators. 949988cd5fc2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 950088cd5fc2Smrg for lt_pkg in $withval; do 950188cd5fc2Smrg IFS="$lt_save_ifs" 950288cd5fc2Smrg if test "X$lt_pkg" = "X$lt_p"; then 950388cd5fc2Smrg pic_mode=yes 950488cd5fc2Smrg fi 950588cd5fc2Smrg done 950688cd5fc2Smrg IFS="$lt_save_ifs" 950788cd5fc2Smrg ;; 950888cd5fc2Smrg esac], 950988cd5fc2Smrg [pic_mode=default]) 951088cd5fc2Smrg 951188cd5fc2Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 951288cd5fc2Smrg 951388cd5fc2Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 951488cd5fc2Smrg])# _LT_WITH_PIC 951588cd5fc2Smrg 951688cd5fc2SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 951788cd5fc2SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 951888cd5fc2Smrg 951988cd5fc2Smrg# Old name: 952088cd5fc2SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 952188cd5fc2Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 952288cd5fc2SmrgAC_DIAGNOSE([obsolete], 952388cd5fc2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 952488cd5fc2Smrgput the `pic-only' option into LT_INIT's first parameter.]) 952588cd5fc2Smrg]) 952688cd5fc2Smrg 952788cd5fc2Smrgdnl aclocal-1.4 backwards compatibility: 952888cd5fc2Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 952988cd5fc2Smrg 953088cd5fc2Smrg 953188cd5fc2Smrgm4_define([_LTDL_MODE], []) 953288cd5fc2SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 953388cd5fc2Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 953488cd5fc2SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 953588cd5fc2Smrg [m4_define([_LTDL_MODE], [recursive])]) 953688cd5fc2SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 953788cd5fc2Smrg [m4_define([_LTDL_MODE], [subproject])]) 953888cd5fc2Smrg 953988cd5fc2Smrgm4_define([_LTDL_TYPE], []) 954088cd5fc2SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 954188cd5fc2Smrg [m4_define([_LTDL_TYPE], [installable])]) 954288cd5fc2SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 954388cd5fc2Smrg [m4_define([_LTDL_TYPE], [convenience])]) 954488cd5fc2Smrg 954588cd5fc2Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 954688cd5fc2Smrg# 954788cd5fc2Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 954888cd5fc2Smrg# Written by Gary V. Vaughan, 2004 954988cd5fc2Smrg# 955088cd5fc2Smrg# This file is free software; the Free Software Foundation gives 955188cd5fc2Smrg# unlimited permission to copy and/or distribute it, with or without 955288cd5fc2Smrg# modifications, as long as this notice is preserved. 955388cd5fc2Smrg 955488cd5fc2Smrg# serial 6 ltsugar.m4 955588cd5fc2Smrg 955688cd5fc2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 955788cd5fc2SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 955888cd5fc2Smrg 955988cd5fc2Smrg 956088cd5fc2Smrg# lt_join(SEP, ARG1, [ARG2...]) 956188cd5fc2Smrg# ----------------------------- 956288cd5fc2Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 956388cd5fc2Smrg# associated separator. 956488cd5fc2Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 956588cd5fc2Smrg# versions in m4sugar had bugs. 956688cd5fc2Smrgm4_define([lt_join], 956788cd5fc2Smrg[m4_if([$#], [1], [], 956888cd5fc2Smrg [$#], [2], [[$2]], 956988cd5fc2Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 957088cd5fc2Smrgm4_define([_lt_join], 957188cd5fc2Smrg[m4_if([$#$2], [2], [], 957288cd5fc2Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 957388cd5fc2Smrg 957488cd5fc2Smrg 957588cd5fc2Smrg# lt_car(LIST) 957688cd5fc2Smrg# lt_cdr(LIST) 957788cd5fc2Smrg# ------------ 957888cd5fc2Smrg# Manipulate m4 lists. 957988cd5fc2Smrg# These macros are necessary as long as will still need to support 958088cd5fc2Smrg# Autoconf-2.59 which quotes differently. 958188cd5fc2Smrgm4_define([lt_car], [[$1]]) 958288cd5fc2Smrgm4_define([lt_cdr], 958388cd5fc2Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 958488cd5fc2Smrg [$#], 1, [], 958588cd5fc2Smrg [m4_dquote(m4_shift($@))])]) 958688cd5fc2Smrgm4_define([lt_unquote], $1) 958788cd5fc2Smrg 958888cd5fc2Smrg 958988cd5fc2Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 959088cd5fc2Smrg# ------------------------------------------ 959188cd5fc2Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 959288cd5fc2Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 959388cd5fc2Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 959488cd5fc2Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 959588cd5fc2Smrg# than defined and empty). 959688cd5fc2Smrg# 959788cd5fc2Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 959888cd5fc2Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 959988cd5fc2Smrgm4_define([lt_append], 960088cd5fc2Smrg[m4_define([$1], 960188cd5fc2Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 960288cd5fc2Smrg 960388cd5fc2Smrg 960488cd5fc2Smrg 960588cd5fc2Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 960688cd5fc2Smrg# ---------------------------------------------------------- 960788cd5fc2Smrg# Produce a SEP delimited list of all paired combinations of elements of 960888cd5fc2Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 960988cd5fc2Smrg# has the form PREFIXmINFIXSUFFIXn. 961088cd5fc2Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 961188cd5fc2Smrgm4_define([lt_combine], 961288cd5fc2Smrg[m4_if(m4_eval([$# > 3]), [1], 961388cd5fc2Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 961488cd5fc2Smrg[[m4_foreach([_Lt_prefix], [$2], 961588cd5fc2Smrg [m4_foreach([_Lt_suffix], 961688cd5fc2Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 961788cd5fc2Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 961888cd5fc2Smrg 961988cd5fc2Smrg 962088cd5fc2Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 962188cd5fc2Smrg# ----------------------------------------------------------------------- 962288cd5fc2Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 962388cd5fc2Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 962488cd5fc2Smrgm4_define([lt_if_append_uniq], 962588cd5fc2Smrg[m4_ifdef([$1], 962688cd5fc2Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 962788cd5fc2Smrg [lt_append([$1], [$2], [$3])$4], 962888cd5fc2Smrg [$5])], 962988cd5fc2Smrg [lt_append([$1], [$2], [$3])$4])]) 963088cd5fc2Smrg 963188cd5fc2Smrg 963288cd5fc2Smrg# lt_dict_add(DICT, KEY, VALUE) 963388cd5fc2Smrg# ----------------------------- 963488cd5fc2Smrgm4_define([lt_dict_add], 963588cd5fc2Smrg[m4_define([$1($2)], [$3])]) 963688cd5fc2Smrg 963788cd5fc2Smrg 963888cd5fc2Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 963988cd5fc2Smrg# -------------------------------------------- 964088cd5fc2Smrgm4_define([lt_dict_add_subkey], 964188cd5fc2Smrg[m4_define([$1($2:$3)], [$4])]) 964288cd5fc2Smrg 964388cd5fc2Smrg 964488cd5fc2Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 964588cd5fc2Smrg# ---------------------------------- 964688cd5fc2Smrgm4_define([lt_dict_fetch], 964788cd5fc2Smrg[m4_ifval([$3], 964888cd5fc2Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 964988cd5fc2Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 965088cd5fc2Smrg 965188cd5fc2Smrg 965288cd5fc2Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 965388cd5fc2Smrg# ----------------------------------------------------------------- 965488cd5fc2Smrgm4_define([lt_if_dict_fetch], 965588cd5fc2Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 965688cd5fc2Smrg [$5], 965788cd5fc2Smrg [$6])]) 965888cd5fc2Smrg 965988cd5fc2Smrg 966088cd5fc2Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 966188cd5fc2Smrg# -------------------------------------------------------------- 966288cd5fc2Smrgm4_define([lt_dict_filter], 966388cd5fc2Smrg[m4_if([$5], [], [], 966488cd5fc2Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 966588cd5fc2Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 966688cd5fc2Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 966788cd5fc2Smrg]) 966888cd5fc2Smrg 966988cd5fc2Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 967088cd5fc2Smrg# 967188cd5fc2Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 967288cd5fc2Smrg# Written by Scott James Remnant, 2004 967388cd5fc2Smrg# 967488cd5fc2Smrg# This file is free software; the Free Software Foundation gives 967588cd5fc2Smrg# unlimited permission to copy and/or distribute it, with or without 967688cd5fc2Smrg# modifications, as long as this notice is preserved. 967788cd5fc2Smrg 967888cd5fc2Smrg# @configure_input@ 967988cd5fc2Smrg 968088cd5fc2Smrg# serial 3337 ltversion.m4 968188cd5fc2Smrg# This file is part of GNU Libtool 968288cd5fc2Smrg 968388cd5fc2Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 968488cd5fc2Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 968588cd5fc2Smrg 968688cd5fc2SmrgAC_DEFUN([LTVERSION_VERSION], 968788cd5fc2Smrg[macro_version='2.4.2' 968888cd5fc2Smrgmacro_revision='1.3337' 968988cd5fc2Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 969088cd5fc2Smrg_LT_DECL(, macro_revision, 0) 969188cd5fc2Smrg]) 969288cd5fc2Smrg 969388cd5fc2Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 969488cd5fc2Smrg# 969588cd5fc2Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 969688cd5fc2Smrg# Written by Scott James Remnant, 2004. 969788cd5fc2Smrg# 969888cd5fc2Smrg# This file is free software; the Free Software Foundation gives 969988cd5fc2Smrg# unlimited permission to copy and/or distribute it, with or without 970088cd5fc2Smrg# modifications, as long as this notice is preserved. 970188cd5fc2Smrg 970288cd5fc2Smrg# serial 5 lt~obsolete.m4 970388cd5fc2Smrg 970488cd5fc2Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 970588cd5fc2Smrg# 970688cd5fc2Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 970788cd5fc2Smrg# which have later been changed to m4_define as they aren't part of the 970888cd5fc2Smrg# exported API, or moved to Autoconf or Automake where they belong. 970988cd5fc2Smrg# 971088cd5fc2Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 971188cd5fc2Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 971288cd5fc2Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 971388cd5fc2Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 971488cd5fc2Smrg# and doesn't know about Autoconf macros at all.) 971588cd5fc2Smrg# 971688cd5fc2Smrg# So we provide this file, which has a silly filename so it's always 971788cd5fc2Smrg# included after everything else. This provides aclocal with the 971888cd5fc2Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 971988cd5fc2Smrg# because those macros already exist, or will be overwritten later. 972088cd5fc2Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 972188cd5fc2Smrg# 972288cd5fc2Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 972388cd5fc2Smrg# Yes, that means every name once taken will need to remain here until 972488cd5fc2Smrg# we give up compatibility with versions before 1.7, at which point 972588cd5fc2Smrg# we need to keep only those names which we still refer to. 972688cd5fc2Smrg 972788cd5fc2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 972888cd5fc2SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 972988cd5fc2Smrg 973088cd5fc2Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 973188cd5fc2Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 973288cd5fc2Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 973388cd5fc2Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 973488cd5fc2Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 973588cd5fc2Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 973688cd5fc2Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 973788cd5fc2Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 973888cd5fc2Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 973988cd5fc2Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 974088cd5fc2Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 974188cd5fc2Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 974288cd5fc2Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 974388cd5fc2Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 974488cd5fc2Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 974588cd5fc2Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 974688cd5fc2Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 974788cd5fc2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 974888cd5fc2Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 974988cd5fc2Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 975088cd5fc2Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 975188cd5fc2Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 975288cd5fc2Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 975388cd5fc2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 975488cd5fc2Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 975588cd5fc2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 975688cd5fc2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 975788cd5fc2Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 975888cd5fc2Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 975988cd5fc2Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 976088cd5fc2Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 976188cd5fc2Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 976288cd5fc2Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 976388cd5fc2Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 976488cd5fc2Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 976588cd5fc2Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 976688cd5fc2Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 976788cd5fc2Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 976888cd5fc2Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 976988cd5fc2Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 977088cd5fc2Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 977188cd5fc2Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 977288cd5fc2Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 977388cd5fc2Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 977488cd5fc2Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 977588cd5fc2Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 977688cd5fc2Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 977788cd5fc2Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 977888cd5fc2Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 977988cd5fc2Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 978088cd5fc2Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 978188cd5fc2Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 978288cd5fc2Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 978388cd5fc2Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 978488cd5fc2Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 978588cd5fc2Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 978688cd5fc2Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 978788cd5fc2Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 978888cd5fc2Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 978988cd5fc2Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 979088cd5fc2Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 979188cd5fc2Smrg 979288cd5fc2Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 979388cd5fc2Smrg# serial 1 (pkg-config-0.24) 979488cd5fc2Smrg# 979588cd5fc2Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 979688cd5fc2Smrg# 979788cd5fc2Smrg# This program is free software; you can redistribute it and/or modify 979888cd5fc2Smrg# it under the terms of the GNU General Public License as published by 979988cd5fc2Smrg# the Free Software Foundation; either version 2 of the License, or 980088cd5fc2Smrg# (at your option) any later version. 980188cd5fc2Smrg# 980288cd5fc2Smrg# This program is distributed in the hope that it will be useful, but 980388cd5fc2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 980488cd5fc2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 980588cd5fc2Smrg# General Public License for more details. 980688cd5fc2Smrg# 980788cd5fc2Smrg# You should have received a copy of the GNU General Public License 980888cd5fc2Smrg# along with this program; if not, write to the Free Software 980988cd5fc2Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 981088cd5fc2Smrg# 981188cd5fc2Smrg# As a special exception to the GNU General Public License, if you 981288cd5fc2Smrg# distribute this file as part of a program that contains a 981388cd5fc2Smrg# configuration script generated by Autoconf, you may include it under 981488cd5fc2Smrg# the same distribution terms that you use for the rest of that program. 981588cd5fc2Smrg 981688cd5fc2Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 981788cd5fc2Smrg# ---------------------------------- 981888cd5fc2SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 981988cd5fc2Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 982088cd5fc2Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 982188cd5fc2Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 982288cd5fc2SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 982388cd5fc2SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 982488cd5fc2SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 982588cd5fc2Smrg 982688cd5fc2Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 982788cd5fc2Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 982888cd5fc2Smrgfi 982988cd5fc2Smrgif test -n "$PKG_CONFIG"; then 983088cd5fc2Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 983188cd5fc2Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 983288cd5fc2Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 983388cd5fc2Smrg AC_MSG_RESULT([yes]) 983488cd5fc2Smrg else 983588cd5fc2Smrg AC_MSG_RESULT([no]) 983688cd5fc2Smrg PKG_CONFIG="" 983788cd5fc2Smrg fi 983888cd5fc2Smrgfi[]dnl 983988cd5fc2Smrg])# PKG_PROG_PKG_CONFIG 984088cd5fc2Smrg 984188cd5fc2Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 984288cd5fc2Smrg# 984388cd5fc2Smrg# Check to see whether a particular set of modules exists. Similar 984488cd5fc2Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 984588cd5fc2Smrg# 984688cd5fc2Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 984788cd5fc2Smrg# only at the first occurence in configure.ac, so if the first place 984888cd5fc2Smrg# it's called might be skipped (such as if it is within an "if", you 984988cd5fc2Smrg# have to call PKG_CHECK_EXISTS manually 985088cd5fc2Smrg# -------------------------------------------------------------- 985188cd5fc2SmrgAC_DEFUN([PKG_CHECK_EXISTS], 985288cd5fc2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 985388cd5fc2Smrgif test -n "$PKG_CONFIG" && \ 985488cd5fc2Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 985588cd5fc2Smrg m4_default([$2], [:]) 985688cd5fc2Smrgm4_ifvaln([$3], [else 985788cd5fc2Smrg $3])dnl 985888cd5fc2Smrgfi]) 985988cd5fc2Smrg 986088cd5fc2Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 986188cd5fc2Smrg# --------------------------------------------- 986288cd5fc2Smrgm4_define([_PKG_CONFIG], 986388cd5fc2Smrg[if test -n "$$1"; then 986488cd5fc2Smrg pkg_cv_[]$1="$$1" 986588cd5fc2Smrg elif test -n "$PKG_CONFIG"; then 986688cd5fc2Smrg PKG_CHECK_EXISTS([$3], 986788cd5fc2Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 986888cd5fc2Smrg test "x$?" != "x0" && pkg_failed=yes ], 986988cd5fc2Smrg [pkg_failed=yes]) 987088cd5fc2Smrg else 987188cd5fc2Smrg pkg_failed=untried 987288cd5fc2Smrgfi[]dnl 987388cd5fc2Smrg])# _PKG_CONFIG 987488cd5fc2Smrg 987588cd5fc2Smrg# _PKG_SHORT_ERRORS_SUPPORTED 987688cd5fc2Smrg# ----------------------------- 987788cd5fc2SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 987888cd5fc2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 987988cd5fc2Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 988088cd5fc2Smrg _pkg_short_errors_supported=yes 988188cd5fc2Smrgelse 988288cd5fc2Smrg _pkg_short_errors_supported=no 988388cd5fc2Smrgfi[]dnl 988488cd5fc2Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 988588cd5fc2Smrg 988688cd5fc2Smrg 988788cd5fc2Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 988888cd5fc2Smrg# [ACTION-IF-NOT-FOUND]) 988988cd5fc2Smrg# 989088cd5fc2Smrg# 989188cd5fc2Smrg# Note that if there is a possibility the first call to 989288cd5fc2Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 989388cd5fc2Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 989488cd5fc2Smrg# 989588cd5fc2Smrg# 989688cd5fc2Smrg# -------------------------------------------------------------- 989788cd5fc2SmrgAC_DEFUN([PKG_CHECK_MODULES], 989888cd5fc2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 989988cd5fc2SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 990088cd5fc2SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 990188cd5fc2Smrg 990288cd5fc2Smrgpkg_failed=no 990388cd5fc2SmrgAC_MSG_CHECKING([for $1]) 990488cd5fc2Smrg 990588cd5fc2Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 990688cd5fc2Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 990788cd5fc2Smrg 990888cd5fc2Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 990988cd5fc2Smrgand $1[]_LIBS to avoid the need to call pkg-config. 991088cd5fc2SmrgSee the pkg-config man page for more details.]) 991188cd5fc2Smrg 991288cd5fc2Smrgif test $pkg_failed = yes; then 991388cd5fc2Smrg AC_MSG_RESULT([no]) 991488cd5fc2Smrg _PKG_SHORT_ERRORS_SUPPORTED 991588cd5fc2Smrg if test $_pkg_short_errors_supported = yes; then 991688cd5fc2Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 991788cd5fc2Smrg else 991888cd5fc2Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 991988cd5fc2Smrg fi 992088cd5fc2Smrg # Put the nasty error message in config.log where it belongs 992188cd5fc2Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 992288cd5fc2Smrg 992388cd5fc2Smrg m4_default([$4], [AC_MSG_ERROR( 992488cd5fc2Smrg[Package requirements ($2) were not met: 992588cd5fc2Smrg 992688cd5fc2Smrg$$1_PKG_ERRORS 992788cd5fc2Smrg 992888cd5fc2SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 992988cd5fc2Smrginstalled software in a non-standard prefix. 993088cd5fc2Smrg 993188cd5fc2Smrg_PKG_TEXT])[]dnl 993288cd5fc2Smrg ]) 993388cd5fc2Smrgelif test $pkg_failed = untried; then 993488cd5fc2Smrg AC_MSG_RESULT([no]) 993588cd5fc2Smrg m4_default([$4], [AC_MSG_FAILURE( 993688cd5fc2Smrg[The pkg-config script could not be found or is too old. Make sure it 993788cd5fc2Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 993888cd5fc2Smrgpath to pkg-config. 993988cd5fc2Smrg 994088cd5fc2Smrg_PKG_TEXT 994188cd5fc2Smrg 994288cd5fc2SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 994388cd5fc2Smrg ]) 994488cd5fc2Smrgelse 994588cd5fc2Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 994688cd5fc2Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 994788cd5fc2Smrg AC_MSG_RESULT([yes]) 994888cd5fc2Smrg $3 994988cd5fc2Smrgfi[]dnl 995088cd5fc2Smrg])# PKG_CHECK_MODULES 995188cd5fc2Smrg 995288cd5fc2Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 995388cd5fc2Smrgdnl 995488cd5fc2Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 995588cd5fc2Smrgdnl 995688cd5fc2Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 995788cd5fc2Smrgdnl copy of this software and associated documentation files (the "Software"), 995888cd5fc2Smrgdnl to deal in the Software without restriction, including without limitation 995988cd5fc2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 996088cd5fc2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 996188cd5fc2Smrgdnl Software is furnished to do so, subject to the following conditions: 996288cd5fc2Smrgdnl 996388cd5fc2Smrgdnl The above copyright notice and this permission notice (including the next 996488cd5fc2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 996588cd5fc2Smrgdnl Software. 996688cd5fc2Smrgdnl 996788cd5fc2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 996888cd5fc2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 996988cd5fc2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 997088cd5fc2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 997188cd5fc2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 997288cd5fc2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 997388cd5fc2Smrgdnl DEALINGS IN THE SOFTWARE. 997488cd5fc2Smrg 997588cd5fc2Smrg# XORG_MACROS_VERSION(required-version) 997688cd5fc2Smrg# ------------------------------------- 997788cd5fc2Smrg# Minimum version: 1.1.0 997888cd5fc2Smrg# 997988cd5fc2Smrg# If you're using a macro added in Version 1.1 or newer, include this in 998088cd5fc2Smrg# your configure.ac with the minimum required version, such as: 998188cd5fc2Smrg# XORG_MACROS_VERSION(1.1) 998288cd5fc2Smrg# 998388cd5fc2Smrg# To ensure that this macro is defined, also add: 998488cd5fc2Smrg# m4_ifndef([XORG_MACROS_VERSION], 998588cd5fc2Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 998688cd5fc2Smrg# 998788cd5fc2Smrg# 998888cd5fc2Smrg# See the "minimum version" comment for each macro you use to see what 998988cd5fc2Smrg# version you require. 999088cd5fc2Smrgm4_defun([XORG_MACROS_VERSION],[ 999188cd5fc2Smrgm4_define([vers_have], [1.19.0]) 999288cd5fc2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 999388cd5fc2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 999488cd5fc2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 999588cd5fc2Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 999688cd5fc2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 999788cd5fc2Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 999888cd5fc2Smrgm4_undefine([vers_have]) 999988cd5fc2Smrgm4_undefine([maj_have]) 1000088cd5fc2Smrgm4_undefine([maj_needed]) 1000188cd5fc2Smrg]) # XORG_MACROS_VERSION 1000288cd5fc2Smrg 1000388cd5fc2Smrg# XORG_PROG_RAWCPP() 1000488cd5fc2Smrg# ------------------ 1000588cd5fc2Smrg# Minimum version: 1.0.0 1000688cd5fc2Smrg# 1000788cd5fc2Smrg# Find cpp program and necessary flags for use in pre-processing text files 1000888cd5fc2Smrg# such as man pages and config files 1000988cd5fc2SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1001088cd5fc2SmrgAC_REQUIRE([AC_PROG_CPP]) 1001188cd5fc2SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1001288cd5fc2Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1001388cd5fc2Smrg 1001488cd5fc2Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1001588cd5fc2Smrg# which is not the best choice for supporting other OS'es, but covers most 1001688cd5fc2Smrg# of the ones we need for now. 1001788cd5fc2SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1001888cd5fc2SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1001988cd5fc2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1002088cd5fc2Smrg AC_MSG_RESULT([no]) 1002188cd5fc2Smrgelse 1002288cd5fc2Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1002388cd5fc2Smrg RAWCPPFLAGS=-undef 1002488cd5fc2Smrg AC_MSG_RESULT([yes]) 1002588cd5fc2Smrg # under Cygwin unix is still defined even with -undef 1002688cd5fc2Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1002788cd5fc2Smrg RAWCPPFLAGS="-undef -ansi" 1002888cd5fc2Smrg AC_MSG_RESULT([yes, with -ansi]) 1002988cd5fc2Smrg else 1003088cd5fc2Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1003188cd5fc2Smrg fi 1003288cd5fc2Smrgfi 1003388cd5fc2Smrgrm -f conftest.$ac_ext 1003488cd5fc2Smrg 1003588cd5fc2SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1003688cd5fc2SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1003788cd5fc2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1003888cd5fc2Smrg AC_MSG_RESULT([no]) 1003988cd5fc2Smrgelse 1004088cd5fc2Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1004188cd5fc2Smrg TRADITIONALCPPFLAGS="-traditional" 1004288cd5fc2Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1004388cd5fc2Smrg AC_MSG_RESULT([yes]) 1004488cd5fc2Smrg else 1004588cd5fc2Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1004688cd5fc2Smrg fi 1004788cd5fc2Smrgfi 1004888cd5fc2Smrgrm -f conftest.$ac_ext 1004988cd5fc2SmrgAC_SUBST(RAWCPPFLAGS) 1005088cd5fc2SmrgAC_SUBST(TRADITIONALCPPFLAGS) 1005188cd5fc2Smrg]) # XORG_PROG_RAWCPP 1005288cd5fc2Smrg 1005388cd5fc2Smrg# XORG_MANPAGE_SECTIONS() 1005488cd5fc2Smrg# ----------------------- 1005588cd5fc2Smrg# Minimum version: 1.0.0 1005688cd5fc2Smrg# 1005788cd5fc2Smrg# Determine which sections man pages go in for the different man page types 1005888cd5fc2Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1005988cd5fc2Smrg# Not sure if there's any better way than just hardcoding by OS name. 1006088cd5fc2Smrg# Override default settings by setting environment variables 1006188cd5fc2Smrg# Added MAN_SUBSTS in version 1.8 1006288cd5fc2Smrg# Added AC_PROG_SED in version 1.8 1006388cd5fc2Smrg 1006488cd5fc2SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1006588cd5fc2SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1006688cd5fc2SmrgAC_REQUIRE([AC_PROG_SED]) 1006788cd5fc2Smrg 1006888cd5fc2Smrgif test x$APP_MAN_SUFFIX = x ; then 1006988cd5fc2Smrg APP_MAN_SUFFIX=1 1007088cd5fc2Smrgfi 1007188cd5fc2Smrgif test x$APP_MAN_DIR = x ; then 1007288cd5fc2Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1007388cd5fc2Smrgfi 1007488cd5fc2Smrg 1007588cd5fc2Smrgif test x$LIB_MAN_SUFFIX = x ; then 1007688cd5fc2Smrg LIB_MAN_SUFFIX=3 1007788cd5fc2Smrgfi 1007888cd5fc2Smrgif test x$LIB_MAN_DIR = x ; then 1007988cd5fc2Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1008088cd5fc2Smrgfi 1008188cd5fc2Smrg 1008288cd5fc2Smrgif test x$FILE_MAN_SUFFIX = x ; then 1008388cd5fc2Smrg case $host_os in 1008488cd5fc2Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1008588cd5fc2Smrg *) FILE_MAN_SUFFIX=5 ;; 1008688cd5fc2Smrg esac 1008788cd5fc2Smrgfi 1008888cd5fc2Smrgif test x$FILE_MAN_DIR = x ; then 1008988cd5fc2Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1009088cd5fc2Smrgfi 1009188cd5fc2Smrg 1009288cd5fc2Smrgif test x$MISC_MAN_SUFFIX = x ; then 1009388cd5fc2Smrg case $host_os in 1009488cd5fc2Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1009588cd5fc2Smrg *) MISC_MAN_SUFFIX=7 ;; 1009688cd5fc2Smrg esac 1009788cd5fc2Smrgfi 1009888cd5fc2Smrgif test x$MISC_MAN_DIR = x ; then 1009988cd5fc2Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1010088cd5fc2Smrgfi 1010188cd5fc2Smrg 1010288cd5fc2Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1010388cd5fc2Smrg case $host_os in 1010488cd5fc2Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1010588cd5fc2Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1010688cd5fc2Smrg esac 1010788cd5fc2Smrgfi 1010888cd5fc2Smrgif test x$DRIVER_MAN_DIR = x ; then 1010988cd5fc2Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1011088cd5fc2Smrgfi 1011188cd5fc2Smrg 1011288cd5fc2Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1011388cd5fc2Smrg case $host_os in 1011488cd5fc2Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1011588cd5fc2Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1011688cd5fc2Smrg esac 1011788cd5fc2Smrgfi 1011888cd5fc2Smrgif test x$ADMIN_MAN_DIR = x ; then 1011988cd5fc2Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1012088cd5fc2Smrgfi 1012188cd5fc2Smrg 1012288cd5fc2Smrg 1012388cd5fc2SmrgAC_SUBST([APP_MAN_SUFFIX]) 1012488cd5fc2SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1012588cd5fc2SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1012688cd5fc2SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1012788cd5fc2SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1012888cd5fc2SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1012988cd5fc2SmrgAC_SUBST([APP_MAN_DIR]) 1013088cd5fc2SmrgAC_SUBST([LIB_MAN_DIR]) 1013188cd5fc2SmrgAC_SUBST([FILE_MAN_DIR]) 1013288cd5fc2SmrgAC_SUBST([MISC_MAN_DIR]) 1013388cd5fc2SmrgAC_SUBST([DRIVER_MAN_DIR]) 1013488cd5fc2SmrgAC_SUBST([ADMIN_MAN_DIR]) 1013588cd5fc2Smrg 1013688cd5fc2SmrgXORG_MAN_PAGE="X Version 11" 1013788cd5fc2SmrgAC_SUBST([XORG_MAN_PAGE]) 1013888cd5fc2SmrgMAN_SUBSTS="\ 1013988cd5fc2Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1014088cd5fc2Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1014188cd5fc2Smrg -e 's|__xservername__|Xorg|g' \ 1014288cd5fc2Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1014388cd5fc2Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1014488cd5fc2Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1014588cd5fc2Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1014688cd5fc2Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1014788cd5fc2Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1014888cd5fc2Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1014988cd5fc2Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1015088cd5fc2Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1015188cd5fc2SmrgAC_SUBST([MAN_SUBSTS]) 1015288cd5fc2Smrg 1015388cd5fc2Smrg]) # XORG_MANPAGE_SECTIONS 1015488cd5fc2Smrg 1015588cd5fc2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1015688cd5fc2Smrg# ------------------------ 1015788cd5fc2Smrg# Minimum version: 1.7.0 1015888cd5fc2Smrg# 1015988cd5fc2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1016088cd5fc2Smrg# provided by xorg-sgml-doctools, if installed. 1016188cd5fc2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1016288cd5fc2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1016388cd5fc2SmrgXORG_SGML_PATH= 1016488cd5fc2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1016588cd5fc2Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1016688cd5fc2Smrg [m4_ifval([$1],[:], 1016788cd5fc2Smrg [if test x"$cross_compiling" != x"yes" ; then 1016888cd5fc2Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1016988cd5fc2Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1017088cd5fc2Smrg fi]) 1017188cd5fc2Smrg ]) 1017288cd5fc2Smrg 1017388cd5fc2Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1017488cd5fc2Smrg# the path and the name of the doc stylesheet 1017588cd5fc2Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1017688cd5fc2Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1017788cd5fc2Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1017888cd5fc2Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1017988cd5fc2Smrgelse 1018088cd5fc2Smrg AC_MSG_RESULT([no]) 1018188cd5fc2Smrgfi 1018288cd5fc2Smrg 1018388cd5fc2SmrgAC_SUBST(XORG_SGML_PATH) 1018488cd5fc2SmrgAC_SUBST(STYLESHEET_SRCDIR) 1018588cd5fc2SmrgAC_SUBST(XSL_STYLESHEET) 1018688cd5fc2SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1018788cd5fc2Smrg]) # XORG_CHECK_SGML_DOCTOOLS 1018888cd5fc2Smrg 1018988cd5fc2Smrg# XORG_CHECK_LINUXDOC 1019088cd5fc2Smrg# ------------------- 1019188cd5fc2Smrg# Minimum version: 1.0.0 1019288cd5fc2Smrg# 1019388cd5fc2Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1019488cd5fc2Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1019588cd5fc2Smrg# Whether or not the necessary tools and files are found can be checked 1019688cd5fc2Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1019788cd5fc2SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1019888cd5fc2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1019988cd5fc2SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1020088cd5fc2Smrg 1020188cd5fc2SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1020288cd5fc2Smrg 1020388cd5fc2SmrgAC_MSG_CHECKING([whether to build documentation]) 1020488cd5fc2Smrg 1020588cd5fc2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1020688cd5fc2Smrg BUILDDOC=yes 1020788cd5fc2Smrgelse 1020888cd5fc2Smrg BUILDDOC=no 1020988cd5fc2Smrgfi 1021088cd5fc2Smrg 1021188cd5fc2SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1021288cd5fc2Smrg 1021388cd5fc2SmrgAC_MSG_RESULT([$BUILDDOC]) 1021488cd5fc2Smrg 1021588cd5fc2SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1021688cd5fc2Smrg 1021788cd5fc2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1021888cd5fc2Smrg BUILDPDFDOC=yes 1021988cd5fc2Smrgelse 1022088cd5fc2Smrg BUILDPDFDOC=no 1022188cd5fc2Smrgfi 1022288cd5fc2Smrg 1022388cd5fc2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1022488cd5fc2Smrg 1022588cd5fc2SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1022688cd5fc2Smrg 1022788cd5fc2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1022888cd5fc2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1022988cd5fc2SmrgMAKE_PDF="$PS2PDF" 1023088cd5fc2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1023188cd5fc2Smrg 1023288cd5fc2SmrgAC_SUBST(MAKE_TEXT) 1023388cd5fc2SmrgAC_SUBST(MAKE_PS) 1023488cd5fc2SmrgAC_SUBST(MAKE_PDF) 1023588cd5fc2SmrgAC_SUBST(MAKE_HTML) 1023688cd5fc2Smrg]) # XORG_CHECK_LINUXDOC 1023788cd5fc2Smrg 1023888cd5fc2Smrg# XORG_CHECK_DOCBOOK 1023988cd5fc2Smrg# ------------------- 1024088cd5fc2Smrg# Minimum version: 1.0.0 1024188cd5fc2Smrg# 1024288cd5fc2Smrg# Checks for the ability to build output formats from SGML DocBook source. 1024388cd5fc2Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1024488cd5fc2Smrg# indicates whether the necessary tools and files are found and, if set, 1024588cd5fc2Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1024688cd5fc2SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1024788cd5fc2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1024888cd5fc2Smrg 1024988cd5fc2SmrgBUILDTXTDOC=no 1025088cd5fc2SmrgBUILDPDFDOC=no 1025188cd5fc2SmrgBUILDPSDOC=no 1025288cd5fc2SmrgBUILDHTMLDOC=no 1025388cd5fc2Smrg 1025488cd5fc2SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1025588cd5fc2SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1025688cd5fc2SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1025788cd5fc2SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1025888cd5fc2Smrg 1025988cd5fc2SmrgAC_MSG_CHECKING([whether to build text documentation]) 1026088cd5fc2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1026188cd5fc2Smrg test x$BUILD_TXTDOC != xno; then 1026288cd5fc2Smrg BUILDTXTDOC=yes 1026388cd5fc2Smrgfi 1026488cd5fc2SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1026588cd5fc2SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1026688cd5fc2Smrg 1026788cd5fc2SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1026888cd5fc2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1026988cd5fc2Smrg test x$BUILD_PDFDOC != xno; then 1027088cd5fc2Smrg BUILDPDFDOC=yes 1027188cd5fc2Smrgfi 1027288cd5fc2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1027388cd5fc2SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1027488cd5fc2Smrg 1027588cd5fc2SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1027688cd5fc2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1027788cd5fc2Smrg test x$BUILD_PSDOC != xno; then 1027888cd5fc2Smrg BUILDPSDOC=yes 1027988cd5fc2Smrgfi 1028088cd5fc2SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1028188cd5fc2SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1028288cd5fc2Smrg 1028388cd5fc2SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1028488cd5fc2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1028588cd5fc2Smrg test x$BUILD_HTMLDOC != xno; then 1028688cd5fc2Smrg BUILDHTMLDOC=yes 1028788cd5fc2Smrgfi 1028888cd5fc2SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1028988cd5fc2SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1029088cd5fc2Smrg 1029188cd5fc2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1029288cd5fc2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1029388cd5fc2SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1029488cd5fc2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1029588cd5fc2Smrg 1029688cd5fc2SmrgAC_SUBST(MAKE_TEXT) 1029788cd5fc2SmrgAC_SUBST(MAKE_PS) 1029888cd5fc2SmrgAC_SUBST(MAKE_PDF) 1029988cd5fc2SmrgAC_SUBST(MAKE_HTML) 1030088cd5fc2Smrg]) # XORG_CHECK_DOCBOOK 1030188cd5fc2Smrg 1030288cd5fc2Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1030388cd5fc2Smrg# ---------------- 1030488cd5fc2Smrg# Minimum version: 1.5.0 1030588cd5fc2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1030688cd5fc2Smrg# 1030788cd5fc2Smrg# Documentation tools are not always available on all platforms and sometimes 1030888cd5fc2Smrg# not at the appropriate level. This macro enables a module to test for the 1030988cd5fc2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1031088cd5fc2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1031188cd5fc2Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1031288cd5fc2Smrg# --with-xmlto assumes 'auto'. 1031388cd5fc2Smrg# 1031488cd5fc2Smrg# Interface to module: 1031588cd5fc2Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1031688cd5fc2Smrg# XMLTO: returns the path of the xmlto program found 1031788cd5fc2Smrg# returns the path set by the user in the environment 1031888cd5fc2Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1031988cd5fc2Smrg# 'no' user instructs the module not to use xmlto 1032088cd5fc2Smrg# 1032188cd5fc2Smrg# Added in version 1.10.0 1032288cd5fc2Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1032388cd5fc2Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1032488cd5fc2Smrg# 1032588cd5fc2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1032688cd5fc2Smrg# 1032788cd5fc2SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1032888cd5fc2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1032988cd5fc2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1033088cd5fc2SmrgAC_ARG_WITH(xmlto, 1033188cd5fc2Smrg AS_HELP_STRING([--with-xmlto], 1033288cd5fc2Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1033388cd5fc2Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1033488cd5fc2Smrgm4_undefine([_defopt]) 1033588cd5fc2Smrg 1033688cd5fc2Smrgif test "x$use_xmlto" = x"auto"; then 1033788cd5fc2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1033888cd5fc2Smrg if test "x$XMLTO" = "x"; then 1033988cd5fc2Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1034088cd5fc2Smrg have_xmlto=no 1034188cd5fc2Smrg else 1034288cd5fc2Smrg have_xmlto=yes 1034388cd5fc2Smrg fi 1034488cd5fc2Smrgelif test "x$use_xmlto" = x"yes" ; then 1034588cd5fc2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1034688cd5fc2Smrg if test "x$XMLTO" = "x"; then 1034788cd5fc2Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1034888cd5fc2Smrg fi 1034988cd5fc2Smrg have_xmlto=yes 1035088cd5fc2Smrgelif test "x$use_xmlto" = x"no" ; then 1035188cd5fc2Smrg if test "x$XMLTO" != "x"; then 1035288cd5fc2Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1035388cd5fc2Smrg fi 1035488cd5fc2Smrg have_xmlto=no 1035588cd5fc2Smrgelse 1035688cd5fc2Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1035788cd5fc2Smrgfi 1035888cd5fc2Smrg 1035988cd5fc2Smrg# Test for a minimum version of xmlto, if provided. 1036088cd5fc2Smrgm4_ifval([$1], 1036188cd5fc2Smrg[if test "$have_xmlto" = yes; then 1036288cd5fc2Smrg # scrape the xmlto version 1036388cd5fc2Smrg AC_MSG_CHECKING([the xmlto version]) 1036488cd5fc2Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1036588cd5fc2Smrg AC_MSG_RESULT([$xmlto_version]) 1036688cd5fc2Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1036788cd5fc2Smrg [if test "x$use_xmlto" = xauto; then 1036888cd5fc2Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1036988cd5fc2Smrg have_xmlto=no 1037088cd5fc2Smrg else 1037188cd5fc2Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1037288cd5fc2Smrg fi]) 1037388cd5fc2Smrgfi]) 1037488cd5fc2Smrg 1037588cd5fc2Smrg# Test for the ability of xmlto to generate a text target 1037688cd5fc2Smrghave_xmlto_text=no 1037788cd5fc2Smrgcat > conftest.xml << "EOF" 1037888cd5fc2SmrgEOF 1037988cd5fc2SmrgAS_IF([test "$have_xmlto" = yes], 1038088cd5fc2Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1038188cd5fc2Smrg [have_xmlto_text=yes], 1038288cd5fc2Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1038388cd5fc2Smrgrm -f conftest.xml 1038488cd5fc2SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1038588cd5fc2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1038688cd5fc2Smrg]) # XORG_WITH_XMLTO 1038788cd5fc2Smrg 1038888cd5fc2Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1038988cd5fc2Smrg# -------------------------------------------- 1039088cd5fc2Smrg# Minimum version: 1.12.0 1039188cd5fc2Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1039288cd5fc2Smrg# 1039388cd5fc2Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1039488cd5fc2Smrg# XML-based language used for the transformation of XML documents. 1039588cd5fc2Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1039688cd5fc2Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1039788cd5fc2Smrg# The XSLT processor is often used as a standalone tool for transformations. 1039888cd5fc2Smrg# It should not be assumed that this tool is used only to work with documnetation. 1039988cd5fc2Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1040088cd5fc2Smrg# 1040188cd5fc2Smrg# Interface to module: 1040288cd5fc2Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1040388cd5fc2Smrg# XSLTPROC: returns the path of the xsltproc program found 1040488cd5fc2Smrg# returns the path set by the user in the environment 1040588cd5fc2Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1040688cd5fc2Smrg# 'no' user instructs the module not to use xsltproc 1040788cd5fc2Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1040888cd5fc2Smrg# 1040988cd5fc2Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1041088cd5fc2Smrg# 1041188cd5fc2SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1041288cd5fc2SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1041388cd5fc2Smrg# Preserves the interface, should it be implemented later 1041488cd5fc2Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1041588cd5fc2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1041688cd5fc2SmrgAC_ARG_WITH(xsltproc, 1041788cd5fc2Smrg AS_HELP_STRING([--with-xsltproc], 1041888cd5fc2Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1041988cd5fc2Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1042088cd5fc2Smrgm4_undefine([_defopt]) 1042188cd5fc2Smrg 1042288cd5fc2Smrgif test "x$use_xsltproc" = x"auto"; then 1042388cd5fc2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1042488cd5fc2Smrg if test "x$XSLTPROC" = "x"; then 1042588cd5fc2Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1042688cd5fc2Smrg have_xsltproc=no 1042788cd5fc2Smrg else 1042888cd5fc2Smrg have_xsltproc=yes 1042988cd5fc2Smrg fi 1043088cd5fc2Smrgelif test "x$use_xsltproc" = x"yes" ; then 1043188cd5fc2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1043288cd5fc2Smrg if test "x$XSLTPROC" = "x"; then 1043388cd5fc2Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1043488cd5fc2Smrg fi 1043588cd5fc2Smrg have_xsltproc=yes 1043688cd5fc2Smrgelif test "x$use_xsltproc" = x"no" ; then 1043788cd5fc2Smrg if test "x$XSLTPROC" != "x"; then 1043888cd5fc2Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1043988cd5fc2Smrg fi 1044088cd5fc2Smrg have_xsltproc=no 1044188cd5fc2Smrgelse 1044288cd5fc2Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1044388cd5fc2Smrgfi 1044488cd5fc2Smrg 1044588cd5fc2SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1044688cd5fc2Smrg]) # XORG_WITH_XSLTPROC 1044788cd5fc2Smrg 1044888cd5fc2Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1044988cd5fc2Smrg# ---------------------------------------- 1045088cd5fc2Smrg# Minimum version: 1.15.0 1045188cd5fc2Smrg# 1045288cd5fc2Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1045388cd5fc2Smrg# scanning arbitrary text files, extracting information from those text files, 1045488cd5fc2Smrg# and printing reports based on that information. 1045588cd5fc2Smrg# 1045688cd5fc2Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1045788cd5fc2Smrg# 1045888cd5fc2Smrg# Interface to module: 1045988cd5fc2Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1046088cd5fc2Smrg# PERL: returns the path of the perl program found 1046188cd5fc2Smrg# returns the path set by the user in the environment 1046288cd5fc2Smrg# --with-perl: 'yes' user instructs the module to use perl 1046388cd5fc2Smrg# 'no' user instructs the module not to use perl 1046488cd5fc2Smrg# have_perl: returns yes if perl found in PATH or no 1046588cd5fc2Smrg# 1046688cd5fc2Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1046788cd5fc2Smrg# 1046888cd5fc2SmrgAC_DEFUN([XORG_WITH_PERL],[ 1046988cd5fc2SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1047088cd5fc2Smrg# Preserves the interface, should it be implemented later 1047188cd5fc2Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1047288cd5fc2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1047388cd5fc2SmrgAC_ARG_WITH(perl, 1047488cd5fc2Smrg AS_HELP_STRING([--with-perl], 1047588cd5fc2Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1047688cd5fc2Smrg [use_perl=$withval], [use_perl=]_defopt) 1047788cd5fc2Smrgm4_undefine([_defopt]) 1047888cd5fc2Smrg 1047988cd5fc2Smrgif test "x$use_perl" = x"auto"; then 1048088cd5fc2Smrg AC_PATH_PROG([PERL], [perl]) 1048188cd5fc2Smrg if test "x$PERL" = "x"; then 1048288cd5fc2Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1048388cd5fc2Smrg have_perl=no 1048488cd5fc2Smrg else 1048588cd5fc2Smrg have_perl=yes 1048688cd5fc2Smrg fi 1048788cd5fc2Smrgelif test "x$use_perl" = x"yes" ; then 1048888cd5fc2Smrg AC_PATH_PROG([PERL], [perl]) 1048988cd5fc2Smrg if test "x$PERL" = "x"; then 1049088cd5fc2Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1049188cd5fc2Smrg fi 1049288cd5fc2Smrg have_perl=yes 1049388cd5fc2Smrgelif test "x$use_perl" = x"no" ; then 1049488cd5fc2Smrg if test "x$PERL" != "x"; then 1049588cd5fc2Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1049688cd5fc2Smrg fi 1049788cd5fc2Smrg have_perl=no 1049888cd5fc2Smrgelse 1049988cd5fc2Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1050088cd5fc2Smrgfi 1050188cd5fc2Smrg 1050288cd5fc2SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1050388cd5fc2Smrg]) # XORG_WITH_PERL 1050488cd5fc2Smrg 1050588cd5fc2Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1050688cd5fc2Smrg# ---------------- 1050788cd5fc2Smrg# Minimum version: 1.5.0 1050888cd5fc2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1050988cd5fc2Smrg# 1051088cd5fc2Smrg# Documentation tools are not always available on all platforms and sometimes 1051188cd5fc2Smrg# not at the appropriate level. This macro enables a module to test for the 1051288cd5fc2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1051388cd5fc2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1051488cd5fc2Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1051588cd5fc2Smrg# --with-asciidoc assumes 'auto'. 1051688cd5fc2Smrg# 1051788cd5fc2Smrg# Interface to module: 1051888cd5fc2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1051988cd5fc2Smrg# ASCIIDOC: returns the path of the asciidoc program found 1052088cd5fc2Smrg# returns the path set by the user in the environment 1052188cd5fc2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1052288cd5fc2Smrg# 'no' user instructs the module not to use asciidoc 1052388cd5fc2Smrg# 1052488cd5fc2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1052588cd5fc2Smrg# 1052688cd5fc2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1052788cd5fc2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1052888cd5fc2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1052988cd5fc2SmrgAC_ARG_WITH(asciidoc, 1053088cd5fc2Smrg AS_HELP_STRING([--with-asciidoc], 1053188cd5fc2Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1053288cd5fc2Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1053388cd5fc2Smrgm4_undefine([_defopt]) 1053488cd5fc2Smrg 1053588cd5fc2Smrgif test "x$use_asciidoc" = x"auto"; then 1053688cd5fc2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1053788cd5fc2Smrg if test "x$ASCIIDOC" = "x"; then 1053888cd5fc2Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1053988cd5fc2Smrg have_asciidoc=no 1054088cd5fc2Smrg else 1054188cd5fc2Smrg have_asciidoc=yes 1054288cd5fc2Smrg fi 1054388cd5fc2Smrgelif test "x$use_asciidoc" = x"yes" ; then 1054488cd5fc2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1054588cd5fc2Smrg if test "x$ASCIIDOC" = "x"; then 1054688cd5fc2Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1054788cd5fc2Smrg fi 1054888cd5fc2Smrg have_asciidoc=yes 1054988cd5fc2Smrgelif test "x$use_asciidoc" = x"no" ; then 1055088cd5fc2Smrg if test "x$ASCIIDOC" != "x"; then 1055188cd5fc2Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1055288cd5fc2Smrg fi 1055388cd5fc2Smrg have_asciidoc=no 1055488cd5fc2Smrgelse 1055588cd5fc2Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1055688cd5fc2Smrgfi 1055788cd5fc2Smrgm4_ifval([$1], 1055888cd5fc2Smrg[if test "$have_asciidoc" = yes; then 1055988cd5fc2Smrg # scrape the asciidoc version 1056088cd5fc2Smrg AC_MSG_CHECKING([the asciidoc version]) 1056188cd5fc2Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1056288cd5fc2Smrg AC_MSG_RESULT([$asciidoc_version]) 1056388cd5fc2Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1056488cd5fc2Smrg [if test "x$use_asciidoc" = xauto; then 1056588cd5fc2Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1056688cd5fc2Smrg have_asciidoc=no 1056788cd5fc2Smrg else 1056888cd5fc2Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1056988cd5fc2Smrg fi]) 1057088cd5fc2Smrgfi]) 1057188cd5fc2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1057288cd5fc2Smrg]) # XORG_WITH_ASCIIDOC 1057388cd5fc2Smrg 1057488cd5fc2Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1057588cd5fc2Smrg# ------------------------------------------- 1057688cd5fc2Smrg# Minimum version: 1.5.0 1057788cd5fc2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1057888cd5fc2Smrg# Minimum version for optional DOT checking: 1.18.0 1057988cd5fc2Smrg# 1058088cd5fc2Smrg# Documentation tools are not always available on all platforms and sometimes 1058188cd5fc2Smrg# not at the appropriate level. This macro enables a module to test for the 1058288cd5fc2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1058388cd5fc2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1058488cd5fc2Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1058588cd5fc2Smrg# --with-doxygen assumes 'auto'. 1058688cd5fc2Smrg# 1058788cd5fc2Smrg# Interface to module: 1058888cd5fc2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1058988cd5fc2Smrg# DOXYGEN: returns the path of the doxygen program found 1059088cd5fc2Smrg# returns the path set by the user in the environment 1059188cd5fc2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1059288cd5fc2Smrg# 'no' user instructs the module not to use doxygen 1059388cd5fc2Smrg# 1059488cd5fc2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1059588cd5fc2Smrg# 1059688cd5fc2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1059788cd5fc2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1059888cd5fc2SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 1059988cd5fc2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1060088cd5fc2SmrgAC_ARG_WITH(doxygen, 1060188cd5fc2Smrg AS_HELP_STRING([--with-doxygen], 1060288cd5fc2Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1060388cd5fc2Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1060488cd5fc2Smrgm4_undefine([_defopt]) 1060588cd5fc2Smrg 1060688cd5fc2Smrgif test "x$use_doxygen" = x"auto"; then 1060788cd5fc2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1060888cd5fc2Smrg if test "x$DOXYGEN" = "x"; then 1060988cd5fc2Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1061088cd5fc2Smrg have_doxygen=no 1061188cd5fc2Smrg else 1061288cd5fc2Smrg have_doxygen=yes 1061388cd5fc2Smrg fi 1061488cd5fc2Smrgelif test "x$use_doxygen" = x"yes" ; then 1061588cd5fc2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1061688cd5fc2Smrg if test "x$DOXYGEN" = "x"; then 1061788cd5fc2Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1061888cd5fc2Smrg fi 1061988cd5fc2Smrg have_doxygen=yes 1062088cd5fc2Smrgelif test "x$use_doxygen" = x"no" ; then 1062188cd5fc2Smrg if test "x$DOXYGEN" != "x"; then 1062288cd5fc2Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1062388cd5fc2Smrg fi 1062488cd5fc2Smrg have_doxygen=no 1062588cd5fc2Smrgelse 1062688cd5fc2Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1062788cd5fc2Smrgfi 1062888cd5fc2Smrgm4_ifval([$1], 1062988cd5fc2Smrg[if test "$have_doxygen" = yes; then 1063088cd5fc2Smrg # scrape the doxygen version 1063188cd5fc2Smrg AC_MSG_CHECKING([the doxygen version]) 1063288cd5fc2Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1063388cd5fc2Smrg AC_MSG_RESULT([$doxygen_version]) 1063488cd5fc2Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1063588cd5fc2Smrg [if test "x$use_doxygen" = xauto; then 1063688cd5fc2Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1063788cd5fc2Smrg have_doxygen=no 1063888cd5fc2Smrg else 1063988cd5fc2Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1064088cd5fc2Smrg fi]) 1064188cd5fc2Smrgfi]) 1064288cd5fc2Smrg 1064388cd5fc2Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 1064488cd5fc2Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 1064588cd5fc2Smrgdnl HAVE_DOT = @HAVE_DOT@ 1064688cd5fc2SmrgHAVE_DOT=no 1064788cd5fc2Smrgif test "x$have_doxygen" = "xyes"; then 1064888cd5fc2Smrg AC_PATH_PROG([DOT], [dot]) 1064988cd5fc2Smrg if test "x$DOT" != "x"; then 1065088cd5fc2Smrg HAVE_DOT=yes 1065188cd5fc2Smrg fi 1065288cd5fc2Smrgfi 1065388cd5fc2Smrg 1065488cd5fc2SmrgAC_SUBST([HAVE_DOT]) 1065588cd5fc2SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 1065688cd5fc2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1065788cd5fc2Smrg]) # XORG_WITH_DOXYGEN 1065888cd5fc2Smrg 1065988cd5fc2Smrg# XORG_WITH_GROFF([DEFAULT]) 1066088cd5fc2Smrg# ---------------- 1066188cd5fc2Smrg# Minimum version: 1.6.0 1066288cd5fc2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1066388cd5fc2Smrg# 1066488cd5fc2Smrg# Documentation tools are not always available on all platforms and sometimes 1066588cd5fc2Smrg# not at the appropriate level. This macro enables a module to test for the 1066688cd5fc2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1066788cd5fc2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1066888cd5fc2Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1066988cd5fc2Smrg# --with-groff assumes 'auto'. 1067088cd5fc2Smrg# 1067188cd5fc2Smrg# Interface to module: 1067288cd5fc2Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1067388cd5fc2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1067488cd5fc2Smrg# HAVE_GROFF_MS: the -ms macros package 1067588cd5fc2Smrg# GROFF: returns the path of the groff program found 1067688cd5fc2Smrg# returns the path set by the user in the environment 1067788cd5fc2Smrg# --with-groff: 'yes' user instructs the module to use groff 1067888cd5fc2Smrg# 'no' user instructs the module not to use groff 1067988cd5fc2Smrg# 1068088cd5fc2Smrg# Added in version 1.9.0: 1068188cd5fc2Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1068288cd5fc2Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1068388cd5fc2Smrg# psselect from the psutils package. 1068488cd5fc2Smrg# the ghostcript package. Refer to the grohtml man pages 1068588cd5fc2Smrg# 1068688cd5fc2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1068788cd5fc2Smrg# 1068888cd5fc2Smrg# OS and distros often splits groff in a basic and full package, the former 1068988cd5fc2Smrg# having the groff program and the later having devices, fonts and macros 1069088cd5fc2Smrg# Checking for the groff executable is not enough. 1069188cd5fc2Smrg# 1069288cd5fc2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1069388cd5fc2Smrg# unset HAVE_GROFF or GROFF env variables. 1069488cd5fc2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1069588cd5fc2Smrg# 1069688cd5fc2SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1069788cd5fc2SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1069888cd5fc2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1069988cd5fc2SmrgAC_ARG_WITH(groff, 1070088cd5fc2Smrg AS_HELP_STRING([--with-groff], 1070188cd5fc2Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1070288cd5fc2Smrg [use_groff=$withval], [use_groff=]_defopt) 1070388cd5fc2Smrgm4_undefine([_defopt]) 1070488cd5fc2Smrg 1070588cd5fc2Smrgif test "x$use_groff" = x"auto"; then 1070688cd5fc2Smrg AC_PATH_PROG([GROFF], [groff]) 1070788cd5fc2Smrg if test "x$GROFF" = "x"; then 1070888cd5fc2Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1070988cd5fc2Smrg have_groff=no 1071088cd5fc2Smrg else 1071188cd5fc2Smrg have_groff=yes 1071288cd5fc2Smrg fi 1071388cd5fc2Smrgelif test "x$use_groff" = x"yes" ; then 1071488cd5fc2Smrg AC_PATH_PROG([GROFF], [groff]) 1071588cd5fc2Smrg if test "x$GROFF" = "x"; then 1071688cd5fc2Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1071788cd5fc2Smrg fi 1071888cd5fc2Smrg have_groff=yes 1071988cd5fc2Smrgelif test "x$use_groff" = x"no" ; then 1072088cd5fc2Smrg if test "x$GROFF" != "x"; then 1072188cd5fc2Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1072288cd5fc2Smrg fi 1072388cd5fc2Smrg have_groff=no 1072488cd5fc2Smrgelse 1072588cd5fc2Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1072688cd5fc2Smrgfi 1072788cd5fc2Smrg 1072888cd5fc2Smrg# We have groff, test for the presence of the macro packages 1072988cd5fc2Smrgif test "x$have_groff" = x"yes"; then 1073088cd5fc2Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1073188cd5fc2Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1073288cd5fc2Smrg groff_ms_works=yes 1073388cd5fc2Smrg else 1073488cd5fc2Smrg groff_ms_works=no 1073588cd5fc2Smrg fi 1073688cd5fc2Smrg AC_MSG_RESULT([$groff_ms_works]) 1073788cd5fc2Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1073888cd5fc2Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1073988cd5fc2Smrg groff_mm_works=yes 1074088cd5fc2Smrg else 1074188cd5fc2Smrg groff_mm_works=no 1074288cd5fc2Smrg fi 1074388cd5fc2Smrg AC_MSG_RESULT([$groff_mm_works]) 1074488cd5fc2Smrgfi 1074588cd5fc2Smrg 1074688cd5fc2Smrg# We have groff, test for HTML dependencies, one command per package 1074788cd5fc2Smrgif test "x$have_groff" = x"yes"; then 1074888cd5fc2Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1074988cd5fc2Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1075088cd5fc2Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1075188cd5fc2Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1075288cd5fc2Smrg have_groff_html=yes 1075388cd5fc2Smrg else 1075488cd5fc2Smrg have_groff_html=no 1075588cd5fc2Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1075688cd5fc2Smrg fi 1075788cd5fc2Smrgfi 1075888cd5fc2Smrg 1075988cd5fc2Smrg# Set Automake conditionals for Makefiles 1076088cd5fc2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1076188cd5fc2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1076288cd5fc2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1076388cd5fc2SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1076488cd5fc2Smrg]) # XORG_WITH_GROFF 1076588cd5fc2Smrg 1076688cd5fc2Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1076788cd5fc2Smrg# --------------------------------------- 1076888cd5fc2Smrg# Minimum version: 1.6.0 1076988cd5fc2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1077088cd5fc2Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1077188cd5fc2Smrg# 1077288cd5fc2Smrg# Documentation tools are not always available on all platforms and sometimes 1077388cd5fc2Smrg# not at the appropriate level. This macro enables a module to test for the 1077488cd5fc2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1077588cd5fc2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1077688cd5fc2Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1077788cd5fc2Smrg# --with-fop assumes 'auto'. 1077888cd5fc2Smrg# 1077988cd5fc2Smrg# Interface to module: 1078088cd5fc2Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1078188cd5fc2Smrg# FOP: returns the path of the fop program found 1078288cd5fc2Smrg# returns the path set by the user in the environment 1078388cd5fc2Smrg# --with-fop: 'yes' user instructs the module to use fop 1078488cd5fc2Smrg# 'no' user instructs the module not to use fop 1078588cd5fc2Smrg# 1078688cd5fc2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1078788cd5fc2Smrg# 1078888cd5fc2SmrgAC_DEFUN([XORG_WITH_FOP],[ 1078988cd5fc2SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1079088cd5fc2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1079188cd5fc2SmrgAC_ARG_WITH(fop, 1079288cd5fc2Smrg AS_HELP_STRING([--with-fop], 1079388cd5fc2Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1079488cd5fc2Smrg [use_fop=$withval], [use_fop=]_defopt) 1079588cd5fc2Smrgm4_undefine([_defopt]) 1079688cd5fc2Smrg 1079788cd5fc2Smrgif test "x$use_fop" = x"auto"; then 1079888cd5fc2Smrg AC_PATH_PROG([FOP], [fop]) 1079988cd5fc2Smrg if test "x$FOP" = "x"; then 1080088cd5fc2Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1080188cd5fc2Smrg have_fop=no 1080288cd5fc2Smrg else 1080388cd5fc2Smrg have_fop=yes 1080488cd5fc2Smrg fi 1080588cd5fc2Smrgelif test "x$use_fop" = x"yes" ; then 1080688cd5fc2Smrg AC_PATH_PROG([FOP], [fop]) 1080788cd5fc2Smrg if test "x$FOP" = "x"; then 1080888cd5fc2Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1080988cd5fc2Smrg fi 1081088cd5fc2Smrg have_fop=yes 1081188cd5fc2Smrgelif test "x$use_fop" = x"no" ; then 1081288cd5fc2Smrg if test "x$FOP" != "x"; then 1081388cd5fc2Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1081488cd5fc2Smrg fi 1081588cd5fc2Smrg have_fop=no 1081688cd5fc2Smrgelse 1081788cd5fc2Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1081888cd5fc2Smrgfi 1081988cd5fc2Smrg 1082088cd5fc2Smrg# Test for a minimum version of fop, if provided. 1082188cd5fc2Smrgm4_ifval([$1], 1082288cd5fc2Smrg[if test "$have_fop" = yes; then 1082388cd5fc2Smrg # scrape the fop version 1082488cd5fc2Smrg AC_MSG_CHECKING([for fop minimum version]) 1082588cd5fc2Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1082688cd5fc2Smrg AC_MSG_RESULT([$fop_version]) 1082788cd5fc2Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1082888cd5fc2Smrg [if test "x$use_fop" = xauto; then 1082988cd5fc2Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1083088cd5fc2Smrg have_fop=no 1083188cd5fc2Smrg else 1083288cd5fc2Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1083388cd5fc2Smrg fi]) 1083488cd5fc2Smrgfi]) 1083588cd5fc2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1083688cd5fc2Smrg]) # XORG_WITH_FOP 1083788cd5fc2Smrg 1083888cd5fc2Smrg# XORG_WITH_M4([MIN-VERSION]) 1083988cd5fc2Smrg# --------------------------- 1084088cd5fc2Smrg# Minimum version: 1.19.0 1084188cd5fc2Smrg# 1084288cd5fc2Smrg# This macro attempts to locate an m4 macro processor which supports 1084388cd5fc2Smrg# -I option and is only useful for modules relying on M4 in order to 1084488cd5fc2Smrg# expand macros in source code files. 1084588cd5fc2Smrg# 1084688cd5fc2Smrg# Interface to module: 1084788cd5fc2Smrg# M4: returns the path of the m4 program found 1084888cd5fc2Smrg# returns the path set by the user in the environment 1084988cd5fc2Smrg# 1085088cd5fc2SmrgAC_DEFUN([XORG_WITH_M4], [ 1085188cd5fc2SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 1085288cd5fc2Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 1085388cd5fc2Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 1085488cd5fc2Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 1085588cd5fc2Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 1085688cd5fc2Smrg [$PATH:/usr/gnu/bin])]) 1085788cd5fc2Smrg 1085888cd5fc2SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 1085988cd5fc2Smrg]) # XORG_WITH_M4 1086088cd5fc2Smrg 1086188cd5fc2Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1086288cd5fc2Smrg# ---------------- 1086388cd5fc2Smrg# Minimum version: 1.6.0 1086488cd5fc2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1086588cd5fc2Smrg# 1086688cd5fc2Smrg# Documentation tools are not always available on all platforms and sometimes 1086788cd5fc2Smrg# not at the appropriate level. This macro enables a module to test for the 1086888cd5fc2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1086988cd5fc2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1087088cd5fc2Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1087188cd5fc2Smrg# --with-ps2pdf assumes 'auto'. 1087288cd5fc2Smrg# 1087388cd5fc2Smrg# Interface to module: 1087488cd5fc2Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1087588cd5fc2Smrg# PS2PDF: returns the path of the ps2pdf program found 1087688cd5fc2Smrg# returns the path set by the user in the environment 1087788cd5fc2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1087888cd5fc2Smrg# 'no' user instructs the module not to use ps2pdf 1087988cd5fc2Smrg# 1088088cd5fc2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1088188cd5fc2Smrg# 1088288cd5fc2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1088388cd5fc2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1088488cd5fc2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1088588cd5fc2SmrgAC_ARG_WITH(ps2pdf, 1088688cd5fc2Smrg AS_HELP_STRING([--with-ps2pdf], 1088788cd5fc2Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1088888cd5fc2Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1088988cd5fc2Smrgm4_undefine([_defopt]) 1089088cd5fc2Smrg 1089188cd5fc2Smrgif test "x$use_ps2pdf" = x"auto"; then 1089288cd5fc2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1089388cd5fc2Smrg if test "x$PS2PDF" = "x"; then 1089488cd5fc2Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1089588cd5fc2Smrg have_ps2pdf=no 1089688cd5fc2Smrg else 1089788cd5fc2Smrg have_ps2pdf=yes 1089888cd5fc2Smrg fi 1089988cd5fc2Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1090088cd5fc2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1090188cd5fc2Smrg if test "x$PS2PDF" = "x"; then 1090288cd5fc2Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1090388cd5fc2Smrg fi 1090488cd5fc2Smrg have_ps2pdf=yes 1090588cd5fc2Smrgelif test "x$use_ps2pdf" = x"no" ; then 1090688cd5fc2Smrg if test "x$PS2PDF" != "x"; then 1090788cd5fc2Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1090888cd5fc2Smrg fi 1090988cd5fc2Smrg have_ps2pdf=no 1091088cd5fc2Smrgelse 1091188cd5fc2Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1091288cd5fc2Smrgfi 1091388cd5fc2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1091488cd5fc2Smrg]) # XORG_WITH_PS2PDF 1091588cd5fc2Smrg 1091688cd5fc2Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1091788cd5fc2Smrg# ---------------- 1091888cd5fc2Smrg# Minimum version: 1.6.0 1091988cd5fc2Smrg# 1092088cd5fc2Smrg# Documentation tools are not always available on all platforms and sometimes 1092188cd5fc2Smrg# not at the appropriate level. This macro enables a builder to skip all 1092288cd5fc2Smrg# documentation targets except traditional man pages. 1092388cd5fc2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1092488cd5fc2Smrg# maximum flexibilty in controlling documentation building. 1092588cd5fc2Smrg# Refer to: 1092688cd5fc2Smrg# XORG_WITH_XMLTO --with-xmlto 1092788cd5fc2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1092888cd5fc2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1092988cd5fc2Smrg# XORG_WITH_FOP --with-fop 1093088cd5fc2Smrg# XORG_WITH_GROFF --with-groff 1093188cd5fc2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1093288cd5fc2Smrg# 1093388cd5fc2Smrg# Interface to module: 1093488cd5fc2Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1093588cd5fc2Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1093688cd5fc2Smrg# 'no' user instructs the module not to generate docs 1093788cd5fc2Smrg# parm1: specify the default value, yes or no. 1093888cd5fc2Smrg# 1093988cd5fc2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1094088cd5fc2Smrgm4_define([docs_default], m4_default([$1], [yes])) 1094188cd5fc2SmrgAC_ARG_ENABLE(docs, 1094288cd5fc2Smrg AS_HELP_STRING([--enable-docs], 1094388cd5fc2Smrg [Enable building the documentation (default: ]docs_default[)]), 1094488cd5fc2Smrg [build_docs=$enableval], [build_docs=]docs_default) 1094588cd5fc2Smrgm4_undefine([docs_default]) 1094688cd5fc2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1094788cd5fc2SmrgAC_MSG_CHECKING([whether to build documentation]) 1094888cd5fc2SmrgAC_MSG_RESULT([$build_docs]) 1094988cd5fc2Smrg]) # XORG_ENABLE_DOCS 1095088cd5fc2Smrg 1095188cd5fc2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1095288cd5fc2Smrg# ---------------- 1095388cd5fc2Smrg# Minimum version: 1.6.0 1095488cd5fc2Smrg# 1095588cd5fc2Smrg# This macro enables a builder to skip all developer documentation. 1095688cd5fc2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1095788cd5fc2Smrg# maximum flexibilty in controlling documentation building. 1095888cd5fc2Smrg# Refer to: 1095988cd5fc2Smrg# XORG_WITH_XMLTO --with-xmlto 1096088cd5fc2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1096188cd5fc2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1096288cd5fc2Smrg# XORG_WITH_FOP --with-fop 1096388cd5fc2Smrg# XORG_WITH_GROFF --with-groff 1096488cd5fc2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1096588cd5fc2Smrg# 1096688cd5fc2Smrg# Interface to module: 1096788cd5fc2Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1096888cd5fc2Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1096988cd5fc2Smrg# 'no' user instructs the module not to generate developer docs 1097088cd5fc2Smrg# parm1: specify the default value, yes or no. 1097188cd5fc2Smrg# 1097288cd5fc2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1097388cd5fc2Smrgm4_define([devel_default], m4_default([$1], [yes])) 1097488cd5fc2SmrgAC_ARG_ENABLE(devel-docs, 1097588cd5fc2Smrg AS_HELP_STRING([--enable-devel-docs], 1097688cd5fc2Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1097788cd5fc2Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1097888cd5fc2Smrgm4_undefine([devel_default]) 1097988cd5fc2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1098088cd5fc2SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1098188cd5fc2SmrgAC_MSG_RESULT([$build_devel_docs]) 1098288cd5fc2Smrg]) # XORG_ENABLE_DEVEL_DOCS 1098388cd5fc2Smrg 1098488cd5fc2Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1098588cd5fc2Smrg# ---------------- 1098688cd5fc2Smrg# Minimum version: 1.6.0 1098788cd5fc2Smrg# 1098888cd5fc2Smrg# This macro enables a builder to skip all functional specification targets. 1098988cd5fc2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1099088cd5fc2Smrg# maximum flexibilty in controlling documentation building. 1099188cd5fc2Smrg# Refer to: 1099288cd5fc2Smrg# XORG_WITH_XMLTO --with-xmlto 1099388cd5fc2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1099488cd5fc2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1099588cd5fc2Smrg# XORG_WITH_FOP --with-fop 1099688cd5fc2Smrg# XORG_WITH_GROFF --with-groff 1099788cd5fc2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1099888cd5fc2Smrg# 1099988cd5fc2Smrg# Interface to module: 1100088cd5fc2Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1100188cd5fc2Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1100288cd5fc2Smrg# 'no' user instructs the module not to generate specs 1100388cd5fc2Smrg# parm1: specify the default value, yes or no. 1100488cd5fc2Smrg# 1100588cd5fc2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1100688cd5fc2Smrgm4_define([spec_default], m4_default([$1], [yes])) 1100788cd5fc2SmrgAC_ARG_ENABLE(specs, 1100888cd5fc2Smrg AS_HELP_STRING([--enable-specs], 1100988cd5fc2Smrg [Enable building the specs (default: ]spec_default[)]), 1101088cd5fc2Smrg [build_specs=$enableval], [build_specs=]spec_default) 1101188cd5fc2Smrgm4_undefine([spec_default]) 1101288cd5fc2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1101388cd5fc2SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1101488cd5fc2SmrgAC_MSG_RESULT([$build_specs]) 1101588cd5fc2Smrg]) # XORG_ENABLE_SPECS 1101688cd5fc2Smrg 1101788cd5fc2Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1101888cd5fc2Smrg# ---------------------------------------------- 1101988cd5fc2Smrg# Minimum version: 1.13.0 1102088cd5fc2Smrg# 1102188cd5fc2Smrg# This macro enables a builder to enable/disable unit testing 1102288cd5fc2Smrg# It makes no assumption about the test cases implementation 1102388cd5fc2Smrg# Test cases may or may not use Automake "Support for test suites" 1102488cd5fc2Smrg# They may or may not use the software utility library GLib 1102588cd5fc2Smrg# 1102688cd5fc2Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1102788cd5fc2Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1102888cd5fc2Smrg# The variable enable_unit_tests is used by other macros in this file. 1102988cd5fc2Smrg# 1103088cd5fc2Smrg# Interface to module: 1103188cd5fc2Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1103288cd5fc2Smrg# enable_unit_tests: used in configure.ac for additional configuration 1103388cd5fc2Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1103488cd5fc2Smrg# 'no' user instructs the module not to build tests 1103588cd5fc2Smrg# parm1: specify the default value, yes or no. 1103688cd5fc2Smrg# 1103788cd5fc2SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1103888cd5fc2SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1103988cd5fc2SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1104088cd5fc2SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1104188cd5fc2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1104288cd5fc2SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1104388cd5fc2Smrg [Enable building unit test cases (default: ]_defopt[)]), 1104488cd5fc2Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1104588cd5fc2Smrgm4_undefine([_defopt]) 1104688cd5fc2SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1104788cd5fc2SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1104888cd5fc2SmrgAC_MSG_RESULT([$enable_unit_tests]) 1104988cd5fc2Smrg]) # XORG_ENABLE_UNIT_TESTS 1105088cd5fc2Smrg 1105188cd5fc2Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1105288cd5fc2Smrg# ------------------------------------------------------ 1105388cd5fc2Smrg# Minimum version: 1.17.0 1105488cd5fc2Smrg# 1105588cd5fc2Smrg# This macro enables a builder to enable/disable integration testing 1105688cd5fc2Smrg# It makes no assumption about the test cases' implementation 1105788cd5fc2Smrg# Test cases may or may not use Automake "Support for test suites" 1105888cd5fc2Smrg# 1105988cd5fc2Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1106088cd5fc2Smrg# usually requires less dependencies and may be built and run under less 1106188cd5fc2Smrg# stringent environments than integration tests. 1106288cd5fc2Smrg# 1106388cd5fc2Smrg# Interface to module: 1106488cd5fc2Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1106588cd5fc2Smrg# enable_integration_tests: used in configure.ac for additional configuration 1106688cd5fc2Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1106788cd5fc2Smrg# 'no' user instructs the module not to build tests 1106888cd5fc2Smrg# parm1: specify the default value, yes or no. 1106988cd5fc2Smrg# 1107088cd5fc2SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1107188cd5fc2SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1107288cd5fc2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1107388cd5fc2SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1107488cd5fc2Smrg [Enable building integration test cases (default: ]_defopt[)]), 1107588cd5fc2Smrg [enable_integration_tests=$enableval], 1107688cd5fc2Smrg [enable_integration_tests=]_defopt) 1107788cd5fc2Smrgm4_undefine([_defopt]) 1107888cd5fc2SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1107988cd5fc2Smrg [test "x$enable_integration_tests" != xno]) 1108088cd5fc2SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1108188cd5fc2SmrgAC_MSG_RESULT([$enable_integration_tests]) 1108288cd5fc2Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 1108388cd5fc2Smrg 1108488cd5fc2Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1108588cd5fc2Smrg# ---------------------------------------- 1108688cd5fc2Smrg# Minimum version: 1.13.0 1108788cd5fc2Smrg# 1108888cd5fc2Smrg# GLib is a library which provides advanced data structures and functions. 1108988cd5fc2Smrg# This macro enables a module to test for the presence of Glib. 1109088cd5fc2Smrg# 1109188cd5fc2Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1109288cd5fc2Smrg# Otherwise the value of $enable_unit_tests is blank. 1109388cd5fc2Smrg# 1109488cd5fc2Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1109588cd5fc2Smrg# test support usually requires less dependencies and may be built and run under 1109688cd5fc2Smrg# less stringent environments than integration tests. 1109788cd5fc2Smrg# 1109888cd5fc2Smrg# Interface to module: 1109988cd5fc2Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1110088cd5fc2Smrg# with_glib: used in configure.ac to know if GLib has been found 1110188cd5fc2Smrg# --with-glib: 'yes' user instructs the module to use glib 1110288cd5fc2Smrg# 'no' user instructs the module not to use glib 1110388cd5fc2Smrg# 1110488cd5fc2SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1110588cd5fc2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1110688cd5fc2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1110788cd5fc2SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1110888cd5fc2Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1110988cd5fc2Smrg [with_glib=$withval], [with_glib=]_defopt) 1111088cd5fc2Smrgm4_undefine([_defopt]) 1111188cd5fc2Smrg 1111288cd5fc2Smrghave_glib=no 1111388cd5fc2Smrg# Do not probe GLib if user explicitly disabled unit testing 1111488cd5fc2Smrgif test "x$enable_unit_tests" != x"no"; then 1111588cd5fc2Smrg # Do not probe GLib if user explicitly disabled it 1111688cd5fc2Smrg if test "x$with_glib" != x"no"; then 1111788cd5fc2Smrg m4_ifval( 1111888cd5fc2Smrg [$1], 1111988cd5fc2Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1112088cd5fc2Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1112188cd5fc2Smrg ) 1112288cd5fc2Smrg fi 1112388cd5fc2Smrgfi 1112488cd5fc2Smrg 1112588cd5fc2Smrg# Not having GLib when unit testing has been explicitly requested is an error 1112688cd5fc2Smrgif test "x$enable_unit_tests" = x"yes"; then 1112788cd5fc2Smrg if test "x$have_glib" = x"no"; then 1112888cd5fc2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1112988cd5fc2Smrg fi 1113088cd5fc2Smrgfi 1113188cd5fc2Smrg 1113288cd5fc2Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1113388cd5fc2Smrgif test "x$enable_unit_tests" = x"no"; then 1113488cd5fc2Smrg if test "x$with_glib" = x"yes"; then 1113588cd5fc2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1113688cd5fc2Smrg fi 1113788cd5fc2Smrgfi 1113888cd5fc2Smrg 1113988cd5fc2Smrg# Not having GLib when it has been explicitly requested is an error 1114088cd5fc2Smrgif test "x$with_glib" = x"yes"; then 1114188cd5fc2Smrg if test "x$have_glib" = x"no"; then 1114288cd5fc2Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1114388cd5fc2Smrg fi 1114488cd5fc2Smrgfi 1114588cd5fc2Smrg 1114688cd5fc2SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1114788cd5fc2Smrg]) # XORG_WITH_GLIB 1114888cd5fc2Smrg 1114988cd5fc2Smrg# XORG_LD_WRAP([required|optional]) 1115088cd5fc2Smrg# --------------------------------- 1115188cd5fc2Smrg# Minimum version: 1.13.0 1115288cd5fc2Smrg# 1115388cd5fc2Smrg# Check if linker supports -wrap, passed via compiler flags 1115488cd5fc2Smrg# 1115588cd5fc2Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1115688cd5fc2Smrg# Otherwise the value of $enable_unit_tests is blank. 1115788cd5fc2Smrg# 1115888cd5fc2Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1115988cd5fc2Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1116088cd5fc2Smrg# available, an argument of "optional" allows use when some unit tests require 1116188cd5fc2Smrg# ld -wrap and others do not. 1116288cd5fc2Smrg# 1116388cd5fc2SmrgAC_DEFUN([XORG_LD_WRAP],[ 1116488cd5fc2SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1116588cd5fc2Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1116688cd5fc2Smrg void __wrap_exit(int status) { return; }], 1116788cd5fc2Smrg [exit(0);])]) 1116888cd5fc2Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1116988cd5fc2Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1117088cd5fc2Smrg if test "x$have_ld_wrap" = x"no"; then 1117188cd5fc2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1117288cd5fc2Smrg fi 1117388cd5fc2Smrgfi 1117488cd5fc2SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1117588cd5fc2Smrg# 1117688cd5fc2Smrg]) # XORG_LD_WRAP 1117788cd5fc2Smrg 1117888cd5fc2Smrg# XORG_CHECK_LINKER_FLAGS 1117988cd5fc2Smrg# ----------------------- 1118088cd5fc2Smrg# SYNOPSIS 1118188cd5fc2Smrg# 1118288cd5fc2Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1118388cd5fc2Smrg# 1118488cd5fc2Smrg# DESCRIPTION 1118588cd5fc2Smrg# 1118688cd5fc2Smrg# Check whether the given linker FLAGS work with the current language's 1118788cd5fc2Smrg# linker, or whether they give an error. 1118888cd5fc2Smrg# 1118988cd5fc2Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1119088cd5fc2Smrg# success/failure. 1119188cd5fc2Smrg# 1119288cd5fc2Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1119388cd5fc2Smrg# 1119488cd5fc2Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1119588cd5fc2Smrg# 1119688cd5fc2Smrg# LICENSE 1119788cd5fc2Smrg# 1119888cd5fc2Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1119988cd5fc2Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1120088cd5fc2Smrg# Copyright (c) 2009 Matteo Frigo 1120188cd5fc2Smrg# 1120288cd5fc2Smrg# This program is free software: you can redistribute it and/or modify it 1120388cd5fc2Smrg# under the terms of the GNU General Public License as published by the 1120488cd5fc2Smrg# Free Software Foundation, either version 3 of the License, or (at your 1120588cd5fc2Smrg# option) any later version. 1120688cd5fc2Smrg# 1120788cd5fc2Smrg# This program is distributed in the hope that it will be useful, but 1120888cd5fc2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1120988cd5fc2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1121088cd5fc2Smrg# Public License for more details. 1121188cd5fc2Smrg# 1121288cd5fc2Smrg# You should have received a copy of the GNU General Public License along 1121388cd5fc2Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1121488cd5fc2Smrg# 1121588cd5fc2Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1121688cd5fc2Smrg# gives unlimited permission to copy, distribute and modify the configure 1121788cd5fc2Smrg# scripts that are the output of Autoconf when processing the Macro. You 1121888cd5fc2Smrg# need not follow the terms of the GNU General Public License when using 1121988cd5fc2Smrg# or distributing such scripts, even though portions of the text of the 1122088cd5fc2Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1122188cd5fc2Smrg# all other use of the material that constitutes the Autoconf Macro. 1122288cd5fc2Smrg# 1122388cd5fc2Smrg# This special exception to the GPL applies to versions of the Autoconf 1122488cd5fc2Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1122588cd5fc2Smrg# modified version of the Autoconf Macro, you may extend this special 1122688cd5fc2Smrg# exception to the GPL to apply to your modified version as well.# 1122788cd5fc2SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1122888cd5fc2Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1122988cd5fc2Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1123088cd5fc2SmrgAS_LITERAL_IF([$1], 1123188cd5fc2Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1123288cd5fc2Smrg ax_save_FLAGS=$LDFLAGS 1123388cd5fc2Smrg LDFLAGS="$1" 1123488cd5fc2Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1123588cd5fc2Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1123688cd5fc2Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1123788cd5fc2Smrg LDFLAGS=$ax_save_FLAGS])], 1123888cd5fc2Smrg [ax_save_FLAGS=$LDFLAGS 1123988cd5fc2Smrg LDFLAGS="$1" 1124088cd5fc2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1124188cd5fc2Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1124288cd5fc2Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1124388cd5fc2Smrg LDFLAGS=$ax_save_FLAGS]) 1124488cd5fc2Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1124588cd5fc2SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1124688cd5fc2Smrgif test "x$xorg_check_linker_flags" = xyes; then 1124788cd5fc2Smrg m4_default([$2], :) 1124888cd5fc2Smrgelse 1124988cd5fc2Smrg m4_default([$3], :) 1125088cd5fc2Smrgfi 1125188cd5fc2Smrg]) # XORG_CHECK_LINKER_FLAGS 1125288cd5fc2Smrg 1125388cd5fc2Smrg# XORG_MEMORY_CHECK_FLAGS 1125488cd5fc2Smrg# ----------------------- 1125588cd5fc2Smrg# Minimum version: 1.16.0 1125688cd5fc2Smrg# 1125788cd5fc2Smrg# This macro attempts to find appropriate memory checking functionality 1125888cd5fc2Smrg# for various platforms which unit testing code may use to catch various 1125988cd5fc2Smrg# forms of memory allocation and access errors in testing. 1126088cd5fc2Smrg# 1126188cd5fc2Smrg# Interface to module: 1126288cd5fc2Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1126388cd5fc2Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1126488cd5fc2Smrg# 1126588cd5fc2Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1126688cd5fc2Smrg# 1126788cd5fc2SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1126888cd5fc2Smrg 1126988cd5fc2SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1127088cd5fc2SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1127188cd5fc2Smrg [Environment variables to enable memory checking in tests]) 1127288cd5fc2Smrg 1127388cd5fc2Smrg# Check for different types of support on different platforms 1127488cd5fc2Smrgcase $host_os in 1127588cd5fc2Smrg solaris*) 1127688cd5fc2Smrg AC_CHECK_LIB([umem], [umem_alloc], 1127788cd5fc2Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1127888cd5fc2Smrg ;; 1127988cd5fc2Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1128088cd5fc2Smrg # both directly and inverted, so should not be 0 or 255. 1128188cd5fc2Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1128288cd5fc2Smrg ;; 1128388cd5fc2Smrg darwin*) 1128488cd5fc2Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1128588cd5fc2Smrg ;; 1128688cd5fc2Smrg *bsd*) 1128788cd5fc2Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1128888cd5fc2Smrg ;; 1128988cd5fc2Smrgesac 1129088cd5fc2Smrg 1129188cd5fc2Smrg# User supplied flags override default flags 1129288cd5fc2Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1129388cd5fc2Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1129488cd5fc2Smrgfi 1129588cd5fc2Smrg 1129688cd5fc2SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1129788cd5fc2Smrg]) # XORG_WITH_LINT 1129888cd5fc2Smrg 1129988cd5fc2Smrg# XORG_CHECK_MALLOC_ZERO 1130088cd5fc2Smrg# ---------------------- 1130188cd5fc2Smrg# Minimum version: 1.0.0 1130288cd5fc2Smrg# 1130388cd5fc2Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1130488cd5fc2Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1130588cd5fc2Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1130688cd5fc2SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1130788cd5fc2SmrgAC_ARG_ENABLE(malloc0returnsnull, 1130888cd5fc2Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1130988cd5fc2Smrg [malloc(0) returns NULL (default: auto)]), 1131088cd5fc2Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1131188cd5fc2Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1131288cd5fc2Smrg 1131388cd5fc2SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1131488cd5fc2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1131588cd5fc2SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 1131688cd5fc2Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1131788cd5fc2Smrg#include <stdlib.h> 1131888cd5fc2Smrg],[ 1131988cd5fc2Smrg char *m0, *r0, *c0, *p; 1132088cd5fc2Smrg m0 = malloc(0); 1132188cd5fc2Smrg p = malloc(10); 1132288cd5fc2Smrg r0 = realloc(p,0); 1132388cd5fc2Smrg c0 = calloc(0,10); 1132488cd5fc2Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1132588cd5fc2Smrg])], 1132688cd5fc2Smrg [xorg_cv_malloc0_returns_null=yes], 1132788cd5fc2Smrg [xorg_cv_malloc0_returns_null=no])]) 1132888cd5fc2SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 1132988cd5fc2Smrgfi 1133088cd5fc2SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1133188cd5fc2Smrg 1133288cd5fc2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1133388cd5fc2Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1133488cd5fc2Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1133588cd5fc2Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1133688cd5fc2Smrgelse 1133788cd5fc2Smrg MALLOC_ZERO_CFLAGS="" 1133888cd5fc2Smrg XMALLOC_ZERO_CFLAGS="" 1133988cd5fc2Smrg XTMALLOC_ZERO_CFLAGS="" 1134088cd5fc2Smrgfi 1134188cd5fc2Smrg 1134288cd5fc2SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1134388cd5fc2SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1134488cd5fc2SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1134588cd5fc2Smrg]) # XORG_CHECK_MALLOC_ZERO 1134688cd5fc2Smrg 1134788cd5fc2Smrg# XORG_WITH_LINT() 1134888cd5fc2Smrg# ---------------- 1134988cd5fc2Smrg# Minimum version: 1.1.0 1135088cd5fc2Smrg# 1135188cd5fc2Smrg# This macro enables the use of a tool that flags some suspicious and 1135288cd5fc2Smrg# non-portable constructs (likely to be bugs) in C language source code. 1135388cd5fc2Smrg# It will attempt to locate the tool and use appropriate options. 1135488cd5fc2Smrg# There are various lint type tools on different platforms. 1135588cd5fc2Smrg# 1135688cd5fc2Smrg# Interface to module: 1135788cd5fc2Smrg# LINT: returns the path to the tool found on the platform 1135888cd5fc2Smrg# or the value set to LINT on the configure cmd line 1135988cd5fc2Smrg# also an Automake conditional 1136088cd5fc2Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1136188cd5fc2Smrg# 1136288cd5fc2Smrg# --with-lint: 'yes' user instructs the module to use lint 1136388cd5fc2Smrg# 'no' user instructs the module not to use lint (default) 1136488cd5fc2Smrg# 1136588cd5fc2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1136688cd5fc2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1136788cd5fc2Smrg# 1136888cd5fc2SmrgAC_DEFUN([XORG_WITH_LINT],[ 1136988cd5fc2Smrg 1137088cd5fc2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1137188cd5fc2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1137288cd5fc2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1137388cd5fc2Smrg [Use a lint-style source code checker (default: disabled)])], 1137488cd5fc2Smrg [use_lint=$withval], [use_lint=no]) 1137588cd5fc2Smrg 1137688cd5fc2Smrg# Obtain platform specific info like program name and options 1137788cd5fc2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1137888cd5fc2Smrgcase $host_os in 1137988cd5fc2Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1138088cd5fc2Smrg lint_name=splint 1138188cd5fc2Smrg lint_options="-badflag" 1138288cd5fc2Smrg ;; 1138388cd5fc2Smrg *freebsd* | *netbsd*) 1138488cd5fc2Smrg lint_name=lint 1138588cd5fc2Smrg lint_options="-u -b" 1138688cd5fc2Smrg ;; 1138788cd5fc2Smrg *solaris*) 1138888cd5fc2Smrg lint_name=lint 1138988cd5fc2Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1139088cd5fc2Smrg ;; 1139188cd5fc2Smrgesac 1139288cd5fc2Smrg 1139388cd5fc2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1139488cd5fc2Smrgif test "x$use_lint" = x"yes" ; then 1139588cd5fc2Smrg AC_PATH_PROG([LINT], [$lint_name]) 1139688cd5fc2Smrg if test "x$LINT" = "x"; then 1139788cd5fc2Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1139888cd5fc2Smrg fi 1139988cd5fc2Smrgelif test "x$use_lint" = x"no" ; then 1140088cd5fc2Smrg if test "x$LINT" != "x"; then 1140188cd5fc2Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1140288cd5fc2Smrg fi 1140388cd5fc2Smrgelse 1140488cd5fc2Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1140588cd5fc2Smrgfi 1140688cd5fc2Smrg 1140788cd5fc2Smrg# User supplied flags override default flags 1140888cd5fc2Smrgif test "x$LINT_FLAGS" != "x"; then 1140988cd5fc2Smrg lint_options=$LINT_FLAGS 1141088cd5fc2Smrgfi 1141188cd5fc2Smrg 1141288cd5fc2SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1141388cd5fc2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1141488cd5fc2Smrg 1141588cd5fc2Smrg]) # XORG_WITH_LINT 1141688cd5fc2Smrg 1141788cd5fc2Smrg# XORG_LINT_LIBRARY(LIBNAME) 1141888cd5fc2Smrg# -------------------------- 1141988cd5fc2Smrg# Minimum version: 1.1.0 1142088cd5fc2Smrg# 1142188cd5fc2Smrg# Sets up flags for building lint libraries for checking programs that call 1142288cd5fc2Smrg# functions in the library. 1142388cd5fc2Smrg# 1142488cd5fc2Smrg# Interface to module: 1142588cd5fc2Smrg# LINTLIB - Automake variable with the name of lint library file to make 1142688cd5fc2Smrg# MAKE_LINT_LIB - Automake conditional 1142788cd5fc2Smrg# 1142888cd5fc2Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1142988cd5fc2Smrg# - 'no' user instructs the module not to create a lint library (default) 1143088cd5fc2Smrg 1143188cd5fc2SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1143288cd5fc2SmrgAC_REQUIRE([XORG_WITH_LINT]) 1143388cd5fc2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1143488cd5fc2Smrg [Create lint library (default: disabled)])], 1143588cd5fc2Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1143688cd5fc2Smrg 1143788cd5fc2Smrgif test "x$make_lint_lib" = x"yes" ; then 1143888cd5fc2Smrg LINTLIB=llib-l$1.ln 1143988cd5fc2Smrg if test "x$LINT" = "x"; then 1144088cd5fc2Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1144188cd5fc2Smrg fi 1144288cd5fc2Smrgelif test "x$make_lint_lib" != x"no" ; then 1144388cd5fc2Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1144488cd5fc2Smrgfi 1144588cd5fc2Smrg 1144688cd5fc2SmrgAC_SUBST(LINTLIB) 1144788cd5fc2SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1144888cd5fc2Smrg 1144988cd5fc2Smrg]) # XORG_LINT_LIBRARY 1145088cd5fc2Smrg 1145188cd5fc2Smrg# XORG_COMPILER_BRAND 1145288cd5fc2Smrg# ------------------- 1145388cd5fc2Smrg# Minimum version: 1.14.0 1145488cd5fc2Smrg# 1145588cd5fc2Smrg# Checks for various brands of compilers and sets flags as appropriate: 1145688cd5fc2Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1145788cd5fc2Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1145888cd5fc2Smrg# clang compiler - sets CLANGCC to "yes" 1145988cd5fc2Smrg# Intel compiler - sets INTELCC to "yes" 1146088cd5fc2Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1146188cd5fc2Smrg# 1146288cd5fc2SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1146388cd5fc2SmrgAC_LANG_CASE( 1146488cd5fc2Smrg [C], [ 1146588cd5fc2Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1146688cd5fc2Smrg ], 1146788cd5fc2Smrg [C++], [ 1146888cd5fc2Smrg AC_REQUIRE([AC_PROG_CXX]) 1146988cd5fc2Smrg ] 1147088cd5fc2Smrg) 1147188cd5fc2SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1147288cd5fc2SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1147388cd5fc2SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1147488cd5fc2Smrg]) # XORG_COMPILER_BRAND 1147588cd5fc2Smrg 1147688cd5fc2Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1147788cd5fc2Smrg# --------------- 1147888cd5fc2Smrg# Minimum version: 1.16.0 1147988cd5fc2Smrg# 1148088cd5fc2Smrg# Test if the compiler works when passed the given flag as a command line argument. 1148188cd5fc2Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1148288cd5fc2Smrg# next flag in the list until there are no more options. 1148388cd5fc2Smrg# 1148488cd5fc2Smrg# Note that this does not guarantee that the compiler supports the flag as some 1148588cd5fc2Smrg# compilers will simply ignore arguments that they do not understand, but we do 1148688cd5fc2Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1148788cd5fc2Smrg# -Werror=unused-command-line-argument 1148888cd5fc2Smrg# 1148988cd5fc2SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1149088cd5fc2Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1149188cd5fc2Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1149288cd5fc2Smrg 1149388cd5fc2SmrgAC_LANG_COMPILER_REQUIRE 1149488cd5fc2Smrg 1149588cd5fc2SmrgAC_LANG_CASE( 1149688cd5fc2Smrg [C], [ 1149788cd5fc2Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1149888cd5fc2Smrg define([PREFIX], [C]) 1149988cd5fc2Smrg define([CACHE_PREFIX], [cc]) 1150088cd5fc2Smrg define([COMPILER], [$CC]) 1150188cd5fc2Smrg ], 1150288cd5fc2Smrg [C++], [ 1150388cd5fc2Smrg define([PREFIX], [CXX]) 1150488cd5fc2Smrg define([CACHE_PREFIX], [cxx]) 1150588cd5fc2Smrg define([COMPILER], [$CXX]) 1150688cd5fc2Smrg ] 1150788cd5fc2Smrg) 1150888cd5fc2Smrg 1150988cd5fc2Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1151088cd5fc2Smrg 1151188cd5fc2Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1151288cd5fc2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1151388cd5fc2Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1151488cd5fc2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1151588cd5fc2Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1151688cd5fc2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1151788cd5fc2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1151888cd5fc2Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1151988cd5fc2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1152088cd5fc2Smrgfi 1152188cd5fc2Smrg 1152288cd5fc2Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1152388cd5fc2Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1152488cd5fc2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1152588cd5fc2Smrg fi 1152688cd5fc2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1152788cd5fc2Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1152888cd5fc2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1152988cd5fc2Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1153088cd5fc2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1153188cd5fc2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1153288cd5fc2Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1153388cd5fc2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1153488cd5fc2Smrgfi 1153588cd5fc2Smrg 1153688cd5fc2Smrgfound="no" 1153788cd5fc2Smrgm4_foreach([flag], m4_cdr($@), [ 1153888cd5fc2Smrg if test $found = "no" ; then 1153988cd5fc2Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 1154088cd5fc2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1154188cd5fc2Smrg fi 1154288cd5fc2Smrg 1154388cd5fc2Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 1154488cd5fc2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1154588cd5fc2Smrg fi 1154688cd5fc2Smrg 1154788cd5fc2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1154888cd5fc2Smrg 1154988cd5fc2Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1155088cd5fc2Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1155188cd5fc2Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1155288cd5fc2Smrg AC_CACHE_VAL($cacheid, 1155388cd5fc2Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1155488cd5fc2Smrg [eval $cacheid=yes], 1155588cd5fc2Smrg [eval $cacheid=no])]) 1155688cd5fc2Smrg 1155788cd5fc2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1155888cd5fc2Smrg 1155988cd5fc2Smrg eval supported=\$$cacheid 1156088cd5fc2Smrg AC_MSG_RESULT([$supported]) 1156188cd5fc2Smrg if test "$supported" = "yes" ; then 1156288cd5fc2Smrg $1="$$1 ]flag[" 1156388cd5fc2Smrg found="yes" 1156488cd5fc2Smrg fi 1156588cd5fc2Smrg fi 1156688cd5fc2Smrg]) 1156788cd5fc2Smrg]) # XORG_TESTSET_CFLAG 1156888cd5fc2Smrg 1156988cd5fc2Smrg# XORG_COMPILER_FLAGS 1157088cd5fc2Smrg# --------------- 1157188cd5fc2Smrg# Minimum version: 1.16.0 1157288cd5fc2Smrg# 1157388cd5fc2Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1157488cd5fc2Smrg# arguments supported by the selected compiler which do NOT alter the generated 1157588cd5fc2Smrg# code. These arguments will cause the compiler to print various warnings 1157688cd5fc2Smrg# during compilation AND turn a conservative set of warnings into errors. 1157788cd5fc2Smrg# 1157888cd5fc2Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1157988cd5fc2Smrg# future versions of util-macros as options are added to new compilers. 1158088cd5fc2Smrg# 1158188cd5fc2SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1158288cd5fc2SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1158388cd5fc2Smrg 1158488cd5fc2SmrgAC_ARG_ENABLE(selective-werror, 1158588cd5fc2Smrg AS_HELP_STRING([--disable-selective-werror], 1158688cd5fc2Smrg [Turn off selective compiler errors. (default: enabled)]), 1158788cd5fc2Smrg [SELECTIVE_WERROR=$enableval], 1158888cd5fc2Smrg [SELECTIVE_WERROR=yes]) 1158988cd5fc2Smrg 1159088cd5fc2SmrgAC_LANG_CASE( 1159188cd5fc2Smrg [C], [ 1159288cd5fc2Smrg define([PREFIX], [C]) 1159388cd5fc2Smrg ], 1159488cd5fc2Smrg [C++], [ 1159588cd5fc2Smrg define([PREFIX], [CXX]) 1159688cd5fc2Smrg ] 1159788cd5fc2Smrg) 1159888cd5fc2Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1159988cd5fc2Smrgif test "x$SUNCC" = "xyes"; then 1160088cd5fc2Smrg [BASE_]PREFIX[FLAGS]="-v" 1160188cd5fc2Smrgelse 1160288cd5fc2Smrg [BASE_]PREFIX[FLAGS]="" 1160388cd5fc2Smrgfi 1160488cd5fc2Smrg 1160588cd5fc2Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1160688cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1160788cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1160888cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1160988cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1161088cd5fc2Smrg 1161188cd5fc2SmrgAC_LANG_CASE( 1161288cd5fc2Smrg [C], [ 1161388cd5fc2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1161488cd5fc2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1161588cd5fc2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1161688cd5fc2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1161788cd5fc2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 1161888cd5fc2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1161988cd5fc2Smrg ] 1162088cd5fc2Smrg) 1162188cd5fc2Smrg 1162288cd5fc2Smrg# This chunk adds additional warnings that could catch undesired effects. 1162388cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1162488cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1162588cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1162688cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1162788cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1162888cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1162988cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1163088cd5fc2Smrg 1163188cd5fc2Smrg# These are currently disabled because they are noisy. They will be enabled 1163288cd5fc2Smrg# in the future once the codebase is sufficiently modernized to silence 1163388cd5fc2Smrg# them. For now, I don't want them to drown out the other warnings. 1163488cd5fc2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1163588cd5fc2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1163688cd5fc2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1163788cd5fc2Smrg 1163888cd5fc2Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1163988cd5fc2Smrg# when there are problems that should be fixed. 1164088cd5fc2Smrg 1164188cd5fc2Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1164288cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1164388cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1164488cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1164588cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1164688cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1164788cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1164888cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1164988cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1165088cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1165188cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1165288cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1165388cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1165488cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1165588cd5fc2Smrgelse 1165688cd5fc2SmrgAC_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]) 1165788cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1165888cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1165988cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1166088cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1166188cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1166288cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1166388cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1166488cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1166588cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1166688cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1166788cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1166888cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1166988cd5fc2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1167088cd5fc2Smrgfi 1167188cd5fc2Smrg 1167288cd5fc2SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1167388cd5fc2Smrg]) # XORG_COMPILER_FLAGS 1167488cd5fc2Smrg 1167588cd5fc2Smrg# XORG_CWARNFLAGS 1167688cd5fc2Smrg# --------------- 1167788cd5fc2Smrg# Minimum version: 1.2.0 1167888cd5fc2Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1167988cd5fc2Smrg# 1168088cd5fc2Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1168188cd5fc2Smrg# 1168288cd5fc2Smrg# This function is deprecated because it defines -fno-strict-aliasing 1168388cd5fc2Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1168488cd5fc2Smrg# is needed, then it should be added explicitly in the module when 1168588cd5fc2Smrg# it is updated to use BASE_CFLAGS. 1168688cd5fc2Smrg# 1168788cd5fc2SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1168888cd5fc2SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1168988cd5fc2SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1169088cd5fc2SmrgAC_LANG_CASE( 1169188cd5fc2Smrg [C], [ 1169288cd5fc2Smrg CWARNFLAGS="$BASE_CFLAGS" 1169388cd5fc2Smrg if test "x$GCC" = xyes ; then 1169488cd5fc2Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1169588cd5fc2Smrg fi 1169688cd5fc2Smrg AC_SUBST(CWARNFLAGS) 1169788cd5fc2Smrg ] 1169888cd5fc2Smrg) 1169988cd5fc2Smrg]) # XORG_CWARNFLAGS 1170088cd5fc2Smrg 1170188cd5fc2Smrg# XORG_STRICT_OPTION 1170288cd5fc2Smrg# ----------------------- 1170388cd5fc2Smrg# Minimum version: 1.3.0 1170488cd5fc2Smrg# 1170588cd5fc2Smrg# Add configure option to enable strict compilation flags, such as treating 1170688cd5fc2Smrg# warnings as fatal errors. 1170788cd5fc2Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1170888cd5fc2Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1170988cd5fc2Smrg# 1171088cd5fc2Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1171188cd5fc2Smrg# when strict compilation is unconditionally desired. 1171288cd5fc2SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1171388cd5fc2SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1171488cd5fc2SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1171588cd5fc2Smrg 1171688cd5fc2SmrgAC_ARG_ENABLE(strict-compilation, 1171788cd5fc2Smrg AS_HELP_STRING([--enable-strict-compilation], 1171888cd5fc2Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1171988cd5fc2Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1172088cd5fc2Smrg 1172188cd5fc2SmrgAC_LANG_CASE( 1172288cd5fc2Smrg [C], [ 1172388cd5fc2Smrg define([PREFIX], [C]) 1172488cd5fc2Smrg ], 1172588cd5fc2Smrg [C++], [ 1172688cd5fc2Smrg define([PREFIX], [CXX]) 1172788cd5fc2Smrg ] 1172888cd5fc2Smrg) 1172988cd5fc2Smrg 1173088cd5fc2Smrg[STRICT_]PREFIX[FLAGS]="" 1173188cd5fc2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1173288cd5fc2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1173388cd5fc2Smrg 1173488cd5fc2Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1173588cd5fc2Smrg# activate it with -Werror, so we add it here explicitly. 1173688cd5fc2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1173788cd5fc2Smrg 1173888cd5fc2Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1173988cd5fc2Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1174088cd5fc2Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1174188cd5fc2Smrgfi 1174288cd5fc2SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1174388cd5fc2SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1174488cd5fc2SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1174588cd5fc2Smrg]) # XORG_STRICT_OPTION 1174688cd5fc2Smrg 1174788cd5fc2Smrg# XORG_DEFAULT_OPTIONS 1174888cd5fc2Smrg# -------------------- 1174988cd5fc2Smrg# Minimum version: 1.3.0 1175088cd5fc2Smrg# 1175188cd5fc2Smrg# Defines default options for X.Org modules. 1175288cd5fc2Smrg# 1175388cd5fc2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1175488cd5fc2SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1175588cd5fc2SmrgXORG_COMPILER_FLAGS 1175688cd5fc2SmrgXORG_CWARNFLAGS 1175788cd5fc2SmrgXORG_STRICT_OPTION 1175888cd5fc2SmrgXORG_RELEASE_VERSION 1175988cd5fc2SmrgXORG_CHANGELOG 1176088cd5fc2SmrgXORG_INSTALL 1176188cd5fc2SmrgXORG_MANPAGE_SECTIONS 1176288cd5fc2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1176388cd5fc2Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1176488cd5fc2Smrg]) # XORG_DEFAULT_OPTIONS 1176588cd5fc2Smrg 1176688cd5fc2Smrg# XORG_INSTALL() 1176788cd5fc2Smrg# ---------------- 1176888cd5fc2Smrg# Minimum version: 1.4.0 1176988cd5fc2Smrg# 1177088cd5fc2Smrg# Defines the variable INSTALL_CMD as the command to copy 1177188cd5fc2Smrg# INSTALL from $prefix/share/util-macros. 1177288cd5fc2Smrg# 1177388cd5fc2SmrgAC_DEFUN([XORG_INSTALL], [ 1177488cd5fc2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1177588cd5fc2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1177688cd5fc2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1177788cd5fc2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1177888cd5fc2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1177988cd5fc2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1178088cd5fc2SmrgAC_SUBST([INSTALL_CMD]) 1178188cd5fc2Smrg]) # XORG_INSTALL 1178288cd5fc2Smrgdnl Copyright 2005 Red Hat, Inc 1178388cd5fc2Smrgdnl 1178488cd5fc2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1178588cd5fc2Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1178688cd5fc2Smrgdnl the above copyright notice appear in all copies and that both that 1178788cd5fc2Smrgdnl copyright notice and this permission notice appear in supporting 1178888cd5fc2Smrgdnl documentation. 1178988cd5fc2Smrgdnl 1179088cd5fc2Smrgdnl The above copyright notice and this permission notice shall be included 1179188cd5fc2Smrgdnl in all copies or substantial portions of the Software. 1179288cd5fc2Smrgdnl 1179388cd5fc2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1179488cd5fc2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1179588cd5fc2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1179688cd5fc2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1179788cd5fc2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1179888cd5fc2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1179988cd5fc2Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1180088cd5fc2Smrgdnl 1180188cd5fc2Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1180288cd5fc2Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1180388cd5fc2Smrgdnl other dealings in this Software without prior written authorization 1180488cd5fc2Smrgdnl from the copyright holders. 1180588cd5fc2Smrgdnl 1180688cd5fc2Smrg 1180788cd5fc2Smrg# XORG_RELEASE_VERSION 1180888cd5fc2Smrg# -------------------- 1180988cd5fc2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1181088cd5fc2Smrg 1181188cd5fc2SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1181288cd5fc2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1181388cd5fc2Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1181488cd5fc2Smrg [Major version of this package]) 1181588cd5fc2Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1181688cd5fc2Smrg if test "x$PVM" = "x"; then 1181788cd5fc2Smrg PVM="0" 1181888cd5fc2Smrg fi 1181988cd5fc2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1182088cd5fc2Smrg [$PVM], 1182188cd5fc2Smrg [Minor version of this package]) 1182288cd5fc2Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1182388cd5fc2Smrg if test "x$PVP" = "x"; then 1182488cd5fc2Smrg PVP="0" 1182588cd5fc2Smrg fi 1182688cd5fc2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1182788cd5fc2Smrg [$PVP], 1182888cd5fc2Smrg [Patch version of this package]) 1182988cd5fc2Smrg]) 1183088cd5fc2Smrg 1183188cd5fc2Smrg# XORG_CHANGELOG() 1183288cd5fc2Smrg# ---------------- 1183388cd5fc2Smrg# Minimum version: 1.2.0 1183488cd5fc2Smrg# 1183588cd5fc2Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1183688cd5fc2Smrg# ChangeLog from git. 1183788cd5fc2Smrg# 1183888cd5fc2Smrg# 1183988cd5fc2SmrgAC_DEFUN([XORG_CHANGELOG], [ 1184088cd5fc2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1184188cd5fc2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1184288cd5fc2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1184388cd5fc2Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1184488cd5fc2SmrgAC_SUBST([CHANGELOG_CMD]) 1184588cd5fc2Smrg]) # XORG_CHANGELOG 1184688cd5fc2Smrg 11847