aclocal.m4 revision 49dc963f
149dc963fSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 24b0ead49Smrg 34b0ead49Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 452b01e16Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 54b0ead49Smrg# This file is free software; the Free Software Foundation 64b0ead49Smrg# gives unlimited permission to copy and/or distribute it, 74b0ead49Smrg# with or without modifications, as long as this notice is preserved. 84b0ead49Smrg 94b0ead49Smrg# This program is distributed in the hope that it will be useful, 104b0ead49Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 114b0ead49Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 124b0ead49Smrg# PARTICULAR PURPOSE. 134b0ead49Smrg 1452b01e16Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1552b01e16Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1649dc963fSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 1749dc963fSmrg[m4_warning([this file was generated for autoconf 2.65. 1852b01e16SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1952b01e16SmrgIf you have problems, you may need to regenerate the build system entirely. 2052b01e16SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 214b0ead49Smrg 2252b01e16Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2352b01e16Smrg# 2452b01e16Smrg# This file is free software; the Free Software Foundation 2552b01e16Smrg# gives unlimited permission to copy and/or distribute it, 2652b01e16Smrg# with or without modifications, as long as this notice is preserved. 274b0ead49Smrg 2852b01e16Smrg# AM_AUTOMAKE_VERSION(VERSION) 2952b01e16Smrg# ---------------------------- 3052b01e16Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3152b01e16Smrg# generated from the m4 files accompanying Automake X.Y. 3252b01e16Smrg# (This private macro should not be called outside this file.) 3352b01e16SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3452b01e16Smrg[am__api_version='1.11' 3552b01e16Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3652b01e16Smrgdnl require some minimum version. Point them to the right macro. 3749dc963fSmrgm4_if([$1], [1.11.1], [], 3852b01e16Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 3952b01e16Smrg]) 404b0ead49Smrg 4152b01e16Smrg# _AM_AUTOCONF_VERSION(VERSION) 4252b01e16Smrg# ----------------------------- 4352b01e16Smrg# aclocal traces this macro to find the Autoconf version. 4452b01e16Smrg# This is a private macro too. Using m4_define simplifies 4552b01e16Smrg# the logic in aclocal, which can simply ignore this definition. 4652b01e16Smrgm4_define([_AM_AUTOCONF_VERSION], []) 474b0ead49Smrg 4852b01e16Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 4952b01e16Smrg# ------------------------------- 5052b01e16Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5152b01e16Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5252b01e16SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5349dc963fSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 5452b01e16Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5552b01e16Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5652b01e16Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 574b0ead49Smrg 5852b01e16Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 594b0ead49Smrg 6052b01e16Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6152b01e16Smrg# 6252b01e16Smrg# This file is free software; the Free Software Foundation 6352b01e16Smrg# gives unlimited permission to copy and/or distribute it, 6452b01e16Smrg# with or without modifications, as long as this notice is preserved. 654b0ead49Smrg 6652b01e16Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6752b01e16Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6852b01e16Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6952b01e16Smrg# 7052b01e16Smrg# Of course, Automake must honor this variable whenever it calls a 7152b01e16Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7252b01e16Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7352b01e16Smrg# depending on how configure is run. This is pretty annoying, since 7452b01e16Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7552b01e16Smrg# source directory, any form will work fine, but in subdirectories a 7652b01e16Smrg# relative path needs to be adjusted first. 7752b01e16Smrg# 7852b01e16Smrg# $ac_aux_dir/missing 7952b01e16Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8052b01e16Smrg# $top_srcdir/$ac_aux_dir/missing 8152b01e16Smrg# fails if $ac_aux_dir is absolute, 8252b01e16Smrg# fails when called from a subdirectory in a VPATH build with 8352b01e16Smrg# a relative $ac_aux_dir 8452b01e16Smrg# 8552b01e16Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8652b01e16Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8752b01e16Smrg# harmless because $srcdir is `.', but things will broke when you 8852b01e16Smrg# start a VPATH build or use an absolute $srcdir. 8952b01e16Smrg# 9052b01e16Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9152b01e16Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9252b01e16Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9352b01e16Smrg# and then we would define $MISSING as 9452b01e16Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9552b01e16Smrg# This will work as long as MISSING is not called from configure, because 9652b01e16Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9752b01e16Smrg# However there are other variables, like CC, which are often used in 9852b01e16Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 9952b01e16Smrg# 10052b01e16Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10152b01e16Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10252b01e16Smrg# configured tree to be moved without reconfiguration. 1034b0ead49Smrg 10452b01e16SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10552b01e16Smrg[dnl Rely on autoconf to set up CDPATH properly. 10652b01e16SmrgAC_PREREQ([2.50])dnl 10752b01e16Smrg# expand $ac_aux_dir to an absolute path 10852b01e16Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 10952b01e16Smrg]) 1104b0ead49Smrg 11152b01e16Smrg# AM_CONDITIONAL -*- Autoconf -*- 1124b0ead49Smrg 11352b01e16Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 11452b01e16Smrg# Free Software Foundation, Inc. 11552b01e16Smrg# 11652b01e16Smrg# This file is free software; the Free Software Foundation 11752b01e16Smrg# gives unlimited permission to copy and/or distribute it, 11852b01e16Smrg# with or without modifications, as long as this notice is preserved. 1194b0ead49Smrg 12052b01e16Smrg# serial 9 1214b0ead49Smrg 12252b01e16Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12352b01e16Smrg# ------------------------------------- 12452b01e16Smrg# Define a conditional. 12552b01e16SmrgAC_DEFUN([AM_CONDITIONAL], 12652b01e16Smrg[AC_PREREQ(2.52)dnl 12752b01e16Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12852b01e16Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12952b01e16SmrgAC_SUBST([$1_TRUE])dnl 13052b01e16SmrgAC_SUBST([$1_FALSE])dnl 13152b01e16Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13252b01e16Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13352b01e16Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13452b01e16Smrgif $2; then 13552b01e16Smrg $1_TRUE= 13652b01e16Smrg $1_FALSE='#' 13752b01e16Smrgelse 13852b01e16Smrg $1_TRUE='#' 13952b01e16Smrg $1_FALSE= 14052b01e16Smrgfi 14152b01e16SmrgAC_CONFIG_COMMANDS_PRE( 14252b01e16Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14352b01e16Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14452b01e16SmrgUsually this means the macro was only invoked conditionally.]]) 14552b01e16Smrgfi])]) 1464b0ead49Smrg 14752b01e16Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 14852b01e16Smrg# Free Software Foundation, Inc. 14952b01e16Smrg# 15052b01e16Smrg# This file is free software; the Free Software Foundation 15152b01e16Smrg# gives unlimited permission to copy and/or distribute it, 15252b01e16Smrg# with or without modifications, as long as this notice is preserved. 1534b0ead49Smrg 15452b01e16Smrg# serial 10 1554b0ead49Smrg 15652b01e16Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 15752b01e16Smrg# written in clear, in which case automake, when reading aclocal.m4, 15852b01e16Smrg# will think it sees a *use*, and therefore will trigger all it's 15952b01e16Smrg# C support machinery. Also note that it means that autoscan, seeing 16052b01e16Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1614b0ead49Smrg 1624b0ead49Smrg 16352b01e16Smrg# _AM_DEPENDENCIES(NAME) 16452b01e16Smrg# ---------------------- 16552b01e16Smrg# See how the compiler implements dependency checking. 16652b01e16Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 16752b01e16Smrg# We try a few techniques and use that to set a single cache variable. 16852b01e16Smrg# 16952b01e16Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 17052b01e16Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 17152b01e16Smrg# dependency, and given that the user is not expected to run this macro, 17252b01e16Smrg# just rely on AC_PROG_CC. 17352b01e16SmrgAC_DEFUN([_AM_DEPENDENCIES], 17452b01e16Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17552b01e16SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17652b01e16SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17752b01e16SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1784b0ead49Smrg 17952b01e16Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 18052b01e16Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 18152b01e16Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18252b01e16Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 18352b01e16Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18452b01e16Smrg [depcc="$$1" am_compiler_list=]) 1854b0ead49Smrg 18652b01e16SmrgAC_CACHE_CHECK([dependency style of $depcc], 18752b01e16Smrg [am_cv_$1_dependencies_compiler_type], 18852b01e16Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18952b01e16Smrg # We make a subdir and do the tests there. Otherwise we can end up 19052b01e16Smrg # making bogus files that we don't know about and never remove. For 19152b01e16Smrg # instance it was reported that on HP-UX the gcc test will end up 19252b01e16Smrg # making a dummy file named `D' -- because `-MD' means `put the output 19352b01e16Smrg # in D'. 19452b01e16Smrg mkdir conftest.dir 19552b01e16Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19652b01e16Smrg # using a relative directory. 19752b01e16Smrg cp "$am_depcomp" conftest.dir 19852b01e16Smrg cd conftest.dir 19952b01e16Smrg # We will build objects and dependencies in a subdirectory because 20052b01e16Smrg # it helps to detect inapplicable dependency modes. For instance 20152b01e16Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20252b01e16Smrg # side effect of compilation, but ICC will put the dependencies in 20352b01e16Smrg # the current directory while Tru64 will put them in the object 20452b01e16Smrg # directory. 20552b01e16Smrg mkdir sub 2064b0ead49Smrg 20752b01e16Smrg am_cv_$1_dependencies_compiler_type=none 20852b01e16Smrg if test "$am_compiler_list" = ""; then 20952b01e16Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 21052b01e16Smrg fi 21152b01e16Smrg am__universal=false 21252b01e16Smrg m4_case([$1], [CC], 21352b01e16Smrg [case " $depcc " in #( 21452b01e16Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21552b01e16Smrg esac], 21652b01e16Smrg [CXX], 21752b01e16Smrg [case " $depcc " in #( 21852b01e16Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21952b01e16Smrg esac]) 2204b0ead49Smrg 22152b01e16Smrg for depmode in $am_compiler_list; do 22252b01e16Smrg # Setup a source with many dependencies, because some compilers 22352b01e16Smrg # like to wrap large dependency lists on column 80 (with \), and 22452b01e16Smrg # we should not choose a depcomp mode which is confused by this. 22552b01e16Smrg # 22652b01e16Smrg # We need to recreate these files for each test, as the compiler may 22752b01e16Smrg # overwrite some of them when testing with obscure command lines. 22852b01e16Smrg # This happens at least with the AIX C compiler. 22952b01e16Smrg : > sub/conftest.c 23052b01e16Smrg for i in 1 2 3 4 5 6; do 23152b01e16Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23252b01e16Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 23352b01e16Smrg # Solaris 8's {/usr,}/bin/sh. 23452b01e16Smrg touch sub/conftst$i.h 23552b01e16Smrg done 23652b01e16Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2374b0ead49Smrg 23852b01e16Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23952b01e16Smrg # mode. It turns out that the SunPro C++ compiler does not properly 24052b01e16Smrg # handle `-M -o', and we need to detect this. Also, some Intel 24152b01e16Smrg # versions had trouble with output in subdirs 24252b01e16Smrg am__obj=sub/conftest.${OBJEXT-o} 24352b01e16Smrg am__minus_obj="-o $am__obj" 24452b01e16Smrg case $depmode in 24552b01e16Smrg gcc) 24652b01e16Smrg # This depmode causes a compiler race in universal mode. 24752b01e16Smrg test "$am__universal" = false || continue 24852b01e16Smrg ;; 24952b01e16Smrg nosideeffect) 25052b01e16Smrg # after this tag, mechanisms are not by side-effect, so they'll 25152b01e16Smrg # only be used when explicitly requested 25252b01e16Smrg if test "x$enable_dependency_tracking" = xyes; then 25352b01e16Smrg continue 25452b01e16Smrg else 25552b01e16Smrg break 25652b01e16Smrg fi 25752b01e16Smrg ;; 25852b01e16Smrg msvisualcpp | msvcmsys) 25952b01e16Smrg # This compiler won't grok `-c -o', but also, the minuso test has 26052b01e16Smrg # not run yet. These depmodes are late enough in the game, and 26152b01e16Smrg # so weak that their functioning should not be impacted. 26252b01e16Smrg am__obj=conftest.${OBJEXT-o} 26352b01e16Smrg am__minus_obj= 26452b01e16Smrg ;; 26552b01e16Smrg none) break ;; 26652b01e16Smrg esac 26752b01e16Smrg if depmode=$depmode \ 26852b01e16Smrg source=sub/conftest.c object=$am__obj \ 26952b01e16Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27052b01e16Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 27152b01e16Smrg >/dev/null 2>conftest.err && 27252b01e16Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27352b01e16Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27452b01e16Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27552b01e16Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27652b01e16Smrg # icc doesn't choke on unknown options, it will just issue warnings 27752b01e16Smrg # or remarks (even with -Werror). So we grep stderr for any message 27852b01e16Smrg # that says an option was ignored or not supported. 27952b01e16Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28052b01e16Smrg # icc: Command line warning: ignoring option '-M'; no argument required 28152b01e16Smrg # The diagnosis changed in icc 8.0: 28252b01e16Smrg # icc: Command line remark: option '-MP' not supported 28352b01e16Smrg if (grep 'ignoring option' conftest.err || 28452b01e16Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28552b01e16Smrg am_cv_$1_dependencies_compiler_type=$depmode 28652b01e16Smrg break 28752b01e16Smrg fi 28852b01e16Smrg fi 28952b01e16Smrg done 2904b0ead49Smrg 29152b01e16Smrg cd .. 29252b01e16Smrg rm -rf conftest.dir 29352b01e16Smrgelse 29452b01e16Smrg am_cv_$1_dependencies_compiler_type=none 2954b0ead49Smrgfi 29652b01e16Smrg]) 29752b01e16SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29852b01e16SmrgAM_CONDITIONAL([am__fastdep$1], [ 29952b01e16Smrg test "x$enable_dependency_tracking" != xno \ 30052b01e16Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 30152b01e16Smrg]) 3024b0ead49Smrg 3034b0ead49Smrg 30452b01e16Smrg# AM_SET_DEPDIR 30552b01e16Smrg# ------------- 30652b01e16Smrg# Choose a directory name for dependency files. 30752b01e16Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 30852b01e16SmrgAC_DEFUN([AM_SET_DEPDIR], 30952b01e16Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 31052b01e16SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 31152b01e16Smrg]) 3124b0ead49Smrg 3134b0ead49Smrg 31452b01e16Smrg# AM_DEP_TRACK 31552b01e16Smrg# ------------ 31652b01e16SmrgAC_DEFUN([AM_DEP_TRACK], 31752b01e16Smrg[AC_ARG_ENABLE(dependency-tracking, 31852b01e16Smrg[ --disable-dependency-tracking speeds up one-time build 31952b01e16Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 32052b01e16Smrgif test "x$enable_dependency_tracking" != xno; then 32152b01e16Smrg am_depcomp="$ac_aux_dir/depcomp" 32252b01e16Smrg AMDEPBACKSLASH='\' 32352b01e16Smrgfi 32452b01e16SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32552b01e16SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32652b01e16Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32752b01e16Smrg]) 3284b0ead49Smrg 32952b01e16Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3304b0ead49Smrg 33152b01e16Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 33252b01e16Smrg# Free Software Foundation, Inc. 33352b01e16Smrg# 33452b01e16Smrg# This file is free software; the Free Software Foundation 33552b01e16Smrg# gives unlimited permission to copy and/or distribute it, 33652b01e16Smrg# with or without modifications, as long as this notice is preserved. 3374b0ead49Smrg 33852b01e16Smrg#serial 5 3394b0ead49Smrg 34052b01e16Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 34152b01e16Smrg# ------------------------------ 34252b01e16SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34352b01e16Smrg[{ 34452b01e16Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34552b01e16Smrg # are listed without --file. Let's play safe and only enable the eval 34652b01e16Smrg # if we detect the quoting. 34752b01e16Smrg case $CONFIG_FILES in 34852b01e16Smrg *\'*) eval set x "$CONFIG_FILES" ;; 34952b01e16Smrg *) set x $CONFIG_FILES ;; 35052b01e16Smrg esac 35152b01e16Smrg shift 35252b01e16Smrg for mf 35352b01e16Smrg do 35452b01e16Smrg # Strip MF so we end up with the name of the file. 35552b01e16Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35652b01e16Smrg # Check whether this is an Automake generated Makefile or not. 35752b01e16Smrg # We used to match only the files named `Makefile.in', but 35852b01e16Smrg # some people rename them; so instead we look at the file content. 35952b01e16Smrg # Grep'ing the first line is not enough: some people post-process 36052b01e16Smrg # each Makefile.in and add a new line on top of each file to say so. 36152b01e16Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36252b01e16Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36352b01e16Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36452b01e16Smrg dirpart=`AS_DIRNAME("$mf")` 36552b01e16Smrg else 36652b01e16Smrg continue 36752b01e16Smrg fi 36852b01e16Smrg # Extract the definition of DEPDIR, am__include, and am__quote 36952b01e16Smrg # from the Makefile without running `make'. 37052b01e16Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37152b01e16Smrg test -z "$DEPDIR" && continue 37252b01e16Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37352b01e16Smrg test -z "am__include" && continue 37452b01e16Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37552b01e16Smrg # When using ansi2knr, U may be empty or an underscore; expand it 37652b01e16Smrg U=`sed -n 's/^U = //p' < "$mf"` 37752b01e16Smrg # Find all dependency output files, they are included files with 37852b01e16Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37952b01e16Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38052b01e16Smrg # expansion. 38152b01e16Smrg for file in `sed -n " 38252b01e16Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38352b01e16Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38452b01e16Smrg # Make sure the directory exists. 38552b01e16Smrg test -f "$dirpart/$file" && continue 38652b01e16Smrg fdir=`AS_DIRNAME(["$file"])` 38752b01e16Smrg AS_MKDIR_P([$dirpart/$fdir]) 38852b01e16Smrg # echo "creating $dirpart/$file" 38952b01e16Smrg echo '# dummy' > "$dirpart/$file" 39052b01e16Smrg done 39152b01e16Smrg done 39252b01e16Smrg} 39352b01e16Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3944b0ead49Smrg 3954b0ead49Smrg 39652b01e16Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39752b01e16Smrg# ----------------------------- 39852b01e16Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 39952b01e16Smrg# 40052b01e16Smrg# This code is only required when automatic dependency tracking 40152b01e16Smrg# is enabled. FIXME. This creates each `.P' file that we will 40252b01e16Smrg# need in order to bootstrap the dependency handling code. 40352b01e16SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40452b01e16Smrg[AC_CONFIG_COMMANDS([depfiles], 40552b01e16Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40652b01e16Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4074b0ead49Smrg]) 4084b0ead49Smrg 40952b01e16Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 41052b01e16Smrg# Free Software Foundation, Inc. 41152b01e16Smrg# 41252b01e16Smrg# This file is free software; the Free Software Foundation 41352b01e16Smrg# gives unlimited permission to copy and/or distribute it, 41452b01e16Smrg# with or without modifications, as long as this notice is preserved. 4154b0ead49Smrg 41652b01e16Smrg# serial 8 4174b0ead49Smrg 41852b01e16Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 41952b01e16SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 4204b0ead49Smrg 42152b01e16Smrg# Do all the work for Automake. -*- Autoconf -*- 4224b0ead49Smrg 42352b01e16Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42452b01e16Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 42552b01e16Smrg# 42652b01e16Smrg# This file is free software; the Free Software Foundation 42752b01e16Smrg# gives unlimited permission to copy and/or distribute it, 42852b01e16Smrg# with or without modifications, as long as this notice is preserved. 4294b0ead49Smrg 43052b01e16Smrg# serial 16 4314b0ead49Smrg 43252b01e16Smrg# This macro actually does too much. Some checks are only needed if 43352b01e16Smrg# your package does certain things. But this isn't really a big deal. 4344b0ead49Smrg 43552b01e16Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 43652b01e16Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 43752b01e16Smrg# ----------------------------------------------- 43852b01e16Smrg# The call with PACKAGE and VERSION arguments is the old style 43952b01e16Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 44052b01e16Smrg# and VERSION should now be passed to AC_INIT and removed from 44152b01e16Smrg# the call to AM_INIT_AUTOMAKE. 44252b01e16Smrg# We support both call styles for the transition. After 44352b01e16Smrg# the next Automake release, Autoconf can make the AC_INIT 44452b01e16Smrg# arguments mandatory, and then we can depend on a new Autoconf 44552b01e16Smrg# release and drop the old call support. 44652b01e16SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 44752b01e16Smrg[AC_PREREQ([2.62])dnl 44852b01e16Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 44952b01e16Smrgdnl the ones we care about. 45052b01e16Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 45152b01e16SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 45252b01e16SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 45352b01e16Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 45452b01e16Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 45552b01e16Smrg # is not polluted with repeated "-I." 45652b01e16Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 45752b01e16Smrg # test to see if srcdir already configured 45852b01e16Smrg if test -f $srcdir/config.status; then 45952b01e16Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 46052b01e16Smrg fi 46152b01e16Smrgfi 4624b0ead49Smrg 46352b01e16Smrg# test whether we have cygpath 46452b01e16Smrgif test -z "$CYGPATH_W"; then 46552b01e16Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 46652b01e16Smrg CYGPATH_W='cygpath -w' 46752b01e16Smrg else 46852b01e16Smrg CYGPATH_W=echo 46952b01e16Smrg fi 47052b01e16Smrgfi 47152b01e16SmrgAC_SUBST([CYGPATH_W]) 4724b0ead49Smrg 47352b01e16Smrg# Define the identity of the package. 47452b01e16Smrgdnl Distinguish between old-style and new-style calls. 47552b01e16Smrgm4_ifval([$2], 47652b01e16Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 47752b01e16Smrg AC_SUBST([PACKAGE], [$1])dnl 47852b01e16Smrg AC_SUBST([VERSION], [$2])], 47952b01e16Smrg[_AM_SET_OPTIONS([$1])dnl 48052b01e16Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 48152b01e16Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 48252b01e16Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 48352b01e16Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 48452b01e16Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4854b0ead49Smrg 48652b01e16Smrg_AM_IF_OPTION([no-define],, 48752b01e16Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 48852b01e16Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4894b0ead49Smrg 49052b01e16Smrg# Some tools Automake needs. 49152b01e16SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 49252b01e16SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 49352b01e16SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 49452b01e16SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 49552b01e16SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 49652b01e16SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 49752b01e16SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 49852b01e16SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49952b01e16SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 50052b01e16SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 50152b01e16Smrg# We need awk for the "check" target. The system "awk" is bad on 50252b01e16Smrg# some platforms. 50352b01e16SmrgAC_REQUIRE([AC_PROG_AWK])dnl 50452b01e16SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50552b01e16SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50652b01e16Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50752b01e16Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50852b01e16Smrg [_AM_PROG_TAR([v7])])]) 50952b01e16Smrg_AM_IF_OPTION([no-dependencies],, 51052b01e16Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 51152b01e16Smrg [_AM_DEPENDENCIES(CC)], 51252b01e16Smrg [define([AC_PROG_CC], 51352b01e16Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 51452b01e16SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51552b01e16Smrg [_AM_DEPENDENCIES(CXX)], 51652b01e16Smrg [define([AC_PROG_CXX], 51752b01e16Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 51852b01e16SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51952b01e16Smrg [_AM_DEPENDENCIES(OBJC)], 52052b01e16Smrg [define([AC_PROG_OBJC], 52152b01e16Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 52252b01e16Smrg]) 52352b01e16Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 52452b01e16Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 52552b01e16Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 52652b01e16Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 52752b01e16SmrgAC_CONFIG_COMMANDS_PRE(dnl 52852b01e16Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52952b01e16Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 53052b01e16Smrg]) 5314b0ead49Smrg 53252b01e16Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53352b01e16Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53452b01e16Smrgdnl mangled by Autoconf and run in a shell conditional statement. 53552b01e16Smrgm4_define([_AC_COMPILER_EXEEXT], 53652b01e16Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5374b0ead49Smrg 5384b0ead49Smrg 53952b01e16Smrg# When config.status generates a header, we must update the stamp-h file. 54052b01e16Smrg# This file resides in the same directory as the config header 54152b01e16Smrg# that is generated. The stamp files are numbered to have different names. 5424b0ead49Smrg 54352b01e16Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 54452b01e16Smrg# loop where config.status creates the headers, so we can generate 54552b01e16Smrg# our stamp files there. 54652b01e16SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 54752b01e16Smrg[# Compute $1's index in $config_headers. 54852b01e16Smrg_am_arg=$1 54952b01e16Smrg_am_stamp_count=1 55052b01e16Smrgfor _am_header in $config_headers :; do 55152b01e16Smrg case $_am_header in 55252b01e16Smrg $_am_arg | $_am_arg:* ) 55352b01e16Smrg break ;; 55452b01e16Smrg * ) 55552b01e16Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 55652b01e16Smrg esac 55752b01e16Smrgdone 55852b01e16Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5594b0ead49Smrg 56052b01e16Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 56152b01e16Smrg# 56252b01e16Smrg# This file is free software; the Free Software Foundation 56352b01e16Smrg# gives unlimited permission to copy and/or distribute it, 56452b01e16Smrg# with or without modifications, as long as this notice is preserved. 5654b0ead49Smrg 56652b01e16Smrg# AM_PROG_INSTALL_SH 56752b01e16Smrg# ------------------ 56852b01e16Smrg# Define $install_sh. 56952b01e16SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 57052b01e16Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57152b01e16Smrgif test x"${install_sh}" != xset; then 57252b01e16Smrg case $am_aux_dir in 57352b01e16Smrg *\ * | *\ *) 57452b01e16Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57552b01e16Smrg *) 57652b01e16Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57752b01e16Smrg esac 57852b01e16Smrgfi 57952b01e16SmrgAC_SUBST(install_sh)]) 5804b0ead49Smrg 58152b01e16Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 58252b01e16Smrg# 58352b01e16Smrg# This file is free software; the Free Software Foundation 58452b01e16Smrg# gives unlimited permission to copy and/or distribute it, 58552b01e16Smrg# with or without modifications, as long as this notice is preserved. 5864b0ead49Smrg 58752b01e16Smrg# serial 2 5884b0ead49Smrg 58952b01e16Smrg# Check whether the underlying file-system supports filenames 59052b01e16Smrg# with a leading dot. For instance MS-DOS doesn't. 59152b01e16SmrgAC_DEFUN([AM_SET_LEADING_DOT], 59252b01e16Smrg[rm -rf .tst 2>/dev/null 59352b01e16Smrgmkdir .tst 2>/dev/null 59452b01e16Smrgif test -d .tst; then 59552b01e16Smrg am__leading_dot=. 59652b01e16Smrgelse 59752b01e16Smrg am__leading_dot=_ 5984b0ead49Smrgfi 59952b01e16Smrgrmdir .tst 2>/dev/null 60052b01e16SmrgAC_SUBST([am__leading_dot])]) 6014b0ead49Smrg 60252b01e16Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 60352b01e16Smrg# From Jim Meyering 6044b0ead49Smrg 60552b01e16Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 60652b01e16Smrg# Free Software Foundation, Inc. 60752b01e16Smrg# 60852b01e16Smrg# This file is free software; the Free Software Foundation 60952b01e16Smrg# gives unlimited permission to copy and/or distribute it, 61052b01e16Smrg# with or without modifications, as long as this notice is preserved. 6114b0ead49Smrg 61252b01e16Smrg# serial 5 6134b0ead49Smrg 61452b01e16Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 61552b01e16Smrg# ---------------------------------- 61652b01e16Smrg# Control maintainer-specific portions of Makefiles. 61752b01e16Smrg# Default is to disable them, unless `enable' is passed literally. 61852b01e16Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 61952b01e16Smrg# can override the default with the --enable/--disable switch. 62052b01e16SmrgAC_DEFUN([AM_MAINTAINER_MODE], 62152b01e16Smrg[m4_case(m4_default([$1], [disable]), 62252b01e16Smrg [enable], [m4_define([am_maintainer_other], [disable])], 62352b01e16Smrg [disable], [m4_define([am_maintainer_other], [enable])], 62452b01e16Smrg [m4_define([am_maintainer_other], [enable]) 62552b01e16Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 62652b01e16SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 62752b01e16Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 62852b01e16Smrg AC_ARG_ENABLE([maintainer-mode], 62952b01e16Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 63052b01e16Smrg (and sometimes confusing) to the casual installer], 63152b01e16Smrg [USE_MAINTAINER_MODE=$enableval], 63252b01e16Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 63352b01e16Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 63452b01e16Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 63552b01e16Smrg MAINT=$MAINTAINER_MODE_TRUE 63652b01e16Smrg AC_SUBST([MAINT])dnl 63752b01e16Smrg] 63852b01e16Smrg) 6394b0ead49Smrg 64052b01e16SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6414b0ead49Smrg 64252b01e16Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 64352b01e16Smrg 64452b01e16Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 64552b01e16Smrg# 64652b01e16Smrg# This file is free software; the Free Software Foundation 64752b01e16Smrg# gives unlimited permission to copy and/or distribute it, 64852b01e16Smrg# with or without modifications, as long as this notice is preserved. 64952b01e16Smrg 65052b01e16Smrg# serial 4 65152b01e16Smrg 65252b01e16Smrg# AM_MAKE_INCLUDE() 65352b01e16Smrg# ----------------- 65452b01e16Smrg# Check to see how make treats includes. 65552b01e16SmrgAC_DEFUN([AM_MAKE_INCLUDE], 65652b01e16Smrg[am_make=${MAKE-make} 65752b01e16Smrgcat > confinc << 'END' 65852b01e16Smrgam__doit: 65952b01e16Smrg @echo this is the am__doit target 66052b01e16Smrg.PHONY: am__doit 66152b01e16SmrgEND 66252b01e16Smrg# If we don't find an include directive, just comment out the code. 66352b01e16SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 66452b01e16Smrgam__include="#" 66552b01e16Smrgam__quote= 66652b01e16Smrg_am_result=none 66752b01e16Smrg# First try GNU make style include. 66852b01e16Smrgecho "include confinc" > confmf 66952b01e16Smrg# Ignore all kinds of additional output from `make'. 67052b01e16Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 67152b01e16Smrg*the\ am__doit\ target*) 67252b01e16Smrg am__include=include 67352b01e16Smrg am__quote= 67452b01e16Smrg _am_result=GNU 6754b0ead49Smrg ;; 6764b0ead49Smrgesac 67752b01e16Smrg# Now try BSD make style include. 67852b01e16Smrgif test "$am__include" = "#"; then 67952b01e16Smrg echo '.include "confinc"' > confmf 68052b01e16Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 68152b01e16Smrg *the\ am__doit\ target*) 68252b01e16Smrg am__include=.include 68352b01e16Smrg am__quote="\"" 68452b01e16Smrg _am_result=BSD 68552b01e16Smrg ;; 68652b01e16Smrg esac 68752b01e16Smrgfi 68852b01e16SmrgAC_SUBST([am__include]) 68952b01e16SmrgAC_SUBST([am__quote]) 69052b01e16SmrgAC_MSG_RESULT([$_am_result]) 69152b01e16Smrgrm -f confinc confmf 69252b01e16Smrg]) 6934b0ead49Smrg 69452b01e16Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6954b0ead49Smrg 69652b01e16Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 69752b01e16Smrg# Free Software Foundation, Inc. 69852b01e16Smrg# 69952b01e16Smrg# This file is free software; the Free Software Foundation 70052b01e16Smrg# gives unlimited permission to copy and/or distribute it, 70152b01e16Smrg# with or without modifications, as long as this notice is preserved. 7024b0ead49Smrg 70352b01e16Smrg# serial 6 7044b0ead49Smrg 70552b01e16Smrg# AM_MISSING_PROG(NAME, PROGRAM) 70652b01e16Smrg# ------------------------------ 70752b01e16SmrgAC_DEFUN([AM_MISSING_PROG], 70852b01e16Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 70952b01e16Smrg$1=${$1-"${am_missing_run}$2"} 71052b01e16SmrgAC_SUBST($1)]) 7114b0ead49Smrg 71252b01e16Smrg 71352b01e16Smrg# AM_MISSING_HAS_RUN 71452b01e16Smrg# ------------------ 71552b01e16Smrg# Define MISSING if not defined so far and test if it supports --run. 71652b01e16Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 71752b01e16SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 71852b01e16Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 71952b01e16SmrgAC_REQUIRE_AUX_FILE([missing])dnl 72052b01e16Smrgif test x"${MISSING+set}" != xset; then 72152b01e16Smrg case $am_aux_dir in 72252b01e16Smrg *\ * | *\ *) 72352b01e16Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 72452b01e16Smrg *) 72552b01e16Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 72652b01e16Smrg esac 72752b01e16Smrgfi 72852b01e16Smrg# Use eval to expand $SHELL 72952b01e16Smrgif eval "$MISSING --run true"; then 73052b01e16Smrg am_missing_run="$MISSING --run " 7314b0ead49Smrgelse 73252b01e16Smrg am_missing_run= 73352b01e16Smrg AC_MSG_WARN([`missing' script is too old or missing]) 7344b0ead49Smrgfi 73552b01e16Smrg]) 7364b0ead49Smrg 73752b01e16Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 73852b01e16Smrg# 73952b01e16Smrg# This file is free software; the Free Software Foundation 74052b01e16Smrg# gives unlimited permission to copy and/or distribute it, 74152b01e16Smrg# with or without modifications, as long as this notice is preserved. 7424b0ead49Smrg 74352b01e16Smrg# AM_PROG_MKDIR_P 74452b01e16Smrg# --------------- 74552b01e16Smrg# Check for `mkdir -p'. 74652b01e16SmrgAC_DEFUN([AM_PROG_MKDIR_P], 74752b01e16Smrg[AC_PREREQ([2.60])dnl 74852b01e16SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 74952b01e16Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 75052b01e16Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 75152b01e16Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 75252b01e16Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 75352b01e16Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 75452b01e16Smrgdnl adjustment using top_builddir (which is defined more often than 75552b01e16Smrgdnl MKDIR_P). 75652b01e16SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 75752b01e16Smrgcase $mkdir_p in 75852b01e16Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 75952b01e16Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 76052b01e16Smrgesac 7614b0ead49Smrg]) 7624b0ead49Smrg 76352b01e16Smrg# Helper functions for option handling. -*- Autoconf -*- 7644b0ead49Smrg 76552b01e16Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 76652b01e16Smrg# 76752b01e16Smrg# This file is free software; the Free Software Foundation 76852b01e16Smrg# gives unlimited permission to copy and/or distribute it, 76952b01e16Smrg# with or without modifications, as long as this notice is preserved. 7704b0ead49Smrg 77152b01e16Smrg# serial 4 7724b0ead49Smrg 77352b01e16Smrg# _AM_MANGLE_OPTION(NAME) 77452b01e16Smrg# ----------------------- 77552b01e16SmrgAC_DEFUN([_AM_MANGLE_OPTION], 77652b01e16Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7774b0ead49Smrg 77852b01e16Smrg# _AM_SET_OPTION(NAME) 77952b01e16Smrg# ------------------------------ 78052b01e16Smrg# Set option NAME. Presently that only means defining a flag for this option. 78152b01e16SmrgAC_DEFUN([_AM_SET_OPTION], 78252b01e16Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7834b0ead49Smrg 78452b01e16Smrg# _AM_SET_OPTIONS(OPTIONS) 78552b01e16Smrg# ---------------------------------- 78652b01e16Smrg# OPTIONS is a space-separated list of Automake options. 78752b01e16SmrgAC_DEFUN([_AM_SET_OPTIONS], 78852b01e16Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7894b0ead49Smrg 79052b01e16Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 79152b01e16Smrg# ------------------------------------------- 79252b01e16Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 79352b01e16SmrgAC_DEFUN([_AM_IF_OPTION], 79452b01e16Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7954b0ead49Smrg 79652b01e16Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7974b0ead49Smrg 79852b01e16Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 79952b01e16Smrg# Free Software Foundation, Inc. 80052b01e16Smrg# 80152b01e16Smrg# This file is free software; the Free Software Foundation 80252b01e16Smrg# gives unlimited permission to copy and/or distribute it, 80352b01e16Smrg# with or without modifications, as long as this notice is preserved. 8044b0ead49Smrg 80552b01e16Smrg# serial 5 8064b0ead49Smrg 80752b01e16Smrg# AM_SANITY_CHECK 80852b01e16Smrg# --------------- 80952b01e16SmrgAC_DEFUN([AM_SANITY_CHECK], 81052b01e16Smrg[AC_MSG_CHECKING([whether build environment is sane]) 81152b01e16Smrg# Just in case 81252b01e16Smrgsleep 1 81352b01e16Smrgecho timestamp > conftest.file 81452b01e16Smrg# Reject unsafe characters in $srcdir or the absolute working directory 81552b01e16Smrg# name. Accept space and tab only in the latter. 81652b01e16Smrgam_lf=' 81752b01e16Smrg' 81852b01e16Smrgcase `pwd` in 81952b01e16Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 82052b01e16Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 82152b01e16Smrgesac 82252b01e16Smrgcase $srcdir in 82352b01e16Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 82452b01e16Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 82552b01e16Smrgesac 8264b0ead49Smrg 82752b01e16Smrg# Do `set' in a subshell so we don't clobber the current shell's 82852b01e16Smrg# arguments. Must try -L first in case configure is actually a 82952b01e16Smrg# symlink; some systems play weird games with the mod time of symlinks 83052b01e16Smrg# (eg FreeBSD returns the mod time of the symlink's containing 83152b01e16Smrg# directory). 83252b01e16Smrgif ( 83352b01e16Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 83452b01e16Smrg if test "$[*]" = "X"; then 83552b01e16Smrg # -L didn't work. 83652b01e16Smrg set X `ls -t "$srcdir/configure" conftest.file` 83752b01e16Smrg fi 83852b01e16Smrg rm -f conftest.file 83952b01e16Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 84052b01e16Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8414b0ead49Smrg 84252b01e16Smrg # If neither matched, then we have a broken ls. This can happen 84352b01e16Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 84452b01e16Smrg # broken ls alias from the environment. This has actually 84552b01e16Smrg # happened. Such a system could not be considered "sane". 84652b01e16Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 84752b01e16Smrgalias in your environment]) 84852b01e16Smrg fi 8494b0ead49Smrg 85052b01e16Smrg test "$[2]" = conftest.file 85152b01e16Smrg ) 85252b01e16Smrgthen 85352b01e16Smrg # Ok. 85452b01e16Smrg : 8554b0ead49Smrgelse 85652b01e16Smrg AC_MSG_ERROR([newly created file is older than distributed files! 85752b01e16SmrgCheck your system clock]) 85852b01e16Smrgfi 85952b01e16SmrgAC_MSG_RESULT(yes)]) 8604b0ead49Smrg 86152b01e16Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 86252b01e16Smrg# 86352b01e16Smrg# This file is free software; the Free Software Foundation 86452b01e16Smrg# gives unlimited permission to copy and/or distribute it, 86552b01e16Smrg# with or without modifications, as long as this notice is preserved. 8664b0ead49Smrg 86752b01e16Smrg# serial 1 8684b0ead49Smrg 86952b01e16Smrg# AM_SILENT_RULES([DEFAULT]) 87052b01e16Smrg# -------------------------- 87152b01e16Smrg# Enable less verbose build rules; with the default set to DEFAULT 87252b01e16Smrg# (`yes' being less verbose, `no' or empty being verbose). 87352b01e16SmrgAC_DEFUN([AM_SILENT_RULES], 87452b01e16Smrg[AC_ARG_ENABLE([silent-rules], 87552b01e16Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 87652b01e16Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 87752b01e16Smrgcase $enable_silent_rules in 87852b01e16Smrgyes) AM_DEFAULT_VERBOSITY=0;; 87952b01e16Smrgno) AM_DEFAULT_VERBOSITY=1;; 88052b01e16Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 88152b01e16Smrgesac 88252b01e16SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 88352b01e16SmrgAM_BACKSLASH='\' 88452b01e16SmrgAC_SUBST([AM_BACKSLASH])dnl 88552b01e16Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 88652b01e16Smrg]) 8874b0ead49Smrg 88852b01e16Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 88952b01e16Smrg# 89052b01e16Smrg# This file is free software; the Free Software Foundation 89152b01e16Smrg# gives unlimited permission to copy and/or distribute it, 89252b01e16Smrg# with or without modifications, as long as this notice is preserved. 8934b0ead49Smrg 89452b01e16Smrg# AM_PROG_INSTALL_STRIP 89552b01e16Smrg# --------------------- 89652b01e16Smrg# One issue with vendor `install' (even GNU) is that you can't 89752b01e16Smrg# specify the program used to strip binaries. This is especially 89852b01e16Smrg# annoying in cross-compiling environments, where the build's strip 89952b01e16Smrg# is unlikely to handle the host's binaries. 90052b01e16Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 90152b01e16Smrg# always use install-sh in `make install-strip', and initialize 90252b01e16Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 90352b01e16SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 90452b01e16Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 90552b01e16Smrg# Installed binaries are usually stripped using `strip' when the user 90652b01e16Smrg# run `make install-strip'. However `strip' might not be the right 90752b01e16Smrg# tool to use in cross-compilation environments, therefore Automake 90852b01e16Smrg# will honor the `STRIP' environment variable to overrule this program. 90952b01e16Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 91052b01e16Smrgif test "$cross_compiling" != no; then 91152b01e16Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9124b0ead49Smrgfi 91352b01e16SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 91452b01e16SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9154b0ead49Smrg 91652b01e16Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 91752b01e16Smrg# 91852b01e16Smrg# This file is free software; the Free Software Foundation 91952b01e16Smrg# gives unlimited permission to copy and/or distribute it, 92052b01e16Smrg# with or without modifications, as long as this notice is preserved. 9214b0ead49Smrg 92252b01e16Smrg# serial 2 9234b0ead49Smrg 92452b01e16Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 92552b01e16Smrg# --------------------------- 92652b01e16Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 92752b01e16Smrg# This macro is traced by Automake. 92852b01e16SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9294b0ead49Smrg 93052b01e16Smrg# AM_SUBST_NOTMAKE(VARIABLE) 93152b01e16Smrg# --------------------------- 93252b01e16Smrg# Public sister of _AM_SUBST_NOTMAKE. 93352b01e16SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9344b0ead49Smrg 93552b01e16Smrg# Check how to create a tarball. -*- Autoconf -*- 9364b0ead49Smrg 93752b01e16Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 93852b01e16Smrg# 93952b01e16Smrg# This file is free software; the Free Software Foundation 94052b01e16Smrg# gives unlimited permission to copy and/or distribute it, 94152b01e16Smrg# with or without modifications, as long as this notice is preserved. 9424b0ead49Smrg 94352b01e16Smrg# serial 2 94452b01e16Smrg 94552b01e16Smrg# _AM_PROG_TAR(FORMAT) 94652b01e16Smrg# -------------------- 94752b01e16Smrg# Check how to create a tarball in format FORMAT. 94852b01e16Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 94952b01e16Smrg# 95052b01e16Smrg# Substitute a variable $(am__tar) that is a command 95152b01e16Smrg# writing to stdout a FORMAT-tarball containing the directory 95252b01e16Smrg# $tardir. 95352b01e16Smrg# tardir=directory && $(am__tar) > result.tar 95452b01e16Smrg# 95552b01e16Smrg# Substitute a variable $(am__untar) that extract such 95652b01e16Smrg# a tarball read from stdin. 95752b01e16Smrg# $(am__untar) < result.tar 95852b01e16SmrgAC_DEFUN([_AM_PROG_TAR], 95952b01e16Smrg[# Always define AMTAR for backward compatibility. 96052b01e16SmrgAM_MISSING_PROG([AMTAR], [tar]) 96152b01e16Smrgm4_if([$1], [v7], 96252b01e16Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 96352b01e16Smrg [m4_case([$1], [ustar],, [pax],, 96452b01e16Smrg [m4_fatal([Unknown tar format])]) 96552b01e16SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 96652b01e16Smrg# Loop over all known methods to create a tar archive until one works. 96752b01e16Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 96852b01e16Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 96952b01e16Smrg# Do not fold the above two line into one, because Tru64 sh and 97052b01e16Smrg# Solaris sh will not grok spaces in the rhs of `-'. 97152b01e16Smrgfor _am_tool in $_am_tools 97252b01e16Smrgdo 97352b01e16Smrg case $_am_tool in 97452b01e16Smrg gnutar) 97552b01e16Smrg for _am_tar in tar gnutar gtar; 97652b01e16Smrg do 97752b01e16Smrg AM_RUN_LOG([$_am_tar --version]) && break 97852b01e16Smrg done 97952b01e16Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98052b01e16Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98152b01e16Smrg am__untar="$_am_tar -xf -" 98252b01e16Smrg ;; 98352b01e16Smrg plaintar) 98452b01e16Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 98552b01e16Smrg # ustar tarball either. 98652b01e16Smrg (tar --version) >/dev/null 2>&1 && continue 98752b01e16Smrg am__tar='tar chf - "$$tardir"' 98852b01e16Smrg am__tar_='tar chf - "$tardir"' 98952b01e16Smrg am__untar='tar xf -' 99052b01e16Smrg ;; 99152b01e16Smrg pax) 99252b01e16Smrg am__tar='pax -L -x $1 -w "$$tardir"' 99352b01e16Smrg am__tar_='pax -L -x $1 -w "$tardir"' 99452b01e16Smrg am__untar='pax -r' 99552b01e16Smrg ;; 99652b01e16Smrg cpio) 99752b01e16Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 99852b01e16Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 99952b01e16Smrg am__untar='cpio -i -H $1 -d' 100052b01e16Smrg ;; 100152b01e16Smrg none) 100252b01e16Smrg am__tar=false 100352b01e16Smrg am__tar_=false 100452b01e16Smrg am__untar=false 10054b0ead49Smrg ;; 10064b0ead49Smrg esac 10074b0ead49Smrg 100852b01e16Smrg # If the value was cached, stop now. We just wanted to have am__tar 100952b01e16Smrg # and am__untar set. 101052b01e16Smrg test -n "${am_cv_prog_tar_$1}" && break 10114b0ead49Smrg 101252b01e16Smrg # tar/untar a dummy directory, and stop if the command works 101352b01e16Smrg rm -rf conftest.dir 101452b01e16Smrg mkdir conftest.dir 101552b01e16Smrg echo GrepMe > conftest.dir/file 101652b01e16Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 101752b01e16Smrg rm -rf conftest.dir 101852b01e16Smrg if test -s conftest.tar; then 101952b01e16Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 102052b01e16Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102152b01e16Smrg fi 102252b01e16Smrgdone 102352b01e16Smrgrm -rf conftest.dir 10244b0ead49Smrg 102552b01e16SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 102652b01e16SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 102752b01e16SmrgAC_SUBST([am__tar]) 102852b01e16SmrgAC_SUBST([am__untar]) 102952b01e16Smrg]) # _AM_PROG_TAR 10304b0ead49Smrg 103152b01e16Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 103252b01e16Smrgdnl 103352b01e16Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 103452b01e16Smrgdnl 103552b01e16Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 103649dc963fSmrgdnl copy of this software and associated documentation files (the "Software"), 103749dc963fSmrgdnl to deal in the Software without restriction, including without limitation 103849dc963fSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 103949dc963fSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 104049dc963fSmrgdnl Software is furnished to do so, subject to the following conditions: 104152b01e16Smrgdnl 104249dc963fSmrgdnl The above copyright notice and this permission notice (including the next 104349dc963fSmrgdnl paragraph) shall be included in all copies or substantial portions of the 104449dc963fSmrgdnl Software. 104552b01e16Smrgdnl 104649dc963fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 104749dc963fSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 104849dc963fSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 104949dc963fSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 105049dc963fSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 105149dc963fSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 105249dc963fSmrgdnl DEALINGS IN THE SOFTWARE. 10534b0ead49Smrg 105452b01e16Smrg# XORG_MACROS_VERSION(required-version) 105552b01e16Smrg# ------------------------------------- 105652b01e16Smrg# Minimum version: 1.1.0 105752b01e16Smrg# 105852b01e16Smrg# If you're using a macro added in Version 1.1 or newer, include this in 105952b01e16Smrg# your configure.ac with the minimum required version, such as: 106052b01e16Smrg# XORG_MACROS_VERSION(1.1) 106152b01e16Smrg# 106252b01e16Smrg# To ensure that this macro is defined, also add: 106352b01e16Smrg# m4_ifndef([XORG_MACROS_VERSION], 106452b01e16Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 106552b01e16Smrg# 106652b01e16Smrg# 106752b01e16Smrg# See the "minimum version" comment for each macro you use to see what 106852b01e16Smrg# version you require. 106952b01e16Smrgm4_defun([XORG_MACROS_VERSION],[ 107049dc963fSmrgm4_define([vers_have], [1.8.0]) 107152b01e16Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 107252b01e16Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 107352b01e16Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 107452b01e16Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 107552b01e16Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 107652b01e16Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 107752b01e16Smrgm4_undefine([vers_have]) 107852b01e16Smrgm4_undefine([maj_have]) 107952b01e16Smrgm4_undefine([maj_needed]) 108052b01e16Smrg]) # XORG_MACROS_VERSION 10814b0ead49Smrg 108252b01e16Smrg# XORG_PROG_RAWCPP() 108352b01e16Smrg# ------------------ 108452b01e16Smrg# Minimum version: 1.0.0 108552b01e16Smrg# 108652b01e16Smrg# Find cpp program and necessary flags for use in pre-processing text files 108752b01e16Smrg# such as man pages and config files 108852b01e16SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 108952b01e16SmrgAC_REQUIRE([AC_PROG_CPP]) 109052b01e16SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 109152b01e16Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10924b0ead49Smrg 109352b01e16Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 109452b01e16Smrg# which is not the best choice for supporting other OS'es, but covers most 109552b01e16Smrg# of the ones we need for now. 109652b01e16SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 109752b01e16SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 109852b01e16Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 109952b01e16Smrg AC_MSG_RESULT([no]) 110052b01e16Smrgelse 110152b01e16Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110252b01e16Smrg RAWCPPFLAGS=-undef 110352b01e16Smrg AC_MSG_RESULT([yes]) 110452b01e16Smrg # under Cygwin unix is still defined even with -undef 110552b01e16Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110652b01e16Smrg RAWCPPFLAGS="-undef -ansi" 110752b01e16Smrg AC_MSG_RESULT([yes, with -ansi]) 110852b01e16Smrg else 110952b01e16Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 111052b01e16Smrg fi 111152b01e16Smrgfi 111252b01e16Smrgrm -f conftest.$ac_ext 11134b0ead49Smrg 111452b01e16SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 111552b01e16SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 111652b01e16Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 111752b01e16Smrg AC_MSG_RESULT([no]) 111852b01e16Smrgelse 111952b01e16Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 112052b01e16Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 112152b01e16Smrg AC_MSG_RESULT([yes]) 112252b01e16Smrg else 112352b01e16Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 112452b01e16Smrg fi 11254b0ead49Smrgfi 112652b01e16Smrgrm -f conftest.$ac_ext 112752b01e16SmrgAC_SUBST(RAWCPPFLAGS) 112852b01e16Smrg]) # XORG_PROG_RAWCPP 11294b0ead49Smrg 113052b01e16Smrg# XORG_MANPAGE_SECTIONS() 113152b01e16Smrg# ----------------------- 113252b01e16Smrg# Minimum version: 1.0.0 113352b01e16Smrg# 113452b01e16Smrg# Determine which sections man pages go in for the different man page types 113552b01e16Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 113652b01e16Smrg# Not sure if there's any better way than just hardcoding by OS name. 113752b01e16Smrg# Override default settings by setting environment variables 113849dc963fSmrg# Added MAN_SUBSTS in version 1.8 113949dc963fSmrg# Added AC_PROG_SED in version 1.8 11404b0ead49Smrg 114152b01e16SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 114252b01e16SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 114349dc963fSmrgAC_REQUIRE([AC_PROG_SED]) 11444b0ead49Smrg 114552b01e16Smrgif test x$APP_MAN_SUFFIX = x ; then 114652b01e16Smrg APP_MAN_SUFFIX=1 114752b01e16Smrgfi 114852b01e16Smrgif test x$APP_MAN_DIR = x ; then 114952b01e16Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 115052b01e16Smrgfi 11514b0ead49Smrg 115252b01e16Smrgif test x$LIB_MAN_SUFFIX = x ; then 115352b01e16Smrg LIB_MAN_SUFFIX=3 115452b01e16Smrgfi 115552b01e16Smrgif test x$LIB_MAN_DIR = x ; then 115652b01e16Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 115752b01e16Smrgfi 11584b0ead49Smrg 115952b01e16Smrgif test x$FILE_MAN_SUFFIX = x ; then 116052b01e16Smrg case $host_os in 116152b01e16Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 116252b01e16Smrg *) FILE_MAN_SUFFIX=5 ;; 116352b01e16Smrg esac 116452b01e16Smrgfi 116552b01e16Smrgif test x$FILE_MAN_DIR = x ; then 116652b01e16Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 116752b01e16Smrgfi 11684b0ead49Smrg 116952b01e16Smrgif test x$MISC_MAN_SUFFIX = x ; then 117052b01e16Smrg case $host_os in 117152b01e16Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 117252b01e16Smrg *) MISC_MAN_SUFFIX=7 ;; 117352b01e16Smrg esac 117452b01e16Smrgfi 117552b01e16Smrgif test x$MISC_MAN_DIR = x ; then 117652b01e16Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 11774b0ead49Smrgfi 11784b0ead49Smrg 117952b01e16Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 118052b01e16Smrg case $host_os in 118152b01e16Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 118252b01e16Smrg *) DRIVER_MAN_SUFFIX=4 ;; 118352b01e16Smrg esac 118452b01e16Smrgfi 118552b01e16Smrgif test x$DRIVER_MAN_DIR = x ; then 118652b01e16Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 118752b01e16Smrgfi 11884b0ead49Smrg 118952b01e16Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 119052b01e16Smrg case $host_os in 119152b01e16Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 119252b01e16Smrg *) ADMIN_MAN_SUFFIX=8 ;; 119352b01e16Smrg esac 119452b01e16Smrgfi 119552b01e16Smrgif test x$ADMIN_MAN_DIR = x ; then 119652b01e16Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 11974b0ead49Smrgfi 11984b0ead49Smrg 11994b0ead49Smrg 120052b01e16SmrgAC_SUBST([APP_MAN_SUFFIX]) 120152b01e16SmrgAC_SUBST([LIB_MAN_SUFFIX]) 120252b01e16SmrgAC_SUBST([FILE_MAN_SUFFIX]) 120352b01e16SmrgAC_SUBST([MISC_MAN_SUFFIX]) 120452b01e16SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 120552b01e16SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 120652b01e16SmrgAC_SUBST([APP_MAN_DIR]) 120752b01e16SmrgAC_SUBST([LIB_MAN_DIR]) 120852b01e16SmrgAC_SUBST([FILE_MAN_DIR]) 120952b01e16SmrgAC_SUBST([MISC_MAN_DIR]) 121052b01e16SmrgAC_SUBST([DRIVER_MAN_DIR]) 121152b01e16SmrgAC_SUBST([ADMIN_MAN_DIR]) 121249dc963fSmrg 121349dc963fSmrgXORG_MAN_PAGE="X Version 11" 121449dc963fSmrgAC_SUBST([XORG_MAN_PAGE]) 121549dc963fSmrgMAN_SUBSTS="\ 121649dc963fSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 121749dc963fSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 121849dc963fSmrg -e 's|__xservername__|Xorg|g' \ 121949dc963fSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 122049dc963fSmrg -e 's|__projectroot__|\$(prefix)|g' \ 122149dc963fSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 122249dc963fSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 122349dc963fSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 122449dc963fSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 122549dc963fSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 122649dc963fSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 122749dc963fSmrgAC_SUBST([MAN_SUBSTS]) 122849dc963fSmrg 122952b01e16Smrg]) # XORG_MANPAGE_SECTIONS 12304b0ead49Smrg 123149dc963fSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 123249dc963fSmrg# ------------------------ 123349dc963fSmrg# Minimum version: 1.7.0 123449dc963fSmrg# 123549dc963fSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 123649dc963fSmrg# provided by xorg-sgml-doctools, if installed. 123749dc963fSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 123849dc963fSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 123949dc963fSmrgXORG_SGML_PATH= 124049dc963fSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 124149dc963fSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 124249dc963fSmrg [m4_ifval([$1],[:], 124349dc963fSmrg [if test x"$cross_compiling" != x"yes" ; then 124449dc963fSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 124549dc963fSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 124649dc963fSmrg fi]) 124749dc963fSmrg ]) 124849dc963fSmrg 124949dc963fSmrgif test "x$XORG_SGML_PATH" != "x" ; then 125049dc963fSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 125149dc963fSmrgelse 125249dc963fSmrg AC_MSG_RESULT([no]) 125349dc963fSmrgfi 125449dc963fSmrg 125549dc963fSmrgAC_SUBST(XORG_SGML_PATH) 125649dc963fSmrg]) # XORG_CHECK_SGML_DOCTOOLS 125749dc963fSmrg 125852b01e16Smrg# XORG_CHECK_LINUXDOC 125952b01e16Smrg# ------------------- 126052b01e16Smrg# Minimum version: 1.0.0 126152b01e16Smrg# 126252b01e16Smrg# Defines the variable MAKE_TEXT if the necessary tools and 126352b01e16Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 126452b01e16Smrg# Whether or not the necessary tools and files are found can be checked 126552b01e16Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 126652b01e16SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 126749dc963fSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 126849dc963fSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 12694b0ead49Smrg 127052b01e16SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 12714b0ead49Smrg 127249dc963fSmrgAC_MSG_CHECKING([whether to build documentation]) 12734b0ead49Smrg 127449dc963fSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 127552b01e16Smrg BUILDDOC=yes 12764b0ead49Smrgelse 127752b01e16Smrg BUILDDOC=no 12784b0ead49Smrgfi 12794b0ead49Smrg 128052b01e16SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 12814b0ead49Smrg 128252b01e16SmrgAC_MSG_RESULT([$BUILDDOC]) 128352b01e16Smrg 128449dc963fSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 128552b01e16Smrg 128649dc963fSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 128752b01e16Smrg BUILDPDFDOC=yes 12884b0ead49Smrgelse 128952b01e16Smrg BUILDPDFDOC=no 12904b0ead49Smrgfi 12914b0ead49Smrg 129252b01e16SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 12934b0ead49Smrg 129452b01e16SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 12954b0ead49Smrg 129649dc963fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 129752b01e16SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 129852b01e16SmrgMAKE_PDF="$PS2PDF" 129952b01e16SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 13004b0ead49Smrg 130152b01e16SmrgAC_SUBST(MAKE_TEXT) 130252b01e16SmrgAC_SUBST(MAKE_PS) 130352b01e16SmrgAC_SUBST(MAKE_PDF) 130452b01e16SmrgAC_SUBST(MAKE_HTML) 130552b01e16Smrg]) # XORG_CHECK_LINUXDOC 13064b0ead49Smrg 130752b01e16Smrg# XORG_CHECK_DOCBOOK 130852b01e16Smrg# ------------------- 130952b01e16Smrg# Minimum version: 1.0.0 131052b01e16Smrg# 131152b01e16Smrg# Checks for the ability to build output formats from SGML DocBook source. 131252b01e16Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 131352b01e16Smrg# indicates whether the necessary tools and files are found and, if set, 131452b01e16Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 131552b01e16SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 131649dc963fSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 131749dc963fSmrg 131852b01e16SmrgBUILDTXTDOC=no 131952b01e16SmrgBUILDPDFDOC=no 132052b01e16SmrgBUILDPSDOC=no 132152b01e16SmrgBUILDHTMLDOC=no 13224b0ead49Smrg 132352b01e16SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 132452b01e16SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 132552b01e16SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 132652b01e16SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 13274b0ead49Smrg 132849dc963fSmrgAC_MSG_CHECKING([whether to build text documentation]) 132949dc963fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 133052b01e16Smrg test x$BUILD_TXTDOC != xno; then 133152b01e16Smrg BUILDTXTDOC=yes 133252b01e16Smrgfi 133352b01e16SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 133452b01e16SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 13354b0ead49Smrg 133649dc963fSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 133749dc963fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 133852b01e16Smrg test x$BUILD_PDFDOC != xno; then 133952b01e16Smrg BUILDPDFDOC=yes 134052b01e16Smrgfi 134152b01e16SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 134252b01e16SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13434b0ead49Smrg 134449dc963fSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 134549dc963fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 134652b01e16Smrg test x$BUILD_PSDOC != xno; then 134752b01e16Smrg BUILDPSDOC=yes 134852b01e16Smrgfi 134952b01e16SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 135052b01e16SmrgAC_MSG_RESULT([$BUILDPSDOC]) 13514b0ead49Smrg 135249dc963fSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 135349dc963fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 135452b01e16Smrg test x$BUILD_HTMLDOC != xno; then 135552b01e16Smrg BUILDHTMLDOC=yes 135652b01e16Smrgfi 135752b01e16SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 135852b01e16SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 13594b0ead49Smrg 136052b01e16SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 136152b01e16SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 136252b01e16SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 136352b01e16SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 13644b0ead49Smrg 136552b01e16SmrgAC_SUBST(MAKE_TEXT) 136652b01e16SmrgAC_SUBST(MAKE_PS) 136752b01e16SmrgAC_SUBST(MAKE_PDF) 136852b01e16SmrgAC_SUBST(MAKE_HTML) 136952b01e16Smrg]) # XORG_CHECK_DOCBOOK 13704b0ead49Smrg 137149dc963fSmrg# XORG_WITH_XMLTO([MIN-VERSION]) 137249dc963fSmrg# ---------------- 137349dc963fSmrg# Minimum version: 1.5.0 137449dc963fSmrg# 137549dc963fSmrg# Documentation tools are not always available on all platforms and sometimes 137649dc963fSmrg# not at the appropriate level. This macro enables a module to test for the 137749dc963fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 137849dc963fSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 137949dc963fSmrg# as whether or not to use the xmlto package. 138049dc963fSmrg# 138149dc963fSmrg# Interface to module: 138249dc963fSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 138349dc963fSmrg# XMLTO: returns the path of the xmlto program found 138449dc963fSmrg# returns the path set by the user in the environment 138549dc963fSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 138649dc963fSmrg# 'no' user instructs the module not to use xmlto 138749dc963fSmrg# 138849dc963fSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 138949dc963fSmrg# 139049dc963fSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 139149dc963fSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 139249dc963fSmrgAC_ARG_WITH(xmlto, 139349dc963fSmrg AS_HELP_STRING([--with-xmlto], 139449dc963fSmrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 139549dc963fSmrg [use_xmlto=$withval], [use_xmlto=auto]) 139649dc963fSmrg 139749dc963fSmrgif test "x$use_xmlto" = x"auto"; then 139849dc963fSmrg AC_PATH_PROG([XMLTO], [xmlto]) 139949dc963fSmrg if test "x$XMLTO" = "x"; then 140049dc963fSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 140149dc963fSmrg have_xmlto=no 140249dc963fSmrg else 140349dc963fSmrg have_xmlto=yes 140449dc963fSmrg fi 140549dc963fSmrgelif test "x$use_xmlto" = x"yes" ; then 140649dc963fSmrg AC_PATH_PROG([XMLTO], [xmlto]) 140749dc963fSmrg if test "x$XMLTO" = "x"; then 140849dc963fSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 140949dc963fSmrg fi 141049dc963fSmrg have_xmlto=yes 141149dc963fSmrgelif test "x$use_xmlto" = x"no" ; then 141249dc963fSmrg if test "x$XMLTO" != "x"; then 141349dc963fSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 141449dc963fSmrg fi 141549dc963fSmrg have_xmlto=no 141649dc963fSmrgelse 141749dc963fSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 141849dc963fSmrgfi 141949dc963fSmrgm4_ifval([$1], 142049dc963fSmrg[if test "$have_xmlto" = yes; then 142149dc963fSmrg # scrape the xmlto version 142249dc963fSmrg AC_MSG_CHECKING([the xmlto version]) 142349dc963fSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 142449dc963fSmrg AC_MSG_RESULT([$xmlto_version]) 142549dc963fSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 142649dc963fSmrg [if test "x$use_xmlto" = xauto; then 142749dc963fSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 142849dc963fSmrg have_xmlto=no 142949dc963fSmrg else 143049dc963fSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 143149dc963fSmrg fi]) 143249dc963fSmrgfi]) 143349dc963fSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 143449dc963fSmrg]) # XORG_WITH_XMLTO 143549dc963fSmrg 143649dc963fSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 143749dc963fSmrg# ---------------- 143849dc963fSmrg# Minimum version: 1.5.0 143949dc963fSmrg# 144049dc963fSmrg# Documentation tools are not always available on all platforms and sometimes 144149dc963fSmrg# not at the appropriate level. This macro enables a module to test for the 144249dc963fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 144349dc963fSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 144449dc963fSmrg# as whether or not to use the asciidoc package. 144549dc963fSmrg# 144649dc963fSmrg# Interface to module: 144749dc963fSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 144849dc963fSmrg# ASCIIDOC: returns the path of the asciidoc program found 144949dc963fSmrg# returns the path set by the user in the environment 145049dc963fSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 145149dc963fSmrg# 'no' user instructs the module not to use asciidoc 145249dc963fSmrg# 145349dc963fSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 145449dc963fSmrg# 145549dc963fSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 145649dc963fSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 145749dc963fSmrgAC_ARG_WITH(asciidoc, 145849dc963fSmrg AS_HELP_STRING([--with-asciidoc], 145949dc963fSmrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 146049dc963fSmrg [use_asciidoc=$withval], [use_asciidoc=auto]) 146149dc963fSmrg 146249dc963fSmrgif test "x$use_asciidoc" = x"auto"; then 146349dc963fSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 146449dc963fSmrg if test "x$ASCIIDOC" = "x"; then 146549dc963fSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 146649dc963fSmrg have_asciidoc=no 146749dc963fSmrg else 146849dc963fSmrg have_asciidoc=yes 146949dc963fSmrg fi 147049dc963fSmrgelif test "x$use_asciidoc" = x"yes" ; then 147149dc963fSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 147249dc963fSmrg if test "x$ASCIIDOC" = "x"; then 147349dc963fSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 147449dc963fSmrg fi 147549dc963fSmrg have_asciidoc=yes 147649dc963fSmrgelif test "x$use_asciidoc" = x"no" ; then 147749dc963fSmrg if test "x$ASCIIDOC" != "x"; then 147849dc963fSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 147949dc963fSmrg fi 148049dc963fSmrg have_asciidoc=no 148149dc963fSmrgelse 148249dc963fSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 148349dc963fSmrgfi 148449dc963fSmrgm4_ifval([$1], 148549dc963fSmrg[if test "$have_asciidoc" = yes; then 148649dc963fSmrg # scrape the asciidoc version 148749dc963fSmrg AC_MSG_CHECKING([the asciidoc version]) 148849dc963fSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 148949dc963fSmrg AC_MSG_RESULT([$asciidoc_version]) 149049dc963fSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 149149dc963fSmrg [if test "x$use_asciidoc" = xauto; then 149249dc963fSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 149349dc963fSmrg have_asciidoc=no 149449dc963fSmrg else 149549dc963fSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 149649dc963fSmrg fi]) 149749dc963fSmrgfi]) 149849dc963fSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 149949dc963fSmrg]) # XORG_WITH_ASCIIDOC 150049dc963fSmrg 150149dc963fSmrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 150249dc963fSmrg# -------------------------------- 150349dc963fSmrg# Minimum version: 1.5.0 150449dc963fSmrg# 150549dc963fSmrg# Documentation tools are not always available on all platforms and sometimes 150649dc963fSmrg# not at the appropriate level. This macro enables a module to test for the 150749dc963fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 150849dc963fSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 150949dc963fSmrg# as whether or not to use the doxygen package. 151049dc963fSmrg# 151149dc963fSmrg# Interface to module: 151249dc963fSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 151349dc963fSmrg# DOXYGEN: returns the path of the doxygen program found 151449dc963fSmrg# returns the path set by the user in the environment 151549dc963fSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 151649dc963fSmrg# 'no' user instructs the module not to use doxygen 151749dc963fSmrg# 151849dc963fSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 151949dc963fSmrg# 152049dc963fSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 152149dc963fSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 152249dc963fSmrgAC_ARG_WITH(doxygen, 152349dc963fSmrg AS_HELP_STRING([--with-doxygen], 152449dc963fSmrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 152549dc963fSmrg [use_doxygen=$withval], [use_doxygen=auto]) 152649dc963fSmrg 152749dc963fSmrgif test "x$use_doxygen" = x"auto"; then 152849dc963fSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 152949dc963fSmrg if test "x$DOXYGEN" = "x"; then 153049dc963fSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 153149dc963fSmrg have_doxygen=no 153249dc963fSmrg else 153349dc963fSmrg have_doxygen=yes 153449dc963fSmrg fi 153549dc963fSmrgelif test "x$use_doxygen" = x"yes" ; then 153649dc963fSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 153749dc963fSmrg if test "x$DOXYGEN" = "x"; then 153849dc963fSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 153949dc963fSmrg fi 154049dc963fSmrg have_doxygen=yes 154149dc963fSmrgelif test "x$use_doxygen" = x"no" ; then 154249dc963fSmrg if test "x$DOXYGEN" != "x"; then 154349dc963fSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 154449dc963fSmrg fi 154549dc963fSmrg have_doxygen=no 154649dc963fSmrgelse 154749dc963fSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 154849dc963fSmrgfi 154949dc963fSmrgm4_ifval([$1], 155049dc963fSmrg[if test "$have_doxygen" = yes; then 155149dc963fSmrg # scrape the doxygen version 155249dc963fSmrg AC_MSG_CHECKING([the doxygen version]) 155349dc963fSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 155449dc963fSmrg AC_MSG_RESULT([$doxygen_version]) 155549dc963fSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 155649dc963fSmrg [if test "x$use_doxygen" = xauto; then 155749dc963fSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 155849dc963fSmrg have_doxygen=no 155949dc963fSmrg else 156049dc963fSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 156149dc963fSmrg fi]) 156249dc963fSmrgfi]) 156349dc963fSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 156449dc963fSmrg]) # XORG_WITH_DOXYGEN 156549dc963fSmrg 156649dc963fSmrg# XORG_WITH_GROFF 156749dc963fSmrg# ---------------- 156849dc963fSmrg# Minimum version: 1.6.0 156949dc963fSmrg# 157049dc963fSmrg# Documentation tools are not always available on all platforms and sometimes 157149dc963fSmrg# not at the appropriate level. This macro enables a module to test for the 157249dc963fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 157349dc963fSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 157449dc963fSmrg# as whether or not to use the groff package. 157549dc963fSmrg# 157649dc963fSmrg# Interface to module: 157749dc963fSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 157849dc963fSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 157949dc963fSmrg# HAVE_GROFF_MS: the -ms macros package 158049dc963fSmrg# GROFF: returns the path of the groff program found 158149dc963fSmrg# returns the path set by the user in the environment 158249dc963fSmrg# --with-groff: 'yes' user instructs the module to use groff 158349dc963fSmrg# 'no' user instructs the module not to use groff 158449dc963fSmrg# 158549dc963fSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 158649dc963fSmrg# 158749dc963fSmrg# OS and distros often splits groff in a basic and full package, the former 158849dc963fSmrg# having the groff program and the later having devices, fonts and macros 158949dc963fSmrg# Checking for the groff executable is not enough. 159049dc963fSmrg# 159149dc963fSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 159249dc963fSmrg# unset HAVE_GROFF or GROFF env variables. 159349dc963fSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 159449dc963fSmrg# 159549dc963fSmrgAC_DEFUN([XORG_WITH_GROFF],[ 159649dc963fSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 159749dc963fSmrgAC_ARG_WITH(groff, 159849dc963fSmrg AS_HELP_STRING([--with-groff], 159949dc963fSmrg [Use groff to regenerate documentation (default: yes, if installed)]), 160049dc963fSmrg [use_groff=$withval], [use_groff=auto]) 160149dc963fSmrg 160249dc963fSmrgif test "x$use_groff" = x"auto"; then 160349dc963fSmrg AC_PATH_PROG([GROFF], [groff]) 160449dc963fSmrg if test "x$GROFF" = "x"; then 160549dc963fSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 160649dc963fSmrg have_groff=no 160749dc963fSmrg else 160849dc963fSmrg have_groff=yes 160949dc963fSmrg fi 161049dc963fSmrgelif test "x$use_groff" = x"yes" ; then 161149dc963fSmrg AC_PATH_PROG([GROFF], [groff]) 161249dc963fSmrg if test "x$GROFF" = "x"; then 161349dc963fSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 161449dc963fSmrg fi 161549dc963fSmrg have_groff=yes 161649dc963fSmrgelif test "x$use_groff" = x"no" ; then 161749dc963fSmrg if test "x$GROFF" != "x"; then 161849dc963fSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 161949dc963fSmrg fi 162049dc963fSmrg have_groff=no 162149dc963fSmrgelse 162249dc963fSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 162349dc963fSmrgfi 162449dc963fSmrg# We have groff, test for the presence of the macro packages 162549dc963fSmrgif test "x$have_groff" = x"yes"; then 162649dc963fSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 162749dc963fSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 162849dc963fSmrg groff_ms_works=yes 162949dc963fSmrg else 163049dc963fSmrg groff_ms_works=no 163149dc963fSmrg fi 163249dc963fSmrg AC_MSG_RESULT([$groff_ms_works]) 163349dc963fSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 163449dc963fSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 163549dc963fSmrg groff_mm_works=yes 163649dc963fSmrg else 163749dc963fSmrg groff_mm_works=no 163849dc963fSmrg fi 163949dc963fSmrg AC_MSG_RESULT([$groff_mm_works]) 164049dc963fSmrgfi 164149dc963fSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 164249dc963fSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 164349dc963fSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 164449dc963fSmrg]) # XORG_WITH_GROFF 164549dc963fSmrg 164649dc963fSmrg# XORG_WITH_FOP 164749dc963fSmrg# ---------------- 164849dc963fSmrg# Minimum version: 1.6.0 164949dc963fSmrg# 165049dc963fSmrg# Documentation tools are not always available on all platforms and sometimes 165149dc963fSmrg# not at the appropriate level. This macro enables a module to test for the 165249dc963fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 165349dc963fSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 165449dc963fSmrg# as whether or not to use the fop package. 165549dc963fSmrg# 165649dc963fSmrg# Interface to module: 165749dc963fSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 165849dc963fSmrg# FOP: returns the path of the fop program found 165949dc963fSmrg# returns the path set by the user in the environment 166049dc963fSmrg# --with-fop: 'yes' user instructs the module to use fop 166149dc963fSmrg# 'no' user instructs the module not to use fop 166249dc963fSmrg# 166349dc963fSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 166449dc963fSmrg# 166549dc963fSmrgAC_DEFUN([XORG_WITH_FOP],[ 166649dc963fSmrgAC_ARG_VAR([FOP], [Path to fop command]) 166749dc963fSmrgAC_ARG_WITH(fop, 166849dc963fSmrg AS_HELP_STRING([--with-fop], 166949dc963fSmrg [Use fop to regenerate documentation (default: yes, if installed)]), 167049dc963fSmrg [use_fop=$withval], [use_fop=auto]) 167149dc963fSmrg 167249dc963fSmrgif test "x$use_fop" = x"auto"; then 167349dc963fSmrg AC_PATH_PROG([FOP], [fop]) 167449dc963fSmrg if test "x$FOP" = "x"; then 167549dc963fSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 167649dc963fSmrg have_fop=no 167749dc963fSmrg else 167849dc963fSmrg have_fop=yes 167949dc963fSmrg fi 168049dc963fSmrgelif test "x$use_fop" = x"yes" ; then 168149dc963fSmrg AC_PATH_PROG([FOP], [fop]) 168249dc963fSmrg if test "x$FOP" = "x"; then 168349dc963fSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 168449dc963fSmrg fi 168549dc963fSmrg have_fop=yes 168649dc963fSmrgelif test "x$use_fop" = x"no" ; then 168749dc963fSmrg if test "x$FOP" != "x"; then 168849dc963fSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 168949dc963fSmrg fi 169049dc963fSmrg have_fop=no 169149dc963fSmrgelse 169249dc963fSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 169349dc963fSmrgfi 169449dc963fSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 169549dc963fSmrg]) # XORG_WITH_FOP 169649dc963fSmrg 169749dc963fSmrg# XORG_WITH_PS2PDF 169849dc963fSmrg# ---------------- 169949dc963fSmrg# Minimum version: 1.6.0 170049dc963fSmrg# 170149dc963fSmrg# Documentation tools are not always available on all platforms and sometimes 170249dc963fSmrg# not at the appropriate level. This macro enables a module to test for the 170349dc963fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 170449dc963fSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 170549dc963fSmrg# as whether or not to use the ps2pdf package. 170649dc963fSmrg# 170749dc963fSmrg# Interface to module: 170849dc963fSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 170949dc963fSmrg# PS2PDF: returns the path of the ps2pdf program found 171049dc963fSmrg# returns the path set by the user in the environment 171149dc963fSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 171249dc963fSmrg# 'no' user instructs the module not to use ps2pdf 171349dc963fSmrg# 171449dc963fSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 171549dc963fSmrg# 171649dc963fSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 171749dc963fSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 171849dc963fSmrgAC_ARG_WITH(ps2pdf, 171949dc963fSmrg AS_HELP_STRING([--with-ps2pdf], 172049dc963fSmrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 172149dc963fSmrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 172249dc963fSmrg 172349dc963fSmrgif test "x$use_ps2pdf" = x"auto"; then 172449dc963fSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 172549dc963fSmrg if test "x$PS2PDF" = "x"; then 172649dc963fSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 172749dc963fSmrg have_ps2pdf=no 172849dc963fSmrg else 172949dc963fSmrg have_ps2pdf=yes 173049dc963fSmrg fi 173149dc963fSmrgelif test "x$use_ps2pdf" = x"yes" ; then 173249dc963fSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 173349dc963fSmrg if test "x$PS2PDF" = "x"; then 173449dc963fSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 173549dc963fSmrg fi 173649dc963fSmrg have_ps2pdf=yes 173749dc963fSmrgelif test "x$use_ps2pdf" = x"no" ; then 173849dc963fSmrg if test "x$PS2PDF" != "x"; then 173949dc963fSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 174049dc963fSmrg fi 174149dc963fSmrg have_ps2pdf=no 174249dc963fSmrgelse 174349dc963fSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 174449dc963fSmrgfi 174549dc963fSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 174649dc963fSmrg]) # XORG_WITH_PS2PDF 174749dc963fSmrg 174849dc963fSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 174949dc963fSmrg# ---------------- 175049dc963fSmrg# Minimum version: 1.6.0 175149dc963fSmrg# 175249dc963fSmrg# Documentation tools are not always available on all platforms and sometimes 175349dc963fSmrg# not at the appropriate level. This macro enables a builder to skip all 175449dc963fSmrg# documentation targets except traditional man pages. 175549dc963fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 175649dc963fSmrg# maximum flexibilty in controlling documentation building. 175749dc963fSmrg# Refer to: 175849dc963fSmrg# XORG_WITH_XMLTO --with-xmlto 175949dc963fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 176049dc963fSmrg# XORG_WITH_DOXYGEN --with-doxygen 176149dc963fSmrg# XORG_WITH_FOP --with-fop 176249dc963fSmrg# XORG_WITH_GROFF --with-groff 176349dc963fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 176449dc963fSmrg# 176549dc963fSmrg# Interface to module: 176649dc963fSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 176749dc963fSmrg# --enable-docs: 'yes' user instructs the module to generate docs 176849dc963fSmrg# 'no' user instructs the module not to generate docs 176949dc963fSmrg# parm1: specify the default value, yes or no. 177049dc963fSmrg# 177149dc963fSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 177249dc963fSmrgdefault=$1 177349dc963fSmrgif test "x$default" = x ; then 177449dc963fSmrg default="yes" 177549dc963fSmrgfi 177649dc963fSmrgAC_ARG_ENABLE(docs, 177749dc963fSmrg AS_HELP_STRING([--enable-docs], 177849dc963fSmrg [Enable building the documentation (default: yes)]), 177949dc963fSmrg [build_docs=$enableval], [build_docs=$default]) 178049dc963fSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 178149dc963fSmrgAC_MSG_CHECKING([whether to build documentation]) 178249dc963fSmrgAC_MSG_RESULT([$build_docs]) 178349dc963fSmrg]) # XORG_ENABLE_DOCS 178449dc963fSmrg 178549dc963fSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 178649dc963fSmrg# ---------------- 178749dc963fSmrg# Minimum version: 1.6.0 178849dc963fSmrg# 178949dc963fSmrg# This macro enables a builder to skip all developer documentation. 179049dc963fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 179149dc963fSmrg# maximum flexibilty in controlling documentation building. 179249dc963fSmrg# Refer to: 179349dc963fSmrg# XORG_WITH_XMLTO --with-xmlto 179449dc963fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 179549dc963fSmrg# XORG_WITH_DOXYGEN --with-doxygen 179649dc963fSmrg# XORG_WITH_FOP --with-fop 179749dc963fSmrg# XORG_WITH_GROFF --with-groff 179849dc963fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 179949dc963fSmrg# 180049dc963fSmrg# Interface to module: 180149dc963fSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 180249dc963fSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 180349dc963fSmrg# 'no' user instructs the module not to generate developer docs 180449dc963fSmrg# parm1: specify the default value, yes or no. 180549dc963fSmrg# 180649dc963fSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 180749dc963fSmrgdevel_default=$1 180849dc963fSmrgif test "x$devel_default" = x ; then 180949dc963fSmrg devel_default="yes" 181049dc963fSmrgfi 181149dc963fSmrgAC_ARG_ENABLE(devel-docs, 181249dc963fSmrg AS_HELP_STRING([--enable-devel-docs], 181349dc963fSmrg [Enable building the developer documentation (default: yes)]), 181449dc963fSmrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 181549dc963fSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 181649dc963fSmrgAC_MSG_CHECKING([whether to build developer documentation]) 181749dc963fSmrgAC_MSG_RESULT([$build_devel_docs]) 181849dc963fSmrg]) # XORG_ENABLE_DEVEL_DOCS 181949dc963fSmrg 182049dc963fSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 182149dc963fSmrg# ---------------- 182249dc963fSmrg# Minimum version: 1.6.0 182349dc963fSmrg# 182449dc963fSmrg# This macro enables a builder to skip all functional specification targets. 182549dc963fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 182649dc963fSmrg# maximum flexibilty in controlling documentation building. 182749dc963fSmrg# Refer to: 182849dc963fSmrg# XORG_WITH_XMLTO --with-xmlto 182949dc963fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 183049dc963fSmrg# XORG_WITH_DOXYGEN --with-doxygen 183149dc963fSmrg# XORG_WITH_FOP --with-fop 183249dc963fSmrg# XORG_WITH_GROFF --with-groff 183349dc963fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 183449dc963fSmrg# 183549dc963fSmrg# Interface to module: 183649dc963fSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 183749dc963fSmrg# --enable-specs: 'yes' user instructs the module to generate specs 183849dc963fSmrg# 'no' user instructs the module not to generate specs 183949dc963fSmrg# parm1: specify the default value, yes or no. 184049dc963fSmrg# 184149dc963fSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 184249dc963fSmrgspec_default=$1 184349dc963fSmrgif test "x$spec_default" = x ; then 184449dc963fSmrg spec_default="yes" 184549dc963fSmrgfi 184649dc963fSmrgAC_ARG_ENABLE(specs, 184749dc963fSmrg AS_HELP_STRING([--enable-specs], 184849dc963fSmrg [Enable building the specs (default: yes)]), 184949dc963fSmrg [build_specs=$enableval], [build_specs=$spec_default]) 185049dc963fSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 185149dc963fSmrgAC_MSG_CHECKING([whether to build functional specifications]) 185249dc963fSmrgAC_MSG_RESULT([$build_specs]) 185349dc963fSmrg]) # XORG_ENABLE_SPECS 185449dc963fSmrg 185552b01e16Smrg# XORG_CHECK_MALLOC_ZERO 185652b01e16Smrg# ---------------------- 185752b01e16Smrg# Minimum version: 1.0.0 185852b01e16Smrg# 185952b01e16Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 186052b01e16Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 186152b01e16Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 186252b01e16SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 186352b01e16SmrgAC_ARG_ENABLE(malloc0returnsnull, 186452b01e16Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 186552b01e16Smrg [malloc(0) returns NULL (default: auto)]), 186652b01e16Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 186752b01e16Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 18684b0ead49Smrg 186952b01e16SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 187052b01e16Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 187152b01e16Smrg AC_RUN_IFELSE([ 187252b01e16Smrgchar *malloc(); 187352b01e16Smrgchar *realloc(); 187452b01e16Smrgchar *calloc(); 187552b01e16Smrgmain() { 187652b01e16Smrg char *m0, *r0, *c0, *p; 187752b01e16Smrg m0 = malloc(0); 187852b01e16Smrg p = malloc(10); 187952b01e16Smrg r0 = realloc(p,0); 188052b01e16Smrg c0 = calloc(0); 188152b01e16Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 188252b01e16Smrg}], 188352b01e16Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 188449dc963fSmrg [MALLOC_ZERO_RETURNS_NULL=no], 188549dc963fSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 188652b01e16Smrgfi 188752b01e16SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 18884b0ead49Smrg 188952b01e16Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 189052b01e16Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 189152b01e16Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 189252b01e16Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 189352b01e16Smrgelse 189452b01e16Smrg MALLOC_ZERO_CFLAGS="" 189552b01e16Smrg XMALLOC_ZERO_CFLAGS="" 189652b01e16Smrg XTMALLOC_ZERO_CFLAGS="" 189752b01e16Smrgfi 18984b0ead49Smrg 189952b01e16SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 190052b01e16SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 190152b01e16SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 190252b01e16Smrg]) # XORG_CHECK_MALLOC_ZERO 19034b0ead49Smrg 190452b01e16Smrg# XORG_WITH_LINT() 190552b01e16Smrg# ---------------- 190652b01e16Smrg# Minimum version: 1.1.0 190752b01e16Smrg# 190849dc963fSmrg# This macro enables the use of a tool that flags some suspicious and 190949dc963fSmrg# non-portable constructs (likely to be bugs) in C language source code. 191049dc963fSmrg# It will attempt to locate the tool and use appropriate options. 191149dc963fSmrg# There are various lint type tools on different platforms. 191249dc963fSmrg# 191349dc963fSmrg# Interface to module: 191449dc963fSmrg# LINT: returns the path to the tool found on the platform 191549dc963fSmrg# or the value set to LINT on the configure cmd line 191649dc963fSmrg# also an Automake conditional 191749dc963fSmrg# LINT_FLAGS: an Automake variable with appropriate flags 191849dc963fSmrg# 191949dc963fSmrg# --with-lint: 'yes' user instructs the module to use lint 192049dc963fSmrg# 'no' user instructs the module not to use lint (default) 192149dc963fSmrg# 192249dc963fSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 192349dc963fSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 192452b01e16Smrg# 192552b01e16SmrgAC_DEFUN([XORG_WITH_LINT],[ 192652b01e16Smrg 192749dc963fSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 192849dc963fSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 192952b01e16SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 193052b01e16Smrg [Use a lint-style source code checker (default: disabled)])], 193152b01e16Smrg [use_lint=$withval], [use_lint=no]) 193249dc963fSmrg 193349dc963fSmrg# Obtain platform specific info like program name and options 193449dc963fSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 193549dc963fSmrgcase $host_os in 193649dc963fSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 193749dc963fSmrg lint_name=splint 193849dc963fSmrg lint_options="-badflag" 193949dc963fSmrg ;; 194049dc963fSmrg *freebsd* | *netbsd*) 194149dc963fSmrg lint_name=lint 194249dc963fSmrg lint_options="-u -b" 194349dc963fSmrg ;; 194449dc963fSmrg *solaris*) 194549dc963fSmrg lint_name=lint 194649dc963fSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 194749dc963fSmrg ;; 194849dc963fSmrgesac 194949dc963fSmrg 195049dc963fSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 195149dc963fSmrgif test "x$use_lint" = x"yes" ; then 195249dc963fSmrg AC_PATH_PROG([LINT], [$lint_name]) 195349dc963fSmrg if test "x$LINT" = "x"; then 195449dc963fSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 195549dc963fSmrg fi 195649dc963fSmrgelif test "x$use_lint" = x"no" ; then 195749dc963fSmrg if test "x$LINT" != "x"; then 195849dc963fSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 195949dc963fSmrg fi 196052b01e16Smrgelse 196149dc963fSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 196252b01e16Smrgfi 196349dc963fSmrg 196449dc963fSmrg# User supplied flags override default flags 196549dc963fSmrgif test "x$LINT_FLAGS" != "x"; then 196649dc963fSmrg lint_options=$LINT_FLAGS 196752b01e16Smrgfi 19684b0ead49Smrg 196949dc963fSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 197049dc963fSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 19714b0ead49Smrg 197252b01e16Smrg]) # XORG_WITH_LINT 19734b0ead49Smrg 197452b01e16Smrg# XORG_LINT_LIBRARY(LIBNAME) 197552b01e16Smrg# -------------------------- 197652b01e16Smrg# Minimum version: 1.1.0 197752b01e16Smrg# 197852b01e16Smrg# Sets up flags for building lint libraries for checking programs that call 197952b01e16Smrg# functions in the library. 198052b01e16Smrg# 198149dc963fSmrg# Interface to module: 198249dc963fSmrg# LINTLIB - Automake variable with the name of lint library file to make 198349dc963fSmrg# MAKE_LINT_LIB - Automake conditional 198449dc963fSmrg# 198549dc963fSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 198649dc963fSmrg# - 'no' user instructs the module not to create a lint library (default) 19874b0ead49Smrg 198852b01e16SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 198952b01e16SmrgAC_REQUIRE([XORG_WITH_LINT]) 199052b01e16SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 199152b01e16Smrg [Create lint library (default: disabled)])], 199252b01e16Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 199349dc963fSmrg 199449dc963fSmrgif test "x$make_lint_lib" = x"yes" ; then 199549dc963fSmrg LINTLIB=llib-l$1.ln 199649dc963fSmrg if test "x$LINT" = "x"; then 199749dc963fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 199849dc963fSmrg fi 199949dc963fSmrgelif test "x$make_lint_lib" != x"no" ; then 200049dc963fSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 200152b01e16Smrgfi 200249dc963fSmrg 200352b01e16SmrgAC_SUBST(LINTLIB) 200452b01e16SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 20054b0ead49Smrg 200652b01e16Smrg]) # XORG_LINT_LIBRARY 20074b0ead49Smrg 200852b01e16Smrg# XORG_CWARNFLAGS 200952b01e16Smrg# --------------- 201052b01e16Smrg# Minimum version: 1.2.0 201152b01e16Smrg# 201252b01e16Smrg# Defines CWARNFLAGS to enable C compiler warnings. 201352b01e16Smrg# 201452b01e16SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 201549dc963fSmrgAC_REQUIRE([AC_PROG_CC_C99]) 201652b01e16Smrgif test "x$GCC" = xyes ; then 201752b01e16Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 201852b01e16Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 201949dc963fSmrg-Wbad-function-cast -Wformat=2" 202052b01e16Smrg case `$CC -dumpversion` in 202152b01e16Smrg 3.4.* | 4.*) 202252b01e16Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 202352b01e16Smrg ;; 202452b01e16Smrg esac 202552b01e16Smrgelse 202652b01e16Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 202752b01e16Smrg if test "x$SUNCC" = "xyes"; then 202852b01e16Smrg CWARNFLAGS="-v" 202952b01e16Smrg fi 203052b01e16Smrgfi 203152b01e16SmrgAC_SUBST(CWARNFLAGS) 203252b01e16Smrg]) # XORG_CWARNFLAGS 20334b0ead49Smrg 203452b01e16Smrg# XORG_STRICT_OPTION 203552b01e16Smrg# ----------------------- 203652b01e16Smrg# Minimum version: 1.3.0 203752b01e16Smrg# 203852b01e16Smrg# Add configure option to enable strict compilation 203952b01e16SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 204049dc963fSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 204152b01e16SmrgAC_REQUIRE([AC_PROG_CC_C99]) 204252b01e16SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 204352b01e16Smrg 204452b01e16SmrgAC_ARG_ENABLE(strict-compilation, 204552b01e16Smrg AS_HELP_STRING([--enable-strict-compilation], 204652b01e16Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 204752b01e16Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 204852b01e16Smrgif test "x$STRICT_COMPILE" = "xyes"; then 204952b01e16Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 205052b01e16Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 205152b01e16Smrg if test "x$GCC" = xyes ; then 205252b01e16Smrg STRICT_CFLAGS="-pedantic -Werror" 205352b01e16Smrg elif test "x$SUNCC" = "xyes"; then 205452b01e16Smrg STRICT_CFLAGS="-errwarn" 205552b01e16Smrg elif test "x$INTELCC" = "xyes"; then 205652b01e16Smrg STRICT_CFLAGS="-Werror" 205752b01e16Smrg fi 205852b01e16Smrgfi 205952b01e16SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 206052b01e16SmrgAC_SUBST([CWARNFLAGS]) 206152b01e16Smrg]) # XORG_STRICT_OPTION 20624b0ead49Smrg 206352b01e16Smrg# XORG_DEFAULT_OPTIONS 206452b01e16Smrg# -------------------- 206552b01e16Smrg# Minimum version: 1.3.0 206652b01e16Smrg# 206752b01e16Smrg# Defines default options for X.Org modules. 206852b01e16Smrg# 206952b01e16SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 207049dc963fSmrgAC_REQUIRE([AC_PROG_INSTALL]) 207152b01e16SmrgXORG_CWARNFLAGS 207252b01e16SmrgXORG_STRICT_OPTION 207352b01e16SmrgXORG_RELEASE_VERSION 207452b01e16SmrgXORG_CHANGELOG 207549dc963fSmrgXORG_INSTALL 207652b01e16SmrgXORG_MANPAGE_SECTIONS 207749dc963fSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 207849dc963fSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 207952b01e16Smrg]) # XORG_DEFAULT_OPTIONS 208049dc963fSmrg 208149dc963fSmrg# XORG_INSTALL() 208249dc963fSmrg# ---------------- 208349dc963fSmrg# Minimum version: 1.4.0 208449dc963fSmrg# 208549dc963fSmrg# Defines the variable INSTALL_CMD as the command to copy 208649dc963fSmrg# INSTALL from $prefix/share/util-macros. 208749dc963fSmrg# 208849dc963fSmrgAC_DEFUN([XORG_INSTALL], [ 208949dc963fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 209049dc963fSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 209149dc963fSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 209249dc963fSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 209349dc963fSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 209449dc963fSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 209549dc963fSmrgAC_SUBST([INSTALL_CMD]) 209649dc963fSmrg]) # XORG_INSTALL 209752b01e16Smrgdnl Copyright 2005 Red Hat, Inc 209852b01e16Smrgdnl 209952b01e16Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 210052b01e16Smrgdnl documentation for any purpose is hereby granted without fee, provided that 210152b01e16Smrgdnl the above copyright notice appear in all copies and that both that 210252b01e16Smrgdnl copyright notice and this permission notice appear in supporting 210352b01e16Smrgdnl documentation. 210452b01e16Smrgdnl 210552b01e16Smrgdnl The above copyright notice and this permission notice shall be included 210652b01e16Smrgdnl in all copies or substantial portions of the Software. 210752b01e16Smrgdnl 210852b01e16Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 210952b01e16Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 211052b01e16Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 211152b01e16Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 211252b01e16Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 211352b01e16Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 211452b01e16Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 211552b01e16Smrgdnl 211652b01e16Smrgdnl Except as contained in this notice, the name of the copyright holders shall 211752b01e16Smrgdnl not be used in advertising or otherwise to promote the sale, use or 211852b01e16Smrgdnl other dealings in this Software without prior written authorization 211952b01e16Smrgdnl from the copyright holders. 212052b01e16Smrgdnl 21214b0ead49Smrg 212252b01e16Smrg# XORG_RELEASE_VERSION 212352b01e16Smrg# -------------------- 212449dc963fSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 212552b01e16Smrg 212652b01e16SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 212752b01e16Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 212852b01e16Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 212952b01e16Smrg [Major version of this package]) 213052b01e16Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 213152b01e16Smrg if test "x$PVM" = "x"; then 213252b01e16Smrg PVM="0" 213352b01e16Smrg fi 213452b01e16Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 213552b01e16Smrg [$PVM], 213652b01e16Smrg [Minor version of this package]) 213752b01e16Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 213852b01e16Smrg if test "x$PVP" = "x"; then 213952b01e16Smrg PVP="0" 214052b01e16Smrg fi 214152b01e16Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 214252b01e16Smrg [$PVP], 214352b01e16Smrg [Patch version of this package]) 214452b01e16Smrg]) 21454b0ead49Smrg 214652b01e16Smrg# XORG_CHANGELOG() 214752b01e16Smrg# ---------------- 214852b01e16Smrg# Minimum version: 1.2.0 214952b01e16Smrg# 215052b01e16Smrg# Defines the variable CHANGELOG_CMD as the command to generate 215152b01e16Smrg# ChangeLog from git. 215252b01e16Smrg# 215352b01e16Smrg# 215452b01e16SmrgAC_DEFUN([XORG_CHANGELOG], [ 215549dc963fSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 215649dc963fSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 215749dc963fSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 215852b01e16Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 215952b01e16SmrgAC_SUBST([CHANGELOG_CMD]) 216052b01e16Smrg]) # XORG_CHANGELOG 21614b0ead49Smrg 216249dc963fSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 216349dc963fSmrg# 216449dc963fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 216549dc963fSmrg# 216649dc963fSmrg# This program is free software; you can redistribute it and/or modify 216749dc963fSmrg# it under the terms of the GNU General Public License as published by 216849dc963fSmrg# the Free Software Foundation; either version 2 of the License, or 216949dc963fSmrg# (at your option) any later version. 217049dc963fSmrg# 217149dc963fSmrg# This program is distributed in the hope that it will be useful, but 217249dc963fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 217349dc963fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 217449dc963fSmrg# General Public License for more details. 217549dc963fSmrg# 217649dc963fSmrg# You should have received a copy of the GNU General Public License 217749dc963fSmrg# along with this program; if not, write to the Free Software 217849dc963fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 217949dc963fSmrg# 218049dc963fSmrg# As a special exception to the GNU General Public License, if you 218149dc963fSmrg# distribute this file as part of a program that contains a 218249dc963fSmrg# configuration script generated by Autoconf, you may include it under 218349dc963fSmrg# the same distribution terms that you use for the rest of that program. 21844b0ead49Smrg 218549dc963fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 218649dc963fSmrg# ---------------------------------- 218749dc963fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 218849dc963fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 218949dc963fSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 219049dc963fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 219149dc963fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 219249dc963fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 219349dc963fSmrgfi 219449dc963fSmrgif test -n "$PKG_CONFIG"; then 219549dc963fSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 219649dc963fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 219749dc963fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 219849dc963fSmrg AC_MSG_RESULT([yes]) 219949dc963fSmrg else 220049dc963fSmrg AC_MSG_RESULT([no]) 220149dc963fSmrg PKG_CONFIG="" 220249dc963fSmrg fi 220349dc963fSmrg 220449dc963fSmrgfi[]dnl 220549dc963fSmrg])# PKG_PROG_PKG_CONFIG 22064b0ead49Smrg 220749dc963fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 220849dc963fSmrg# 220949dc963fSmrg# Check to see whether a particular set of modules exists. Similar 221049dc963fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 221149dc963fSmrg# 221249dc963fSmrg# 221349dc963fSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 221449dc963fSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 221549dc963fSmrg# PKG_CHECK_EXISTS manually 221649dc963fSmrg# -------------------------------------------------------------- 221749dc963fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 221849dc963fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 221949dc963fSmrgif test -n "$PKG_CONFIG" && \ 222049dc963fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 222149dc963fSmrg m4_ifval([$2], [$2], [:]) 222249dc963fSmrgm4_ifvaln([$3], [else 222349dc963fSmrg $3])dnl 222449dc963fSmrgfi]) 22254b0ead49Smrg 22264b0ead49Smrg 222749dc963fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 222849dc963fSmrg# --------------------------------------------- 222949dc963fSmrgm4_define([_PKG_CONFIG], 223049dc963fSmrg[if test -n "$$1"; then 223149dc963fSmrg pkg_cv_[]$1="$$1" 223249dc963fSmrg elif test -n "$PKG_CONFIG"; then 223349dc963fSmrg PKG_CHECK_EXISTS([$3], 223449dc963fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 223549dc963fSmrg [pkg_failed=yes]) 223649dc963fSmrg else 223749dc963fSmrg pkg_failed=untried 223849dc963fSmrgfi[]dnl 223949dc963fSmrg])# _PKG_CONFIG 22404b0ead49Smrg 224149dc963fSmrg# _PKG_SHORT_ERRORS_SUPPORTED 224249dc963fSmrg# ----------------------------- 224349dc963fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 224449dc963fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 224549dc963fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 224649dc963fSmrg _pkg_short_errors_supported=yes 224749dc963fSmrgelse 224849dc963fSmrg _pkg_short_errors_supported=no 224949dc963fSmrgfi[]dnl 225049dc963fSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 22514b0ead49Smrg 22524b0ead49Smrg 225349dc963fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 225449dc963fSmrg# [ACTION-IF-NOT-FOUND]) 225549dc963fSmrg# 225649dc963fSmrg# 225749dc963fSmrg# Note that if there is a possibility the first call to 225849dc963fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 225949dc963fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 226049dc963fSmrg# 226149dc963fSmrg# 226249dc963fSmrg# -------------------------------------------------------------- 226349dc963fSmrgAC_DEFUN([PKG_CHECK_MODULES], 226449dc963fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 226549dc963fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 226649dc963fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 22674b0ead49Smrg 226849dc963fSmrgpkg_failed=no 226949dc963fSmrgAC_MSG_CHECKING([for $1]) 22704b0ead49Smrg 227149dc963fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 227249dc963fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 22734b0ead49Smrg 227449dc963fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 227549dc963fSmrgand $1[]_LIBS to avoid the need to call pkg-config. 227649dc963fSmrgSee the pkg-config man page for more details.]) 227749dc963fSmrg 227849dc963fSmrgif test $pkg_failed = yes; then 227949dc963fSmrg _PKG_SHORT_ERRORS_SUPPORTED 228049dc963fSmrg if test $_pkg_short_errors_supported = yes; then 228149dc963fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 228249dc963fSmrg else 228349dc963fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 228449dc963fSmrg fi 228549dc963fSmrg # Put the nasty error message in config.log where it belongs 228649dc963fSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 228749dc963fSmrg 228849dc963fSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 228949dc963fSmrg[Package requirements ($2) were not met: 229049dc963fSmrg 229149dc963fSmrg$$1_PKG_ERRORS 229249dc963fSmrg 229349dc963fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 229449dc963fSmrginstalled software in a non-standard prefix. 229549dc963fSmrg 229649dc963fSmrg_PKG_TEXT 229749dc963fSmrg])], 229849dc963fSmrg [AC_MSG_RESULT([no]) 229949dc963fSmrg $4]) 230049dc963fSmrgelif test $pkg_failed = untried; then 230149dc963fSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 230249dc963fSmrg[The pkg-config script could not be found or is too old. Make sure it 230349dc963fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 230449dc963fSmrgpath to pkg-config. 230549dc963fSmrg 230649dc963fSmrg_PKG_TEXT 230749dc963fSmrg 230849dc963fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 230949dc963fSmrg [$4]) 231049dc963fSmrgelse 231149dc963fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 231249dc963fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 231349dc963fSmrg AC_MSG_RESULT([yes]) 231449dc963fSmrg ifelse([$3], , :, [$3]) 231549dc963fSmrgfi[]dnl 231649dc963fSmrg])# PKG_CHECK_MODULES 231749dc963fSmrg 231849dc963fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 231949dc963fSmrg# 232049dc963fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 232149dc963fSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 232249dc963fSmrg# Written by Gordon Matzigkeit, 1996 232349dc963fSmrg# 232449dc963fSmrg# This file is free software; the Free Software Foundation gives 232549dc963fSmrg# unlimited permission to copy and/or distribute it, with or without 232649dc963fSmrg# modifications, as long as this notice is preserved. 232749dc963fSmrg 232849dc963fSmrgm4_define([_LT_COPYING], [dnl 232949dc963fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 233049dc963fSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 233149dc963fSmrg# Written by Gordon Matzigkeit, 1996 233249dc963fSmrg# 233349dc963fSmrg# This file is part of GNU Libtool. 233449dc963fSmrg# 233549dc963fSmrg# GNU Libtool is free software; you can redistribute it and/or 233649dc963fSmrg# modify it under the terms of the GNU General Public License as 233749dc963fSmrg# published by the Free Software Foundation; either version 2 of 233849dc963fSmrg# the License, or (at your option) any later version. 233949dc963fSmrg# 234049dc963fSmrg# As a special exception to the GNU General Public License, 234149dc963fSmrg# if you distribute this file as part of a program or library that 234249dc963fSmrg# is built using GNU Libtool, you may include this file under the 234349dc963fSmrg# same distribution terms that you use for the rest of that program. 234449dc963fSmrg# 234549dc963fSmrg# GNU Libtool is distributed in the hope that it will be useful, 234649dc963fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 234749dc963fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 234849dc963fSmrg# GNU General Public License for more details. 234949dc963fSmrg# 235049dc963fSmrg# You should have received a copy of the GNU General Public License 235149dc963fSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 235249dc963fSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 235349dc963fSmrg# obtained by writing to the Free Software Foundation, Inc., 235449dc963fSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 235549dc963fSmrg]) 235649dc963fSmrg 235749dc963fSmrg# serial 56 LT_INIT 235849dc963fSmrg 235949dc963fSmrg 236049dc963fSmrg# LT_PREREQ(VERSION) 236149dc963fSmrg# ------------------ 236249dc963fSmrg# Complain and exit if this libtool version is less that VERSION. 236349dc963fSmrgm4_defun([LT_PREREQ], 236449dc963fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 236549dc963fSmrg [m4_default([$3], 236649dc963fSmrg [m4_fatal([Libtool version $1 or higher is required], 236749dc963fSmrg 63)])], 236849dc963fSmrg [$2])]) 236949dc963fSmrg 237049dc963fSmrg 237149dc963fSmrg# _LT_CHECK_BUILDDIR 237249dc963fSmrg# ------------------ 237349dc963fSmrg# Complain if the absolute build directory name contains unusual characters 237449dc963fSmrgm4_defun([_LT_CHECK_BUILDDIR], 237549dc963fSmrg[case `pwd` in 237649dc963fSmrg *\ * | *\ *) 237749dc963fSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 237849dc963fSmrgesac 237949dc963fSmrg]) 238049dc963fSmrg 238149dc963fSmrg 238249dc963fSmrg# LT_INIT([OPTIONS]) 238349dc963fSmrg# ------------------ 238449dc963fSmrgAC_DEFUN([LT_INIT], 238549dc963fSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 238649dc963fSmrgAC_BEFORE([$0], [LT_LANG])dnl 238749dc963fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 238849dc963fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 238949dc963fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 239049dc963fSmrg 239149dc963fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 239249dc963fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 239349dc963fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 239449dc963fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 239549dc963fSmrgdnl unless we require an AC_DEFUNed macro: 239649dc963fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 239749dc963fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 239849dc963fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 239949dc963fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 240049dc963fSmrgm4_require([_LT_PROG_LTMAIN])dnl 240149dc963fSmrg 240249dc963fSmrgdnl Parse OPTIONS 240349dc963fSmrg_LT_SET_OPTIONS([$0], [$1]) 240449dc963fSmrg 240549dc963fSmrg# This can be used to rebuild libtool when needed 240649dc963fSmrgLIBTOOL_DEPS="$ltmain" 240749dc963fSmrg 240849dc963fSmrg# Always use our own libtool. 240949dc963fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 241049dc963fSmrgAC_SUBST(LIBTOOL)dnl 241149dc963fSmrg 241249dc963fSmrg_LT_SETUP 241349dc963fSmrg 241449dc963fSmrg# Only expand once: 241549dc963fSmrgm4_define([LT_INIT]) 241649dc963fSmrg])# LT_INIT 241749dc963fSmrg 241849dc963fSmrg# Old names: 241949dc963fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 242049dc963fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 242149dc963fSmrgdnl aclocal-1.4 backwards compatibility: 242249dc963fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 242349dc963fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 242449dc963fSmrg 242549dc963fSmrg 242649dc963fSmrg# _LT_CC_BASENAME(CC) 242749dc963fSmrg# ------------------- 242849dc963fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 242949dc963fSmrgm4_defun([_LT_CC_BASENAME], 243049dc963fSmrg[for cc_temp in $1""; do 243149dc963fSmrg case $cc_temp in 243249dc963fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 243349dc963fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 243449dc963fSmrg \-*) ;; 243549dc963fSmrg *) break;; 243649dc963fSmrg esac 243749dc963fSmrgdone 243849dc963fSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 243949dc963fSmrg]) 244049dc963fSmrg 244149dc963fSmrg 244249dc963fSmrg# _LT_FILEUTILS_DEFAULTS 244349dc963fSmrg# ---------------------- 244449dc963fSmrg# It is okay to use these file commands and assume they have been set 244549dc963fSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 244649dc963fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 244749dc963fSmrg[: ${CP="cp -f"} 244849dc963fSmrg: ${MV="mv -f"} 244949dc963fSmrg: ${RM="rm -f"} 245049dc963fSmrg])# _LT_FILEUTILS_DEFAULTS 245149dc963fSmrg 245249dc963fSmrg 245349dc963fSmrg# _LT_SETUP 245449dc963fSmrg# --------- 245549dc963fSmrgm4_defun([_LT_SETUP], 245649dc963fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 245752b01e16SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 245849dc963fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 245949dc963fSmrg_LT_DECL([], [host], [0])dnl 246049dc963fSmrg_LT_DECL([], [host_os], [0])dnl 246149dc963fSmrgdnl 246249dc963fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 246349dc963fSmrg_LT_DECL([], [build], [0])dnl 246449dc963fSmrg_LT_DECL([], [build_os], [0])dnl 246549dc963fSmrgdnl 246652b01e16SmrgAC_REQUIRE([AC_PROG_CC])dnl 246749dc963fSmrgAC_REQUIRE([LT_PATH_LD])dnl 246849dc963fSmrgAC_REQUIRE([LT_PATH_NM])dnl 246949dc963fSmrgdnl 247052b01e16SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 247149dc963fSmrgtest -z "$LN_S" && LN_S="ln -s" 247249dc963fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 247349dc963fSmrgdnl 247449dc963fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 247549dc963fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 247649dc963fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 247752b01e16Smrgdnl 247849dc963fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 247949dc963fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 248049dc963fSmrgm4_require([_LT_CMD_RELOAD])dnl 248149dc963fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 248249dc963fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 248349dc963fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 248449dc963fSmrg 248549dc963fSmrg_LT_CONFIG_LIBTOOL_INIT([ 248649dc963fSmrg# See if we are running on zsh, and set the options which allow our 248749dc963fSmrg# commands through without removal of \ escapes INIT. 248849dc963fSmrgif test -n "\${ZSH_VERSION+set}" ; then 248949dc963fSmrg setopt NO_GLOB_SUBST 249049dc963fSmrgfi 249149dc963fSmrg]) 249249dc963fSmrgif test -n "${ZSH_VERSION+set}" ; then 249349dc963fSmrg setopt NO_GLOB_SUBST 249449dc963fSmrgfi 249549dc963fSmrg 249649dc963fSmrg_LT_CHECK_OBJDIR 24974b0ead49Smrg 249849dc963fSmrgm4_require([_LT_TAG_COMPILER])dnl 249949dc963fSmrg_LT_PROG_ECHO_BACKSLASH 25004b0ead49Smrg 250152b01e16Smrgcase $host_os in 250252b01e16Smrgaix3*) 250352b01e16Smrg # AIX sometimes has problems with the GCC collect2 program. For some 250452b01e16Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 250552b01e16Smrg # vanish in a puff of smoke. 250652b01e16Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 250752b01e16Smrg COLLECT_NAMES= 250852b01e16Smrg export COLLECT_NAMES 250952b01e16Smrg fi 251052b01e16Smrg ;; 251152b01e16Smrgesac 25124b0ead49Smrg 251352b01e16Smrg# Sed substitution that helps us do robust quoting. It backslashifies 251452b01e16Smrg# metacharacters that are still active within double-quoted strings. 251549dc963fSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 25164b0ead49Smrg 251752b01e16Smrg# Same as above, but do not quote variable references. 251849dc963fSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 25194b0ead49Smrg 252052b01e16Smrg# Sed substitution to delay expansion of an escaped shell variable in a 252152b01e16Smrg# double_quote_subst'ed string. 252252b01e16Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 25234b0ead49Smrg 252449dc963fSmrg# Sed substitution to delay expansion of an escaped single quote. 252549dc963fSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 252649dc963fSmrg 252752b01e16Smrg# Sed substitution to avoid accidental globbing in evaled expressions 252852b01e16Smrgno_glob_subst='s/\*/\\\*/g' 25294b0ead49Smrg 253052b01e16Smrg# Global variables: 253149dc963fSmrgofile=libtool 253252b01e16Smrgcan_build_shared=yes 25334b0ead49Smrg 253452b01e16Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 253552b01e16Smrg# which needs '.lib'). 253652b01e16Smrglibext=a 25374b0ead49Smrg 253849dc963fSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 25394b0ead49Smrg 254052b01e16Smrgold_CC="$CC" 254152b01e16Smrgold_CFLAGS="$CFLAGS" 25424b0ead49Smrg 254352b01e16Smrg# Set sane defaults for various variables 254452b01e16Smrgtest -z "$CC" && CC=cc 254552b01e16Smrgtest -z "$LTCC" && LTCC=$CC 254652b01e16Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 254752b01e16Smrgtest -z "$LD" && LD=ld 254852b01e16Smrgtest -z "$ac_objext" && ac_objext=o 25494b0ead49Smrg 255052b01e16Smrg_LT_CC_BASENAME([$compiler]) 25514b0ead49Smrg 255252b01e16Smrg# Only perform the check for file, if the check method requires it 255349dc963fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 255452b01e16Smrgcase $deplibs_check_method in 255552b01e16Smrgfile_magic*) 255652b01e16Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 255749dc963fSmrg _LT_PATH_MAGIC 255852b01e16Smrg fi 255952b01e16Smrg ;; 256052b01e16Smrgesac 25614b0ead49Smrg 256249dc963fSmrg# Use C for the default configuration in the libtool script 256349dc963fSmrgLT_SUPPORTED_TAG([CC]) 256449dc963fSmrg_LT_LANG_C_CONFIG 256549dc963fSmrg_LT_LANG_DEFAULT_CONFIG 256649dc963fSmrg_LT_CONFIG_COMMANDS 256749dc963fSmrg])# _LT_SETUP 25684b0ead49Smrg 25694b0ead49Smrg 257049dc963fSmrg# _LT_PROG_LTMAIN 257149dc963fSmrg# --------------- 257249dc963fSmrg# Note that this code is called both from `configure', and `config.status' 257349dc963fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 257449dc963fSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 257549dc963fSmrg# so we pass a copy along to make sure it has a sensible value anyway. 257649dc963fSmrgm4_defun([_LT_PROG_LTMAIN], 257749dc963fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 257849dc963fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 257949dc963fSmrgltmain="$ac_aux_dir/ltmain.sh" 258049dc963fSmrg])# _LT_PROG_LTMAIN 25814b0ead49Smrg 25824b0ead49Smrg 25834b0ead49Smrg 258449dc963fSmrg# So that we can recreate a full libtool script including additional 258549dc963fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 258649dc963fSmrg# in macros and then make a single call at the end using the `libtool' 258749dc963fSmrg# label. 25884b0ead49Smrg 25894b0ead49Smrg 259049dc963fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 259149dc963fSmrg# ---------------------------------------- 259249dc963fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 259349dc963fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 259449dc963fSmrg[m4_ifval([$1], 259549dc963fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 259649dc963fSmrg [$1 259749dc963fSmrg])])]) 25984b0ead49Smrg 259949dc963fSmrg# Initialize. 260049dc963fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 26014b0ead49Smrg 26024b0ead49Smrg 260349dc963fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 260449dc963fSmrg# ------------------------------ 260549dc963fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 260649dc963fSmrgm4_define([_LT_CONFIG_LIBTOOL], 260749dc963fSmrg[m4_ifval([$1], 260849dc963fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 260949dc963fSmrg [$1 261049dc963fSmrg])])]) 261149dc963fSmrg 261249dc963fSmrg# Initialize. 261349dc963fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 261449dc963fSmrg 261549dc963fSmrg 261649dc963fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 261749dc963fSmrg# ----------------------------------------------------- 261849dc963fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 261949dc963fSmrg[_LT_CONFIG_LIBTOOL([$1]) 262049dc963fSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 262149dc963fSmrg]) 26224b0ead49Smrg 262349dc963fSmrg 262449dc963fSmrg# _LT_FORMAT_COMMENT([COMMENT]) 262549dc963fSmrg# ----------------------------- 262649dc963fSmrg# Add leading comment marks to the start of each line, and a trailing 262749dc963fSmrg# full-stop to the whole comment if one is not present already. 262849dc963fSmrgm4_define([_LT_FORMAT_COMMENT], 262949dc963fSmrg[m4_ifval([$1], [ 263049dc963fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 263149dc963fSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 263249dc963fSmrg)]) 263349dc963fSmrg 263449dc963fSmrg 263549dc963fSmrg 263649dc963fSmrg 263749dc963fSmrg 263849dc963fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 263949dc963fSmrg# ------------------------------------------------------------------- 264049dc963fSmrg# CONFIGNAME is the name given to the value in the libtool script. 264149dc963fSmrg# VARNAME is the (base) name used in the configure script. 264249dc963fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 264349dc963fSmrg# VARNAME. Any other value will be used directly. 264449dc963fSmrgm4_define([_LT_DECL], 264549dc963fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 264649dc963fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 264749dc963fSmrg [m4_ifval([$1], [$1], [$2])]) 264849dc963fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 264949dc963fSmrg m4_ifval([$4], 265049dc963fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 265149dc963fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 265249dc963fSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 265352b01e16Smrg]) 26544b0ead49Smrg 26554b0ead49Smrg 265649dc963fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 265749dc963fSmrg# -------------------------------------------------------- 265849dc963fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 26594b0ead49Smrg 26604b0ead49Smrg 266149dc963fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 266249dc963fSmrg# ------------------------------------------------ 266349dc963fSmrgm4_define([lt_decl_tag_varnames], 266449dc963fSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 26654b0ead49Smrg 266652b01e16Smrg 266749dc963fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 266849dc963fSmrg# --------------------------------------------------------- 266949dc963fSmrgm4_define([_lt_decl_filter], 267049dc963fSmrg[m4_case([$#], 267149dc963fSmrg [0], [m4_fatal([$0: too few arguments: $#])], 267249dc963fSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 267349dc963fSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 267449dc963fSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 267549dc963fSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 267652b01e16Smrg]) 26774b0ead49Smrg 26784b0ead49Smrg 267949dc963fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 268049dc963fSmrg# -------------------------------------------------- 268149dc963fSmrgm4_define([lt_decl_quote_varnames], 268249dc963fSmrg[_lt_decl_filter([value], [1], $@)]) 268349dc963fSmrg 268449dc963fSmrg 268549dc963fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 268649dc963fSmrg# --------------------------------------------------- 268749dc963fSmrgm4_define([lt_decl_dquote_varnames], 268849dc963fSmrg[_lt_decl_filter([value], [2], $@)]) 268949dc963fSmrg 269049dc963fSmrg 269149dc963fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 269249dc963fSmrg# --------------------------------------------------- 269349dc963fSmrgm4_define([lt_decl_varnames_tagged], 269449dc963fSmrg[m4_assert([$# <= 2])dnl 269549dc963fSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 269649dc963fSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 269749dc963fSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 269849dc963fSmrgm4_define([_lt_decl_varnames_tagged], 269949dc963fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 270049dc963fSmrg 270149dc963fSmrg 270249dc963fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 270349dc963fSmrg# ------------------------------------------------ 270449dc963fSmrgm4_define([lt_decl_all_varnames], 270549dc963fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 270649dc963fSmrg m4_if([$2], [], 270749dc963fSmrg m4_quote(lt_decl_varnames), 270849dc963fSmrg m4_quote(m4_shift($@))))[]dnl 270949dc963fSmrg]) 271049dc963fSmrgm4_define([_lt_decl_all_varnames], 271149dc963fSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 271249dc963fSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 271349dc963fSmrg]) 271449dc963fSmrg 271549dc963fSmrg 271649dc963fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 271749dc963fSmrg# ------------------------------------ 271849dc963fSmrg# Quote a variable value, and forward it to `config.status' so that its 271949dc963fSmrg# declaration there will have the same value as in `configure'. VARNAME 272049dc963fSmrg# must have a single quote delimited value for this to work. 272149dc963fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 272249dc963fSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 272349dc963fSmrg 272449dc963fSmrg 272549dc963fSmrg# _LT_CONFIG_STATUS_DECLARATIONS 272649dc963fSmrg# ------------------------------ 272749dc963fSmrg# We delimit libtool config variables with single quotes, so when 272849dc963fSmrg# we write them to config.status, we have to be sure to quote all 272949dc963fSmrg# embedded single quotes properly. In configure, this macro expands 273049dc963fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 273149dc963fSmrg# 273249dc963fSmrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 273349dc963fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 273449dc963fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 273549dc963fSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 273649dc963fSmrg 273749dc963fSmrg 273849dc963fSmrg# _LT_LIBTOOL_TAGS 273949dc963fSmrg# ---------------- 274049dc963fSmrg# Output comment and list of tags supported by the script 274149dc963fSmrgm4_defun([_LT_LIBTOOL_TAGS], 274249dc963fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 274349dc963fSmrgavailable_tags="_LT_TAGS"dnl 274449dc963fSmrg]) 274549dc963fSmrg 274649dc963fSmrg 274749dc963fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 274849dc963fSmrg# ----------------------------------- 274949dc963fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 275049dc963fSmrg# expand to a commented shell variable setting: 275149dc963fSmrg# 275249dc963fSmrg# # Some comment about what VAR is for. 275349dc963fSmrg# visible_name=$lt_internal_name 275449dc963fSmrgm4_define([_LT_LIBTOOL_DECLARE], 275549dc963fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 275649dc963fSmrg [description])))[]dnl 275749dc963fSmrgm4_pushdef([_libtool_name], 275849dc963fSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 275949dc963fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 276049dc963fSmrg [0], [_libtool_name=[$]$1], 276149dc963fSmrg [1], [_libtool_name=$lt_[]$1], 276249dc963fSmrg [2], [_libtool_name=$lt_[]$1], 276349dc963fSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 276449dc963fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 276549dc963fSmrg]) 276649dc963fSmrg 276749dc963fSmrg 276849dc963fSmrg# _LT_LIBTOOL_CONFIG_VARS 276949dc963fSmrg# ----------------------- 277049dc963fSmrg# Produce commented declarations of non-tagged libtool config variables 277149dc963fSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 277249dc963fSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 277349dc963fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 277449dc963fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 277549dc963fSmrg[m4_foreach([_lt_var], 277649dc963fSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 277749dc963fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 277849dc963fSmrg 277949dc963fSmrg 278049dc963fSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 278149dc963fSmrg# ------------------------- 278249dc963fSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 278349dc963fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 278449dc963fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 278549dc963fSmrg 278649dc963fSmrg 278749dc963fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 278849dc963fSmrg# ------------------------------ 278949dc963fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 279049dc963fSmrg 279149dc963fSmrg 279249dc963fSmrg# _LT_CONFIG_COMMANDS 279349dc963fSmrg# ------------------- 279449dc963fSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 279549dc963fSmrg# variables for single and double quote escaping we saved from calls 279649dc963fSmrg# to _LT_DECL, we can put quote escaped variables declarations 279749dc963fSmrg# into `config.status', and then the shell code to quote escape them in 279849dc963fSmrg# for loops in `config.status'. Finally, any additional code accumulated 279949dc963fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 280049dc963fSmrgm4_defun([_LT_CONFIG_COMMANDS], 280149dc963fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 280249dc963fSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 280349dc963fSmrg dnl instead of duplicating it all over again into config.status, 280449dc963fSmrg dnl then we will have config.status run $CONFIG_LT later, so it 280549dc963fSmrg dnl needs to know what name is stored there: 280649dc963fSmrg [AC_CONFIG_COMMANDS([libtool], 280749dc963fSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 280849dc963fSmrg dnl If the libtool generation code is destined for config.status, 280949dc963fSmrg dnl expand the accumulated commands and init code now: 281049dc963fSmrg [AC_CONFIG_COMMANDS([libtool], 281149dc963fSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 281249dc963fSmrg])#_LT_CONFIG_COMMANDS 281349dc963fSmrg 281449dc963fSmrg 281549dc963fSmrg# Initialize. 281649dc963fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 281749dc963fSmrg[ 281849dc963fSmrg 281949dc963fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 282049dc963fSmrg# if CDPATH is set. 282149dc963fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 282249dc963fSmrg 282349dc963fSmrgsed_quote_subst='$sed_quote_subst' 282449dc963fSmrgdouble_quote_subst='$double_quote_subst' 282549dc963fSmrgdelay_variable_subst='$delay_variable_subst' 282649dc963fSmrg_LT_CONFIG_STATUS_DECLARATIONS 282749dc963fSmrgLTCC='$LTCC' 282849dc963fSmrgLTCFLAGS='$LTCFLAGS' 282949dc963fSmrgcompiler='$compiler_DEFAULT' 283049dc963fSmrg 283149dc963fSmrg# Quote evaled strings. 283249dc963fSmrgfor var in lt_decl_all_varnames([[ \ 283349dc963fSmrg]], lt_decl_quote_varnames); do 283449dc963fSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 283549dc963fSmrg *[[\\\\\\\`\\"\\\$]]*) 283649dc963fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 283749dc963fSmrg ;; 283849dc963fSmrg *) 283949dc963fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 284049dc963fSmrg ;; 284149dc963fSmrg esac 284249dc963fSmrgdone 284349dc963fSmrg 284449dc963fSmrg# Double-quote double-evaled strings. 284549dc963fSmrgfor var in lt_decl_all_varnames([[ \ 284649dc963fSmrg]], lt_decl_dquote_varnames); do 284749dc963fSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 284849dc963fSmrg *[[\\\\\\\`\\"\\\$]]*) 284949dc963fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 285049dc963fSmrg ;; 285149dc963fSmrg *) 285249dc963fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 285349dc963fSmrg ;; 285449dc963fSmrg esac 285549dc963fSmrgdone 285649dc963fSmrg 285749dc963fSmrg# Fix-up fallback echo if it was mangled by the above quoting rules. 285849dc963fSmrgcase \$lt_ECHO in 285949dc963fSmrg*'\\\[$]0 --fallback-echo"')dnl " 286049dc963fSmrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 286149dc963fSmrg ;; 286249dc963fSmrgesac 286349dc963fSmrg 286449dc963fSmrg_LT_OUTPUT_LIBTOOL_INIT 286549dc963fSmrg]) 286649dc963fSmrg 286749dc963fSmrg 286849dc963fSmrg# LT_OUTPUT 286949dc963fSmrg# --------- 287049dc963fSmrg# This macro allows early generation of the libtool script (before 287149dc963fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 287249dc963fSmrg# tests. 287349dc963fSmrgAC_DEFUN([LT_OUTPUT], 287449dc963fSmrg[: ${CONFIG_LT=./config.lt} 287549dc963fSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 287649dc963fSmrgcat >"$CONFIG_LT" <<_LTEOF 287749dc963fSmrg#! $SHELL 287849dc963fSmrg# Generated by $as_me. 287949dc963fSmrg# Run this file to recreate a libtool stub with the current configuration. 288049dc963fSmrg 288149dc963fSmrglt_cl_silent=false 288249dc963fSmrgSHELL=\${CONFIG_SHELL-$SHELL} 288349dc963fSmrg_LTEOF 288449dc963fSmrg 288549dc963fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 288649dc963fSmrgAS_SHELL_SANITIZE 288749dc963fSmrg_AS_PREPARE 288849dc963fSmrg 288949dc963fSmrgexec AS_MESSAGE_FD>&1 289049dc963fSmrgexec AS_MESSAGE_LOG_FD>>config.log 289149dc963fSmrg{ 289249dc963fSmrg echo 289349dc963fSmrg AS_BOX([Running $as_me.]) 289449dc963fSmrg} >&AS_MESSAGE_LOG_FD 289549dc963fSmrg 289649dc963fSmrglt_cl_help="\ 289749dc963fSmrg\`$as_me' creates a local libtool stub from the current configuration, 289849dc963fSmrgfor use in further configure time tests before the real libtool is 289949dc963fSmrggenerated. 290049dc963fSmrg 290149dc963fSmrgUsage: $[0] [[OPTIONS]] 290249dc963fSmrg 290349dc963fSmrg -h, --help print this help, then exit 290449dc963fSmrg -V, --version print version number, then exit 290549dc963fSmrg -q, --quiet do not print progress messages 290649dc963fSmrg -d, --debug don't remove temporary files 290749dc963fSmrg 290849dc963fSmrgReport bugs to <bug-libtool@gnu.org>." 290949dc963fSmrg 291049dc963fSmrglt_cl_version="\ 291149dc963fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 291249dc963fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 291349dc963fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 291449dc963fSmrg 291549dc963fSmrgCopyright (C) 2008 Free Software Foundation, Inc. 291649dc963fSmrgThis config.lt script is free software; the Free Software Foundation 291749dc963fSmrggives unlimited permision to copy, distribute and modify it." 291849dc963fSmrg 291949dc963fSmrgwhile test $[#] != 0 292049dc963fSmrgdo 292149dc963fSmrg case $[1] in 292249dc963fSmrg --version | --v* | -V ) 292349dc963fSmrg echo "$lt_cl_version"; exit 0 ;; 292449dc963fSmrg --help | --h* | -h ) 292549dc963fSmrg echo "$lt_cl_help"; exit 0 ;; 292649dc963fSmrg --debug | --d* | -d ) 292749dc963fSmrg debug=: ;; 292849dc963fSmrg --quiet | --q* | --silent | --s* | -q ) 292949dc963fSmrg lt_cl_silent=: ;; 293049dc963fSmrg 293149dc963fSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 293249dc963fSmrgTry \`$[0] --help' for more information.]) ;; 293349dc963fSmrg 293449dc963fSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 293549dc963fSmrgTry \`$[0] --help' for more information.]) ;; 293649dc963fSmrg esac 293749dc963fSmrg shift 293849dc963fSmrgdone 293949dc963fSmrg 294049dc963fSmrgif $lt_cl_silent; then 294149dc963fSmrg exec AS_MESSAGE_FD>/dev/null 294249dc963fSmrgfi 294349dc963fSmrg_LTEOF 294449dc963fSmrg 294549dc963fSmrgcat >>"$CONFIG_LT" <<_LTEOF 294649dc963fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 294749dc963fSmrg_LTEOF 294849dc963fSmrg 294949dc963fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 295049dc963fSmrgAC_MSG_NOTICE([creating $ofile]) 295149dc963fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 295249dc963fSmrgAS_EXIT(0) 295349dc963fSmrg_LTEOF 295449dc963fSmrgchmod +x "$CONFIG_LT" 295549dc963fSmrg 295649dc963fSmrg# configure is writing to config.log, but config.lt does its own redirection, 295749dc963fSmrg# appending to config.log, which fails on DOS, as config.log is still kept 295849dc963fSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 295949dc963fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 296049dc963fSmrgif test "$no_create" != yes; then 296149dc963fSmrg lt_cl_success=: 296249dc963fSmrg test "$silent" = yes && 296349dc963fSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 296449dc963fSmrg exec AS_MESSAGE_LOG_FD>/dev/null 296549dc963fSmrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 296649dc963fSmrg exec AS_MESSAGE_LOG_FD>>config.log 296749dc963fSmrg $lt_cl_success || AS_EXIT(1) 296849dc963fSmrgfi 296949dc963fSmrg])# LT_OUTPUT 297049dc963fSmrg 297149dc963fSmrg 297249dc963fSmrg# _LT_CONFIG(TAG) 297349dc963fSmrg# --------------- 297449dc963fSmrg# If TAG is the built-in tag, create an initial libtool script with a 297549dc963fSmrg# default configuration from the untagged config vars. Otherwise add code 297649dc963fSmrg# to config.status for appending the configuration named by TAG from the 297749dc963fSmrg# matching tagged config vars. 297849dc963fSmrgm4_defun([_LT_CONFIG], 297949dc963fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 298049dc963fSmrg_LT_CONFIG_SAVE_COMMANDS([ 298149dc963fSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 298249dc963fSmrg m4_if(_LT_TAG, [C], [ 298349dc963fSmrg # See if we are running on zsh, and set the options which allow our 298449dc963fSmrg # commands through without removal of \ escapes. 298549dc963fSmrg if test -n "${ZSH_VERSION+set}" ; then 298649dc963fSmrg setopt NO_GLOB_SUBST 298749dc963fSmrg fi 298849dc963fSmrg 298949dc963fSmrg cfgfile="${ofile}T" 299049dc963fSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 299149dc963fSmrg $RM "$cfgfile" 299249dc963fSmrg 299349dc963fSmrg cat <<_LT_EOF >> "$cfgfile" 299449dc963fSmrg#! $SHELL 299549dc963fSmrg 299649dc963fSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 299749dc963fSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 299849dc963fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 299949dc963fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 300049dc963fSmrg# 300149dc963fSmrg_LT_COPYING 300249dc963fSmrg_LT_LIBTOOL_TAGS 300349dc963fSmrg 300449dc963fSmrg# ### BEGIN LIBTOOL CONFIG 300549dc963fSmrg_LT_LIBTOOL_CONFIG_VARS 300649dc963fSmrg_LT_LIBTOOL_TAG_VARS 300749dc963fSmrg# ### END LIBTOOL CONFIG 300849dc963fSmrg 300949dc963fSmrg_LT_EOF 301049dc963fSmrg 301149dc963fSmrg case $host_os in 301249dc963fSmrg aix3*) 301349dc963fSmrg cat <<\_LT_EOF >> "$cfgfile" 301449dc963fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 301549dc963fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 301649dc963fSmrg# vanish in a puff of smoke. 301749dc963fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 301849dc963fSmrg COLLECT_NAMES= 301949dc963fSmrg export COLLECT_NAMES 302049dc963fSmrgfi 302149dc963fSmrg_LT_EOF 302249dc963fSmrg ;; 302349dc963fSmrg esac 302449dc963fSmrg 302549dc963fSmrg _LT_PROG_LTMAIN 302649dc963fSmrg 302749dc963fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 302849dc963fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 302949dc963fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 303049dc963fSmrg # is reportedly fixed, but why not run on old versions too? 303149dc963fSmrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 303249dc963fSmrg || (rm -f "$cfgfile"; exit 1) 303349dc963fSmrg 303449dc963fSmrg _LT_PROG_XSI_SHELLFNS 303549dc963fSmrg 303649dc963fSmrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 303749dc963fSmrg || (rm -f "$cfgfile"; exit 1) 303849dc963fSmrg 303949dc963fSmrg mv -f "$cfgfile" "$ofile" || 304049dc963fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 304149dc963fSmrg chmod +x "$ofile" 304249dc963fSmrg], 304349dc963fSmrg[cat <<_LT_EOF >> "$ofile" 304449dc963fSmrg 304549dc963fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 304649dc963fSmrgdnl in a comment (ie after a #). 304749dc963fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 304849dc963fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 304949dc963fSmrg# ### END LIBTOOL TAG CONFIG: $1 305049dc963fSmrg_LT_EOF 305149dc963fSmrg])dnl /m4_if 305249dc963fSmrg], 305349dc963fSmrg[m4_if([$1], [], [ 305449dc963fSmrg PACKAGE='$PACKAGE' 305549dc963fSmrg VERSION='$VERSION' 305649dc963fSmrg TIMESTAMP='$TIMESTAMP' 305749dc963fSmrg RM='$RM' 305849dc963fSmrg ofile='$ofile'], []) 305949dc963fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 306049dc963fSmrg])# _LT_CONFIG 306149dc963fSmrg 306249dc963fSmrg 306349dc963fSmrg# LT_SUPPORTED_TAG(TAG) 306449dc963fSmrg# --------------------- 306549dc963fSmrg# Trace this macro to discover what tags are supported by the libtool 306649dc963fSmrg# --tag option, using: 306749dc963fSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 306849dc963fSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 306949dc963fSmrg 307049dc963fSmrg 307149dc963fSmrg# C support is built-in for now 307249dc963fSmrgm4_define([_LT_LANG_C_enabled], []) 307349dc963fSmrgm4_define([_LT_TAGS], []) 307449dc963fSmrg 307549dc963fSmrg 307649dc963fSmrg# LT_LANG(LANG) 307749dc963fSmrg# ------------- 307849dc963fSmrg# Enable libtool support for the given language if not already enabled. 307949dc963fSmrgAC_DEFUN([LT_LANG], 308049dc963fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 308149dc963fSmrgm4_case([$1], 308249dc963fSmrg [C], [_LT_LANG(C)], 308349dc963fSmrg [C++], [_LT_LANG(CXX)], 308449dc963fSmrg [Java], [_LT_LANG(GCJ)], 308549dc963fSmrg [Fortran 77], [_LT_LANG(F77)], 308649dc963fSmrg [Fortran], [_LT_LANG(FC)], 308749dc963fSmrg [Windows Resource], [_LT_LANG(RC)], 308849dc963fSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 308949dc963fSmrg [_LT_LANG($1)], 309049dc963fSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 309149dc963fSmrg])# LT_LANG 309249dc963fSmrg 309349dc963fSmrg 309449dc963fSmrg# _LT_LANG(LANGNAME) 309549dc963fSmrg# ------------------ 309649dc963fSmrgm4_defun([_LT_LANG], 309749dc963fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 309849dc963fSmrg [LT_SUPPORTED_TAG([$1])dnl 309949dc963fSmrg m4_append([_LT_TAGS], [$1 ])dnl 310049dc963fSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 310149dc963fSmrg _LT_LANG_$1_CONFIG($1)])dnl 310249dc963fSmrg])# _LT_LANG 310349dc963fSmrg 310449dc963fSmrg 310549dc963fSmrg# _LT_LANG_DEFAULT_CONFIG 310649dc963fSmrg# ----------------------- 310749dc963fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 310849dc963fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 310949dc963fSmrg [LT_LANG(CXX)], 311049dc963fSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 311149dc963fSmrg 311249dc963fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 311349dc963fSmrg [LT_LANG(F77)], 311449dc963fSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 311549dc963fSmrg 311649dc963fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 311749dc963fSmrg [LT_LANG(FC)], 311849dc963fSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 311949dc963fSmrg 312049dc963fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 312149dc963fSmrgdnl pulling things in needlessly. 312249dc963fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 312349dc963fSmrg [LT_LANG(GCJ)], 312449dc963fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 312549dc963fSmrg [LT_LANG(GCJ)], 312649dc963fSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 312749dc963fSmrg [LT_LANG(GCJ)], 312849dc963fSmrg [m4_ifdef([AC_PROG_GCJ], 312949dc963fSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 313049dc963fSmrg m4_ifdef([A][M_PROG_GCJ], 313149dc963fSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 313249dc963fSmrg m4_ifdef([LT_PROG_GCJ], 313349dc963fSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 313449dc963fSmrg 313549dc963fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 313649dc963fSmrg [LT_LANG(RC)], 313749dc963fSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 313849dc963fSmrg])# _LT_LANG_DEFAULT_CONFIG 313949dc963fSmrg 314049dc963fSmrg# Obsolete macros: 314149dc963fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 314249dc963fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 314349dc963fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 314449dc963fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 314549dc963fSmrgdnl aclocal-1.4 backwards compatibility: 314649dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 314749dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 314849dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 314949dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 315049dc963fSmrg 315149dc963fSmrg 315249dc963fSmrg# _LT_TAG_COMPILER 315349dc963fSmrg# ---------------- 315449dc963fSmrgm4_defun([_LT_TAG_COMPILER], 315549dc963fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 315649dc963fSmrg 315749dc963fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 315849dc963fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 315949dc963fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 316049dc963fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 316149dc963fSmrg 316249dc963fSmrg# If no C compiler was specified, use CC. 316349dc963fSmrgLTCC=${LTCC-"$CC"} 316449dc963fSmrg 316549dc963fSmrg# If no C compiler flags were specified, use CFLAGS. 316649dc963fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 316749dc963fSmrg 316849dc963fSmrg# Allow CC to be a program name with arguments. 316949dc963fSmrgcompiler=$CC 317049dc963fSmrg])# _LT_TAG_COMPILER 317149dc963fSmrg 317249dc963fSmrg 317349dc963fSmrg# _LT_COMPILER_BOILERPLATE 317449dc963fSmrg# ------------------------ 317549dc963fSmrg# Check for compiler boilerplate output or warnings with 317649dc963fSmrg# the simple compiler test code. 317749dc963fSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 317849dc963fSmrg[m4_require([_LT_DECL_SED])dnl 317949dc963fSmrgac_outfile=conftest.$ac_objext 318049dc963fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 318149dc963fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 318249dc963fSmrg_lt_compiler_boilerplate=`cat conftest.err` 318349dc963fSmrg$RM conftest* 318449dc963fSmrg])# _LT_COMPILER_BOILERPLATE 31854b0ead49Smrg 318649dc963fSmrg 318749dc963fSmrg# _LT_LINKER_BOILERPLATE 318852b01e16Smrg# ---------------------- 318949dc963fSmrg# Check for linker boilerplate output or warnings with 319049dc963fSmrg# the simple link test code. 319149dc963fSmrgm4_defun([_LT_LINKER_BOILERPLATE], 319249dc963fSmrg[m4_require([_LT_DECL_SED])dnl 319349dc963fSmrgac_outfile=conftest.$ac_objext 319449dc963fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 319549dc963fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 319649dc963fSmrg_lt_linker_boilerplate=`cat conftest.err` 319749dc963fSmrg$RM -r conftest* 319849dc963fSmrg])# _LT_LINKER_BOILERPLATE 319949dc963fSmrg 320049dc963fSmrg# _LT_REQUIRED_DARWIN_CHECKS 320149dc963fSmrg# ------------------------- 320249dc963fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 320349dc963fSmrg case $host_os in 320449dc963fSmrg rhapsody* | darwin*) 320549dc963fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 320649dc963fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 320749dc963fSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 320849dc963fSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 320949dc963fSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 321049dc963fSmrg _LT_DECL([], [DSYMUTIL], [1], 321149dc963fSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 321249dc963fSmrg _LT_DECL([], [NMEDIT], [1], 321349dc963fSmrg [Tool to change global to local symbols on Mac OS X]) 321449dc963fSmrg _LT_DECL([], [LIPO], [1], 321549dc963fSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 321649dc963fSmrg _LT_DECL([], [OTOOL], [1], 321749dc963fSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 321849dc963fSmrg _LT_DECL([], [OTOOL64], [1], 321949dc963fSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 322049dc963fSmrg 322149dc963fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 322249dc963fSmrg [lt_cv_apple_cc_single_mod=no 322349dc963fSmrg if test -z "${LT_MULTI_MODULE}"; then 322449dc963fSmrg # By default we will add the -single_module flag. You can override 322549dc963fSmrg # by either setting the environment variable LT_MULTI_MODULE 322649dc963fSmrg # non-empty at configure time, or by adding -multi_module to the 322749dc963fSmrg # link flags. 322849dc963fSmrg rm -rf libconftest.dylib* 322949dc963fSmrg echo "int foo(void){return 1;}" > conftest.c 323049dc963fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 323149dc963fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 323249dc963fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 323349dc963fSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 323449dc963fSmrg _lt_result=$? 323549dc963fSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 323649dc963fSmrg lt_cv_apple_cc_single_mod=yes 323749dc963fSmrg else 323849dc963fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 323949dc963fSmrg fi 324049dc963fSmrg rm -rf libconftest.dylib* 324149dc963fSmrg rm -f conftest.* 324249dc963fSmrg fi]) 324349dc963fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 324449dc963fSmrg [lt_cv_ld_exported_symbols_list], 324549dc963fSmrg [lt_cv_ld_exported_symbols_list=no 324649dc963fSmrg save_LDFLAGS=$LDFLAGS 324749dc963fSmrg echo "_main" > conftest.sym 324849dc963fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 324949dc963fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 325049dc963fSmrg [lt_cv_ld_exported_symbols_list=yes], 325149dc963fSmrg [lt_cv_ld_exported_symbols_list=no]) 325249dc963fSmrg LDFLAGS="$save_LDFLAGS" 325349dc963fSmrg ]) 325449dc963fSmrg case $host_os in 325549dc963fSmrg rhapsody* | darwin1.[[012]]) 325649dc963fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 325749dc963fSmrg darwin1.*) 325849dc963fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 325949dc963fSmrg darwin*) # darwin 5.x on 326049dc963fSmrg # if running on 10.5 or later, the deployment target defaults 326149dc963fSmrg # to the OS version, if on x86, and 10.4, the deployment 326249dc963fSmrg # target defaults to 10.4. Don't you love it? 326349dc963fSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 326449dc963fSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 326549dc963fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 326649dc963fSmrg 10.[[012]]*) 326749dc963fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 326849dc963fSmrg 10.*) 326949dc963fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 327049dc963fSmrg esac 327149dc963fSmrg ;; 327249dc963fSmrg esac 327349dc963fSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 327449dc963fSmrg _lt_dar_single_mod='$single_module' 327549dc963fSmrg fi 327649dc963fSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 327749dc963fSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 327849dc963fSmrg else 327949dc963fSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 328049dc963fSmrg fi 328149dc963fSmrg if test "$DSYMUTIL" != ":"; then 328249dc963fSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 328349dc963fSmrg else 328449dc963fSmrg _lt_dsymutil= 328549dc963fSmrg fi 328649dc963fSmrg ;; 328749dc963fSmrg esac 328849dc963fSmrg]) 328949dc963fSmrg 329049dc963fSmrg 329149dc963fSmrg# _LT_DARWIN_LINKER_FEATURES 329249dc963fSmrg# -------------------------- 329349dc963fSmrg# Checks for linker and compiler features on darwin 329449dc963fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 329549dc963fSmrg[ 329649dc963fSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 329749dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 329849dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 329949dc963fSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 330049dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 330149dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 330249dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 330349dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 330449dc963fSmrg case $cc_basename in 330549dc963fSmrg ifort*) _lt_dar_can_shared=yes ;; 330649dc963fSmrg *) _lt_dar_can_shared=$GCC ;; 330749dc963fSmrg esac 330849dc963fSmrg if test "$_lt_dar_can_shared" = "yes"; then 330949dc963fSmrg output_verbose_link_cmd=echo 331049dc963fSmrg _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}" 331149dc963fSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 331249dc963fSmrg _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}" 331349dc963fSmrg _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}" 331449dc963fSmrg m4_if([$1], [CXX], 331549dc963fSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 331649dc963fSmrg _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}" 331749dc963fSmrg _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}" 331849dc963fSmrg fi 331949dc963fSmrg],[]) 332049dc963fSmrg else 332149dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 332249dc963fSmrg fi 332349dc963fSmrg]) 332449dc963fSmrg 332549dc963fSmrg# _LT_SYS_MODULE_PATH_AIX 332649dc963fSmrg# ----------------------- 332749dc963fSmrg# Links a minimal program and checks the executable 332849dc963fSmrg# for the system default hardcoded library path. In most cases, 332949dc963fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 333049dc963fSmrg# the location of the communication and MPI libs are included too. 333149dc963fSmrg# If we don't find anything, use the default library path according 333249dc963fSmrg# to the aix ld manual. 333349dc963fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 333449dc963fSmrg[m4_require([_LT_DECL_SED])dnl 333549dc963fSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 333649dc963fSmrglt_aix_libpath_sed=' 333749dc963fSmrg /Import File Strings/,/^$/ { 333849dc963fSmrg /^0/ { 333949dc963fSmrg s/^0 *\(.*\)$/\1/ 334049dc963fSmrg p 334149dc963fSmrg } 334249dc963fSmrg }' 334349dc963fSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 334449dc963fSmrg# Check for a 64-bit object if we didn't find anything. 334549dc963fSmrgif test -z "$aix_libpath"; then 334649dc963fSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 334749dc963fSmrgfi],[]) 334849dc963fSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 334949dc963fSmrg])# _LT_SYS_MODULE_PATH_AIX 335049dc963fSmrg 335149dc963fSmrg 335249dc963fSmrg# _LT_SHELL_INIT(ARG) 335349dc963fSmrg# ------------------- 335449dc963fSmrgm4_define([_LT_SHELL_INIT], 335552b01e16Smrg[ifdef([AC_DIVERSION_NOTICE], 335652b01e16Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 335752b01e16Smrg [AC_DIVERT_PUSH(NOTICE)]) 335852b01e16Smrg$1 335952b01e16SmrgAC_DIVERT_POP 336049dc963fSmrg])# _LT_SHELL_INIT 33614b0ead49Smrg 33624b0ead49Smrg 336349dc963fSmrg# _LT_PROG_ECHO_BACKSLASH 336449dc963fSmrg# ----------------------- 336552b01e16Smrg# Add some code to the start of the generated configure script which 336652b01e16Smrg# will find an echo command which doesn't interpret backslashes. 336749dc963fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 336849dc963fSmrg[_LT_SHELL_INIT([ 336952b01e16Smrg# Check that we are running under the correct shell. 337052b01e16SmrgSHELL=${CONFIG_SHELL-/bin/sh} 33714b0ead49Smrg 337249dc963fSmrgcase X$lt_ECHO in 337352b01e16SmrgX*--fallback-echo) 337452b01e16Smrg # Remove one level of quotation (which was required for Make). 337549dc963fSmrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 33764b0ead49Smrg ;; 337752b01e16Smrgesac 33784b0ead49Smrg 337949dc963fSmrgECHO=${lt_ECHO-echo} 338052b01e16Smrgif test "X[$]1" = X--no-reexec; then 338152b01e16Smrg # Discard the --no-reexec flag, and continue. 338252b01e16Smrg shift 338352b01e16Smrgelif test "X[$]1" = X--fallback-echo; then 338452b01e16Smrg # Avoid inline document here, it may be left over 338552b01e16Smrg : 338649dc963fSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 338749dc963fSmrg # Yippee, $ECHO works! 338852b01e16Smrg : 338952b01e16Smrgelse 339052b01e16Smrg # Restart under the correct shell. 339152b01e16Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 339252b01e16Smrgfi 33934b0ead49Smrg 339452b01e16Smrgif test "X[$]1" = X--fallback-echo; then 339552b01e16Smrg # used as fallback echo 339652b01e16Smrg shift 339749dc963fSmrg cat <<_LT_EOF 339852b01e16Smrg[$]* 339949dc963fSmrg_LT_EOF 340052b01e16Smrg exit 0 340152b01e16Smrgfi 34024b0ead49Smrg 340352b01e16Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 340452b01e16Smrg# if CDPATH is set. 340552b01e16Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 34064b0ead49Smrg 340749dc963fSmrgif test -z "$lt_ECHO"; then 340849dc963fSmrg if test "X${echo_test_string+set}" != Xset; then 340949dc963fSmrg # find a string as large as possible, as long as the shell can cope with it 341049dc963fSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 341149dc963fSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 341249dc963fSmrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 341349dc963fSmrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 341449dc963fSmrg then 341549dc963fSmrg break 341649dc963fSmrg fi 341749dc963fSmrg done 341849dc963fSmrg fi 34194b0ead49Smrg 342049dc963fSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 342149dc963fSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 342249dc963fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 342349dc963fSmrg : 342449dc963fSmrg else 342549dc963fSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 342649dc963fSmrg # backslashes. This makes it impossible to quote backslashes using 342749dc963fSmrg # echo "$something" | sed 's/\\/\\\\/g' 342849dc963fSmrg # 342949dc963fSmrg # So, first we look for a working echo in the user's PATH. 343049dc963fSmrg 343149dc963fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 343249dc963fSmrg for dir in $PATH /usr/ucb; do 343349dc963fSmrg IFS="$lt_save_ifs" 343449dc963fSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 343549dc963fSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 343649dc963fSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 343749dc963fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 343849dc963fSmrg ECHO="$dir/echo" 343949dc963fSmrg break 344049dc963fSmrg fi 344149dc963fSmrg done 344252b01e16Smrg IFS="$lt_save_ifs" 34434b0ead49Smrg 344449dc963fSmrg if test "X$ECHO" = Xecho; then 344549dc963fSmrg # We didn't find a better echo, so look for alternatives. 344649dc963fSmrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 344749dc963fSmrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 344849dc963fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 344949dc963fSmrg # This shell has a builtin print -r that does the trick. 345049dc963fSmrg ECHO='print -r' 345149dc963fSmrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 345249dc963fSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 345349dc963fSmrg # If we have ksh, try running configure again with it. 345449dc963fSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 345549dc963fSmrg export ORIGINAL_CONFIG_SHELL 345649dc963fSmrg CONFIG_SHELL=/bin/ksh 345749dc963fSmrg export CONFIG_SHELL 345849dc963fSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 345952b01e16Smrg else 346049dc963fSmrg # Try using printf. 346149dc963fSmrg ECHO='printf %s\n' 346249dc963fSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 346349dc963fSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 346449dc963fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 346549dc963fSmrg # Cool, printf works 346649dc963fSmrg : 346749dc963fSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 346849dc963fSmrg test "X$echo_testing_string" = 'X\t' && 346949dc963fSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 347049dc963fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 347149dc963fSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 347249dc963fSmrg export CONFIG_SHELL 347349dc963fSmrg SHELL="$CONFIG_SHELL" 347449dc963fSmrg export SHELL 347549dc963fSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 347649dc963fSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 347749dc963fSmrg test "X$echo_testing_string" = 'X\t' && 347849dc963fSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 347949dc963fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 348049dc963fSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 348149dc963fSmrg else 348249dc963fSmrg # maybe with a smaller string... 348349dc963fSmrg prev=: 34844b0ead49Smrg 348549dc963fSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 348649dc963fSmrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 348749dc963fSmrg then 348849dc963fSmrg break 348949dc963fSmrg fi 349049dc963fSmrg prev="$cmd" 349149dc963fSmrg done 34924b0ead49Smrg 349349dc963fSmrg if test "$prev" != 'sed 50q "[$]0"'; then 349449dc963fSmrg echo_test_string=`eval $prev` 349549dc963fSmrg export echo_test_string 349649dc963fSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 349749dc963fSmrg else 349849dc963fSmrg # Oops. We lost completely, so just stick with echo. 349949dc963fSmrg ECHO=echo 350049dc963fSmrg fi 350149dc963fSmrg fi 350252b01e16Smrg fi 350352b01e16Smrg fi 35044b0ead49Smrg fi 350552b01e16Smrgfi 35064b0ead49Smrg 350752b01e16Smrg# Copy echo and quote the copy suitably for passing to libtool from 350852b01e16Smrg# the Makefile, instead of quoting the original, which is used later. 350949dc963fSmrglt_ECHO=$ECHO 351049dc963fSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 351149dc963fSmrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 351252b01e16Smrgfi 35134b0ead49Smrg 351449dc963fSmrgAC_SUBST(lt_ECHO) 351549dc963fSmrg]) 351649dc963fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 351749dc963fSmrg_LT_DECL([], [ECHO], [1], 351849dc963fSmrg [An echo program that does not interpret backslashes]) 351949dc963fSmrg])# _LT_PROG_ECHO_BACKSLASH 35204b0ead49Smrg 35214b0ead49Smrg 352249dc963fSmrg# _LT_ENABLE_LOCK 352349dc963fSmrg# --------------- 352449dc963fSmrgm4_defun([_LT_ENABLE_LOCK], 352552b01e16Smrg[AC_ARG_ENABLE([libtool-lock], 352649dc963fSmrg [AS_HELP_STRING([--disable-libtool-lock], 352749dc963fSmrg [avoid locking (might break parallel builds)])]) 352852b01e16Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 35294b0ead49Smrg 353052b01e16Smrg# Some flags need to be propagated to the compiler or linker for good 353152b01e16Smrg# libtool support. 353252b01e16Smrgcase $host in 353352b01e16Smrgia64-*-hpux*) 353452b01e16Smrg # Find out which ABI we are using. 353552b01e16Smrg echo 'int i;' > conftest.$ac_ext 353652b01e16Smrg if AC_TRY_EVAL(ac_compile); then 353752b01e16Smrg case `/usr/bin/file conftest.$ac_objext` in 353849dc963fSmrg *ELF-32*) 353949dc963fSmrg HPUX_IA64_MODE="32" 354049dc963fSmrg ;; 354149dc963fSmrg *ELF-64*) 354249dc963fSmrg HPUX_IA64_MODE="64" 354349dc963fSmrg ;; 354452b01e16Smrg esac 354552b01e16Smrg fi 354652b01e16Smrg rm -rf conftest* 35474b0ead49Smrg ;; 354852b01e16Smrg*-*-irix6*) 354952b01e16Smrg # Find out which ABI we are using. 355052b01e16Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 355152b01e16Smrg if AC_TRY_EVAL(ac_compile); then 355249dc963fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 355349dc963fSmrg case `/usr/bin/file conftest.$ac_objext` in 355449dc963fSmrg *32-bit*) 355549dc963fSmrg LD="${LD-ld} -melf32bsmip" 355649dc963fSmrg ;; 355749dc963fSmrg *N32*) 355849dc963fSmrg LD="${LD-ld} -melf32bmipn32" 355949dc963fSmrg ;; 356049dc963fSmrg *64-bit*) 356149dc963fSmrg LD="${LD-ld} -melf64bmip" 356249dc963fSmrg ;; 356349dc963fSmrg esac 356449dc963fSmrg else 356549dc963fSmrg case `/usr/bin/file conftest.$ac_objext` in 356649dc963fSmrg *32-bit*) 356749dc963fSmrg LD="${LD-ld} -32" 356849dc963fSmrg ;; 356949dc963fSmrg *N32*) 357049dc963fSmrg LD="${LD-ld} -n32" 357149dc963fSmrg ;; 357249dc963fSmrg *64-bit*) 357349dc963fSmrg LD="${LD-ld} -64" 357449dc963fSmrg ;; 357549dc963fSmrg esac 357649dc963fSmrg fi 357752b01e16Smrg fi 357852b01e16Smrg rm -rf conftest* 35794b0ead49Smrg ;; 35804b0ead49Smrg 358152b01e16Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 358249dc963fSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 358352b01e16Smrg # Find out which ABI we are using. 358452b01e16Smrg echo 'int i;' > conftest.$ac_ext 358552b01e16Smrg if AC_TRY_EVAL(ac_compile); then 358652b01e16Smrg case `/usr/bin/file conftest.o` in 358749dc963fSmrg *32-bit*) 358849dc963fSmrg case $host in 358949dc963fSmrg x86_64-*kfreebsd*-gnu) 359049dc963fSmrg LD="${LD-ld} -m elf_i386_fbsd" 359149dc963fSmrg ;; 359249dc963fSmrg x86_64-*linux*) 359349dc963fSmrg LD="${LD-ld} -m elf_i386" 359449dc963fSmrg ;; 359549dc963fSmrg ppc64-*linux*|powerpc64-*linux*) 359649dc963fSmrg LD="${LD-ld} -m elf32ppclinux" 359749dc963fSmrg ;; 359849dc963fSmrg s390x-*linux*) 359949dc963fSmrg LD="${LD-ld} -m elf_s390" 360049dc963fSmrg ;; 360149dc963fSmrg sparc64-*linux*) 360249dc963fSmrg LD="${LD-ld} -m elf32_sparc" 360349dc963fSmrg ;; 360449dc963fSmrg esac 360549dc963fSmrg ;; 360649dc963fSmrg *64-bit*) 360749dc963fSmrg case $host in 360849dc963fSmrg x86_64-*kfreebsd*-gnu) 360949dc963fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 361049dc963fSmrg ;; 361149dc963fSmrg x86_64-*linux*) 361249dc963fSmrg LD="${LD-ld} -m elf_x86_64" 361349dc963fSmrg ;; 361449dc963fSmrg ppc*-*linux*|powerpc*-*linux*) 361549dc963fSmrg LD="${LD-ld} -m elf64ppc" 361649dc963fSmrg ;; 361749dc963fSmrg s390*-*linux*|s390*-*tpf*) 361849dc963fSmrg LD="${LD-ld} -m elf64_s390" 361949dc963fSmrg ;; 362049dc963fSmrg sparc*-*linux*) 362149dc963fSmrg LD="${LD-ld} -m elf64_sparc" 362249dc963fSmrg ;; 362349dc963fSmrg esac 362449dc963fSmrg ;; 362552b01e16Smrg esac 362652b01e16Smrg fi 362752b01e16Smrg rm -rf conftest* 36284b0ead49Smrg ;; 36294b0ead49Smrg 363052b01e16Smrg*-*-sco3.2v5*) 363152b01e16Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 363252b01e16Smrg SAVE_CFLAGS="$CFLAGS" 363352b01e16Smrg CFLAGS="$CFLAGS -belf" 363452b01e16Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 363552b01e16Smrg [AC_LANG_PUSH(C) 363649dc963fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 363752b01e16Smrg AC_LANG_POP]) 363852b01e16Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 363952b01e16Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 364052b01e16Smrg CFLAGS="$SAVE_CFLAGS" 36414b0ead49Smrg fi 36424b0ead49Smrg ;; 364352b01e16Smrgsparc*-*solaris*) 364452b01e16Smrg # Find out which ABI we are using. 364552b01e16Smrg echo 'int i;' > conftest.$ac_ext 364652b01e16Smrg if AC_TRY_EVAL(ac_compile); then 364752b01e16Smrg case `/usr/bin/file conftest.o` in 364852b01e16Smrg *64-bit*) 364952b01e16Smrg case $lt_cv_prog_gnu_ld in 365052b01e16Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 365152b01e16Smrg *) 365249dc963fSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 365352b01e16Smrg LD="${LD-ld} -64" 365452b01e16Smrg fi 365552b01e16Smrg ;; 365652b01e16Smrg esac 365752b01e16Smrg ;; 365852b01e16Smrg esac 365952b01e16Smrg fi 366052b01e16Smrg rm -rf conftest* 36614b0ead49Smrg ;; 36624b0ead49Smrgesac 36634b0ead49Smrg 366452b01e16Smrgneed_locks="$enable_libtool_lock" 366549dc963fSmrg])# _LT_ENABLE_LOCK 366649dc963fSmrg 366749dc963fSmrg 366849dc963fSmrg# _LT_CMD_OLD_ARCHIVE 366949dc963fSmrg# ------------------- 367049dc963fSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 367149dc963fSmrg[AC_CHECK_TOOL(AR, ar, false) 367249dc963fSmrgtest -z "$AR" && AR=ar 367349dc963fSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 367449dc963fSmrg_LT_DECL([], [AR], [1], [The archiver]) 367549dc963fSmrg_LT_DECL([], [AR_FLAGS], [1]) 367649dc963fSmrg 367749dc963fSmrgAC_CHECK_TOOL(STRIP, strip, :) 367849dc963fSmrgtest -z "$STRIP" && STRIP=: 367949dc963fSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 368049dc963fSmrg 368149dc963fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 368249dc963fSmrgtest -z "$RANLIB" && RANLIB=: 368349dc963fSmrg_LT_DECL([], [RANLIB], [1], 368449dc963fSmrg [Commands used to install an old-style archive]) 368549dc963fSmrg 368649dc963fSmrg# Determine commands to create old-style static archives. 368749dc963fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 368849dc963fSmrgold_postinstall_cmds='chmod 644 $oldlib' 368949dc963fSmrgold_postuninstall_cmds= 36904b0ead49Smrg 369149dc963fSmrgif test -n "$RANLIB"; then 369249dc963fSmrg case $host_os in 369349dc963fSmrg openbsd*) 369449dc963fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 369549dc963fSmrg ;; 369649dc963fSmrg *) 369749dc963fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 369849dc963fSmrg ;; 369949dc963fSmrg esac 370049dc963fSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 370149dc963fSmrgfi 370249dc963fSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 370349dc963fSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 370449dc963fSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 370549dc963fSmrg [Commands used to build an old-style archive]) 370649dc963fSmrg])# _LT_CMD_OLD_ARCHIVE 37074b0ead49Smrg 37084b0ead49Smrg 370949dc963fSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 371052b01e16Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 371152b01e16Smrg# ---------------------------------------------------------------- 371252b01e16Smrg# Check whether the given compiler option works 371349dc963fSmrgAC_DEFUN([_LT_COMPILER_OPTION], 371449dc963fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 371549dc963fSmrgm4_require([_LT_DECL_SED])dnl 371652b01e16SmrgAC_CACHE_CHECK([$1], [$2], 371752b01e16Smrg [$2=no 371849dc963fSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 371952b01e16Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 372052b01e16Smrg lt_compiler_flag="$3" 372152b01e16Smrg # Insert the option either (1) after the last *FLAGS variable, or 372252b01e16Smrg # (2) before a word containing "conftest.", or (3) at the end. 372352b01e16Smrg # Note that $ac_compile itself does not contain backslashes and begins 372452b01e16Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 372552b01e16Smrg # The option is referenced via a variable to avoid confusing sed. 372652b01e16Smrg lt_compile=`echo "$ac_compile" | $SED \ 372752b01e16Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 372852b01e16Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 372952b01e16Smrg -e 's:$: $lt_compiler_flag:'` 373052b01e16Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 373152b01e16Smrg (eval "$lt_compile" 2>conftest.err) 373252b01e16Smrg ac_status=$? 373352b01e16Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 373452b01e16Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 373552b01e16Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 373652b01e16Smrg # The compiler can only warn and ignore the option if not recognized 373752b01e16Smrg # So say no if there are warnings other than the usual output. 373849dc963fSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 373952b01e16Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 374052b01e16Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 374152b01e16Smrg $2=yes 374252b01e16Smrg fi 374352b01e16Smrg fi 374449dc963fSmrg $RM conftest* 374552b01e16Smrg]) 37464b0ead49Smrg 374752b01e16Smrgif test x"[$]$2" = xyes; then 374849dc963fSmrg m4_if([$5], , :, [$5]) 374952b01e16Smrgelse 375049dc963fSmrg m4_if([$6], , :, [$6]) 37514b0ead49Smrgfi 375249dc963fSmrg])# _LT_COMPILER_OPTION 37534b0ead49Smrg 375449dc963fSmrg# Old name: 375549dc963fSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 375649dc963fSmrgdnl aclocal-1.4 backwards compatibility: 375749dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 37584b0ead49Smrg 375949dc963fSmrg 376049dc963fSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 376149dc963fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 376249dc963fSmrg# ---------------------------------------------------- 376349dc963fSmrg# Check whether the given linker option works 376449dc963fSmrgAC_DEFUN([_LT_LINKER_OPTION], 376549dc963fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 376649dc963fSmrgm4_require([_LT_DECL_SED])dnl 376752b01e16SmrgAC_CACHE_CHECK([$1], [$2], 376852b01e16Smrg [$2=no 376952b01e16Smrg save_LDFLAGS="$LDFLAGS" 377052b01e16Smrg LDFLAGS="$LDFLAGS $3" 377152b01e16Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 377252b01e16Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 377352b01e16Smrg # The linker can only warn and ignore the option if not recognized 377452b01e16Smrg # So say no if there are warnings 377552b01e16Smrg if test -s conftest.err; then 377652b01e16Smrg # Append any errors to the config.log. 377752b01e16Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 377849dc963fSmrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 377952b01e16Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 378052b01e16Smrg if diff conftest.exp conftest.er2 >/dev/null; then 378152b01e16Smrg $2=yes 378252b01e16Smrg fi 378352b01e16Smrg else 378452b01e16Smrg $2=yes 378552b01e16Smrg fi 378652b01e16Smrg fi 378749dc963fSmrg $RM -r conftest* 378852b01e16Smrg LDFLAGS="$save_LDFLAGS" 378952b01e16Smrg]) 37904b0ead49Smrg 379152b01e16Smrgif test x"[$]$2" = xyes; then 379249dc963fSmrg m4_if([$4], , :, [$4]) 379352b01e16Smrgelse 379449dc963fSmrg m4_if([$5], , :, [$5]) 379552b01e16Smrgfi 379649dc963fSmrg])# _LT_LINKER_OPTION 37974b0ead49Smrg 379849dc963fSmrg# Old name: 379949dc963fSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 380049dc963fSmrgdnl aclocal-1.4 backwards compatibility: 380149dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 38024b0ead49Smrg 380349dc963fSmrg 380449dc963fSmrg# LT_CMD_MAX_LEN 380549dc963fSmrg#--------------- 380649dc963fSmrgAC_DEFUN([LT_CMD_MAX_LEN], 380749dc963fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 380849dc963fSmrg# find the maximum length of command line arguments 380952b01e16SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 381052b01e16SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 381152b01e16Smrg i=0 381252b01e16Smrg teststring="ABCD" 38134b0ead49Smrg 381452b01e16Smrg case $build_os in 381552b01e16Smrg msdosdjgpp*) 381652b01e16Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 381752b01e16Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 381852b01e16Smrg # during glob expansion). Even if it were fixed, the result of this 381952b01e16Smrg # check would be larger than it should be. 382052b01e16Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 382152b01e16Smrg ;; 38224b0ead49Smrg 382352b01e16Smrg gnu*) 382452b01e16Smrg # Under GNU Hurd, this test is not required because there is 382552b01e16Smrg # no limit to the length of command line arguments. 382652b01e16Smrg # Libtool will interpret -1 as no limit whatsoever 382752b01e16Smrg lt_cv_sys_max_cmd_len=-1; 382852b01e16Smrg ;; 38294b0ead49Smrg 383049dc963fSmrg cygwin* | mingw* | cegcc*) 383152b01e16Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 383252b01e16Smrg # about 5 minutes as the teststring grows exponentially. 383352b01e16Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 383452b01e16Smrg # you end up with a "frozen" computer, even though with patience 383552b01e16Smrg # the test eventually succeeds (with a max line length of 256k). 383652b01e16Smrg # Instead, let's just punt: use the minimum linelength reported by 383752b01e16Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 383852b01e16Smrg lt_cv_sys_max_cmd_len=8192; 383952b01e16Smrg ;; 38404b0ead49Smrg 384152b01e16Smrg amigaos*) 384252b01e16Smrg # On AmigaOS with pdksh, this test takes hours, literally. 384352b01e16Smrg # So we just punt and use a minimum line length of 8192. 384452b01e16Smrg lt_cv_sys_max_cmd_len=8192; 384552b01e16Smrg ;; 38464b0ead49Smrg 384752b01e16Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 384852b01e16Smrg # This has been around since 386BSD, at least. Likely further. 384952b01e16Smrg if test -x /sbin/sysctl; then 385052b01e16Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 385152b01e16Smrg elif test -x /usr/sbin/sysctl; then 385252b01e16Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 385352b01e16Smrg else 385452b01e16Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 385552b01e16Smrg fi 385652b01e16Smrg # And add a safety zone 385752b01e16Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 385852b01e16Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 385952b01e16Smrg ;; 38604b0ead49Smrg 386152b01e16Smrg interix*) 386252b01e16Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 386352b01e16Smrg lt_cv_sys_max_cmd_len=196608 386452b01e16Smrg ;; 38654b0ead49Smrg 386652b01e16Smrg osf*) 386752b01e16Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 386852b01e16Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 386952b01e16Smrg # nice to cause kernel panics so lets avoid the loop below. 387052b01e16Smrg # First set a reasonable default. 387152b01e16Smrg lt_cv_sys_max_cmd_len=16384 387252b01e16Smrg # 387352b01e16Smrg if test -x /sbin/sysconfig; then 387452b01e16Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 387552b01e16Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 387652b01e16Smrg esac 387752b01e16Smrg fi 387852b01e16Smrg ;; 387952b01e16Smrg sco3.2v5*) 388052b01e16Smrg lt_cv_sys_max_cmd_len=102400 388152b01e16Smrg ;; 388252b01e16Smrg sysv5* | sco5v6* | sysv4.2uw2*) 388352b01e16Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 388452b01e16Smrg if test -n "$kargmax"; then 388549dc963fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 388652b01e16Smrg else 388752b01e16Smrg lt_cv_sys_max_cmd_len=32768 388852b01e16Smrg fi 388952b01e16Smrg ;; 389052b01e16Smrg *) 389152b01e16Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 389252b01e16Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 389352b01e16Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 389452b01e16Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 389552b01e16Smrg else 389649dc963fSmrg # Make teststring a little bigger before we do anything with it. 389749dc963fSmrg # a 1K string should be a reasonable start. 389849dc963fSmrg for i in 1 2 3 4 5 6 7 8 ; do 389949dc963fSmrg teststring=$teststring$teststring 390049dc963fSmrg done 390152b01e16Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 390249dc963fSmrg # If test is not a shell built-in, we'll probably end up computing a 390349dc963fSmrg # maximum length that is only half of the actual maximum length, but 390449dc963fSmrg # we can't tell. 390549dc963fSmrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 390649dc963fSmrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 390752b01e16Smrg test $i != 17 # 1/2 MB should be enough 390852b01e16Smrg do 390952b01e16Smrg i=`expr $i + 1` 391052b01e16Smrg teststring=$teststring$teststring 391152b01e16Smrg done 391249dc963fSmrg # Only check the string length outside the loop. 391349dc963fSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 391452b01e16Smrg teststring= 391549dc963fSmrg # Add a significant safety factor because C++ compilers can tack on 391649dc963fSmrg # massive amounts of additional arguments before passing them to the 391749dc963fSmrg # linker. It appears as though 1/2 is a usable value. 391852b01e16Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 391952b01e16Smrg fi 392052b01e16Smrg ;; 392152b01e16Smrg esac 392252b01e16Smrg]) 392352b01e16Smrgif test -n $lt_cv_sys_max_cmd_len ; then 392452b01e16Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 392552b01e16Smrgelse 392652b01e16Smrg AC_MSG_RESULT(none) 392752b01e16Smrgfi 392849dc963fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 392949dc963fSmrg_LT_DECL([], [max_cmd_len], [0], 393049dc963fSmrg [What is the maximum length of a command?]) 393149dc963fSmrg])# LT_CMD_MAX_LEN 39324b0ead49Smrg 393349dc963fSmrg# Old name: 393449dc963fSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 393549dc963fSmrgdnl aclocal-1.4 backwards compatibility: 393649dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 39374b0ead49Smrg 393849dc963fSmrg 393949dc963fSmrg# _LT_HEADER_DLFCN 394049dc963fSmrg# ---------------- 394149dc963fSmrgm4_defun([_LT_HEADER_DLFCN], 394249dc963fSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 394349dc963fSmrg])# _LT_HEADER_DLFCN 39444b0ead49Smrg 39454b0ead49Smrg 394649dc963fSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 394749dc963fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 394849dc963fSmrg# ---------------------------------------------------------------- 394949dc963fSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 395049dc963fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 395152b01e16Smrgif test "$cross_compiling" = yes; then : 395252b01e16Smrg [$4] 395352b01e16Smrgelse 395452b01e16Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 395552b01e16Smrg lt_status=$lt_dlunknown 395649dc963fSmrg cat > conftest.$ac_ext <<_LT_EOF 395752b01e16Smrg[#line __oline__ "configure" 395852b01e16Smrg#include "confdefs.h" 39594b0ead49Smrg 396052b01e16Smrg#if HAVE_DLFCN_H 396152b01e16Smrg#include <dlfcn.h> 396252b01e16Smrg#endif 39634b0ead49Smrg 396452b01e16Smrg#include <stdio.h> 39654b0ead49Smrg 396652b01e16Smrg#ifdef RTLD_GLOBAL 396752b01e16Smrg# define LT_DLGLOBAL RTLD_GLOBAL 396852b01e16Smrg#else 396952b01e16Smrg# ifdef DL_GLOBAL 397052b01e16Smrg# define LT_DLGLOBAL DL_GLOBAL 397152b01e16Smrg# else 397252b01e16Smrg# define LT_DLGLOBAL 0 397352b01e16Smrg# endif 397452b01e16Smrg#endif 39754b0ead49Smrg 397652b01e16Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 397752b01e16Smrg find out it does not work in some platform. */ 397852b01e16Smrg#ifndef LT_DLLAZY_OR_NOW 397952b01e16Smrg# ifdef RTLD_LAZY 398052b01e16Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 398152b01e16Smrg# else 398252b01e16Smrg# ifdef DL_LAZY 398352b01e16Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 398452b01e16Smrg# else 398552b01e16Smrg# ifdef RTLD_NOW 398652b01e16Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 398752b01e16Smrg# else 398852b01e16Smrg# ifdef DL_NOW 398952b01e16Smrg# define LT_DLLAZY_OR_NOW DL_NOW 399052b01e16Smrg# else 399152b01e16Smrg# define LT_DLLAZY_OR_NOW 0 399252b01e16Smrg# endif 399352b01e16Smrg# endif 399452b01e16Smrg# endif 399552b01e16Smrg# endif 399652b01e16Smrg#endif 39974b0ead49Smrg 399852b01e16Smrgvoid fnord() { int i=42;} 399952b01e16Smrgint main () 400052b01e16Smrg{ 400152b01e16Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 400252b01e16Smrg int status = $lt_dlunknown; 400352b01e16Smrg 400452b01e16Smrg if (self) 400552b01e16Smrg { 400652b01e16Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 400752b01e16Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 400852b01e16Smrg /* dlclose (self); */ 400952b01e16Smrg } 401052b01e16Smrg else 401152b01e16Smrg puts (dlerror ()); 401252b01e16Smrg 401349dc963fSmrg return status; 401452b01e16Smrg}] 401549dc963fSmrg_LT_EOF 401652b01e16Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 401752b01e16Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 401852b01e16Smrg lt_status=$? 401952b01e16Smrg case x$lt_status in 402052b01e16Smrg x$lt_dlno_uscore) $1 ;; 402152b01e16Smrg x$lt_dlneed_uscore) $2 ;; 402252b01e16Smrg x$lt_dlunknown|x*) $3 ;; 402352b01e16Smrg esac 402452b01e16Smrg else : 402552b01e16Smrg # compilation failed 402652b01e16Smrg $3 40274b0ead49Smrg fi 402852b01e16Smrgfi 402952b01e16Smrgrm -fr conftest* 403049dc963fSmrg])# _LT_TRY_DLOPEN_SELF 403152b01e16Smrg 403252b01e16Smrg 403349dc963fSmrg# LT_SYS_DLOPEN_SELF 403449dc963fSmrg# ------------------ 403549dc963fSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 403649dc963fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 403752b01e16Smrgif test "x$enable_dlopen" != xyes; then 403852b01e16Smrg enable_dlopen=unknown 403952b01e16Smrg enable_dlopen_self=unknown 404052b01e16Smrg enable_dlopen_self_static=unknown 404152b01e16Smrgelse 404252b01e16Smrg lt_cv_dlopen=no 404352b01e16Smrg lt_cv_dlopen_libs= 404452b01e16Smrg 404552b01e16Smrg case $host_os in 404652b01e16Smrg beos*) 404752b01e16Smrg lt_cv_dlopen="load_add_on" 404852b01e16Smrg lt_cv_dlopen_libs= 404952b01e16Smrg lt_cv_dlopen_self=yes 40504b0ead49Smrg ;; 40514b0ead49Smrg 405249dc963fSmrg mingw* | pw32* | cegcc*) 405352b01e16Smrg lt_cv_dlopen="LoadLibrary" 405452b01e16Smrg lt_cv_dlopen_libs= 405549dc963fSmrg ;; 40564b0ead49Smrg 405752b01e16Smrg cygwin*) 405852b01e16Smrg lt_cv_dlopen="dlopen" 405952b01e16Smrg lt_cv_dlopen_libs= 406049dc963fSmrg ;; 40614b0ead49Smrg 406252b01e16Smrg darwin*) 406352b01e16Smrg # if libdl is installed we need to link against it 406452b01e16Smrg AC_CHECK_LIB([dl], [dlopen], 406552b01e16Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 406652b01e16Smrg lt_cv_dlopen="dyld" 406752b01e16Smrg lt_cv_dlopen_libs= 406852b01e16Smrg lt_cv_dlopen_self=yes 406952b01e16Smrg ]) 407049dc963fSmrg ;; 40714b0ead49Smrg 407252b01e16Smrg *) 407352b01e16Smrg AC_CHECK_FUNC([shl_load], 407452b01e16Smrg [lt_cv_dlopen="shl_load"], 407552b01e16Smrg [AC_CHECK_LIB([dld], [shl_load], 407652b01e16Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 407752b01e16Smrg [AC_CHECK_FUNC([dlopen], 407852b01e16Smrg [lt_cv_dlopen="dlopen"], 407952b01e16Smrg [AC_CHECK_LIB([dl], [dlopen], 408052b01e16Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 408152b01e16Smrg [AC_CHECK_LIB([svld], [dlopen], 408252b01e16Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 408352b01e16Smrg [AC_CHECK_LIB([dld], [dld_link], 408452b01e16Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 408552b01e16Smrg ]) 408652b01e16Smrg ]) 408752b01e16Smrg ]) 408852b01e16Smrg ]) 408952b01e16Smrg ]) 409052b01e16Smrg ;; 409152b01e16Smrg esac 40924b0ead49Smrg 409352b01e16Smrg if test "x$lt_cv_dlopen" != xno; then 409452b01e16Smrg enable_dlopen=yes 409552b01e16Smrg else 409652b01e16Smrg enable_dlopen=no 409752b01e16Smrg fi 40984b0ead49Smrg 409952b01e16Smrg case $lt_cv_dlopen in 410052b01e16Smrg dlopen) 410152b01e16Smrg save_CPPFLAGS="$CPPFLAGS" 410252b01e16Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 41034b0ead49Smrg 410452b01e16Smrg save_LDFLAGS="$LDFLAGS" 410552b01e16Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 41064b0ead49Smrg 410752b01e16Smrg save_LIBS="$LIBS" 410852b01e16Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 41094b0ead49Smrg 411052b01e16Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 411152b01e16Smrg lt_cv_dlopen_self, [dnl 411249dc963fSmrg _LT_TRY_DLOPEN_SELF( 411352b01e16Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 411452b01e16Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 411552b01e16Smrg ]) 41164b0ead49Smrg 411752b01e16Smrg if test "x$lt_cv_dlopen_self" = xyes; then 411852b01e16Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 411952b01e16Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 412049dc963fSmrg lt_cv_dlopen_self_static, [dnl 412149dc963fSmrg _LT_TRY_DLOPEN_SELF( 412252b01e16Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 412352b01e16Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 412452b01e16Smrg ]) 412552b01e16Smrg fi 41264b0ead49Smrg 412752b01e16Smrg CPPFLAGS="$save_CPPFLAGS" 412852b01e16Smrg LDFLAGS="$save_LDFLAGS" 412952b01e16Smrg LIBS="$save_LIBS" 413052b01e16Smrg ;; 413152b01e16Smrg esac 41324b0ead49Smrg 413352b01e16Smrg case $lt_cv_dlopen_self in 413452b01e16Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 413552b01e16Smrg *) enable_dlopen_self=unknown ;; 413652b01e16Smrg esac 41374b0ead49Smrg 413852b01e16Smrg case $lt_cv_dlopen_self_static in 413952b01e16Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 414052b01e16Smrg *) enable_dlopen_self_static=unknown ;; 414152b01e16Smrg esac 414252b01e16Smrgfi 414349dc963fSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 414449dc963fSmrg [Whether dlopen is supported]) 414549dc963fSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 414649dc963fSmrg [Whether dlopen of programs is supported]) 414749dc963fSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 414849dc963fSmrg [Whether dlopen of statically linked programs is supported]) 414949dc963fSmrg])# LT_SYS_DLOPEN_SELF 41504b0ead49Smrg 415149dc963fSmrg# Old name: 415249dc963fSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 415349dc963fSmrgdnl aclocal-1.4 backwards compatibility: 415449dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 415552b01e16Smrg 415649dc963fSmrg 415749dc963fSmrg# _LT_COMPILER_C_O([TAGNAME]) 415849dc963fSmrg# --------------------------- 415949dc963fSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 416049dc963fSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 416149dc963fSmrgm4_defun([_LT_COMPILER_C_O], 416249dc963fSmrg[m4_require([_LT_DECL_SED])dnl 416349dc963fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 416449dc963fSmrgm4_require([_LT_TAG_COMPILER])dnl 416552b01e16SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 416649dc963fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 416749dc963fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 416849dc963fSmrg $RM -r conftest 2>/dev/null 416952b01e16Smrg mkdir conftest 417052b01e16Smrg cd conftest 417152b01e16Smrg mkdir out 417252b01e16Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 417352b01e16Smrg 417452b01e16Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 417552b01e16Smrg # Insert the option either (1) after the last *FLAGS variable, or 417652b01e16Smrg # (2) before a word containing "conftest.", or (3) at the end. 417752b01e16Smrg # Note that $ac_compile itself does not contain backslashes and begins 417852b01e16Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 417952b01e16Smrg lt_compile=`echo "$ac_compile" | $SED \ 418052b01e16Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 418152b01e16Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 418252b01e16Smrg -e 's:$: $lt_compiler_flag:'` 418352b01e16Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 418452b01e16Smrg (eval "$lt_compile" 2>out/conftest.err) 418552b01e16Smrg ac_status=$? 418652b01e16Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 418752b01e16Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 418852b01e16Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 418952b01e16Smrg then 419052b01e16Smrg # The compiler can only warn and ignore the option if not recognized 419152b01e16Smrg # So say no if there are warnings 419249dc963fSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 419352b01e16Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 419452b01e16Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 419549dc963fSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 419652b01e16Smrg fi 419752b01e16Smrg fi 419852b01e16Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 419949dc963fSmrg $RM conftest* 420052b01e16Smrg # SGI C++ compiler will create directory out/ii_files/ for 420152b01e16Smrg # template instantiation 420249dc963fSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 420349dc963fSmrg $RM out/* && rmdir out 420452b01e16Smrg cd .. 420549dc963fSmrg $RM -r conftest 420649dc963fSmrg $RM conftest* 420752b01e16Smrg]) 420849dc963fSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 420949dc963fSmrg [Does compiler simultaneously support -c and -o options?]) 421049dc963fSmrg])# _LT_COMPILER_C_O 421152b01e16Smrg 421252b01e16Smrg 421349dc963fSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 421449dc963fSmrg# ---------------------------------- 421552b01e16Smrg# Check to see if we can do hard links to lock some files if needed 421649dc963fSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 421749dc963fSmrg[m4_require([_LT_ENABLE_LOCK])dnl 421849dc963fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 421949dc963fSmrg_LT_COMPILER_C_O([$1]) 422052b01e16Smrg 422152b01e16Smrghard_links="nottested" 422249dc963fSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 422352b01e16Smrg # do not overwrite the value of need_locks provided by the user 422452b01e16Smrg AC_MSG_CHECKING([if we can lock with hard links]) 422552b01e16Smrg hard_links=yes 422649dc963fSmrg $RM conftest* 422752b01e16Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 422852b01e16Smrg touch conftest.a 422952b01e16Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 423052b01e16Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 423152b01e16Smrg AC_MSG_RESULT([$hard_links]) 423252b01e16Smrg if test "$hard_links" = no; then 423352b01e16Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 423452b01e16Smrg need_locks=warn 423552b01e16Smrg fi 42364b0ead49Smrgelse 423752b01e16Smrg need_locks=no 42384b0ead49Smrgfi 423949dc963fSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 424049dc963fSmrg])# _LT_COMPILER_FILE_LOCKS 424152b01e16Smrg 424252b01e16Smrg 424349dc963fSmrg# _LT_CHECK_OBJDIR 424449dc963fSmrg# ---------------- 424549dc963fSmrgm4_defun([_LT_CHECK_OBJDIR], 424652b01e16Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 424752b01e16Smrg[rm -f .libs 2>/dev/null 424852b01e16Smrgmkdir .libs 2>/dev/null 424952b01e16Smrgif test -d .libs; then 425052b01e16Smrg lt_cv_objdir=.libs 42514b0ead49Smrgelse 425252b01e16Smrg # MS-DOS does not allow filenames that begin with a dot. 425352b01e16Smrg lt_cv_objdir=_libs 42544b0ead49Smrgfi 425552b01e16Smrgrmdir .libs 2>/dev/null]) 425652b01e16Smrgobjdir=$lt_cv_objdir 425749dc963fSmrg_LT_DECL([], [objdir], [0], 425849dc963fSmrg [The name of the directory that contains temporary libtool files])dnl 425949dc963fSmrgm4_pattern_allow([LT_OBJDIR])dnl 426049dc963fSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 426149dc963fSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 426249dc963fSmrg])# _LT_CHECK_OBJDIR 42634b0ead49Smrg 426452b01e16Smrg 426549dc963fSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 426649dc963fSmrg# -------------------------------------- 426752b01e16Smrg# Check hardcoding attributes. 426849dc963fSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 426952b01e16Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 427049dc963fSmrg_LT_TAGVAR(hardcode_action, $1)= 427149dc963fSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 427249dc963fSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 427349dc963fSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 427452b01e16Smrg 427549dc963fSmrg # We can hardcode non-existent directories. 427649dc963fSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 427752b01e16Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 427852b01e16Smrg # have to relink, otherwise we might link with an installed library 427952b01e16Smrg # when we should be linking with a yet-to-be-installed one 428049dc963fSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 428149dc963fSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 428252b01e16Smrg # Linking always hardcodes the temporary library directory. 428349dc963fSmrg _LT_TAGVAR(hardcode_action, $1)=relink 428452b01e16Smrg else 428552b01e16Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 428649dc963fSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 428752b01e16Smrg fi 42884b0ead49Smrgelse 428952b01e16Smrg # We cannot hardcode anything, or else we can only hardcode existing 429052b01e16Smrg # directories. 429149dc963fSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 42924b0ead49Smrgfi 429349dc963fSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 42944b0ead49Smrg 429549dc963fSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 429649dc963fSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 429752b01e16Smrg # Fast installation is not supported 429852b01e16Smrg enable_fast_install=no 429952b01e16Smrgelif test "$shlibpath_overrides_runpath" = yes || 430052b01e16Smrg test "$enable_shared" = no; then 430152b01e16Smrg # Fast installation is not necessary 430252b01e16Smrg enable_fast_install=needless 430352b01e16Smrgfi 430449dc963fSmrg_LT_TAGDECL([], [hardcode_action], [0], 430549dc963fSmrg [How to hardcode a shared library path into an executable]) 430649dc963fSmrg])# _LT_LINKER_HARDCODE_LIBPATH 43074b0ead49Smrg 43084b0ead49Smrg 430949dc963fSmrg# _LT_CMD_STRIPLIB 431049dc963fSmrg# ---------------- 431149dc963fSmrgm4_defun([_LT_CMD_STRIPLIB], 431249dc963fSmrg[m4_require([_LT_DECL_EGREP]) 431349dc963fSmrgstriplib= 431452b01e16Smrgold_striplib= 431552b01e16SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 431649dc963fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 431752b01e16Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 431852b01e16Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 431952b01e16Smrg AC_MSG_RESULT([yes]) 432052b01e16Smrgelse 432152b01e16Smrg# FIXME - insert some real tests, host_os isn't really good enough 432252b01e16Smrg case $host_os in 432349dc963fSmrg darwin*) 432449dc963fSmrg if test -n "$STRIP" ; then 432549dc963fSmrg striplib="$STRIP -x" 432649dc963fSmrg old_striplib="$STRIP -S" 432749dc963fSmrg AC_MSG_RESULT([yes]) 432849dc963fSmrg else 432949dc963fSmrg AC_MSG_RESULT([no]) 433049dc963fSmrg fi 433149dc963fSmrg ;; 433249dc963fSmrg *) 433349dc963fSmrg AC_MSG_RESULT([no]) 433452b01e16Smrg ;; 433552b01e16Smrg esac 433652b01e16Smrgfi 433749dc963fSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 433849dc963fSmrg_LT_DECL([], [striplib], [1]) 433949dc963fSmrg])# _LT_CMD_STRIPLIB 43404b0ead49Smrg 43414b0ead49Smrg 434249dc963fSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 434352b01e16Smrg# ----------------------------- 434452b01e16Smrg# PORTME Fill in your ld.so characteristics 434549dc963fSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 434649dc963fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 434749dc963fSmrgm4_require([_LT_DECL_EGREP])dnl 434849dc963fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 434949dc963fSmrgm4_require([_LT_DECL_OBJDUMP])dnl 435049dc963fSmrgm4_require([_LT_DECL_SED])dnl 435152b01e16SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 435249dc963fSmrgm4_if([$1], 435349dc963fSmrg [], [ 435452b01e16Smrgif test "$GCC" = yes; then 435552b01e16Smrg case $host_os in 435652b01e16Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 435752b01e16Smrg *) lt_awk_arg="/^libraries:/" ;; 435852b01e16Smrg esac 435952b01e16Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 436049dc963fSmrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 436152b01e16Smrg # if the path contains ";" then we assume it to be the separator 436252b01e16Smrg # otherwise default to the standard path separator (i.e. ":") - it is 436352b01e16Smrg # assumed that no part of a normal pathname contains ";" but that should 436452b01e16Smrg # okay in the real world where ";" in dirpaths is itself problematic. 436549dc963fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 436652b01e16Smrg else 436749dc963fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 436852b01e16Smrg fi 436952b01e16Smrg # Ok, now we have the path, separated by spaces, we can step through it 437052b01e16Smrg # and add multilib dir if necessary. 437152b01e16Smrg lt_tmp_lt_search_path_spec= 437252b01e16Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 437352b01e16Smrg for lt_sys_path in $lt_search_path_spec; do 437452b01e16Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 437552b01e16Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 43764b0ead49Smrg else 437752b01e16Smrg test -d "$lt_sys_path" && \ 437852b01e16Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 43794b0ead49Smrg fi 438052b01e16Smrg done 438149dc963fSmrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 438252b01e16SmrgBEGIN {RS=" "; FS="/|\n";} { 438352b01e16Smrg lt_foo=""; 438452b01e16Smrg lt_count=0; 438552b01e16Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 438652b01e16Smrg if ($lt_i != "" && $lt_i != ".") { 438752b01e16Smrg if ($lt_i == "..") { 438852b01e16Smrg lt_count++; 438952b01e16Smrg } else { 439052b01e16Smrg if (lt_count == 0) { 439152b01e16Smrg lt_foo="/" $lt_i lt_foo; 439252b01e16Smrg } else { 439352b01e16Smrg lt_count--; 439452b01e16Smrg } 439552b01e16Smrg } 439652b01e16Smrg } 439752b01e16Smrg } 439852b01e16Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 439952b01e16Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 440052b01e16Smrg}'` 440149dc963fSmrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 440252b01e16Smrgelse 440352b01e16Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 440452b01e16Smrgfi]) 440549dc963fSmrglibrary_names_spec= 440649dc963fSmrglibname_spec='lib$name' 440749dc963fSmrgsoname_spec= 440849dc963fSmrgshrext_cmds=".so" 440949dc963fSmrgpostinstall_cmds= 441049dc963fSmrgpostuninstall_cmds= 441149dc963fSmrgfinish_cmds= 441249dc963fSmrgfinish_eval= 441349dc963fSmrgshlibpath_var= 441449dc963fSmrgshlibpath_overrides_runpath=unknown 441549dc963fSmrgversion_type=none 441649dc963fSmrgdynamic_linker="$host_os ld.so" 441749dc963fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 441852b01e16Smrgneed_lib_prefix=unknown 441952b01e16Smrghardcode_into_libs=no 44204b0ead49Smrg 442152b01e16Smrg# when you set need_version to no, make sure it does not cause -set_version 442252b01e16Smrg# flags to be left without arguments 442352b01e16Smrgneed_version=unknown 44244b0ead49Smrg 442552b01e16Smrgcase $host_os in 442652b01e16Smrgaix3*) 442752b01e16Smrg version_type=linux 442852b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 442952b01e16Smrg shlibpath_var=LIBPATH 44304b0ead49Smrg 443152b01e16Smrg # AIX 3 has no versioning support, so we append a major version to the name. 443252b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 443352b01e16Smrg ;; 44344b0ead49Smrg 443552b01e16Smrgaix[[4-9]]*) 443652b01e16Smrg version_type=linux 443752b01e16Smrg need_lib_prefix=no 443852b01e16Smrg need_version=no 443952b01e16Smrg hardcode_into_libs=yes 444052b01e16Smrg if test "$host_cpu" = ia64; then 444152b01e16Smrg # AIX 5 supports IA64 444252b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 444352b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 444452b01e16Smrg else 444552b01e16Smrg # With GCC up to 2.95.x, collect2 would create an import file 444652b01e16Smrg # for dependence libraries. The import file would start with 444752b01e16Smrg # the line `#! .'. This would cause the generated library to 444852b01e16Smrg # depend on `.', always an invalid library. This was fixed in 444952b01e16Smrg # development snapshots of GCC prior to 3.0. 445052b01e16Smrg case $host_os in 445152b01e16Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 445252b01e16Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 445352b01e16Smrg echo ' yes ' 445449dc963fSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 445552b01e16Smrg : 445652b01e16Smrg else 445752b01e16Smrg can_build_shared=no 445852b01e16Smrg fi 445952b01e16Smrg ;; 446052b01e16Smrg esac 446152b01e16Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 446252b01e16Smrg # soname into executable. Probably we can add versioning support to 446352b01e16Smrg # collect2, so additional links can be useful in future. 446452b01e16Smrg if test "$aix_use_runtimelinking" = yes; then 446552b01e16Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 446652b01e16Smrg # instead of lib<name>.a to let people know that these are not 446752b01e16Smrg # typical AIX shared libraries. 446852b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 44694b0ead49Smrg else 447052b01e16Smrg # We preserve .a as extension for shared libraries through AIX4.2 447152b01e16Smrg # and later when we are not doing run time linking. 447252b01e16Smrg library_names_spec='${libname}${release}.a $libname.a' 447352b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 44744b0ead49Smrg fi 447552b01e16Smrg shlibpath_var=LIBPATH 447652b01e16Smrg fi 447752b01e16Smrg ;; 44784b0ead49Smrg 447952b01e16Smrgamigaos*) 448049dc963fSmrg case $host_cpu in 448149dc963fSmrg powerpc) 448249dc963fSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 448349dc963fSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 448449dc963fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 448549dc963fSmrg ;; 448649dc963fSmrg m68k) 448749dc963fSmrg library_names_spec='$libname.ixlibrary $libname.a' 448849dc963fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 448949dc963fSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 449049dc963fSmrg ;; 449149dc963fSmrg esac 449252b01e16Smrg ;; 44934b0ead49Smrg 449452b01e16Smrgbeos*) 449552b01e16Smrg library_names_spec='${libname}${shared_ext}' 449652b01e16Smrg dynamic_linker="$host_os ld.so" 449752b01e16Smrg shlibpath_var=LIBRARY_PATH 449852b01e16Smrg ;; 44994b0ead49Smrg 450052b01e16Smrgbsdi[[45]]*) 450152b01e16Smrg version_type=linux 450252b01e16Smrg need_version=no 450352b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 450452b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 450552b01e16Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 450652b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 450752b01e16Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 450852b01e16Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 450952b01e16Smrg # the default ld.so.conf also contains /usr/contrib/lib and 451052b01e16Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 451152b01e16Smrg # libtool to hard-code these into programs 451252b01e16Smrg ;; 45134b0ead49Smrg 451449dc963fSmrgcygwin* | mingw* | pw32* | cegcc*) 451552b01e16Smrg version_type=windows 451652b01e16Smrg shrext_cmds=".dll" 451752b01e16Smrg need_version=no 451852b01e16Smrg need_lib_prefix=no 45194b0ead49Smrg 452052b01e16Smrg case $GCC,$host_os in 452149dc963fSmrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 452252b01e16Smrg library_names_spec='$libname.dll.a' 452352b01e16Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 452452b01e16Smrg postinstall_cmds='base_file=`basename \${file}`~ 452549dc963fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 452652b01e16Smrg dldir=$destdir/`dirname \$dlpath`~ 452752b01e16Smrg test -d \$dldir || mkdir -p \$dldir~ 452852b01e16Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 452949dc963fSmrg chmod a+x \$dldir/$dlname~ 453049dc963fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 453149dc963fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 453249dc963fSmrg fi' 453352b01e16Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 453452b01e16Smrg dlpath=$dir/\$dldll~ 453549dc963fSmrg $RM \$dlpath' 453652b01e16Smrg shlibpath_overrides_runpath=yes 453752b01e16Smrg 453852b01e16Smrg case $host_os in 453952b01e16Smrg cygwin*) 454052b01e16Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 454152b01e16Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 454252b01e16Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 454352b01e16Smrg ;; 454449dc963fSmrg mingw* | cegcc*) 454552b01e16Smrg # MinGW DLLs use traditional 'lib' prefix 454652b01e16Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 454749dc963fSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 454849dc963fSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 454952b01e16Smrg # It is most probably a Windows format PATH printed by 455052b01e16Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 455152b01e16Smrg # path with ; separators, and with drive letters. We can handle the 455252b01e16Smrg # drive letters (cygwin fileutils understands them), so leave them, 455352b01e16Smrg # especially as we might pass files found there to a mingw objdump, 455452b01e16Smrg # which wouldn't understand a cygwinified path. Ahh. 455549dc963fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 45564b0ead49Smrg else 455749dc963fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 45584b0ead49Smrg fi 455952b01e16Smrg ;; 456052b01e16Smrg pw32*) 456152b01e16Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 456252b01e16Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 456352b01e16Smrg ;; 456452b01e16Smrg esac 45654b0ead49Smrg ;; 45664b0ead49Smrg 456752b01e16Smrg *) 456852b01e16Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 45694b0ead49Smrg ;; 457052b01e16Smrg esac 457152b01e16Smrg dynamic_linker='Win32 ld.exe' 457252b01e16Smrg # FIXME: first we should search . and the directory the executable is in 457352b01e16Smrg shlibpath_var=PATH 457452b01e16Smrg ;; 45754b0ead49Smrg 457652b01e16Smrgdarwin* | rhapsody*) 457752b01e16Smrg dynamic_linker="$host_os dyld" 457852b01e16Smrg version_type=darwin 457952b01e16Smrg need_lib_prefix=no 458052b01e16Smrg need_version=no 458149dc963fSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 458252b01e16Smrg soname_spec='${libname}${release}${major}$shared_ext' 458352b01e16Smrg shlibpath_overrides_runpath=yes 458452b01e16Smrg shlibpath_var=DYLD_LIBRARY_PATH 458552b01e16Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 458649dc963fSmrgm4_if([$1], [],[ 458749dc963fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 458852b01e16Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 458952b01e16Smrg ;; 45904b0ead49Smrg 459152b01e16Smrgdgux*) 459252b01e16Smrg version_type=linux 459352b01e16Smrg need_lib_prefix=no 459452b01e16Smrg need_version=no 459552b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 459652b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 459752b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 45984b0ead49Smrg ;; 45994b0ead49Smrg 460052b01e16Smrgfreebsd1*) 460152b01e16Smrg dynamic_linker=no 460252b01e16Smrg ;; 46034b0ead49Smrg 460452b01e16Smrgfreebsd* | dragonfly*) 460552b01e16Smrg # DragonFly does not have aout. When/if they implement a new 460652b01e16Smrg # versioning mechanism, adjust this. 460752b01e16Smrg if test -x /usr/bin/objformat; then 460852b01e16Smrg objformat=`/usr/bin/objformat` 460952b01e16Smrg else 461052b01e16Smrg case $host_os in 461152b01e16Smrg freebsd[[123]]*) objformat=aout ;; 461252b01e16Smrg *) objformat=elf ;; 46134b0ead49Smrg esac 461452b01e16Smrg fi 461552b01e16Smrg version_type=freebsd-$objformat 461652b01e16Smrg case $version_type in 461752b01e16Smrg freebsd-elf*) 461852b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 461952b01e16Smrg need_version=no 462052b01e16Smrg need_lib_prefix=no 462152b01e16Smrg ;; 462252b01e16Smrg freebsd-*) 462352b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 462452b01e16Smrg need_version=yes 462552b01e16Smrg ;; 462652b01e16Smrg esac 462752b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 462852b01e16Smrg case $host_os in 462952b01e16Smrg freebsd2*) 463052b01e16Smrg shlibpath_overrides_runpath=yes 46314b0ead49Smrg ;; 463252b01e16Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 463352b01e16Smrg shlibpath_overrides_runpath=yes 463452b01e16Smrg hardcode_into_libs=yes 46354b0ead49Smrg ;; 463652b01e16Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 463752b01e16Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 463852b01e16Smrg shlibpath_overrides_runpath=no 463952b01e16Smrg hardcode_into_libs=yes 46404b0ead49Smrg ;; 464152b01e16Smrg *) # from 4.6 on, and DragonFly 464252b01e16Smrg shlibpath_overrides_runpath=yes 464352b01e16Smrg hardcode_into_libs=yes 46444b0ead49Smrg ;; 464552b01e16Smrg esac 464652b01e16Smrg ;; 464752b01e16Smrg 464852b01e16Smrggnu*) 464952b01e16Smrg version_type=linux 465052b01e16Smrg need_lib_prefix=no 465152b01e16Smrg need_version=no 465252b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 465352b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 465452b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 465552b01e16Smrg hardcode_into_libs=yes 465652b01e16Smrg ;; 465752b01e16Smrg 465852b01e16Smrghpux9* | hpux10* | hpux11*) 465952b01e16Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 466052b01e16Smrg # link against other versions. 466152b01e16Smrg version_type=sunos 466252b01e16Smrg need_lib_prefix=no 466352b01e16Smrg need_version=no 466452b01e16Smrg case $host_cpu in 466552b01e16Smrg ia64*) 466652b01e16Smrg shrext_cmds='.so' 466752b01e16Smrg hardcode_into_libs=yes 466852b01e16Smrg dynamic_linker="$host_os dld.so" 466952b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 467052b01e16Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 467152b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 467252b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 467352b01e16Smrg if test "X$HPUX_IA64_MODE" = X32; then 467452b01e16Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 467552b01e16Smrg else 467652b01e16Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 467752b01e16Smrg fi 467852b01e16Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 46794b0ead49Smrg ;; 468049dc963fSmrg hppa*64*) 468149dc963fSmrg shrext_cmds='.sl' 468249dc963fSmrg hardcode_into_libs=yes 468349dc963fSmrg dynamic_linker="$host_os dld.sl" 468449dc963fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 468549dc963fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 468649dc963fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 468749dc963fSmrg soname_spec='${libname}${release}${shared_ext}$major' 468849dc963fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 468949dc963fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 469049dc963fSmrg ;; 469149dc963fSmrg *) 469252b01e16Smrg shrext_cmds='.sl' 469352b01e16Smrg dynamic_linker="$host_os dld.sl" 469452b01e16Smrg shlibpath_var=SHLIB_PATH 469552b01e16Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 469652b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 469752b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 469852b01e16Smrg ;; 469952b01e16Smrg esac 470052b01e16Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 470152b01e16Smrg postinstall_cmds='chmod 555 $lib' 470252b01e16Smrg ;; 47034b0ead49Smrg 470452b01e16Smrginterix[[3-9]]*) 470552b01e16Smrg version_type=linux 470652b01e16Smrg need_lib_prefix=no 470752b01e16Smrg need_version=no 470852b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 470952b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 471052b01e16Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 471152b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 471252b01e16Smrg shlibpath_overrides_runpath=no 471352b01e16Smrg hardcode_into_libs=yes 471452b01e16Smrg ;; 471552b01e16Smrg 471652b01e16Smrgirix5* | irix6* | nonstopux*) 471752b01e16Smrg case $host_os in 471852b01e16Smrg nonstopux*) version_type=nonstopux ;; 47194b0ead49Smrg *) 472052b01e16Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 472152b01e16Smrg version_type=linux 472252b01e16Smrg else 472352b01e16Smrg version_type=irix 472452b01e16Smrg fi ;; 472552b01e16Smrg esac 472652b01e16Smrg need_lib_prefix=no 472752b01e16Smrg need_version=no 472852b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 472952b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 473052b01e16Smrg case $host_os in 473152b01e16Smrg irix5* | nonstopux*) 473252b01e16Smrg libsuff= shlibsuff= 473352b01e16Smrg ;; 473452b01e16Smrg *) 473552b01e16Smrg case $LD in # libtool.m4 will add one of these switches to LD 473652b01e16Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 473752b01e16Smrg libsuff= shlibsuff= libmagic=32-bit;; 473852b01e16Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 473952b01e16Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 474052b01e16Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 474152b01e16Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 474252b01e16Smrg *) libsuff= shlibsuff= libmagic=never-match;; 47434b0ead49Smrg esac 47444b0ead49Smrg ;; 474552b01e16Smrg esac 474652b01e16Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 474752b01e16Smrg shlibpath_overrides_runpath=no 474852b01e16Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 474952b01e16Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 475052b01e16Smrg hardcode_into_libs=yes 475152b01e16Smrg ;; 47524b0ead49Smrg 475352b01e16Smrg# No shared lib support for Linux oldld, aout, or coff. 475452b01e16Smrglinux*oldld* | linux*aout* | linux*coff*) 475552b01e16Smrg dynamic_linker=no 475652b01e16Smrg ;; 47574b0ead49Smrg 475852b01e16Smrg# This must be Linux ELF. 475952b01e16Smrglinux* | k*bsd*-gnu) 476052b01e16Smrg version_type=linux 476152b01e16Smrg need_lib_prefix=no 476252b01e16Smrg need_version=no 476352b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 476452b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 476552b01e16Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 476652b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 476752b01e16Smrg shlibpath_overrides_runpath=no 476849dc963fSmrg # Some binutils ld are patched to set DT_RUNPATH 476949dc963fSmrg save_LDFLAGS=$LDFLAGS 477049dc963fSmrg save_libdir=$libdir 477149dc963fSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 477249dc963fSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 477349dc963fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 477449dc963fSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 477549dc963fSmrg [shlibpath_overrides_runpath=yes])]) 477649dc963fSmrg LDFLAGS=$save_LDFLAGS 477749dc963fSmrg libdir=$save_libdir 477849dc963fSmrg 477952b01e16Smrg # This implies no fast_install, which is unacceptable. 478052b01e16Smrg # Some rework will be needed to allow for fast_install 478152b01e16Smrg # before this can be enabled. 478252b01e16Smrg hardcode_into_libs=yes 47834b0ead49Smrg 478452b01e16Smrg # Append ld.so.conf contents to the search path 478552b01e16Smrg if test -f /etc/ld.so.conf; then 478649dc963fSmrg 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;/^$/d' | tr '\n' ' '` 478752b01e16Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 478852b01e16Smrg fi 47894b0ead49Smrg 479052b01e16Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 479152b01e16Smrg # powerpc, because MkLinux only supported shared libraries with the 479252b01e16Smrg # GNU dynamic linker. Since this was broken with cross compilers, 479352b01e16Smrg # most powerpc-linux boxes support dynamic linking these days and 479452b01e16Smrg # people can always --disable-shared, the test was removed, and we 479552b01e16Smrg # assume the GNU/Linux dynamic linker is in use. 479652b01e16Smrg dynamic_linker='GNU/Linux ld.so' 479752b01e16Smrg ;; 47984b0ead49Smrg 479952b01e16Smrgnetbsd*) 480052b01e16Smrg version_type=sunos 480152b01e16Smrg need_lib_prefix=no 480252b01e16Smrg need_version=no 480349dc963fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 480452b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 480552b01e16Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 480652b01e16Smrg dynamic_linker='NetBSD (a.out) ld.so' 480752b01e16Smrg else 480852b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 480952b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 481052b01e16Smrg dynamic_linker='NetBSD ld.elf_so' 481152b01e16Smrg fi 481252b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 481352b01e16Smrg shlibpath_overrides_runpath=yes 481452b01e16Smrg hardcode_into_libs=yes 481552b01e16Smrg ;; 48164b0ead49Smrg 481752b01e16Smrgnewsos6) 481852b01e16Smrg version_type=linux 481952b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 482052b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 482152b01e16Smrg shlibpath_overrides_runpath=yes 482252b01e16Smrg ;; 482352b01e16Smrg 482449dc963fSmrg*nto* | *qnx*) 482549dc963fSmrg version_type=qnx 482652b01e16Smrg need_lib_prefix=no 482752b01e16Smrg need_version=no 482852b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 482952b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 483052b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 483149dc963fSmrg shlibpath_overrides_runpath=no 483249dc963fSmrg hardcode_into_libs=yes 483349dc963fSmrg dynamic_linker='ldqnx.so' 483452b01e16Smrg ;; 483552b01e16Smrg 483652b01e16Smrgopenbsd*) 483752b01e16Smrg version_type=sunos 483852b01e16Smrg sys_lib_dlsearch_path_spec="/usr/lib" 483952b01e16Smrg need_lib_prefix=no 484052b01e16Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 484152b01e16Smrg case $host_os in 484249dc963fSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 484349dc963fSmrg *) need_version=no ;; 484452b01e16Smrg esac 484552b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 484652b01e16Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 484752b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 484849dc963fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 484952b01e16Smrg case $host_os in 485052b01e16Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 485152b01e16Smrg shlibpath_overrides_runpath=no 48524b0ead49Smrg ;; 485352b01e16Smrg *) 485452b01e16Smrg shlibpath_overrides_runpath=yes 48554b0ead49Smrg ;; 485652b01e16Smrg esac 485752b01e16Smrg else 485852b01e16Smrg shlibpath_overrides_runpath=yes 485952b01e16Smrg fi 486052b01e16Smrg ;; 48614b0ead49Smrg 486252b01e16Smrgos2*) 486352b01e16Smrg libname_spec='$name' 486452b01e16Smrg shrext_cmds=".dll" 486552b01e16Smrg need_lib_prefix=no 486652b01e16Smrg library_names_spec='$libname${shared_ext} $libname.a' 486752b01e16Smrg dynamic_linker='OS/2 ld.exe' 486852b01e16Smrg shlibpath_var=LIBPATH 486952b01e16Smrg ;; 48704b0ead49Smrg 487152b01e16Smrgosf3* | osf4* | osf5*) 487252b01e16Smrg version_type=osf 487352b01e16Smrg need_lib_prefix=no 487452b01e16Smrg need_version=no 487552b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 487652b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 487752b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 487852b01e16Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 487952b01e16Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 488052b01e16Smrg ;; 48814b0ead49Smrg 488252b01e16Smrgrdos*) 488352b01e16Smrg dynamic_linker=no 488452b01e16Smrg ;; 48854b0ead49Smrg 488652b01e16Smrgsolaris*) 488752b01e16Smrg version_type=linux 488852b01e16Smrg need_lib_prefix=no 488952b01e16Smrg need_version=no 489052b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 489152b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 489252b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 489352b01e16Smrg shlibpath_overrides_runpath=yes 489452b01e16Smrg hardcode_into_libs=yes 489552b01e16Smrg # ldd complains unless libraries are executable 489652b01e16Smrg postinstall_cmds='chmod +x $lib' 489752b01e16Smrg ;; 48984b0ead49Smrg 489952b01e16Smrgsunos4*) 490052b01e16Smrg version_type=sunos 490152b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 490252b01e16Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 490352b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 490452b01e16Smrg shlibpath_overrides_runpath=yes 490552b01e16Smrg if test "$with_gnu_ld" = yes; then 490652b01e16Smrg need_lib_prefix=no 490752b01e16Smrg fi 490852b01e16Smrg need_version=yes 490952b01e16Smrg ;; 49104b0ead49Smrg 491152b01e16Smrgsysv4 | sysv4.3*) 491252b01e16Smrg version_type=linux 491352b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 491452b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 491552b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 491652b01e16Smrg case $host_vendor in 491752b01e16Smrg sni) 491852b01e16Smrg shlibpath_overrides_runpath=no 491952b01e16Smrg need_lib_prefix=no 492052b01e16Smrg runpath_var=LD_RUN_PATH 492152b01e16Smrg ;; 492252b01e16Smrg siemens) 492352b01e16Smrg need_lib_prefix=no 492452b01e16Smrg ;; 492552b01e16Smrg motorola) 492652b01e16Smrg need_lib_prefix=no 492752b01e16Smrg need_version=no 492852b01e16Smrg shlibpath_overrides_runpath=no 492952b01e16Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 493052b01e16Smrg ;; 493152b01e16Smrg esac 493252b01e16Smrg ;; 49334b0ead49Smrg 493452b01e16Smrgsysv4*MP*) 493552b01e16Smrg if test -d /usr/nec ;then 493652b01e16Smrg version_type=linux 493752b01e16Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 493852b01e16Smrg soname_spec='$libname${shared_ext}.$major' 493952b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 494052b01e16Smrg fi 494152b01e16Smrg ;; 494252b01e16Smrg 494352b01e16Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 494452b01e16Smrg version_type=freebsd-elf 494552b01e16Smrg need_lib_prefix=no 494652b01e16Smrg need_version=no 494752b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 494852b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 494952b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 495049dc963fSmrg shlibpath_overrides_runpath=yes 495152b01e16Smrg hardcode_into_libs=yes 495252b01e16Smrg if test "$with_gnu_ld" = yes; then 495352b01e16Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 495452b01e16Smrg else 495552b01e16Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 495652b01e16Smrg case $host_os in 495752b01e16Smrg sco3.2v5*) 495852b01e16Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 49594b0ead49Smrg ;; 496052b01e16Smrg esac 496152b01e16Smrg fi 496252b01e16Smrg sys_lib_dlsearch_path_spec='/usr/lib' 496352b01e16Smrg ;; 49644b0ead49Smrg 496549dc963fSmrgtpf*) 496649dc963fSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 496749dc963fSmrg version_type=linux 496849dc963fSmrg need_lib_prefix=no 496949dc963fSmrg need_version=no 497049dc963fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 497149dc963fSmrg shlibpath_var=LD_LIBRARY_PATH 497249dc963fSmrg shlibpath_overrides_runpath=no 497349dc963fSmrg hardcode_into_libs=yes 497449dc963fSmrg ;; 497549dc963fSmrg 497652b01e16Smrguts4*) 497752b01e16Smrg version_type=linux 497852b01e16Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 497952b01e16Smrg soname_spec='${libname}${release}${shared_ext}$major' 498052b01e16Smrg shlibpath_var=LD_LIBRARY_PATH 498152b01e16Smrg ;; 49824b0ead49Smrg 498352b01e16Smrg*) 498452b01e16Smrg dynamic_linker=no 498552b01e16Smrg ;; 498652b01e16Smrgesac 498752b01e16SmrgAC_MSG_RESULT([$dynamic_linker]) 498852b01e16Smrgtest "$dynamic_linker" = no && can_build_shared=no 49894b0ead49Smrg 499052b01e16Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 499152b01e16Smrgif test "$GCC" = yes; then 499252b01e16Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 499352b01e16Smrgfi 49944b0ead49Smrg 499549dc963fSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 499649dc963fSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 499749dc963fSmrgfi 499849dc963fSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 499949dc963fSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 500049dc963fSmrgfi 50014b0ead49Smrg 500249dc963fSmrg_LT_DECL([], [variables_saved_for_relink], [1], 500349dc963fSmrg [Variables whose values should be saved in libtool wrapper scripts and 500449dc963fSmrg restored at link time]) 500549dc963fSmrg_LT_DECL([], [need_lib_prefix], [0], 500649dc963fSmrg [Do we need the "lib" prefix for modules?]) 500749dc963fSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 500849dc963fSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 500949dc963fSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 501049dc963fSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 501149dc963fSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 501249dc963fSmrg [Is shlibpath searched before the hard-coded library search path?]) 501349dc963fSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 501449dc963fSmrg_LT_DECL([], [library_names_spec], [1], 501549dc963fSmrg [[List of archive names. First name is the real one, the rest are links. 501649dc963fSmrg The last name is the one that the linker finds with -lNAME]]) 501749dc963fSmrg_LT_DECL([], [soname_spec], [1], 501849dc963fSmrg [[The coded name of the library, if different from the real name]]) 501949dc963fSmrg_LT_DECL([], [postinstall_cmds], [2], 502049dc963fSmrg [Command to use after installation of a shared archive]) 502149dc963fSmrg_LT_DECL([], [postuninstall_cmds], [2], 502249dc963fSmrg [Command to use after uninstallation of a shared archive]) 502349dc963fSmrg_LT_DECL([], [finish_cmds], [2], 502449dc963fSmrg [Commands used to finish a libtool library installation in a directory]) 502549dc963fSmrg_LT_DECL([], [finish_eval], [1], 502649dc963fSmrg [[As "finish_cmds", except a single script fragment to be evaled but 502749dc963fSmrg not shown]]) 502849dc963fSmrg_LT_DECL([], [hardcode_into_libs], [0], 502949dc963fSmrg [Whether we should hardcode library paths into libraries]) 503049dc963fSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 503149dc963fSmrg [Compile-time system search path for libraries]) 503249dc963fSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 503349dc963fSmrg [Run-time system search path for libraries]) 503449dc963fSmrg])# _LT_SYS_DYNAMIC_LINKER 503549dc963fSmrg 503649dc963fSmrg 503749dc963fSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 503849dc963fSmrg# -------------------------- 503949dc963fSmrg# find a file program which can recognize shared library 504049dc963fSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 504149dc963fSmrg[m4_require([_LT_DECL_EGREP])dnl 504249dc963fSmrgAC_MSG_CHECKING([for $1]) 504349dc963fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 504449dc963fSmrg[case $MAGIC_CMD in 504549dc963fSmrg[[\\/*] | ?:[\\/]*]) 504649dc963fSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 504749dc963fSmrg ;; 504849dc963fSmrg*) 504949dc963fSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 505049dc963fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 505149dc963fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 505249dc963fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 505349dc963fSmrgdnl not every word. This closes a longstanding sh security hole. 505449dc963fSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 505549dc963fSmrg for ac_dir in $ac_dummy; do 505652b01e16Smrg IFS="$lt_save_ifs" 505752b01e16Smrg test -z "$ac_dir" && ac_dir=. 505852b01e16Smrg if test -f $ac_dir/$1; then 505952b01e16Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 506052b01e16Smrg if test -n "$file_magic_test_file"; then 506152b01e16Smrg case $deplibs_check_method in 506252b01e16Smrg "file_magic "*) 506352b01e16Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 506452b01e16Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 506552b01e16Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 506652b01e16Smrg $EGREP "$file_magic_regex" > /dev/null; then 506752b01e16Smrg : 506852b01e16Smrg else 506949dc963fSmrg cat <<_LT_EOF 1>&2 50704b0ead49Smrg 507152b01e16Smrg*** Warning: the command libtool uses to detect shared libraries, 507252b01e16Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 507352b01e16Smrg*** The result is that libtool may fail to recognize shared libraries 507452b01e16Smrg*** as such. This will affect the creation of libtool libraries that 507552b01e16Smrg*** depend on shared libraries, but programs linked with such libtool 507652b01e16Smrg*** libraries will work regardless of this problem. Nevertheless, you 507752b01e16Smrg*** may want to report the problem to your system manager and/or to 507852b01e16Smrg*** bug-libtool@gnu.org 507952b01e16Smrg 508049dc963fSmrg_LT_EOF 508152b01e16Smrg fi ;; 508252b01e16Smrg esac 508352b01e16Smrg fi 508452b01e16Smrg break 508552b01e16Smrg fi 508652b01e16Smrg done 508752b01e16Smrg IFS="$lt_save_ifs" 508852b01e16Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 508952b01e16Smrg ;; 509052b01e16Smrgesac]) 509152b01e16SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 509252b01e16Smrgif test -n "$MAGIC_CMD"; then 509352b01e16Smrg AC_MSG_RESULT($MAGIC_CMD) 50944b0ead49Smrgelse 509552b01e16Smrg AC_MSG_RESULT(no) 50964b0ead49Smrgfi 509749dc963fSmrg_LT_DECL([], [MAGIC_CMD], [0], 509849dc963fSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 509949dc963fSmrg])# _LT_PATH_TOOL_PREFIX 51004b0ead49Smrg 510149dc963fSmrg# Old name: 510249dc963fSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 510349dc963fSmrgdnl aclocal-1.4 backwards compatibility: 510449dc963fSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 51054b0ead49Smrg 510649dc963fSmrg 510749dc963fSmrg# _LT_PATH_MAGIC 510849dc963fSmrg# -------------- 510952b01e16Smrg# find a file program which can recognize a shared library 511049dc963fSmrgm4_defun([_LT_PATH_MAGIC], 511149dc963fSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 511252b01e16Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 511352b01e16Smrg if test -n "$ac_tool_prefix"; then 511449dc963fSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 511552b01e16Smrg else 511652b01e16Smrg MAGIC_CMD=: 511752b01e16Smrg fi 511852b01e16Smrgfi 511949dc963fSmrg])# _LT_PATH_MAGIC 51204b0ead49Smrg 512152b01e16Smrg 512249dc963fSmrg# LT_PATH_LD 512352b01e16Smrg# ---------- 512452b01e16Smrg# find the pathname to the GNU or non-GNU linker 512549dc963fSmrgAC_DEFUN([LT_PATH_LD], 512649dc963fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 512752b01e16SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 512852b01e16SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 512949dc963fSmrgm4_require([_LT_DECL_SED])dnl 513049dc963fSmrgm4_require([_LT_DECL_EGREP])dnl 513149dc963fSmrg 513249dc963fSmrgAC_ARG_WITH([gnu-ld], 513349dc963fSmrg [AS_HELP_STRING([--with-gnu-ld], 513449dc963fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 513549dc963fSmrg [test "$withval" = no || with_gnu_ld=yes], 513649dc963fSmrg [with_gnu_ld=no])dnl 513749dc963fSmrg 513852b01e16Smrgac_prog=ld 513952b01e16Smrgif test "$GCC" = yes; then 514052b01e16Smrg # Check if gcc -print-prog-name=ld gives a path. 514152b01e16Smrg AC_MSG_CHECKING([for ld used by $CC]) 514252b01e16Smrg case $host in 514352b01e16Smrg *-*-mingw*) 514452b01e16Smrg # gcc leaves a trailing carriage return which upsets mingw 514552b01e16Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 514652b01e16Smrg *) 514752b01e16Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 514852b01e16Smrg esac 514952b01e16Smrg case $ac_prog in 515052b01e16Smrg # Accept absolute paths. 515152b01e16Smrg [[\\/]]* | ?:[[\\/]]*) 515252b01e16Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 515352b01e16Smrg # Canonicalize the pathname of ld 515449dc963fSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 515549dc963fSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 515649dc963fSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 515752b01e16Smrg done 515852b01e16Smrg test -z "$LD" && LD="$ac_prog" 515952b01e16Smrg ;; 516052b01e16Smrg "") 516152b01e16Smrg # If it fails, then pretend we aren't using GCC. 516252b01e16Smrg ac_prog=ld 516352b01e16Smrg ;; 516452b01e16Smrg *) 516552b01e16Smrg # If it is relative, then search for the first ld in PATH. 516652b01e16Smrg with_gnu_ld=unknown 51674b0ead49Smrg ;; 51684b0ead49Smrg esac 516952b01e16Smrgelif test "$with_gnu_ld" = yes; then 517052b01e16Smrg AC_MSG_CHECKING([for GNU ld]) 517152b01e16Smrgelse 517252b01e16Smrg AC_MSG_CHECKING([for non-GNU ld]) 517352b01e16Smrgfi 517452b01e16SmrgAC_CACHE_VAL(lt_cv_path_LD, 517552b01e16Smrg[if test -z "$LD"; then 517652b01e16Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 517752b01e16Smrg for ac_dir in $PATH; do 517852b01e16Smrg IFS="$lt_save_ifs" 517952b01e16Smrg test -z "$ac_dir" && ac_dir=. 518052b01e16Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 518152b01e16Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 518252b01e16Smrg # Check to see if the program is GNU ld. I'd rather use --version, 518352b01e16Smrg # but apparently some variants of GNU ld only accept -v. 518452b01e16Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 518552b01e16Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 518652b01e16Smrg *GNU* | *'with BFD'*) 518752b01e16Smrg test "$with_gnu_ld" != no && break 518852b01e16Smrg ;; 518952b01e16Smrg *) 519052b01e16Smrg test "$with_gnu_ld" != yes && break 519152b01e16Smrg ;; 519252b01e16Smrg esac 519352b01e16Smrg fi 519452b01e16Smrg done 519552b01e16Smrg IFS="$lt_save_ifs" 519652b01e16Smrgelse 519752b01e16Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 519852b01e16Smrgfi]) 519952b01e16SmrgLD="$lt_cv_path_LD" 520052b01e16Smrgif test -n "$LD"; then 520152b01e16Smrg AC_MSG_RESULT($LD) 520252b01e16Smrgelse 520352b01e16Smrg AC_MSG_RESULT(no) 520452b01e16Smrgfi 520552b01e16Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 520649dc963fSmrg_LT_PATH_LD_GNU 520749dc963fSmrgAC_SUBST([LD]) 520852b01e16Smrg 520949dc963fSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 521049dc963fSmrg])# LT_PATH_LD 521152b01e16Smrg 521249dc963fSmrg# Old names: 521349dc963fSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 521449dc963fSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 521549dc963fSmrgdnl aclocal-1.4 backwards compatibility: 521649dc963fSmrgdnl AC_DEFUN([AM_PROG_LD], []) 521749dc963fSmrgdnl AC_DEFUN([AC_PROG_LD], []) 521849dc963fSmrg 521949dc963fSmrg 522049dc963fSmrg# _LT_PATH_LD_GNU 522149dc963fSmrg#- -------------- 522249dc963fSmrgm4_defun([_LT_PATH_LD_GNU], 522349dc963fSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 522452b01e16Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 522552b01e16Smrgcase `$LD -v 2>&1 </dev/null` in 522652b01e16Smrg*GNU* | *'with BFD'*) 522752b01e16Smrg lt_cv_prog_gnu_ld=yes 52284b0ead49Smrg ;; 522952b01e16Smrg*) 523052b01e16Smrg lt_cv_prog_gnu_ld=no 523152b01e16Smrg ;; 523252b01e16Smrgesac]) 523352b01e16Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 523449dc963fSmrg])# _LT_PATH_LD_GNU 52354b0ead49Smrg 523652b01e16Smrg 523749dc963fSmrg# _LT_CMD_RELOAD 523849dc963fSmrg# -------------- 523952b01e16Smrg# find reload flag for linker 524052b01e16Smrg# -- PORTME Some linkers may need a different reload flag. 524149dc963fSmrgm4_defun([_LT_CMD_RELOAD], 524252b01e16Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 524352b01e16Smrg lt_cv_ld_reload_flag, 524452b01e16Smrg [lt_cv_ld_reload_flag='-r']) 524552b01e16Smrgreload_flag=$lt_cv_ld_reload_flag 524652b01e16Smrgcase $reload_flag in 524752b01e16Smrg"" | " "*) ;; 524852b01e16Smrg*) reload_flag=" $reload_flag" ;; 52494b0ead49Smrgesac 525052b01e16Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 525152b01e16Smrgcase $host_os in 525252b01e16Smrg darwin*) 525352b01e16Smrg if test "$GCC" = yes; then 525452b01e16Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 525552b01e16Smrg else 525652b01e16Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 525752b01e16Smrg fi 525852b01e16Smrg ;; 525952b01e16Smrgesac 526049dc963fSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 526149dc963fSmrg_LT_DECL([], [reload_cmds], [2])dnl 526249dc963fSmrg])# _LT_CMD_RELOAD 52634b0ead49Smrg 52644b0ead49Smrg 526549dc963fSmrg# _LT_CHECK_MAGIC_METHOD 526649dc963fSmrg# ---------------------- 526752b01e16Smrg# how to check for library dependencies 526852b01e16Smrg# -- PORTME fill in with the dynamic library characteristics 526949dc963fSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 527049dc963fSmrg[m4_require([_LT_DECL_EGREP]) 527149dc963fSmrgm4_require([_LT_DECL_OBJDUMP]) 527249dc963fSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 527352b01e16Smrglt_cv_deplibs_check_method, 527452b01e16Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 527552b01e16Smrglt_cv_file_magic_test_file= 527652b01e16Smrglt_cv_deplibs_check_method='unknown' 527752b01e16Smrg# Need to set the preceding variable on all platforms that support 527852b01e16Smrg# interlibrary dependencies. 527952b01e16Smrg# 'none' -- dependencies not supported. 528052b01e16Smrg# `unknown' -- same as none, but documents that we really don't know. 528152b01e16Smrg# 'pass_all' -- all dependencies passed with no checks. 528252b01e16Smrg# 'test_compile' -- check by making test program. 528352b01e16Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 528452b01e16Smrg# which responds to the $file_magic_cmd with a given extended regex. 528552b01e16Smrg# If you have `file' or equivalent on your system and you're not sure 528652b01e16Smrg# whether `pass_all' will *always* work, you probably want this one. 52874b0ead49Smrg 528852b01e16Smrgcase $host_os in 528952b01e16Smrgaix[[4-9]]*) 529052b01e16Smrg lt_cv_deplibs_check_method=pass_all 529152b01e16Smrg ;; 52924b0ead49Smrg 529352b01e16Smrgbeos*) 529452b01e16Smrg lt_cv_deplibs_check_method=pass_all 529552b01e16Smrg ;; 52964b0ead49Smrg 529752b01e16Smrgbsdi[[45]]*) 529852b01e16Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 529952b01e16Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 530052b01e16Smrg lt_cv_file_magic_test_file=/shlib/libc.so 530152b01e16Smrg ;; 53024b0ead49Smrg 530352b01e16Smrgcygwin*) 530452b01e16Smrg # func_win32_libid is a shell function defined in ltmain.sh 530552b01e16Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 530652b01e16Smrg lt_cv_file_magic_cmd='func_win32_libid' 53074b0ead49Smrg ;; 530852b01e16Smrg 530952b01e16Smrgmingw* | pw32*) 531052b01e16Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 531152b01e16Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 531252b01e16Smrg # unless we find 'file', for example because we are cross-compiling. 531352b01e16Smrg if ( file / ) >/dev/null 2>&1; then 531452b01e16Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 531552b01e16Smrg lt_cv_file_magic_cmd='func_win32_libid' 531652b01e16Smrg else 531752b01e16Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 531852b01e16Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 53194b0ead49Smrg fi 53204b0ead49Smrg ;; 53214b0ead49Smrg 532249dc963fSmrgcegcc) 532349dc963fSmrg # use the weaker test based on 'objdump'. See mingw*. 532449dc963fSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 532549dc963fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 532649dc963fSmrg ;; 532749dc963fSmrg 532852b01e16Smrgdarwin* | rhapsody*) 532952b01e16Smrg lt_cv_deplibs_check_method=pass_all 533052b01e16Smrg ;; 53314b0ead49Smrg 533252b01e16Smrgfreebsd* | dragonfly*) 533349dc963fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 533452b01e16Smrg case $host_cpu in 533552b01e16Smrg i*86 ) 533652b01e16Smrg # Not sure whether the presence of OpenBSD here was a mistake. 533752b01e16Smrg # Let's accept both of them until this is cleared up. 533852b01e16Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 533952b01e16Smrg lt_cv_file_magic_cmd=/usr/bin/file 534052b01e16Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 534152b01e16Smrg ;; 534252b01e16Smrg esac 534352b01e16Smrg else 534452b01e16Smrg lt_cv_deplibs_check_method=pass_all 534552b01e16Smrg fi 534652b01e16Smrg ;; 53474b0ead49Smrg 534852b01e16Smrggnu*) 534952b01e16Smrg lt_cv_deplibs_check_method=pass_all 535052b01e16Smrg ;; 53514b0ead49Smrg 535252b01e16Smrghpux10.20* | hpux11*) 535352b01e16Smrg lt_cv_file_magic_cmd=/usr/bin/file 535452b01e16Smrg case $host_cpu in 535552b01e16Smrg ia64*) 535652b01e16Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 535752b01e16Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 535852b01e16Smrg ;; 535952b01e16Smrg hppa*64*) 536052b01e16Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 536152b01e16Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 536252b01e16Smrg ;; 536352b01e16Smrg *) 536452b01e16Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 536552b01e16Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 536652b01e16Smrg ;; 536752b01e16Smrg esac 536852b01e16Smrg ;; 53694b0ead49Smrg 537052b01e16Smrginterix[[3-9]]*) 537152b01e16Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 537252b01e16Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 537352b01e16Smrg ;; 53744b0ead49Smrg 537552b01e16Smrgirix5* | irix6* | nonstopux*) 537652b01e16Smrg case $LD in 537752b01e16Smrg *-32|*"-32 ") libmagic=32-bit;; 537852b01e16Smrg *-n32|*"-n32 ") libmagic=N32;; 537952b01e16Smrg *-64|*"-64 ") libmagic=64-bit;; 538052b01e16Smrg *) libmagic=never-match;; 538152b01e16Smrg esac 538252b01e16Smrg lt_cv_deplibs_check_method=pass_all 538352b01e16Smrg ;; 53844b0ead49Smrg 538552b01e16Smrg# This must be Linux ELF. 538652b01e16Smrglinux* | k*bsd*-gnu) 538752b01e16Smrg lt_cv_deplibs_check_method=pass_all 538852b01e16Smrg ;; 53894b0ead49Smrg 539052b01e16Smrgnetbsd*) 539149dc963fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 539252b01e16Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 539352b01e16Smrg else 539452b01e16Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 539552b01e16Smrg fi 539652b01e16Smrg ;; 53974b0ead49Smrg 539852b01e16Smrgnewos6*) 539952b01e16Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 540052b01e16Smrg lt_cv_file_magic_cmd=/usr/bin/file 540152b01e16Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 540252b01e16Smrg ;; 54034b0ead49Smrg 540449dc963fSmrg*nto* | *qnx*) 540549dc963fSmrg lt_cv_deplibs_check_method=pass_all 540652b01e16Smrg ;; 54074b0ead49Smrg 540852b01e16Smrgopenbsd*) 540949dc963fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 541052b01e16Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 541152b01e16Smrg else 541252b01e16Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 541352b01e16Smrg fi 541452b01e16Smrg ;; 54154b0ead49Smrg 541652b01e16Smrgosf3* | osf4* | osf5*) 541752b01e16Smrg lt_cv_deplibs_check_method=pass_all 541852b01e16Smrg ;; 54194b0ead49Smrg 542052b01e16Smrgrdos*) 542152b01e16Smrg lt_cv_deplibs_check_method=pass_all 542252b01e16Smrg ;; 54234b0ead49Smrg 542452b01e16Smrgsolaris*) 542552b01e16Smrg lt_cv_deplibs_check_method=pass_all 542652b01e16Smrg ;; 54274b0ead49Smrg 542849dc963fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 542949dc963fSmrg lt_cv_deplibs_check_method=pass_all 543049dc963fSmrg ;; 543149dc963fSmrg 543252b01e16Smrgsysv4 | sysv4.3*) 543352b01e16Smrg case $host_vendor in 543452b01e16Smrg motorola) 543552b01e16Smrg 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]]' 543652b01e16Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 543752b01e16Smrg ;; 543852b01e16Smrg ncr) 543952b01e16Smrg lt_cv_deplibs_check_method=pass_all 544052b01e16Smrg ;; 544152b01e16Smrg sequent) 544252b01e16Smrg lt_cv_file_magic_cmd='/bin/file' 544352b01e16Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 544452b01e16Smrg ;; 544552b01e16Smrg sni) 544652b01e16Smrg lt_cv_file_magic_cmd='/bin/file' 544752b01e16Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 544852b01e16Smrg lt_cv_file_magic_test_file=/lib/libc.so 544952b01e16Smrg ;; 545052b01e16Smrg siemens) 545152b01e16Smrg lt_cv_deplibs_check_method=pass_all 545252b01e16Smrg ;; 545352b01e16Smrg pc) 545452b01e16Smrg lt_cv_deplibs_check_method=pass_all 545552b01e16Smrg ;; 545652b01e16Smrg esac 545752b01e16Smrg ;; 54584b0ead49Smrg 545949dc963fSmrgtpf*) 546052b01e16Smrg lt_cv_deplibs_check_method=pass_all 546152b01e16Smrg ;; 546252b01e16Smrgesac 546352b01e16Smrg]) 546452b01e16Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 546552b01e16Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 546652b01e16Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 54674b0ead49Smrg 546849dc963fSmrg_LT_DECL([], [deplibs_check_method], [1], 546949dc963fSmrg [Method to check whether dependent libraries are shared objects]) 547049dc963fSmrg_LT_DECL([], [file_magic_cmd], [1], 547149dc963fSmrg [Command to use when deplibs_check_method == "file_magic"]) 547249dc963fSmrg])# _LT_CHECK_MAGIC_METHOD 54734b0ead49Smrg 547449dc963fSmrg 547549dc963fSmrg# LT_PATH_NM 547652b01e16Smrg# ---------- 547749dc963fSmrg# find the pathname to a BSD- or MS-compatible name lister 547849dc963fSmrgAC_DEFUN([LT_PATH_NM], 547949dc963fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 548049dc963fSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 548152b01e16Smrg[if test -n "$NM"; then 548252b01e16Smrg # Let the user override the test. 548352b01e16Smrg lt_cv_path_NM="$NM" 548452b01e16Smrgelse 548552b01e16Smrg lt_nm_to_check="${ac_tool_prefix}nm" 548652b01e16Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 548752b01e16Smrg lt_nm_to_check="$lt_nm_to_check nm" 548852b01e16Smrg fi 548952b01e16Smrg for lt_tmp_nm in $lt_nm_to_check; do 549052b01e16Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 549152b01e16Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 549252b01e16Smrg IFS="$lt_save_ifs" 549352b01e16Smrg test -z "$ac_dir" && ac_dir=. 549452b01e16Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 549552b01e16Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 549652b01e16Smrg # Check to see if the nm accepts a BSD-compat flag. 549752b01e16Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 549852b01e16Smrg # nm: unknown option "B" ignored 549952b01e16Smrg # Tru64's nm complains that /dev/null is an invalid object file 550052b01e16Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 550152b01e16Smrg */dev/null* | *'Invalid file or object type'*) 550252b01e16Smrg lt_cv_path_NM="$tmp_nm -B" 550352b01e16Smrg break 550452b01e16Smrg ;; 550552b01e16Smrg *) 550652b01e16Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 550752b01e16Smrg */dev/null*) 550852b01e16Smrg lt_cv_path_NM="$tmp_nm -p" 550952b01e16Smrg break 551052b01e16Smrg ;; 551152b01e16Smrg *) 551252b01e16Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 551352b01e16Smrg continue # so that we can try to find one that supports BSD flags 551452b01e16Smrg ;; 551552b01e16Smrg esac 551652b01e16Smrg ;; 551752b01e16Smrg esac 551852b01e16Smrg fi 551952b01e16Smrg done 552052b01e16Smrg IFS="$lt_save_ifs" 552152b01e16Smrg done 552249dc963fSmrg : ${lt_cv_path_NM=no} 552352b01e16Smrgfi]) 552449dc963fSmrgif test "$lt_cv_path_NM" != "no"; then 552549dc963fSmrg NM="$lt_cv_path_NM" 552649dc963fSmrgelse 552749dc963fSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 552849dc963fSmrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 552949dc963fSmrg AC_SUBST([DUMPBIN]) 553049dc963fSmrg if test "$DUMPBIN" != ":"; then 553149dc963fSmrg NM="$DUMPBIN" 553249dc963fSmrg fi 553349dc963fSmrgfi 553449dc963fSmrgtest -z "$NM" && NM=nm 553549dc963fSmrgAC_SUBST([NM]) 553649dc963fSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 553749dc963fSmrg 553849dc963fSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 553949dc963fSmrg [lt_cv_nm_interface="BSD nm" 554049dc963fSmrg echo "int some_variable = 0;" > conftest.$ac_ext 554149dc963fSmrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 554249dc963fSmrg (eval "$ac_compile" 2>conftest.err) 554349dc963fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 554449dc963fSmrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 554549dc963fSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 554649dc963fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 554749dc963fSmrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 554849dc963fSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 554949dc963fSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 555049dc963fSmrg lt_cv_nm_interface="MS dumpbin" 555149dc963fSmrg fi 555249dc963fSmrg rm -f conftest*]) 555349dc963fSmrg])# LT_PATH_NM 55544b0ead49Smrg 555549dc963fSmrg# Old names: 555649dc963fSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 555749dc963fSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 555849dc963fSmrgdnl aclocal-1.4 backwards compatibility: 555949dc963fSmrgdnl AC_DEFUN([AM_PROG_NM], []) 556049dc963fSmrgdnl AC_DEFUN([AC_PROG_NM], []) 556152b01e16Smrg 556249dc963fSmrg 556349dc963fSmrg# LT_LIB_M 556449dc963fSmrg# -------- 556552b01e16Smrg# check for math library 556649dc963fSmrgAC_DEFUN([LT_LIB_M], 556752b01e16Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 556852b01e16SmrgLIBM= 556952b01e16Smrgcase $host in 557052b01e16Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 557152b01e16Smrg # These system don't have libm, or don't need it 557252b01e16Smrg ;; 557352b01e16Smrg*-ncr-sysv4.3*) 557452b01e16Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 557552b01e16Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 557652b01e16Smrg ;; 557752b01e16Smrg*) 557852b01e16Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 557952b01e16Smrg ;; 558052b01e16Smrgesac 558149dc963fSmrgAC_SUBST([LIBM]) 558249dc963fSmrg])# LT_LIB_M 55834b0ead49Smrg 558449dc963fSmrg# Old name: 558549dc963fSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 558649dc963fSmrgdnl aclocal-1.4 backwards compatibility: 558749dc963fSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 55884b0ead49Smrg 558952b01e16Smrg 559049dc963fSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 559149dc963fSmrg# ------------------------------- 559249dc963fSmrgm4_defun([_LT_COMPILER_NO_RTTI], 559349dc963fSmrg[m4_require([_LT_TAG_COMPILER])dnl 559452b01e16Smrg 559549dc963fSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 559652b01e16Smrg 559749dc963fSmrgif test "$GCC" = yes; then 559849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 559952b01e16Smrg 560049dc963fSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 560149dc963fSmrg lt_cv_prog_compiler_rtti_exceptions, 560249dc963fSmrg [-fno-rtti -fno-exceptions], [], 560349dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 560449dc963fSmrgfi 560549dc963fSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 560649dc963fSmrg [Compiler flag to turn off builtin functions]) 560749dc963fSmrg])# _LT_COMPILER_NO_RTTI 560852b01e16Smrg 560952b01e16Smrg 561049dc963fSmrg# _LT_CMD_GLOBAL_SYMBOLS 561149dc963fSmrg# ---------------------- 561249dc963fSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 561349dc963fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 561449dc963fSmrgAC_REQUIRE([AC_PROG_CC])dnl 561549dc963fSmrgAC_REQUIRE([LT_PATH_NM])dnl 561649dc963fSmrgAC_REQUIRE([LT_PATH_LD])dnl 561749dc963fSmrgm4_require([_LT_DECL_SED])dnl 561849dc963fSmrgm4_require([_LT_DECL_EGREP])dnl 561949dc963fSmrgm4_require([_LT_TAG_COMPILER])dnl 562052b01e16Smrg 562149dc963fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 562249dc963fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 562349dc963fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 562452b01e16Smrg[ 562549dc963fSmrg# These are sane defaults that work on at least a few old systems. 562649dc963fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 562752b01e16Smrg 562849dc963fSmrg# Character class describing NM global symbol codes. 562949dc963fSmrgsymcode='[[BCDEGRST]]' 563052b01e16Smrg 563149dc963fSmrg# Regexp to match symbols that can be accessed directly from C. 563249dc963fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 563352b01e16Smrg 563449dc963fSmrg# Define system-specific variables. 563549dc963fSmrgcase $host_os in 563649dc963fSmrgaix*) 563749dc963fSmrg symcode='[[BCDT]]' 563849dc963fSmrg ;; 563949dc963fSmrgcygwin* | mingw* | pw32* | cegcc*) 564049dc963fSmrg symcode='[[ABCDGISTW]]' 564149dc963fSmrg ;; 564249dc963fSmrghpux*) 564349dc963fSmrg if test "$host_cpu" = ia64; then 564449dc963fSmrg symcode='[[ABCDEGRST]]' 564549dc963fSmrg fi 564649dc963fSmrg ;; 564749dc963fSmrgirix* | nonstopux*) 564849dc963fSmrg symcode='[[BCDEGRST]]' 564949dc963fSmrg ;; 565049dc963fSmrgosf*) 565149dc963fSmrg symcode='[[BCDEGQRST]]' 565249dc963fSmrg ;; 565349dc963fSmrgsolaris*) 565449dc963fSmrg symcode='[[BDRT]]' 565549dc963fSmrg ;; 565649dc963fSmrgsco3.2v5*) 565749dc963fSmrg symcode='[[DT]]' 565849dc963fSmrg ;; 565949dc963fSmrgsysv4.2uw2*) 566049dc963fSmrg symcode='[[DT]]' 566149dc963fSmrg ;; 566249dc963fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 566349dc963fSmrg symcode='[[ABDT]]' 566449dc963fSmrg ;; 566549dc963fSmrgsysv4) 566649dc963fSmrg symcode='[[DFNSTU]]' 566749dc963fSmrg ;; 566849dc963fSmrgesac 566952b01e16Smrg 567049dc963fSmrg# If we're using GNU nm, then use its standard symbol codes. 567149dc963fSmrgcase `$NM -V 2>&1` in 567249dc963fSmrg*GNU* | *'with BFD'*) 567349dc963fSmrg symcode='[[ABCDGIRSTW]]' ;; 567449dc963fSmrgesac 567552b01e16Smrg 567649dc963fSmrg# Transform an extracted symbol line into a proper C declaration. 567749dc963fSmrg# Some systems (esp. on ia64) link data and code symbols differently, 567849dc963fSmrg# so use this general approach. 567949dc963fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 568052b01e16Smrg 568149dc963fSmrg# Transform an extracted symbol line into symbol name and symbol address 568249dc963fSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 568349dc963fSmrglt_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'" 568452b01e16Smrg 568549dc963fSmrg# Handle CRLF in mingw tool chain 568649dc963fSmrgopt_cr= 568749dc963fSmrgcase $build_os in 568849dc963fSmrgmingw*) 568949dc963fSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 569049dc963fSmrg ;; 569149dc963fSmrgesac 569252b01e16Smrg 569349dc963fSmrg# Try without a prefix underscore, then with it. 569449dc963fSmrgfor ac_symprfx in "" "_"; do 56954b0ead49Smrg 569649dc963fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 569749dc963fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 56984b0ead49Smrg 569949dc963fSmrg # Write the raw and C identifiers. 570049dc963fSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 570149dc963fSmrg # Fake it for dumpbin and say T for any non-static function 570249dc963fSmrg # and D for any global variable. 570349dc963fSmrg # Also find C++ and __fastcall symbols from MSVC++, 570449dc963fSmrg # which start with @ or ?. 570549dc963fSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 570649dc963fSmrg" {last_section=section; section=\$ 3};"\ 570749dc963fSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 570849dc963fSmrg" \$ 0!~/External *\|/{next};"\ 570949dc963fSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 571049dc963fSmrg" {if(hide[section]) next};"\ 571149dc963fSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 571249dc963fSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 571349dc963fSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 571449dc963fSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 571549dc963fSmrg" ' prfx=^$ac_symprfx]" 571649dc963fSmrg else 571749dc963fSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 571852b01e16Smrg fi 57194b0ead49Smrg 572049dc963fSmrg # Check to see that the pipe works correctly. 572149dc963fSmrg pipe_works=no 57224b0ead49Smrg 572349dc963fSmrg rm -f conftest* 572449dc963fSmrg cat > conftest.$ac_ext <<_LT_EOF 572549dc963fSmrg#ifdef __cplusplus 572649dc963fSmrgextern "C" { 572749dc963fSmrg#endif 572849dc963fSmrgchar nm_test_var; 572949dc963fSmrgvoid nm_test_func(void); 573049dc963fSmrgvoid nm_test_func(void){} 573149dc963fSmrg#ifdef __cplusplus 573249dc963fSmrg} 573349dc963fSmrg#endif 573449dc963fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 573549dc963fSmrg_LT_EOF 57364b0ead49Smrg 573749dc963fSmrg if AC_TRY_EVAL(ac_compile); then 573849dc963fSmrg # Now try to grab the symbols. 573949dc963fSmrg nlist=conftest.nm 574049dc963fSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 574149dc963fSmrg # Try sorting and uniquifying the output. 574249dc963fSmrg if sort "$nlist" | uniq > "$nlist"T; then 574349dc963fSmrg mv -f "$nlist"T "$nlist" 574449dc963fSmrg else 574549dc963fSmrg rm -f "$nlist"T 574649dc963fSmrg fi 57474b0ead49Smrg 574849dc963fSmrg # Make sure that we snagged all the symbols we need. 574949dc963fSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 575049dc963fSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 575149dc963fSmrg cat <<_LT_EOF > conftest.$ac_ext 575249dc963fSmrg#ifdef __cplusplus 575349dc963fSmrgextern "C" { 575449dc963fSmrg#endif 57554b0ead49Smrg 575649dc963fSmrg_LT_EOF 575749dc963fSmrg # Now generate the symbol file. 575849dc963fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 57594b0ead49Smrg 576049dc963fSmrg cat <<_LT_EOF >> conftest.$ac_ext 57614b0ead49Smrg 576249dc963fSmrg/* The mapping between symbol names and symbols. */ 576349dc963fSmrgconst struct { 576449dc963fSmrg const char *name; 576549dc963fSmrg void *address; 576649dc963fSmrg} 576749dc963fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 576849dc963fSmrg{ 576949dc963fSmrg { "@PROGRAM@", (void *) 0 }, 577049dc963fSmrg_LT_EOF 577149dc963fSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 577249dc963fSmrg cat <<\_LT_EOF >> conftest.$ac_ext 577349dc963fSmrg {0, (void *) 0} 577449dc963fSmrg}; 57754b0ead49Smrg 577649dc963fSmrg/* This works around a problem in FreeBSD linker */ 577749dc963fSmrg#ifdef FREEBSD_WORKAROUND 577849dc963fSmrgstatic const void *lt_preloaded_setup() { 577949dc963fSmrg return lt__PROGRAM__LTX_preloaded_symbols; 578049dc963fSmrg} 578149dc963fSmrg#endif 57824b0ead49Smrg 578349dc963fSmrg#ifdef __cplusplus 578449dc963fSmrg} 578549dc963fSmrg#endif 578649dc963fSmrg_LT_EOF 578749dc963fSmrg # Now try linking the two files. 578849dc963fSmrg mv conftest.$ac_objext conftstm.$ac_objext 578949dc963fSmrg lt_save_LIBS="$LIBS" 579049dc963fSmrg lt_save_CFLAGS="$CFLAGS" 579149dc963fSmrg LIBS="conftstm.$ac_objext" 579249dc963fSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 579349dc963fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 579449dc963fSmrg pipe_works=yes 579549dc963fSmrg fi 579649dc963fSmrg LIBS="$lt_save_LIBS" 579749dc963fSmrg CFLAGS="$lt_save_CFLAGS" 579849dc963fSmrg else 579949dc963fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 580049dc963fSmrg fi 580149dc963fSmrg else 580249dc963fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 580349dc963fSmrg fi 580452b01e16Smrg else 580549dc963fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 580652b01e16Smrg fi 580752b01e16Smrg else 580849dc963fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 580949dc963fSmrg cat conftest.$ac_ext >&5 581052b01e16Smrg fi 581149dc963fSmrg rm -rf conftest* conftst* 58124b0ead49Smrg 581349dc963fSmrg # Do not use the global_symbol_pipe unless it works. 581449dc963fSmrg if test "$pipe_works" = yes; then 581549dc963fSmrg break 581649dc963fSmrg else 581749dc963fSmrg lt_cv_sys_global_symbol_pipe= 581849dc963fSmrg fi 581949dc963fSmrgdone 582049dc963fSmrg]) 582149dc963fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 582249dc963fSmrg lt_cv_sys_global_symbol_to_cdecl= 582349dc963fSmrgfi 582449dc963fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 582549dc963fSmrg AC_MSG_RESULT(failed) 582652b01e16Smrgelse 582749dc963fSmrg AC_MSG_RESULT(ok) 582852b01e16Smrgfi 58294b0ead49Smrg 583049dc963fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 583149dc963fSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 583249dc963fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 583349dc963fSmrg [Transform the output of nm in a proper C declaration]) 583449dc963fSmrg_LT_DECL([global_symbol_to_c_name_address], 583549dc963fSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 583649dc963fSmrg [Transform the output of nm in a C name address pair]) 583749dc963fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 583849dc963fSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 583949dc963fSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 584049dc963fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 58414b0ead49Smrg 58424b0ead49Smrg 584349dc963fSmrg# _LT_COMPILER_PIC([TAGNAME]) 584449dc963fSmrg# --------------------------- 584549dc963fSmrgm4_defun([_LT_COMPILER_PIC], 584649dc963fSmrg[m4_require([_LT_TAG_COMPILER])dnl 584749dc963fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 584849dc963fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 584949dc963fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 58504b0ead49Smrg 585149dc963fSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 585249dc963fSmrgm4_if([$1], [CXX], [ 585349dc963fSmrg # C++ specific cases for pic, static, wl, etc. 585449dc963fSmrg if test "$GXX" = yes; then 585549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 585649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 58574b0ead49Smrg 585849dc963fSmrg case $host_os in 585949dc963fSmrg aix*) 586049dc963fSmrg # All AIX code is PIC. 586152b01e16Smrg if test "$host_cpu" = ia64; then 586249dc963fSmrg # AIX 5 now supports IA64 processor 586349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 586452b01e16Smrg fi 586549dc963fSmrg ;; 58664b0ead49Smrg 586749dc963fSmrg amigaos*) 586849dc963fSmrg case $host_cpu in 586949dc963fSmrg powerpc) 587049dc963fSmrg # see comment about AmigaOS4 .so support 587149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 587249dc963fSmrg ;; 587349dc963fSmrg m68k) 587449dc963fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 587549dc963fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 587649dc963fSmrg # like `-m68040'. 587749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 587852b01e16Smrg ;; 587949dc963fSmrg esac 588049dc963fSmrg ;; 58814b0ead49Smrg 588249dc963fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 588349dc963fSmrg # PIC is the default for these OSes. 588449dc963fSmrg ;; 588549dc963fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 588649dc963fSmrg # This hack is so that the source file can tell whether it is being 588749dc963fSmrg # built for inclusion in a dll (and should export symbols for example). 588849dc963fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 588949dc963fSmrg # (--disable-auto-import) libraries 589049dc963fSmrg m4_if([$1], [GCJ], [], 589149dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 589249dc963fSmrg ;; 589349dc963fSmrg darwin* | rhapsody*) 589449dc963fSmrg # PIC is the default on this platform 589549dc963fSmrg # Common symbols not allowed in MH_DYLIB files 589649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 589749dc963fSmrg ;; 589849dc963fSmrg *djgpp*) 589949dc963fSmrg # DJGPP does not support shared libraries at all 590049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 590149dc963fSmrg ;; 590249dc963fSmrg interix[[3-9]]*) 590349dc963fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 590449dc963fSmrg # Instead, we relocate shared libraries at runtime. 590549dc963fSmrg ;; 590649dc963fSmrg sysv4*MP*) 590749dc963fSmrg if test -d /usr/nec; then 590849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 590949dc963fSmrg fi 591049dc963fSmrg ;; 591149dc963fSmrg hpux*) 591249dc963fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 591349dc963fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 591449dc963fSmrg # sets the default TLS model and affects inlining. 591549dc963fSmrg case $host_cpu in 591649dc963fSmrg hppa*64*) 591752b01e16Smrg ;; 591852b01e16Smrg *) 591949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 592052b01e16Smrg ;; 592149dc963fSmrg esac 592252b01e16Smrg ;; 592349dc963fSmrg *qnx* | *nto*) 592449dc963fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 592549dc963fSmrg # it will coredump. 592649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 592752b01e16Smrg ;; 592852b01e16Smrg *) 592949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 593052b01e16Smrg ;; 593152b01e16Smrg esac 593249dc963fSmrg else 593349dc963fSmrg case $host_os in 593449dc963fSmrg aix[[4-9]]*) 593549dc963fSmrg # All AIX code is PIC. 593649dc963fSmrg if test "$host_cpu" = ia64; then 593749dc963fSmrg # AIX 5 now supports IA64 processor 593849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 593949dc963fSmrg else 594049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 594149dc963fSmrg fi 594252b01e16Smrg ;; 594349dc963fSmrg chorus*) 594449dc963fSmrg case $cc_basename in 594549dc963fSmrg cxch68*) 594649dc963fSmrg # Green Hills C++ Compiler 594749dc963fSmrg # _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" 594852b01e16Smrg ;; 594952b01e16Smrg esac 595052b01e16Smrg ;; 595149dc963fSmrg dgux*) 595249dc963fSmrg case $cc_basename in 595349dc963fSmrg ec++*) 595449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 595549dc963fSmrg ;; 595649dc963fSmrg ghcx*) 595749dc963fSmrg # Green Hills C++ Compiler 595849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 595949dc963fSmrg ;; 596049dc963fSmrg *) 596149dc963fSmrg ;; 596249dc963fSmrg esac 596349dc963fSmrg ;; 596449dc963fSmrg freebsd* | dragonfly*) 596549dc963fSmrg # FreeBSD uses GNU C++ 596649dc963fSmrg ;; 596749dc963fSmrg hpux9* | hpux10* | hpux11*) 596849dc963fSmrg case $cc_basename in 596949dc963fSmrg CC*) 597049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 597149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 597249dc963fSmrg if test "$host_cpu" != ia64; then 597349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 597449dc963fSmrg fi 597549dc963fSmrg ;; 597649dc963fSmrg aCC*) 597749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 597849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 597952b01e16Smrg case $host_cpu in 598049dc963fSmrg hppa*64*|ia64*) 598149dc963fSmrg # +Z the default 598252b01e16Smrg ;; 598352b01e16Smrg *) 598449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 598552b01e16Smrg ;; 598652b01e16Smrg esac 598749dc963fSmrg ;; 598849dc963fSmrg *) 598949dc963fSmrg ;; 599052b01e16Smrg esac 599152b01e16Smrg ;; 599249dc963fSmrg interix*) 599349dc963fSmrg # This is c89, which is MS Visual C++ (no shared libs) 599449dc963fSmrg # Anyone wants to do a port? 599552b01e16Smrg ;; 599649dc963fSmrg irix5* | irix6* | nonstopux*) 599749dc963fSmrg case $cc_basename in 599849dc963fSmrg CC*) 599949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 600049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 600149dc963fSmrg # CC pic flag -KPIC is the default. 600249dc963fSmrg ;; 600349dc963fSmrg *) 600449dc963fSmrg ;; 600552b01e16Smrg esac 600652b01e16Smrg ;; 600749dc963fSmrg linux* | k*bsd*-gnu) 600849dc963fSmrg case $cc_basename in 600949dc963fSmrg KCC*) 601049dc963fSmrg # KAI C++ Compiler 601149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 601249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 601349dc963fSmrg ;; 601449dc963fSmrg ecpc* ) 601549dc963fSmrg # old Intel C++ for x86_64 which still supported -KPIC. 601649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 601749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 601849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 601949dc963fSmrg ;; 602049dc963fSmrg icpc* ) 602149dc963fSmrg # Intel C++, used to be incompatible with GCC. 602249dc963fSmrg # ICC 10 doesn't accept -KPIC any more. 602349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 602449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 602549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 602649dc963fSmrg ;; 602749dc963fSmrg pgCC* | pgcpp*) 602849dc963fSmrg # Portland Group C++ compiler 602949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 603049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 603149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 603249dc963fSmrg ;; 603349dc963fSmrg cxx*) 603449dc963fSmrg # Compaq C++ 603549dc963fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 603649dc963fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 603749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 603849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 603949dc963fSmrg ;; 604049dc963fSmrg xlc* | xlC*) 604149dc963fSmrg # IBM XL 8.0 on PPC 604249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 604349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 604449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 604549dc963fSmrg ;; 604649dc963fSmrg *) 604749dc963fSmrg case `$CC -V 2>&1 | sed 5q` in 604849dc963fSmrg *Sun\ C*) 604949dc963fSmrg # Sun C++ 5.9 605049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 605149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 605249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 605349dc963fSmrg ;; 605449dc963fSmrg esac 605549dc963fSmrg ;; 605649dc963fSmrg esac 605752b01e16Smrg ;; 605849dc963fSmrg lynxos*) 605952b01e16Smrg ;; 606049dc963fSmrg m88k*) 606152b01e16Smrg ;; 606249dc963fSmrg mvs*) 606349dc963fSmrg case $cc_basename in 606449dc963fSmrg cxx*) 606549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 606649dc963fSmrg ;; 606749dc963fSmrg *) 606849dc963fSmrg ;; 606949dc963fSmrg esac 607052b01e16Smrg ;; 607149dc963fSmrg netbsd*) 607252b01e16Smrg ;; 607349dc963fSmrg *qnx* | *nto*) 607449dc963fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 607549dc963fSmrg # it will coredump. 607649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 607749dc963fSmrg ;; 607849dc963fSmrg osf3* | osf4* | osf5*) 607949dc963fSmrg case $cc_basename in 608049dc963fSmrg KCC*) 608149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 608249dc963fSmrg ;; 608349dc963fSmrg RCC*) 608449dc963fSmrg # Rational C++ 2.4.1 608549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 608649dc963fSmrg ;; 608749dc963fSmrg cxx*) 608849dc963fSmrg # Digital/Compaq C++ 608949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 609049dc963fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 609149dc963fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 609249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 609349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 609449dc963fSmrg ;; 609549dc963fSmrg *) 609649dc963fSmrg ;; 609749dc963fSmrg esac 609852b01e16Smrg ;; 609949dc963fSmrg psos*) 610052b01e16Smrg ;; 610149dc963fSmrg solaris*) 610249dc963fSmrg case $cc_basename in 610349dc963fSmrg CC*) 610449dc963fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 610549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 610649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 610749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 610849dc963fSmrg ;; 610949dc963fSmrg gcx*) 611049dc963fSmrg # Green Hills C++ Compiler 611149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 611249dc963fSmrg ;; 611352b01e16Smrg *) 611452b01e16Smrg ;; 611552b01e16Smrg esac 611652b01e16Smrg ;; 611749dc963fSmrg sunos4*) 611849dc963fSmrg case $cc_basename in 611949dc963fSmrg CC*) 612049dc963fSmrg # Sun C++ 4.x 612149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 612249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 612349dc963fSmrg ;; 612449dc963fSmrg lcc*) 612549dc963fSmrg # Lucid 612649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 612749dc963fSmrg ;; 612852b01e16Smrg *) 612952b01e16Smrg ;; 613049dc963fSmrg esac 613152b01e16Smrg ;; 613249dc963fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 613349dc963fSmrg case $cc_basename in 613449dc963fSmrg CC*) 613549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 613649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 613749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 613849dc963fSmrg ;; 613949dc963fSmrg esac 614052b01e16Smrg ;; 614149dc963fSmrg tandem*) 614249dc963fSmrg case $cc_basename in 614349dc963fSmrg NCC*) 614449dc963fSmrg # NonStop-UX NCC 3.20 614549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 614649dc963fSmrg ;; 614749dc963fSmrg *) 614849dc963fSmrg ;; 614949dc963fSmrg esac 615052b01e16Smrg ;; 615149dc963fSmrg vxworks*) 615252b01e16Smrg ;; 615352b01e16Smrg *) 615449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 615552b01e16Smrg ;; 615652b01e16Smrg esac 615749dc963fSmrg fi 615849dc963fSmrg], 615949dc963fSmrg[ 616049dc963fSmrg if test "$GCC" = yes; then 616149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 616249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 61634b0ead49Smrg 616449dc963fSmrg case $host_os in 616549dc963fSmrg aix*) 616649dc963fSmrg # All AIX code is PIC. 616749dc963fSmrg if test "$host_cpu" = ia64; then 616849dc963fSmrg # AIX 5 now supports IA64 processor 616949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 617049dc963fSmrg fi 617149dc963fSmrg ;; 61724b0ead49Smrg 617349dc963fSmrg amigaos*) 617449dc963fSmrg case $host_cpu in 617549dc963fSmrg powerpc) 617649dc963fSmrg # see comment about AmigaOS4 .so support 617749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 617849dc963fSmrg ;; 617949dc963fSmrg m68k) 618049dc963fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 618149dc963fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 618249dc963fSmrg # like `-m68040'. 618349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 618449dc963fSmrg ;; 618549dc963fSmrg esac 618649dc963fSmrg ;; 61874b0ead49Smrg 618849dc963fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 618949dc963fSmrg # PIC is the default for these OSes. 619049dc963fSmrg ;; 61914b0ead49Smrg 619249dc963fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 619349dc963fSmrg # This hack is so that the source file can tell whether it is being 619449dc963fSmrg # built for inclusion in a dll (and should export symbols for example). 619549dc963fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 619649dc963fSmrg # (--disable-auto-import) libraries 619749dc963fSmrg m4_if([$1], [GCJ], [], 619849dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 619949dc963fSmrg ;; 62004b0ead49Smrg 620149dc963fSmrg darwin* | rhapsody*) 620249dc963fSmrg # PIC is the default on this platform 620349dc963fSmrg # Common symbols not allowed in MH_DYLIB files 620449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 620549dc963fSmrg ;; 62064b0ead49Smrg 620749dc963fSmrg hpux*) 620849dc963fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 620949dc963fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 621049dc963fSmrg # sets the default TLS model and affects inlining. 621149dc963fSmrg case $host_cpu in 621249dc963fSmrg hppa*64*) 621349dc963fSmrg # +Z the default 621449dc963fSmrg ;; 621549dc963fSmrg *) 621649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 621749dc963fSmrg ;; 621849dc963fSmrg esac 621949dc963fSmrg ;; 62204b0ead49Smrg 622149dc963fSmrg interix[[3-9]]*) 622249dc963fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 622349dc963fSmrg # Instead, we relocate shared libraries at runtime. 622449dc963fSmrg ;; 62254b0ead49Smrg 622649dc963fSmrg msdosdjgpp*) 622749dc963fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 622849dc963fSmrg # on systems that don't support them. 622949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 623049dc963fSmrg enable_shared=no 623149dc963fSmrg ;; 62324b0ead49Smrg 623349dc963fSmrg *nto* | *qnx*) 623449dc963fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 623549dc963fSmrg # it will coredump. 623649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 623749dc963fSmrg ;; 62384b0ead49Smrg 623949dc963fSmrg sysv4*MP*) 624049dc963fSmrg if test -d /usr/nec; then 624149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 624249dc963fSmrg fi 624349dc963fSmrg ;; 62444b0ead49Smrg 624549dc963fSmrg *) 624649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 624749dc963fSmrg ;; 624849dc963fSmrg esac 624949dc963fSmrg else 625049dc963fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 625149dc963fSmrg case $host_os in 625249dc963fSmrg aix*) 625349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 625449dc963fSmrg if test "$host_cpu" = ia64; then 625549dc963fSmrg # AIX 5 now supports IA64 processor 625649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 625749dc963fSmrg else 625849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 625949dc963fSmrg fi 626049dc963fSmrg ;; 62614b0ead49Smrg 626249dc963fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 626349dc963fSmrg # This hack is so that the source file can tell whether it is being 626449dc963fSmrg # built for inclusion in a dll (and should export symbols for example). 626549dc963fSmrg m4_if([$1], [GCJ], [], 626649dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 626749dc963fSmrg ;; 62684b0ead49Smrg 626949dc963fSmrg hpux9* | hpux10* | hpux11*) 627049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 627149dc963fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 627249dc963fSmrg # not for PA HP-UX. 627349dc963fSmrg case $host_cpu in 627449dc963fSmrg hppa*64*|ia64*) 627549dc963fSmrg # +Z the default 627649dc963fSmrg ;; 627749dc963fSmrg *) 627849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 627949dc963fSmrg ;; 628049dc963fSmrg esac 628149dc963fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 628249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 628349dc963fSmrg ;; 62844b0ead49Smrg 628549dc963fSmrg irix5* | irix6* | nonstopux*) 628649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 628749dc963fSmrg # PIC (with -KPIC) is the default. 628849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 628949dc963fSmrg ;; 62904b0ead49Smrg 629149dc963fSmrg linux* | k*bsd*-gnu) 629249dc963fSmrg case $cc_basename in 629349dc963fSmrg # old Intel for x86_64 which still supported -KPIC. 629449dc963fSmrg ecc*) 629549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 629649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 629749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 629849dc963fSmrg ;; 629949dc963fSmrg # icc used to be incompatible with GCC. 630049dc963fSmrg # ICC 10 doesn't accept -KPIC any more. 630149dc963fSmrg icc* | ifort*) 630249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 630349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 630449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 630549dc963fSmrg ;; 630649dc963fSmrg # Lahey Fortran 8.1. 630749dc963fSmrg lf95*) 630849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 630949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 631049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 631149dc963fSmrg ;; 631249dc963fSmrg pgcc* | pgf77* | pgf90* | pgf95*) 631349dc963fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 631449dc963fSmrg # which looks to be a dead project) 631549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 631649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 631749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 631849dc963fSmrg ;; 631949dc963fSmrg ccc*) 632049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 632149dc963fSmrg # All Alpha code is PIC. 632249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 632349dc963fSmrg ;; 632449dc963fSmrg xl*) 632549dc963fSmrg # IBM XL C 8.0/Fortran 10.1 on PPC 632649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 632749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 632849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 632949dc963fSmrg ;; 633049dc963fSmrg *) 633149dc963fSmrg case `$CC -V 2>&1 | sed 5q` in 633249dc963fSmrg *Sun\ C*) 633349dc963fSmrg # Sun C 5.9 633449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 633549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 633649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 633749dc963fSmrg ;; 633849dc963fSmrg *Sun\ F*) 633949dc963fSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 634049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 634149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 634249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 634349dc963fSmrg ;; 634449dc963fSmrg esac 634549dc963fSmrg ;; 634649dc963fSmrg esac 634749dc963fSmrg ;; 63484b0ead49Smrg 634949dc963fSmrg newsos6) 635049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 635149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 635249dc963fSmrg ;; 63534b0ead49Smrg 635449dc963fSmrg *nto* | *qnx*) 635549dc963fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 635649dc963fSmrg # it will coredump. 635749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 635849dc963fSmrg ;; 63594b0ead49Smrg 636049dc963fSmrg osf3* | osf4* | osf5*) 636149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 636249dc963fSmrg # All OSF/1 code is PIC. 636349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 636452b01e16Smrg ;; 63654b0ead49Smrg 636649dc963fSmrg rdos*) 636749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 636852b01e16Smrg ;; 63694b0ead49Smrg 637049dc963fSmrg solaris*) 637149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 637249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 637349dc963fSmrg case $cc_basename in 637449dc963fSmrg f77* | f90* | f95*) 637549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 637649dc963fSmrg *) 637749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 637849dc963fSmrg esac 637949dc963fSmrg ;; 63804b0ead49Smrg 638149dc963fSmrg sunos4*) 638249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 638349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 638449dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 638549dc963fSmrg ;; 63864b0ead49Smrg 638749dc963fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 638849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 638949dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 639049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 639149dc963fSmrg ;; 63924b0ead49Smrg 639349dc963fSmrg sysv4*MP*) 639449dc963fSmrg if test -d /usr/nec ;then 639549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 639649dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 639749dc963fSmrg fi 639849dc963fSmrg ;; 63994b0ead49Smrg 640049dc963fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 640149dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 640249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 640349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 640449dc963fSmrg ;; 64054b0ead49Smrg 640649dc963fSmrg unicos*) 640749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 640849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 640949dc963fSmrg ;; 64104b0ead49Smrg 641149dc963fSmrg uts4*) 641249dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 641349dc963fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 641449dc963fSmrg ;; 64154b0ead49Smrg 641649dc963fSmrg *) 641749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 641849dc963fSmrg ;; 641949dc963fSmrg esac 642049dc963fSmrg fi 642149dc963fSmrg]) 642249dc963fSmrgcase $host_os in 642349dc963fSmrg # For platforms which do not support PIC, -DPIC is meaningless: 642449dc963fSmrg *djgpp*) 642549dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 642649dc963fSmrg ;; 642749dc963fSmrg *) 642849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 642949dc963fSmrg ;; 643049dc963fSmrgesac 643149dc963fSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 643249dc963fSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 643349dc963fSmrg [How to pass a linker flag through the compiler]) 64344b0ead49Smrg 643549dc963fSmrg# 643649dc963fSmrg# Check to make sure the PIC flag actually works. 643749dc963fSmrg# 643849dc963fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 643949dc963fSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 644049dc963fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 644149dc963fSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 644249dc963fSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 644349dc963fSmrg "" | " "*) ;; 644449dc963fSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 644549dc963fSmrg esac], 644649dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 644749dc963fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 644849dc963fSmrgfi 644949dc963fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 645049dc963fSmrg [Additional compiler flags for building library objects]) 645152b01e16Smrg 645249dc963fSmrg# 645349dc963fSmrg# Check to make sure the static flag actually works. 645449dc963fSmrg# 645549dc963fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 645649dc963fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 645749dc963fSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 645849dc963fSmrg $lt_tmp_static_flag, 645949dc963fSmrg [], 646049dc963fSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 646149dc963fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 646249dc963fSmrg [Compiler flag to prevent dynamic linking]) 646349dc963fSmrg])# _LT_COMPILER_PIC 646452b01e16Smrg 646552b01e16Smrg 646649dc963fSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 646749dc963fSmrg# ---------------------------- 646849dc963fSmrg# See if the linker supports building shared libraries. 646949dc963fSmrgm4_defun([_LT_LINKER_SHLIBS], 647049dc963fSmrg[AC_REQUIRE([LT_PATH_LD])dnl 647149dc963fSmrgAC_REQUIRE([LT_PATH_NM])dnl 647249dc963fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 647349dc963fSmrgm4_require([_LT_DECL_EGREP])dnl 647449dc963fSmrgm4_require([_LT_DECL_SED])dnl 647549dc963fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 647649dc963fSmrgm4_require([_LT_TAG_COMPILER])dnl 647749dc963fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 647849dc963fSmrgm4_if([$1], [CXX], [ 647949dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 648049dc963fSmrg case $host_os in 648149dc963fSmrg aix[[4-9]]*) 648249dc963fSmrg # If we're using GNU nm, then we don't want the "-C" option. 648349dc963fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 648449dc963fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 648549dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 648649dc963fSmrg else 648749dc963fSmrg _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' 648849dc963fSmrg fi 648949dc963fSmrg ;; 649049dc963fSmrg pw32*) 649149dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 649252b01e16Smrg ;; 649349dc963fSmrg cygwin* | mingw* | cegcc*) 649449dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 649552b01e16Smrg ;; 649649dc963fSmrg *) 649749dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 649849dc963fSmrg ;; 649949dc963fSmrg esac 650049dc963fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 650149dc963fSmrg], [ 650249dc963fSmrg runpath_var= 650349dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 650449dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 650549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)= 650649dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 650749dc963fSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 650849dc963fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 650949dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 651049dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 651149dc963fSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 651249dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 651349dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 651449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 651549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 651649dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 651749dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 651849dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 651949dc963fSmrg _LT_TAGVAR(inherit_rpath, $1)=no 652049dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 652149dc963fSmrg _LT_TAGVAR(module_cmds, $1)= 652249dc963fSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 652349dc963fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 652449dc963fSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 652549dc963fSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 652649dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 652749dc963fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 652849dc963fSmrg # included in the symbol list 652949dc963fSmrg _LT_TAGVAR(include_expsyms, $1)= 653049dc963fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 653149dc963fSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 653249dc963fSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 653349dc963fSmrg # as well as any symbol that contains `d'. 653449dc963fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 653549dc963fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 653649dc963fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 653749dc963fSmrg # the symbol is explicitly referenced. Since portable code cannot 653849dc963fSmrg # rely on this symbol name, it's probably fine to never include it in 653949dc963fSmrg # preloaded symbol tables. 654049dc963fSmrg # Exclude shared library initialization/finalization symbols. 654149dc963fSmrgdnl Note also adjust exclude_expsyms for C++ above. 654249dc963fSmrg extract_expsyms_cmds= 65434b0ead49Smrg 654449dc963fSmrg case $host_os in 654549dc963fSmrg cygwin* | mingw* | pw32* | cegcc*) 654649dc963fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 654749dc963fSmrg # When not using gcc, we currently assume that we are using 654849dc963fSmrg # Microsoft Visual C++. 654949dc963fSmrg if test "$GCC" != yes; then 655049dc963fSmrg with_gnu_ld=no 655149dc963fSmrg fi 655249dc963fSmrg ;; 655349dc963fSmrg interix*) 655449dc963fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 655549dc963fSmrg with_gnu_ld=yes 655649dc963fSmrg ;; 655749dc963fSmrg openbsd*) 655849dc963fSmrg with_gnu_ld=no 655949dc963fSmrg ;; 656049dc963fSmrg esac 65614b0ead49Smrg 656249dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 656349dc963fSmrg if test "$with_gnu_ld" = yes; then 656449dc963fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 656549dc963fSmrg wlarc='${wl}' 65664b0ead49Smrg 656749dc963fSmrg # Set some defaults for GNU ld with shared library support. These 656849dc963fSmrg # are reset later if shared libraries are not supported. Putting them 656949dc963fSmrg # here allows them to be overridden if necessary. 657049dc963fSmrg runpath_var=LD_RUN_PATH 657149dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 657249dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 657349dc963fSmrg # ancient GNU ld didn't support --whole-archive et. al. 657449dc963fSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 657549dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 657649dc963fSmrg else 657749dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 657849dc963fSmrg fi 657949dc963fSmrg supports_anon_versioning=no 658049dc963fSmrg case `$LD -v 2>&1` in 658149dc963fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 658249dc963fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 658349dc963fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 658449dc963fSmrg *\ 2.11.*) ;; # other 2.11 versions 658549dc963fSmrg *) supports_anon_versioning=yes ;; 658649dc963fSmrg esac 65874b0ead49Smrg 658849dc963fSmrg # See if GNU ld supports shared libraries. 658949dc963fSmrg case $host_os in 659049dc963fSmrg aix[[3-9]]*) 659149dc963fSmrg # On AIX/PPC, the GNU linker is very broken 659249dc963fSmrg if test "$host_cpu" != ia64; then 659349dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 659449dc963fSmrg cat <<_LT_EOF 1>&2 65954b0ead49Smrg 659649dc963fSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 659749dc963fSmrg*** to be unable to reliably create shared libraries on AIX. 659849dc963fSmrg*** Therefore, libtool is disabling shared libraries support. If you 659949dc963fSmrg*** really care for shared libraries, you may want to modify your PATH 660049dc963fSmrg*** so that a non-GNU linker is found, and then restart. 66014b0ead49Smrg 660249dc963fSmrg_LT_EOF 660349dc963fSmrg fi 660449dc963fSmrg ;; 66054b0ead49Smrg 660649dc963fSmrg amigaos*) 660749dc963fSmrg case $host_cpu in 660849dc963fSmrg powerpc) 660949dc963fSmrg # see comment about AmigaOS4 .so support 661049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 661149dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 661249dc963fSmrg ;; 661349dc963fSmrg m68k) 661449dc963fSmrg _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)' 661549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 661649dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 661749dc963fSmrg ;; 661849dc963fSmrg esac 661949dc963fSmrg ;; 66204b0ead49Smrg 662149dc963fSmrg beos*) 662249dc963fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 662349dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 662449dc963fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 662549dc963fSmrg # support --undefined. This deserves some investigation. FIXME 662649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 662749dc963fSmrg else 662849dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 662949dc963fSmrg fi 663049dc963fSmrg ;; 66314b0ead49Smrg 663249dc963fSmrg cygwin* | mingw* | pw32* | cegcc*) 663349dc963fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 663449dc963fSmrg # as there is no search path for DLLs. 663549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 663649dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 663749dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 663849dc963fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 663949dc963fSmrg _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' 664049dc963fSmrg 664149dc963fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 664249dc963fSmrg _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' 664349dc963fSmrg # If the export-symbols file already is a .def file (1st line 664449dc963fSmrg # is EXPORTS), use it as is; otherwise, prepend... 664549dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 664649dc963fSmrg cp $export_symbols $output_objdir/$soname.def; 664749dc963fSmrg else 664849dc963fSmrg echo EXPORTS > $output_objdir/$soname.def; 664949dc963fSmrg cat $export_symbols >> $output_objdir/$soname.def; 665049dc963fSmrg fi~ 665149dc963fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 665249dc963fSmrg else 665349dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 665449dc963fSmrg fi 665549dc963fSmrg ;; 66564b0ead49Smrg 665749dc963fSmrg interix[[3-9]]*) 665849dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 665949dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 666049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 666149dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 666249dc963fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 666349dc963fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 666449dc963fSmrg # default) and relocated if they conflict, which is a slow very memory 666549dc963fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 666649dc963fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 666749dc963fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 666849dc963fSmrg _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' 666949dc963fSmrg _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' 667049dc963fSmrg ;; 66714b0ead49Smrg 667249dc963fSmrg gnu* | linux* | tpf* | k*bsd*-gnu) 667349dc963fSmrg tmp_diet=no 667449dc963fSmrg if test "$host_os" = linux-dietlibc; then 667549dc963fSmrg case $cc_basename in 667649dc963fSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 667749dc963fSmrg esac 667849dc963fSmrg fi 667949dc963fSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 668049dc963fSmrg && test "$tmp_diet" = no 668149dc963fSmrg then 668249dc963fSmrg tmp_addflag= 668349dc963fSmrg tmp_sharedflag='-shared' 668449dc963fSmrg case $cc_basename,$host_cpu in 668549dc963fSmrg pgcc*) # Portland Group C compiler 668649dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 668749dc963fSmrg tmp_addflag=' $pic_flag' 668849dc963fSmrg ;; 668949dc963fSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 669049dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 669149dc963fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 669249dc963fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 669349dc963fSmrg tmp_addflag=' -i_dynamic' ;; 669449dc963fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 669549dc963fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 669649dc963fSmrg ifc* | ifort*) # Intel Fortran compiler 669749dc963fSmrg tmp_addflag=' -nofor_main' ;; 669849dc963fSmrg lf95*) # Lahey Fortran 8.1 669949dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 670049dc963fSmrg tmp_sharedflag='--shared' ;; 670149dc963fSmrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 670249dc963fSmrg tmp_sharedflag='-qmkshrobj' 670349dc963fSmrg tmp_addflag= ;; 670449dc963fSmrg esac 670549dc963fSmrg case `$CC -V 2>&1 | sed 5q` in 670649dc963fSmrg *Sun\ C*) # Sun C 5.9 670749dc963fSmrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 670849dc963fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 670949dc963fSmrg tmp_sharedflag='-G' ;; 671049dc963fSmrg *Sun\ F*) # Sun Fortran 8.3 671149dc963fSmrg tmp_sharedflag='-G' ;; 671249dc963fSmrg esac 671349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 67144b0ead49Smrg 671549dc963fSmrg if test "x$supports_anon_versioning" = xyes; then 671649dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 671749dc963fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 671849dc963fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 671949dc963fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 672049dc963fSmrg fi 67214b0ead49Smrg 672249dc963fSmrg case $cc_basename in 672349dc963fSmrg xlf*) 672449dc963fSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 672549dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 672649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 672749dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 672849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 672949dc963fSmrg if test "x$supports_anon_versioning" = xyes; then 673049dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 673149dc963fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 673249dc963fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 673349dc963fSmrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 673449dc963fSmrg fi 673549dc963fSmrg ;; 673649dc963fSmrg esac 673749dc963fSmrg else 673849dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 673949dc963fSmrg fi 674049dc963fSmrg ;; 67414b0ead49Smrg 674249dc963fSmrg netbsd*) 674349dc963fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 674449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 674549dc963fSmrg wlarc= 674649dc963fSmrg else 674749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 674849dc963fSmrg _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' 674949dc963fSmrg fi 675049dc963fSmrg ;; 67514b0ead49Smrg 675249dc963fSmrg solaris*) 675349dc963fSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 675449dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 675549dc963fSmrg cat <<_LT_EOF 1>&2 67564b0ead49Smrg 675749dc963fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 675849dc963fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 675949dc963fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 676049dc963fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 676149dc963fSmrg*** your PATH or compiler configuration so that the native linker is 676249dc963fSmrg*** used, and then restart. 67634b0ead49Smrg 676449dc963fSmrg_LT_EOF 676549dc963fSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 676649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 676749dc963fSmrg _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' 676849dc963fSmrg else 676949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 677049dc963fSmrg fi 677149dc963fSmrg ;; 67724b0ead49Smrg 677349dc963fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 677449dc963fSmrg case `$LD -v 2>&1` in 677549dc963fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 677649dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 677749dc963fSmrg cat <<_LT_EOF 1>&2 67784b0ead49Smrg 677949dc963fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 678049dc963fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 678149dc963fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 678249dc963fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 678349dc963fSmrg*** your PATH or compiler configuration so that the native linker is 678449dc963fSmrg*** used, and then restart. 678552b01e16Smrg 678649dc963fSmrg_LT_EOF 678749dc963fSmrg ;; 678849dc963fSmrg *) 678949dc963fSmrg # For security reasons, it is highly recommended that you always 679049dc963fSmrg # use absolute paths for naming shared libraries, and exclude the 679149dc963fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 679249dc963fSmrg # requires that you compile everything twice, which is a pain. 679349dc963fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 679449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 679549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 679649dc963fSmrg _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' 679749dc963fSmrg else 679849dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 679949dc963fSmrg fi 680049dc963fSmrg ;; 680149dc963fSmrg esac 680249dc963fSmrg ;; 680352b01e16Smrg 680449dc963fSmrg sunos4*) 680549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 680649dc963fSmrg wlarc= 680749dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 680849dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68094b0ead49Smrg ;; 681049dc963fSmrg 68114b0ead49Smrg *) 681249dc963fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 681349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 681449dc963fSmrg _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' 681549dc963fSmrg else 681649dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 681749dc963fSmrg fi 68184b0ead49Smrg ;; 68194b0ead49Smrg esac 68204b0ead49Smrg 682149dc963fSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 682249dc963fSmrg runpath_var= 682349dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 682449dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 682549dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 682649dc963fSmrg fi 682749dc963fSmrg else 682849dc963fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 682949dc963fSmrg case $host_os in 683049dc963fSmrg aix3*) 683149dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 683249dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 683349dc963fSmrg _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' 683449dc963fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 683549dc963fSmrg # are no directories specified by -L. 683649dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 683749dc963fSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 683849dc963fSmrg # Neither direct hardcoding nor static linking is supported with a 683949dc963fSmrg # broken collect2. 684049dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 684149dc963fSmrg fi 684249dc963fSmrg ;; 68434b0ead49Smrg 684449dc963fSmrg aix[[4-9]]*) 684549dc963fSmrg if test "$host_cpu" = ia64; then 684649dc963fSmrg # On IA64, the linker does run time linking by default, so we don't 684749dc963fSmrg # have to do anything special. 684849dc963fSmrg aix_use_runtimelinking=no 684949dc963fSmrg exp_sym_flag='-Bexport' 685049dc963fSmrg no_entry_flag="" 685149dc963fSmrg else 685249dc963fSmrg # If we're using GNU nm, then we don't want the "-C" option. 685349dc963fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 685449dc963fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 685549dc963fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 685649dc963fSmrg else 685749dc963fSmrg _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' 685849dc963fSmrg fi 685949dc963fSmrg aix_use_runtimelinking=no 68604b0ead49Smrg 686149dc963fSmrg # Test if we are trying to use run time linking or normal 686249dc963fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 686349dc963fSmrg # need to do runtime linking. 686449dc963fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 686549dc963fSmrg for ld_flag in $LDFLAGS; do 686649dc963fSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 686749dc963fSmrg aix_use_runtimelinking=yes 686849dc963fSmrg break 686949dc963fSmrg fi 687049dc963fSmrg done 687149dc963fSmrg ;; 687249dc963fSmrg esac 68734b0ead49Smrg 687449dc963fSmrg exp_sym_flag='-bexport' 687549dc963fSmrg no_entry_flag='-bnoentry' 687649dc963fSmrg fi 68774b0ead49Smrg 687849dc963fSmrg # When large executables or shared objects are built, AIX ld can 687949dc963fSmrg # have problems creating the table of contents. If linking a library 688049dc963fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 688149dc963fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 688249dc963fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 68834b0ead49Smrg 688449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='' 688549dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 688649dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 688749dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 688849dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 688949dc963fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 68904b0ead49Smrg 689149dc963fSmrg if test "$GCC" = yes; then 689249dc963fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 689349dc963fSmrg # We only want to do this on AIX 4.2 and lower, the check 689449dc963fSmrg # below for broken collect2 doesn't work under 4.3+ 689549dc963fSmrg collect2name=`${CC} -print-prog-name=collect2` 689649dc963fSmrg if test -f "$collect2name" && 689749dc963fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 689849dc963fSmrg then 689949dc963fSmrg # We have reworked collect2 690049dc963fSmrg : 690149dc963fSmrg else 690249dc963fSmrg # We have old collect2 690349dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 690449dc963fSmrg # It fails to find uninstalled libraries when the uninstalled 690549dc963fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 690649dc963fSmrg # to unsupported forces relinking 690749dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 690849dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 690949dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 691049dc963fSmrg fi 691149dc963fSmrg ;; 691249dc963fSmrg esac 691349dc963fSmrg shared_flag='-shared' 691449dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 691549dc963fSmrg shared_flag="$shared_flag "'${wl}-G' 691649dc963fSmrg fi 691749dc963fSmrg else 691849dc963fSmrg # not using gcc 691949dc963fSmrg if test "$host_cpu" = ia64; then 692049dc963fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 692149dc963fSmrg # chokes on -Wl,-G. The following line is correct: 692249dc963fSmrg shared_flag='-G' 692349dc963fSmrg else 692449dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 692549dc963fSmrg shared_flag='${wl}-G' 692649dc963fSmrg else 692749dc963fSmrg shared_flag='${wl}-bM:SRE' 692849dc963fSmrg fi 692949dc963fSmrg fi 693049dc963fSmrg fi 69314b0ead49Smrg 693249dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 693349dc963fSmrg # It seems that -bexpall does not export symbols beginning with 693449dc963fSmrg # underscore (_), so it is better to generate a list of symbols to export. 693549dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 693649dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 693749dc963fSmrg # Warning - without using the other runtime loading flags (-brtl), 693849dc963fSmrg # -berok will link without error, but may produce a broken library. 693949dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 694049dc963fSmrg # Determine the default libpath from the value encoded in an 694149dc963fSmrg # empty executable. 694249dc963fSmrg _LT_SYS_MODULE_PATH_AIX 694349dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 694449dc963fSmrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 694549dc963fSmrg else 694649dc963fSmrg if test "$host_cpu" = ia64; then 694749dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 694849dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 694949dc963fSmrg _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" 695049dc963fSmrg else 695149dc963fSmrg # Determine the default libpath from the value encoded in an 695249dc963fSmrg # empty executable. 695349dc963fSmrg _LT_SYS_MODULE_PATH_AIX 695449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 695549dc963fSmrg # Warning - without using the other run time loading flags, 695649dc963fSmrg # -berok will link without error, but may produce a broken library. 695749dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 695849dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 695949dc963fSmrg # Exported symbols can be pulled into shared objects from archives 696049dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 696149dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 696249dc963fSmrg # This is similar to how AIX traditionally builds its shared libraries. 696349dc963fSmrg _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' 696449dc963fSmrg fi 696549dc963fSmrg fi 696649dc963fSmrg ;; 69674b0ead49Smrg 696849dc963fSmrg amigaos*) 696949dc963fSmrg case $host_cpu in 697049dc963fSmrg powerpc) 697149dc963fSmrg # see comment about AmigaOS4 .so support 697249dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 697349dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 697449dc963fSmrg ;; 697549dc963fSmrg m68k) 697649dc963fSmrg _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)' 697749dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 697849dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 697949dc963fSmrg ;; 698049dc963fSmrg esac 698149dc963fSmrg ;; 69824b0ead49Smrg 698349dc963fSmrg bsdi[[45]]*) 698449dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 698549dc963fSmrg ;; 69864b0ead49Smrg 698749dc963fSmrg cygwin* | mingw* | pw32* | cegcc*) 698849dc963fSmrg # When not using gcc, we currently assume that we are using 698949dc963fSmrg # Microsoft Visual C++. 699049dc963fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 699149dc963fSmrg # no search path for DLLs. 699249dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 699349dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 699449dc963fSmrg # Tell ltmain to make .lib files, not .a files. 699549dc963fSmrg libext=lib 699649dc963fSmrg # Tell ltmain to make .dll files, not .so files. 699749dc963fSmrg shrext_cmds=".dll" 699849dc963fSmrg # FIXME: Setting linknames here is a bad hack. 699949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 700049dc963fSmrg # The linker will automatically build a .lib file if we build a DLL. 700149dc963fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 700249dc963fSmrg # FIXME: Should let the user specify the lib program. 700349dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 700449dc963fSmrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 700549dc963fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 700649dc963fSmrg ;; 70074b0ead49Smrg 700849dc963fSmrg darwin* | rhapsody*) 700949dc963fSmrg _LT_DARWIN_LINKER_FEATURES($1) 701049dc963fSmrg ;; 70114b0ead49Smrg 701249dc963fSmrg dgux*) 701349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 701449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 701549dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 701649dc963fSmrg ;; 70174b0ead49Smrg 701849dc963fSmrg freebsd1*) 701949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 702049dc963fSmrg ;; 70214b0ead49Smrg 702249dc963fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 702349dc963fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 702449dc963fSmrg # does not break anything, and helps significantly (at the cost of a little 702549dc963fSmrg # extra space). 702649dc963fSmrg freebsd2.2*) 702749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 702849dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 702949dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 703049dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 703149dc963fSmrg ;; 70324b0ead49Smrg 703349dc963fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 703449dc963fSmrg freebsd2*) 703549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 703649dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 703749dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 703849dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 703949dc963fSmrg ;; 70404b0ead49Smrg 704149dc963fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 704249dc963fSmrg freebsd* | dragonfly*) 704349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 704449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 704549dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 704649dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 704749dc963fSmrg ;; 70484b0ead49Smrg 704949dc963fSmrg hpux9*) 705049dc963fSmrg if test "$GCC" = yes; then 705149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 705249dc963fSmrg else 705349dc963fSmrg _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' 705449dc963fSmrg fi 705549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 705649dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 705749dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 70584b0ead49Smrg 705949dc963fSmrg # hardcode_minus_L: Not really in the search PATH, 706049dc963fSmrg # but as the default location of the library. 706149dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 706249dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 706349dc963fSmrg ;; 70644b0ead49Smrg 706549dc963fSmrg hpux10*) 706649dc963fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 706749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 706849dc963fSmrg else 706949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 707049dc963fSmrg fi 707149dc963fSmrg if test "$with_gnu_ld" = no; then 707249dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 707349dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 707449dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 707549dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 707649dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 707749dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 707849dc963fSmrg # hardcode_minus_L: Not really in the search PATH, 707949dc963fSmrg # but as the default location of the library. 708049dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 708149dc963fSmrg fi 708249dc963fSmrg ;; 70834b0ead49Smrg 708449dc963fSmrg hpux11*) 708549dc963fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 708649dc963fSmrg case $host_cpu in 708749dc963fSmrg hppa*64*) 708849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 708949dc963fSmrg ;; 709049dc963fSmrg ia64*) 709149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 709249dc963fSmrg ;; 709349dc963fSmrg *) 709449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 709549dc963fSmrg ;; 709649dc963fSmrg esac 709749dc963fSmrg else 709849dc963fSmrg case $host_cpu in 709949dc963fSmrg hppa*64*) 710049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 710149dc963fSmrg ;; 710249dc963fSmrg ia64*) 710349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 710449dc963fSmrg ;; 710549dc963fSmrg *) 710649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 710749dc963fSmrg ;; 710849dc963fSmrg esac 710949dc963fSmrg fi 711049dc963fSmrg if test "$with_gnu_ld" = no; then 711149dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 711249dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71134b0ead49Smrg 711449dc963fSmrg case $host_cpu in 711549dc963fSmrg hppa*64*|ia64*) 711649dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 711749dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 711849dc963fSmrg ;; 711949dc963fSmrg *) 712049dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 712149dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 712249dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 71234b0ead49Smrg 712449dc963fSmrg # hardcode_minus_L: Not really in the search PATH, 712549dc963fSmrg # but as the default location of the library. 712649dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 712749dc963fSmrg ;; 712849dc963fSmrg esac 712949dc963fSmrg fi 713049dc963fSmrg ;; 71314b0ead49Smrg 713249dc963fSmrg irix5* | irix6* | nonstopux*) 713349dc963fSmrg if test "$GCC" = yes; then 713449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 713549dc963fSmrg # Try to use the -exported_symbol ld option, if it does not 713649dc963fSmrg # work, assume that -exports_file does not work either and 713749dc963fSmrg # implicitly export all symbols. 713849dc963fSmrg save_LDFLAGS="$LDFLAGS" 713949dc963fSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 714049dc963fSmrg AC_LINK_IFELSE(int foo(void) {}, 714149dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 714249dc963fSmrg ) 714349dc963fSmrg LDFLAGS="$save_LDFLAGS" 714449dc963fSmrg else 714549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 714649dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 714749dc963fSmrg fi 714849dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 714949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 715049dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 715149dc963fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 715249dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 715349dc963fSmrg ;; 71544b0ead49Smrg 715549dc963fSmrg netbsd*) 715649dc963fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 715749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 715849dc963fSmrg else 715949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 716049dc963fSmrg fi 716149dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 716249dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 716349dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 716449dc963fSmrg ;; 71654b0ead49Smrg 716649dc963fSmrg newsos6) 716749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 716849dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 716949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 717049dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 717149dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 717249dc963fSmrg ;; 71734b0ead49Smrg 717449dc963fSmrg *nto* | *qnx*) 717549dc963fSmrg ;; 71764b0ead49Smrg 717749dc963fSmrg openbsd*) 717849dc963fSmrg if test -f /usr/libexec/ld.so; then 717949dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 718049dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 718149dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 718249dc963fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 718349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 718449dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 718549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 718649dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 718749dc963fSmrg else 718849dc963fSmrg case $host_os in 718949dc963fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 719049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 719149dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 719249dc963fSmrg ;; 719349dc963fSmrg *) 719449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 719549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 719649dc963fSmrg ;; 719749dc963fSmrg esac 719849dc963fSmrg fi 719949dc963fSmrg else 720049dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 720149dc963fSmrg fi 720249dc963fSmrg ;; 72034b0ead49Smrg 720449dc963fSmrg os2*) 720549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 720649dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 720749dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 720849dc963fSmrg _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' 720949dc963fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 721049dc963fSmrg ;; 72114b0ead49Smrg 721249dc963fSmrg osf3*) 721349dc963fSmrg if test "$GCC" = yes; then 721449dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 721549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 721649dc963fSmrg else 721749dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 721849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 721949dc963fSmrg fi 722049dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 722149dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 722249dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 722349dc963fSmrg ;; 72244b0ead49Smrg 722549dc963fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 722649dc963fSmrg if test "$GCC" = yes; then 722749dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 722849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 722949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 723049dc963fSmrg else 723149dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 723249dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 723349dc963fSmrg _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~ 723449dc963fSmrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 72354b0ead49Smrg 723649dc963fSmrg # Both c and cxx compiler support -rpath directly 723749dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 723849dc963fSmrg fi 723949dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 724049dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 724149dc963fSmrg ;; 72424b0ead49Smrg 724349dc963fSmrg solaris*) 724449dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 724549dc963fSmrg if test "$GCC" = yes; then 724649dc963fSmrg wlarc='${wl}' 724749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 724849dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 724949dc963fSmrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 725049dc963fSmrg else 725149dc963fSmrg case `$CC -V 2>&1` in 725249dc963fSmrg *"Compilers 5.0"*) 725349dc963fSmrg wlarc='' 725449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 725549dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 725649dc963fSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 725749dc963fSmrg ;; 725849dc963fSmrg *) 725949dc963fSmrg wlarc='${wl}' 726049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 726149dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 726249dc963fSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 726349dc963fSmrg ;; 726449dc963fSmrg esac 726549dc963fSmrg fi 726649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 726749dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 726849dc963fSmrg case $host_os in 726949dc963fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 727049dc963fSmrg *) 727149dc963fSmrg # The compiler driver will combine and reorder linker options, 727249dc963fSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 727349dc963fSmrg # but is careful enough not to reorder. 727449dc963fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 727549dc963fSmrg if test "$GCC" = yes; then 727649dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 727749dc963fSmrg else 727849dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 727949dc963fSmrg fi 728049dc963fSmrg ;; 728149dc963fSmrg esac 728249dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 728349dc963fSmrg ;; 72844b0ead49Smrg 728549dc963fSmrg sunos4*) 728649dc963fSmrg if test "x$host_vendor" = xsequent; then 728749dc963fSmrg # Use $CC to link under sequent, because it throws in some extra .o 728849dc963fSmrg # files that make .init and .fini sections work. 728949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 729049dc963fSmrg else 729149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 729249dc963fSmrg fi 729349dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 729449dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 729549dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 729649dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 729749dc963fSmrg ;; 72984b0ead49Smrg 729949dc963fSmrg sysv4) 730049dc963fSmrg case $host_vendor in 730149dc963fSmrg sni) 730249dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 730349dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 730449dc963fSmrg ;; 730549dc963fSmrg siemens) 730649dc963fSmrg ## LD is ld it makes a PLAMLIB 730749dc963fSmrg ## CC just makes a GrossModule. 730849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 730949dc963fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 731049dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 731149dc963fSmrg ;; 731249dc963fSmrg motorola) 731349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 731449dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 731549dc963fSmrg ;; 731649dc963fSmrg esac 731749dc963fSmrg runpath_var='LD_RUN_PATH' 731849dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 731949dc963fSmrg ;; 73204b0ead49Smrg 732149dc963fSmrg sysv4.3*) 732249dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 732349dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 732449dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 732549dc963fSmrg ;; 73264b0ead49Smrg 732749dc963fSmrg sysv4*MP*) 732849dc963fSmrg if test -d /usr/nec; then 732949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 733049dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 733149dc963fSmrg runpath_var=LD_RUN_PATH 733249dc963fSmrg hardcode_runpath_var=yes 733349dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 733449dc963fSmrg fi 733549dc963fSmrg ;; 73364b0ead49Smrg 733749dc963fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 733849dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 733949dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 734049dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 734149dc963fSmrg runpath_var='LD_RUN_PATH' 73424b0ead49Smrg 734349dc963fSmrg if test "$GCC" = yes; then 734449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734549dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734649dc963fSmrg else 734749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734849dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734949dc963fSmrg fi 735049dc963fSmrg ;; 73514b0ead49Smrg 735249dc963fSmrg sysv5* | sco3.2v5* | sco5v6*) 735349dc963fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 735449dc963fSmrg # link with -lc, and that would cause any symbols used from libc to 735549dc963fSmrg # always be unresolved, which means just about no library would 735649dc963fSmrg # ever link correctly. If we're not using GNU ld we use -z text 735749dc963fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 735849dc963fSmrg # as -z defs. 735949dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 736049dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 736149dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 736249dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 736349dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 736449dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 736549dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 736649dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 736749dc963fSmrg runpath_var='LD_RUN_PATH' 73684b0ead49Smrg 736949dc963fSmrg if test "$GCC" = yes; then 737049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737149dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737249dc963fSmrg else 737349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737449dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737549dc963fSmrg fi 737649dc963fSmrg ;; 73774b0ead49Smrg 737849dc963fSmrg uts4*) 737949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 738049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 738149dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 738249dc963fSmrg ;; 73834b0ead49Smrg 738449dc963fSmrg *) 738549dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 738649dc963fSmrg ;; 738749dc963fSmrg esac 73884b0ead49Smrg 738949dc963fSmrg if test x$host_vendor = xsni; then 739049dc963fSmrg case $host in 739149dc963fSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 739249dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 739349dc963fSmrg ;; 739449dc963fSmrg esac 739549dc963fSmrg fi 739649dc963fSmrg fi 739749dc963fSmrg]) 739849dc963fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 739949dc963fSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 74004b0ead49Smrg 740149dc963fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 74024b0ead49Smrg 740349dc963fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 740449dc963fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 740549dc963fSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 740649dc963fSmrg [The commands to extract the exported symbol list from a shared archive]) 74074b0ead49Smrg 740849dc963fSmrg# 740949dc963fSmrg# Do we need to explicitly link libc? 741049dc963fSmrg# 741149dc963fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 741249dc963fSmrgx|xyes) 741349dc963fSmrg # Assume -lc should be added 741449dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 74154b0ead49Smrg 741649dc963fSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 741749dc963fSmrg case $_LT_TAGVAR(archive_cmds, $1) in 741849dc963fSmrg *'~'*) 741949dc963fSmrg # FIXME: we may have to deal with multi-command sequences. 742049dc963fSmrg ;; 742149dc963fSmrg '$CC '*) 742249dc963fSmrg # Test whether the compiler implicitly links with -lc since on some 742349dc963fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 742449dc963fSmrg # to ld, don't add -lc before -lgcc. 742549dc963fSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 742649dc963fSmrg $RM conftest* 742749dc963fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 74284b0ead49Smrg 742949dc963fSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 743049dc963fSmrg soname=conftest 743149dc963fSmrg lib=conftest 743249dc963fSmrg libobjs=conftest.$ac_objext 743349dc963fSmrg deplibs= 743449dc963fSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 743549dc963fSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 743649dc963fSmrg compiler_flags=-v 743749dc963fSmrg linker_flags=-v 743849dc963fSmrg verstring= 743949dc963fSmrg output_objdir=. 744049dc963fSmrg libname=conftest 744149dc963fSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 744249dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 744349dc963fSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 744449dc963fSmrg then 744549dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 744649dc963fSmrg else 744749dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 744849dc963fSmrg fi 744949dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 745049dc963fSmrg else 745149dc963fSmrg cat conftest.err 1>&5 745249dc963fSmrg fi 745349dc963fSmrg $RM conftest* 745449dc963fSmrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 745549dc963fSmrg ;; 745649dc963fSmrg esac 745749dc963fSmrg fi 745849dc963fSmrg ;; 745949dc963fSmrgesac 74604b0ead49Smrg 746149dc963fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 746249dc963fSmrg [Whether or not to add -lc for building shared libraries]) 746349dc963fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 746449dc963fSmrg [enable_shared_with_static_runtimes], [0], 746549dc963fSmrg [Whether or not to disallow shared libs when runtime libs are static]) 746649dc963fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 746749dc963fSmrg [Compiler flag to allow reflexive dlopens]) 746849dc963fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 746949dc963fSmrg [Compiler flag to generate shared objects directly from archives]) 747049dc963fSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 747149dc963fSmrg [Whether the compiler copes with passing no objects directly]) 747249dc963fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 747349dc963fSmrg [Create an old-style archive from a shared archive]) 747449dc963fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 747549dc963fSmrg [Create a temporary old-style archive to link instead of a shared archive]) 747649dc963fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 747749dc963fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 747849dc963fSmrg_LT_TAGDECL([], [module_cmds], [2], 747949dc963fSmrg [Commands used to build a loadable module if different from building 748049dc963fSmrg a shared archive.]) 748149dc963fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 748249dc963fSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 748349dc963fSmrg [Whether we are building with GNU ld or not]) 748449dc963fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 748549dc963fSmrg [Flag that allows shared libraries with undefined symbols to be built]) 748649dc963fSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 748749dc963fSmrg [Flag that enforces no undefined symbols]) 748849dc963fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 748949dc963fSmrg [Flag to hardcode $libdir into a binary during linking. 749049dc963fSmrg This must work even if $libdir does not exist]) 749149dc963fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 749249dc963fSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 749349dc963fSmrg during linking. This must work even if $libdir does not exist]]) 749449dc963fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 749549dc963fSmrg [Whether we need a single "-rpath" flag with a separated argument]) 749649dc963fSmrg_LT_TAGDECL([], [hardcode_direct], [0], 749749dc963fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 749849dc963fSmrg DIR into the resulting binary]) 749949dc963fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 750049dc963fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 750149dc963fSmrg DIR into the resulting binary and the resulting library dependency is 750249dc963fSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 750349dc963fSmrg library is relocated]) 750449dc963fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 750549dc963fSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 750649dc963fSmrg into the resulting binary]) 750749dc963fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 750849dc963fSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 750949dc963fSmrg into the resulting binary]) 751049dc963fSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 751149dc963fSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 751249dc963fSmrg into the library and all subsequent libraries and executables linked 751349dc963fSmrg against it]) 751449dc963fSmrg_LT_TAGDECL([], [inherit_rpath], [0], 751549dc963fSmrg [Set to yes if linker adds runtime paths of dependent libraries 751649dc963fSmrg to runtime path list]) 751749dc963fSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 751849dc963fSmrg [Whether libtool must link a program against all its dependency libraries]) 751949dc963fSmrg_LT_TAGDECL([], [fix_srcfile_path], [1], 752049dc963fSmrg [Fix the shell variable $srcfile for the compiler]) 752149dc963fSmrg_LT_TAGDECL([], [always_export_symbols], [0], 752249dc963fSmrg [Set to "yes" if exported symbols are required]) 752349dc963fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 752449dc963fSmrg [The commands to list exported symbols]) 752549dc963fSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 752649dc963fSmrg [Symbols that should not be listed in the preloaded symbols]) 752749dc963fSmrg_LT_TAGDECL([], [include_expsyms], [1], 752849dc963fSmrg [Symbols that must always be exported]) 752949dc963fSmrg_LT_TAGDECL([], [prelink_cmds], [2], 753049dc963fSmrg [Commands necessary for linking programs (against libraries) with templates]) 753149dc963fSmrg_LT_TAGDECL([], [file_list_spec], [1], 753249dc963fSmrg [Specify filename containing input files]) 753349dc963fSmrgdnl FIXME: Not yet implemented 753449dc963fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 753549dc963fSmrgdnl [Compiler flag to generate thread safe objects]) 753649dc963fSmrg])# _LT_LINKER_SHLIBS 753749dc963fSmrg 753849dc963fSmrg 753949dc963fSmrg# _LT_LANG_C_CONFIG([TAG]) 754049dc963fSmrg# ------------------------ 754149dc963fSmrg# Ensure that the configuration variables for a C compiler are suitably 754249dc963fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 754349dc963fSmrg# the compiler configuration to `libtool'. 754449dc963fSmrgm4_defun([_LT_LANG_C_CONFIG], 754549dc963fSmrg[m4_require([_LT_DECL_EGREP])dnl 754649dc963fSmrglt_save_CC="$CC" 754749dc963fSmrgAC_LANG_PUSH(C) 75484b0ead49Smrg 754949dc963fSmrg# Source file extension for C test sources. 755049dc963fSmrgac_ext=c 75514b0ead49Smrg 755249dc963fSmrg# Object file extension for compiled C test sources. 755349dc963fSmrgobjext=o 755449dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 75554b0ead49Smrg 755649dc963fSmrg# Code to be used in simple compile tests 755749dc963fSmrglt_simple_compile_test_code="int some_variable = 0;" 75584b0ead49Smrg 755949dc963fSmrg# Code to be used in simple link tests 756049dc963fSmrglt_simple_link_test_code='int main(){return(0);}' 75614b0ead49Smrg 756249dc963fSmrg_LT_TAG_COMPILER 756349dc963fSmrg# Save the default compiler, since it gets overwritten when the other 756449dc963fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 756549dc963fSmrgcompiler_DEFAULT=$CC 75664b0ead49Smrg 756749dc963fSmrg# save warnings/boilerplate of simple test code 756849dc963fSmrg_LT_COMPILER_BOILERPLATE 756949dc963fSmrg_LT_LINKER_BOILERPLATE 75704b0ead49Smrg 757149dc963fSmrgif test -n "$compiler"; then 757249dc963fSmrg _LT_COMPILER_NO_RTTI($1) 757349dc963fSmrg _LT_COMPILER_PIC($1) 757449dc963fSmrg _LT_COMPILER_C_O($1) 757549dc963fSmrg _LT_COMPILER_FILE_LOCKS($1) 757649dc963fSmrg _LT_LINKER_SHLIBS($1) 757749dc963fSmrg _LT_SYS_DYNAMIC_LINKER($1) 757849dc963fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 757949dc963fSmrg LT_SYS_DLOPEN_SELF 758049dc963fSmrg _LT_CMD_STRIPLIB 758149dc963fSmrg 758249dc963fSmrg # Report which library types will actually be built 758349dc963fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 758449dc963fSmrg AC_MSG_RESULT([$can_build_shared]) 758549dc963fSmrg 758649dc963fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 758749dc963fSmrg test "$can_build_shared" = "no" && enable_shared=no 758849dc963fSmrg 758949dc963fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 759049dc963fSmrg # are all built from PIC. 759149dc963fSmrg case $host_os in 759249dc963fSmrg aix3*) 759349dc963fSmrg test "$enable_shared" = yes && enable_static=no 759449dc963fSmrg if test -n "$RANLIB"; then 759549dc963fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 759649dc963fSmrg postinstall_cmds='$RANLIB $lib' 759749dc963fSmrg fi 759849dc963fSmrg ;; 75994b0ead49Smrg 760049dc963fSmrg aix[[4-9]]*) 760149dc963fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 760249dc963fSmrg test "$enable_shared" = yes && enable_static=no 760349dc963fSmrg fi 760449dc963fSmrg ;; 760549dc963fSmrg esac 760649dc963fSmrg AC_MSG_RESULT([$enable_shared]) 76074b0ead49Smrg 760849dc963fSmrg AC_MSG_CHECKING([whether to build static libraries]) 760949dc963fSmrg # Make sure either enable_shared or enable_static is yes. 761049dc963fSmrg test "$enable_shared" = yes || enable_static=yes 761149dc963fSmrg AC_MSG_RESULT([$enable_static]) 76124b0ead49Smrg 761349dc963fSmrg _LT_CONFIG($1) 761449dc963fSmrgfi 761549dc963fSmrgAC_LANG_POP 761649dc963fSmrgCC="$lt_save_CC" 761749dc963fSmrg])# _LT_LANG_C_CONFIG 76184b0ead49Smrg 76194b0ead49Smrg 762049dc963fSmrg# _LT_PROG_CXX 762149dc963fSmrg# ------------ 762249dc963fSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 762349dc963fSmrg# compiler, we have our own version here. 762449dc963fSmrgm4_defun([_LT_PROG_CXX], 762549dc963fSmrg[ 762649dc963fSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 762749dc963fSmrgAC_PROG_CXX 762849dc963fSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 762949dc963fSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 763049dc963fSmrg (test "X$CXX" != "Xg++"))) ; then 763149dc963fSmrg AC_PROG_CXXCPP 763249dc963fSmrgelse 763349dc963fSmrg _lt_caught_CXX_error=yes 763449dc963fSmrgfi 763549dc963fSmrgpopdef([AC_MSG_ERROR]) 763649dc963fSmrg])# _LT_PROG_CXX 76374b0ead49Smrg 763849dc963fSmrgdnl aclocal-1.4 backwards compatibility: 763949dc963fSmrgdnl AC_DEFUN([_LT_PROG_CXX], []) 76404b0ead49Smrg 76414b0ead49Smrg 764249dc963fSmrg# _LT_LANG_CXX_CONFIG([TAG]) 764349dc963fSmrg# -------------------------- 764449dc963fSmrg# Ensure that the configuration variables for a C++ compiler are suitably 764549dc963fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 764649dc963fSmrg# the compiler configuration to `libtool'. 764749dc963fSmrgm4_defun([_LT_LANG_CXX_CONFIG], 764849dc963fSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl 764949dc963fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 765049dc963fSmrgm4_require([_LT_DECL_EGREP])dnl 765149dc963fSmrg 765249dc963fSmrgAC_LANG_PUSH(C++) 765349dc963fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 765449dc963fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 765549dc963fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 765649dc963fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 765749dc963fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 765849dc963fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 765949dc963fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 766049dc963fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 766149dc963fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 766249dc963fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 766349dc963fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 766449dc963fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 766549dc963fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 766649dc963fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 766749dc963fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 766849dc963fSmrg_LT_TAGVAR(module_cmds, $1)= 766949dc963fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 767049dc963fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 767149dc963fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 767249dc963fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 767349dc963fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 767449dc963fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 76754b0ead49Smrg 767649dc963fSmrg# Source file extension for C++ test sources. 767749dc963fSmrgac_ext=cpp 76784b0ead49Smrg 767949dc963fSmrg# Object file extension for compiled C++ test sources. 768049dc963fSmrgobjext=o 768149dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 768249dc963fSmrg 768349dc963fSmrg# No sense in running all these tests if we already determined that 768449dc963fSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 768549dc963fSmrg# are currently assumed to apply to all compilers on this platform, 768649dc963fSmrg# and will be corrupted by setting them based on a non-working compiler. 768749dc963fSmrgif test "$_lt_caught_CXX_error" != yes; then 768849dc963fSmrg # Code to be used in simple compile tests 768949dc963fSmrg lt_simple_compile_test_code="int some_variable = 0;" 769049dc963fSmrg 769149dc963fSmrg # Code to be used in simple link tests 769249dc963fSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 769349dc963fSmrg 769449dc963fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 769549dc963fSmrg _LT_TAG_COMPILER 769649dc963fSmrg 769749dc963fSmrg # save warnings/boilerplate of simple test code 769849dc963fSmrg _LT_COMPILER_BOILERPLATE 769949dc963fSmrg _LT_LINKER_BOILERPLATE 770049dc963fSmrg 770149dc963fSmrg # Allow CC to be a program name with arguments. 770249dc963fSmrg lt_save_CC=$CC 770349dc963fSmrg lt_save_LD=$LD 770449dc963fSmrg lt_save_GCC=$GCC 770549dc963fSmrg GCC=$GXX 770649dc963fSmrg lt_save_with_gnu_ld=$with_gnu_ld 770749dc963fSmrg lt_save_path_LD=$lt_cv_path_LD 770849dc963fSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 770949dc963fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 771049dc963fSmrg else 771149dc963fSmrg $as_unset lt_cv_prog_gnu_ld 771249dc963fSmrg fi 771349dc963fSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 771449dc963fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 771549dc963fSmrg else 771649dc963fSmrg $as_unset lt_cv_path_LD 771749dc963fSmrg fi 771849dc963fSmrg test -z "${LDCXX+set}" || LD=$LDCXX 771949dc963fSmrg CC=${CXX-"c++"} 772049dc963fSmrg compiler=$CC 772149dc963fSmrg _LT_TAGVAR(compiler, $1)=$CC 772249dc963fSmrg _LT_CC_BASENAME([$compiler]) 77234b0ead49Smrg 772449dc963fSmrg if test -n "$compiler"; then 772549dc963fSmrg # We don't want -fno-exception when compiling C++ code, so set the 772649dc963fSmrg # no_builtin_flag separately 772749dc963fSmrg if test "$GXX" = yes; then 772849dc963fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 772949dc963fSmrg else 773049dc963fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 773149dc963fSmrg fi 77324b0ead49Smrg 773349dc963fSmrg if test "$GXX" = yes; then 773449dc963fSmrg # Set up default GNU C++ configuration 77354b0ead49Smrg 773649dc963fSmrg LT_PATH_LD 77374b0ead49Smrg 773849dc963fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 773949dc963fSmrg # archiving commands below assume that GNU ld is being used. 774049dc963fSmrg if test "$with_gnu_ld" = yes; then 774149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 774249dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 77434b0ead49Smrg 774449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 774549dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 77464b0ead49Smrg 774749dc963fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 774849dc963fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 774949dc963fSmrg # investigate it a little bit more. (MM) 775049dc963fSmrg wlarc='${wl}' 77514b0ead49Smrg 775249dc963fSmrg # ancient GNU ld didn't support --whole-archive et. al. 775349dc963fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 775449dc963fSmrg $GREP 'no-whole-archive' > /dev/null; then 775549dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 775649dc963fSmrg else 775749dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 775849dc963fSmrg fi 775949dc963fSmrg else 776049dc963fSmrg with_gnu_ld=no 776149dc963fSmrg wlarc= 776249dc963fSmrg 776349dc963fSmrg # A generic and very simple default shared library creation 776449dc963fSmrg # command for GNU C++ for the case where it uses the native 776549dc963fSmrg # linker, instead of GNU ld. If possible, this setting should 776649dc963fSmrg # overridden to take advantage of the native linker features on 776749dc963fSmrg # the platform it is being used on. 776849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 776949dc963fSmrg fi 77704b0ead49Smrg 777149dc963fSmrg # Commands to make compiler produce verbose output that lists 777249dc963fSmrg # what "hidden" libraries, object files and flags are used when 777349dc963fSmrg # linking a shared library. 777449dc963fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 77754b0ead49Smrg 777649dc963fSmrg else 777749dc963fSmrg GXX=no 777849dc963fSmrg with_gnu_ld=no 777949dc963fSmrg wlarc= 778049dc963fSmrg fi 77814b0ead49Smrg 778249dc963fSmrg # PORTME: fill in a description of your system's C++ link characteristics 778349dc963fSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 778449dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 778549dc963fSmrg case $host_os in 778649dc963fSmrg aix3*) 778749dc963fSmrg # FIXME: insert proper C++ library support 778849dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 778949dc963fSmrg ;; 779049dc963fSmrg aix[[4-9]]*) 779149dc963fSmrg if test "$host_cpu" = ia64; then 779249dc963fSmrg # On IA64, the linker does run time linking by default, so we don't 779349dc963fSmrg # have to do anything special. 779449dc963fSmrg aix_use_runtimelinking=no 779549dc963fSmrg exp_sym_flag='-Bexport' 779649dc963fSmrg no_entry_flag="" 779749dc963fSmrg else 779849dc963fSmrg aix_use_runtimelinking=no 779949dc963fSmrg 780049dc963fSmrg # Test if we are trying to use run time linking or normal 780149dc963fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 780249dc963fSmrg # need to do runtime linking. 780349dc963fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 780449dc963fSmrg for ld_flag in $LDFLAGS; do 780549dc963fSmrg case $ld_flag in 780649dc963fSmrg *-brtl*) 780749dc963fSmrg aix_use_runtimelinking=yes 780849dc963fSmrg break 780949dc963fSmrg ;; 781049dc963fSmrg esac 781149dc963fSmrg done 781249dc963fSmrg ;; 781349dc963fSmrg esac 78144b0ead49Smrg 781549dc963fSmrg exp_sym_flag='-bexport' 781649dc963fSmrg no_entry_flag='-bnoentry' 781749dc963fSmrg fi 78184b0ead49Smrg 781949dc963fSmrg # When large executables or shared objects are built, AIX ld can 782049dc963fSmrg # have problems creating the table of contents. If linking a library 782149dc963fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 782249dc963fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 782349dc963fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 782449dc963fSmrg 782549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='' 782649dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 782749dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 782849dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 782949dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 783049dc963fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 783149dc963fSmrg 783249dc963fSmrg if test "$GXX" = yes; then 783349dc963fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 783449dc963fSmrg # We only want to do this on AIX 4.2 and lower, the check 783549dc963fSmrg # below for broken collect2 doesn't work under 4.3+ 783649dc963fSmrg collect2name=`${CC} -print-prog-name=collect2` 783749dc963fSmrg if test -f "$collect2name" && 783849dc963fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 783949dc963fSmrg then 784049dc963fSmrg # We have reworked collect2 784149dc963fSmrg : 784249dc963fSmrg else 784349dc963fSmrg # We have old collect2 784449dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 784549dc963fSmrg # It fails to find uninstalled libraries when the uninstalled 784649dc963fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 784749dc963fSmrg # to unsupported forces relinking 784849dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 784949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 785049dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 785149dc963fSmrg fi 785249dc963fSmrg esac 785349dc963fSmrg shared_flag='-shared' 785449dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 785549dc963fSmrg shared_flag="$shared_flag "'${wl}-G' 785649dc963fSmrg fi 785749dc963fSmrg else 785849dc963fSmrg # not using gcc 785949dc963fSmrg if test "$host_cpu" = ia64; then 786049dc963fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 786149dc963fSmrg # chokes on -Wl,-G. The following line is correct: 786249dc963fSmrg shared_flag='-G' 786349dc963fSmrg else 786449dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 786549dc963fSmrg shared_flag='${wl}-G' 786649dc963fSmrg else 786749dc963fSmrg shared_flag='${wl}-bM:SRE' 786849dc963fSmrg fi 786949dc963fSmrg fi 787049dc963fSmrg fi 78714b0ead49Smrg 787249dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 787349dc963fSmrg # It seems that -bexpall does not export symbols beginning with 787449dc963fSmrg # underscore (_), so it is better to generate a list of symbols to 787549dc963fSmrg # export. 787649dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 787749dc963fSmrg if test "$aix_use_runtimelinking" = yes; then 787849dc963fSmrg # Warning - without using the other runtime loading flags (-brtl), 787949dc963fSmrg # -berok will link without error, but may produce a broken library. 788049dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 788149dc963fSmrg # Determine the default libpath from the value encoded in an empty 788249dc963fSmrg # executable. 788349dc963fSmrg _LT_SYS_MODULE_PATH_AIX 788449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 788549dc963fSmrg 788649dc963fSmrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 788749dc963fSmrg else 788849dc963fSmrg if test "$host_cpu" = ia64; then 788949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 789049dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 789149dc963fSmrg _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" 789249dc963fSmrg else 789349dc963fSmrg # Determine the default libpath from the value encoded in an 789449dc963fSmrg # empty executable. 789549dc963fSmrg _LT_SYS_MODULE_PATH_AIX 789649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 789749dc963fSmrg # Warning - without using the other run time loading flags, 789849dc963fSmrg # -berok will link without error, but may produce a broken library. 789949dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 790049dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 790149dc963fSmrg # Exported symbols can be pulled into shared objects from archives 790249dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 790349dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 790449dc963fSmrg # This is similar to how AIX traditionally builds its shared 790549dc963fSmrg # libraries. 790649dc963fSmrg _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' 790749dc963fSmrg fi 790849dc963fSmrg fi 790949dc963fSmrg ;; 79104b0ead49Smrg 791149dc963fSmrg beos*) 791249dc963fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 791349dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 791449dc963fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 791549dc963fSmrg # support --undefined. This deserves some investigation. FIXME 791649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 791749dc963fSmrg else 791849dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 791949dc963fSmrg fi 792049dc963fSmrg ;; 79214b0ead49Smrg 792249dc963fSmrg chorus*) 792349dc963fSmrg case $cc_basename in 792449dc963fSmrg *) 792549dc963fSmrg # FIXME: insert proper C++ library support 792649dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 792749dc963fSmrg ;; 792849dc963fSmrg esac 792949dc963fSmrg ;; 79304b0ead49Smrg 793149dc963fSmrg cygwin* | mingw* | pw32* | cegcc*) 793249dc963fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 793349dc963fSmrg # as there is no search path for DLLs. 793449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 793549dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 793649dc963fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 793749dc963fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 793849dc963fSmrg 793949dc963fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 794049dc963fSmrg _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' 794149dc963fSmrg # If the export-symbols file already is a .def file (1st line 794249dc963fSmrg # is EXPORTS), use it as is; otherwise, prepend... 794349dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 794449dc963fSmrg cp $export_symbols $output_objdir/$soname.def; 794549dc963fSmrg else 794649dc963fSmrg echo EXPORTS > $output_objdir/$soname.def; 794749dc963fSmrg cat $export_symbols >> $output_objdir/$soname.def; 794849dc963fSmrg fi~ 794949dc963fSmrg $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' 795049dc963fSmrg else 795149dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 795249dc963fSmrg fi 795349dc963fSmrg ;; 795449dc963fSmrg darwin* | rhapsody*) 795549dc963fSmrg _LT_DARWIN_LINKER_FEATURES($1) 795649dc963fSmrg ;; 79574b0ead49Smrg 795849dc963fSmrg dgux*) 795949dc963fSmrg case $cc_basename in 796049dc963fSmrg ec++*) 796149dc963fSmrg # FIXME: insert proper C++ library support 796249dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 796349dc963fSmrg ;; 796449dc963fSmrg ghcx*) 796549dc963fSmrg # Green Hills C++ Compiler 796649dc963fSmrg # FIXME: insert proper C++ library support 796749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 796849dc963fSmrg ;; 796949dc963fSmrg *) 797049dc963fSmrg # FIXME: insert proper C++ library support 797149dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 797249dc963fSmrg ;; 797349dc963fSmrg esac 797449dc963fSmrg ;; 79754b0ead49Smrg 797649dc963fSmrg freebsd[[12]]*) 797749dc963fSmrg # C++ shared libraries reported to be fairly broken before 797849dc963fSmrg # switch to ELF 797949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 798049dc963fSmrg ;; 79814b0ead49Smrg 798249dc963fSmrg freebsd-elf*) 798349dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 798449dc963fSmrg ;; 79854b0ead49Smrg 798649dc963fSmrg freebsd* | dragonfly*) 798749dc963fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 798849dc963fSmrg # conventions 798949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 799049dc963fSmrg ;; 79914b0ead49Smrg 799249dc963fSmrg gnu*) 799349dc963fSmrg ;; 79944b0ead49Smrg 799549dc963fSmrg hpux9*) 799649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 799749dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 799849dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 799949dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 800049dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 800149dc963fSmrg # but as the default 800249dc963fSmrg # location of the library. 800349dc963fSmrg 800449dc963fSmrg case $cc_basename in 800549dc963fSmrg CC*) 800649dc963fSmrg # FIXME: insert proper C++ library support 800749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 800849dc963fSmrg ;; 800949dc963fSmrg aCC*) 801049dc963fSmrg _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' 801149dc963fSmrg # Commands to make compiler produce verbose output that lists 801249dc963fSmrg # what "hidden" libraries, object files and flags are used when 801349dc963fSmrg # linking a shared library. 801449dc963fSmrg # 801549dc963fSmrg # There doesn't appear to be a way to prevent this compiler from 801649dc963fSmrg # explicitly linking system object files so we need to strip them 801749dc963fSmrg # from the output so that they don't get included in the library 801849dc963fSmrg # dependencies. 801949dc963fSmrg 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; $ECHO "X$list" | $Xsed' 802049dc963fSmrg ;; 802149dc963fSmrg *) 802249dc963fSmrg if test "$GXX" = yes; then 802349dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 802449dc963fSmrg else 802549dc963fSmrg # FIXME: insert proper C++ library support 802649dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 802749dc963fSmrg fi 802849dc963fSmrg ;; 802949dc963fSmrg esac 803049dc963fSmrg ;; 80314b0ead49Smrg 803249dc963fSmrg hpux10*|hpux11*) 803349dc963fSmrg if test $with_gnu_ld = no; then 803449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 803549dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 803649dc963fSmrg 803749dc963fSmrg case $host_cpu in 803849dc963fSmrg hppa*64*|ia64*) 803949dc963fSmrg ;; 804049dc963fSmrg *) 804149dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 804249dc963fSmrg ;; 804349dc963fSmrg esac 804449dc963fSmrg fi 804549dc963fSmrg case $host_cpu in 804649dc963fSmrg hppa*64*|ia64*) 804749dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 804849dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 804949dc963fSmrg ;; 805049dc963fSmrg *) 805149dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 805249dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 805349dc963fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 805449dc963fSmrg # but as the default 805549dc963fSmrg # location of the library. 805649dc963fSmrg ;; 805749dc963fSmrg esac 805849dc963fSmrg 805949dc963fSmrg case $cc_basename in 806049dc963fSmrg CC*) 806149dc963fSmrg # FIXME: insert proper C++ library support 806249dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 806349dc963fSmrg ;; 806449dc963fSmrg aCC*) 806549dc963fSmrg case $host_cpu in 806649dc963fSmrg hppa*64*) 806749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 806849dc963fSmrg ;; 806949dc963fSmrg ia64*) 807049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 807149dc963fSmrg ;; 807249dc963fSmrg *) 807349dc963fSmrg _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' 807449dc963fSmrg ;; 807549dc963fSmrg esac 807649dc963fSmrg # Commands to make compiler produce verbose output that lists 807749dc963fSmrg # what "hidden" libraries, object files and flags are used when 807849dc963fSmrg # linking a shared library. 807949dc963fSmrg # 808049dc963fSmrg # There doesn't appear to be a way to prevent this compiler from 808149dc963fSmrg # explicitly linking system object files so we need to strip them 808249dc963fSmrg # from the output so that they don't get included in the library 808349dc963fSmrg # dependencies. 808449dc963fSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 808549dc963fSmrg ;; 808649dc963fSmrg *) 808749dc963fSmrg if test "$GXX" = yes; then 808849dc963fSmrg if test $with_gnu_ld = no; then 808949dc963fSmrg case $host_cpu in 809049dc963fSmrg hppa*64*) 809149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 809249dc963fSmrg ;; 809349dc963fSmrg ia64*) 809449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 809549dc963fSmrg ;; 809649dc963fSmrg *) 809749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 809849dc963fSmrg ;; 809949dc963fSmrg esac 810049dc963fSmrg fi 810149dc963fSmrg else 810249dc963fSmrg # FIXME: insert proper C++ library support 810349dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 810449dc963fSmrg fi 810549dc963fSmrg ;; 810649dc963fSmrg esac 810749dc963fSmrg ;; 81084b0ead49Smrg 810949dc963fSmrg interix[[3-9]]*) 811049dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 811149dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 811249dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 811349dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 811449dc963fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 811549dc963fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 811649dc963fSmrg # default) and relocated if they conflict, which is a slow very memory 811749dc963fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 811849dc963fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 811949dc963fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 812049dc963fSmrg _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' 812149dc963fSmrg _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' 812249dc963fSmrg ;; 812349dc963fSmrg irix5* | irix6*) 812449dc963fSmrg case $cc_basename in 812549dc963fSmrg CC*) 812649dc963fSmrg # SGI C++ 812749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 812849dc963fSmrg 812949dc963fSmrg # Archives containing C++ object files must be created using 813049dc963fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 813149dc963fSmrg # necessary to make sure instantiated templates are included 813249dc963fSmrg # in the archive. 813349dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 813449dc963fSmrg ;; 813549dc963fSmrg *) 813649dc963fSmrg if test "$GXX" = yes; then 813749dc963fSmrg if test "$with_gnu_ld" = no; then 813849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 813949dc963fSmrg else 814049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' 814149dc963fSmrg fi 814249dc963fSmrg fi 814349dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 814449dc963fSmrg ;; 814549dc963fSmrg esac 814649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 814749dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 814849dc963fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 814949dc963fSmrg ;; 81504b0ead49Smrg 815149dc963fSmrg linux* | k*bsd*-gnu) 815249dc963fSmrg case $cc_basename in 815349dc963fSmrg KCC*) 815449dc963fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 815549dc963fSmrg 815649dc963fSmrg # KCC will only create a shared library if the output file 815749dc963fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 815849dc963fSmrg # to its proper name (with version) after linking. 815949dc963fSmrg _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' 816049dc963fSmrg _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' 816149dc963fSmrg # Commands to make compiler produce verbose output that lists 816249dc963fSmrg # what "hidden" libraries, object files and flags are used when 816349dc963fSmrg # linking a shared library. 816449dc963fSmrg # 816549dc963fSmrg # There doesn't appear to be a way to prevent this compiler from 816649dc963fSmrg # explicitly linking system object files so we need to strip them 816749dc963fSmrg # from the output so that they don't get included in the library 816849dc963fSmrg # dependencies. 816949dc963fSmrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 817049dc963fSmrg 817149dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 817249dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 817349dc963fSmrg 817449dc963fSmrg # Archives containing C++ object files must be created using 817549dc963fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 817649dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 817749dc963fSmrg ;; 817849dc963fSmrg icpc* | ecpc* ) 817949dc963fSmrg # Intel C++ 818049dc963fSmrg with_gnu_ld=yes 818149dc963fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 818249dc963fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 818349dc963fSmrg # earlier do not add the objects themselves. 818449dc963fSmrg case `$CC -V 2>&1` in 818549dc963fSmrg *"Version 7."*) 818649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 818749dc963fSmrg _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' 818849dc963fSmrg ;; 818949dc963fSmrg *) # Version 8.0 or newer 819049dc963fSmrg tmp_idyn= 819149dc963fSmrg case $host_cpu in 819249dc963fSmrg ia64*) tmp_idyn=' -i_dynamic';; 819349dc963fSmrg esac 819449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 819549dc963fSmrg _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' 819649dc963fSmrg ;; 819749dc963fSmrg esac 819849dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 819949dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 820049dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 820149dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 820249dc963fSmrg ;; 820349dc963fSmrg pgCC* | pgcpp*) 820449dc963fSmrg # Portland Group C++ compiler 820549dc963fSmrg case `$CC -V` in 820649dc963fSmrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 820749dc963fSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 820849dc963fSmrg rm -rf $tpldir~ 820949dc963fSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 821049dc963fSmrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 821149dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 821249dc963fSmrg rm -rf $tpldir~ 821349dc963fSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 821449dc963fSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 821549dc963fSmrg $RANLIB $oldlib' 821649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 821749dc963fSmrg rm -rf $tpldir~ 821849dc963fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 821949dc963fSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 822049dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 822149dc963fSmrg rm -rf $tpldir~ 822249dc963fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 822349dc963fSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 822449dc963fSmrg ;; 822549dc963fSmrg *) # Version 6 will use weak symbols 822649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 822749dc963fSmrg _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' 822849dc963fSmrg ;; 822949dc963fSmrg esac 82304b0ead49Smrg 823149dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 823249dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 823349dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 823449dc963fSmrg ;; 823549dc963fSmrg cxx*) 823649dc963fSmrg # Compaq C++ 823749dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 823849dc963fSmrg _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' 82394b0ead49Smrg 824049dc963fSmrg runpath_var=LD_RUN_PATH 824149dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 824249dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 82434b0ead49Smrg 824449dc963fSmrg # Commands to make compiler produce verbose output that lists 824549dc963fSmrg # what "hidden" libraries, object files and flags are used when 824649dc963fSmrg # linking a shared library. 824749dc963fSmrg # 824849dc963fSmrg # There doesn't appear to be a way to prevent this compiler from 824949dc963fSmrg # explicitly linking system object files so we need to strip them 825049dc963fSmrg # from the output so that they don't get included in the library 825149dc963fSmrg # dependencies. 825249dc963fSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 825349dc963fSmrg ;; 825449dc963fSmrg xl*) 825549dc963fSmrg # IBM XL 8.0 on PPC, with GNU ld 825649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 825749dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 825849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 825949dc963fSmrg if test "x$supports_anon_versioning" = xyes; then 826049dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 826149dc963fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 826249dc963fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 826349dc963fSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 826449dc963fSmrg fi 826549dc963fSmrg ;; 826649dc963fSmrg *) 826749dc963fSmrg case `$CC -V 2>&1 | sed 5q` in 826849dc963fSmrg *Sun\ C*) 826949dc963fSmrg # Sun C++ 5.9 827049dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 827149dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 827249dc963fSmrg _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' 827349dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 827449dc963fSmrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 827549dc963fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 827649dc963fSmrg 827749dc963fSmrg # Not sure whether something based on 827849dc963fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 827949dc963fSmrg # would be better. 828049dc963fSmrg output_verbose_link_cmd='echo' 828149dc963fSmrg 828249dc963fSmrg # Archives containing C++ object files must be created using 828349dc963fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 828449dc963fSmrg # necessary to make sure instantiated templates are included 828549dc963fSmrg # in the archive. 828649dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 828749dc963fSmrg ;; 828849dc963fSmrg esac 828949dc963fSmrg ;; 829049dc963fSmrg esac 829149dc963fSmrg ;; 82924b0ead49Smrg 829349dc963fSmrg lynxos*) 829449dc963fSmrg # FIXME: insert proper C++ library support 829549dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 829649dc963fSmrg ;; 82974b0ead49Smrg 829849dc963fSmrg m88k*) 829949dc963fSmrg # FIXME: insert proper C++ library support 830049dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 830149dc963fSmrg ;; 83024b0ead49Smrg 830349dc963fSmrg mvs*) 830449dc963fSmrg case $cc_basename in 830549dc963fSmrg cxx*) 830649dc963fSmrg # FIXME: insert proper C++ library support 830749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 830849dc963fSmrg ;; 830949dc963fSmrg *) 831049dc963fSmrg # FIXME: insert proper C++ library support 831149dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 831249dc963fSmrg ;; 831349dc963fSmrg esac 831449dc963fSmrg ;; 83154b0ead49Smrg 831649dc963fSmrg netbsd*) 831749dc963fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 831849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 831949dc963fSmrg wlarc= 832049dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 832149dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 832249dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 832349dc963fSmrg fi 832449dc963fSmrg # Workaround some broken pre-1.5 toolchains 832549dc963fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 832649dc963fSmrg ;; 83274b0ead49Smrg 832849dc963fSmrg *nto* | *qnx*) 832949dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 833049dc963fSmrg ;; 83314b0ead49Smrg 833249dc963fSmrg openbsd2*) 833349dc963fSmrg # C++ shared libraries are fairly broken 833449dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 833549dc963fSmrg ;; 83364b0ead49Smrg 833749dc963fSmrg openbsd*) 833849dc963fSmrg if test -f /usr/libexec/ld.so; then 833949dc963fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 834049dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 834149dc963fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 834249dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 834349dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 834449dc963fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 834549dc963fSmrg _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' 834649dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 834749dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 834849dc963fSmrg fi 834949dc963fSmrg output_verbose_link_cmd=echo 835049dc963fSmrg else 835149dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 835249dc963fSmrg fi 835349dc963fSmrg ;; 83544b0ead49Smrg 835549dc963fSmrg osf3* | osf4* | osf5*) 835649dc963fSmrg case $cc_basename in 835749dc963fSmrg KCC*) 835849dc963fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 835949dc963fSmrg 836049dc963fSmrg # KCC will only create a shared library if the output file 836149dc963fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 836249dc963fSmrg # to its proper name (with version) after linking. 836349dc963fSmrg _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' 836449dc963fSmrg 836549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 836649dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 836749dc963fSmrg 836849dc963fSmrg # Archives containing C++ object files must be created using 836949dc963fSmrg # the KAI C++ compiler. 837049dc963fSmrg case $host in 837149dc963fSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 837249dc963fSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 837349dc963fSmrg esac 837449dc963fSmrg ;; 837549dc963fSmrg RCC*) 837649dc963fSmrg # Rational C++ 2.4.1 837749dc963fSmrg # FIXME: insert proper C++ library support 837849dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 837949dc963fSmrg ;; 838049dc963fSmrg cxx*) 838149dc963fSmrg case $host in 838249dc963fSmrg osf3*) 838349dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 838449dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 838549dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 838649dc963fSmrg ;; 838749dc963fSmrg *) 838849dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 838949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 839049dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 839149dc963fSmrg echo "-hidden">> $lib.exp~ 839249dc963fSmrg $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ 839349dc963fSmrg $RM $lib.exp' 839449dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 839549dc963fSmrg ;; 839649dc963fSmrg esac 83974b0ead49Smrg 839849dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 83994b0ead49Smrg 840049dc963fSmrg # Commands to make compiler produce verbose output that lists 840149dc963fSmrg # what "hidden" libraries, object files and flags are used when 840249dc963fSmrg # linking a shared library. 840349dc963fSmrg # 840449dc963fSmrg # There doesn't appear to be a way to prevent this compiler from 840549dc963fSmrg # explicitly linking system object files so we need to strip them 840649dc963fSmrg # from the output so that they don't get included in the library 840749dc963fSmrg # dependencies. 840849dc963fSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 840949dc963fSmrg ;; 841049dc963fSmrg *) 841149dc963fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 841249dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 841349dc963fSmrg case $host in 841449dc963fSmrg osf3*) 841549dc963fSmrg _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 841649dc963fSmrg ;; 841749dc963fSmrg *) 841849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 841949dc963fSmrg ;; 842049dc963fSmrg esac 842149dc963fSmrg 842249dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 842349dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 842449dc963fSmrg 842549dc963fSmrg # Commands to make compiler produce verbose output that lists 842649dc963fSmrg # what "hidden" libraries, object files and flags are used when 842749dc963fSmrg # linking a shared library. 842849dc963fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 842949dc963fSmrg 843049dc963fSmrg else 843149dc963fSmrg # FIXME: insert proper C++ library support 843249dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 843349dc963fSmrg fi 843449dc963fSmrg ;; 843549dc963fSmrg esac 843649dc963fSmrg ;; 84374b0ead49Smrg 843849dc963fSmrg psos*) 843949dc963fSmrg # FIXME: insert proper C++ library support 844049dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 844149dc963fSmrg ;; 84424b0ead49Smrg 844349dc963fSmrg sunos4*) 844449dc963fSmrg case $cc_basename in 844549dc963fSmrg CC*) 844649dc963fSmrg # Sun C++ 4.x 844749dc963fSmrg # FIXME: insert proper C++ library support 844849dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 844949dc963fSmrg ;; 845049dc963fSmrg lcc*) 845149dc963fSmrg # Lucid 845249dc963fSmrg # FIXME: insert proper C++ library support 845349dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 845449dc963fSmrg ;; 845549dc963fSmrg *) 845649dc963fSmrg # FIXME: insert proper C++ library support 845749dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 845849dc963fSmrg ;; 845949dc963fSmrg esac 846049dc963fSmrg ;; 84614b0ead49Smrg 846249dc963fSmrg solaris*) 846349dc963fSmrg case $cc_basename in 846449dc963fSmrg CC*) 846549dc963fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 846649dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 846749dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 846849dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 846949dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 847049dc963fSmrg $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' 847149dc963fSmrg 847249dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 847349dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 847449dc963fSmrg case $host_os in 847549dc963fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 847649dc963fSmrg *) 847749dc963fSmrg # The compiler driver will combine and reorder linker options, 847849dc963fSmrg # but understands `-z linker_flag'. 847949dc963fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 848049dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 848149dc963fSmrg ;; 848249dc963fSmrg esac 848349dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 84844b0ead49Smrg 848549dc963fSmrg output_verbose_link_cmd='echo' 84864b0ead49Smrg 848749dc963fSmrg # Archives containing C++ object files must be created using 848849dc963fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 848949dc963fSmrg # necessary to make sure instantiated templates are included 849049dc963fSmrg # in the archive. 849149dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 849249dc963fSmrg ;; 849349dc963fSmrg gcx*) 849449dc963fSmrg # Green Hills C++ Compiler 849549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 84964b0ead49Smrg 849749dc963fSmrg # The C++ compiler must be used to create the archive. 849849dc963fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 849949dc963fSmrg ;; 850049dc963fSmrg *) 850149dc963fSmrg # GNU C++ compiler with Solaris linker 850249dc963fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 850349dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 850449dc963fSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 850549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 850649dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 850749dc963fSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 850849dc963fSmrg 850949dc963fSmrg # Commands to make compiler produce verbose output that lists 851049dc963fSmrg # what "hidden" libraries, object files and flags are used when 851149dc963fSmrg # linking a shared library. 851249dc963fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 851349dc963fSmrg else 851449dc963fSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 851549dc963fSmrg # platform. 851649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 851749dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 851849dc963fSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 851949dc963fSmrg 852049dc963fSmrg # Commands to make compiler produce verbose output that lists 852149dc963fSmrg # what "hidden" libraries, object files and flags are used when 852249dc963fSmrg # linking a shared library. 852349dc963fSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 852449dc963fSmrg fi 852549dc963fSmrg 852649dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 852749dc963fSmrg case $host_os in 852849dc963fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 852949dc963fSmrg *) 853049dc963fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 853149dc963fSmrg ;; 853249dc963fSmrg esac 853349dc963fSmrg fi 853449dc963fSmrg ;; 853549dc963fSmrg esac 853649dc963fSmrg ;; 85374b0ead49Smrg 853849dc963fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 853949dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 854049dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 854149dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 854249dc963fSmrg runpath_var='LD_RUN_PATH' 85434b0ead49Smrg 854449dc963fSmrg case $cc_basename in 854549dc963fSmrg CC*) 854649dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 854749dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 854849dc963fSmrg ;; 854949dc963fSmrg *) 855049dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 855149dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 855249dc963fSmrg ;; 855349dc963fSmrg esac 855449dc963fSmrg ;; 85554b0ead49Smrg 855649dc963fSmrg sysv5* | sco3.2v5* | sco5v6*) 855749dc963fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 855849dc963fSmrg # link with -lc, and that would cause any symbols used from libc to 855949dc963fSmrg # always be unresolved, which means just about no library would 856049dc963fSmrg # ever link correctly. If we're not using GNU ld we use -z text 856149dc963fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 856249dc963fSmrg # as -z defs. 856349dc963fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 856449dc963fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 856549dc963fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 856649dc963fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 856749dc963fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 856849dc963fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 856949dc963fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 857049dc963fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 857149dc963fSmrg runpath_var='LD_RUN_PATH' 85724b0ead49Smrg 857349dc963fSmrg case $cc_basename in 857449dc963fSmrg CC*) 857549dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 857649dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 857749dc963fSmrg ;; 857849dc963fSmrg *) 857949dc963fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 858049dc963fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 858149dc963fSmrg ;; 858249dc963fSmrg esac 858349dc963fSmrg ;; 85844b0ead49Smrg 858549dc963fSmrg tandem*) 858649dc963fSmrg case $cc_basename in 858749dc963fSmrg NCC*) 858849dc963fSmrg # NonStop-UX NCC 3.20 858949dc963fSmrg # FIXME: insert proper C++ library support 859049dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 859149dc963fSmrg ;; 859249dc963fSmrg *) 859349dc963fSmrg # FIXME: insert proper C++ library support 859449dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 859549dc963fSmrg ;; 859649dc963fSmrg esac 859749dc963fSmrg ;; 85984b0ead49Smrg 859949dc963fSmrg vxworks*) 860049dc963fSmrg # FIXME: insert proper C++ library support 860149dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 860249dc963fSmrg ;; 86034b0ead49Smrg 860449dc963fSmrg *) 860549dc963fSmrg # FIXME: insert proper C++ library support 860649dc963fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 860749dc963fSmrg ;; 860849dc963fSmrg esac 86094b0ead49Smrg 861049dc963fSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 861149dc963fSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 861249dc963fSmrg 861349dc963fSmrg _LT_TAGVAR(GCC, $1)="$GXX" 861449dc963fSmrg _LT_TAGVAR(LD, $1)="$LD" 861549dc963fSmrg 861649dc963fSmrg ## CAVEAT EMPTOR: 861749dc963fSmrg ## There is no encapsulation within the following macros, do not change 861849dc963fSmrg ## the running order or otherwise move them around unless you know exactly 861949dc963fSmrg ## what you are doing... 862049dc963fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 862149dc963fSmrg _LT_COMPILER_PIC($1) 862249dc963fSmrg _LT_COMPILER_C_O($1) 862349dc963fSmrg _LT_COMPILER_FILE_LOCKS($1) 862449dc963fSmrg _LT_LINKER_SHLIBS($1) 862549dc963fSmrg _LT_SYS_DYNAMIC_LINKER($1) 862649dc963fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 862749dc963fSmrg 862849dc963fSmrg _LT_CONFIG($1) 862949dc963fSmrg fi # test -n "$compiler" 863049dc963fSmrg 863149dc963fSmrg CC=$lt_save_CC 863249dc963fSmrg LDCXX=$LD 863349dc963fSmrg LD=$lt_save_LD 863449dc963fSmrg GCC=$lt_save_GCC 863549dc963fSmrg with_gnu_ld=$lt_save_with_gnu_ld 863649dc963fSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 863749dc963fSmrg lt_cv_path_LD=$lt_save_path_LD 863849dc963fSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 863949dc963fSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 864049dc963fSmrgfi # test "$_lt_caught_CXX_error" != yes 86414b0ead49Smrg 864249dc963fSmrgAC_LANG_POP 864349dc963fSmrg])# _LT_LANG_CXX_CONFIG 86444b0ead49Smrg 86454b0ead49Smrg 864649dc963fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 864749dc963fSmrg# --------------------------------- 864849dc963fSmrg# Figure out "hidden" library dependencies from verbose 864949dc963fSmrg# compiler output when linking a shared library. 865049dc963fSmrg# Parse the compiler output and extract the necessary 865149dc963fSmrg# objects, libraries and library flags. 865249dc963fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 865349dc963fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 865449dc963fSmrg# Dependencies to place before and after the object being linked: 865549dc963fSmrg_LT_TAGVAR(predep_objects, $1)= 865649dc963fSmrg_LT_TAGVAR(postdep_objects, $1)= 865749dc963fSmrg_LT_TAGVAR(predeps, $1)= 865849dc963fSmrg_LT_TAGVAR(postdeps, $1)= 865949dc963fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 86604b0ead49Smrg 866149dc963fSmrgdnl we can't use the lt_simple_compile_test_code here, 866249dc963fSmrgdnl because it contains code intended for an executable, 866349dc963fSmrgdnl not a library. It's possible we should let each 866449dc963fSmrgdnl tag define a new lt_????_link_test_code variable, 866549dc963fSmrgdnl but it's only used here... 866649dc963fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 866749dc963fSmrgint a; 866849dc963fSmrgvoid foo (void) { a = 0; } 866949dc963fSmrg_LT_EOF 867049dc963fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 867149dc963fSmrgclass Foo 867252b01e16Smrg{ 867349dc963fSmrgpublic: 867449dc963fSmrg Foo (void) { a = 0; } 867549dc963fSmrgprivate: 867649dc963fSmrg int a; 867752b01e16Smrg}; 867849dc963fSmrg_LT_EOF 867949dc963fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 868049dc963fSmrg subroutine foo 868149dc963fSmrg implicit none 868249dc963fSmrg integer*4 a 868349dc963fSmrg a=0 868449dc963fSmrg return 868549dc963fSmrg end 868649dc963fSmrg_LT_EOF 868749dc963fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 868849dc963fSmrg subroutine foo 868949dc963fSmrg implicit none 869049dc963fSmrg integer a 869149dc963fSmrg a=0 869249dc963fSmrg return 869349dc963fSmrg end 869449dc963fSmrg_LT_EOF 869549dc963fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 869649dc963fSmrgpublic class foo { 869749dc963fSmrg private int a; 869849dc963fSmrg public void bar (void) { 869949dc963fSmrg a = 0; 870049dc963fSmrg } 870149dc963fSmrg}; 870249dc963fSmrg_LT_EOF 870352b01e16Smrg]) 870449dc963fSmrgdnl Parse the compiler output and extract the necessary 870549dc963fSmrgdnl objects, libraries and library flags. 870649dc963fSmrgif AC_TRY_EVAL(ac_compile); then 870749dc963fSmrg # Parse the compiler output and extract the necessary 870849dc963fSmrg # objects, libraries and library flags. 870952b01e16Smrg 871049dc963fSmrg # Sentinel used to keep track of whether or not we are before 871149dc963fSmrg # the conftest object file. 871249dc963fSmrg pre_test_object_deps_done=no 871352b01e16Smrg 871449dc963fSmrg for p in `eval "$output_verbose_link_cmd"`; do 871549dc963fSmrg case $p in 871652b01e16Smrg 871749dc963fSmrg -L* | -R* | -l*) 871849dc963fSmrg # Some compilers place space between "-{L,R}" and the path. 871949dc963fSmrg # Remove the space. 872049dc963fSmrg if test $p = "-L" || 872149dc963fSmrg test $p = "-R"; then 872249dc963fSmrg prev=$p 872349dc963fSmrg continue 872449dc963fSmrg else 872549dc963fSmrg prev= 872649dc963fSmrg fi 872752b01e16Smrg 872849dc963fSmrg if test "$pre_test_object_deps_done" = no; then 872949dc963fSmrg case $p in 873049dc963fSmrg -L* | -R*) 873149dc963fSmrg # Internal compiler library paths should come after those 873249dc963fSmrg # provided the user. The postdeps already come after the 873349dc963fSmrg # user supplied libs so there is no need to process them. 873449dc963fSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 873549dc963fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 873649dc963fSmrg else 873749dc963fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 873849dc963fSmrg fi 873949dc963fSmrg ;; 874049dc963fSmrg # The "-l" case would never come before the object being 874149dc963fSmrg # linked, so don't bother handling this case. 874249dc963fSmrg esac 874349dc963fSmrg else 874449dc963fSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 874549dc963fSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 874649dc963fSmrg else 874749dc963fSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 874849dc963fSmrg fi 874949dc963fSmrg fi 875052b01e16Smrg ;; 87514b0ead49Smrg 875249dc963fSmrg *.$objext) 875349dc963fSmrg # This assumes that the test object file only shows up 875449dc963fSmrg # once in the compiler output. 875549dc963fSmrg if test "$p" = "conftest.$objext"; then 875649dc963fSmrg pre_test_object_deps_done=yes 875749dc963fSmrg continue 875849dc963fSmrg fi 875949dc963fSmrg 876049dc963fSmrg if test "$pre_test_object_deps_done" = no; then 876149dc963fSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 876249dc963fSmrg _LT_TAGVAR(predep_objects, $1)="$p" 876349dc963fSmrg else 876449dc963fSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 876549dc963fSmrg fi 876649dc963fSmrg else 876749dc963fSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 876849dc963fSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 876949dc963fSmrg else 877049dc963fSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 877149dc963fSmrg fi 877249dc963fSmrg fi 877349dc963fSmrg ;; 87744b0ead49Smrg 877549dc963fSmrg *) ;; # Ignore the rest. 87764b0ead49Smrg 877749dc963fSmrg esac 877849dc963fSmrg done 877952b01e16Smrg 878049dc963fSmrg # Clean up. 878149dc963fSmrg rm -f a.out a.exe 878249dc963fSmrgelse 878349dc963fSmrg echo "libtool.m4: error: problem compiling $1 test program" 878449dc963fSmrgfi 87854b0ead49Smrg 878649dc963fSmrg$RM -f confest.$objext 87874b0ead49Smrg 878849dc963fSmrg# PORTME: override above test on systems where it is broken 878949dc963fSmrgm4_if([$1], [CXX], 879049dc963fSmrg[case $host_os in 879149dc963fSmrginterix[[3-9]]*) 879249dc963fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 879349dc963fSmrg # hack all around it, let's just trust "g++" to DTRT. 879449dc963fSmrg _LT_TAGVAR(predep_objects,$1)= 879549dc963fSmrg _LT_TAGVAR(postdep_objects,$1)= 879649dc963fSmrg _LT_TAGVAR(postdeps,$1)= 879749dc963fSmrg ;; 87984b0ead49Smrg 879949dc963fSmrglinux*) 880049dc963fSmrg case `$CC -V 2>&1 | sed 5q` in 880149dc963fSmrg *Sun\ C*) 880249dc963fSmrg # Sun C++ 5.9 88034b0ead49Smrg 880449dc963fSmrg # The more standards-conforming stlport4 library is 880549dc963fSmrg # incompatible with the Cstd library. Avoid specifying 880649dc963fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 880749dc963fSmrg # -library=stlport4 depends on it. 880849dc963fSmrg case " $CXX $CXXFLAGS " in 880949dc963fSmrg *" -library=stlport4 "*) 881049dc963fSmrg solaris_use_stlport4=yes 881152b01e16Smrg ;; 881249dc963fSmrg esac 88134b0ead49Smrg 881449dc963fSmrg if test "$solaris_use_stlport4" != yes; then 881549dc963fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 881649dc963fSmrg fi 881749dc963fSmrg ;; 881849dc963fSmrg esac 881949dc963fSmrg ;; 88204b0ead49Smrg 882149dc963fSmrgsolaris*) 882249dc963fSmrg case $cc_basename in 882349dc963fSmrg CC*) 882449dc963fSmrg # The more standards-conforming stlport4 library is 882549dc963fSmrg # incompatible with the Cstd library. Avoid specifying 882649dc963fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 882749dc963fSmrg # -library=stlport4 depends on it. 882849dc963fSmrg case " $CXX $CXXFLAGS " in 882949dc963fSmrg *" -library=stlport4 "*) 883049dc963fSmrg solaris_use_stlport4=yes 883152b01e16Smrg ;; 883252b01e16Smrg esac 88334b0ead49Smrg 883449dc963fSmrg # Adding this requires a known-good setup of shared libraries for 883549dc963fSmrg # Sun compiler versions before 5.6, else PIC objects from an old 883649dc963fSmrg # archive will be linked into the output, leading to subtle bugs. 883749dc963fSmrg if test "$solaris_use_stlport4" != yes; then 883849dc963fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 883949dc963fSmrg fi 884049dc963fSmrg ;; 884149dc963fSmrg esac 884249dc963fSmrg ;; 884349dc963fSmrgesac 884449dc963fSmrg]) 88454b0ead49Smrg 884649dc963fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 884749dc963fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 884849dc963fSmrgesac 884949dc963fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 885049dc963fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 885149dc963fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 885249dc963fSmrgfi 885349dc963fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 885449dc963fSmrg [The directories searched by this compiler when creating a shared library]) 885549dc963fSmrg_LT_TAGDECL([], [predep_objects], [1], 885649dc963fSmrg [Dependencies to place before and after the objects being linked to 885749dc963fSmrg create a shared library]) 885849dc963fSmrg_LT_TAGDECL([], [postdep_objects], [1]) 885949dc963fSmrg_LT_TAGDECL([], [predeps], [1]) 886049dc963fSmrg_LT_TAGDECL([], [postdeps], [1]) 886149dc963fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 886249dc963fSmrg [The library search path used internally by the compiler when linking 886349dc963fSmrg a shared library]) 886449dc963fSmrg])# _LT_SYS_HIDDEN_LIBDEPS 886549dc963fSmrg 886649dc963fSmrg 886749dc963fSmrg# _LT_PROG_F77 886849dc963fSmrg# ------------ 886949dc963fSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string 887049dc963fSmrg# if there is no fortran compiler, we have our own version here. 887149dc963fSmrgm4_defun([_LT_PROG_F77], 887249dc963fSmrg[ 887349dc963fSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 887449dc963fSmrgAC_PROG_F77 887549dc963fSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 887649dc963fSmrg _lt_disable_F77=yes 887749dc963fSmrgfi 887849dc963fSmrgpopdef([AC_MSG_ERROR]) 887949dc963fSmrg])# _LT_PROG_F77 88804b0ead49Smrg 888149dc963fSmrgdnl aclocal-1.4 backwards compatibility: 888249dc963fSmrgdnl AC_DEFUN([_LT_PROG_F77], []) 88834b0ead49Smrg 88844b0ead49Smrg 888549dc963fSmrg# _LT_LANG_F77_CONFIG([TAG]) 888649dc963fSmrg# -------------------------- 888749dc963fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 888849dc963fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 888949dc963fSmrg# to write the compiler configuration to `libtool'. 889049dc963fSmrgm4_defun([_LT_LANG_F77_CONFIG], 889149dc963fSmrg[AC_REQUIRE([_LT_PROG_F77])dnl 889249dc963fSmrgAC_LANG_PUSH(Fortran 77) 889349dc963fSmrg 889449dc963fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 889549dc963fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 889649dc963fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 889749dc963fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 889849dc963fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 889949dc963fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 890049dc963fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 890149dc963fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 890249dc963fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 890349dc963fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 890449dc963fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 890549dc963fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 890649dc963fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 890749dc963fSmrg_LT_TAGVAR(module_cmds, $1)= 890849dc963fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 890949dc963fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 891049dc963fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 891149dc963fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 891249dc963fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 891349dc963fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 891449dc963fSmrg 891549dc963fSmrg# Source file extension for f77 test sources. 891649dc963fSmrgac_ext=f 891749dc963fSmrg 891849dc963fSmrg# Object file extension for compiled f77 test sources. 891949dc963fSmrgobjext=o 892049dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 892149dc963fSmrg 892249dc963fSmrg# No sense in running all these tests if we already determined that 892349dc963fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 892449dc963fSmrg# are currently assumed to apply to all compilers on this platform, 892549dc963fSmrg# and will be corrupted by setting them based on a non-working compiler. 892649dc963fSmrgif test "$_lt_disable_F77" != yes; then 892749dc963fSmrg # Code to be used in simple compile tests 892849dc963fSmrg lt_simple_compile_test_code="\ 892949dc963fSmrg subroutine t 893049dc963fSmrg return 893149dc963fSmrg end 893249dc963fSmrg" 893349dc963fSmrg 893449dc963fSmrg # Code to be used in simple link tests 893549dc963fSmrg lt_simple_link_test_code="\ 893649dc963fSmrg program t 893749dc963fSmrg end 893849dc963fSmrg" 893949dc963fSmrg 894049dc963fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 894149dc963fSmrg _LT_TAG_COMPILER 894249dc963fSmrg 894349dc963fSmrg # save warnings/boilerplate of simple test code 894449dc963fSmrg _LT_COMPILER_BOILERPLATE 894549dc963fSmrg _LT_LINKER_BOILERPLATE 894649dc963fSmrg 894749dc963fSmrg # Allow CC to be a program name with arguments. 894849dc963fSmrg lt_save_CC="$CC" 894949dc963fSmrg lt_save_GCC=$GCC 895049dc963fSmrg CC=${F77-"f77"} 895149dc963fSmrg compiler=$CC 895249dc963fSmrg _LT_TAGVAR(compiler, $1)=$CC 895349dc963fSmrg _LT_CC_BASENAME([$compiler]) 895449dc963fSmrg GCC=$G77 895549dc963fSmrg if test -n "$compiler"; then 895649dc963fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 895749dc963fSmrg AC_MSG_RESULT([$can_build_shared]) 895849dc963fSmrg 895949dc963fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 896049dc963fSmrg test "$can_build_shared" = "no" && enable_shared=no 896149dc963fSmrg 896249dc963fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 896349dc963fSmrg # are all built from PIC. 896449dc963fSmrg case $host_os in 896549dc963fSmrg aix3*) 896649dc963fSmrg test "$enable_shared" = yes && enable_static=no 896749dc963fSmrg if test -n "$RANLIB"; then 896849dc963fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 896949dc963fSmrg postinstall_cmds='$RANLIB $lib' 897049dc963fSmrg fi 897152b01e16Smrg ;; 897249dc963fSmrg aix[[4-9]]*) 897349dc963fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 897449dc963fSmrg test "$enable_shared" = yes && enable_static=no 897549dc963fSmrg fi 897652b01e16Smrg ;; 897749dc963fSmrg esac 897849dc963fSmrg AC_MSG_RESULT([$enable_shared]) 897949dc963fSmrg 898049dc963fSmrg AC_MSG_CHECKING([whether to build static libraries]) 898149dc963fSmrg # Make sure either enable_shared or enable_static is yes. 898249dc963fSmrg test "$enable_shared" = yes || enable_static=yes 898349dc963fSmrg AC_MSG_RESULT([$enable_static]) 898449dc963fSmrg 898549dc963fSmrg _LT_TAGVAR(GCC, $1)="$G77" 898649dc963fSmrg _LT_TAGVAR(LD, $1)="$LD" 898749dc963fSmrg 898849dc963fSmrg ## CAVEAT EMPTOR: 898949dc963fSmrg ## There is no encapsulation within the following macros, do not change 899049dc963fSmrg ## the running order or otherwise move them around unless you know exactly 899149dc963fSmrg ## what you are doing... 899249dc963fSmrg _LT_COMPILER_PIC($1) 899349dc963fSmrg _LT_COMPILER_C_O($1) 899449dc963fSmrg _LT_COMPILER_FILE_LOCKS($1) 899549dc963fSmrg _LT_LINKER_SHLIBS($1) 899649dc963fSmrg _LT_SYS_DYNAMIC_LINKER($1) 899749dc963fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 899849dc963fSmrg 899949dc963fSmrg _LT_CONFIG($1) 900049dc963fSmrg fi # test -n "$compiler" 900149dc963fSmrg 900249dc963fSmrg GCC=$lt_save_GCC 900349dc963fSmrg CC="$lt_save_CC" 900449dc963fSmrgfi # test "$_lt_disable_F77" != yes 900549dc963fSmrg 900649dc963fSmrgAC_LANG_POP 900749dc963fSmrg])# _LT_LANG_F77_CONFIG 900849dc963fSmrg 900949dc963fSmrg 901049dc963fSmrg# _LT_PROG_FC 901149dc963fSmrg# ----------- 901249dc963fSmrg# Since AC_PROG_FC is broken, in that it returns the empty string 901349dc963fSmrg# if there is no fortran compiler, we have our own version here. 901449dc963fSmrgm4_defun([_LT_PROG_FC], 901549dc963fSmrg[ 901649dc963fSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 901749dc963fSmrgAC_PROG_FC 901849dc963fSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 901949dc963fSmrg _lt_disable_FC=yes 902049dc963fSmrgfi 902149dc963fSmrgpopdef([AC_MSG_ERROR]) 902249dc963fSmrg])# _LT_PROG_FC 902349dc963fSmrg 902449dc963fSmrgdnl aclocal-1.4 backwards compatibility: 902549dc963fSmrgdnl AC_DEFUN([_LT_PROG_FC], []) 902649dc963fSmrg 902749dc963fSmrg 902849dc963fSmrg# _LT_LANG_FC_CONFIG([TAG]) 902949dc963fSmrg# ------------------------- 903049dc963fSmrg# Ensure that the configuration variables for a Fortran compiler are 903149dc963fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 903249dc963fSmrg# to write the compiler configuration to `libtool'. 903349dc963fSmrgm4_defun([_LT_LANG_FC_CONFIG], 903449dc963fSmrg[AC_REQUIRE([_LT_PROG_FC])dnl 903549dc963fSmrgAC_LANG_PUSH(Fortran) 903649dc963fSmrg 903749dc963fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 903849dc963fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 903949dc963fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 904049dc963fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 904149dc963fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 904249dc963fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 904349dc963fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 904449dc963fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 904549dc963fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 904649dc963fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 904749dc963fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 904849dc963fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 904949dc963fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 905049dc963fSmrg_LT_TAGVAR(module_cmds, $1)= 905149dc963fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 905249dc963fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 905349dc963fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 905449dc963fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 905549dc963fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 905649dc963fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 905749dc963fSmrg 905849dc963fSmrg# Source file extension for fc test sources. 905949dc963fSmrgac_ext=${ac_fc_srcext-f} 906049dc963fSmrg 906149dc963fSmrg# Object file extension for compiled fc test sources. 906249dc963fSmrgobjext=o 906349dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 906449dc963fSmrg 906549dc963fSmrg# No sense in running all these tests if we already determined that 906649dc963fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 906749dc963fSmrg# are currently assumed to apply to all compilers on this platform, 906849dc963fSmrg# and will be corrupted by setting them based on a non-working compiler. 906949dc963fSmrgif test "$_lt_disable_FC" != yes; then 907049dc963fSmrg # Code to be used in simple compile tests 907149dc963fSmrg lt_simple_compile_test_code="\ 907249dc963fSmrg subroutine t 907349dc963fSmrg return 907449dc963fSmrg end 907549dc963fSmrg" 907649dc963fSmrg 907749dc963fSmrg # Code to be used in simple link tests 907849dc963fSmrg lt_simple_link_test_code="\ 907949dc963fSmrg program t 908049dc963fSmrg end 908149dc963fSmrg" 908249dc963fSmrg 908349dc963fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 908449dc963fSmrg _LT_TAG_COMPILER 908549dc963fSmrg 908649dc963fSmrg # save warnings/boilerplate of simple test code 908749dc963fSmrg _LT_COMPILER_BOILERPLATE 908849dc963fSmrg _LT_LINKER_BOILERPLATE 908949dc963fSmrg 909049dc963fSmrg # Allow CC to be a program name with arguments. 909149dc963fSmrg lt_save_CC="$CC" 909249dc963fSmrg lt_save_GCC=$GCC 909349dc963fSmrg CC=${FC-"f95"} 909449dc963fSmrg compiler=$CC 909549dc963fSmrg GCC=$ac_cv_fc_compiler_gnu 909649dc963fSmrg 909749dc963fSmrg _LT_TAGVAR(compiler, $1)=$CC 909849dc963fSmrg _LT_CC_BASENAME([$compiler]) 909949dc963fSmrg 910049dc963fSmrg if test -n "$compiler"; then 910149dc963fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 910249dc963fSmrg AC_MSG_RESULT([$can_build_shared]) 910349dc963fSmrg 910449dc963fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 910549dc963fSmrg test "$can_build_shared" = "no" && enable_shared=no 910649dc963fSmrg 910749dc963fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 910849dc963fSmrg # are all built from PIC. 910949dc963fSmrg case $host_os in 911049dc963fSmrg aix3*) 911149dc963fSmrg test "$enable_shared" = yes && enable_static=no 911249dc963fSmrg if test -n "$RANLIB"; then 911349dc963fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 911449dc963fSmrg postinstall_cmds='$RANLIB $lib' 911549dc963fSmrg fi 911652b01e16Smrg ;; 911749dc963fSmrg aix[[4-9]]*) 911849dc963fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 911949dc963fSmrg test "$enable_shared" = yes && enable_static=no 912049dc963fSmrg fi 912149dc963fSmrg ;; 912249dc963fSmrg esac 912349dc963fSmrg AC_MSG_RESULT([$enable_shared]) 912449dc963fSmrg 912549dc963fSmrg AC_MSG_CHECKING([whether to build static libraries]) 912649dc963fSmrg # Make sure either enable_shared or enable_static is yes. 912749dc963fSmrg test "$enable_shared" = yes || enable_static=yes 912849dc963fSmrg AC_MSG_RESULT([$enable_static]) 912949dc963fSmrg 913049dc963fSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 913149dc963fSmrg _LT_TAGVAR(LD, $1)="$LD" 913249dc963fSmrg 913349dc963fSmrg ## CAVEAT EMPTOR: 913449dc963fSmrg ## There is no encapsulation within the following macros, do not change 913549dc963fSmrg ## the running order or otherwise move them around unless you know exactly 913649dc963fSmrg ## what you are doing... 913749dc963fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 913849dc963fSmrg _LT_COMPILER_PIC($1) 913949dc963fSmrg _LT_COMPILER_C_O($1) 914049dc963fSmrg _LT_COMPILER_FILE_LOCKS($1) 914149dc963fSmrg _LT_LINKER_SHLIBS($1) 914249dc963fSmrg _LT_SYS_DYNAMIC_LINKER($1) 914349dc963fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 914449dc963fSmrg 914549dc963fSmrg _LT_CONFIG($1) 914649dc963fSmrg fi # test -n "$compiler" 914749dc963fSmrg 914849dc963fSmrg GCC=$lt_save_GCC 914949dc963fSmrg CC="$lt_save_CC" 915049dc963fSmrgfi # test "$_lt_disable_FC" != yes 915149dc963fSmrg 915249dc963fSmrgAC_LANG_POP 915349dc963fSmrg])# _LT_LANG_FC_CONFIG 915449dc963fSmrg 915549dc963fSmrg 915649dc963fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 915749dc963fSmrg# -------------------------- 915849dc963fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 915949dc963fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 916049dc963fSmrg# to write the compiler configuration to `libtool'. 916149dc963fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 916249dc963fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 916349dc963fSmrgAC_LANG_SAVE 916449dc963fSmrg 916549dc963fSmrg# Source file extension for Java test sources. 916649dc963fSmrgac_ext=java 916749dc963fSmrg 916849dc963fSmrg# Object file extension for compiled Java test sources. 916949dc963fSmrgobjext=o 917049dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 917149dc963fSmrg 917249dc963fSmrg# Code to be used in simple compile tests 917349dc963fSmrglt_simple_compile_test_code="class foo {}" 917449dc963fSmrg 917549dc963fSmrg# Code to be used in simple link tests 917649dc963fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 917749dc963fSmrg 917849dc963fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 917949dc963fSmrg_LT_TAG_COMPILER 918049dc963fSmrg 918149dc963fSmrg# save warnings/boilerplate of simple test code 918249dc963fSmrg_LT_COMPILER_BOILERPLATE 918349dc963fSmrg_LT_LINKER_BOILERPLATE 918449dc963fSmrg 918549dc963fSmrg# Allow CC to be a program name with arguments. 918649dc963fSmrglt_save_CC="$CC" 918749dc963fSmrglt_save_GCC=$GCC 918849dc963fSmrgGCC=yes 918949dc963fSmrgCC=${GCJ-"gcj"} 919049dc963fSmrgcompiler=$CC 919149dc963fSmrg_LT_TAGVAR(compiler, $1)=$CC 919249dc963fSmrg_LT_TAGVAR(LD, $1)="$LD" 919349dc963fSmrg_LT_CC_BASENAME([$compiler]) 91944b0ead49Smrg 919549dc963fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 919649dc963fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 91974b0ead49Smrg 919849dc963fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 91994b0ead49Smrg 920049dc963fSmrgif test -n "$compiler"; then 920149dc963fSmrg _LT_COMPILER_NO_RTTI($1) 920249dc963fSmrg _LT_COMPILER_PIC($1) 920349dc963fSmrg _LT_COMPILER_C_O($1) 920449dc963fSmrg _LT_COMPILER_FILE_LOCKS($1) 920549dc963fSmrg _LT_LINKER_SHLIBS($1) 920649dc963fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 92074b0ead49Smrg 920849dc963fSmrg _LT_CONFIG($1) 920949dc963fSmrgfi 92104b0ead49Smrg 921149dc963fSmrgAC_LANG_RESTORE 92124b0ead49Smrg 921349dc963fSmrgGCC=$lt_save_GCC 921449dc963fSmrgCC="$lt_save_CC" 921549dc963fSmrg])# _LT_LANG_GCJ_CONFIG 92164b0ead49Smrg 92174b0ead49Smrg 921849dc963fSmrg# _LT_LANG_RC_CONFIG([TAG]) 921949dc963fSmrg# ------------------------- 922049dc963fSmrg# Ensure that the configuration variables for the Windows resource compiler 922149dc963fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 922249dc963fSmrg# to write the compiler configuration to `libtool'. 922349dc963fSmrgm4_defun([_LT_LANG_RC_CONFIG], 922449dc963fSmrg[AC_REQUIRE([LT_PROG_RC])dnl 922549dc963fSmrgAC_LANG_SAVE 92264b0ead49Smrg 922749dc963fSmrg# Source file extension for RC test sources. 922849dc963fSmrgac_ext=rc 92294b0ead49Smrg 923049dc963fSmrg# Object file extension for compiled RC test sources. 923149dc963fSmrgobjext=o 923249dc963fSmrg_LT_TAGVAR(objext, $1)=$objext 92334b0ead49Smrg 923449dc963fSmrg# Code to be used in simple compile tests 923549dc963fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 923649dc963fSmrg 923749dc963fSmrg# Code to be used in simple link tests 923849dc963fSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 923949dc963fSmrg 924049dc963fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 924149dc963fSmrg_LT_TAG_COMPILER 924249dc963fSmrg 924349dc963fSmrg# save warnings/boilerplate of simple test code 924449dc963fSmrg_LT_COMPILER_BOILERPLATE 924549dc963fSmrg_LT_LINKER_BOILERPLATE 924649dc963fSmrg 924749dc963fSmrg# Allow CC to be a program name with arguments. 924849dc963fSmrglt_save_CC="$CC" 924949dc963fSmrglt_save_GCC=$GCC 925049dc963fSmrgGCC= 925149dc963fSmrgCC=${RC-"windres"} 925249dc963fSmrgcompiler=$CC 925349dc963fSmrg_LT_TAGVAR(compiler, $1)=$CC 925449dc963fSmrg_LT_CC_BASENAME([$compiler]) 925549dc963fSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 925649dc963fSmrg 925749dc963fSmrgif test -n "$compiler"; then 925849dc963fSmrg : 925949dc963fSmrg _LT_CONFIG($1) 926052b01e16Smrgfi 92614b0ead49Smrg 926249dc963fSmrgGCC=$lt_save_GCC 926349dc963fSmrgAC_LANG_RESTORE 926449dc963fSmrgCC="$lt_save_CC" 926549dc963fSmrg])# _LT_LANG_RC_CONFIG 926649dc963fSmrg 926749dc963fSmrg 926849dc963fSmrg# LT_PROG_GCJ 926949dc963fSmrg# ----------- 927049dc963fSmrgAC_DEFUN([LT_PROG_GCJ], 927149dc963fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 927249dc963fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 927349dc963fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 927449dc963fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 927549dc963fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 927652b01e16Smrg]) 92774b0ead49Smrg 927849dc963fSmrg# Old name: 927949dc963fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 928049dc963fSmrgdnl aclocal-1.4 backwards compatibility: 928149dc963fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 92824b0ead49Smrg 928352b01e16Smrg 928449dc963fSmrg# LT_PROG_RC 928549dc963fSmrg# ---------- 928649dc963fSmrgAC_DEFUN([LT_PROG_RC], 928749dc963fSmrg[AC_CHECK_TOOL(RC, windres,) 928849dc963fSmrg]) 92894b0ead49Smrg 929049dc963fSmrg# Old name: 929149dc963fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 929249dc963fSmrgdnl aclocal-1.4 backwards compatibility: 929349dc963fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 92944b0ead49Smrg 92954b0ead49Smrg 929649dc963fSmrg# _LT_DECL_EGREP 929749dc963fSmrg# -------------- 929849dc963fSmrg# If we don't have a new enough Autoconf to choose the best grep 929949dc963fSmrg# available, choose the one first in the user's PATH. 930049dc963fSmrgm4_defun([_LT_DECL_EGREP], 930149dc963fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 930249dc963fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 930349dc963fSmrgtest -z "$GREP" && GREP=grep 930449dc963fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 930549dc963fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 930649dc963fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 930749dc963fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 930849dc963fSmrgAC_SUBST([GREP]) 930949dc963fSmrg]) 93104b0ead49Smrg 93114b0ead49Smrg 931249dc963fSmrg# _LT_DECL_OBJDUMP 931349dc963fSmrg# -------------- 931449dc963fSmrg# If we don't have a new enough Autoconf to choose the best objdump 931549dc963fSmrg# available, choose the one first in the user's PATH. 931649dc963fSmrgm4_defun([_LT_DECL_OBJDUMP], 931749dc963fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 931849dc963fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 931949dc963fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 932049dc963fSmrgAC_SUBST([OBJDUMP]) 932149dc963fSmrg]) 93224b0ead49Smrg 93234b0ead49Smrg 932449dc963fSmrg# _LT_DECL_SED 932549dc963fSmrg# ------------ 932649dc963fSmrg# Check for a fully-functional sed program, that truncates 932749dc963fSmrg# as few characters as possible. Prefer GNU sed if found. 932849dc963fSmrgm4_defun([_LT_DECL_SED], 932949dc963fSmrg[AC_PROG_SED 933049dc963fSmrgtest -z "$SED" && SED=sed 933149dc963fSmrgXsed="$SED -e 1s/^X//" 933249dc963fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 933349dc963fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 933449dc963fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 933549dc963fSmrg])# _LT_DECL_SED 933649dc963fSmrg 933749dc963fSmrgm4_ifndef([AC_PROG_SED], [ 933849dc963fSmrg# NOTE: This macro has been submitted for inclusion into # 933949dc963fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 934049dc963fSmrg# a released version of Autoconf we should remove this # 934149dc963fSmrg# macro and use it instead. # 934249dc963fSmrg 934349dc963fSmrgm4_defun([AC_PROG_SED], 934449dc963fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 934549dc963fSmrgAC_CACHE_VAL(lt_cv_path_SED, 934649dc963fSmrg[# Loop through the user's path and test for sed and gsed. 934749dc963fSmrg# Then use that list of sed's as ones to test for truncation. 934849dc963fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 934949dc963fSmrgfor as_dir in $PATH 935049dc963fSmrgdo 935149dc963fSmrg IFS=$as_save_IFS 935249dc963fSmrg test -z "$as_dir" && as_dir=. 935349dc963fSmrg for lt_ac_prog in sed gsed; do 935449dc963fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 935549dc963fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 935649dc963fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 935752b01e16Smrg fi 935849dc963fSmrg done 935949dc963fSmrg done 936049dc963fSmrgdone 936149dc963fSmrgIFS=$as_save_IFS 936249dc963fSmrglt_ac_max=0 936349dc963fSmrglt_ac_count=0 936449dc963fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 936549dc963fSmrg# along with /bin/sed that truncates output. 936649dc963fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 936749dc963fSmrg test ! -f $lt_ac_sed && continue 936849dc963fSmrg cat /dev/null > conftest.in 936949dc963fSmrg lt_ac_count=0 937049dc963fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 937149dc963fSmrg # Check for GNU sed and select it if it is found. 937249dc963fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 937349dc963fSmrg lt_cv_path_SED=$lt_ac_sed 937449dc963fSmrg break 937549dc963fSmrg fi 937649dc963fSmrg while true; do 937749dc963fSmrg cat conftest.in conftest.in >conftest.tmp 937849dc963fSmrg mv conftest.tmp conftest.in 937949dc963fSmrg cp conftest.in conftest.nl 938049dc963fSmrg echo >>conftest.nl 938149dc963fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 938249dc963fSmrg cmp -s conftest.out conftest.nl || break 938349dc963fSmrg # 10000 chars as input seems more than enough 938449dc963fSmrg test $lt_ac_count -gt 10 && break 938549dc963fSmrg lt_ac_count=`expr $lt_ac_count + 1` 938649dc963fSmrg if test $lt_ac_count -gt $lt_ac_max; then 938749dc963fSmrg lt_ac_max=$lt_ac_count 938849dc963fSmrg lt_cv_path_SED=$lt_ac_sed 938949dc963fSmrg fi 939049dc963fSmrg done 939149dc963fSmrgdone 939249dc963fSmrg]) 939349dc963fSmrgSED=$lt_cv_path_SED 939449dc963fSmrgAC_SUBST([SED]) 939549dc963fSmrgAC_MSG_RESULT([$SED]) 939649dc963fSmrg])#AC_PROG_SED 939749dc963fSmrg])#m4_ifndef 939849dc963fSmrg 939949dc963fSmrg# Old name: 940049dc963fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 940149dc963fSmrgdnl aclocal-1.4 backwards compatibility: 940249dc963fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 940349dc963fSmrg 940449dc963fSmrg 940549dc963fSmrg# _LT_CHECK_SHELL_FEATURES 940649dc963fSmrg# ------------------------ 940749dc963fSmrg# Find out whether the shell is Bourne or XSI compatible, 940849dc963fSmrg# or has some other useful features. 940949dc963fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 941049dc963fSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 941149dc963fSmrg# Try some XSI features 941249dc963fSmrgxsi_shell=no 941349dc963fSmrg( _lt_dummy="a/b/c" 941449dc963fSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 941549dc963fSmrg = c,a/b,, \ 941649dc963fSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 941749dc963fSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 941849dc963fSmrg && xsi_shell=yes 941949dc963fSmrgAC_MSG_RESULT([$xsi_shell]) 942049dc963fSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 942149dc963fSmrg 942249dc963fSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 942349dc963fSmrglt_shell_append=no 942449dc963fSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 942549dc963fSmrg >/dev/null 2>&1 \ 942649dc963fSmrg && lt_shell_append=yes 942749dc963fSmrgAC_MSG_RESULT([$lt_shell_append]) 942849dc963fSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 942949dc963fSmrg 943049dc963fSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 943149dc963fSmrg lt_unset=unset 943249dc963fSmrgelse 943349dc963fSmrg lt_unset=false 943449dc963fSmrgfi 943549dc963fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 943649dc963fSmrg 943749dc963fSmrg# test EBCDIC or ASCII 943849dc963fSmrgcase `echo X|tr X '\101'` in 943949dc963fSmrg A) # ASCII based system 944049dc963fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 944149dc963fSmrg lt_SP2NL='tr \040 \012' 944249dc963fSmrg lt_NL2SP='tr \015\012 \040\040' 944349dc963fSmrg ;; 944449dc963fSmrg *) # EBCDIC based system 944549dc963fSmrg lt_SP2NL='tr \100 \n' 944649dc963fSmrg lt_NL2SP='tr \r\n \100\100' 944749dc963fSmrg ;; 944849dc963fSmrgesac 944949dc963fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 945049dc963fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 945149dc963fSmrg])# _LT_CHECK_SHELL_FEATURES 94524b0ead49Smrg 94534b0ead49Smrg 945449dc963fSmrg# _LT_PROG_XSI_SHELLFNS 945549dc963fSmrg# --------------------- 945649dc963fSmrg# Bourne and XSI compatible variants of some useful shell functions. 945749dc963fSmrgm4_defun([_LT_PROG_XSI_SHELLFNS], 945849dc963fSmrg[case $xsi_shell in 945949dc963fSmrg yes) 946049dc963fSmrg cat << \_LT_EOF >> "$cfgfile" 946149dc963fSmrg 946249dc963fSmrg# func_dirname file append nondir_replacement 946349dc963fSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 946449dc963fSmrg# otherwise set result to NONDIR_REPLACEMENT. 946549dc963fSmrgfunc_dirname () 946649dc963fSmrg{ 946749dc963fSmrg case ${1} in 946849dc963fSmrg */*) func_dirname_result="${1%/*}${2}" ;; 946949dc963fSmrg * ) func_dirname_result="${3}" ;; 947049dc963fSmrg esac 947149dc963fSmrg} 94724b0ead49Smrg 947349dc963fSmrg# func_basename file 947449dc963fSmrgfunc_basename () 947549dc963fSmrg{ 947649dc963fSmrg func_basename_result="${1##*/}" 947749dc963fSmrg} 94784b0ead49Smrg 947949dc963fSmrg# func_dirname_and_basename file append nondir_replacement 948049dc963fSmrg# perform func_basename and func_dirname in a single function 948149dc963fSmrg# call: 948249dc963fSmrg# dirname: Compute the dirname of FILE. If nonempty, 948349dc963fSmrg# add APPEND to the result, otherwise set result 948449dc963fSmrg# to NONDIR_REPLACEMENT. 948549dc963fSmrg# value returned in "$func_dirname_result" 948649dc963fSmrg# basename: Compute filename of FILE. 948749dc963fSmrg# value retuned in "$func_basename_result" 948849dc963fSmrg# Implementation must be kept synchronized with func_dirname 948949dc963fSmrg# and func_basename. For efficiency, we do not delegate to 949049dc963fSmrg# those functions but instead duplicate the functionality here. 949149dc963fSmrgfunc_dirname_and_basename () 949249dc963fSmrg{ 949349dc963fSmrg case ${1} in 949449dc963fSmrg */*) func_dirname_result="${1%/*}${2}" ;; 949549dc963fSmrg * ) func_dirname_result="${3}" ;; 949649dc963fSmrg esac 949749dc963fSmrg func_basename_result="${1##*/}" 949849dc963fSmrg} 94994b0ead49Smrg 950049dc963fSmrg# func_stripname prefix suffix name 950149dc963fSmrg# strip PREFIX and SUFFIX off of NAME. 950249dc963fSmrg# PREFIX and SUFFIX must not contain globbing or regex special 950349dc963fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 950449dc963fSmrg# dot (in which case that matches only a dot). 950549dc963fSmrgfunc_stripname () 950649dc963fSmrg{ 950749dc963fSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 950849dc963fSmrg # positional parameters, so assign one to ordinary parameter first. 950949dc963fSmrg func_stripname_result=${3} 951049dc963fSmrg func_stripname_result=${func_stripname_result#"${1}"} 951149dc963fSmrg func_stripname_result=${func_stripname_result%"${2}"} 951249dc963fSmrg} 95134b0ead49Smrg 951449dc963fSmrg# func_opt_split 951549dc963fSmrgfunc_opt_split () 951649dc963fSmrg{ 951749dc963fSmrg func_opt_split_opt=${1%%=*} 951849dc963fSmrg func_opt_split_arg=${1#*=} 951949dc963fSmrg} 95204b0ead49Smrg 952149dc963fSmrg# func_lo2o object 952249dc963fSmrgfunc_lo2o () 952349dc963fSmrg{ 952449dc963fSmrg case ${1} in 952549dc963fSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 952649dc963fSmrg *) func_lo2o_result=${1} ;; 952749dc963fSmrg esac 952849dc963fSmrg} 95294b0ead49Smrg 953049dc963fSmrg# func_xform libobj-or-source 953149dc963fSmrgfunc_xform () 953249dc963fSmrg{ 953349dc963fSmrg func_xform_result=${1%.*}.lo 953449dc963fSmrg} 95354b0ead49Smrg 953649dc963fSmrg# func_arith arithmetic-term... 953749dc963fSmrgfunc_arith () 953849dc963fSmrg{ 953949dc963fSmrg func_arith_result=$(( $[*] )) 954049dc963fSmrg} 954149dc963fSmrg 954249dc963fSmrg# func_len string 954349dc963fSmrg# STRING may not start with a hyphen. 954449dc963fSmrgfunc_len () 954549dc963fSmrg{ 954649dc963fSmrg func_len_result=${#1} 954749dc963fSmrg} 95484b0ead49Smrg 954952b01e16Smrg_LT_EOF 955049dc963fSmrg ;; 955149dc963fSmrg *) # Bourne compatible functions. 955249dc963fSmrg cat << \_LT_EOF >> "$cfgfile" 95534b0ead49Smrg 955449dc963fSmrg# func_dirname file append nondir_replacement 955549dc963fSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 955649dc963fSmrg# otherwise set result to NONDIR_REPLACEMENT. 955749dc963fSmrgfunc_dirname () 955849dc963fSmrg{ 955949dc963fSmrg # Extract subdirectory from the argument. 956049dc963fSmrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 956149dc963fSmrg if test "X$func_dirname_result" = "X${1}"; then 956249dc963fSmrg func_dirname_result="${3}" 956349dc963fSmrg else 956449dc963fSmrg func_dirname_result="$func_dirname_result${2}" 956549dc963fSmrg fi 956649dc963fSmrg} 95674b0ead49Smrg 956849dc963fSmrg# func_basename file 956949dc963fSmrgfunc_basename () 957049dc963fSmrg{ 957149dc963fSmrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 957249dc963fSmrg} 95734b0ead49Smrg 957449dc963fSmrgdnl func_dirname_and_basename 957549dc963fSmrgdnl A portable version of this function is already defined in general.m4sh 957649dc963fSmrgdnl so there is no need for it here. 957749dc963fSmrg 957849dc963fSmrg# func_stripname prefix suffix name 957949dc963fSmrg# strip PREFIX and SUFFIX off of NAME. 958049dc963fSmrg# PREFIX and SUFFIX must not contain globbing or regex special 958149dc963fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 958249dc963fSmrg# dot (in which case that matches only a dot). 958349dc963fSmrg# func_strip_suffix prefix name 958449dc963fSmrgfunc_stripname () 958549dc963fSmrg{ 958649dc963fSmrg case ${2} in 958749dc963fSmrg .*) func_stripname_result=`$ECHO "X${3}" \ 958849dc963fSmrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 958949dc963fSmrg *) func_stripname_result=`$ECHO "X${3}" \ 959049dc963fSmrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 959149dc963fSmrg esac 959249dc963fSmrg} 95934b0ead49Smrg 959449dc963fSmrg# sed scripts: 959549dc963fSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 959649dc963fSmrgmy_sed_long_arg='1s/^-[[^=]]*=//' 95974b0ead49Smrg 959849dc963fSmrg# func_opt_split 959949dc963fSmrgfunc_opt_split () 960049dc963fSmrg{ 960149dc963fSmrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 960249dc963fSmrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 960349dc963fSmrg} 96044b0ead49Smrg 960549dc963fSmrg# func_lo2o object 960649dc963fSmrgfunc_lo2o () 960749dc963fSmrg{ 960849dc963fSmrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 960949dc963fSmrg} 96104b0ead49Smrg 961149dc963fSmrg# func_xform libobj-or-source 961249dc963fSmrgfunc_xform () 961349dc963fSmrg{ 961449dc963fSmrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 961549dc963fSmrg} 96164b0ead49Smrg 961749dc963fSmrg# func_arith arithmetic-term... 961849dc963fSmrgfunc_arith () 961949dc963fSmrg{ 962049dc963fSmrg func_arith_result=`expr "$[@]"` 962149dc963fSmrg} 96224b0ead49Smrg 962349dc963fSmrg# func_len string 962449dc963fSmrg# STRING may not start with a hyphen. 962549dc963fSmrgfunc_len () 962649dc963fSmrg{ 962749dc963fSmrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 962849dc963fSmrg} 96294b0ead49Smrg 963049dc963fSmrg_LT_EOF 963149dc963fSmrgesac 96324b0ead49Smrg 963349dc963fSmrgcase $lt_shell_append in 963449dc963fSmrg yes) 963549dc963fSmrg cat << \_LT_EOF >> "$cfgfile" 96364b0ead49Smrg 963749dc963fSmrg# func_append var value 963849dc963fSmrg# Append VALUE to the end of shell variable VAR. 963949dc963fSmrgfunc_append () 964049dc963fSmrg{ 964149dc963fSmrg eval "$[1]+=\$[2]" 964249dc963fSmrg} 964349dc963fSmrg_LT_EOF 964449dc963fSmrg ;; 964549dc963fSmrg *) 964649dc963fSmrg cat << \_LT_EOF >> "$cfgfile" 96474b0ead49Smrg 964849dc963fSmrg# func_append var value 964949dc963fSmrg# Append VALUE to the end of shell variable VAR. 965049dc963fSmrgfunc_append () 965149dc963fSmrg{ 965249dc963fSmrg eval "$[1]=\$$[1]\$[2]" 965349dc963fSmrg} 96544b0ead49Smrg 965549dc963fSmrg_LT_EOF 965649dc963fSmrg ;; 965749dc963fSmrg esac 965849dc963fSmrg]) 96594b0ead49Smrg 966049dc963fSmrg# Helper functions for option handling. -*- Autoconf -*- 966149dc963fSmrg# 966249dc963fSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 966349dc963fSmrg# Written by Gary V. Vaughan, 2004 966449dc963fSmrg# 966549dc963fSmrg# This file is free software; the Free Software Foundation gives 966649dc963fSmrg# unlimited permission to copy and/or distribute it, with or without 966749dc963fSmrg# modifications, as long as this notice is preserved. 96684b0ead49Smrg 966949dc963fSmrg# serial 6 ltoptions.m4 96704b0ead49Smrg 967149dc963fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 967249dc963fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 967349dc963fSmrg 967449dc963fSmrg 967549dc963fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 967649dc963fSmrg# ------------------------------------------ 967749dc963fSmrgm4_define([_LT_MANGLE_OPTION], 967849dc963fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 967949dc963fSmrg 968049dc963fSmrg 968149dc963fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 968249dc963fSmrg# --------------------------------------- 968349dc963fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 968449dc963fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 968549dc963fSmrg# saved as a flag. 968649dc963fSmrgm4_define([_LT_SET_OPTION], 968749dc963fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 968849dc963fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 968949dc963fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 969049dc963fSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 969149dc963fSmrg]) 969249dc963fSmrg 969349dc963fSmrg 969449dc963fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 969549dc963fSmrg# ------------------------------------------------------------ 969649dc963fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 969749dc963fSmrgm4_define([_LT_IF_OPTION], 969849dc963fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 969949dc963fSmrg 970049dc963fSmrg 970149dc963fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 970249dc963fSmrg# ------------------------------------------------------- 970349dc963fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 970449dc963fSmrg# are set. 970549dc963fSmrgm4_define([_LT_UNLESS_OPTIONS], 970649dc963fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 970749dc963fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 970849dc963fSmrg [m4_define([$0_found])])])[]dnl 970949dc963fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 971049dc963fSmrg])[]dnl 971149dc963fSmrg]) 97124b0ead49Smrg 97134b0ead49Smrg 971449dc963fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 971549dc963fSmrg# ---------------------------------------- 971649dc963fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 971749dc963fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 971849dc963fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 971949dc963fSmrg# the unknown option and exit. 972049dc963fSmrgm4_defun([_LT_SET_OPTIONS], 972149dc963fSmrg[# Set options 972249dc963fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 972349dc963fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 972449dc963fSmrg 972549dc963fSmrgm4_if([$1],[LT_INIT],[ 972649dc963fSmrg dnl 972749dc963fSmrg dnl Simply set some default values (i.e off) if boolean options were not 972849dc963fSmrg dnl specified: 972949dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 973049dc963fSmrg ]) 973149dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 973249dc963fSmrg ]) 973349dc963fSmrg dnl 973449dc963fSmrg dnl If no reference was made to various pairs of opposing options, then 973549dc963fSmrg dnl we run the default mode handler for the pair. For example, if neither 973649dc963fSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 973749dc963fSmrg dnl archives by default: 973849dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 973949dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 974049dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 974149dc963fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 974249dc963fSmrg [_LT_ENABLE_FAST_INSTALL]) 974349dc963fSmrg ]) 974449dc963fSmrg])# _LT_SET_OPTIONS 97454b0ead49Smrg 97464b0ead49Smrg 97474b0ead49Smrg 974849dc963fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 974949dc963fSmrg# ----------------------------------------- 975049dc963fSmrgm4_define([_LT_MANGLE_DEFUN], 975149dc963fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 97524b0ead49Smrg 97534b0ead49Smrg 975449dc963fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 975549dc963fSmrg# ----------------------------------------------- 975649dc963fSmrgm4_define([LT_OPTION_DEFINE], 975749dc963fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 975849dc963fSmrg])# LT_OPTION_DEFINE 97594b0ead49Smrg 97604b0ead49Smrg 976149dc963fSmrg# dlopen 976249dc963fSmrg# ------ 976349dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 976449dc963fSmrg]) 97654b0ead49Smrg 976649dc963fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 976749dc963fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 976849dc963fSmrgAC_DIAGNOSE([obsolete], 976949dc963fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 977049dc963fSmrgput the `dlopen' option into LT_INIT's first parameter.]) 977149dc963fSmrg]) 97724b0ead49Smrg 977349dc963fSmrgdnl aclocal-1.4 backwards compatibility: 977449dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 97754b0ead49Smrg 97764b0ead49Smrg 977749dc963fSmrg# win32-dll 977849dc963fSmrg# --------- 977949dc963fSmrg# Declare package support for building win32 dll's. 978049dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 978149dc963fSmrg[enable_win32_dll=yes 97824b0ead49Smrg 978349dc963fSmrgcase $host in 978449dc963fSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 978549dc963fSmrg AC_CHECK_TOOL(AS, as, false) 978649dc963fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 978749dc963fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 978849dc963fSmrg ;; 978949dc963fSmrgesac 97904b0ead49Smrg 979149dc963fSmrgtest -z "$AS" && AS=as 979249dc963fSmrg_LT_DECL([], [AS], [0], [Assembler program])dnl 97934b0ead49Smrg 979449dc963fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 979549dc963fSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 97964b0ead49Smrg 979749dc963fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 979849dc963fSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 979949dc963fSmrg])# win32-dll 98004b0ead49Smrg 980149dc963fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 980249dc963fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 980349dc963fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 980449dc963fSmrgAC_DIAGNOSE([obsolete], 980549dc963fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 980649dc963fSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 980749dc963fSmrg]) 980852b01e16Smrg 980949dc963fSmrgdnl aclocal-1.4 backwards compatibility: 981049dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 98114b0ead49Smrg 98124b0ead49Smrg 981349dc963fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 981449dc963fSmrg# ---------------------------- 981549dc963fSmrg# implement the --enable-shared flag, and supports the `shared' and 981649dc963fSmrg# `disable-shared' LT_INIT options. 981749dc963fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 981849dc963fSmrgm4_define([_LT_ENABLE_SHARED], 981949dc963fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 982049dc963fSmrgAC_ARG_ENABLE([shared], 982149dc963fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 982249dc963fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 982349dc963fSmrg [p=${PACKAGE-default} 982449dc963fSmrg case $enableval in 982549dc963fSmrg yes) enable_shared=yes ;; 982649dc963fSmrg no) enable_shared=no ;; 982749dc963fSmrg *) 982849dc963fSmrg enable_shared=no 982949dc963fSmrg # Look at the argument we got. We use all the common list separators. 983049dc963fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 983149dc963fSmrg for pkg in $enableval; do 983249dc963fSmrg IFS="$lt_save_ifs" 983349dc963fSmrg if test "X$pkg" = "X$p"; then 983449dc963fSmrg enable_shared=yes 983549dc963fSmrg fi 983649dc963fSmrg done 983749dc963fSmrg IFS="$lt_save_ifs" 983852b01e16Smrg ;; 983949dc963fSmrg esac], 984049dc963fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 98414b0ead49Smrg 984249dc963fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 984349dc963fSmrg [Whether or not to build shared libraries]) 984449dc963fSmrg])# _LT_ENABLE_SHARED 98454b0ead49Smrg 984649dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 984749dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 98484b0ead49Smrg 984949dc963fSmrg# Old names: 985049dc963fSmrgAC_DEFUN([AC_ENABLE_SHARED], 985149dc963fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 985249dc963fSmrg]) 98534b0ead49Smrg 985449dc963fSmrgAC_DEFUN([AC_DISABLE_SHARED], 985549dc963fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 985649dc963fSmrg]) 98574b0ead49Smrg 985849dc963fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 985949dc963fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 986049dc963fSmrg 986149dc963fSmrgdnl aclocal-1.4 backwards compatibility: 986249dc963fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 986349dc963fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 98644b0ead49Smrg 98654b0ead49Smrg 98664b0ead49Smrg 986749dc963fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 986849dc963fSmrg# ---------------------------- 986949dc963fSmrg# implement the --enable-static flag, and support the `static' and 987049dc963fSmrg# `disable-static' LT_INIT options. 987149dc963fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 987249dc963fSmrgm4_define([_LT_ENABLE_STATIC], 987349dc963fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 987449dc963fSmrgAC_ARG_ENABLE([static], 987549dc963fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 987649dc963fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 987749dc963fSmrg [p=${PACKAGE-default} 987849dc963fSmrg case $enableval in 987949dc963fSmrg yes) enable_static=yes ;; 988049dc963fSmrg no) enable_static=no ;; 988152b01e16Smrg *) 988249dc963fSmrg enable_static=no 988349dc963fSmrg # Look at the argument we got. We use all the common list separators. 988449dc963fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 988549dc963fSmrg for pkg in $enableval; do 988649dc963fSmrg IFS="$lt_save_ifs" 988749dc963fSmrg if test "X$pkg" = "X$p"; then 988849dc963fSmrg enable_static=yes 988949dc963fSmrg fi 989049dc963fSmrg done 989149dc963fSmrg IFS="$lt_save_ifs" 989252b01e16Smrg ;; 989349dc963fSmrg esac], 989449dc963fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 98954b0ead49Smrg 989649dc963fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 989749dc963fSmrg [Whether or not to build static libraries]) 989849dc963fSmrg])# _LT_ENABLE_STATIC 98994b0ead49Smrg 990049dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 990149dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 99024b0ead49Smrg 990349dc963fSmrg# Old names: 990449dc963fSmrgAC_DEFUN([AC_ENABLE_STATIC], 990549dc963fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 990649dc963fSmrg]) 990752b01e16Smrg 990849dc963fSmrgAC_DEFUN([AC_DISABLE_STATIC], 990949dc963fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 991049dc963fSmrg]) 991149dc963fSmrg 991249dc963fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 991349dc963fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 991449dc963fSmrg 991549dc963fSmrgdnl aclocal-1.4 backwards compatibility: 991649dc963fSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 991749dc963fSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 99184b0ead49Smrg 99194b0ead49Smrg 99204b0ead49Smrg 992149dc963fSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 992249dc963fSmrg# ---------------------------------- 992349dc963fSmrg# implement the --enable-fast-install flag, and support the `fast-install' 992449dc963fSmrg# and `disable-fast-install' LT_INIT options. 992549dc963fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 992649dc963fSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 992749dc963fSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 992849dc963fSmrgAC_ARG_ENABLE([fast-install], 992949dc963fSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 993049dc963fSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 993149dc963fSmrg [p=${PACKAGE-default} 993249dc963fSmrg case $enableval in 993349dc963fSmrg yes) enable_fast_install=yes ;; 993449dc963fSmrg no) enable_fast_install=no ;; 993549dc963fSmrg *) 993649dc963fSmrg enable_fast_install=no 993749dc963fSmrg # Look at the argument we got. We use all the common list separators. 993849dc963fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 993949dc963fSmrg for pkg in $enableval; do 994049dc963fSmrg IFS="$lt_save_ifs" 994149dc963fSmrg if test "X$pkg" = "X$p"; then 994249dc963fSmrg enable_fast_install=yes 994349dc963fSmrg fi 994449dc963fSmrg done 994549dc963fSmrg IFS="$lt_save_ifs" 994649dc963fSmrg ;; 994749dc963fSmrg esac], 994849dc963fSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 994949dc963fSmrg 995049dc963fSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 995149dc963fSmrg [Whether or not to optimize for fast installation])dnl 995249dc963fSmrg])# _LT_ENABLE_FAST_INSTALL 995349dc963fSmrg 995449dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 995549dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 99564b0ead49Smrg 995749dc963fSmrg# Old names: 995849dc963fSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 995949dc963fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 996049dc963fSmrgAC_DIAGNOSE([obsolete], 996149dc963fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 996249dc963fSmrgthe `fast-install' option into LT_INIT's first parameter.]) 996352b01e16Smrg]) 99644b0ead49Smrg 996549dc963fSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 996649dc963fSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 996749dc963fSmrgAC_DIAGNOSE([obsolete], 996849dc963fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 996949dc963fSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 997052b01e16Smrg]) 99714b0ead49Smrg 997249dc963fSmrgdnl aclocal-1.4 backwards compatibility: 997349dc963fSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 997449dc963fSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 99754b0ead49Smrg 99764b0ead49Smrg 997749dc963fSmrg# _LT_WITH_PIC([MODE]) 997849dc963fSmrg# -------------------- 997949dc963fSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 998049dc963fSmrg# LT_INIT options. 998149dc963fSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 998249dc963fSmrgm4_define([_LT_WITH_PIC], 998349dc963fSmrg[AC_ARG_WITH([pic], 998449dc963fSmrg [AS_HELP_STRING([--with-pic], 998549dc963fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 998649dc963fSmrg [pic_mode="$withval"], 998749dc963fSmrg [pic_mode=default]) 99884b0ead49Smrg 998949dc963fSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 99904b0ead49Smrg 999149dc963fSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 999249dc963fSmrg])# _LT_WITH_PIC 999349dc963fSmrg 999449dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 999549dc963fSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 999649dc963fSmrg 999749dc963fSmrg# Old name: 999849dc963fSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 999949dc963fSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 1000049dc963fSmrgAC_DIAGNOSE([obsolete], 1000149dc963fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1000249dc963fSmrgput the `pic-only' option into LT_INIT's first parameter.]) 1000352b01e16Smrg]) 100044b0ead49Smrg 1000549dc963fSmrgdnl aclocal-1.4 backwards compatibility: 1000649dc963fSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 100074b0ead49Smrg 100084b0ead49Smrg 1000949dc963fSmrgm4_define([_LTDL_MODE], []) 1001049dc963fSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 1001149dc963fSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 1001249dc963fSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 1001349dc963fSmrg [m4_define([_LTDL_MODE], [recursive])]) 1001449dc963fSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 1001549dc963fSmrg [m4_define([_LTDL_MODE], [subproject])]) 1001649dc963fSmrg 1001749dc963fSmrgm4_define([_LTDL_TYPE], []) 1001849dc963fSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 1001949dc963fSmrg [m4_define([_LTDL_TYPE], [installable])]) 1002049dc963fSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 1002149dc963fSmrg [m4_define([_LTDL_TYPE], [convenience])]) 1002249dc963fSmrg 1002349dc963fSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 1002452b01e16Smrg# 1002549dc963fSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 1002649dc963fSmrg# Written by Gary V. Vaughan, 2004 1002752b01e16Smrg# 1002849dc963fSmrg# This file is free software; the Free Software Foundation gives 1002949dc963fSmrg# unlimited permission to copy and/or distribute it, with or without 1003049dc963fSmrg# modifications, as long as this notice is preserved. 100314b0ead49Smrg 1003249dc963fSmrg# serial 6 ltsugar.m4 100334b0ead49Smrg 1003449dc963fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 1003549dc963fSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 1003652b01e16Smrg 1003749dc963fSmrg 1003849dc963fSmrg# lt_join(SEP, ARG1, [ARG2...]) 1003952b01e16Smrg# ----------------------------- 1004049dc963fSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 1004149dc963fSmrg# associated separator. 1004249dc963fSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 1004349dc963fSmrg# versions in m4sugar had bugs. 1004449dc963fSmrgm4_define([lt_join], 1004549dc963fSmrg[m4_if([$#], [1], [], 1004649dc963fSmrg [$#], [2], [[$2]], 1004749dc963fSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 1004849dc963fSmrgm4_define([_lt_join], 1004949dc963fSmrg[m4_if([$#$2], [2], [], 1005049dc963fSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 1005149dc963fSmrg 1005249dc963fSmrg 1005349dc963fSmrg# lt_car(LIST) 1005449dc963fSmrg# lt_cdr(LIST) 1005549dc963fSmrg# ------------ 1005649dc963fSmrg# Manipulate m4 lists. 1005749dc963fSmrg# These macros are necessary as long as will still need to support 1005849dc963fSmrg# Autoconf-2.59 which quotes differently. 1005949dc963fSmrgm4_define([lt_car], [[$1]]) 1006049dc963fSmrgm4_define([lt_cdr], 1006149dc963fSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 1006249dc963fSmrg [$#], 1, [], 1006349dc963fSmrg [m4_dquote(m4_shift($@))])]) 1006449dc963fSmrgm4_define([lt_unquote], $1) 1006549dc963fSmrg 1006649dc963fSmrg 1006749dc963fSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 1006849dc963fSmrg# ------------------------------------------ 1006949dc963fSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 1007049dc963fSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 1007149dc963fSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 1007249dc963fSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 1007349dc963fSmrg# than defined and empty). 1007449dc963fSmrg# 1007549dc963fSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 1007649dc963fSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 1007749dc963fSmrgm4_define([lt_append], 1007849dc963fSmrg[m4_define([$1], 1007949dc963fSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 1008049dc963fSmrg 1008149dc963fSmrg 1008249dc963fSmrg 1008349dc963fSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 1008449dc963fSmrg# ---------------------------------------------------------- 1008549dc963fSmrg# Produce a SEP delimited list of all paired combinations of elements of 1008649dc963fSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 1008749dc963fSmrg# has the form PREFIXmINFIXSUFFIXn. 1008849dc963fSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 1008949dc963fSmrgm4_define([lt_combine], 1009049dc963fSmrg[m4_if(m4_eval([$# > 3]), [1], 1009149dc963fSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 1009249dc963fSmrg[[m4_foreach([_Lt_prefix], [$2], 1009349dc963fSmrg [m4_foreach([_Lt_suffix], 1009449dc963fSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 1009549dc963fSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 1009649dc963fSmrg 1009749dc963fSmrg 1009849dc963fSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 1009949dc963fSmrg# ----------------------------------------------------------------------- 1010049dc963fSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 1010149dc963fSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 1010249dc963fSmrgm4_define([lt_if_append_uniq], 1010349dc963fSmrg[m4_ifdef([$1], 1010449dc963fSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 1010549dc963fSmrg [lt_append([$1], [$2], [$3])$4], 1010649dc963fSmrg [$5])], 1010749dc963fSmrg [lt_append([$1], [$2], [$3])$4])]) 1010849dc963fSmrg 1010949dc963fSmrg 1011049dc963fSmrg# lt_dict_add(DICT, KEY, VALUE) 1011149dc963fSmrg# ----------------------------- 1011249dc963fSmrgm4_define([lt_dict_add], 1011349dc963fSmrg[m4_define([$1($2)], [$3])]) 101144b0ead49Smrg 101154b0ead49Smrg 1011649dc963fSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 1011749dc963fSmrg# -------------------------------------------- 1011849dc963fSmrgm4_define([lt_dict_add_subkey], 1011949dc963fSmrg[m4_define([$1($2:$3)], [$4])]) 101204b0ead49Smrg 101214b0ead49Smrg 1012249dc963fSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 1012349dc963fSmrg# ---------------------------------- 1012449dc963fSmrgm4_define([lt_dict_fetch], 1012549dc963fSmrg[m4_ifval([$3], 1012649dc963fSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 1012749dc963fSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 101284b0ead49Smrg 101294b0ead49Smrg 1013049dc963fSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 1013149dc963fSmrg# ----------------------------------------------------------------- 1013249dc963fSmrgm4_define([lt_if_dict_fetch], 1013349dc963fSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 1013449dc963fSmrg [$5], 1013549dc963fSmrg [$6])]) 101364b0ead49Smrg 101374b0ead49Smrg 1013849dc963fSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 1013949dc963fSmrg# -------------------------------------------------------------- 1014049dc963fSmrgm4_define([lt_dict_filter], 1014149dc963fSmrg[m4_if([$5], [], [], 1014249dc963fSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 1014349dc963fSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 1014449dc963fSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 1014549dc963fSmrg]) 101464b0ead49Smrg 1014749dc963fSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 1014849dc963fSmrg# 1014949dc963fSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 1015049dc963fSmrg# Written by Scott James Remnant, 2004 1015149dc963fSmrg# 1015249dc963fSmrg# This file is free software; the Free Software Foundation gives 1015349dc963fSmrg# unlimited permission to copy and/or distribute it, with or without 1015449dc963fSmrg# modifications, as long as this notice is preserved. 101554b0ead49Smrg 1015649dc963fSmrg# Generated from ltversion.in. 1015752b01e16Smrg 1015849dc963fSmrg# serial 3017 ltversion.m4 1015949dc963fSmrg# This file is part of GNU Libtool 1016052b01e16Smrg 1016149dc963fSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6b]) 1016249dc963fSmrgm4_define([LT_PACKAGE_REVISION], [1.3017]) 1016349dc963fSmrg 1016449dc963fSmrgAC_DEFUN([LTVERSION_VERSION], 1016549dc963fSmrg[macro_version='2.2.6b' 1016649dc963fSmrgmacro_revision='1.3017' 1016749dc963fSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 1016849dc963fSmrg_LT_DECL(, macro_revision, 0) 1016949dc963fSmrg]) 1017049dc963fSmrg 1017149dc963fSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 1017249dc963fSmrg# 1017349dc963fSmrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 1017449dc963fSmrg# Written by Scott James Remnant, 2004. 1017549dc963fSmrg# 1017649dc963fSmrg# This file is free software; the Free Software Foundation gives 1017749dc963fSmrg# unlimited permission to copy and/or distribute it, with or without 1017849dc963fSmrg# modifications, as long as this notice is preserved. 1017949dc963fSmrg 1018049dc963fSmrg# serial 4 lt~obsolete.m4 1018149dc963fSmrg 1018249dc963fSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 1018349dc963fSmrg# 1018449dc963fSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 1018549dc963fSmrg# which have later been changed to m4_define as they aren't part of the 1018649dc963fSmrg# exported API, or moved to Autoconf or Automake where they belong. 1018749dc963fSmrg# 1018849dc963fSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 1018949dc963fSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 1019049dc963fSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 1019149dc963fSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 1019249dc963fSmrg# and doesn't know about Autoconf macros at all.) 1019349dc963fSmrg# 1019449dc963fSmrg# So we provide this file, which has a silly filename so it's always 1019549dc963fSmrg# included after everything else. This provides aclocal with the 1019649dc963fSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 1019749dc963fSmrg# because those macros already exist, or will be overwritten later. 1019849dc963fSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 1019949dc963fSmrg# 1020049dc963fSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 1020149dc963fSmrg# Yes, that means every name once taken will need to remain here until 1020249dc963fSmrg# we give up compatibility with versions before 1.7, at which point 1020349dc963fSmrg# we need to keep only those names which we still refer to. 1020449dc963fSmrg 1020549dc963fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 1020649dc963fSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 1020749dc963fSmrg 1020849dc963fSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 1020949dc963fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 1021049dc963fSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 1021149dc963fSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 1021249dc963fSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 1021349dc963fSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 1021449dc963fSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 1021549dc963fSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 1021649dc963fSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 1021749dc963fSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 1021849dc963fSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 1021949dc963fSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 1022049dc963fSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 1022149dc963fSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 1022249dc963fSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 1022349dc963fSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 1022449dc963fSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 1022549dc963fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 1022649dc963fSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 1022749dc963fSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 1022849dc963fSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 1022949dc963fSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 1023049dc963fSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 1023149dc963fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 1023249dc963fSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 1023349dc963fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 1023449dc963fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 1023549dc963fSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 1023649dc963fSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 1023749dc963fSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 1023849dc963fSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 1023949dc963fSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 1024049dc963fSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 1024149dc963fSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 1024249dc963fSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 1024349dc963fSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 1024449dc963fSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 1024549dc963fSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 1024649dc963fSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 1024749dc963fSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 1024849dc963fSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 1024949dc963fSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 1025049dc963fSmrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 1025149dc963fSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 1025249dc963fSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 1025349dc963fSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 1025449dc963fSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 1025549dc963fSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 1025649dc963fSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 1025749dc963fSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 1025849dc963fSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 1025949dc963fSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 1026049dc963fSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 1026149dc963fSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 1026249dc963fSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 102634b0ead49Smrg 10264