aclocal.m4 revision 55acc8fc
155acc8fcSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 23da084b3Smrg 33da084b3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4d63fdb69Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 53da084b3Smrg# This file is free software; the Free Software Foundation 63da084b3Smrg# gives unlimited permission to copy and/or distribute it, 73da084b3Smrg# with or without modifications, as long as this notice is preserved. 83da084b3Smrg 93da084b3Smrg# This program is distributed in the hope that it will be useful, 103da084b3Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 113da084b3Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 123da084b3Smrg# PARTICULAR PURPOSE. 133da084b3Smrg 14d63fdb69Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15d63fdb69Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1655acc8fcSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 1755acc8fcSmrg[m4_warning([this file was generated for autoconf 2.68. 18d63fdb69SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19d63fdb69SmrgIf you have problems, you may need to regenerate the build system entirely. 20d63fdb69SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21d63fdb69Smrg 2255acc8fcSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23d63fdb69Smrg# 2455acc8fcSmrg# This file is free software; the Free Software Foundation 2555acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 2655acc8fcSmrg# with or without modifications, as long as this notice is preserved. 2755acc8fcSmrg 2855acc8fcSmrg# AM_AUTOMAKE_VERSION(VERSION) 2955acc8fcSmrg# ---------------------------- 3055acc8fcSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3155acc8fcSmrg# generated from the m4 files accompanying Automake X.Y. 3255acc8fcSmrg# (This private macro should not be called outside this file.) 3355acc8fcSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3455acc8fcSmrg[am__api_version='1.11' 3555acc8fcSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3655acc8fcSmrgdnl require some minimum version. Point them to the right macro. 3755acc8fcSmrgm4_if([$1], [1.11.1], [], 3855acc8fcSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 3955acc8fcSmrg]) 4055acc8fcSmrg 4155acc8fcSmrg# _AM_AUTOCONF_VERSION(VERSION) 4255acc8fcSmrg# ----------------------------- 4355acc8fcSmrg# aclocal traces this macro to find the Autoconf version. 4455acc8fcSmrg# This is a private macro too. Using m4_define simplifies 4555acc8fcSmrg# the logic in aclocal, which can simply ignore this definition. 4655acc8fcSmrgm4_define([_AM_AUTOCONF_VERSION], []) 4755acc8fcSmrg 4855acc8fcSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 4955acc8fcSmrg# ------------------------------- 5055acc8fcSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5155acc8fcSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5255acc8fcSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5355acc8fcSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 5455acc8fcSmrgm4_ifndef([AC_AUTOCONF_VERSION], 5555acc8fcSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5655acc8fcSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5755acc8fcSmrg 5855acc8fcSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 5955acc8fcSmrg 6055acc8fcSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61d63fdb69Smrg# 6255acc8fcSmrg# This file is free software; the Free Software Foundation 6355acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 6455acc8fcSmrg# with or without modifications, as long as this notice is preserved. 65d63fdb69Smrg 6655acc8fcSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6755acc8fcSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6855acc8fcSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69d63fdb69Smrg# 7055acc8fcSmrg# Of course, Automake must honor this variable whenever it calls a 7155acc8fcSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 7255acc8fcSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7355acc8fcSmrg# depending on how configure is run. This is pretty annoying, since 7455acc8fcSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7555acc8fcSmrg# source directory, any form will work fine, but in subdirectories a 7655acc8fcSmrg# relative path needs to be adjusted first. 77d63fdb69Smrg# 7855acc8fcSmrg# $ac_aux_dir/missing 7955acc8fcSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 8055acc8fcSmrg# $top_srcdir/$ac_aux_dir/missing 8155acc8fcSmrg# fails if $ac_aux_dir is absolute, 8255acc8fcSmrg# fails when called from a subdirectory in a VPATH build with 8355acc8fcSmrg# a relative $ac_aux_dir 84d63fdb69Smrg# 8555acc8fcSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8655acc8fcSmrg# are both prefixed by $srcdir. In an in-source build this is usually 8755acc8fcSmrg# harmless because $srcdir is `.', but things will broke when you 8855acc8fcSmrg# start a VPATH build or use an absolute $srcdir. 89d63fdb69Smrg# 9055acc8fcSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9155acc8fcSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9255acc8fcSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9355acc8fcSmrg# and then we would define $MISSING as 9455acc8fcSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 9555acc8fcSmrg# This will work as long as MISSING is not called from configure, because 9655acc8fcSmrg# unfortunately $(top_srcdir) has no meaning in configure. 9755acc8fcSmrg# However there are other variables, like CC, which are often used in 9855acc8fcSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99d63fdb69Smrg# 10055acc8fcSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 10155acc8fcSmrg# absolute PATH. The drawback is that using absolute paths prevent a 10255acc8fcSmrg# configured tree to be moved without reconfiguration. 1033da084b3Smrg 10455acc8fcSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10555acc8fcSmrg[dnl Rely on autoconf to set up CDPATH properly. 10655acc8fcSmrgAC_PREREQ([2.50])dnl 10755acc8fcSmrg# expand $ac_aux_dir to an absolute path 10855acc8fcSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 109d63fdb69Smrg]) 110d63fdb69Smrg 11155acc8fcSmrg# AM_CONDITIONAL -*- Autoconf -*- 112d63fdb69Smrg 11355acc8fcSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 11455acc8fcSmrg# Free Software Foundation, Inc. 11555acc8fcSmrg# 11655acc8fcSmrg# This file is free software; the Free Software Foundation 11755acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 11855acc8fcSmrg# with or without modifications, as long as this notice is preserved. 1193da084b3Smrg 12055acc8fcSmrg# serial 9 1213da084b3Smrg 12255acc8fcSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12355acc8fcSmrg# ------------------------------------- 12455acc8fcSmrg# Define a conditional. 12555acc8fcSmrgAC_DEFUN([AM_CONDITIONAL], 12655acc8fcSmrg[AC_PREREQ(2.52)dnl 12755acc8fcSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12855acc8fcSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12955acc8fcSmrgAC_SUBST([$1_TRUE])dnl 13055acc8fcSmrgAC_SUBST([$1_FALSE])dnl 13155acc8fcSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13255acc8fcSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13355acc8fcSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13455acc8fcSmrgif $2; then 13555acc8fcSmrg $1_TRUE= 13655acc8fcSmrg $1_FALSE='#' 13755acc8fcSmrgelse 13855acc8fcSmrg $1_TRUE='#' 13955acc8fcSmrg $1_FALSE= 14055acc8fcSmrgfi 14155acc8fcSmrgAC_CONFIG_COMMANDS_PRE( 14255acc8fcSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14355acc8fcSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 14455acc8fcSmrgUsually this means the macro was only invoked conditionally.]]) 14555acc8fcSmrgfi])]) 1463da084b3Smrg 14755acc8fcSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 14855acc8fcSmrg# Free Software Foundation, Inc. 14955acc8fcSmrg# 15055acc8fcSmrg# This file is free software; the Free Software Foundation 15155acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 15255acc8fcSmrg# with or without modifications, as long as this notice is preserved. 153d63fdb69Smrg 15455acc8fcSmrg# serial 10 155d63fdb69Smrg 15655acc8fcSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 15755acc8fcSmrg# written in clear, in which case automake, when reading aclocal.m4, 15855acc8fcSmrg# will think it sees a *use*, and therefore will trigger all it's 15955acc8fcSmrg# C support machinery. Also note that it means that autoscan, seeing 16055acc8fcSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161d63fdb69Smrg 162d63fdb69Smrg 16355acc8fcSmrg# _AM_DEPENDENCIES(NAME) 164d63fdb69Smrg# ---------------------- 16555acc8fcSmrg# See how the compiler implements dependency checking. 16655acc8fcSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 16755acc8fcSmrg# We try a few techniques and use that to set a single cache variable. 16855acc8fcSmrg# 16955acc8fcSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 17055acc8fcSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 17155acc8fcSmrg# dependency, and given that the user is not expected to run this macro, 17255acc8fcSmrg# just rely on AC_PROG_CC. 17355acc8fcSmrgAC_DEFUN([_AM_DEPENDENCIES], 17455acc8fcSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17555acc8fcSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17655acc8fcSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17755acc8fcSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178d63fdb69Smrg 17955acc8fcSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 18055acc8fcSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 18155acc8fcSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18255acc8fcSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 18355acc8fcSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18455acc8fcSmrg [depcc="$$1" am_compiler_list=]) 185d63fdb69Smrg 18655acc8fcSmrgAC_CACHE_CHECK([dependency style of $depcc], 18755acc8fcSmrg [am_cv_$1_dependencies_compiler_type], 18855acc8fcSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18955acc8fcSmrg # We make a subdir and do the tests there. Otherwise we can end up 19055acc8fcSmrg # making bogus files that we don't know about and never remove. For 19155acc8fcSmrg # instance it was reported that on HP-UX the gcc test will end up 19255acc8fcSmrg # making a dummy file named `D' -- because `-MD' means `put the output 19355acc8fcSmrg # in D'. 19455acc8fcSmrg mkdir conftest.dir 19555acc8fcSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 19655acc8fcSmrg # using a relative directory. 19755acc8fcSmrg cp "$am_depcomp" conftest.dir 19855acc8fcSmrg cd conftest.dir 19955acc8fcSmrg # We will build objects and dependencies in a subdirectory because 20055acc8fcSmrg # it helps to detect inapplicable dependency modes. For instance 20155acc8fcSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 20255acc8fcSmrg # side effect of compilation, but ICC will put the dependencies in 20355acc8fcSmrg # the current directory while Tru64 will put them in the object 20455acc8fcSmrg # directory. 20555acc8fcSmrg mkdir sub 2063da084b3Smrg 20755acc8fcSmrg am_cv_$1_dependencies_compiler_type=none 20855acc8fcSmrg if test "$am_compiler_list" = ""; then 20955acc8fcSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2103da084b3Smrg fi 21155acc8fcSmrg am__universal=false 21255acc8fcSmrg m4_case([$1], [CC], 21355acc8fcSmrg [case " $depcc " in #( 21455acc8fcSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21555acc8fcSmrg esac], 21655acc8fcSmrg [CXX], 21755acc8fcSmrg [case " $depcc " in #( 21855acc8fcSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21955acc8fcSmrg esac]) 2203da084b3Smrg 22155acc8fcSmrg for depmode in $am_compiler_list; do 22255acc8fcSmrg # Setup a source with many dependencies, because some compilers 22355acc8fcSmrg # like to wrap large dependency lists on column 80 (with \), and 22455acc8fcSmrg # we should not choose a depcomp mode which is confused by this. 22555acc8fcSmrg # 22655acc8fcSmrg # We need to recreate these files for each test, as the compiler may 22755acc8fcSmrg # overwrite some of them when testing with obscure command lines. 22855acc8fcSmrg # This happens at least with the AIX C compiler. 22955acc8fcSmrg : > sub/conftest.c 23055acc8fcSmrg for i in 1 2 3 4 5 6; do 23155acc8fcSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23255acc8fcSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 23355acc8fcSmrg # Solaris 8's {/usr,}/bin/sh. 23455acc8fcSmrg touch sub/conftst$i.h 23555acc8fcSmrg done 23655acc8fcSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2373da084b3Smrg 23855acc8fcSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23955acc8fcSmrg # mode. It turns out that the SunPro C++ compiler does not properly 24055acc8fcSmrg # handle `-M -o', and we need to detect this. Also, some Intel 24155acc8fcSmrg # versions had trouble with output in subdirs 24255acc8fcSmrg am__obj=sub/conftest.${OBJEXT-o} 24355acc8fcSmrg am__minus_obj="-o $am__obj" 24455acc8fcSmrg case $depmode in 24555acc8fcSmrg gcc) 24655acc8fcSmrg # This depmode causes a compiler race in universal mode. 24755acc8fcSmrg test "$am__universal" = false || continue 24855acc8fcSmrg ;; 24955acc8fcSmrg nosideeffect) 25055acc8fcSmrg # after this tag, mechanisms are not by side-effect, so they'll 25155acc8fcSmrg # only be used when explicitly requested 25255acc8fcSmrg if test "x$enable_dependency_tracking" = xyes; then 25355acc8fcSmrg continue 25455acc8fcSmrg else 25555acc8fcSmrg break 25655acc8fcSmrg fi 25755acc8fcSmrg ;; 25855acc8fcSmrg msvisualcpp | msvcmsys) 25955acc8fcSmrg # This compiler won't grok `-c -o', but also, the minuso test has 26055acc8fcSmrg # not run yet. These depmodes are late enough in the game, and 26155acc8fcSmrg # so weak that their functioning should not be impacted. 26255acc8fcSmrg am__obj=conftest.${OBJEXT-o} 26355acc8fcSmrg am__minus_obj= 26455acc8fcSmrg ;; 26555acc8fcSmrg none) break ;; 26655acc8fcSmrg esac 26755acc8fcSmrg if depmode=$depmode \ 26855acc8fcSmrg source=sub/conftest.c object=$am__obj \ 26955acc8fcSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27055acc8fcSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 27155acc8fcSmrg >/dev/null 2>conftest.err && 27255acc8fcSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27355acc8fcSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27455acc8fcSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27555acc8fcSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27655acc8fcSmrg # icc doesn't choke on unknown options, it will just issue warnings 27755acc8fcSmrg # or remarks (even with -Werror). So we grep stderr for any message 27855acc8fcSmrg # that says an option was ignored or not supported. 27955acc8fcSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28055acc8fcSmrg # icc: Command line warning: ignoring option '-M'; no argument required 28155acc8fcSmrg # The diagnosis changed in icc 8.0: 28255acc8fcSmrg # icc: Command line remark: option '-MP' not supported 28355acc8fcSmrg if (grep 'ignoring option' conftest.err || 28455acc8fcSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28555acc8fcSmrg am_cv_$1_dependencies_compiler_type=$depmode 28655acc8fcSmrg break 28755acc8fcSmrg fi 28855acc8fcSmrg fi 28955acc8fcSmrg done 2903da084b3Smrg 29155acc8fcSmrg cd .. 29255acc8fcSmrg rm -rf conftest.dir 29355acc8fcSmrgelse 29455acc8fcSmrg am_cv_$1_dependencies_compiler_type=none 29555acc8fcSmrgfi 29655acc8fcSmrg]) 29755acc8fcSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29855acc8fcSmrgAM_CONDITIONAL([am__fastdep$1], [ 29955acc8fcSmrg test "x$enable_dependency_tracking" != xno \ 30055acc8fcSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 30155acc8fcSmrg]) 3023da084b3Smrg 3033da084b3Smrg 30455acc8fcSmrg# AM_SET_DEPDIR 30555acc8fcSmrg# ------------- 30655acc8fcSmrg# Choose a directory name for dependency files. 30755acc8fcSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 30855acc8fcSmrgAC_DEFUN([AM_SET_DEPDIR], 30955acc8fcSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 31055acc8fcSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 31155acc8fcSmrg]) 3123da084b3Smrg 3133da084b3Smrg 31455acc8fcSmrg# AM_DEP_TRACK 31555acc8fcSmrg# ------------ 31655acc8fcSmrgAC_DEFUN([AM_DEP_TRACK], 31755acc8fcSmrg[AC_ARG_ENABLE(dependency-tracking, 31855acc8fcSmrg[ --disable-dependency-tracking speeds up one-time build 31955acc8fcSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 32055acc8fcSmrgif test "x$enable_dependency_tracking" != xno; then 32155acc8fcSmrg am_depcomp="$ac_aux_dir/depcomp" 32255acc8fcSmrg AMDEPBACKSLASH='\' 32355acc8fcSmrgfi 32455acc8fcSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32555acc8fcSmrgAC_SUBST([AMDEPBACKSLASH])dnl 32655acc8fcSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32755acc8fcSmrg]) 3283da084b3Smrg 32955acc8fcSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3303da084b3Smrg 33155acc8fcSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 33255acc8fcSmrg# Free Software Foundation, Inc. 33355acc8fcSmrg# 33455acc8fcSmrg# This file is free software; the Free Software Foundation 33555acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 33655acc8fcSmrg# with or without modifications, as long as this notice is preserved. 3373da084b3Smrg 33855acc8fcSmrg#serial 5 3393da084b3Smrg 34055acc8fcSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341d63fdb69Smrg# ------------------------------ 34255acc8fcSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34355acc8fcSmrg[{ 34455acc8fcSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34555acc8fcSmrg # are listed without --file. Let's play safe and only enable the eval 34655acc8fcSmrg # if we detect the quoting. 34755acc8fcSmrg case $CONFIG_FILES in 34855acc8fcSmrg *\'*) eval set x "$CONFIG_FILES" ;; 34955acc8fcSmrg *) set x $CONFIG_FILES ;; 35055acc8fcSmrg esac 35155acc8fcSmrg shift 35255acc8fcSmrg for mf 35355acc8fcSmrg do 35455acc8fcSmrg # Strip MF so we end up with the name of the file. 35555acc8fcSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35655acc8fcSmrg # Check whether this is an Automake generated Makefile or not. 35755acc8fcSmrg # We used to match only the files named `Makefile.in', but 35855acc8fcSmrg # some people rename them; so instead we look at the file content. 35955acc8fcSmrg # Grep'ing the first line is not enough: some people post-process 36055acc8fcSmrg # each Makefile.in and add a new line on top of each file to say so. 36155acc8fcSmrg # Grep'ing the whole file is not good either: AIX grep has a line 36255acc8fcSmrg # limit of 2048, but all sed's we know have understand at least 4000. 36355acc8fcSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36455acc8fcSmrg dirpart=`AS_DIRNAME("$mf")` 36555acc8fcSmrg else 36655acc8fcSmrg continue 36755acc8fcSmrg fi 36855acc8fcSmrg # Extract the definition of DEPDIR, am__include, and am__quote 36955acc8fcSmrg # from the Makefile without running `make'. 37055acc8fcSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37155acc8fcSmrg test -z "$DEPDIR" && continue 37255acc8fcSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37355acc8fcSmrg test -z "am__include" && continue 37455acc8fcSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37555acc8fcSmrg # When using ansi2knr, U may be empty or an underscore; expand it 37655acc8fcSmrg U=`sed -n 's/^U = //p' < "$mf"` 37755acc8fcSmrg # Find all dependency output files, they are included files with 37855acc8fcSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37955acc8fcSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 38055acc8fcSmrg # expansion. 38155acc8fcSmrg for file in `sed -n " 38255acc8fcSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38355acc8fcSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38455acc8fcSmrg # Make sure the directory exists. 38555acc8fcSmrg test -f "$dirpart/$file" && continue 38655acc8fcSmrg fdir=`AS_DIRNAME(["$file"])` 38755acc8fcSmrg AS_MKDIR_P([$dirpart/$fdir]) 38855acc8fcSmrg # echo "creating $dirpart/$file" 38955acc8fcSmrg echo '# dummy' > "$dirpart/$file" 39055acc8fcSmrg done 39155acc8fcSmrg done 39255acc8fcSmrg} 39355acc8fcSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394d63fdb69Smrg 395d63fdb69Smrg 39655acc8fcSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39755acc8fcSmrg# ----------------------------- 39855acc8fcSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 39955acc8fcSmrg# 40055acc8fcSmrg# This code is only required when automatic dependency tracking 40155acc8fcSmrg# is enabled. FIXME. This creates each `.P' file that we will 40255acc8fcSmrg# need in order to bootstrap the dependency handling code. 40355acc8fcSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40455acc8fcSmrg[AC_CONFIG_COMMANDS([depfiles], 40555acc8fcSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40655acc8fcSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4073da084b3Smrg]) 4083da084b3Smrg 40955acc8fcSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 41055acc8fcSmrg# Free Software Foundation, Inc. 41155acc8fcSmrg# 41255acc8fcSmrg# This file is free software; the Free Software Foundation 41355acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 41455acc8fcSmrg# with or without modifications, as long as this notice is preserved. 4153da084b3Smrg 41655acc8fcSmrg# serial 8 417d63fdb69Smrg 41855acc8fcSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 41955acc8fcSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420d63fdb69Smrg 42155acc8fcSmrg# Do all the work for Automake. -*- Autoconf -*- 422d63fdb69Smrg 42355acc8fcSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42455acc8fcSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 42555acc8fcSmrg# 42655acc8fcSmrg# This file is free software; the Free Software Foundation 42755acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 42855acc8fcSmrg# with or without modifications, as long as this notice is preserved. 429d63fdb69Smrg 43055acc8fcSmrg# serial 16 4313da084b3Smrg 43255acc8fcSmrg# This macro actually does too much. Some checks are only needed if 43355acc8fcSmrg# your package does certain things. But this isn't really a big deal. 4343da084b3Smrg 43555acc8fcSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 43655acc8fcSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 43755acc8fcSmrg# ----------------------------------------------- 43855acc8fcSmrg# The call with PACKAGE and VERSION arguments is the old style 43955acc8fcSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 44055acc8fcSmrg# and VERSION should now be passed to AC_INIT and removed from 44155acc8fcSmrg# the call to AM_INIT_AUTOMAKE. 44255acc8fcSmrg# We support both call styles for the transition. After 44355acc8fcSmrg# the next Automake release, Autoconf can make the AC_INIT 44455acc8fcSmrg# arguments mandatory, and then we can depend on a new Autoconf 44555acc8fcSmrg# release and drop the old call support. 44655acc8fcSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 44755acc8fcSmrg[AC_PREREQ([2.62])dnl 44855acc8fcSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 44955acc8fcSmrgdnl the ones we care about. 45055acc8fcSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 45155acc8fcSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 45255acc8fcSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 45355acc8fcSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 45455acc8fcSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 45555acc8fcSmrg # is not polluted with repeated "-I." 45655acc8fcSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 45755acc8fcSmrg # test to see if srcdir already configured 45855acc8fcSmrg if test -f $srcdir/config.status; then 45955acc8fcSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 46055acc8fcSmrg fi 46155acc8fcSmrgfi 4623da084b3Smrg 46355acc8fcSmrg# test whether we have cygpath 46455acc8fcSmrgif test -z "$CYGPATH_W"; then 46555acc8fcSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 46655acc8fcSmrg CYGPATH_W='cygpath -w' 46755acc8fcSmrg else 46855acc8fcSmrg CYGPATH_W=echo 46955acc8fcSmrg fi 47055acc8fcSmrgfi 47155acc8fcSmrgAC_SUBST([CYGPATH_W]) 4723da084b3Smrg 47355acc8fcSmrg# Define the identity of the package. 47455acc8fcSmrgdnl Distinguish between old-style and new-style calls. 47555acc8fcSmrgm4_ifval([$2], 47655acc8fcSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 47755acc8fcSmrg AC_SUBST([PACKAGE], [$1])dnl 47855acc8fcSmrg AC_SUBST([VERSION], [$2])], 47955acc8fcSmrg[_AM_SET_OPTIONS([$1])dnl 48055acc8fcSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 48155acc8fcSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 48255acc8fcSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 48355acc8fcSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 48455acc8fcSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4853da084b3Smrg 48655acc8fcSmrg_AM_IF_OPTION([no-define],, 48755acc8fcSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 48855acc8fcSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4893da084b3Smrg 49055acc8fcSmrg# Some tools Automake needs. 49155acc8fcSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 49255acc8fcSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 49355acc8fcSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 49455acc8fcSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 49555acc8fcSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 49655acc8fcSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 49755acc8fcSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 49855acc8fcSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49955acc8fcSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 50055acc8fcSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 50155acc8fcSmrg# We need awk for the "check" target. The system "awk" is bad on 50255acc8fcSmrg# some platforms. 50355acc8fcSmrgAC_REQUIRE([AC_PROG_AWK])dnl 50455acc8fcSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50555acc8fcSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50655acc8fcSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50755acc8fcSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50855acc8fcSmrg [_AM_PROG_TAR([v7])])]) 50955acc8fcSmrg_AM_IF_OPTION([no-dependencies],, 51055acc8fcSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 51155acc8fcSmrg [_AM_DEPENDENCIES(CC)], 51255acc8fcSmrg [define([AC_PROG_CC], 51355acc8fcSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 51455acc8fcSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51555acc8fcSmrg [_AM_DEPENDENCIES(CXX)], 51655acc8fcSmrg [define([AC_PROG_CXX], 51755acc8fcSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 51855acc8fcSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51955acc8fcSmrg [_AM_DEPENDENCIES(OBJC)], 52055acc8fcSmrg [define([AC_PROG_OBJC], 52155acc8fcSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 52255acc8fcSmrg]) 52355acc8fcSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 52455acc8fcSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 52555acc8fcSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 52655acc8fcSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 52755acc8fcSmrgAC_CONFIG_COMMANDS_PRE(dnl 52855acc8fcSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52955acc8fcSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 530d63fdb69Smrg]) 5313da084b3Smrg 53255acc8fcSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53355acc8fcSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53455acc8fcSmrgdnl mangled by Autoconf and run in a shell conditional statement. 53555acc8fcSmrgm4_define([_AC_COMPILER_EXEEXT], 53655acc8fcSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5373da084b3Smrg 5383da084b3Smrg 53955acc8fcSmrg# When config.status generates a header, we must update the stamp-h file. 54055acc8fcSmrg# This file resides in the same directory as the config header 54155acc8fcSmrg# that is generated. The stamp files are numbered to have different names. 5423da084b3Smrg 54355acc8fcSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 54455acc8fcSmrg# loop where config.status creates the headers, so we can generate 54555acc8fcSmrg# our stamp files there. 54655acc8fcSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 54755acc8fcSmrg[# Compute $1's index in $config_headers. 54855acc8fcSmrg_am_arg=$1 54955acc8fcSmrg_am_stamp_count=1 55055acc8fcSmrgfor _am_header in $config_headers :; do 55155acc8fcSmrg case $_am_header in 55255acc8fcSmrg $_am_arg | $_am_arg:* ) 55355acc8fcSmrg break ;; 55455acc8fcSmrg * ) 55555acc8fcSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 55655acc8fcSmrg esac 55755acc8fcSmrgdone 55855acc8fcSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5593da084b3Smrg 56055acc8fcSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 56155acc8fcSmrg# 56255acc8fcSmrg# This file is free software; the Free Software Foundation 56355acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 56455acc8fcSmrg# with or without modifications, as long as this notice is preserved. 5653da084b3Smrg 56655acc8fcSmrg# AM_PROG_INSTALL_SH 56755acc8fcSmrg# ------------------ 56855acc8fcSmrg# Define $install_sh. 56955acc8fcSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 57055acc8fcSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57155acc8fcSmrgif test x"${install_sh}" != xset; then 57255acc8fcSmrg case $am_aux_dir in 57355acc8fcSmrg *\ * | *\ *) 57455acc8fcSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57555acc8fcSmrg *) 57655acc8fcSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57755acc8fcSmrg esac 57855acc8fcSmrgfi 57955acc8fcSmrgAC_SUBST(install_sh)]) 5803da084b3Smrg 58155acc8fcSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 58255acc8fcSmrg# 58355acc8fcSmrg# This file is free software; the Free Software Foundation 58455acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 58555acc8fcSmrg# with or without modifications, as long as this notice is preserved. 5863da084b3Smrg 58755acc8fcSmrg# serial 2 5883da084b3Smrg 58955acc8fcSmrg# Check whether the underlying file-system supports filenames 59055acc8fcSmrg# with a leading dot. For instance MS-DOS doesn't. 59155acc8fcSmrgAC_DEFUN([AM_SET_LEADING_DOT], 59255acc8fcSmrg[rm -rf .tst 2>/dev/null 59355acc8fcSmrgmkdir .tst 2>/dev/null 59455acc8fcSmrgif test -d .tst; then 59555acc8fcSmrg am__leading_dot=. 59655acc8fcSmrgelse 59755acc8fcSmrg am__leading_dot=_ 59855acc8fcSmrgfi 59955acc8fcSmrgrmdir .tst 2>/dev/null 60055acc8fcSmrgAC_SUBST([am__leading_dot])]) 6013da084b3Smrg 60255acc8fcSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 60355acc8fcSmrg# From Jim Meyering 6043da084b3Smrg 60555acc8fcSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 60655acc8fcSmrg# Free Software Foundation, Inc. 607d63fdb69Smrg# 60855acc8fcSmrg# This file is free software; the Free Software Foundation 60955acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 61055acc8fcSmrg# with or without modifications, as long as this notice is preserved. 6113da084b3Smrg 61255acc8fcSmrg# serial 5 6133da084b3Smrg 61455acc8fcSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 61555acc8fcSmrg# ---------------------------------- 61655acc8fcSmrg# Control maintainer-specific portions of Makefiles. 61755acc8fcSmrg# Default is to disable them, unless `enable' is passed literally. 61855acc8fcSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 61955acc8fcSmrg# can override the default with the --enable/--disable switch. 62055acc8fcSmrgAC_DEFUN([AM_MAINTAINER_MODE], 62155acc8fcSmrg[m4_case(m4_default([$1], [disable]), 62255acc8fcSmrg [enable], [m4_define([am_maintainer_other], [disable])], 62355acc8fcSmrg [disable], [m4_define([am_maintainer_other], [enable])], 62455acc8fcSmrg [m4_define([am_maintainer_other], [enable]) 62555acc8fcSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 62655acc8fcSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 62755acc8fcSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 62855acc8fcSmrg AC_ARG_ENABLE([maintainer-mode], 62955acc8fcSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 63055acc8fcSmrg (and sometimes confusing) to the casual installer], 63155acc8fcSmrg [USE_MAINTAINER_MODE=$enableval], 63255acc8fcSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 63355acc8fcSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 63455acc8fcSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 63555acc8fcSmrg MAINT=$MAINTAINER_MODE_TRUE 63655acc8fcSmrg AC_SUBST([MAINT])dnl 63755acc8fcSmrg] 63855acc8fcSmrg) 6393da084b3Smrg 64055acc8fcSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6413da084b3Smrg 64255acc8fcSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 64355acc8fcSmrg 64455acc8fcSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 645d63fdb69Smrg# 64655acc8fcSmrg# This file is free software; the Free Software Foundation 64755acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 64855acc8fcSmrg# with or without modifications, as long as this notice is preserved. 6493da084b3Smrg 65055acc8fcSmrg# serial 4 651d63fdb69Smrg 65255acc8fcSmrg# AM_MAKE_INCLUDE() 65355acc8fcSmrg# ----------------- 65455acc8fcSmrg# Check to see how make treats includes. 65555acc8fcSmrgAC_DEFUN([AM_MAKE_INCLUDE], 65655acc8fcSmrg[am_make=${MAKE-make} 65755acc8fcSmrgcat > confinc << 'END' 65855acc8fcSmrgam__doit: 65955acc8fcSmrg @echo this is the am__doit target 66055acc8fcSmrg.PHONY: am__doit 66155acc8fcSmrgEND 66255acc8fcSmrg# If we don't find an include directive, just comment out the code. 66355acc8fcSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 66455acc8fcSmrgam__include="#" 66555acc8fcSmrgam__quote= 66655acc8fcSmrg_am_result=none 66755acc8fcSmrg# First try GNU make style include. 66855acc8fcSmrgecho "include confinc" > confmf 66955acc8fcSmrg# Ignore all kinds of additional output from `make'. 67055acc8fcSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 67155acc8fcSmrg*the\ am__doit\ target*) 67255acc8fcSmrg am__include=include 67355acc8fcSmrg am__quote= 67455acc8fcSmrg _am_result=GNU 67555acc8fcSmrg ;; 67655acc8fcSmrgesac 67755acc8fcSmrg# Now try BSD make style include. 67855acc8fcSmrgif test "$am__include" = "#"; then 67955acc8fcSmrg echo '.include "confinc"' > confmf 68055acc8fcSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 68155acc8fcSmrg *the\ am__doit\ target*) 68255acc8fcSmrg am__include=.include 68355acc8fcSmrg am__quote="\"" 68455acc8fcSmrg _am_result=BSD 68555acc8fcSmrg ;; 68655acc8fcSmrg esac 68755acc8fcSmrgfi 68855acc8fcSmrgAC_SUBST([am__include]) 68955acc8fcSmrgAC_SUBST([am__quote]) 69055acc8fcSmrgAC_MSG_RESULT([$_am_result]) 69155acc8fcSmrgrm -f confinc confmf 69255acc8fcSmrg]) 693d63fdb69Smrg 69455acc8fcSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695d63fdb69Smrg 69655acc8fcSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 69755acc8fcSmrg# Free Software Foundation, Inc. 69855acc8fcSmrg# 69955acc8fcSmrg# This file is free software; the Free Software Foundation 70055acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 70155acc8fcSmrg# with or without modifications, as long as this notice is preserved. 702d63fdb69Smrg 70355acc8fcSmrg# serial 6 704d63fdb69Smrg 70555acc8fcSmrg# AM_MISSING_PROG(NAME, PROGRAM) 706d63fdb69Smrg# ------------------------------ 70755acc8fcSmrgAC_DEFUN([AM_MISSING_PROG], 70855acc8fcSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 70955acc8fcSmrg$1=${$1-"${am_missing_run}$2"} 71055acc8fcSmrgAC_SUBST($1)]) 711d63fdb69Smrg 712d63fdb69Smrg 71355acc8fcSmrg# AM_MISSING_HAS_RUN 71455acc8fcSmrg# ------------------ 71555acc8fcSmrg# Define MISSING if not defined so far and test if it supports --run. 71655acc8fcSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 71755acc8fcSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 71855acc8fcSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 71955acc8fcSmrgAC_REQUIRE_AUX_FILE([missing])dnl 72055acc8fcSmrgif test x"${MISSING+set}" != xset; then 72155acc8fcSmrg case $am_aux_dir in 72255acc8fcSmrg *\ * | *\ *) 72355acc8fcSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 72455acc8fcSmrg *) 72555acc8fcSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 72655acc8fcSmrg esac 72755acc8fcSmrgfi 72855acc8fcSmrg# Use eval to expand $SHELL 72955acc8fcSmrgif eval "$MISSING --run true"; then 73055acc8fcSmrg am_missing_run="$MISSING --run " 73155acc8fcSmrgelse 73255acc8fcSmrg am_missing_run= 73355acc8fcSmrg AC_MSG_WARN([`missing' script is too old or missing]) 73455acc8fcSmrgfi 73555acc8fcSmrg]) 736d63fdb69Smrg 73755acc8fcSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 73855acc8fcSmrg# 73955acc8fcSmrg# This file is free software; the Free Software Foundation 74055acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 74155acc8fcSmrg# with or without modifications, as long as this notice is preserved. 7423da084b3Smrg 74355acc8fcSmrg# AM_PROG_MKDIR_P 74455acc8fcSmrg# --------------- 74555acc8fcSmrg# Check for `mkdir -p'. 74655acc8fcSmrgAC_DEFUN([AM_PROG_MKDIR_P], 74755acc8fcSmrg[AC_PREREQ([2.60])dnl 74855acc8fcSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 74955acc8fcSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 75055acc8fcSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 75155acc8fcSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 75255acc8fcSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 75355acc8fcSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 75455acc8fcSmrgdnl adjustment using top_builddir (which is defined more often than 75555acc8fcSmrgdnl MKDIR_P). 75655acc8fcSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 75755acc8fcSmrgcase $mkdir_p in 75855acc8fcSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 75955acc8fcSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 760d63fdb69Smrgesac 761d63fdb69Smrg]) 7623da084b3Smrg 76355acc8fcSmrg# Helper functions for option handling. -*- Autoconf -*- 7643da084b3Smrg 76555acc8fcSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 76655acc8fcSmrg# 76755acc8fcSmrg# This file is free software; the Free Software Foundation 76855acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 76955acc8fcSmrg# with or without modifications, as long as this notice is preserved. 770d63fdb69Smrg 77155acc8fcSmrg# serial 4 772d63fdb69Smrg 77355acc8fcSmrg# _AM_MANGLE_OPTION(NAME) 77455acc8fcSmrg# ----------------------- 77555acc8fcSmrgAC_DEFUN([_AM_MANGLE_OPTION], 77655acc8fcSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7773da084b3Smrg 77855acc8fcSmrg# _AM_SET_OPTION(NAME) 77955acc8fcSmrg# ------------------------------ 78055acc8fcSmrg# Set option NAME. Presently that only means defining a flag for this option. 78155acc8fcSmrgAC_DEFUN([_AM_SET_OPTION], 78255acc8fcSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7833da084b3Smrg 78455acc8fcSmrg# _AM_SET_OPTIONS(OPTIONS) 78555acc8fcSmrg# ---------------------------------- 78655acc8fcSmrg# OPTIONS is a space-separated list of Automake options. 78755acc8fcSmrgAC_DEFUN([_AM_SET_OPTIONS], 78855acc8fcSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7893da084b3Smrg 79055acc8fcSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 79155acc8fcSmrg# ------------------------------------------- 79255acc8fcSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 79355acc8fcSmrgAC_DEFUN([_AM_IF_OPTION], 79455acc8fcSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7953da084b3Smrg 79655acc8fcSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7973da084b3Smrg 79855acc8fcSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 79955acc8fcSmrg# Free Software Foundation, Inc. 80055acc8fcSmrg# 80155acc8fcSmrg# This file is free software; the Free Software Foundation 80255acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 80355acc8fcSmrg# with or without modifications, as long as this notice is preserved. 8043da084b3Smrg 80555acc8fcSmrg# serial 5 8063da084b3Smrg 80755acc8fcSmrg# AM_SANITY_CHECK 80855acc8fcSmrg# --------------- 80955acc8fcSmrgAC_DEFUN([AM_SANITY_CHECK], 81055acc8fcSmrg[AC_MSG_CHECKING([whether build environment is sane]) 81155acc8fcSmrg# Just in case 81255acc8fcSmrgsleep 1 81355acc8fcSmrgecho timestamp > conftest.file 81455acc8fcSmrg# Reject unsafe characters in $srcdir or the absolute working directory 81555acc8fcSmrg# name. Accept space and tab only in the latter. 81655acc8fcSmrgam_lf=' 81755acc8fcSmrg' 81855acc8fcSmrgcase `pwd` in 81955acc8fcSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 82055acc8fcSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 82155acc8fcSmrgesac 82255acc8fcSmrgcase $srcdir in 82355acc8fcSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 82455acc8fcSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 82555acc8fcSmrgesac 826d63fdb69Smrg 82755acc8fcSmrg# Do `set' in a subshell so we don't clobber the current shell's 82855acc8fcSmrg# arguments. Must try -L first in case configure is actually a 82955acc8fcSmrg# symlink; some systems play weird games with the mod time of symlinks 83055acc8fcSmrg# (eg FreeBSD returns the mod time of the symlink's containing 83155acc8fcSmrg# directory). 83255acc8fcSmrgif ( 83355acc8fcSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 83455acc8fcSmrg if test "$[*]" = "X"; then 83555acc8fcSmrg # -L didn't work. 83655acc8fcSmrg set X `ls -t "$srcdir/configure" conftest.file` 83755acc8fcSmrg fi 83855acc8fcSmrg rm -f conftest.file 83955acc8fcSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 84055acc8fcSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 841d63fdb69Smrg 84255acc8fcSmrg # If neither matched, then we have a broken ls. This can happen 84355acc8fcSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 84455acc8fcSmrg # broken ls alias from the environment. This has actually 84555acc8fcSmrg # happened. Such a system could not be considered "sane". 84655acc8fcSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 84755acc8fcSmrgalias in your environment]) 84855acc8fcSmrg fi 8493da084b3Smrg 85055acc8fcSmrg test "$[2]" = conftest.file 85155acc8fcSmrg ) 85255acc8fcSmrgthen 85355acc8fcSmrg # Ok. 85455acc8fcSmrg : 85555acc8fcSmrgelse 85655acc8fcSmrg AC_MSG_ERROR([newly created file is older than distributed files! 85755acc8fcSmrgCheck your system clock]) 858d63fdb69Smrgfi 85955acc8fcSmrgAC_MSG_RESULT(yes)]) 860d63fdb69Smrg 86155acc8fcSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 86255acc8fcSmrg# 86355acc8fcSmrg# This file is free software; the Free Software Foundation 86455acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 86555acc8fcSmrg# with or without modifications, as long as this notice is preserved. 8663da084b3Smrg 86755acc8fcSmrg# serial 1 8683da084b3Smrg 86955acc8fcSmrg# AM_SILENT_RULES([DEFAULT]) 87055acc8fcSmrg# -------------------------- 87155acc8fcSmrg# Enable less verbose build rules; with the default set to DEFAULT 87255acc8fcSmrg# (`yes' being less verbose, `no' or empty being verbose). 87355acc8fcSmrgAC_DEFUN([AM_SILENT_RULES], 87455acc8fcSmrg[AC_ARG_ENABLE([silent-rules], 87555acc8fcSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 87655acc8fcSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 87755acc8fcSmrgcase $enable_silent_rules in 87855acc8fcSmrgyes) AM_DEFAULT_VERBOSITY=0;; 87955acc8fcSmrgno) AM_DEFAULT_VERBOSITY=1;; 88055acc8fcSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 88155acc8fcSmrgesac 88255acc8fcSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 88355acc8fcSmrgAM_BACKSLASH='\' 88455acc8fcSmrgAC_SUBST([AM_BACKSLASH])dnl 88555acc8fcSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 88655acc8fcSmrg]) 8873da084b3Smrg 88855acc8fcSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889d63fdb69Smrg# 89055acc8fcSmrg# This file is free software; the Free Software Foundation 89155acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 89255acc8fcSmrg# with or without modifications, as long as this notice is preserved. 8933da084b3Smrg 89455acc8fcSmrg# AM_PROG_INSTALL_STRIP 89555acc8fcSmrg# --------------------- 89655acc8fcSmrg# One issue with vendor `install' (even GNU) is that you can't 89755acc8fcSmrg# specify the program used to strip binaries. This is especially 89855acc8fcSmrg# annoying in cross-compiling environments, where the build's strip 89955acc8fcSmrg# is unlikely to handle the host's binaries. 90055acc8fcSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 90155acc8fcSmrg# always use install-sh in `make install-strip', and initialize 90255acc8fcSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 90355acc8fcSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 90455acc8fcSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 90555acc8fcSmrg# Installed binaries are usually stripped using `strip' when the user 90655acc8fcSmrg# run `make install-strip'. However `strip' might not be the right 90755acc8fcSmrg# tool to use in cross-compilation environments, therefore Automake 90855acc8fcSmrg# will honor the `STRIP' environment variable to overrule this program. 90955acc8fcSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 91055acc8fcSmrgif test "$cross_compiling" != no; then 91155acc8fcSmrg AC_CHECK_TOOL([STRIP], [strip], :) 912d63fdb69Smrgfi 91355acc8fcSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 91455acc8fcSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9153da084b3Smrg 91655acc8fcSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 91755acc8fcSmrg# 91855acc8fcSmrg# This file is free software; the Free Software Foundation 91955acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 92055acc8fcSmrg# with or without modifications, as long as this notice is preserved. 9213da084b3Smrg 92255acc8fcSmrg# serial 2 9233da084b3Smrg 92455acc8fcSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 92555acc8fcSmrg# --------------------------- 92655acc8fcSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 92755acc8fcSmrg# This macro is traced by Automake. 92855acc8fcSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9293da084b3Smrg 93055acc8fcSmrg# AM_SUBST_NOTMAKE(VARIABLE) 93155acc8fcSmrg# --------------------------- 93255acc8fcSmrg# Public sister of _AM_SUBST_NOTMAKE. 93355acc8fcSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9343da084b3Smrg 93555acc8fcSmrg# Check how to create a tarball. -*- Autoconf -*- 9363da084b3Smrg 93755acc8fcSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 93855acc8fcSmrg# 93955acc8fcSmrg# This file is free software; the Free Software Foundation 94055acc8fcSmrg# gives unlimited permission to copy and/or distribute it, 94155acc8fcSmrg# with or without modifications, as long as this notice is preserved. 9423da084b3Smrg 94355acc8fcSmrg# serial 2 9443da084b3Smrg 94555acc8fcSmrg# _AM_PROG_TAR(FORMAT) 94655acc8fcSmrg# -------------------- 94755acc8fcSmrg# Check how to create a tarball in format FORMAT. 94855acc8fcSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 94955acc8fcSmrg# 95055acc8fcSmrg# Substitute a variable $(am__tar) that is a command 95155acc8fcSmrg# writing to stdout a FORMAT-tarball containing the directory 95255acc8fcSmrg# $tardir. 95355acc8fcSmrg# tardir=directory && $(am__tar) > result.tar 95455acc8fcSmrg# 95555acc8fcSmrg# Substitute a variable $(am__untar) that extract such 95655acc8fcSmrg# a tarball read from stdin. 95755acc8fcSmrg# $(am__untar) < result.tar 95855acc8fcSmrgAC_DEFUN([_AM_PROG_TAR], 95955acc8fcSmrg[# Always define AMTAR for backward compatibility. 96055acc8fcSmrgAM_MISSING_PROG([AMTAR], [tar]) 96155acc8fcSmrgm4_if([$1], [v7], 96255acc8fcSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 96355acc8fcSmrg [m4_case([$1], [ustar],, [pax],, 96455acc8fcSmrg [m4_fatal([Unknown tar format])]) 96555acc8fcSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 96655acc8fcSmrg# Loop over all known methods to create a tar archive until one works. 96755acc8fcSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 96855acc8fcSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 96955acc8fcSmrg# Do not fold the above two line into one, because Tru64 sh and 97055acc8fcSmrg# Solaris sh will not grok spaces in the rhs of `-'. 97155acc8fcSmrgfor _am_tool in $_am_tools 97255acc8fcSmrgdo 97355acc8fcSmrg case $_am_tool in 97455acc8fcSmrg gnutar) 97555acc8fcSmrg for _am_tar in tar gnutar gtar; 97655acc8fcSmrg do 97755acc8fcSmrg AM_RUN_LOG([$_am_tar --version]) && break 97855acc8fcSmrg done 97955acc8fcSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98055acc8fcSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98155acc8fcSmrg am__untar="$_am_tar -xf -" 98255acc8fcSmrg ;; 98355acc8fcSmrg plaintar) 98455acc8fcSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 98555acc8fcSmrg # ustar tarball either. 98655acc8fcSmrg (tar --version) >/dev/null 2>&1 && continue 98755acc8fcSmrg am__tar='tar chf - "$$tardir"' 98855acc8fcSmrg am__tar_='tar chf - "$tardir"' 98955acc8fcSmrg am__untar='tar xf -' 99055acc8fcSmrg ;; 99155acc8fcSmrg pax) 99255acc8fcSmrg am__tar='pax -L -x $1 -w "$$tardir"' 99355acc8fcSmrg am__tar_='pax -L -x $1 -w "$tardir"' 99455acc8fcSmrg am__untar='pax -r' 99555acc8fcSmrg ;; 99655acc8fcSmrg cpio) 99755acc8fcSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 99855acc8fcSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 99955acc8fcSmrg am__untar='cpio -i -H $1 -d' 100055acc8fcSmrg ;; 100155acc8fcSmrg none) 100255acc8fcSmrg am__tar=false 100355acc8fcSmrg am__tar_=false 100455acc8fcSmrg am__untar=false 100555acc8fcSmrg ;; 100655acc8fcSmrg esac 1007d63fdb69Smrg 100855acc8fcSmrg # If the value was cached, stop now. We just wanted to have am__tar 100955acc8fcSmrg # and am__untar set. 101055acc8fcSmrg test -n "${am_cv_prog_tar_$1}" && break 1011d63fdb69Smrg 101255acc8fcSmrg # tar/untar a dummy directory, and stop if the command works 101355acc8fcSmrg rm -rf conftest.dir 101455acc8fcSmrg mkdir conftest.dir 101555acc8fcSmrg echo GrepMe > conftest.dir/file 101655acc8fcSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 101755acc8fcSmrg rm -rf conftest.dir 101855acc8fcSmrg if test -s conftest.tar; then 101955acc8fcSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 102055acc8fcSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102155acc8fcSmrg fi 102255acc8fcSmrgdone 102355acc8fcSmrgrm -rf conftest.dir 10243da084b3Smrg 102555acc8fcSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 102655acc8fcSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 102755acc8fcSmrgAC_SUBST([am__tar]) 102855acc8fcSmrgAC_SUBST([am__untar]) 102955acc8fcSmrg]) # _AM_PROG_TAR 10303da084b3Smrg 103155acc8fcSmrgdnl fontutil.m4. Generated from fontutil.m4.in by configure. 103255acc8fcSmrgdnl 103355acc8fcSmrgdnl This file comes from X.Org's font-util 1.2.0 103455acc8fcSmrgdnl 103555acc8fcSmrgdnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. 103655acc8fcSmrgdnl 103755acc8fcSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 103855acc8fcSmrgdnl copy of this software and associated documentation files (the "Software"), 103955acc8fcSmrgdnl to deal in the Software without restriction, including without limitation 104055acc8fcSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 104155acc8fcSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 104255acc8fcSmrgdnl Software is furnished to do so, subject to the following conditions: 104355acc8fcSmrgdnl 104455acc8fcSmrgdnl The above copyright notice and this permission notice (including the next 104555acc8fcSmrgdnl paragraph) shall be included in all copies or substantial portions of the 104655acc8fcSmrgdnl Software. 104755acc8fcSmrgdnl 104855acc8fcSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 104955acc8fcSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 105055acc8fcSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 105155acc8fcSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 105255acc8fcSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 105355acc8fcSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 105455acc8fcSmrgdnl DEALINGS IN THE SOFTWARE. 105555acc8fcSmrgdnl 105655acc8fcSmrgdnl -------------------------------------------------------------------- 105755acc8fcSmrgdnl 105855acc8fcSmrgdnl Copyright 2005 Red Hat, Inc 105955acc8fcSmrgdnl 106055acc8fcSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 106155acc8fcSmrgdnl documentation for any purpose is hereby granted without fee, provided that 106255acc8fcSmrgdnl the above copyright notice appear in all copies and that both that 106355acc8fcSmrgdnl copyright notice and this permission notice appear in supporting 106455acc8fcSmrgdnl documentation. 106555acc8fcSmrgdnl 106655acc8fcSmrgdnl The above copyright notice and this permission notice shall be included 106755acc8fcSmrgdnl in all copies or substantial portions of the Software. 106855acc8fcSmrgdnl 106955acc8fcSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 107055acc8fcSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 107155acc8fcSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 107255acc8fcSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 107355acc8fcSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 107455acc8fcSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 107555acc8fcSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 107655acc8fcSmrgdnl 107755acc8fcSmrgdnl Except as contained in this notice, the name of the copyright holders shall 107855acc8fcSmrgdnl not be used in advertising or otherwise to promote the sale, use or 107955acc8fcSmrgdnl other dealings in this Software without prior written authorization 108055acc8fcSmrgdnl from the copyright holders. 1081d63fdb69Smrg 108255acc8fcSmrg# XORG_FONT_MACROS_VERSION(required-version) 108355acc8fcSmrg# ------------------------------------------ 108455acc8fcSmrg# Minimum version: 1.1.0 108555acc8fcSmrg# 108655acc8fcSmrg# If you're using a macro added in Version 1.1 or newer, include this in 108755acc8fcSmrg# your configure.ac with the minimum required version, such as: 108855acc8fcSmrg# XORG_FONT_MACROS_VERSION(1.1) 108955acc8fcSmrg# 109055acc8fcSmrg# To ensure that this macro is defined, also add: 109155acc8fcSmrg# m4_ifndef([XORG_FONT_MACROS_VERSION], 109255acc8fcSmrg# [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])]) 109355acc8fcSmrg# 109455acc8fcSmrg# 109555acc8fcSmrg# See the "minimum version" comment for each macro you use to see what 109655acc8fcSmrg# version you require. 109755acc8fcSmrgm4_defun([XORG_FONT_MACROS_VERSION],[ 109855acc8fcSmrgm4_define([vers_have], [1.2.0]) 109955acc8fcSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 110055acc8fcSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 110155acc8fcSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 110255acc8fcSmrg [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])]) 110355acc8fcSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 110455acc8fcSmrg [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])]) 110555acc8fcSmrgm4_undefine([vers_have]) 110655acc8fcSmrgm4_undefine([maj_have]) 110755acc8fcSmrgm4_undefine([maj_needed]) 110855acc8fcSmrg]) # XORG_FONT_MACROS_VERSION 1109d63fdb69Smrg 111055acc8fcSmrg# XORG_FONT_CHECK_{maps}() 111155acc8fcSmrg# ------------------------ 111255acc8fcSmrg# Minimum version: 1.0.0 111355acc8fcSmrg# These macros add --enable/disable-{maps} where {maps} are ISO8859-*, 111455acc8fcSmrg# JISX0201 or KOI8_R. By default, they are all enabled. 111555acc8fcSmrg 111655acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)]) 111755acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)]) 111855acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)]) 111955acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)]) 112055acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)]) 112155acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)]) 112255acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)]) 112355acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)]) 112455acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)]) 112555acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)]) 112655acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)]) 112755acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)]) 112855acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)]) 112955acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)]) 113055acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)]) 113155acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)]) 113255acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_JISX0201], [XORG_FONT_CHECK_ENCODING(JISX0201)]) 113355acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_KOI8_R], [XORG_FONT_CHECK_ENCODING(KOI8-R)]) 113455acc8fcSmrg 113555acc8fcSmrg# XORG_FONT_CHECK_ENCODING(encoding) 113655acc8fcSmrg# ---------------------------------- 113755acc8fcSmrg# Minimum version: 1.1.0 113855acc8fcSmrg# This macro adds --enable/disable-<encoding>, enabled by default. 113955acc8fcSmrg# It replaced individual copies of this code in the above macros in 1.1. 114055acc8fcSmrg# Currently assumes encoding names will be all upper-case - add m4_toupper 114155acc8fcSmrg# calls if this is not true in the future. 114255acc8fcSmrg 114355acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ENCODING],[ 114455acc8fcSmrg AC_ARG_ENABLE(m4_tolower($1), 114555acc8fcSmrg AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)), 114655acc8fcSmrg [Build $1 fonts (default: yes)]), 114755acc8fcSmrg [AS_TR_SH($1)=$enableval]) 114855acc8fcSmrg AC_MSG_CHECKING([whether to build $1 fonts]) 114955acc8fcSmrg AC_MSG_RESULT($[AS_TR_SH($1)]) 115055acc8fcSmrg AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes]) 115155acc8fcSmrg]) # XORG_FONT_CHECK_ENCODING 115255acc8fcSmrg 115355acc8fcSmrg# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....) 115455acc8fcSmrg# ----------------------------------------------------- 115555acc8fcSmrg# Minimum version: 1.1.0 115655acc8fcSmrg# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once. 115755acc8fcSmrg# Add a shorthand --enable/disable-all-encodings option. 115855acc8fcSmrg 115955acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[ 116055acc8fcSmrg AC_ARG_ENABLE([all-encodings], 116155acc8fcSmrg AS_HELP_STRING([--disable-all-encodings], 116255acc8fcSmrg [Disable building of all font encodings]), 116355acc8fcSmrg [m4_foreach_w([enc], [$1], [ 116455acc8fcSmrg AS_TR_SH(enc)=$enableval 116555acc8fcSmrg ])], 116655acc8fcSmrg [m4_foreach_w([enc], [$1], [ 116755acc8fcSmrg AS_TR_SH(enc)=yes 116855acc8fcSmrg ])]) 116955acc8fcSmrg m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)]) 117055acc8fcSmrg]) # XORG_FONT_CHECK_ENCODING_LIST 117155acc8fcSmrg 117255acc8fcSmrg# XORG_FONT_REQUIRED_PROG(VARNAME, progname) 117355acc8fcSmrg# ------------------------------------------ 117455acc8fcSmrg# Minimum version: 1.1.0 117555acc8fcSmrg# 117655acc8fcSmrg# Simple wrapper around AC_PATH_PROG that errors if not found 117755acc8fcSmrg# 1178d63fdb69Smrg 117955acc8fcSmrgAC_DEFUN([XORG_FONT_REQUIRED_PROG],[ 118055acc8fcSmrg AC_PATH_PROG($1, $2) 118155acc8fcSmrg if test x"$$1" = x; then 118255acc8fcSmrg AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.]) 118355acc8fcSmrg fi 118455acc8fcSmrg]) 1185d63fdb69Smrg 1186d63fdb69Smrg 118755acc8fcSmrg# XORG_FONT_FCCACHE() 118855acc8fcSmrg# ------------------- 118955acc8fcSmrg# Minimum version: 1.1.0 119055acc8fcSmrg# 119155acc8fcSmrg# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found 119255acc8fcSmrg# Set RUN_FCCACHE to a rule suitable for substituting into a makefile 119355acc8fcSmrg# to run fc-cache if found and not installing to $DESTDIR 119455acc8fcSmrg# 119555acc8fcSmrg# fc-cache is optional, not required, and should be skipped when making 119655acc8fcSmrg# packages (installing to $DESTDIR). 119755acc8fcSmrg# 119855acc8fcSmrgAC_DEFUN([XORG_FONT_FCCACHE],[ 119955acc8fcSmrg AC_PATH_PROG(FCCACHE, fc-cache) 120055acc8fcSmrg FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"' 120155acc8fcSmrg if test x"$FCCACHE" = x ; then 120255acc8fcSmrg RUN_FCCACHE="${FCCACHE_WARN}" 120355acc8fcSmrg else 120455acc8fcSmrg RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else' 120555acc8fcSmrg RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)" 120655acc8fcSmrg fi 120755acc8fcSmrg AC_SUBST([RUN_FCCACHE]) 120855acc8fcSmrg]) 1209d63fdb69Smrg 1210d63fdb69Smrg 121155acc8fcSmrg# XORG_FONT_COMMON_UTILS() 121255acc8fcSmrg# ------------------------ 121355acc8fcSmrg# Minimum version: 1.1.0 121455acc8fcSmrg# 121555acc8fcSmrg# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types 12163da084b3Smrg 121755acc8fcSmrgAC_DEFUN([XORG_FONT_COMMON_UTILS],[ 121855acc8fcSmrg XORG_FONT_FCCACHE 121955acc8fcSmrg XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir) 122055acc8fcSmrg]) 12213da084b3Smrg 122255acc8fcSmrg# XORG_FONT_SCALED_UTILS() 122355acc8fcSmrg# ------------------------ 122455acc8fcSmrg# Minimum version: 1.1.0 122555acc8fcSmrg# 122655acc8fcSmrg# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts 122755acc8fcSmrg# (TrueType, OpenType, Type1) 12283da084b3Smrg 122955acc8fcSmrgAC_DEFUN([XORG_FONT_SCALED_UTILS],[ 123055acc8fcSmrg XORG_FONT_COMMON_UTILS 123155acc8fcSmrg XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale) 123255acc8fcSmrg]) 12333da084b3Smrg 123455acc8fcSmrg# XORG_FONT_BDF_UTILS() 123555acc8fcSmrg# --------------------- 123655acc8fcSmrg# Minimum version: 1.1.0 123755acc8fcSmrg# 123855acc8fcSmrg# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts 123955acc8fcSmrg# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the 124055acc8fcSmrg# PCF output files created by bdftopcf 124155acc8fcSmrg 124255acc8fcSmrgAC_DEFUN([XORG_FONT_BDF_UTILS],[ 124355acc8fcSmrg XORG_FONT_COMMON_UTILS 124455acc8fcSmrg XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf) 124555acc8fcSmrg XORG_FONT_CHECK_COMPRESSION 124655acc8fcSmrg]) 12473da084b3Smrg 124855acc8fcSmrg# XORG_FONT_CHECK_COMPRESSION() 124955acc8fcSmrg# ----------------------------- 125055acc8fcSmrg# Minimum version: 1.1.0 125155acc8fcSmrg# 125255acc8fcSmrg# Offer a --with-compression flag to control what compression method is 125355acc8fcSmrg# used for pcf font files. Offers all the methods currently supported 125455acc8fcSmrg# by libXfont, including no compression. 125555acc8fcSmrg 125655acc8fcSmrgAC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[ 125755acc8fcSmrg AC_MSG_CHECKING([font compression method]) 125855acc8fcSmrg AC_ARG_WITH(compression, 125955acc8fcSmrg [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>], 126055acc8fcSmrg [compression method to use on pcf fonts])], 126155acc8fcSmrg [compression="$withval"], [compression="yes"]) 126255acc8fcSmrg if test x"$compression" = "xyes" ; then 126355acc8fcSmrg compression="gzip" 126455acc8fcSmrg fi 126555acc8fcSmrg AC_MSG_RESULT([${compression}]) 126655acc8fcSmrg case ${compression} in 126755acc8fcSmrg *compress) COMPRESS_SUFFIX=".Z" ;; 126855acc8fcSmrg *gzip) COMPRESS_SUFFIX=".gz" ;; 126955acc8fcSmrg *bzip2) COMPRESS_SUFFIX=".bz2" ;; 127055acc8fcSmrg no|none) COMPRESS_SUFFIX="" ; COMPRESS="cat" ;; 127155acc8fcSmrg *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;; 127255acc8fcSmrg esac 127355acc8fcSmrg if test x"$COMPRESS_SUFFIX" != "x" ; then 127455acc8fcSmrg XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression}) 127555acc8fcSmrg fi 127655acc8fcSmrg AC_SUBST([COMPRESS_SUFFIX]) 127755acc8fcSmrg]) 12783da084b3Smrg 127955acc8fcSmrg# XORG_FONT_UCS2ANY() 128055acc8fcSmrg# ------------------- 128155acc8fcSmrg# Minimum version: 1.1.0 128255acc8fcSmrg# 128355acc8fcSmrg# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting 128455acc8fcSmrg# Unicode-encoded BDF format bitmap fonts into subsets for older encodings. 128555acc8fcSmrg# Also call pkg-config to find the directory with the encoding files needed 128655acc8fcSmrg# by ucs2any, and export it as MAPFILES_PATH to the Makefiles 128755acc8fcSmrg 128855acc8fcSmrgAC_DEFUN([XORG_FONT_UCS2ANY],[ 128955acc8fcSmrg XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any) 129055acc8fcSmrg PKG_CHECK_MODULES(MAPS, [fontutil]) 129155acc8fcSmrg AC_MSG_CHECKING([for ucs2any encoding data files]) 129255acc8fcSmrg MAPFILES_PATH=`pkg-config --variable=mapdir fontutil` 129355acc8fcSmrg AC_SUBST(MAPFILES_PATH) 129455acc8fcSmrg AC_MSG_RESULT([${MAPFILES_PATH}]) 129555acc8fcSmrg]) 12963da084b3Smrg 12973da084b3Smrg 12983da084b3Smrg 129955acc8fcSmrg# XORG_FONT_FC_CONFDIR() 130055acc8fcSmrg# -------------------- 130155acc8fcSmrg# Minimum version: 1.2.0 130255acc8fcSmrg# 130355acc8fcSmrg# Sets FC_CONFDIR to the fontconfig config directory 130455acc8fcSmrg# (which should be --with-confdir=... when building fontconfig) 130555acc8fcSmrg# found from: 130655acc8fcSmrg# --with-fc-confdir=... 130755acc8fcSmrg# pkg-config --variable=confdir fontconfig 130855acc8fcSmrg# ${sysconfdir}/fonts 130955acc8fcSmrg 131055acc8fcSmrgAC_DEFUN([XORG_FONT_FC_CONFDIR],[ 131155acc8fcSmrg dnl Ensure $PKG_CONFIG is set first 131255acc8fcSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 131355acc8fcSmrg 131455acc8fcSmrg AC_MSG_CHECKING([for fontconfig's configuration directory]) 131555acc8fcSmrg AC_ARG_WITH(fc-confdir, 131655acc8fcSmrg AS_HELP_STRING([--with-fc-confdir=DIR], 131755acc8fcSmrg [Path to fontconfig's configuration directory]), 131855acc8fcSmrg [FC_CONFDIR="$withval"]) 131955acc8fcSmrg # if --with-fc-confdir was not specified 132055acc8fcSmrg if test "x${FC_CONFDIR}" = "x"; then 132155acc8fcSmrg FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig` 132255acc8fcSmrg fi 132355acc8fcSmrg # ...and if pkg-config didn't find confdir in fontconfig.pc... 132455acc8fcSmrg if test "x${FC_CONFDIR}" = "x"; then 132555acc8fcSmrg FC_CONFDIR="${sysconfdir}/fonts" 132655acc8fcSmrg fi 132755acc8fcSmrg AC_SUBST(FC_CONFDIR) 132855acc8fcSmrg AC_MSG_RESULT([${FC_CONFDIR}]) 132955acc8fcSmrg]) 1330d63fdb69Smrg 133155acc8fcSmrg 133255acc8fcSmrg 133355acc8fcSmrg# XORG_FONTROOTDIR() 133455acc8fcSmrg# -------------------- 133555acc8fcSmrg# Minimum version: 1.1.0 133655acc8fcSmrg# 133755acc8fcSmrg# Sets FONTROOTDIR to the root directory for font files. Uses the first 133855acc8fcSmrg# found from: 133955acc8fcSmrg# --with-fontrootdir 134055acc8fcSmrg# pkg-config --variable=fontrootdir fontutil 134155acc8fcSmrg# ${datadir}/fonts/X11 134255acc8fcSmrg 134355acc8fcSmrgAC_DEFUN([XORG_FONTROOTDIR],[ 134455acc8fcSmrg dnl Ensure $PKG_CONFIG is set first 134555acc8fcSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 134655acc8fcSmrg 134755acc8fcSmrg AC_MSG_CHECKING([for root directory for font files]) 134855acc8fcSmrg AC_ARG_WITH(fontrootdir, 134955acc8fcSmrg AS_HELP_STRING([--with-fontrootdir=DIR], 135055acc8fcSmrg [Path to root directory for font files]), 135155acc8fcSmrg [FONTROOTDIR="$withval"]) 135255acc8fcSmrg # if --with-fontrootdir not specified... 135355acc8fcSmrg if test "x${FONTROOTDIR}" = "x"; then 135455acc8fcSmrg FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil` 1355d63fdb69Smrg fi 135655acc8fcSmrg # ...and if pkg-config didn't find fontdir in fontutil.pc... 135755acc8fcSmrg if test "x${FONTROOTDIR}" = "x"; then 135855acc8fcSmrg FONTROOTDIR="${datadir}/fonts/X11" 135955acc8fcSmrg fi 136055acc8fcSmrg AC_SUBST(FONTROOTDIR) 136155acc8fcSmrg AC_MSG_RESULT([${FONTROOTDIR}]) 1362d63fdb69Smrg]) 13633da084b3Smrg 136455acc8fcSmrg# XORG_FONTSUBDIR(variable, flag, subdir) 136555acc8fcSmrg# --------------------------------------- 136655acc8fcSmrg# Minimum version: 1.1.0 136755acc8fcSmrg# 136855acc8fcSmrg# Offer a --with-<flag> flag to control directory for font installation 136955acc8fcSmrg# Default is the specified <subdir> of the font root directory. 137055acc8fcSmrg# Sets <variable> to the selected directory 137155acc8fcSmrg 137255acc8fcSmrgAC_DEFUN([XORG_FONTSUBDIR],[ 137355acc8fcSmrg AC_REQUIRE([XORG_FONTROOTDIR]) 137455acc8fcSmrg 137555acc8fcSmrg AC_MSG_CHECKING([for directory for $3 files]) 137655acc8fcSmrg AC_ARG_WITH($2, 137755acc8fcSmrg [AS_HELP_STRING([--with-$2=DIR], 137855acc8fcSmrg [Path to $3 files [FONTROOTDIR/$3]])], 137955acc8fcSmrg [$1="${withval}"], [$1='${FONTROOTDIR}/$3']) 138055acc8fcSmrg AC_SUBST($1) 138155acc8fcSmrg AC_MSG_RESULT([${$1}]) 138255acc8fcSmrg]) # XORG_FONTSUBDIR 138355acc8fcSmrg 138455acc8fcSmrg# XORG_FONTDIR(subdir) 138555acc8fcSmrg# -------------------- 138655acc8fcSmrg# Minimum version: 1.1.0 138755acc8fcSmrg# 138855acc8fcSmrg# Offer a --with-fontdir flag to control directory for font installation 138955acc8fcSmrg# Default is the specified subdir of the font root directory. 139055acc8fcSmrg# Sets FONTDIR to the selected directory 13913da084b3Smrg 139255acc8fcSmrgAC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])]) 13933da084b3Smrg 139455acc8fcSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 139555acc8fcSmrgdnl 139655acc8fcSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 139755acc8fcSmrgdnl 139855acc8fcSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 139955acc8fcSmrgdnl copy of this software and associated documentation files (the "Software"), 140055acc8fcSmrgdnl to deal in the Software without restriction, including without limitation 140155acc8fcSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 140255acc8fcSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 140355acc8fcSmrgdnl Software is furnished to do so, subject to the following conditions: 140455acc8fcSmrgdnl 140555acc8fcSmrgdnl The above copyright notice and this permission notice (including the next 140655acc8fcSmrgdnl paragraph) shall be included in all copies or substantial portions of the 140755acc8fcSmrgdnl Software. 140855acc8fcSmrgdnl 140955acc8fcSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 141055acc8fcSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 141155acc8fcSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 141255acc8fcSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 141355acc8fcSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 141455acc8fcSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 141555acc8fcSmrgdnl DEALINGS IN THE SOFTWARE. 14163da084b3Smrg 141755acc8fcSmrg# XORG_MACROS_VERSION(required-version) 141855acc8fcSmrg# ------------------------------------- 141955acc8fcSmrg# Minimum version: 1.1.0 142055acc8fcSmrg# 142155acc8fcSmrg# If you're using a macro added in Version 1.1 or newer, include this in 142255acc8fcSmrg# your configure.ac with the minimum required version, such as: 142355acc8fcSmrg# XORG_MACROS_VERSION(1.1) 142455acc8fcSmrg# 142555acc8fcSmrg# To ensure that this macro is defined, also add: 142655acc8fcSmrg# m4_ifndef([XORG_MACROS_VERSION], 142755acc8fcSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 142855acc8fcSmrg# 142955acc8fcSmrg# 143055acc8fcSmrg# See the "minimum version" comment for each macro you use to see what 143155acc8fcSmrg# version you require. 143255acc8fcSmrgm4_defun([XORG_MACROS_VERSION],[ 143355acc8fcSmrgm4_define([vers_have], [1.10.1]) 143455acc8fcSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 143555acc8fcSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 143655acc8fcSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 143755acc8fcSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 143855acc8fcSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 143955acc8fcSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 144055acc8fcSmrgm4_undefine([vers_have]) 144155acc8fcSmrgm4_undefine([maj_have]) 144255acc8fcSmrgm4_undefine([maj_needed]) 144355acc8fcSmrg]) # XORG_MACROS_VERSION 14443da084b3Smrg 144555acc8fcSmrg# XORG_PROG_RAWCPP() 144655acc8fcSmrg# ------------------ 144755acc8fcSmrg# Minimum version: 1.0.0 144855acc8fcSmrg# 144955acc8fcSmrg# Find cpp program and necessary flags for use in pre-processing text files 145055acc8fcSmrg# such as man pages and config files 145155acc8fcSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 145255acc8fcSmrgAC_REQUIRE([AC_PROG_CPP]) 145355acc8fcSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 145455acc8fcSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1455d63fdb69Smrg 145655acc8fcSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 145755acc8fcSmrg# which is not the best choice for supporting other OS'es, but covers most 145855acc8fcSmrg# of the ones we need for now. 145955acc8fcSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 146055acc8fcSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 146155acc8fcSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 146255acc8fcSmrg AC_MSG_RESULT([no]) 14633da084b3Smrgelse 146455acc8fcSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 146555acc8fcSmrg RAWCPPFLAGS=-undef 146655acc8fcSmrg AC_MSG_RESULT([yes]) 146755acc8fcSmrg # under Cygwin unix is still defined even with -undef 146855acc8fcSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 146955acc8fcSmrg RAWCPPFLAGS="-undef -ansi" 147055acc8fcSmrg AC_MSG_RESULT([yes, with -ansi]) 147155acc8fcSmrg else 147255acc8fcSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 147355acc8fcSmrg fi 14743da084b3Smrgfi 147555acc8fcSmrgrm -f conftest.$ac_ext 14763da084b3Smrg 147755acc8fcSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 147855acc8fcSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 147955acc8fcSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 148055acc8fcSmrg AC_MSG_RESULT([no]) 148155acc8fcSmrgelse 148255acc8fcSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 148355acc8fcSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 148455acc8fcSmrg AC_MSG_RESULT([yes]) 148555acc8fcSmrg else 148655acc8fcSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 148755acc8fcSmrg fi 14883da084b3Smrgfi 148955acc8fcSmrgrm -f conftest.$ac_ext 149055acc8fcSmrgAC_SUBST(RAWCPPFLAGS) 149155acc8fcSmrg]) # XORG_PROG_RAWCPP 14923da084b3Smrg 149355acc8fcSmrg# XORG_MANPAGE_SECTIONS() 149455acc8fcSmrg# ----------------------- 149555acc8fcSmrg# Minimum version: 1.0.0 149655acc8fcSmrg# 149755acc8fcSmrg# Determine which sections man pages go in for the different man page types 149855acc8fcSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 149955acc8fcSmrg# Not sure if there's any better way than just hardcoding by OS name. 150055acc8fcSmrg# Override default settings by setting environment variables 150155acc8fcSmrg# Added MAN_SUBSTS in version 1.8 150255acc8fcSmrg# Added AC_PROG_SED in version 1.8 15033da084b3Smrg 150455acc8fcSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 150555acc8fcSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 150655acc8fcSmrgAC_REQUIRE([AC_PROG_SED]) 15073da084b3Smrg 150855acc8fcSmrgif test x$APP_MAN_SUFFIX = x ; then 150955acc8fcSmrg APP_MAN_SUFFIX=1 151055acc8fcSmrgfi 151155acc8fcSmrgif test x$APP_MAN_DIR = x ; then 151255acc8fcSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 151355acc8fcSmrgfi 15143da084b3Smrg 151555acc8fcSmrgif test x$LIB_MAN_SUFFIX = x ; then 151655acc8fcSmrg LIB_MAN_SUFFIX=3 151755acc8fcSmrgfi 151855acc8fcSmrgif test x$LIB_MAN_DIR = x ; then 151955acc8fcSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 152055acc8fcSmrgfi 15213da084b3Smrg 152255acc8fcSmrgif test x$FILE_MAN_SUFFIX = x ; then 152355acc8fcSmrg case $host_os in 152455acc8fcSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 152555acc8fcSmrg *) FILE_MAN_SUFFIX=5 ;; 152655acc8fcSmrg esac 152755acc8fcSmrgfi 152855acc8fcSmrgif test x$FILE_MAN_DIR = x ; then 152955acc8fcSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 15303da084b3Smrgfi 15313da084b3Smrg 153255acc8fcSmrgif test x$MISC_MAN_SUFFIX = x ; then 153355acc8fcSmrg case $host_os in 153455acc8fcSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 153555acc8fcSmrg *) MISC_MAN_SUFFIX=7 ;; 153655acc8fcSmrg esac 153755acc8fcSmrgfi 153855acc8fcSmrgif test x$MISC_MAN_DIR = x ; then 153955acc8fcSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1540d63fdb69Smrgfi 15413da084b3Smrg 154255acc8fcSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 154355acc8fcSmrg case $host_os in 154455acc8fcSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 154555acc8fcSmrg *) DRIVER_MAN_SUFFIX=4 ;; 154655acc8fcSmrg esac 154755acc8fcSmrgfi 154855acc8fcSmrgif test x$DRIVER_MAN_DIR = x ; then 154955acc8fcSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 155055acc8fcSmrgfi 15513da084b3Smrg 155255acc8fcSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 155355acc8fcSmrg case $host_os in 155455acc8fcSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 155555acc8fcSmrg *) ADMIN_MAN_SUFFIX=8 ;; 155655acc8fcSmrg esac 155755acc8fcSmrgfi 155855acc8fcSmrgif test x$ADMIN_MAN_DIR = x ; then 155955acc8fcSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 156055acc8fcSmrgfi 15613da084b3Smrg 1562d63fdb69Smrg 156355acc8fcSmrgAC_SUBST([APP_MAN_SUFFIX]) 156455acc8fcSmrgAC_SUBST([LIB_MAN_SUFFIX]) 156555acc8fcSmrgAC_SUBST([FILE_MAN_SUFFIX]) 156655acc8fcSmrgAC_SUBST([MISC_MAN_SUFFIX]) 156755acc8fcSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 156855acc8fcSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 156955acc8fcSmrgAC_SUBST([APP_MAN_DIR]) 157055acc8fcSmrgAC_SUBST([LIB_MAN_DIR]) 157155acc8fcSmrgAC_SUBST([FILE_MAN_DIR]) 157255acc8fcSmrgAC_SUBST([MISC_MAN_DIR]) 157355acc8fcSmrgAC_SUBST([DRIVER_MAN_DIR]) 157455acc8fcSmrgAC_SUBST([ADMIN_MAN_DIR]) 15753da084b3Smrg 157655acc8fcSmrgXORG_MAN_PAGE="X Version 11" 157755acc8fcSmrgAC_SUBST([XORG_MAN_PAGE]) 157855acc8fcSmrgMAN_SUBSTS="\ 157955acc8fcSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 158055acc8fcSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 158155acc8fcSmrg -e 's|__xservername__|Xorg|g' \ 158255acc8fcSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 158355acc8fcSmrg -e 's|__projectroot__|\$(prefix)|g' \ 158455acc8fcSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 158555acc8fcSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 158655acc8fcSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 158755acc8fcSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 158855acc8fcSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 158955acc8fcSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 159055acc8fcSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 159155acc8fcSmrgAC_SUBST([MAN_SUBSTS]) 15923da084b3Smrg 159355acc8fcSmrg]) # XORG_MANPAGE_SECTIONS 15943da084b3Smrg 159555acc8fcSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 159655acc8fcSmrg# ------------------------ 159755acc8fcSmrg# Minimum version: 1.7.0 159855acc8fcSmrg# 159955acc8fcSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 160055acc8fcSmrg# provided by xorg-sgml-doctools, if installed. 160155acc8fcSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 160255acc8fcSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 160355acc8fcSmrgXORG_SGML_PATH= 160455acc8fcSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 160555acc8fcSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 160655acc8fcSmrg [m4_ifval([$1],[:], 160755acc8fcSmrg [if test x"$cross_compiling" != x"yes" ; then 160855acc8fcSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 160955acc8fcSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 161055acc8fcSmrg fi]) 161155acc8fcSmrg ]) 16123da084b3Smrg 161355acc8fcSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 161455acc8fcSmrg# the path and the name of the doc stylesheet 161555acc8fcSmrgif test "x$XORG_SGML_PATH" != "x" ; then 161655acc8fcSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 161755acc8fcSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 161855acc8fcSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 161955acc8fcSmrgelse 162055acc8fcSmrg AC_MSG_RESULT([no]) 162155acc8fcSmrgfi 16223da084b3Smrg 162355acc8fcSmrgAC_SUBST(XORG_SGML_PATH) 162455acc8fcSmrgAC_SUBST(STYLESHEET_SRCDIR) 162555acc8fcSmrgAC_SUBST(XSL_STYLESHEET) 162655acc8fcSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 162755acc8fcSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1628d63fdb69Smrg 162955acc8fcSmrg# XORG_CHECK_LINUXDOC 163055acc8fcSmrg# ------------------- 163155acc8fcSmrg# Minimum version: 1.0.0 163255acc8fcSmrg# 163355acc8fcSmrg# Defines the variable MAKE_TEXT if the necessary tools and 163455acc8fcSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 163555acc8fcSmrg# Whether or not the necessary tools and files are found can be checked 163655acc8fcSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 163755acc8fcSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 163855acc8fcSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 163955acc8fcSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1640d63fdb69Smrg 164155acc8fcSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 16423da084b3Smrg 164355acc8fcSmrgAC_MSG_CHECKING([whether to build documentation]) 1644d63fdb69Smrg 164555acc8fcSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 164655acc8fcSmrg BUILDDOC=yes 164755acc8fcSmrgelse 164855acc8fcSmrg BUILDDOC=no 1649d63fdb69Smrgfi 16503da084b3Smrg 165155acc8fcSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 16523da084b3Smrg 165355acc8fcSmrgAC_MSG_RESULT([$BUILDDOC]) 16543da084b3Smrg 165555acc8fcSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 165655acc8fcSmrg 165755acc8fcSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 165855acc8fcSmrg BUILDPDFDOC=yes 1659d63fdb69Smrgelse 166055acc8fcSmrg BUILDPDFDOC=no 1661d63fdb69Smrgfi 16623da084b3Smrg 166355acc8fcSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1664d63fdb69Smrg 166555acc8fcSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1666d63fdb69Smrg 166755acc8fcSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 166855acc8fcSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 166955acc8fcSmrgMAKE_PDF="$PS2PDF" 167055acc8fcSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1671d63fdb69Smrg 167255acc8fcSmrgAC_SUBST(MAKE_TEXT) 167355acc8fcSmrgAC_SUBST(MAKE_PS) 167455acc8fcSmrgAC_SUBST(MAKE_PDF) 167555acc8fcSmrgAC_SUBST(MAKE_HTML) 167655acc8fcSmrg]) # XORG_CHECK_LINUXDOC 167755acc8fcSmrg 167855acc8fcSmrg# XORG_CHECK_DOCBOOK 167955acc8fcSmrg# ------------------- 168055acc8fcSmrg# Minimum version: 1.0.0 168155acc8fcSmrg# 168255acc8fcSmrg# Checks for the ability to build output formats from SGML DocBook source. 168355acc8fcSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 168455acc8fcSmrg# indicates whether the necessary tools and files are found and, if set, 168555acc8fcSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 168655acc8fcSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 168755acc8fcSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 168855acc8fcSmrg 168955acc8fcSmrgBUILDTXTDOC=no 169055acc8fcSmrgBUILDPDFDOC=no 169155acc8fcSmrgBUILDPSDOC=no 169255acc8fcSmrgBUILDHTMLDOC=no 169355acc8fcSmrg 169455acc8fcSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 169555acc8fcSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 169655acc8fcSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 169755acc8fcSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 169855acc8fcSmrg 169955acc8fcSmrgAC_MSG_CHECKING([whether to build text documentation]) 170055acc8fcSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 170155acc8fcSmrg test x$BUILD_TXTDOC != xno; then 170255acc8fcSmrg BUILDTXTDOC=yes 1703d63fdb69Smrgfi 170455acc8fcSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 170555acc8fcSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1706d63fdb69Smrg 170755acc8fcSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 170855acc8fcSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 170955acc8fcSmrg test x$BUILD_PDFDOC != xno; then 171055acc8fcSmrg BUILDPDFDOC=yes 171155acc8fcSmrgfi 171255acc8fcSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 171355acc8fcSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1714d63fdb69Smrg 171555acc8fcSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 171655acc8fcSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 171755acc8fcSmrg test x$BUILD_PSDOC != xno; then 171855acc8fcSmrg BUILDPSDOC=yes 171955acc8fcSmrgfi 172055acc8fcSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 172155acc8fcSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1722d63fdb69Smrg 172355acc8fcSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 172455acc8fcSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 172555acc8fcSmrg test x$BUILD_HTMLDOC != xno; then 172655acc8fcSmrg BUILDHTMLDOC=yes 172755acc8fcSmrgfi 172855acc8fcSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 172955acc8fcSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1730d63fdb69Smrg 173155acc8fcSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 173255acc8fcSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 173355acc8fcSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 173455acc8fcSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1735d63fdb69Smrg 173655acc8fcSmrgAC_SUBST(MAKE_TEXT) 173755acc8fcSmrgAC_SUBST(MAKE_PS) 173855acc8fcSmrgAC_SUBST(MAKE_PDF) 173955acc8fcSmrgAC_SUBST(MAKE_HTML) 174055acc8fcSmrg]) # XORG_CHECK_DOCBOOK 1741d63fdb69Smrg 174255acc8fcSmrg# XORG_WITH_XMLTO([MIN-VERSION]) 174355acc8fcSmrg# ---------------- 174455acc8fcSmrg# Minimum version: 1.5.0 174555acc8fcSmrg# 174655acc8fcSmrg# Documentation tools are not always available on all platforms and sometimes 174755acc8fcSmrg# not at the appropriate level. This macro enables a module to test for the 174855acc8fcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 174955acc8fcSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 175055acc8fcSmrg# as whether or not to use the xmlto package. 175155acc8fcSmrg# 175255acc8fcSmrg# Interface to module: 175355acc8fcSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 175455acc8fcSmrg# XMLTO: returns the path of the xmlto program found 175555acc8fcSmrg# returns the path set by the user in the environment 175655acc8fcSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 175755acc8fcSmrg# 'no' user instructs the module not to use xmlto 175855acc8fcSmrg# 175955acc8fcSmrg# Added in version 1.10.0 176055acc8fcSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 176155acc8fcSmrg# xmlto for text output requires either lynx, links, or w3m browsers 176255acc8fcSmrg# 176355acc8fcSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 176455acc8fcSmrg# 176555acc8fcSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 176655acc8fcSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 176755acc8fcSmrgAC_ARG_WITH(xmlto, 176855acc8fcSmrg AS_HELP_STRING([--with-xmlto], 176955acc8fcSmrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 177055acc8fcSmrg [use_xmlto=$withval], [use_xmlto=auto]) 177155acc8fcSmrg 177255acc8fcSmrgif test "x$use_xmlto" = x"auto"; then 177355acc8fcSmrg AC_PATH_PROG([XMLTO], [xmlto]) 177455acc8fcSmrg if test "x$XMLTO" = "x"; then 177555acc8fcSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 177655acc8fcSmrg have_xmlto=no 177755acc8fcSmrg else 177855acc8fcSmrg have_xmlto=yes 177955acc8fcSmrg fi 178055acc8fcSmrgelif test "x$use_xmlto" = x"yes" ; then 178155acc8fcSmrg AC_PATH_PROG([XMLTO], [xmlto]) 178255acc8fcSmrg if test "x$XMLTO" = "x"; then 178355acc8fcSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 178455acc8fcSmrg fi 178555acc8fcSmrg have_xmlto=yes 178655acc8fcSmrgelif test "x$use_xmlto" = x"no" ; then 178755acc8fcSmrg if test "x$XMLTO" != "x"; then 178855acc8fcSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 178955acc8fcSmrg fi 179055acc8fcSmrg have_xmlto=no 179155acc8fcSmrgelse 179255acc8fcSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 179355acc8fcSmrgfi 17943da084b3Smrg 179555acc8fcSmrg# Test for a minimum version of xmlto, if provided. 179655acc8fcSmrgm4_ifval([$1], 179755acc8fcSmrg[if test "$have_xmlto" = yes; then 179855acc8fcSmrg # scrape the xmlto version 179955acc8fcSmrg AC_MSG_CHECKING([the xmlto version]) 180055acc8fcSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 180155acc8fcSmrg AC_MSG_RESULT([$xmlto_version]) 180255acc8fcSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 180355acc8fcSmrg [if test "x$use_xmlto" = xauto; then 180455acc8fcSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 180555acc8fcSmrg have_xmlto=no 180655acc8fcSmrg else 180755acc8fcSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 180855acc8fcSmrg fi]) 180955acc8fcSmrgfi]) 18103da084b3Smrg 181155acc8fcSmrg# Test for the ability of xmlto to generate a text target 181255acc8fcSmrghave_xmlto_text=no 181355acc8fcSmrgcat > conftest.xml << "EOF" 181455acc8fcSmrgEOF 181555acc8fcSmrgAS_IF([test "$have_xmlto" = yes], 181655acc8fcSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 181755acc8fcSmrg [have_xmlto_text=yes], 181855acc8fcSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 181955acc8fcSmrgrm -f conftest.xml 182055acc8fcSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 182155acc8fcSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 182255acc8fcSmrg]) # XORG_WITH_XMLTO 182355acc8fcSmrg 182455acc8fcSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 182555acc8fcSmrg# ---------------- 182655acc8fcSmrg# Minimum version: 1.5.0 182755acc8fcSmrg# 182855acc8fcSmrg# Documentation tools are not always available on all platforms and sometimes 182955acc8fcSmrg# not at the appropriate level. This macro enables a module to test for the 183055acc8fcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 183155acc8fcSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 183255acc8fcSmrg# as whether or not to use the asciidoc package. 183355acc8fcSmrg# 183455acc8fcSmrg# Interface to module: 183555acc8fcSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 183655acc8fcSmrg# ASCIIDOC: returns the path of the asciidoc program found 183755acc8fcSmrg# returns the path set by the user in the environment 183855acc8fcSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 183955acc8fcSmrg# 'no' user instructs the module not to use asciidoc 184055acc8fcSmrg# 184155acc8fcSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 184255acc8fcSmrg# 184355acc8fcSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 184455acc8fcSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 184555acc8fcSmrgAC_ARG_WITH(asciidoc, 184655acc8fcSmrg AS_HELP_STRING([--with-asciidoc], 184755acc8fcSmrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 184855acc8fcSmrg [use_asciidoc=$withval], [use_asciidoc=auto]) 184955acc8fcSmrg 185055acc8fcSmrgif test "x$use_asciidoc" = x"auto"; then 185155acc8fcSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 185255acc8fcSmrg if test "x$ASCIIDOC" = "x"; then 185355acc8fcSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 185455acc8fcSmrg have_asciidoc=no 185555acc8fcSmrg else 185655acc8fcSmrg have_asciidoc=yes 185755acc8fcSmrg fi 185855acc8fcSmrgelif test "x$use_asciidoc" = x"yes" ; then 185955acc8fcSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 186055acc8fcSmrg if test "x$ASCIIDOC" = "x"; then 186155acc8fcSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 186255acc8fcSmrg fi 186355acc8fcSmrg have_asciidoc=yes 186455acc8fcSmrgelif test "x$use_asciidoc" = x"no" ; then 186555acc8fcSmrg if test "x$ASCIIDOC" != "x"; then 186655acc8fcSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 186755acc8fcSmrg fi 186855acc8fcSmrg have_asciidoc=no 186955acc8fcSmrgelse 187055acc8fcSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 187155acc8fcSmrgfi 187255acc8fcSmrgm4_ifval([$1], 187355acc8fcSmrg[if test "$have_asciidoc" = yes; then 187455acc8fcSmrg # scrape the asciidoc version 187555acc8fcSmrg AC_MSG_CHECKING([the asciidoc version]) 187655acc8fcSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 187755acc8fcSmrg AC_MSG_RESULT([$asciidoc_version]) 187855acc8fcSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 187955acc8fcSmrg [if test "x$use_asciidoc" = xauto; then 188055acc8fcSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 188155acc8fcSmrg have_asciidoc=no 188255acc8fcSmrg else 188355acc8fcSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 188455acc8fcSmrg fi]) 188555acc8fcSmrgfi]) 188655acc8fcSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 188755acc8fcSmrg]) # XORG_WITH_ASCIIDOC 18883da084b3Smrg 188955acc8fcSmrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 189055acc8fcSmrg# -------------------------------- 189155acc8fcSmrg# Minimum version: 1.5.0 189255acc8fcSmrg# 189355acc8fcSmrg# Documentation tools are not always available on all platforms and sometimes 189455acc8fcSmrg# not at the appropriate level. This macro enables a module to test for the 189555acc8fcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 189655acc8fcSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 189755acc8fcSmrg# as whether or not to use the doxygen package. 189855acc8fcSmrg# 189955acc8fcSmrg# Interface to module: 190055acc8fcSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 190155acc8fcSmrg# DOXYGEN: returns the path of the doxygen program found 190255acc8fcSmrg# returns the path set by the user in the environment 190355acc8fcSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 190455acc8fcSmrg# 'no' user instructs the module not to use doxygen 190555acc8fcSmrg# 190655acc8fcSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 190755acc8fcSmrg# 190855acc8fcSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 190955acc8fcSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 191055acc8fcSmrgAC_ARG_WITH(doxygen, 191155acc8fcSmrg AS_HELP_STRING([--with-doxygen], 191255acc8fcSmrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 191355acc8fcSmrg [use_doxygen=$withval], [use_doxygen=auto]) 191455acc8fcSmrg 191555acc8fcSmrgif test "x$use_doxygen" = x"auto"; then 191655acc8fcSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 191755acc8fcSmrg if test "x$DOXYGEN" = "x"; then 191855acc8fcSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 191955acc8fcSmrg have_doxygen=no 192055acc8fcSmrg else 192155acc8fcSmrg have_doxygen=yes 192255acc8fcSmrg fi 192355acc8fcSmrgelif test "x$use_doxygen" = x"yes" ; then 192455acc8fcSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 192555acc8fcSmrg if test "x$DOXYGEN" = "x"; then 192655acc8fcSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 192755acc8fcSmrg fi 192855acc8fcSmrg have_doxygen=yes 192955acc8fcSmrgelif test "x$use_doxygen" = x"no" ; then 193055acc8fcSmrg if test "x$DOXYGEN" != "x"; then 193155acc8fcSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 193255acc8fcSmrg fi 193355acc8fcSmrg have_doxygen=no 193455acc8fcSmrgelse 193555acc8fcSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 193655acc8fcSmrgfi 193755acc8fcSmrgm4_ifval([$1], 193855acc8fcSmrg[if test "$have_doxygen" = yes; then 193955acc8fcSmrg # scrape the doxygen version 194055acc8fcSmrg AC_MSG_CHECKING([the doxygen version]) 194155acc8fcSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 194255acc8fcSmrg AC_MSG_RESULT([$doxygen_version]) 194355acc8fcSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 194455acc8fcSmrg [if test "x$use_doxygen" = xauto; then 194555acc8fcSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 194655acc8fcSmrg have_doxygen=no 194755acc8fcSmrg else 194855acc8fcSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 194955acc8fcSmrg fi]) 195055acc8fcSmrgfi]) 195155acc8fcSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 195255acc8fcSmrg]) # XORG_WITH_DOXYGEN 19533da084b3Smrg 195455acc8fcSmrg# XORG_WITH_GROFF 195555acc8fcSmrg# ---------------- 195655acc8fcSmrg# Minimum version: 1.6.0 195755acc8fcSmrg# 195855acc8fcSmrg# Documentation tools are not always available on all platforms and sometimes 195955acc8fcSmrg# not at the appropriate level. This macro enables a module to test for the 196055acc8fcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 196155acc8fcSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 196255acc8fcSmrg# as whether or not to use the groff package. 196355acc8fcSmrg# 196455acc8fcSmrg# Interface to module: 196555acc8fcSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 196655acc8fcSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 196755acc8fcSmrg# HAVE_GROFF_MS: the -ms macros package 196855acc8fcSmrg# GROFF: returns the path of the groff program found 196955acc8fcSmrg# returns the path set by the user in the environment 197055acc8fcSmrg# --with-groff: 'yes' user instructs the module to use groff 197155acc8fcSmrg# 'no' user instructs the module not to use groff 197255acc8fcSmrg# 197355acc8fcSmrg# Added in version 1.9.0: 197455acc8fcSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 197555acc8fcSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 197655acc8fcSmrg# psselect from the psutils package. 197755acc8fcSmrg# the ghostcript package. Refer to the grohtml man pages 197855acc8fcSmrg# 197955acc8fcSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 198055acc8fcSmrg# 198155acc8fcSmrg# OS and distros often splits groff in a basic and full package, the former 198255acc8fcSmrg# having the groff program and the later having devices, fonts and macros 198355acc8fcSmrg# Checking for the groff executable is not enough. 198455acc8fcSmrg# 198555acc8fcSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 198655acc8fcSmrg# unset HAVE_GROFF or GROFF env variables. 198755acc8fcSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 198855acc8fcSmrg# 198955acc8fcSmrgAC_DEFUN([XORG_WITH_GROFF],[ 199055acc8fcSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 199155acc8fcSmrgAC_ARG_WITH(groff, 199255acc8fcSmrg AS_HELP_STRING([--with-groff], 199355acc8fcSmrg [Use groff to regenerate documentation (default: yes, if installed)]), 199455acc8fcSmrg [use_groff=$withval], [use_groff=auto]) 199555acc8fcSmrg 199655acc8fcSmrgif test "x$use_groff" = x"auto"; then 199755acc8fcSmrg AC_PATH_PROG([GROFF], [groff]) 199855acc8fcSmrg if test "x$GROFF" = "x"; then 199955acc8fcSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 200055acc8fcSmrg have_groff=no 200155acc8fcSmrg else 200255acc8fcSmrg have_groff=yes 200355acc8fcSmrg fi 200455acc8fcSmrgelif test "x$use_groff" = x"yes" ; then 200555acc8fcSmrg AC_PATH_PROG([GROFF], [groff]) 200655acc8fcSmrg if test "x$GROFF" = "x"; then 200755acc8fcSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 200855acc8fcSmrg fi 200955acc8fcSmrg have_groff=yes 201055acc8fcSmrgelif test "x$use_groff" = x"no" ; then 201155acc8fcSmrg if test "x$GROFF" != "x"; then 201255acc8fcSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 201355acc8fcSmrg fi 201455acc8fcSmrg have_groff=no 201555acc8fcSmrgelse 201655acc8fcSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 201755acc8fcSmrgfi 201855acc8fcSmrg 201955acc8fcSmrg# We have groff, test for the presence of the macro packages 202055acc8fcSmrgif test "x$have_groff" = x"yes"; then 202155acc8fcSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 202255acc8fcSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 202355acc8fcSmrg groff_ms_works=yes 2024d63fdb69Smrg else 202555acc8fcSmrg groff_ms_works=no 2026d63fdb69Smrg fi 202755acc8fcSmrg AC_MSG_RESULT([$groff_ms_works]) 202855acc8fcSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 202955acc8fcSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 203055acc8fcSmrg groff_mm_works=yes 2031d63fdb69Smrg else 203255acc8fcSmrg groff_mm_works=no 2033d63fdb69Smrg fi 203455acc8fcSmrg AC_MSG_RESULT([$groff_mm_works]) 2035d63fdb69Smrgfi 20363da084b3Smrg 203755acc8fcSmrg# We have groff, test for HTML dependencies, one command per package 203855acc8fcSmrgif test "x$have_groff" = x"yes"; then 203955acc8fcSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 204055acc8fcSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 204155acc8fcSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 204255acc8fcSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 204355acc8fcSmrg have_groff_html=yes 204455acc8fcSmrg else 204555acc8fcSmrg have_groff_html=no 204655acc8fcSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 204755acc8fcSmrg fi 204855acc8fcSmrgfi 20493da084b3Smrg 205055acc8fcSmrg# Set Automake conditionals for Makefiles 205155acc8fcSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 205255acc8fcSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 205355acc8fcSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 205455acc8fcSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 205555acc8fcSmrg]) # XORG_WITH_GROFF 20563da084b3Smrg 205755acc8fcSmrg# XORG_WITH_FOP 2058d63fdb69Smrg# ---------------- 205955acc8fcSmrg# Minimum version: 1.6.0 206055acc8fcSmrg# 206155acc8fcSmrg# Documentation tools are not always available on all platforms and sometimes 206255acc8fcSmrg# not at the appropriate level. This macro enables a module to test for the 206355acc8fcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 206455acc8fcSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 206555acc8fcSmrg# as whether or not to use the fop package. 206655acc8fcSmrg# 206755acc8fcSmrg# Interface to module: 206855acc8fcSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 206955acc8fcSmrg# FOP: returns the path of the fop program found 207055acc8fcSmrg# returns the path set by the user in the environment 207155acc8fcSmrg# --with-fop: 'yes' user instructs the module to use fop 207255acc8fcSmrg# 'no' user instructs the module not to use fop 207355acc8fcSmrg# 207455acc8fcSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 207555acc8fcSmrg# 207655acc8fcSmrgAC_DEFUN([XORG_WITH_FOP],[ 207755acc8fcSmrgAC_ARG_VAR([FOP], [Path to fop command]) 207855acc8fcSmrgAC_ARG_WITH(fop, 207955acc8fcSmrg AS_HELP_STRING([--with-fop], 208055acc8fcSmrg [Use fop to regenerate documentation (default: yes, if installed)]), 208155acc8fcSmrg [use_fop=$withval], [use_fop=auto]) 208255acc8fcSmrg 208355acc8fcSmrgif test "x$use_fop" = x"auto"; then 208455acc8fcSmrg AC_PATH_PROG([FOP], [fop]) 208555acc8fcSmrg if test "x$FOP" = "x"; then 208655acc8fcSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 208755acc8fcSmrg have_fop=no 208855acc8fcSmrg else 208955acc8fcSmrg have_fop=yes 209055acc8fcSmrg fi 209155acc8fcSmrgelif test "x$use_fop" = x"yes" ; then 209255acc8fcSmrg AC_PATH_PROG([FOP], [fop]) 209355acc8fcSmrg if test "x$FOP" = "x"; then 209455acc8fcSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 209555acc8fcSmrg fi 209655acc8fcSmrg have_fop=yes 209755acc8fcSmrgelif test "x$use_fop" = x"no" ; then 209855acc8fcSmrg if test "x$FOP" != "x"; then 209955acc8fcSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 210055acc8fcSmrg fi 210155acc8fcSmrg have_fop=no 210255acc8fcSmrgelse 210355acc8fcSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 210455acc8fcSmrgfi 210555acc8fcSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 210655acc8fcSmrg]) # XORG_WITH_FOP 21073da084b3Smrg 210855acc8fcSmrg# XORG_WITH_PS2PDF 210955acc8fcSmrg# ---------------- 211055acc8fcSmrg# Minimum version: 1.6.0 211155acc8fcSmrg# 211255acc8fcSmrg# Documentation tools are not always available on all platforms and sometimes 211355acc8fcSmrg# not at the appropriate level. This macro enables a module to test for the 211455acc8fcSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 211555acc8fcSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 211655acc8fcSmrg# as whether or not to use the ps2pdf package. 211755acc8fcSmrg# 211855acc8fcSmrg# Interface to module: 211955acc8fcSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 212055acc8fcSmrg# PS2PDF: returns the path of the ps2pdf program found 212155acc8fcSmrg# returns the path set by the user in the environment 212255acc8fcSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 212355acc8fcSmrg# 'no' user instructs the module not to use ps2pdf 212455acc8fcSmrg# 212555acc8fcSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 212655acc8fcSmrg# 212755acc8fcSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 212855acc8fcSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 212955acc8fcSmrgAC_ARG_WITH(ps2pdf, 213055acc8fcSmrg AS_HELP_STRING([--with-ps2pdf], 213155acc8fcSmrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 213255acc8fcSmrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 213355acc8fcSmrg 213455acc8fcSmrgif test "x$use_ps2pdf" = x"auto"; then 213555acc8fcSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 213655acc8fcSmrg if test "x$PS2PDF" = "x"; then 213755acc8fcSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 213855acc8fcSmrg have_ps2pdf=no 213955acc8fcSmrg else 214055acc8fcSmrg have_ps2pdf=yes 214155acc8fcSmrg fi 214255acc8fcSmrgelif test "x$use_ps2pdf" = x"yes" ; then 214355acc8fcSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 214455acc8fcSmrg if test "x$PS2PDF" = "x"; then 214555acc8fcSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 214655acc8fcSmrg fi 214755acc8fcSmrg have_ps2pdf=yes 214855acc8fcSmrgelif test "x$use_ps2pdf" = x"no" ; then 214955acc8fcSmrg if test "x$PS2PDF" != "x"; then 215055acc8fcSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 215155acc8fcSmrg fi 215255acc8fcSmrg have_ps2pdf=no 2153d63fdb69Smrgelse 215455acc8fcSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 215555acc8fcSmrgfi 215655acc8fcSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 215755acc8fcSmrg]) # XORG_WITH_PS2PDF 21583da084b3Smrg 215955acc8fcSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 216055acc8fcSmrg# ---------------- 216155acc8fcSmrg# Minimum version: 1.6.0 216255acc8fcSmrg# 216355acc8fcSmrg# Documentation tools are not always available on all platforms and sometimes 216455acc8fcSmrg# not at the appropriate level. This macro enables a builder to skip all 216555acc8fcSmrg# documentation targets except traditional man pages. 216655acc8fcSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 216755acc8fcSmrg# maximum flexibilty in controlling documentation building. 216855acc8fcSmrg# Refer to: 216955acc8fcSmrg# XORG_WITH_XMLTO --with-xmlto 217055acc8fcSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 217155acc8fcSmrg# XORG_WITH_DOXYGEN --with-doxygen 217255acc8fcSmrg# XORG_WITH_FOP --with-fop 217355acc8fcSmrg# XORG_WITH_GROFF --with-groff 217455acc8fcSmrg# XORG_WITH_PS2PDF --with-ps2pdf 217555acc8fcSmrg# 217655acc8fcSmrg# Interface to module: 217755acc8fcSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 217855acc8fcSmrg# --enable-docs: 'yes' user instructs the module to generate docs 217955acc8fcSmrg# 'no' user instructs the module not to generate docs 218055acc8fcSmrg# parm1: specify the default value, yes or no. 218155acc8fcSmrg# 218255acc8fcSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 218355acc8fcSmrgdefault=$1 218455acc8fcSmrgif test "x$default" = x ; then 218555acc8fcSmrg default="yes" 218655acc8fcSmrgfi 218755acc8fcSmrgAC_ARG_ENABLE(docs, 218855acc8fcSmrg AS_HELP_STRING([--enable-docs], 218955acc8fcSmrg [Enable building the documentation (default: yes)]), 219055acc8fcSmrg [build_docs=$enableval], [build_docs=$default]) 219155acc8fcSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 219255acc8fcSmrgAC_MSG_CHECKING([whether to build documentation]) 219355acc8fcSmrgAC_MSG_RESULT([$build_docs]) 219455acc8fcSmrg]) # XORG_ENABLE_DOCS 219555acc8fcSmrg 219655acc8fcSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 219755acc8fcSmrg# ---------------- 219855acc8fcSmrg# Minimum version: 1.6.0 219955acc8fcSmrg# 220055acc8fcSmrg# This macro enables a builder to skip all developer documentation. 220155acc8fcSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 220255acc8fcSmrg# maximum flexibilty in controlling documentation building. 220355acc8fcSmrg# Refer to: 220455acc8fcSmrg# XORG_WITH_XMLTO --with-xmlto 220555acc8fcSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 220655acc8fcSmrg# XORG_WITH_DOXYGEN --with-doxygen 220755acc8fcSmrg# XORG_WITH_FOP --with-fop 220855acc8fcSmrg# XORG_WITH_GROFF --with-groff 220955acc8fcSmrg# XORG_WITH_PS2PDF --with-ps2pdf 221055acc8fcSmrg# 221155acc8fcSmrg# Interface to module: 221255acc8fcSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 221355acc8fcSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 221455acc8fcSmrg# 'no' user instructs the module not to generate developer docs 221555acc8fcSmrg# parm1: specify the default value, yes or no. 221655acc8fcSmrg# 221755acc8fcSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 221855acc8fcSmrgdevel_default=$1 221955acc8fcSmrgif test "x$devel_default" = x ; then 222055acc8fcSmrg devel_default="yes" 222155acc8fcSmrgfi 222255acc8fcSmrgAC_ARG_ENABLE(devel-docs, 222355acc8fcSmrg AS_HELP_STRING([--enable-devel-docs], 222455acc8fcSmrg [Enable building the developer documentation (default: yes)]), 222555acc8fcSmrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 222655acc8fcSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 222755acc8fcSmrgAC_MSG_CHECKING([whether to build developer documentation]) 222855acc8fcSmrgAC_MSG_RESULT([$build_devel_docs]) 222955acc8fcSmrg]) # XORG_ENABLE_DEVEL_DOCS 223055acc8fcSmrg 223155acc8fcSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 223255acc8fcSmrg# ---------------- 223355acc8fcSmrg# Minimum version: 1.6.0 223455acc8fcSmrg# 223555acc8fcSmrg# This macro enables a builder to skip all functional specification targets. 223655acc8fcSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 223755acc8fcSmrg# maximum flexibilty in controlling documentation building. 223855acc8fcSmrg# Refer to: 223955acc8fcSmrg# XORG_WITH_XMLTO --with-xmlto 224055acc8fcSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 224155acc8fcSmrg# XORG_WITH_DOXYGEN --with-doxygen 224255acc8fcSmrg# XORG_WITH_FOP --with-fop 224355acc8fcSmrg# XORG_WITH_GROFF --with-groff 224455acc8fcSmrg# XORG_WITH_PS2PDF --with-ps2pdf 224555acc8fcSmrg# 224655acc8fcSmrg# Interface to module: 224755acc8fcSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 224855acc8fcSmrg# --enable-specs: 'yes' user instructs the module to generate specs 224955acc8fcSmrg# 'no' user instructs the module not to generate specs 225055acc8fcSmrg# parm1: specify the default value, yes or no. 225155acc8fcSmrg# 225255acc8fcSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 225355acc8fcSmrgspec_default=$1 225455acc8fcSmrgif test "x$spec_default" = x ; then 225555acc8fcSmrg spec_default="yes" 225655acc8fcSmrgfi 225755acc8fcSmrgAC_ARG_ENABLE(specs, 225855acc8fcSmrg AS_HELP_STRING([--enable-specs], 225955acc8fcSmrg [Enable building the specs (default: yes)]), 226055acc8fcSmrg [build_specs=$enableval], [build_specs=$spec_default]) 226155acc8fcSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 226255acc8fcSmrgAC_MSG_CHECKING([whether to build functional specifications]) 226355acc8fcSmrgAC_MSG_RESULT([$build_specs]) 226455acc8fcSmrg]) # XORG_ENABLE_SPECS 22653da084b3Smrg 226655acc8fcSmrg# XORG_CHECK_MALLOC_ZERO 226755acc8fcSmrg# ---------------------- 226855acc8fcSmrg# Minimum version: 1.0.0 226955acc8fcSmrg# 227055acc8fcSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 227155acc8fcSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 227255acc8fcSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 227355acc8fcSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 227455acc8fcSmrgAC_ARG_ENABLE(malloc0returnsnull, 227555acc8fcSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 227655acc8fcSmrg [malloc(0) returns NULL (default: auto)]), 227755acc8fcSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 227855acc8fcSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 22793da084b3Smrg 228055acc8fcSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 228155acc8fcSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 228255acc8fcSmrg AC_RUN_IFELSE([ 228355acc8fcSmrgchar *malloc(); 228455acc8fcSmrgchar *realloc(); 228555acc8fcSmrgchar *calloc(); 228655acc8fcSmrgmain() { 228755acc8fcSmrg char *m0, *r0, *c0, *p; 228855acc8fcSmrg m0 = malloc(0); 228955acc8fcSmrg p = malloc(10); 229055acc8fcSmrg r0 = realloc(p,0); 229155acc8fcSmrg c0 = calloc(0); 229255acc8fcSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 229355acc8fcSmrg}], 229455acc8fcSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 229555acc8fcSmrg [MALLOC_ZERO_RETURNS_NULL=no], 229655acc8fcSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 229755acc8fcSmrgfi 229855acc8fcSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 22993da084b3Smrg 230055acc8fcSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 230155acc8fcSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 230255acc8fcSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 230355acc8fcSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 230455acc8fcSmrgelse 230555acc8fcSmrg MALLOC_ZERO_CFLAGS="" 230655acc8fcSmrg XMALLOC_ZERO_CFLAGS="" 230755acc8fcSmrg XTMALLOC_ZERO_CFLAGS="" 230855acc8fcSmrgfi 23093da084b3Smrg 231055acc8fcSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 231155acc8fcSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 231255acc8fcSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 231355acc8fcSmrg]) # XORG_CHECK_MALLOC_ZERO 23143da084b3Smrg 231555acc8fcSmrg# XORG_WITH_LINT() 231655acc8fcSmrg# ---------------- 231755acc8fcSmrg# Minimum version: 1.1.0 231855acc8fcSmrg# 231955acc8fcSmrg# This macro enables the use of a tool that flags some suspicious and 232055acc8fcSmrg# non-portable constructs (likely to be bugs) in C language source code. 232155acc8fcSmrg# It will attempt to locate the tool and use appropriate options. 232255acc8fcSmrg# There are various lint type tools on different platforms. 232355acc8fcSmrg# 232455acc8fcSmrg# Interface to module: 232555acc8fcSmrg# LINT: returns the path to the tool found on the platform 232655acc8fcSmrg# or the value set to LINT on the configure cmd line 232755acc8fcSmrg# also an Automake conditional 232855acc8fcSmrg# LINT_FLAGS: an Automake variable with appropriate flags 232955acc8fcSmrg# 233055acc8fcSmrg# --with-lint: 'yes' user instructs the module to use lint 233155acc8fcSmrg# 'no' user instructs the module not to use lint (default) 233255acc8fcSmrg# 233355acc8fcSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 233455acc8fcSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 233555acc8fcSmrg# 233655acc8fcSmrgAC_DEFUN([XORG_WITH_LINT],[ 23373da084b3Smrg 233855acc8fcSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 233955acc8fcSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 234055acc8fcSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 234155acc8fcSmrg [Use a lint-style source code checker (default: disabled)])], 234255acc8fcSmrg [use_lint=$withval], [use_lint=no]) 23433da084b3Smrg 234455acc8fcSmrg# Obtain platform specific info like program name and options 234555acc8fcSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 234655acc8fcSmrgcase $host_os in 234755acc8fcSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 234855acc8fcSmrg lint_name=splint 234955acc8fcSmrg lint_options="-badflag" 235055acc8fcSmrg ;; 235155acc8fcSmrg *freebsd* | *netbsd*) 235255acc8fcSmrg lint_name=lint 235355acc8fcSmrg lint_options="-u -b" 235455acc8fcSmrg ;; 235555acc8fcSmrg *solaris*) 235655acc8fcSmrg lint_name=lint 235755acc8fcSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 235855acc8fcSmrg ;; 235955acc8fcSmrgesac 23603da084b3Smrg 236155acc8fcSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 236255acc8fcSmrgif test "x$use_lint" = x"yes" ; then 236355acc8fcSmrg AC_PATH_PROG([LINT], [$lint_name]) 236455acc8fcSmrg if test "x$LINT" = "x"; then 236555acc8fcSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 236655acc8fcSmrg fi 236755acc8fcSmrgelif test "x$use_lint" = x"no" ; then 236855acc8fcSmrg if test "x$LINT" != "x"; then 236955acc8fcSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 237055acc8fcSmrg fi 2371d63fdb69Smrgelse 237255acc8fcSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 237355acc8fcSmrgfi 23743da084b3Smrg 237555acc8fcSmrg# User supplied flags override default flags 237655acc8fcSmrgif test "x$LINT_FLAGS" != "x"; then 237755acc8fcSmrg lint_options=$LINT_FLAGS 237855acc8fcSmrgfi 23793da084b3Smrg 238055acc8fcSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 238155acc8fcSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 23823da084b3Smrg 238355acc8fcSmrg]) # XORG_WITH_LINT 23843da084b3Smrg 238555acc8fcSmrg# XORG_LINT_LIBRARY(LIBNAME) 238655acc8fcSmrg# -------------------------- 238755acc8fcSmrg# Minimum version: 1.1.0 238855acc8fcSmrg# 238955acc8fcSmrg# Sets up flags for building lint libraries for checking programs that call 239055acc8fcSmrg# functions in the library. 239155acc8fcSmrg# 239255acc8fcSmrg# Interface to module: 239355acc8fcSmrg# LINTLIB - Automake variable with the name of lint library file to make 239455acc8fcSmrg# MAKE_LINT_LIB - Automake conditional 239555acc8fcSmrg# 239655acc8fcSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 239755acc8fcSmrg# - 'no' user instructs the module not to create a lint library (default) 23983da084b3Smrg 239955acc8fcSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 240055acc8fcSmrgAC_REQUIRE([XORG_WITH_LINT]) 240155acc8fcSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 240255acc8fcSmrg [Create lint library (default: disabled)])], 240355acc8fcSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 24043da084b3Smrg 240555acc8fcSmrgif test "x$make_lint_lib" = x"yes" ; then 240655acc8fcSmrg LINTLIB=llib-l$1.ln 240755acc8fcSmrg if test "x$LINT" = "x"; then 240855acc8fcSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 240955acc8fcSmrg fi 241055acc8fcSmrgelif test "x$make_lint_lib" != x"no" ; then 241155acc8fcSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 241255acc8fcSmrgfi 24133da084b3Smrg 241455acc8fcSmrgAC_SUBST(LINTLIB) 241555acc8fcSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 24163da084b3Smrg 241755acc8fcSmrg]) # XORG_LINT_LIBRARY 24183da084b3Smrg 241955acc8fcSmrg# XORG_CWARNFLAGS 242055acc8fcSmrg# --------------- 242155acc8fcSmrg# Minimum version: 1.2.0 242255acc8fcSmrg# 242355acc8fcSmrg# Defines CWARNFLAGS to enable C compiler warnings. 242455acc8fcSmrg# 242555acc8fcSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 242655acc8fcSmrgAC_REQUIRE([AC_PROG_CC_C99]) 242755acc8fcSmrgif test "x$GCC" = xyes ; then 242855acc8fcSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 242955acc8fcSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 243055acc8fcSmrg-Wbad-function-cast -Wformat=2" 243155acc8fcSmrg case `$CC -dumpversion` in 243255acc8fcSmrg 3.4.* | 4.*) 243355acc8fcSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 243455acc8fcSmrg ;; 243555acc8fcSmrg esac 243655acc8fcSmrgelse 243755acc8fcSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 243855acc8fcSmrg if test "x$SUNCC" = "xyes"; then 243955acc8fcSmrg CWARNFLAGS="-v" 24403da084b3Smrg fi 2441d63fdb69Smrgfi 244255acc8fcSmrgAC_SUBST(CWARNFLAGS) 244355acc8fcSmrg]) # XORG_CWARNFLAGS 24443da084b3Smrg 244555acc8fcSmrg# XORG_STRICT_OPTION 244655acc8fcSmrg# ----------------------- 244755acc8fcSmrg# Minimum version: 1.3.0 244855acc8fcSmrg# 244955acc8fcSmrg# Add configure option to enable strict compilation 245055acc8fcSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 245155acc8fcSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 245255acc8fcSmrgAC_REQUIRE([AC_PROG_CC_C99]) 245355acc8fcSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 245455acc8fcSmrg 245555acc8fcSmrgAC_ARG_ENABLE(strict-compilation, 245655acc8fcSmrg AS_HELP_STRING([--enable-strict-compilation], 245755acc8fcSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 245855acc8fcSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 245955acc8fcSmrgif test "x$STRICT_COMPILE" = "xyes"; then 246055acc8fcSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 246155acc8fcSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 246255acc8fcSmrg if test "x$GCC" = xyes ; then 246355acc8fcSmrg STRICT_CFLAGS="-pedantic -Werror" 246455acc8fcSmrg elif test "x$SUNCC" = "xyes"; then 246555acc8fcSmrg STRICT_CFLAGS="-errwarn" 246655acc8fcSmrg elif test "x$INTELCC" = "xyes"; then 246755acc8fcSmrg STRICT_CFLAGS="-Werror" 246855acc8fcSmrg fi 246955acc8fcSmrgfi 247055acc8fcSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 247155acc8fcSmrgAC_SUBST([CWARNFLAGS]) 247255acc8fcSmrg]) # XORG_STRICT_OPTION 24733da084b3Smrg 247455acc8fcSmrg# XORG_DEFAULT_OPTIONS 247555acc8fcSmrg# -------------------- 247655acc8fcSmrg# Minimum version: 1.3.0 247755acc8fcSmrg# 247855acc8fcSmrg# Defines default options for X.Org modules. 247955acc8fcSmrg# 248055acc8fcSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 248155acc8fcSmrgAC_REQUIRE([AC_PROG_INSTALL]) 248255acc8fcSmrgXORG_CWARNFLAGS 248355acc8fcSmrgXORG_STRICT_OPTION 248455acc8fcSmrgXORG_RELEASE_VERSION 248555acc8fcSmrgXORG_CHANGELOG 248655acc8fcSmrgXORG_INSTALL 248755acc8fcSmrgXORG_MANPAGE_SECTIONS 248855acc8fcSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 248955acc8fcSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 249055acc8fcSmrg]) # XORG_DEFAULT_OPTIONS 249155acc8fcSmrg 249255acc8fcSmrg# XORG_INSTALL() 249355acc8fcSmrg# ---------------- 249455acc8fcSmrg# Minimum version: 1.4.0 249555acc8fcSmrg# 249655acc8fcSmrg# Defines the variable INSTALL_CMD as the command to copy 249755acc8fcSmrg# INSTALL from $prefix/share/util-macros. 249855acc8fcSmrg# 249955acc8fcSmrgAC_DEFUN([XORG_INSTALL], [ 250055acc8fcSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 250155acc8fcSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 250255acc8fcSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 250355acc8fcSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 250455acc8fcSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 250555acc8fcSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 250655acc8fcSmrgAC_SUBST([INSTALL_CMD]) 250755acc8fcSmrg]) # XORG_INSTALL 250855acc8fcSmrgdnl Copyright 2005 Red Hat, Inc 250955acc8fcSmrgdnl 251055acc8fcSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 251155acc8fcSmrgdnl documentation for any purpose is hereby granted without fee, provided that 251255acc8fcSmrgdnl the above copyright notice appear in all copies and that both that 251355acc8fcSmrgdnl copyright notice and this permission notice appear in supporting 251455acc8fcSmrgdnl documentation. 251555acc8fcSmrgdnl 251655acc8fcSmrgdnl The above copyright notice and this permission notice shall be included 251755acc8fcSmrgdnl in all copies or substantial portions of the Software. 251855acc8fcSmrgdnl 251955acc8fcSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 252055acc8fcSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 252155acc8fcSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 252255acc8fcSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 252355acc8fcSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 252455acc8fcSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 252555acc8fcSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 252655acc8fcSmrgdnl 252755acc8fcSmrgdnl Except as contained in this notice, the name of the copyright holders shall 252855acc8fcSmrgdnl not be used in advertising or otherwise to promote the sale, use or 252955acc8fcSmrgdnl other dealings in this Software without prior written authorization 253055acc8fcSmrgdnl from the copyright holders. 253155acc8fcSmrgdnl 25323da084b3Smrg 253355acc8fcSmrg# XORG_RELEASE_VERSION 253455acc8fcSmrg# -------------------- 253555acc8fcSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 253655acc8fcSmrg 253755acc8fcSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 253855acc8fcSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 253955acc8fcSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 254055acc8fcSmrg [Major version of this package]) 254155acc8fcSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 254255acc8fcSmrg if test "x$PVM" = "x"; then 254355acc8fcSmrg PVM="0" 254455acc8fcSmrg fi 254555acc8fcSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 254655acc8fcSmrg [$PVM], 254755acc8fcSmrg [Minor version of this package]) 254855acc8fcSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 254955acc8fcSmrg if test "x$PVP" = "x"; then 255055acc8fcSmrg PVP="0" 255155acc8fcSmrg fi 255255acc8fcSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 255355acc8fcSmrg [$PVP], 255455acc8fcSmrg [Patch version of this package]) 2555d63fdb69Smrg]) 25563da084b3Smrg 255755acc8fcSmrg# XORG_CHANGELOG() 255855acc8fcSmrg# ---------------- 255955acc8fcSmrg# Minimum version: 1.2.0 256055acc8fcSmrg# 256155acc8fcSmrg# Defines the variable CHANGELOG_CMD as the command to generate 256255acc8fcSmrg# ChangeLog from git. 256355acc8fcSmrg# 256455acc8fcSmrg# 256555acc8fcSmrgAC_DEFUN([XORG_CHANGELOG], [ 256655acc8fcSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 256755acc8fcSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 256855acc8fcSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 256955acc8fcSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 257055acc8fcSmrgAC_SUBST([CHANGELOG_CMD]) 257155acc8fcSmrg]) # XORG_CHANGELOG 25723da084b3Smrg 257355acc8fcSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 257455acc8fcSmrg# 257555acc8fcSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 257655acc8fcSmrg# 257755acc8fcSmrg# This program is free software; you can redistribute it and/or modify 257855acc8fcSmrg# it under the terms of the GNU General Public License as published by 257955acc8fcSmrg# the Free Software Foundation; either version 2 of the License, or 258055acc8fcSmrg# (at your option) any later version. 258155acc8fcSmrg# 258255acc8fcSmrg# This program is distributed in the hope that it will be useful, but 258355acc8fcSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 258455acc8fcSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 258555acc8fcSmrg# General Public License for more details. 258655acc8fcSmrg# 258755acc8fcSmrg# You should have received a copy of the GNU General Public License 258855acc8fcSmrg# along with this program; if not, write to the Free Software 258955acc8fcSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 259055acc8fcSmrg# 259155acc8fcSmrg# As a special exception to the GNU General Public License, if you 259255acc8fcSmrg# distribute this file as part of a program that contains a 259355acc8fcSmrg# configuration script generated by Autoconf, you may include it under 259455acc8fcSmrg# the same distribution terms that you use for the rest of that program. 25953da084b3Smrg 259655acc8fcSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 259755acc8fcSmrg# ---------------------------------- 259855acc8fcSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 259955acc8fcSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 260055acc8fcSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 260155acc8fcSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 260255acc8fcSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 260355acc8fcSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 2604d63fdb69Smrgfi 260555acc8fcSmrgif test -n "$PKG_CONFIG"; then 260655acc8fcSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 260755acc8fcSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 260855acc8fcSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 260955acc8fcSmrg AC_MSG_RESULT([yes]) 261055acc8fcSmrg else 261155acc8fcSmrg AC_MSG_RESULT([no]) 261255acc8fcSmrg PKG_CONFIG="" 261355acc8fcSmrg fi 261455acc8fcSmrg 261555acc8fcSmrgfi[]dnl 261655acc8fcSmrg])# PKG_PROG_PKG_CONFIG 26173da084b3Smrg 261855acc8fcSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 261955acc8fcSmrg# 262055acc8fcSmrg# Check to see whether a particular set of modules exists. Similar 262155acc8fcSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 262255acc8fcSmrg# 262355acc8fcSmrg# 262455acc8fcSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 262555acc8fcSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 262655acc8fcSmrg# PKG_CHECK_EXISTS manually 262755acc8fcSmrg# -------------------------------------------------------------- 262855acc8fcSmrgAC_DEFUN([PKG_CHECK_EXISTS], 262955acc8fcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 263055acc8fcSmrgif test -n "$PKG_CONFIG" && \ 263155acc8fcSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 263255acc8fcSmrg m4_ifval([$2], [$2], [:]) 263355acc8fcSmrgm4_ifvaln([$3], [else 263455acc8fcSmrg $3])dnl 263555acc8fcSmrgfi]) 26363da084b3Smrg 26373da084b3Smrg 263855acc8fcSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 263955acc8fcSmrg# --------------------------------------------- 264055acc8fcSmrgm4_define([_PKG_CONFIG], 264155acc8fcSmrg[if test -n "$$1"; then 264255acc8fcSmrg pkg_cv_[]$1="$$1" 264355acc8fcSmrg elif test -n "$PKG_CONFIG"; then 264455acc8fcSmrg PKG_CHECK_EXISTS([$3], 264555acc8fcSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 264655acc8fcSmrg [pkg_failed=yes]) 264755acc8fcSmrg else 264855acc8fcSmrg pkg_failed=untried 264955acc8fcSmrgfi[]dnl 265055acc8fcSmrg])# _PKG_CONFIG 2651d63fdb69Smrg 265255acc8fcSmrg# _PKG_SHORT_ERRORS_SUPPORTED 265355acc8fcSmrg# ----------------------------- 265455acc8fcSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 265555acc8fcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 265655acc8fcSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 265755acc8fcSmrg _pkg_short_errors_supported=yes 2658d63fdb69Smrgelse 265955acc8fcSmrg _pkg_short_errors_supported=no 266055acc8fcSmrgfi[]dnl 266155acc8fcSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 26623da084b3Smrg 26633da084b3Smrg 266455acc8fcSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 266555acc8fcSmrg# [ACTION-IF-NOT-FOUND]) 266655acc8fcSmrg# 266755acc8fcSmrg# 266855acc8fcSmrg# Note that if there is a possibility the first call to 266955acc8fcSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 267055acc8fcSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 267155acc8fcSmrg# 267255acc8fcSmrg# 267355acc8fcSmrg# -------------------------------------------------------------- 267455acc8fcSmrgAC_DEFUN([PKG_CHECK_MODULES], 267555acc8fcSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 267655acc8fcSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 267755acc8fcSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 2678d63fdb69Smrg 267955acc8fcSmrgpkg_failed=no 268055acc8fcSmrgAC_MSG_CHECKING([for $1]) 26813da084b3Smrg 268255acc8fcSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 268355acc8fcSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 26843da084b3Smrg 268555acc8fcSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 268655acc8fcSmrgand $1[]_LIBS to avoid the need to call pkg-config. 268755acc8fcSmrgSee the pkg-config man page for more details.]) 26883da084b3Smrg 268955acc8fcSmrgif test $pkg_failed = yes; then 269055acc8fcSmrg _PKG_SHORT_ERRORS_SUPPORTED 269155acc8fcSmrg if test $_pkg_short_errors_supported = yes; then 269255acc8fcSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 269355acc8fcSmrg else 269455acc8fcSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 269555acc8fcSmrg fi 269655acc8fcSmrg # Put the nasty error message in config.log where it belongs 269755acc8fcSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 26983da084b3Smrg 269955acc8fcSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 270055acc8fcSmrg[Package requirements ($2) were not met: 27013da084b3Smrg 270255acc8fcSmrg$$1_PKG_ERRORS 27033da084b3Smrg 270455acc8fcSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 270555acc8fcSmrginstalled software in a non-standard prefix. 27063da084b3Smrg 270755acc8fcSmrg_PKG_TEXT 270855acc8fcSmrg])], 270955acc8fcSmrg [AC_MSG_RESULT([no]) 271055acc8fcSmrg $4]) 271155acc8fcSmrgelif test $pkg_failed = untried; then 271255acc8fcSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 271355acc8fcSmrg[The pkg-config script could not be found or is too old. Make sure it 271455acc8fcSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 271555acc8fcSmrgpath to pkg-config. 27163da084b3Smrg 271755acc8fcSmrg_PKG_TEXT 27183da084b3Smrg 271955acc8fcSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 272055acc8fcSmrg [$4]) 272155acc8fcSmrgelse 272255acc8fcSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 272355acc8fcSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 272455acc8fcSmrg AC_MSG_RESULT([yes]) 272555acc8fcSmrg ifelse([$3], , :, [$3]) 272655acc8fcSmrgfi[]dnl 272755acc8fcSmrg])# PKG_CHECK_MODULES 27283da084b3Smrg 272955acc8fcSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 273055acc8fcSmrg# 273155acc8fcSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 273255acc8fcSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 273355acc8fcSmrg# Inc. 273455acc8fcSmrg# Written by Gordon Matzigkeit, 1996 273555acc8fcSmrg# 273655acc8fcSmrg# This file is free software; the Free Software Foundation gives 273755acc8fcSmrg# unlimited permission to copy and/or distribute it, with or without 273855acc8fcSmrg# modifications, as long as this notice is preserved. 27393da084b3Smrg 274055acc8fcSmrgm4_define([_LT_COPYING], [dnl 274155acc8fcSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 274255acc8fcSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 274355acc8fcSmrg# Inc. 274455acc8fcSmrg# Written by Gordon Matzigkeit, 1996 274555acc8fcSmrg# 274655acc8fcSmrg# This file is part of GNU Libtool. 274755acc8fcSmrg# 274855acc8fcSmrg# GNU Libtool is free software; you can redistribute it and/or 274955acc8fcSmrg# modify it under the terms of the GNU General Public License as 275055acc8fcSmrg# published by the Free Software Foundation; either version 2 of 275155acc8fcSmrg# the License, or (at your option) any later version. 275255acc8fcSmrg# 275355acc8fcSmrg# As a special exception to the GNU General Public License, 275455acc8fcSmrg# if you distribute this file as part of a program or library that 275555acc8fcSmrg# is built using GNU Libtool, you may include this file under the 275655acc8fcSmrg# same distribution terms that you use for the rest of that program. 275755acc8fcSmrg# 275855acc8fcSmrg# GNU Libtool is distributed in the hope that it will be useful, 275955acc8fcSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 276055acc8fcSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 276155acc8fcSmrg# GNU General Public License for more details. 276255acc8fcSmrg# 276355acc8fcSmrg# You should have received a copy of the GNU General Public License 276455acc8fcSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 276555acc8fcSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 276655acc8fcSmrg# obtained by writing to the Free Software Foundation, Inc., 276755acc8fcSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 276855acc8fcSmrg]) 27693da084b3Smrg 277055acc8fcSmrg# serial 57 LT_INIT 2771d63fdb69Smrg 27723da084b3Smrg 277355acc8fcSmrg# LT_PREREQ(VERSION) 277455acc8fcSmrg# ------------------ 277555acc8fcSmrg# Complain and exit if this libtool version is less that VERSION. 277655acc8fcSmrgm4_defun([LT_PREREQ], 277755acc8fcSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 277855acc8fcSmrg [m4_default([$3], 277955acc8fcSmrg [m4_fatal([Libtool version $1 or higher is required], 278055acc8fcSmrg 63)])], 278155acc8fcSmrg [$2])]) 27823da084b3Smrg 27833da084b3Smrg 278455acc8fcSmrg# _LT_CHECK_BUILDDIR 278555acc8fcSmrg# ------------------ 278655acc8fcSmrg# Complain if the absolute build directory name contains unusual characters 278755acc8fcSmrgm4_defun([_LT_CHECK_BUILDDIR], 278855acc8fcSmrg[case `pwd` in 278955acc8fcSmrg *\ * | *\ *) 279055acc8fcSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 279155acc8fcSmrgesac 279255acc8fcSmrg]) 27933da084b3Smrg 27943da084b3Smrg 279555acc8fcSmrg# LT_INIT([OPTIONS]) 279655acc8fcSmrg# ------------------ 279755acc8fcSmrgAC_DEFUN([LT_INIT], 279855acc8fcSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 279955acc8fcSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 280055acc8fcSmrgAC_BEFORE([$0], [LT_LANG])dnl 280155acc8fcSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 280255acc8fcSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 280355acc8fcSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 28043da084b3Smrg 280555acc8fcSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 280655acc8fcSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 280755acc8fcSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 280855acc8fcSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 280955acc8fcSmrgdnl unless we require an AC_DEFUNed macro: 281055acc8fcSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 281155acc8fcSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 281255acc8fcSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 281355acc8fcSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 281455acc8fcSmrgm4_require([_LT_PROG_LTMAIN])dnl 28153da084b3Smrg 281655acc8fcSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 28173da084b3Smrg 281855acc8fcSmrgdnl Parse OPTIONS 281955acc8fcSmrg_LT_SET_OPTIONS([$0], [$1]) 28203da084b3Smrg 282155acc8fcSmrg# This can be used to rebuild libtool when needed 282255acc8fcSmrgLIBTOOL_DEPS="$ltmain" 28233da084b3Smrg 282455acc8fcSmrg# Always use our own libtool. 282555acc8fcSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 282655acc8fcSmrgAC_SUBST(LIBTOOL)dnl 28273da084b3Smrg 282855acc8fcSmrg_LT_SETUP 28293da084b3Smrg 283055acc8fcSmrg# Only expand once: 283155acc8fcSmrgm4_define([LT_INIT]) 283255acc8fcSmrg])# LT_INIT 28333da084b3Smrg 283455acc8fcSmrg# Old names: 283555acc8fcSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 283655acc8fcSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 283755acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 283855acc8fcSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 283955acc8fcSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 2840d63fdb69Smrg 2841d63fdb69Smrg 284255acc8fcSmrg# _LT_CC_BASENAME(CC) 284355acc8fcSmrg# ------------------- 284455acc8fcSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 284555acc8fcSmrgm4_defun([_LT_CC_BASENAME], 284655acc8fcSmrg[for cc_temp in $1""; do 284755acc8fcSmrg case $cc_temp in 284855acc8fcSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 284955acc8fcSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 285055acc8fcSmrg \-*) ;; 285155acc8fcSmrg *) break;; 285255acc8fcSmrg esac 285355acc8fcSmrgdone 285455acc8fcSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 285555acc8fcSmrg]) 2856d63fdb69Smrg 28573da084b3Smrg 285855acc8fcSmrg# _LT_FILEUTILS_DEFAULTS 285955acc8fcSmrg# ---------------------- 286055acc8fcSmrg# It is okay to use these file commands and assume they have been set 286155acc8fcSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 286255acc8fcSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 286355acc8fcSmrg[: ${CP="cp -f"} 286455acc8fcSmrg: ${MV="mv -f"} 286555acc8fcSmrg: ${RM="rm -f"} 286655acc8fcSmrg])# _LT_FILEUTILS_DEFAULTS 28673da084b3Smrg 28683da084b3Smrg 286955acc8fcSmrg# _LT_SETUP 287055acc8fcSmrg# --------- 287155acc8fcSmrgm4_defun([_LT_SETUP], 287255acc8fcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 287355acc8fcSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 287455acc8fcSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 287555acc8fcSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 28763da084b3Smrg 287755acc8fcSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 287855acc8fcSmrg_LT_DECL([], [host], [0])dnl 287955acc8fcSmrg_LT_DECL([], [host_os], [0])dnl 288055acc8fcSmrgdnl 288155acc8fcSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 288255acc8fcSmrg_LT_DECL([], [build], [0])dnl 288355acc8fcSmrg_LT_DECL([], [build_os], [0])dnl 288455acc8fcSmrgdnl 288555acc8fcSmrgAC_REQUIRE([AC_PROG_CC])dnl 288655acc8fcSmrgAC_REQUIRE([LT_PATH_LD])dnl 288755acc8fcSmrgAC_REQUIRE([LT_PATH_NM])dnl 288855acc8fcSmrgdnl 288955acc8fcSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 289055acc8fcSmrgtest -z "$LN_S" && LN_S="ln -s" 289155acc8fcSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 289255acc8fcSmrgdnl 289355acc8fcSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 289455acc8fcSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 289555acc8fcSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 289655acc8fcSmrgdnl 289755acc8fcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 289855acc8fcSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 289955acc8fcSmrgm4_require([_LT_CMD_RELOAD])dnl 290055acc8fcSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 290155acc8fcSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 290255acc8fcSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 29033da084b3Smrg 290455acc8fcSmrg_LT_CONFIG_LIBTOOL_INIT([ 290555acc8fcSmrg# See if we are running on zsh, and set the options which allow our 290655acc8fcSmrg# commands through without removal of \ escapes INIT. 290755acc8fcSmrgif test -n "\${ZSH_VERSION+set}" ; then 290855acc8fcSmrg setopt NO_GLOB_SUBST 290955acc8fcSmrgfi 291055acc8fcSmrg]) 291155acc8fcSmrgif test -n "${ZSH_VERSION+set}" ; then 291255acc8fcSmrg setopt NO_GLOB_SUBST 291355acc8fcSmrgfi 29143da084b3Smrg 291555acc8fcSmrg_LT_CHECK_OBJDIR 29163da084b3Smrg 291755acc8fcSmrgm4_require([_LT_TAG_COMPILER])dnl 291855acc8fcSmrg 291955acc8fcSmrgcase $host_os in 292055acc8fcSmrgaix3*) 292155acc8fcSmrg # AIX sometimes has problems with the GCC collect2 program. For some 292255acc8fcSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 292355acc8fcSmrg # vanish in a puff of smoke. 292455acc8fcSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 292555acc8fcSmrg COLLECT_NAMES= 292655acc8fcSmrg export COLLECT_NAMES 2927d63fdb69Smrg fi 2928d63fdb69Smrg ;; 292955acc8fcSmrgesac 29303da084b3Smrg 293155acc8fcSmrg# Global variables: 293255acc8fcSmrgofile=libtool 293355acc8fcSmrgcan_build_shared=yes 29343da084b3Smrg 293555acc8fcSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 293655acc8fcSmrg# which needs '.lib'). 293755acc8fcSmrglibext=a 29383da084b3Smrg 293955acc8fcSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 29403da084b3Smrg 294155acc8fcSmrgold_CC="$CC" 294255acc8fcSmrgold_CFLAGS="$CFLAGS" 29433da084b3Smrg 294455acc8fcSmrg# Set sane defaults for various variables 294555acc8fcSmrgtest -z "$CC" && CC=cc 294655acc8fcSmrgtest -z "$LTCC" && LTCC=$CC 294755acc8fcSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 294855acc8fcSmrgtest -z "$LD" && LD=ld 294955acc8fcSmrgtest -z "$ac_objext" && ac_objext=o 29503da084b3Smrg 295155acc8fcSmrg_LT_CC_BASENAME([$compiler]) 295255acc8fcSmrg 295355acc8fcSmrg# Only perform the check for file, if the check method requires it 295455acc8fcSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 295555acc8fcSmrgcase $deplibs_check_method in 295655acc8fcSmrgfile_magic*) 295755acc8fcSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 295855acc8fcSmrg _LT_PATH_MAGIC 295955acc8fcSmrg fi 2960d63fdb69Smrg ;; 2961d63fdb69Smrgesac 29623da084b3Smrg 296355acc8fcSmrg# Use C for the default configuration in the libtool script 296455acc8fcSmrgLT_SUPPORTED_TAG([CC]) 296555acc8fcSmrg_LT_LANG_C_CONFIG 296655acc8fcSmrg_LT_LANG_DEFAULT_CONFIG 296755acc8fcSmrg_LT_CONFIG_COMMANDS 296855acc8fcSmrg])# _LT_SETUP 2969d63fdb69Smrg 2970d63fdb69Smrg 297155acc8fcSmrg# _LT_PREPARE_SED_QUOTE_VARS 2972d63fdb69Smrg# -------------------------- 297355acc8fcSmrg# Define a few sed substitution that help us do robust quoting. 297455acc8fcSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 297555acc8fcSmrg[# Backslashify metacharacters that are still active within 297655acc8fcSmrg# double-quoted strings. 297755acc8fcSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 29783da084b3Smrg 297955acc8fcSmrg# Same as above, but do not quote variable references. 298055acc8fcSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 29813da084b3Smrg 298255acc8fcSmrg# Sed substitution to delay expansion of an escaped shell variable in a 298355acc8fcSmrg# double_quote_subst'ed string. 298455acc8fcSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 29853da084b3Smrg 298655acc8fcSmrg# Sed substitution to delay expansion of an escaped single quote. 298755acc8fcSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 29883da084b3Smrg 298955acc8fcSmrg# Sed substitution to avoid accidental globbing in evaled expressions 299055acc8fcSmrgno_glob_subst='s/\*/\\\*/g' 299155acc8fcSmrg]) 29923da084b3Smrg 299355acc8fcSmrg# _LT_PROG_LTMAIN 299455acc8fcSmrg# --------------- 299555acc8fcSmrg# Note that this code is called both from `configure', and `config.status' 299655acc8fcSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 299755acc8fcSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 299855acc8fcSmrg# so we pass a copy along to make sure it has a sensible value anyway. 299955acc8fcSmrgm4_defun([_LT_PROG_LTMAIN], 300055acc8fcSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 300155acc8fcSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 300255acc8fcSmrgltmain="$ac_aux_dir/ltmain.sh" 300355acc8fcSmrg])# _LT_PROG_LTMAIN 30043da084b3Smrg 3005d63fdb69Smrg 30063da084b3Smrg 300755acc8fcSmrg# So that we can recreate a full libtool script including additional 300855acc8fcSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 300955acc8fcSmrg# in macros and then make a single call at the end using the `libtool' 301055acc8fcSmrg# label. 30113da084b3Smrg 30123da084b3Smrg 301355acc8fcSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 301455acc8fcSmrg# ---------------------------------------- 301555acc8fcSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 301655acc8fcSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 301755acc8fcSmrg[m4_ifval([$1], 301855acc8fcSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 301955acc8fcSmrg [$1 302055acc8fcSmrg])])]) 30213da084b3Smrg 302255acc8fcSmrg# Initialize. 302355acc8fcSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 30243da084b3Smrg 3025d63fdb69Smrg 302655acc8fcSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 302755acc8fcSmrg# ------------------------------ 302855acc8fcSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 302955acc8fcSmrgm4_define([_LT_CONFIG_LIBTOOL], 303055acc8fcSmrg[m4_ifval([$1], 303155acc8fcSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 303255acc8fcSmrg [$1 303355acc8fcSmrg])])]) 30343da084b3Smrg 303555acc8fcSmrg# Initialize. 303655acc8fcSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 30373da084b3Smrg 3038d63fdb69Smrg 303955acc8fcSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 304055acc8fcSmrg# ----------------------------------------------------- 304155acc8fcSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 304255acc8fcSmrg[_LT_CONFIG_LIBTOOL([$1]) 304355acc8fcSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 304455acc8fcSmrg]) 30453da084b3Smrg 30463da084b3Smrg 304755acc8fcSmrg# _LT_FORMAT_COMMENT([COMMENT]) 304855acc8fcSmrg# ----------------------------- 304955acc8fcSmrg# Add leading comment marks to the start of each line, and a trailing 305055acc8fcSmrg# full-stop to the whole comment if one is not present already. 305155acc8fcSmrgm4_define([_LT_FORMAT_COMMENT], 305255acc8fcSmrg[m4_ifval([$1], [ 305355acc8fcSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 305455acc8fcSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 305555acc8fcSmrg)]) 3056d63fdb69Smrg 3057d63fdb69Smrg 3058d63fdb69Smrg 3059d63fdb69Smrg 30603da084b3Smrg 306155acc8fcSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 306255acc8fcSmrg# ------------------------------------------------------------------- 306355acc8fcSmrg# CONFIGNAME is the name given to the value in the libtool script. 306455acc8fcSmrg# VARNAME is the (base) name used in the configure script. 306555acc8fcSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 306655acc8fcSmrg# VARNAME. Any other value will be used directly. 306755acc8fcSmrgm4_define([_LT_DECL], 306855acc8fcSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 306955acc8fcSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 307055acc8fcSmrg [m4_ifval([$1], [$1], [$2])]) 307155acc8fcSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 307255acc8fcSmrg m4_ifval([$4], 307355acc8fcSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 307455acc8fcSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 307555acc8fcSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 307655acc8fcSmrg]) 30773da084b3Smrg 30783da084b3Smrg 307955acc8fcSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 308055acc8fcSmrg# -------------------------------------------------------- 308155acc8fcSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 30823da084b3Smrg 30833da084b3Smrg 308455acc8fcSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 308555acc8fcSmrg# ------------------------------------------------ 308655acc8fcSmrgm4_define([lt_decl_tag_varnames], 308755acc8fcSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 30883da084b3Smrg 30893da084b3Smrg 309055acc8fcSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 309155acc8fcSmrg# --------------------------------------------------------- 309255acc8fcSmrgm4_define([_lt_decl_filter], 309355acc8fcSmrg[m4_case([$#], 309455acc8fcSmrg [0], [m4_fatal([$0: too few arguments: $#])], 309555acc8fcSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 309655acc8fcSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 309755acc8fcSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 309855acc8fcSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 309955acc8fcSmrg]) 31003da084b3Smrg 31013da084b3Smrg 310255acc8fcSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 310355acc8fcSmrg# -------------------------------------------------- 310455acc8fcSmrgm4_define([lt_decl_quote_varnames], 310555acc8fcSmrg[_lt_decl_filter([value], [1], $@)]) 31063da084b3Smrg 31073da084b3Smrg 310855acc8fcSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 310955acc8fcSmrg# --------------------------------------------------- 311055acc8fcSmrgm4_define([lt_decl_dquote_varnames], 311155acc8fcSmrg[_lt_decl_filter([value], [2], $@)]) 31123da084b3Smrg 3113d63fdb69Smrg 311455acc8fcSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 311555acc8fcSmrg# --------------------------------------------------- 311655acc8fcSmrgm4_define([lt_decl_varnames_tagged], 311755acc8fcSmrg[m4_assert([$# <= 2])dnl 311855acc8fcSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 311955acc8fcSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 312055acc8fcSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 312155acc8fcSmrgm4_define([_lt_decl_varnames_tagged], 312255acc8fcSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3123d63fdb69Smrg 31243da084b3Smrg 312555acc8fcSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 312655acc8fcSmrg# ------------------------------------------------ 312755acc8fcSmrgm4_define([lt_decl_all_varnames], 312855acc8fcSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 312955acc8fcSmrg m4_if([$2], [], 313055acc8fcSmrg m4_quote(lt_decl_varnames), 313155acc8fcSmrg m4_quote(m4_shift($@))))[]dnl 313255acc8fcSmrg]) 313355acc8fcSmrgm4_define([_lt_decl_all_varnames], 313455acc8fcSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 313555acc8fcSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3136d63fdb69Smrg]) 31373da084b3Smrg 31383da084b3Smrg 313955acc8fcSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 314055acc8fcSmrg# ------------------------------------ 314155acc8fcSmrg# Quote a variable value, and forward it to `config.status' so that its 314255acc8fcSmrg# declaration there will have the same value as in `configure'. VARNAME 314355acc8fcSmrg# must have a single quote delimited value for this to work. 314455acc8fcSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 314555acc8fcSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 31463da084b3Smrg 3147d63fdb69Smrg 314855acc8fcSmrg# _LT_CONFIG_STATUS_DECLARATIONS 314955acc8fcSmrg# ------------------------------ 315055acc8fcSmrg# We delimit libtool config variables with single quotes, so when 315155acc8fcSmrg# we write them to config.status, we have to be sure to quote all 315255acc8fcSmrg# embedded single quotes properly. In configure, this macro expands 315355acc8fcSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 315455acc8fcSmrg# 315555acc8fcSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 315655acc8fcSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 315755acc8fcSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 315855acc8fcSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 31593da084b3Smrg 31603da084b3Smrg 316155acc8fcSmrg# _LT_LIBTOOL_TAGS 316255acc8fcSmrg# ---------------- 316355acc8fcSmrg# Output comment and list of tags supported by the script 316455acc8fcSmrgm4_defun([_LT_LIBTOOL_TAGS], 316555acc8fcSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 316655acc8fcSmrgavailable_tags="_LT_TAGS"dnl 316755acc8fcSmrg]) 31683da084b3Smrg 31693da084b3Smrg 317055acc8fcSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 317155acc8fcSmrg# ----------------------------------- 317255acc8fcSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 317355acc8fcSmrg# expand to a commented shell variable setting: 317455acc8fcSmrg# 317555acc8fcSmrg# # Some comment about what VAR is for. 317655acc8fcSmrg# visible_name=$lt_internal_name 317755acc8fcSmrgm4_define([_LT_LIBTOOL_DECLARE], 317855acc8fcSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 317955acc8fcSmrg [description])))[]dnl 318055acc8fcSmrgm4_pushdef([_libtool_name], 318155acc8fcSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 318255acc8fcSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 318355acc8fcSmrg [0], [_libtool_name=[$]$1], 318455acc8fcSmrg [1], [_libtool_name=$lt_[]$1], 318555acc8fcSmrg [2], [_libtool_name=$lt_[]$1], 318655acc8fcSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 318755acc8fcSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 318855acc8fcSmrg]) 31893da084b3Smrg 31903da084b3Smrg 319155acc8fcSmrg# _LT_LIBTOOL_CONFIG_VARS 319255acc8fcSmrg# ----------------------- 319355acc8fcSmrg# Produce commented declarations of non-tagged libtool config variables 319455acc8fcSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 319555acc8fcSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 319655acc8fcSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 319755acc8fcSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 319855acc8fcSmrg[m4_foreach([_lt_var], 319955acc8fcSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 320055acc8fcSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 32013da084b3Smrg 32023da084b3Smrg 320355acc8fcSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 320455acc8fcSmrg# ------------------------- 320555acc8fcSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 320655acc8fcSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 320755acc8fcSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 32083da084b3Smrg 32093da084b3Smrg 321055acc8fcSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 321155acc8fcSmrg# ------------------------------ 321255acc8fcSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 32133da084b3Smrg 32143da084b3Smrg 321555acc8fcSmrg# _LT_CONFIG_COMMANDS 321655acc8fcSmrg# ------------------- 321755acc8fcSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 321855acc8fcSmrg# variables for single and double quote escaping we saved from calls 321955acc8fcSmrg# to _LT_DECL, we can put quote escaped variables declarations 322055acc8fcSmrg# into `config.status', and then the shell code to quote escape them in 322155acc8fcSmrg# for loops in `config.status'. Finally, any additional code accumulated 322255acc8fcSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 322355acc8fcSmrgm4_defun([_LT_CONFIG_COMMANDS], 322455acc8fcSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 322555acc8fcSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 322655acc8fcSmrg dnl instead of duplicating it all over again into config.status, 322755acc8fcSmrg dnl then we will have config.status run $CONFIG_LT later, so it 322855acc8fcSmrg dnl needs to know what name is stored there: 322955acc8fcSmrg [AC_CONFIG_COMMANDS([libtool], 323055acc8fcSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 323155acc8fcSmrg dnl If the libtool generation code is destined for config.status, 323255acc8fcSmrg dnl expand the accumulated commands and init code now: 323355acc8fcSmrg [AC_CONFIG_COMMANDS([libtool], 323455acc8fcSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 323555acc8fcSmrg])#_LT_CONFIG_COMMANDS 32363da084b3Smrg 32373da084b3Smrg 323855acc8fcSmrg# Initialize. 323955acc8fcSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 324055acc8fcSmrg[ 32413da084b3Smrg 324255acc8fcSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 324355acc8fcSmrg# if CDPATH is set. 324455acc8fcSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 32453da084b3Smrg 324655acc8fcSmrgsed_quote_subst='$sed_quote_subst' 324755acc8fcSmrgdouble_quote_subst='$double_quote_subst' 324855acc8fcSmrgdelay_variable_subst='$delay_variable_subst' 324955acc8fcSmrg_LT_CONFIG_STATUS_DECLARATIONS 325055acc8fcSmrgLTCC='$LTCC' 325155acc8fcSmrgLTCFLAGS='$LTCFLAGS' 325255acc8fcSmrgcompiler='$compiler_DEFAULT' 32533da084b3Smrg 325455acc8fcSmrg# A function that is used when there is no print builtin or printf. 325555acc8fcSmrgfunc_fallback_echo () 325655acc8fcSmrg{ 325755acc8fcSmrg eval 'cat <<_LTECHO_EOF 325855acc8fcSmrg\$[]1 325955acc8fcSmrg_LTECHO_EOF' 326055acc8fcSmrg} 32613da084b3Smrg 326255acc8fcSmrg# Quote evaled strings. 326355acc8fcSmrgfor var in lt_decl_all_varnames([[ \ 326455acc8fcSmrg]], lt_decl_quote_varnames); do 326555acc8fcSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 326655acc8fcSmrg *[[\\\\\\\`\\"\\\$]]*) 326755acc8fcSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 326855acc8fcSmrg ;; 326955acc8fcSmrg *) 327055acc8fcSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 327155acc8fcSmrg ;; 327255acc8fcSmrg esac 327355acc8fcSmrgdone 32743da084b3Smrg 327555acc8fcSmrg# Double-quote double-evaled strings. 327655acc8fcSmrgfor var in lt_decl_all_varnames([[ \ 327755acc8fcSmrg]], lt_decl_dquote_varnames); do 327855acc8fcSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 327955acc8fcSmrg *[[\\\\\\\`\\"\\\$]]*) 328055acc8fcSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 328155acc8fcSmrg ;; 328255acc8fcSmrg *) 328355acc8fcSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 328455acc8fcSmrg ;; 328555acc8fcSmrg esac 328655acc8fcSmrgdone 32873da084b3Smrg 328855acc8fcSmrg_LT_OUTPUT_LIBTOOL_INIT 328955acc8fcSmrg]) 32903da084b3Smrg 329155acc8fcSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 329255acc8fcSmrg# ------------------------------------ 329355acc8fcSmrg# Generate a child script FILE with all initialization necessary to 329455acc8fcSmrg# reuse the environment learned by the parent script, and make the 329555acc8fcSmrg# file executable. If COMMENT is supplied, it is inserted after the 329655acc8fcSmrg# `#!' sequence but before initialization text begins. After this 329755acc8fcSmrg# macro, additional text can be appended to FILE to form the body of 329855acc8fcSmrg# the child script. The macro ends with non-zero status if the 329955acc8fcSmrg# file could not be fully written (such as if the disk is full). 330055acc8fcSmrgm4_ifdef([AS_INIT_GENERATED], 330155acc8fcSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 330255acc8fcSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 330355acc8fcSmrg[m4_require([AS_PREPARE])]dnl 330455acc8fcSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 330555acc8fcSmrg[lt_write_fail=0 330655acc8fcSmrgcat >$1 <<_ASEOF || lt_write_fail=1 330755acc8fcSmrg#! $SHELL 330855acc8fcSmrg# Generated by $as_me. 330955acc8fcSmrg$2 331055acc8fcSmrgSHELL=\${CONFIG_SHELL-$SHELL} 331155acc8fcSmrgexport SHELL 331255acc8fcSmrg_ASEOF 331355acc8fcSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 331455acc8fcSmrgAS_SHELL_SANITIZE 331555acc8fcSmrg_AS_PREPARE 331655acc8fcSmrgexec AS_MESSAGE_FD>&1 331755acc8fcSmrg_ASEOF 331855acc8fcSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 331955acc8fcSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 33203da084b3Smrg 332155acc8fcSmrg# LT_OUTPUT 332255acc8fcSmrg# --------- 332355acc8fcSmrg# This macro allows early generation of the libtool script (before 332455acc8fcSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 332555acc8fcSmrg# tests. 332655acc8fcSmrgAC_DEFUN([LT_OUTPUT], 332755acc8fcSmrg[: ${CONFIG_LT=./config.lt} 332855acc8fcSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 332955acc8fcSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 333055acc8fcSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 33313da084b3Smrg 333255acc8fcSmrgcat >>"$CONFIG_LT" <<\_LTEOF 333355acc8fcSmrglt_cl_silent=false 333455acc8fcSmrgexec AS_MESSAGE_LOG_FD>>config.log 333555acc8fcSmrg{ 333655acc8fcSmrg echo 333755acc8fcSmrg AS_BOX([Running $as_me.]) 333855acc8fcSmrg} >&AS_MESSAGE_LOG_FD 33393da084b3Smrg 334055acc8fcSmrglt_cl_help="\ 334155acc8fcSmrg\`$as_me' creates a local libtool stub from the current configuration, 334255acc8fcSmrgfor use in further configure time tests before the real libtool is 334355acc8fcSmrggenerated. 33443da084b3Smrg 334555acc8fcSmrgUsage: $[0] [[OPTIONS]] 33463da084b3Smrg 334755acc8fcSmrg -h, --help print this help, then exit 334855acc8fcSmrg -V, --version print version number, then exit 334955acc8fcSmrg -q, --quiet do not print progress messages 335055acc8fcSmrg -d, --debug don't remove temporary files 33513da084b3Smrg 335255acc8fcSmrgReport bugs to <bug-libtool@gnu.org>." 33533da084b3Smrg 335455acc8fcSmrglt_cl_version="\ 335555acc8fcSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 335655acc8fcSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 335755acc8fcSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 33583da084b3Smrg 335955acc8fcSmrgCopyright (C) 2010 Free Software Foundation, Inc. 336055acc8fcSmrgThis config.lt script is free software; the Free Software Foundation 336155acc8fcSmrggives unlimited permision to copy, distribute and modify it." 33623da084b3Smrg 336355acc8fcSmrgwhile test $[#] != 0 336455acc8fcSmrgdo 336555acc8fcSmrg case $[1] in 336655acc8fcSmrg --version | --v* | -V ) 336755acc8fcSmrg echo "$lt_cl_version"; exit 0 ;; 336855acc8fcSmrg --help | --h* | -h ) 336955acc8fcSmrg echo "$lt_cl_help"; exit 0 ;; 337055acc8fcSmrg --debug | --d* | -d ) 337155acc8fcSmrg debug=: ;; 337255acc8fcSmrg --quiet | --q* | --silent | --s* | -q ) 337355acc8fcSmrg lt_cl_silent=: ;; 33743da084b3Smrg 337555acc8fcSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 337655acc8fcSmrgTry \`$[0] --help' for more information.]) ;; 33773da084b3Smrg 337855acc8fcSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 337955acc8fcSmrgTry \`$[0] --help' for more information.]) ;; 338055acc8fcSmrg esac 338155acc8fcSmrg shift 3382d63fdb69Smrgdone 33833da084b3Smrg 338455acc8fcSmrgif $lt_cl_silent; then 338555acc8fcSmrg exec AS_MESSAGE_FD>/dev/null 338655acc8fcSmrgfi 338755acc8fcSmrg_LTEOF 33883da084b3Smrg 338955acc8fcSmrgcat >>"$CONFIG_LT" <<_LTEOF 339055acc8fcSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 339155acc8fcSmrg_LTEOF 33923da084b3Smrg 339355acc8fcSmrgcat >>"$CONFIG_LT" <<\_LTEOF 339455acc8fcSmrgAC_MSG_NOTICE([creating $ofile]) 339555acc8fcSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 339655acc8fcSmrgAS_EXIT(0) 339755acc8fcSmrg_LTEOF 339855acc8fcSmrgchmod +x "$CONFIG_LT" 33993da084b3Smrg 340055acc8fcSmrg# configure is writing to config.log, but config.lt does its own redirection, 340155acc8fcSmrg# appending to config.log, which fails on DOS, as config.log is still kept 340255acc8fcSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 340355acc8fcSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 340455acc8fcSmrglt_cl_success=: 340555acc8fcSmrgtest "$silent" = yes && 340655acc8fcSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 340755acc8fcSmrgexec AS_MESSAGE_LOG_FD>/dev/null 340855acc8fcSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 340955acc8fcSmrgexec AS_MESSAGE_LOG_FD>>config.log 341055acc8fcSmrg$lt_cl_success || AS_EXIT(1) 341155acc8fcSmrg])# LT_OUTPUT 34123da084b3Smrg 34133da084b3Smrg 341455acc8fcSmrg# _LT_CONFIG(TAG) 341555acc8fcSmrg# --------------- 341655acc8fcSmrg# If TAG is the built-in tag, create an initial libtool script with a 341755acc8fcSmrg# default configuration from the untagged config vars. Otherwise add code 341855acc8fcSmrg# to config.status for appending the configuration named by TAG from the 341955acc8fcSmrg# matching tagged config vars. 342055acc8fcSmrgm4_defun([_LT_CONFIG], 342155acc8fcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 342255acc8fcSmrg_LT_CONFIG_SAVE_COMMANDS([ 342355acc8fcSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 342455acc8fcSmrg m4_if(_LT_TAG, [C], [ 342555acc8fcSmrg # See if we are running on zsh, and set the options which allow our 342655acc8fcSmrg # commands through without removal of \ escapes. 342755acc8fcSmrg if test -n "${ZSH_VERSION+set}" ; then 342855acc8fcSmrg setopt NO_GLOB_SUBST 342955acc8fcSmrg fi 34303da084b3Smrg 343155acc8fcSmrg cfgfile="${ofile}T" 343255acc8fcSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 343355acc8fcSmrg $RM "$cfgfile" 343455acc8fcSmrg 343555acc8fcSmrg cat <<_LT_EOF >> "$cfgfile" 343655acc8fcSmrg#! $SHELL 343755acc8fcSmrg 343855acc8fcSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 343955acc8fcSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 344055acc8fcSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 344155acc8fcSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 344255acc8fcSmrg# 344355acc8fcSmrg_LT_COPYING 344455acc8fcSmrg_LT_LIBTOOL_TAGS 344555acc8fcSmrg 344655acc8fcSmrg# ### BEGIN LIBTOOL CONFIG 344755acc8fcSmrg_LT_LIBTOOL_CONFIG_VARS 344855acc8fcSmrg_LT_LIBTOOL_TAG_VARS 344955acc8fcSmrg# ### END LIBTOOL CONFIG 345055acc8fcSmrg 345155acc8fcSmrg_LT_EOF 345255acc8fcSmrg 345355acc8fcSmrg case $host_os in 345455acc8fcSmrg aix3*) 345555acc8fcSmrg cat <<\_LT_EOF >> "$cfgfile" 345655acc8fcSmrg# AIX sometimes has problems with the GCC collect2 program. For some 345755acc8fcSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 345855acc8fcSmrg# vanish in a puff of smoke. 345955acc8fcSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 346055acc8fcSmrg COLLECT_NAMES= 346155acc8fcSmrg export COLLECT_NAMES 346255acc8fcSmrgfi 346355acc8fcSmrg_LT_EOF 346455acc8fcSmrg ;; 346555acc8fcSmrg esac 346655acc8fcSmrg 346755acc8fcSmrg _LT_PROG_LTMAIN 346855acc8fcSmrg 346955acc8fcSmrg # We use sed instead of cat because bash on DJGPP gets confused if 347055acc8fcSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 347155acc8fcSmrg # text mode, it properly converts lines to CR/LF. This bash problem 347255acc8fcSmrg # is reportedly fixed, but why not run on old versions too? 347355acc8fcSmrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 347455acc8fcSmrg || (rm -f "$cfgfile"; exit 1) 347555acc8fcSmrg 347655acc8fcSmrg _LT_PROG_XSI_SHELLFNS 347755acc8fcSmrg 347855acc8fcSmrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 347955acc8fcSmrg || (rm -f "$cfgfile"; exit 1) 348055acc8fcSmrg 348155acc8fcSmrg mv -f "$cfgfile" "$ofile" || 348255acc8fcSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 348355acc8fcSmrg chmod +x "$ofile" 348455acc8fcSmrg], 348555acc8fcSmrg[cat <<_LT_EOF >> "$ofile" 348655acc8fcSmrg 348755acc8fcSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 348855acc8fcSmrgdnl in a comment (ie after a #). 348955acc8fcSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 349055acc8fcSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 349155acc8fcSmrg# ### END LIBTOOL TAG CONFIG: $1 349255acc8fcSmrg_LT_EOF 349355acc8fcSmrg])dnl /m4_if 349455acc8fcSmrg], 349555acc8fcSmrg[m4_if([$1], [], [ 349655acc8fcSmrg PACKAGE='$PACKAGE' 349755acc8fcSmrg VERSION='$VERSION' 349855acc8fcSmrg TIMESTAMP='$TIMESTAMP' 349955acc8fcSmrg RM='$RM' 350055acc8fcSmrg ofile='$ofile'], []) 350155acc8fcSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 350255acc8fcSmrg])# _LT_CONFIG 350355acc8fcSmrg 350455acc8fcSmrg 350555acc8fcSmrg# LT_SUPPORTED_TAG(TAG) 350655acc8fcSmrg# --------------------- 350755acc8fcSmrg# Trace this macro to discover what tags are supported by the libtool 350855acc8fcSmrg# --tag option, using: 350955acc8fcSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 351055acc8fcSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 351155acc8fcSmrg 351255acc8fcSmrg 351355acc8fcSmrg# C support is built-in for now 351455acc8fcSmrgm4_define([_LT_LANG_C_enabled], []) 351555acc8fcSmrgm4_define([_LT_TAGS], []) 351655acc8fcSmrg 351755acc8fcSmrg 351855acc8fcSmrg# LT_LANG(LANG) 351955acc8fcSmrg# ------------- 352055acc8fcSmrg# Enable libtool support for the given language if not already enabled. 352155acc8fcSmrgAC_DEFUN([LT_LANG], 352255acc8fcSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 352355acc8fcSmrgm4_case([$1], 352455acc8fcSmrg [C], [_LT_LANG(C)], 352555acc8fcSmrg [C++], [_LT_LANG(CXX)], 352655acc8fcSmrg [Java], [_LT_LANG(GCJ)], 352755acc8fcSmrg [Fortran 77], [_LT_LANG(F77)], 352855acc8fcSmrg [Fortran], [_LT_LANG(FC)], 352955acc8fcSmrg [Windows Resource], [_LT_LANG(RC)], 353055acc8fcSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 353155acc8fcSmrg [_LT_LANG($1)], 353255acc8fcSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 353355acc8fcSmrg])# LT_LANG 353455acc8fcSmrg 353555acc8fcSmrg 353655acc8fcSmrg# _LT_LANG(LANGNAME) 353755acc8fcSmrg# ------------------ 353855acc8fcSmrgm4_defun([_LT_LANG], 353955acc8fcSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 354055acc8fcSmrg [LT_SUPPORTED_TAG([$1])dnl 354155acc8fcSmrg m4_append([_LT_TAGS], [$1 ])dnl 354255acc8fcSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 354355acc8fcSmrg _LT_LANG_$1_CONFIG($1)])dnl 354455acc8fcSmrg])# _LT_LANG 354555acc8fcSmrg 354655acc8fcSmrg 354755acc8fcSmrg# _LT_LANG_DEFAULT_CONFIG 354855acc8fcSmrg# ----------------------- 354955acc8fcSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 355055acc8fcSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 355155acc8fcSmrg [LT_LANG(CXX)], 355255acc8fcSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 355355acc8fcSmrg 355455acc8fcSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 355555acc8fcSmrg [LT_LANG(F77)], 355655acc8fcSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 355755acc8fcSmrg 355855acc8fcSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 355955acc8fcSmrg [LT_LANG(FC)], 356055acc8fcSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 356155acc8fcSmrg 356255acc8fcSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 356355acc8fcSmrgdnl pulling things in needlessly. 356455acc8fcSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 356555acc8fcSmrg [LT_LANG(GCJ)], 356655acc8fcSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 356755acc8fcSmrg [LT_LANG(GCJ)], 356855acc8fcSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 356955acc8fcSmrg [LT_LANG(GCJ)], 357055acc8fcSmrg [m4_ifdef([AC_PROG_GCJ], 357155acc8fcSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 357255acc8fcSmrg m4_ifdef([A][M_PROG_GCJ], 357355acc8fcSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 357455acc8fcSmrg m4_ifdef([LT_PROG_GCJ], 357555acc8fcSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 357655acc8fcSmrg 357755acc8fcSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 357855acc8fcSmrg [LT_LANG(RC)], 357955acc8fcSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 358055acc8fcSmrg])# _LT_LANG_DEFAULT_CONFIG 358155acc8fcSmrg 358255acc8fcSmrg# Obsolete macros: 358355acc8fcSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 358455acc8fcSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 358555acc8fcSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 358655acc8fcSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 358755acc8fcSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 358855acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 358955acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 359055acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 359155acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 359255acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 359355acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 359455acc8fcSmrg 359555acc8fcSmrg 359655acc8fcSmrg# _LT_TAG_COMPILER 359755acc8fcSmrg# ---------------- 359855acc8fcSmrgm4_defun([_LT_TAG_COMPILER], 359955acc8fcSmrg[AC_REQUIRE([AC_PROG_CC])dnl 360055acc8fcSmrg 360155acc8fcSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 360255acc8fcSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 360355acc8fcSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 360455acc8fcSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 360555acc8fcSmrg 360655acc8fcSmrg# If no C compiler was specified, use CC. 360755acc8fcSmrgLTCC=${LTCC-"$CC"} 360855acc8fcSmrg 360955acc8fcSmrg# If no C compiler flags were specified, use CFLAGS. 361055acc8fcSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 361155acc8fcSmrg 361255acc8fcSmrg# Allow CC to be a program name with arguments. 361355acc8fcSmrgcompiler=$CC 361455acc8fcSmrg])# _LT_TAG_COMPILER 361555acc8fcSmrg 361655acc8fcSmrg 361755acc8fcSmrg# _LT_COMPILER_BOILERPLATE 361855acc8fcSmrg# ------------------------ 361955acc8fcSmrg# Check for compiler boilerplate output or warnings with 362055acc8fcSmrg# the simple compiler test code. 362155acc8fcSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 362255acc8fcSmrg[m4_require([_LT_DECL_SED])dnl 362355acc8fcSmrgac_outfile=conftest.$ac_objext 362455acc8fcSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 362555acc8fcSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 362655acc8fcSmrg_lt_compiler_boilerplate=`cat conftest.err` 362755acc8fcSmrg$RM conftest* 362855acc8fcSmrg])# _LT_COMPILER_BOILERPLATE 362955acc8fcSmrg 363055acc8fcSmrg 363155acc8fcSmrg# _LT_LINKER_BOILERPLATE 363255acc8fcSmrg# ---------------------- 363355acc8fcSmrg# Check for linker boilerplate output or warnings with 363455acc8fcSmrg# the simple link test code. 363555acc8fcSmrgm4_defun([_LT_LINKER_BOILERPLATE], 363655acc8fcSmrg[m4_require([_LT_DECL_SED])dnl 363755acc8fcSmrgac_outfile=conftest.$ac_objext 363855acc8fcSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 363955acc8fcSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 364055acc8fcSmrg_lt_linker_boilerplate=`cat conftest.err` 364155acc8fcSmrg$RM -r conftest* 364255acc8fcSmrg])# _LT_LINKER_BOILERPLATE 364355acc8fcSmrg 364455acc8fcSmrg# _LT_REQUIRED_DARWIN_CHECKS 364555acc8fcSmrg# ------------------------- 364655acc8fcSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 364755acc8fcSmrg case $host_os in 364855acc8fcSmrg rhapsody* | darwin*) 364955acc8fcSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 365055acc8fcSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 365155acc8fcSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 365255acc8fcSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 365355acc8fcSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 365455acc8fcSmrg _LT_DECL([], [DSYMUTIL], [1], 365555acc8fcSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 365655acc8fcSmrg _LT_DECL([], [NMEDIT], [1], 365755acc8fcSmrg [Tool to change global to local symbols on Mac OS X]) 365855acc8fcSmrg _LT_DECL([], [LIPO], [1], 365955acc8fcSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 366055acc8fcSmrg _LT_DECL([], [OTOOL], [1], 366155acc8fcSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 366255acc8fcSmrg _LT_DECL([], [OTOOL64], [1], 366355acc8fcSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 366455acc8fcSmrg 366555acc8fcSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 366655acc8fcSmrg [lt_cv_apple_cc_single_mod=no 366755acc8fcSmrg if test -z "${LT_MULTI_MODULE}"; then 366855acc8fcSmrg # By default we will add the -single_module flag. You can override 366955acc8fcSmrg # by either setting the environment variable LT_MULTI_MODULE 367055acc8fcSmrg # non-empty at configure time, or by adding -multi_module to the 367155acc8fcSmrg # link flags. 367255acc8fcSmrg rm -rf libconftest.dylib* 367355acc8fcSmrg echo "int foo(void){return 1;}" > conftest.c 367455acc8fcSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 367555acc8fcSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 367655acc8fcSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 367755acc8fcSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 367855acc8fcSmrg _lt_result=$? 367955acc8fcSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 368055acc8fcSmrg lt_cv_apple_cc_single_mod=yes 368155acc8fcSmrg else 368255acc8fcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 368355acc8fcSmrg fi 368455acc8fcSmrg rm -rf libconftest.dylib* 368555acc8fcSmrg rm -f conftest.* 368655acc8fcSmrg fi]) 368755acc8fcSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 368855acc8fcSmrg [lt_cv_ld_exported_symbols_list], 368955acc8fcSmrg [lt_cv_ld_exported_symbols_list=no 369055acc8fcSmrg save_LDFLAGS=$LDFLAGS 369155acc8fcSmrg echo "_main" > conftest.sym 369255acc8fcSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 369355acc8fcSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 369455acc8fcSmrg [lt_cv_ld_exported_symbols_list=yes], 369555acc8fcSmrg [lt_cv_ld_exported_symbols_list=no]) 369655acc8fcSmrg LDFLAGS="$save_LDFLAGS" 369755acc8fcSmrg ]) 369855acc8fcSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 369955acc8fcSmrg [lt_cv_ld_force_load=no 370055acc8fcSmrg cat > conftest.c << _LT_EOF 370155acc8fcSmrgint forced_loaded() { return 2;} 370255acc8fcSmrg_LT_EOF 370355acc8fcSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 370455acc8fcSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 370555acc8fcSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 370655acc8fcSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 370755acc8fcSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 370855acc8fcSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 370955acc8fcSmrg cat > conftest.c << _LT_EOF 371055acc8fcSmrgint main() { return 0;} 371155acc8fcSmrg_LT_EOF 371255acc8fcSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 371355acc8fcSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 371455acc8fcSmrg _lt_result=$? 371555acc8fcSmrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 371655acc8fcSmrg lt_cv_ld_force_load=yes 371755acc8fcSmrg else 371855acc8fcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3719d63fdb69Smrg fi 372055acc8fcSmrg rm -f conftest.err libconftest.a conftest conftest.c 372155acc8fcSmrg rm -rf conftest.dSYM 372255acc8fcSmrg ]) 372355acc8fcSmrg case $host_os in 372455acc8fcSmrg rhapsody* | darwin1.[[012]]) 372555acc8fcSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 372655acc8fcSmrg darwin1.*) 372755acc8fcSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 372855acc8fcSmrg darwin*) # darwin 5.x on 372955acc8fcSmrg # if running on 10.5 or later, the deployment target defaults 373055acc8fcSmrg # to the OS version, if on x86, and 10.4, the deployment 373155acc8fcSmrg # target defaults to 10.4. Don't you love it? 373255acc8fcSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 373355acc8fcSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 373455acc8fcSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 373555acc8fcSmrg 10.[[012]]*) 373655acc8fcSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 373755acc8fcSmrg 10.*) 373855acc8fcSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 373955acc8fcSmrg esac 374055acc8fcSmrg ;; 374155acc8fcSmrg esac 374255acc8fcSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 374355acc8fcSmrg _lt_dar_single_mod='$single_module' 374455acc8fcSmrg fi 374555acc8fcSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 374655acc8fcSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 374755acc8fcSmrg else 374855acc8fcSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 374955acc8fcSmrg fi 375055acc8fcSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 375155acc8fcSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 375255acc8fcSmrg else 375355acc8fcSmrg _lt_dsymutil= 375455acc8fcSmrg fi 375555acc8fcSmrg ;; 375655acc8fcSmrg esac 375755acc8fcSmrg]) 375855acc8fcSmrg 375955acc8fcSmrg 376055acc8fcSmrg# _LT_DARWIN_LINKER_FEATURES 376155acc8fcSmrg# -------------------------- 376255acc8fcSmrg# Checks for linker and compiler features on darwin 376355acc8fcSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 376455acc8fcSmrg[ 376555acc8fcSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 376655acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 376755acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 376855acc8fcSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 376955acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 377055acc8fcSmrg if test "$lt_cv_ld_force_load" = "yes"; then 377155acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 377255acc8fcSmrg else 377355acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 377455acc8fcSmrg fi 377555acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 377655acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 377755acc8fcSmrg case $cc_basename in 377855acc8fcSmrg ifort*) _lt_dar_can_shared=yes ;; 377955acc8fcSmrg *) _lt_dar_can_shared=$GCC ;; 378055acc8fcSmrg esac 378155acc8fcSmrg if test "$_lt_dar_can_shared" = "yes"; then 378255acc8fcSmrg output_verbose_link_cmd=func_echo_all 378355acc8fcSmrg _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}" 378455acc8fcSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 378555acc8fcSmrg _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}" 378655acc8fcSmrg _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}" 378755acc8fcSmrg m4_if([$1], [CXX], 378855acc8fcSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 378955acc8fcSmrg _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}" 379055acc8fcSmrg _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}" 379155acc8fcSmrg fi 379255acc8fcSmrg],[]) 379355acc8fcSmrg else 379455acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 379555acc8fcSmrg fi 379655acc8fcSmrg]) 379755acc8fcSmrg 379855acc8fcSmrg# _LT_SYS_MODULE_PATH_AIX 379955acc8fcSmrg# ----------------------- 380055acc8fcSmrg# Links a minimal program and checks the executable 380155acc8fcSmrg# for the system default hardcoded library path. In most cases, 380255acc8fcSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 380355acc8fcSmrg# the location of the communication and MPI libs are included too. 380455acc8fcSmrg# If we don't find anything, use the default library path according 380555acc8fcSmrg# to the aix ld manual. 380655acc8fcSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 380755acc8fcSmrg[m4_require([_LT_DECL_SED])dnl 380855acc8fcSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 380955acc8fcSmrglt_aix_libpath_sed=' 381055acc8fcSmrg /Import File Strings/,/^$/ { 381155acc8fcSmrg /^0/ { 381255acc8fcSmrg s/^0 *\(.*\)$/\1/ 381355acc8fcSmrg p 381455acc8fcSmrg } 381555acc8fcSmrg }' 381655acc8fcSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 381755acc8fcSmrg# Check for a 64-bit object if we didn't find anything. 381855acc8fcSmrgif test -z "$aix_libpath"; then 381955acc8fcSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 382055acc8fcSmrgfi],[]) 382155acc8fcSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 382255acc8fcSmrg])# _LT_SYS_MODULE_PATH_AIX 382355acc8fcSmrg 382455acc8fcSmrg 382555acc8fcSmrg# _LT_SHELL_INIT(ARG) 382655acc8fcSmrg# ------------------- 382755acc8fcSmrgm4_define([_LT_SHELL_INIT], 382855acc8fcSmrg[m4_divert_text([M4SH-INIT], [$1 382955acc8fcSmrg])])# _LT_SHELL_INIT 383055acc8fcSmrg 383155acc8fcSmrg 383255acc8fcSmrg 383355acc8fcSmrg# _LT_PROG_ECHO_BACKSLASH 383455acc8fcSmrg# ----------------------- 383555acc8fcSmrg# Find how we can fake an echo command that does not interpret backslash. 383655acc8fcSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 383755acc8fcSmrg# of the generated configure script which will find a shell with a builtin 383855acc8fcSmrg# printf (which we can use as an echo command). 383955acc8fcSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 384055acc8fcSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 384155acc8fcSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 384255acc8fcSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 384355acc8fcSmrg 384455acc8fcSmrgAC_MSG_CHECKING([how to print strings]) 384555acc8fcSmrg# Test print first, because it will be a builtin if present. 384655acc8fcSmrgif test "X`print -r -- -n 2>/dev/null`" = X-n && \ 384755acc8fcSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 384855acc8fcSmrg ECHO='print -r --' 384955acc8fcSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 385055acc8fcSmrg ECHO='printf %s\n' 385155acc8fcSmrgelse 385255acc8fcSmrg # Use this function as a fallback that always works. 385355acc8fcSmrg func_fallback_echo () 385455acc8fcSmrg { 385555acc8fcSmrg eval 'cat <<_LTECHO_EOF 385655acc8fcSmrg$[]1 385755acc8fcSmrg_LTECHO_EOF' 385855acc8fcSmrg } 385955acc8fcSmrg ECHO='func_fallback_echo' 386055acc8fcSmrgfi 386155acc8fcSmrg 386255acc8fcSmrg# func_echo_all arg... 386355acc8fcSmrg# Invoke $ECHO with all args, space-separated. 386455acc8fcSmrgfunc_echo_all () 386555acc8fcSmrg{ 386655acc8fcSmrg $ECHO "$*" 386755acc8fcSmrg} 386855acc8fcSmrg 386955acc8fcSmrgcase "$ECHO" in 387055acc8fcSmrg printf*) AC_MSG_RESULT([printf]) ;; 387155acc8fcSmrg print*) AC_MSG_RESULT([print -r]) ;; 387255acc8fcSmrg *) AC_MSG_RESULT([cat]) ;; 387355acc8fcSmrgesac 387455acc8fcSmrg 387555acc8fcSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 387655acc8fcSmrg[_AS_DETECT_SUGGESTED([ 387755acc8fcSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 387855acc8fcSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 387955acc8fcSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 388055acc8fcSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 388155acc8fcSmrg PATH=/empty FPATH=/empty; export PATH FPATH 388255acc8fcSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 388355acc8fcSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 388455acc8fcSmrg 388555acc8fcSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 388655acc8fcSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 388755acc8fcSmrg])# _LT_PROG_ECHO_BACKSLASH 388855acc8fcSmrg 388955acc8fcSmrg 389055acc8fcSmrg# _LT_ENABLE_LOCK 389155acc8fcSmrg# --------------- 389255acc8fcSmrgm4_defun([_LT_ENABLE_LOCK], 389355acc8fcSmrg[AC_ARG_ENABLE([libtool-lock], 389455acc8fcSmrg [AS_HELP_STRING([--disable-libtool-lock], 389555acc8fcSmrg [avoid locking (might break parallel builds)])]) 389655acc8fcSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 389755acc8fcSmrg 389855acc8fcSmrg# Some flags need to be propagated to the compiler or linker for good 389955acc8fcSmrg# libtool support. 390055acc8fcSmrgcase $host in 390155acc8fcSmrgia64-*-hpux*) 390255acc8fcSmrg # Find out which ABI we are using. 390355acc8fcSmrg echo 'int i;' > conftest.$ac_ext 390455acc8fcSmrg if AC_TRY_EVAL(ac_compile); then 390555acc8fcSmrg case `/usr/bin/file conftest.$ac_objext` in 390655acc8fcSmrg *ELF-32*) 390755acc8fcSmrg HPUX_IA64_MODE="32" 3908d63fdb69Smrg ;; 390955acc8fcSmrg *ELF-64*) 391055acc8fcSmrg HPUX_IA64_MODE="64" 3911d63fdb69Smrg ;; 39123da084b3Smrg esac 391355acc8fcSmrg fi 391455acc8fcSmrg rm -rf conftest* 391555acc8fcSmrg ;; 391655acc8fcSmrg*-*-irix6*) 391755acc8fcSmrg # Find out which ABI we are using. 391855acc8fcSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 391955acc8fcSmrg if AC_TRY_EVAL(ac_compile); then 392055acc8fcSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 392155acc8fcSmrg case `/usr/bin/file conftest.$ac_objext` in 392255acc8fcSmrg *32-bit*) 392355acc8fcSmrg LD="${LD-ld} -melf32bsmip" 3924d63fdb69Smrg ;; 392555acc8fcSmrg *N32*) 392655acc8fcSmrg LD="${LD-ld} -melf32bmipn32" 392755acc8fcSmrg ;; 392855acc8fcSmrg *64-bit*) 392955acc8fcSmrg LD="${LD-ld} -melf64bmip" 3930d63fdb69Smrg ;; 393155acc8fcSmrg esac 393255acc8fcSmrg else 393355acc8fcSmrg case `/usr/bin/file conftest.$ac_objext` in 393455acc8fcSmrg *32-bit*) 393555acc8fcSmrg LD="${LD-ld} -32" 393655acc8fcSmrg ;; 393755acc8fcSmrg *N32*) 393855acc8fcSmrg LD="${LD-ld} -n32" 393955acc8fcSmrg ;; 394055acc8fcSmrg *64-bit*) 394155acc8fcSmrg LD="${LD-ld} -64" 394255acc8fcSmrg ;; 394355acc8fcSmrg esac 394455acc8fcSmrg fi 394555acc8fcSmrg fi 394655acc8fcSmrg rm -rf conftest* 394755acc8fcSmrg ;; 394855acc8fcSmrg 394955acc8fcSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 395055acc8fcSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 395155acc8fcSmrg # Find out which ABI we are using. 395255acc8fcSmrg echo 'int i;' > conftest.$ac_ext 395355acc8fcSmrg if AC_TRY_EVAL(ac_compile); then 395455acc8fcSmrg case `/usr/bin/file conftest.o` in 395555acc8fcSmrg *32-bit*) 395655acc8fcSmrg case $host in 395755acc8fcSmrg x86_64-*kfreebsd*-gnu) 395855acc8fcSmrg LD="${LD-ld} -m elf_i386_fbsd" 3959d63fdb69Smrg ;; 396055acc8fcSmrg x86_64-*linux*) 396155acc8fcSmrg LD="${LD-ld} -m elf_i386" 3962d63fdb69Smrg ;; 396355acc8fcSmrg ppc64-*linux*|powerpc64-*linux*) 396455acc8fcSmrg LD="${LD-ld} -m elf32ppclinux" 3965d63fdb69Smrg ;; 396655acc8fcSmrg s390x-*linux*) 396755acc8fcSmrg LD="${LD-ld} -m elf_s390" 3968d63fdb69Smrg ;; 396955acc8fcSmrg sparc64-*linux*) 397055acc8fcSmrg LD="${LD-ld} -m elf32_sparc" 3971d63fdb69Smrg ;; 3972d63fdb69Smrg esac 3973d63fdb69Smrg ;; 397455acc8fcSmrg *64-bit*) 397555acc8fcSmrg case $host in 397655acc8fcSmrg x86_64-*kfreebsd*-gnu) 397755acc8fcSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 3978d63fdb69Smrg ;; 397955acc8fcSmrg x86_64-*linux*) 398055acc8fcSmrg LD="${LD-ld} -m elf_x86_64" 3981d63fdb69Smrg ;; 398255acc8fcSmrg ppc*-*linux*|powerpc*-*linux*) 398355acc8fcSmrg LD="${LD-ld} -m elf64ppc" 398455acc8fcSmrg ;; 398555acc8fcSmrg s390*-*linux*|s390*-*tpf*) 398655acc8fcSmrg LD="${LD-ld} -m elf64_s390" 398755acc8fcSmrg ;; 398855acc8fcSmrg sparc*-*linux*) 398955acc8fcSmrg LD="${LD-ld} -m elf64_sparc" 3990d63fdb69Smrg ;; 3991d63fdb69Smrg esac 3992d63fdb69Smrg ;; 399355acc8fcSmrg esac 399455acc8fcSmrg fi 399555acc8fcSmrg rm -rf conftest* 399655acc8fcSmrg ;; 399755acc8fcSmrg 399855acc8fcSmrg*-*-sco3.2v5*) 399955acc8fcSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 400055acc8fcSmrg SAVE_CFLAGS="$CFLAGS" 400155acc8fcSmrg CFLAGS="$CFLAGS -belf" 400255acc8fcSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 400355acc8fcSmrg [AC_LANG_PUSH(C) 400455acc8fcSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 400555acc8fcSmrg AC_LANG_POP]) 400655acc8fcSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 400755acc8fcSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 400855acc8fcSmrg CFLAGS="$SAVE_CFLAGS" 400955acc8fcSmrg fi 401055acc8fcSmrg ;; 401155acc8fcSmrgsparc*-*solaris*) 401255acc8fcSmrg # Find out which ABI we are using. 401355acc8fcSmrg echo 'int i;' > conftest.$ac_ext 401455acc8fcSmrg if AC_TRY_EVAL(ac_compile); then 401555acc8fcSmrg case `/usr/bin/file conftest.o` in 401655acc8fcSmrg *64-bit*) 401755acc8fcSmrg case $lt_cv_prog_gnu_ld in 401855acc8fcSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 4019d63fdb69Smrg *) 402055acc8fcSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 402155acc8fcSmrg LD="${LD-ld} -64" 402255acc8fcSmrg fi 4023d63fdb69Smrg ;; 402455acc8fcSmrg esac 402555acc8fcSmrg ;; 4026d63fdb69Smrg esac 4027d63fdb69Smrg fi 402855acc8fcSmrg rm -rf conftest* 402955acc8fcSmrg ;; 403055acc8fcSmrgesac 40313da084b3Smrg 403255acc8fcSmrgneed_locks="$enable_libtool_lock" 403355acc8fcSmrg])# _LT_ENABLE_LOCK 40343da084b3Smrg 40353da084b3Smrg 403655acc8fcSmrg# _LT_CMD_OLD_ARCHIVE 403755acc8fcSmrg# ------------------- 403855acc8fcSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 403955acc8fcSmrg[AC_CHECK_TOOL(AR, ar, false) 404055acc8fcSmrgtest -z "$AR" && AR=ar 404155acc8fcSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 404255acc8fcSmrg_LT_DECL([], [AR], [1], [The archiver]) 404355acc8fcSmrg_LT_DECL([], [AR_FLAGS], [1]) 40443da084b3Smrg 404555acc8fcSmrgAC_CHECK_TOOL(STRIP, strip, :) 404655acc8fcSmrgtest -z "$STRIP" && STRIP=: 404755acc8fcSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 40483da084b3Smrg 404955acc8fcSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 405055acc8fcSmrgtest -z "$RANLIB" && RANLIB=: 405155acc8fcSmrg_LT_DECL([], [RANLIB], [1], 405255acc8fcSmrg [Commands used to install an old-style archive]) 40533da084b3Smrg 405455acc8fcSmrg# Determine commands to create old-style static archives. 405555acc8fcSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 405655acc8fcSmrgold_postinstall_cmds='chmod 644 $oldlib' 405755acc8fcSmrgold_postuninstall_cmds= 405855acc8fcSmrg 405955acc8fcSmrgif test -n "$RANLIB"; then 406055acc8fcSmrg case $host_os in 406155acc8fcSmrg openbsd*) 406255acc8fcSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 406355acc8fcSmrg ;; 406455acc8fcSmrg *) 406555acc8fcSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 406655acc8fcSmrg ;; 406755acc8fcSmrg esac 406855acc8fcSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 406955acc8fcSmrgfi 407055acc8fcSmrg 407155acc8fcSmrgcase $host_os in 407255acc8fcSmrg darwin*) 407355acc8fcSmrg lock_old_archive_extraction=yes ;; 407455acc8fcSmrg *) 407555acc8fcSmrg lock_old_archive_extraction=no ;; 407655acc8fcSmrgesac 407755acc8fcSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 407855acc8fcSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 407955acc8fcSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 408055acc8fcSmrg [Commands used to build an old-style archive]) 408155acc8fcSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 408255acc8fcSmrg [Whether to use a lock for old archive extraction]) 408355acc8fcSmrg])# _LT_CMD_OLD_ARCHIVE 408455acc8fcSmrg 408555acc8fcSmrg 408655acc8fcSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 408755acc8fcSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 408855acc8fcSmrg# ---------------------------------------------------------------- 408955acc8fcSmrg# Check whether the given compiler option works 409055acc8fcSmrgAC_DEFUN([_LT_COMPILER_OPTION], 409155acc8fcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 409255acc8fcSmrgm4_require([_LT_DECL_SED])dnl 409355acc8fcSmrgAC_CACHE_CHECK([$1], [$2], 409455acc8fcSmrg [$2=no 409555acc8fcSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 409655acc8fcSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 409755acc8fcSmrg lt_compiler_flag="$3" 409855acc8fcSmrg # Insert the option either (1) after the last *FLAGS variable, or 409955acc8fcSmrg # (2) before a word containing "conftest.", or (3) at the end. 410055acc8fcSmrg # Note that $ac_compile itself does not contain backslashes and begins 410155acc8fcSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 410255acc8fcSmrg # The option is referenced via a variable to avoid confusing sed. 410355acc8fcSmrg lt_compile=`echo "$ac_compile" | $SED \ 410455acc8fcSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 410555acc8fcSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 410655acc8fcSmrg -e 's:$: $lt_compiler_flag:'` 410755acc8fcSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 410855acc8fcSmrg (eval "$lt_compile" 2>conftest.err) 410955acc8fcSmrg ac_status=$? 411055acc8fcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 411155acc8fcSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 411255acc8fcSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 411355acc8fcSmrg # The compiler can only warn and ignore the option if not recognized 411455acc8fcSmrg # So say no if there are warnings other than the usual output. 411555acc8fcSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 411655acc8fcSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 411755acc8fcSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 411855acc8fcSmrg $2=yes 411955acc8fcSmrg fi 412055acc8fcSmrg fi 412155acc8fcSmrg $RM conftest* 412255acc8fcSmrg]) 412355acc8fcSmrg 412455acc8fcSmrgif test x"[$]$2" = xyes; then 412555acc8fcSmrg m4_if([$5], , :, [$5]) 412655acc8fcSmrgelse 412755acc8fcSmrg m4_if([$6], , :, [$6]) 412855acc8fcSmrgfi 412955acc8fcSmrg])# _LT_COMPILER_OPTION 413055acc8fcSmrg 413155acc8fcSmrg# Old name: 413255acc8fcSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 413355acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 413455acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 413555acc8fcSmrg 413655acc8fcSmrg 413755acc8fcSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 413855acc8fcSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 413955acc8fcSmrg# ---------------------------------------------------- 414055acc8fcSmrg# Check whether the given linker option works 414155acc8fcSmrgAC_DEFUN([_LT_LINKER_OPTION], 414255acc8fcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 414355acc8fcSmrgm4_require([_LT_DECL_SED])dnl 414455acc8fcSmrgAC_CACHE_CHECK([$1], [$2], 414555acc8fcSmrg [$2=no 414655acc8fcSmrg save_LDFLAGS="$LDFLAGS" 414755acc8fcSmrg LDFLAGS="$LDFLAGS $3" 414855acc8fcSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 414955acc8fcSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 415055acc8fcSmrg # The linker can only warn and ignore the option if not recognized 415155acc8fcSmrg # So say no if there are warnings 415255acc8fcSmrg if test -s conftest.err; then 415355acc8fcSmrg # Append any errors to the config.log. 415455acc8fcSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 415555acc8fcSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 415655acc8fcSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 415755acc8fcSmrg if diff conftest.exp conftest.er2 >/dev/null; then 415855acc8fcSmrg $2=yes 415955acc8fcSmrg fi 416055acc8fcSmrg else 416155acc8fcSmrg $2=yes 416255acc8fcSmrg fi 416355acc8fcSmrg fi 416455acc8fcSmrg $RM -r conftest* 416555acc8fcSmrg LDFLAGS="$save_LDFLAGS" 416655acc8fcSmrg]) 416755acc8fcSmrg 416855acc8fcSmrgif test x"[$]$2" = xyes; then 416955acc8fcSmrg m4_if([$4], , :, [$4]) 417055acc8fcSmrgelse 417155acc8fcSmrg m4_if([$5], , :, [$5]) 417255acc8fcSmrgfi 417355acc8fcSmrg])# _LT_LINKER_OPTION 417455acc8fcSmrg 417555acc8fcSmrg# Old name: 417655acc8fcSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 417755acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 417855acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 41793da084b3Smrg 41803da084b3Smrg 418155acc8fcSmrg# LT_CMD_MAX_LEN 418255acc8fcSmrg#--------------- 418355acc8fcSmrgAC_DEFUN([LT_CMD_MAX_LEN], 418455acc8fcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 418555acc8fcSmrg# find the maximum length of command line arguments 418655acc8fcSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 418755acc8fcSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 418855acc8fcSmrg i=0 418955acc8fcSmrg teststring="ABCD" 41903da084b3Smrg 419155acc8fcSmrg case $build_os in 419255acc8fcSmrg msdosdjgpp*) 419355acc8fcSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 419455acc8fcSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 419555acc8fcSmrg # during glob expansion). Even if it were fixed, the result of this 419655acc8fcSmrg # check would be larger than it should be. 419755acc8fcSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 419855acc8fcSmrg ;; 41993da084b3Smrg 420055acc8fcSmrg gnu*) 420155acc8fcSmrg # Under GNU Hurd, this test is not required because there is 420255acc8fcSmrg # no limit to the length of command line arguments. 420355acc8fcSmrg # Libtool will interpret -1 as no limit whatsoever 420455acc8fcSmrg lt_cv_sys_max_cmd_len=-1; 420555acc8fcSmrg ;; 42063da084b3Smrg 420755acc8fcSmrg cygwin* | mingw* | cegcc*) 420855acc8fcSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 420955acc8fcSmrg # about 5 minutes as the teststring grows exponentially. 421055acc8fcSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 421155acc8fcSmrg # you end up with a "frozen" computer, even though with patience 421255acc8fcSmrg # the test eventually succeeds (with a max line length of 256k). 421355acc8fcSmrg # Instead, let's just punt: use the minimum linelength reported by 421455acc8fcSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 421555acc8fcSmrg lt_cv_sys_max_cmd_len=8192; 421655acc8fcSmrg ;; 42173da084b3Smrg 421855acc8fcSmrg mint*) 421955acc8fcSmrg # On MiNT this can take a long time and run out of memory. 422055acc8fcSmrg lt_cv_sys_max_cmd_len=8192; 422155acc8fcSmrg ;; 42223da084b3Smrg 422355acc8fcSmrg amigaos*) 422455acc8fcSmrg # On AmigaOS with pdksh, this test takes hours, literally. 422555acc8fcSmrg # So we just punt and use a minimum line length of 8192. 422655acc8fcSmrg lt_cv_sys_max_cmd_len=8192; 422755acc8fcSmrg ;; 42283da084b3Smrg 422955acc8fcSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 423055acc8fcSmrg # This has been around since 386BSD, at least. Likely further. 423155acc8fcSmrg if test -x /sbin/sysctl; then 423255acc8fcSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 423355acc8fcSmrg elif test -x /usr/sbin/sysctl; then 423455acc8fcSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 423555acc8fcSmrg else 423655acc8fcSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 423755acc8fcSmrg fi 423855acc8fcSmrg # And add a safety zone 423955acc8fcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 424055acc8fcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 424155acc8fcSmrg ;; 42423da084b3Smrg 424355acc8fcSmrg interix*) 424455acc8fcSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 424555acc8fcSmrg lt_cv_sys_max_cmd_len=196608 424655acc8fcSmrg ;; 424755acc8fcSmrg 424855acc8fcSmrg osf*) 424955acc8fcSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 425055acc8fcSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 425155acc8fcSmrg # nice to cause kernel panics so lets avoid the loop below. 425255acc8fcSmrg # First set a reasonable default. 425355acc8fcSmrg lt_cv_sys_max_cmd_len=16384 425455acc8fcSmrg # 425555acc8fcSmrg if test -x /sbin/sysconfig; then 425655acc8fcSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 425755acc8fcSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 4258d63fdb69Smrg esac 425955acc8fcSmrg fi 426055acc8fcSmrg ;; 426155acc8fcSmrg sco3.2v5*) 426255acc8fcSmrg lt_cv_sys_max_cmd_len=102400 426355acc8fcSmrg ;; 426455acc8fcSmrg sysv5* | sco5v6* | sysv4.2uw2*) 426555acc8fcSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 426655acc8fcSmrg if test -n "$kargmax"; then 426755acc8fcSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 426855acc8fcSmrg else 426955acc8fcSmrg lt_cv_sys_max_cmd_len=32768 427055acc8fcSmrg fi 427155acc8fcSmrg ;; 427255acc8fcSmrg *) 427355acc8fcSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 427455acc8fcSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 427555acc8fcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 427655acc8fcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 427755acc8fcSmrg else 427855acc8fcSmrg # Make teststring a little bigger before we do anything with it. 427955acc8fcSmrg # a 1K string should be a reasonable start. 428055acc8fcSmrg for i in 1 2 3 4 5 6 7 8 ; do 428155acc8fcSmrg teststring=$teststring$teststring 428255acc8fcSmrg done 428355acc8fcSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 428455acc8fcSmrg # If test is not a shell built-in, we'll probably end up computing a 428555acc8fcSmrg # maximum length that is only half of the actual maximum length, but 428655acc8fcSmrg # we can't tell. 428755acc8fcSmrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 428855acc8fcSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 428955acc8fcSmrg test $i != 17 # 1/2 MB should be enough 429055acc8fcSmrg do 429155acc8fcSmrg i=`expr $i + 1` 429255acc8fcSmrg teststring=$teststring$teststring 429355acc8fcSmrg done 429455acc8fcSmrg # Only check the string length outside the loop. 429555acc8fcSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 429655acc8fcSmrg teststring= 429755acc8fcSmrg # Add a significant safety factor because C++ compilers can tack on 429855acc8fcSmrg # massive amounts of additional arguments before passing them to the 429955acc8fcSmrg # linker. It appears as though 1/2 is a usable value. 430055acc8fcSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 430155acc8fcSmrg fi 430255acc8fcSmrg ;; 430355acc8fcSmrg esac 430455acc8fcSmrg]) 430555acc8fcSmrgif test -n $lt_cv_sys_max_cmd_len ; then 430655acc8fcSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 430755acc8fcSmrgelse 430855acc8fcSmrg AC_MSG_RESULT(none) 430955acc8fcSmrgfi 431055acc8fcSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 431155acc8fcSmrg_LT_DECL([], [max_cmd_len], [0], 431255acc8fcSmrg [What is the maximum length of a command?]) 431355acc8fcSmrg])# LT_CMD_MAX_LEN 43143da084b3Smrg 431555acc8fcSmrg# Old name: 431655acc8fcSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 431755acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 431855acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 43193da084b3Smrg 43203da084b3Smrg 432155acc8fcSmrg# _LT_HEADER_DLFCN 432255acc8fcSmrg# ---------------- 432355acc8fcSmrgm4_defun([_LT_HEADER_DLFCN], 432455acc8fcSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 432555acc8fcSmrg])# _LT_HEADER_DLFCN 43263da084b3Smrg 43273da084b3Smrg 432855acc8fcSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 432955acc8fcSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 433055acc8fcSmrg# ---------------------------------------------------------------- 433155acc8fcSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 433255acc8fcSmrg[m4_require([_LT_HEADER_DLFCN])dnl 433355acc8fcSmrgif test "$cross_compiling" = yes; then : 433455acc8fcSmrg [$4] 433555acc8fcSmrgelse 433655acc8fcSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 433755acc8fcSmrg lt_status=$lt_dlunknown 433855acc8fcSmrg cat > conftest.$ac_ext <<_LT_EOF 433955acc8fcSmrg[#line $LINENO "configure" 434055acc8fcSmrg#include "confdefs.h" 43413da084b3Smrg 434255acc8fcSmrg#if HAVE_DLFCN_H 434355acc8fcSmrg#include <dlfcn.h> 434455acc8fcSmrg#endif 43453da084b3Smrg 434655acc8fcSmrg#include <stdio.h> 43473da084b3Smrg 434855acc8fcSmrg#ifdef RTLD_GLOBAL 434955acc8fcSmrg# define LT_DLGLOBAL RTLD_GLOBAL 435055acc8fcSmrg#else 435155acc8fcSmrg# ifdef DL_GLOBAL 435255acc8fcSmrg# define LT_DLGLOBAL DL_GLOBAL 435355acc8fcSmrg# else 435455acc8fcSmrg# define LT_DLGLOBAL 0 435555acc8fcSmrg# endif 435655acc8fcSmrg#endif 43573da084b3Smrg 435855acc8fcSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 435955acc8fcSmrg find out it does not work in some platform. */ 436055acc8fcSmrg#ifndef LT_DLLAZY_OR_NOW 436155acc8fcSmrg# ifdef RTLD_LAZY 436255acc8fcSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 436355acc8fcSmrg# else 436455acc8fcSmrg# ifdef DL_LAZY 436555acc8fcSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 436655acc8fcSmrg# else 436755acc8fcSmrg# ifdef RTLD_NOW 436855acc8fcSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 436955acc8fcSmrg# else 437055acc8fcSmrg# ifdef DL_NOW 437155acc8fcSmrg# define LT_DLLAZY_OR_NOW DL_NOW 437255acc8fcSmrg# else 437355acc8fcSmrg# define LT_DLLAZY_OR_NOW 0 437455acc8fcSmrg# endif 437555acc8fcSmrg# endif 437655acc8fcSmrg# endif 437755acc8fcSmrg# endif 437855acc8fcSmrg#endif 43793da084b3Smrg 438055acc8fcSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 438155acc8fcSmrg correspondingly for the symbols needed. */ 438255acc8fcSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 438355acc8fcSmrgvoid fnord () __attribute__((visibility("default"))); 438455acc8fcSmrg#endif 43853da084b3Smrg 438655acc8fcSmrgvoid fnord () { int i=42; } 438755acc8fcSmrgint main () 438855acc8fcSmrg{ 438955acc8fcSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 439055acc8fcSmrg int status = $lt_dlunknown; 43913da084b3Smrg 439255acc8fcSmrg if (self) 439355acc8fcSmrg { 439455acc8fcSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 439555acc8fcSmrg else 439655acc8fcSmrg { 439755acc8fcSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 439855acc8fcSmrg else puts (dlerror ()); 439955acc8fcSmrg } 440055acc8fcSmrg /* dlclose (self); */ 440155acc8fcSmrg } 440255acc8fcSmrg else 440355acc8fcSmrg puts (dlerror ()); 440455acc8fcSmrg 440555acc8fcSmrg return status; 440655acc8fcSmrg}] 440755acc8fcSmrg_LT_EOF 440855acc8fcSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 440955acc8fcSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 441055acc8fcSmrg lt_status=$? 441155acc8fcSmrg case x$lt_status in 441255acc8fcSmrg x$lt_dlno_uscore) $1 ;; 441355acc8fcSmrg x$lt_dlneed_uscore) $2 ;; 441455acc8fcSmrg x$lt_dlunknown|x*) $3 ;; 4415d63fdb69Smrg esac 441655acc8fcSmrg else : 441755acc8fcSmrg # compilation failed 441855acc8fcSmrg $3 4419d63fdb69Smrg fi 4420d63fdb69Smrgfi 442155acc8fcSmrgrm -fr conftest* 442255acc8fcSmrg])# _LT_TRY_DLOPEN_SELF 44233da084b3Smrg 44243da084b3Smrg 442555acc8fcSmrg# LT_SYS_DLOPEN_SELF 442655acc8fcSmrg# ------------------ 442755acc8fcSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 442855acc8fcSmrg[m4_require([_LT_HEADER_DLFCN])dnl 442955acc8fcSmrgif test "x$enable_dlopen" != xyes; then 443055acc8fcSmrg enable_dlopen=unknown 443155acc8fcSmrg enable_dlopen_self=unknown 443255acc8fcSmrg enable_dlopen_self_static=unknown 443355acc8fcSmrgelse 443455acc8fcSmrg lt_cv_dlopen=no 443555acc8fcSmrg lt_cv_dlopen_libs= 44363da084b3Smrg 4437d63fdb69Smrg case $host_os in 443855acc8fcSmrg beos*) 443955acc8fcSmrg lt_cv_dlopen="load_add_on" 444055acc8fcSmrg lt_cv_dlopen_libs= 444155acc8fcSmrg lt_cv_dlopen_self=yes 444255acc8fcSmrg ;; 444355acc8fcSmrg 444455acc8fcSmrg mingw* | pw32* | cegcc*) 444555acc8fcSmrg lt_cv_dlopen="LoadLibrary" 444655acc8fcSmrg lt_cv_dlopen_libs= 4447d63fdb69Smrg ;; 44483da084b3Smrg 444955acc8fcSmrg cygwin*) 445055acc8fcSmrg lt_cv_dlopen="dlopen" 445155acc8fcSmrg lt_cv_dlopen_libs= 4452d63fdb69Smrg ;; 445355acc8fcSmrg 445455acc8fcSmrg darwin*) 445555acc8fcSmrg # if libdl is installed we need to link against it 445655acc8fcSmrg AC_CHECK_LIB([dl], [dlopen], 445755acc8fcSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 445855acc8fcSmrg lt_cv_dlopen="dyld" 445955acc8fcSmrg lt_cv_dlopen_libs= 446055acc8fcSmrg lt_cv_dlopen_self=yes 446155acc8fcSmrg ]) 4462d63fdb69Smrg ;; 446355acc8fcSmrg 446455acc8fcSmrg *) 446555acc8fcSmrg AC_CHECK_FUNC([shl_load], 446655acc8fcSmrg [lt_cv_dlopen="shl_load"], 446755acc8fcSmrg [AC_CHECK_LIB([dld], [shl_load], 446855acc8fcSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 446955acc8fcSmrg [AC_CHECK_FUNC([dlopen], 447055acc8fcSmrg [lt_cv_dlopen="dlopen"], 447155acc8fcSmrg [AC_CHECK_LIB([dl], [dlopen], 447255acc8fcSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 447355acc8fcSmrg [AC_CHECK_LIB([svld], [dlopen], 447455acc8fcSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 447555acc8fcSmrg [AC_CHECK_LIB([dld], [dld_link], 447655acc8fcSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 447755acc8fcSmrg ]) 447855acc8fcSmrg ]) 447955acc8fcSmrg ]) 448055acc8fcSmrg ]) 448155acc8fcSmrg ]) 4482d63fdb69Smrg ;; 4483d63fdb69Smrg esac 44843da084b3Smrg 448555acc8fcSmrg if test "x$lt_cv_dlopen" != xno; then 448655acc8fcSmrg enable_dlopen=yes 448755acc8fcSmrg else 448855acc8fcSmrg enable_dlopen=no 448955acc8fcSmrg fi 44903da084b3Smrg 449155acc8fcSmrg case $lt_cv_dlopen in 449255acc8fcSmrg dlopen) 449355acc8fcSmrg save_CPPFLAGS="$CPPFLAGS" 449455acc8fcSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 449555acc8fcSmrg 449655acc8fcSmrg save_LDFLAGS="$LDFLAGS" 449755acc8fcSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 449855acc8fcSmrg 449955acc8fcSmrg save_LIBS="$LIBS" 450055acc8fcSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 450155acc8fcSmrg 450255acc8fcSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 450355acc8fcSmrg lt_cv_dlopen_self, [dnl 450455acc8fcSmrg _LT_TRY_DLOPEN_SELF( 450555acc8fcSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 450655acc8fcSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 450755acc8fcSmrg ]) 450855acc8fcSmrg 450955acc8fcSmrg if test "x$lt_cv_dlopen_self" = xyes; then 451055acc8fcSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 451155acc8fcSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 451255acc8fcSmrg lt_cv_dlopen_self_static, [dnl 451355acc8fcSmrg _LT_TRY_DLOPEN_SELF( 451455acc8fcSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 451555acc8fcSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 451655acc8fcSmrg ]) 4517d63fdb69Smrg fi 45183da084b3Smrg 451955acc8fcSmrg CPPFLAGS="$save_CPPFLAGS" 452055acc8fcSmrg LDFLAGS="$save_LDFLAGS" 452155acc8fcSmrg LIBS="$save_LIBS" 452255acc8fcSmrg ;; 452355acc8fcSmrg esac 45243da084b3Smrg 452555acc8fcSmrg case $lt_cv_dlopen_self in 452655acc8fcSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 452755acc8fcSmrg *) enable_dlopen_self=unknown ;; 452855acc8fcSmrg esac 45293da084b3Smrg 453055acc8fcSmrg case $lt_cv_dlopen_self_static in 453155acc8fcSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 453255acc8fcSmrg *) enable_dlopen_self_static=unknown ;; 453355acc8fcSmrg esac 453455acc8fcSmrgfi 453555acc8fcSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 453655acc8fcSmrg [Whether dlopen is supported]) 453755acc8fcSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 453855acc8fcSmrg [Whether dlopen of programs is supported]) 453955acc8fcSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 454055acc8fcSmrg [Whether dlopen of statically linked programs is supported]) 454155acc8fcSmrg])# LT_SYS_DLOPEN_SELF 45423da084b3Smrg 454355acc8fcSmrg# Old name: 454455acc8fcSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 454555acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 454655acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 45473da084b3Smrg 45483da084b3Smrg 454955acc8fcSmrg# _LT_COMPILER_C_O([TAGNAME]) 455055acc8fcSmrg# --------------------------- 455155acc8fcSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 455255acc8fcSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 455355acc8fcSmrgm4_defun([_LT_COMPILER_C_O], 455455acc8fcSmrg[m4_require([_LT_DECL_SED])dnl 455555acc8fcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 455655acc8fcSmrgm4_require([_LT_TAG_COMPILER])dnl 455755acc8fcSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 455855acc8fcSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 455955acc8fcSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 456055acc8fcSmrg $RM -r conftest 2>/dev/null 456155acc8fcSmrg mkdir conftest 456255acc8fcSmrg cd conftest 456355acc8fcSmrg mkdir out 456455acc8fcSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4565d63fdb69Smrg 456655acc8fcSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 456755acc8fcSmrg # Insert the option either (1) after the last *FLAGS variable, or 456855acc8fcSmrg # (2) before a word containing "conftest.", or (3) at the end. 456955acc8fcSmrg # Note that $ac_compile itself does not contain backslashes and begins 457055acc8fcSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 457155acc8fcSmrg lt_compile=`echo "$ac_compile" | $SED \ 457255acc8fcSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 457355acc8fcSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 457455acc8fcSmrg -e 's:$: $lt_compiler_flag:'` 457555acc8fcSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 457655acc8fcSmrg (eval "$lt_compile" 2>out/conftest.err) 457755acc8fcSmrg ac_status=$? 457855acc8fcSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 457955acc8fcSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 458055acc8fcSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 458155acc8fcSmrg then 458255acc8fcSmrg # The compiler can only warn and ignore the option if not recognized 458355acc8fcSmrg # So say no if there are warnings 458455acc8fcSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 458555acc8fcSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 458655acc8fcSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 458755acc8fcSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 458855acc8fcSmrg fi 458955acc8fcSmrg fi 459055acc8fcSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 459155acc8fcSmrg $RM conftest* 459255acc8fcSmrg # SGI C++ compiler will create directory out/ii_files/ for 459355acc8fcSmrg # template instantiation 459455acc8fcSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 459555acc8fcSmrg $RM out/* && rmdir out 459655acc8fcSmrg cd .. 459755acc8fcSmrg $RM -r conftest 459855acc8fcSmrg $RM conftest* 459955acc8fcSmrg]) 460055acc8fcSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 460155acc8fcSmrg [Does compiler simultaneously support -c and -o options?]) 460255acc8fcSmrg])# _LT_COMPILER_C_O 460355acc8fcSmrg 460455acc8fcSmrg 460555acc8fcSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 460655acc8fcSmrg# ---------------------------------- 460755acc8fcSmrg# Check to see if we can do hard links to lock some files if needed 460855acc8fcSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 460955acc8fcSmrg[m4_require([_LT_ENABLE_LOCK])dnl 461055acc8fcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 461155acc8fcSmrg_LT_COMPILER_C_O([$1]) 461255acc8fcSmrg 461355acc8fcSmrghard_links="nottested" 461455acc8fcSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 461555acc8fcSmrg # do not overwrite the value of need_locks provided by the user 461655acc8fcSmrg AC_MSG_CHECKING([if we can lock with hard links]) 461755acc8fcSmrg hard_links=yes 461855acc8fcSmrg $RM conftest* 461955acc8fcSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 462055acc8fcSmrg touch conftest.a 462155acc8fcSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 462255acc8fcSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 462355acc8fcSmrg AC_MSG_RESULT([$hard_links]) 462455acc8fcSmrg if test "$hard_links" = no; then 462555acc8fcSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 462655acc8fcSmrg need_locks=warn 462755acc8fcSmrg fi 462855acc8fcSmrgelse 462955acc8fcSmrg need_locks=no 463055acc8fcSmrgfi 463155acc8fcSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 463255acc8fcSmrg])# _LT_COMPILER_FILE_LOCKS 46333da084b3Smrg 46343da084b3Smrg 463555acc8fcSmrg# _LT_CHECK_OBJDIR 463655acc8fcSmrg# ---------------- 463755acc8fcSmrgm4_defun([_LT_CHECK_OBJDIR], 463855acc8fcSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 463955acc8fcSmrg[rm -f .libs 2>/dev/null 464055acc8fcSmrgmkdir .libs 2>/dev/null 464155acc8fcSmrgif test -d .libs; then 464255acc8fcSmrg lt_cv_objdir=.libs 464355acc8fcSmrgelse 464455acc8fcSmrg # MS-DOS does not allow filenames that begin with a dot. 464555acc8fcSmrg lt_cv_objdir=_libs 464655acc8fcSmrgfi 464755acc8fcSmrgrmdir .libs 2>/dev/null]) 464855acc8fcSmrgobjdir=$lt_cv_objdir 464955acc8fcSmrg_LT_DECL([], [objdir], [0], 465055acc8fcSmrg [The name of the directory that contains temporary libtool files])dnl 465155acc8fcSmrgm4_pattern_allow([LT_OBJDIR])dnl 465255acc8fcSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 465355acc8fcSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 465455acc8fcSmrg])# _LT_CHECK_OBJDIR 46553da084b3Smrg 46563da084b3Smrg 465755acc8fcSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 465855acc8fcSmrg# -------------------------------------- 465955acc8fcSmrg# Check hardcoding attributes. 466055acc8fcSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 466155acc8fcSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 466255acc8fcSmrg_LT_TAGVAR(hardcode_action, $1)= 466355acc8fcSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 466455acc8fcSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 466555acc8fcSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 46663da084b3Smrg 466755acc8fcSmrg # We can hardcode non-existent directories. 466855acc8fcSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 466955acc8fcSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 467055acc8fcSmrg # have to relink, otherwise we might link with an installed library 467155acc8fcSmrg # when we should be linking with a yet-to-be-installed one 467255acc8fcSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 467355acc8fcSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 467455acc8fcSmrg # Linking always hardcodes the temporary library directory. 467555acc8fcSmrg _LT_TAGVAR(hardcode_action, $1)=relink 467655acc8fcSmrg else 467755acc8fcSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 467855acc8fcSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 467955acc8fcSmrg fi 468055acc8fcSmrgelse 468155acc8fcSmrg # We cannot hardcode anything, or else we can only hardcode existing 468255acc8fcSmrg # directories. 468355acc8fcSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 468455acc8fcSmrgfi 468555acc8fcSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 46863da084b3Smrg 468755acc8fcSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 468855acc8fcSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 468955acc8fcSmrg # Fast installation is not supported 469055acc8fcSmrg enable_fast_install=no 469155acc8fcSmrgelif test "$shlibpath_overrides_runpath" = yes || 469255acc8fcSmrg test "$enable_shared" = no; then 469355acc8fcSmrg # Fast installation is not necessary 469455acc8fcSmrg enable_fast_install=needless 469555acc8fcSmrgfi 469655acc8fcSmrg_LT_TAGDECL([], [hardcode_action], [0], 469755acc8fcSmrg [How to hardcode a shared library path into an executable]) 469855acc8fcSmrg])# _LT_LINKER_HARDCODE_LIBPATH 46993da084b3Smrg 47003da084b3Smrg 470155acc8fcSmrg# _LT_CMD_STRIPLIB 470255acc8fcSmrg# ---------------- 470355acc8fcSmrgm4_defun([_LT_CMD_STRIPLIB], 470455acc8fcSmrg[m4_require([_LT_DECL_EGREP]) 470555acc8fcSmrgstriplib= 470655acc8fcSmrgold_striplib= 470755acc8fcSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 470855acc8fcSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 470955acc8fcSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 471055acc8fcSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 471155acc8fcSmrg AC_MSG_RESULT([yes]) 471255acc8fcSmrgelse 471355acc8fcSmrg# FIXME - insert some real tests, host_os isn't really good enough 471455acc8fcSmrg case $host_os in 471555acc8fcSmrg darwin*) 471655acc8fcSmrg if test -n "$STRIP" ; then 471755acc8fcSmrg striplib="$STRIP -x" 471855acc8fcSmrg old_striplib="$STRIP -S" 471955acc8fcSmrg AC_MSG_RESULT([yes]) 472055acc8fcSmrg else 472155acc8fcSmrg AC_MSG_RESULT([no]) 472255acc8fcSmrg fi 472355acc8fcSmrg ;; 472455acc8fcSmrg *) 472555acc8fcSmrg AC_MSG_RESULT([no]) 472655acc8fcSmrg ;; 472755acc8fcSmrg esac 472855acc8fcSmrgfi 472955acc8fcSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 473055acc8fcSmrg_LT_DECL([], [striplib], [1]) 473155acc8fcSmrg])# _LT_CMD_STRIPLIB 47323da084b3Smrg 47333da084b3Smrg 473455acc8fcSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 473555acc8fcSmrg# ----------------------------- 473655acc8fcSmrg# PORTME Fill in your ld.so characteristics 473755acc8fcSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 473855acc8fcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 473955acc8fcSmrgm4_require([_LT_DECL_EGREP])dnl 474055acc8fcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 474155acc8fcSmrgm4_require([_LT_DECL_OBJDUMP])dnl 474255acc8fcSmrgm4_require([_LT_DECL_SED])dnl 474355acc8fcSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 474455acc8fcSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 474555acc8fcSmrgm4_if([$1], 474655acc8fcSmrg [], [ 474755acc8fcSmrgif test "$GCC" = yes; then 474855acc8fcSmrg case $host_os in 474955acc8fcSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 475055acc8fcSmrg *) lt_awk_arg="/^libraries:/" ;; 475155acc8fcSmrg esac 475255acc8fcSmrg case $host_os in 475355acc8fcSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 475455acc8fcSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 475555acc8fcSmrg esac 475655acc8fcSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 475755acc8fcSmrg case $lt_search_path_spec in 475855acc8fcSmrg *\;*) 475955acc8fcSmrg # if the path contains ";" then we assume it to be the separator 476055acc8fcSmrg # otherwise default to the standard path separator (i.e. ":") - it is 476155acc8fcSmrg # assumed that no part of a normal pathname contains ";" but that should 476255acc8fcSmrg # okay in the real world where ";" in dirpaths is itself problematic. 476355acc8fcSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 476455acc8fcSmrg ;; 476555acc8fcSmrg *) 476655acc8fcSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 476755acc8fcSmrg ;; 476855acc8fcSmrg esac 476955acc8fcSmrg # Ok, now we have the path, separated by spaces, we can step through it 477055acc8fcSmrg # and add multilib dir if necessary. 477155acc8fcSmrg lt_tmp_lt_search_path_spec= 477255acc8fcSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 477355acc8fcSmrg for lt_sys_path in $lt_search_path_spec; do 477455acc8fcSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 477555acc8fcSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 477655acc8fcSmrg else 477755acc8fcSmrg test -d "$lt_sys_path" && \ 477855acc8fcSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 477955acc8fcSmrg fi 478055acc8fcSmrg done 478155acc8fcSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 478255acc8fcSmrgBEGIN {RS=" "; FS="/|\n";} { 478355acc8fcSmrg lt_foo=""; 478455acc8fcSmrg lt_count=0; 478555acc8fcSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 478655acc8fcSmrg if ($lt_i != "" && $lt_i != ".") { 478755acc8fcSmrg if ($lt_i == "..") { 478855acc8fcSmrg lt_count++; 478955acc8fcSmrg } else { 479055acc8fcSmrg if (lt_count == 0) { 479155acc8fcSmrg lt_foo="/" $lt_i lt_foo; 479255acc8fcSmrg } else { 479355acc8fcSmrg lt_count--; 479455acc8fcSmrg } 479555acc8fcSmrg } 479655acc8fcSmrg } 479755acc8fcSmrg } 479855acc8fcSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 479955acc8fcSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 480055acc8fcSmrg}'` 480155acc8fcSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 480255acc8fcSmrg # for these hosts. 480355acc8fcSmrg case $host_os in 480455acc8fcSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 480555acc8fcSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 480655acc8fcSmrg esac 480755acc8fcSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 480855acc8fcSmrgelse 480955acc8fcSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 481055acc8fcSmrgfi]) 481155acc8fcSmrglibrary_names_spec= 481255acc8fcSmrglibname_spec='lib$name' 481355acc8fcSmrgsoname_spec= 481455acc8fcSmrgshrext_cmds=".so" 481555acc8fcSmrgpostinstall_cmds= 481655acc8fcSmrgpostuninstall_cmds= 481755acc8fcSmrgfinish_cmds= 481855acc8fcSmrgfinish_eval= 481955acc8fcSmrgshlibpath_var= 482055acc8fcSmrgshlibpath_overrides_runpath=unknown 482155acc8fcSmrgversion_type=none 482255acc8fcSmrgdynamic_linker="$host_os ld.so" 482355acc8fcSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 482455acc8fcSmrgneed_lib_prefix=unknown 482555acc8fcSmrghardcode_into_libs=no 482655acc8fcSmrg 482755acc8fcSmrg# when you set need_version to no, make sure it does not cause -set_version 482855acc8fcSmrg# flags to be left without arguments 482955acc8fcSmrgneed_version=unknown 48303da084b3Smrg 483155acc8fcSmrgcase $host_os in 483255acc8fcSmrgaix3*) 483355acc8fcSmrg version_type=linux 483455acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 483555acc8fcSmrg shlibpath_var=LIBPATH 48363da084b3Smrg 483755acc8fcSmrg # AIX 3 has no versioning support, so we append a major version to the name. 483855acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 483955acc8fcSmrg ;; 48403da084b3Smrg 484155acc8fcSmrgaix[[4-9]]*) 484255acc8fcSmrg version_type=linux 484355acc8fcSmrg need_lib_prefix=no 484455acc8fcSmrg need_version=no 484555acc8fcSmrg hardcode_into_libs=yes 484655acc8fcSmrg if test "$host_cpu" = ia64; then 484755acc8fcSmrg # AIX 5 supports IA64 484855acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 484955acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 485055acc8fcSmrg else 485155acc8fcSmrg # With GCC up to 2.95.x, collect2 would create an import file 485255acc8fcSmrg # for dependence libraries. The import file would start with 485355acc8fcSmrg # the line `#! .'. This would cause the generated library to 485455acc8fcSmrg # depend on `.', always an invalid library. This was fixed in 485555acc8fcSmrg # development snapshots of GCC prior to 3.0. 485655acc8fcSmrg case $host_os in 485755acc8fcSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 485855acc8fcSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 485955acc8fcSmrg echo ' yes ' 486055acc8fcSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 486155acc8fcSmrg : 4862d63fdb69Smrg else 486355acc8fcSmrg can_build_shared=no 4864d63fdb69Smrg fi 4865d63fdb69Smrg ;; 4866d63fdb69Smrg esac 486755acc8fcSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 486855acc8fcSmrg # soname into executable. Probably we can add versioning support to 486955acc8fcSmrg # collect2, so additional links can be useful in future. 487055acc8fcSmrg if test "$aix_use_runtimelinking" = yes; then 487155acc8fcSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 487255acc8fcSmrg # instead of lib<name>.a to let people know that these are not 487355acc8fcSmrg # typical AIX shared libraries. 487455acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 487555acc8fcSmrg else 487655acc8fcSmrg # We preserve .a as extension for shared libraries through AIX4.2 487755acc8fcSmrg # and later when we are not doing run time linking. 487855acc8fcSmrg library_names_spec='${libname}${release}.a $libname.a' 487955acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 4880d63fdb69Smrg fi 488155acc8fcSmrg shlibpath_var=LIBPATH 488255acc8fcSmrg fi 488355acc8fcSmrg ;; 48843da084b3Smrg 488555acc8fcSmrgamigaos*) 488655acc8fcSmrg case $host_cpu in 488755acc8fcSmrg powerpc) 488855acc8fcSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 488955acc8fcSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 489055acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 489155acc8fcSmrg ;; 489255acc8fcSmrg m68k) 489355acc8fcSmrg library_names_spec='$libname.ixlibrary $libname.a' 489455acc8fcSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 489555acc8fcSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 489655acc8fcSmrg ;; 489755acc8fcSmrg esac 489855acc8fcSmrg ;; 48993da084b3Smrg 490055acc8fcSmrgbeos*) 490155acc8fcSmrg library_names_spec='${libname}${shared_ext}' 490255acc8fcSmrg dynamic_linker="$host_os ld.so" 490355acc8fcSmrg shlibpath_var=LIBRARY_PATH 490455acc8fcSmrg ;; 49053da084b3Smrg 490655acc8fcSmrgbsdi[[45]]*) 490755acc8fcSmrg version_type=linux 490855acc8fcSmrg need_version=no 490955acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 491055acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 491155acc8fcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 491255acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 491355acc8fcSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 491455acc8fcSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 491555acc8fcSmrg # the default ld.so.conf also contains /usr/contrib/lib and 491655acc8fcSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 491755acc8fcSmrg # libtool to hard-code these into programs 491855acc8fcSmrg ;; 49193da084b3Smrg 492055acc8fcSmrgcygwin* | mingw* | pw32* | cegcc*) 492155acc8fcSmrg version_type=windows 492255acc8fcSmrg shrext_cmds=".dll" 492355acc8fcSmrg need_version=no 492455acc8fcSmrg need_lib_prefix=no 49253da084b3Smrg 492655acc8fcSmrg case $GCC,$host_os in 492755acc8fcSmrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 492855acc8fcSmrg library_names_spec='$libname.dll.a' 492955acc8fcSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 493055acc8fcSmrg postinstall_cmds='base_file=`basename \${file}`~ 493155acc8fcSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 493255acc8fcSmrg dldir=$destdir/`dirname \$dlpath`~ 493355acc8fcSmrg test -d \$dldir || mkdir -p \$dldir~ 493455acc8fcSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 493555acc8fcSmrg chmod a+x \$dldir/$dlname~ 493655acc8fcSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 493755acc8fcSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 493855acc8fcSmrg fi' 493955acc8fcSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 494055acc8fcSmrg dlpath=$dir/\$dldll~ 494155acc8fcSmrg $RM \$dlpath' 494255acc8fcSmrg shlibpath_overrides_runpath=yes 49433da084b3Smrg 494455acc8fcSmrg case $host_os in 494555acc8fcSmrg cygwin*) 494655acc8fcSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 494755acc8fcSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 494855acc8fcSmrgm4_if([$1], [],[ 494955acc8fcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 4950d63fdb69Smrg ;; 495155acc8fcSmrg mingw* | cegcc*) 495255acc8fcSmrg # MinGW DLLs use traditional 'lib' prefix 495355acc8fcSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4954d63fdb69Smrg ;; 495555acc8fcSmrg pw32*) 495655acc8fcSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 495755acc8fcSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4958d63fdb69Smrg ;; 495955acc8fcSmrg esac 496055acc8fcSmrg ;; 49613da084b3Smrg 496255acc8fcSmrg *) 496355acc8fcSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 496455acc8fcSmrg ;; 496555acc8fcSmrg esac 496655acc8fcSmrg dynamic_linker='Win32 ld.exe' 496755acc8fcSmrg # FIXME: first we should search . and the directory the executable is in 496855acc8fcSmrg shlibpath_var=PATH 496955acc8fcSmrg ;; 49703da084b3Smrg 497155acc8fcSmrgdarwin* | rhapsody*) 497255acc8fcSmrg dynamic_linker="$host_os dyld" 497355acc8fcSmrg version_type=darwin 497455acc8fcSmrg need_lib_prefix=no 497555acc8fcSmrg need_version=no 497655acc8fcSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 497755acc8fcSmrg soname_spec='${libname}${release}${major}$shared_ext' 497855acc8fcSmrg shlibpath_overrides_runpath=yes 497955acc8fcSmrg shlibpath_var=DYLD_LIBRARY_PATH 498055acc8fcSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 498155acc8fcSmrgm4_if([$1], [],[ 498255acc8fcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 498355acc8fcSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 498455acc8fcSmrg ;; 49853da084b3Smrg 498655acc8fcSmrgdgux*) 498755acc8fcSmrg version_type=linux 498855acc8fcSmrg need_lib_prefix=no 498955acc8fcSmrg need_version=no 499055acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 499155acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 499255acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 499355acc8fcSmrg ;; 49943da084b3Smrg 499555acc8fcSmrgfreebsd1*) 499655acc8fcSmrg dynamic_linker=no 499755acc8fcSmrg ;; 49983da084b3Smrg 499955acc8fcSmrgfreebsd* | dragonfly*) 500055acc8fcSmrg # DragonFly does not have aout. When/if they implement a new 500155acc8fcSmrg # versioning mechanism, adjust this. 500255acc8fcSmrg if test -x /usr/bin/objformat; then 500355acc8fcSmrg objformat=`/usr/bin/objformat` 500455acc8fcSmrg else 500555acc8fcSmrg case $host_os in 500655acc8fcSmrg freebsd[[123]]*) objformat=aout ;; 500755acc8fcSmrg *) objformat=elf ;; 500855acc8fcSmrg esac 500955acc8fcSmrg fi 501055acc8fcSmrg version_type=freebsd-$objformat 501155acc8fcSmrg case $version_type in 501255acc8fcSmrg freebsd-elf*) 501355acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 501455acc8fcSmrg need_version=no 501555acc8fcSmrg need_lib_prefix=no 501655acc8fcSmrg ;; 501755acc8fcSmrg freebsd-*) 501855acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 501955acc8fcSmrg need_version=yes 5020d63fdb69Smrg ;; 502155acc8fcSmrg esac 502255acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 502355acc8fcSmrg case $host_os in 502455acc8fcSmrg freebsd2*) 502555acc8fcSmrg shlibpath_overrides_runpath=yes 502655acc8fcSmrg ;; 502755acc8fcSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 502855acc8fcSmrg shlibpath_overrides_runpath=yes 502955acc8fcSmrg hardcode_into_libs=yes 503055acc8fcSmrg ;; 503155acc8fcSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 503255acc8fcSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 503355acc8fcSmrg shlibpath_overrides_runpath=no 503455acc8fcSmrg hardcode_into_libs=yes 503555acc8fcSmrg ;; 503655acc8fcSmrg *) # from 4.6 on, and DragonFly 503755acc8fcSmrg shlibpath_overrides_runpath=yes 503855acc8fcSmrg hardcode_into_libs=yes 503955acc8fcSmrg ;; 504055acc8fcSmrg esac 504155acc8fcSmrg ;; 504255acc8fcSmrg 504355acc8fcSmrggnu*) 504455acc8fcSmrg version_type=linux 504555acc8fcSmrg need_lib_prefix=no 504655acc8fcSmrg need_version=no 504755acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 504855acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 504955acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 505055acc8fcSmrg hardcode_into_libs=yes 505155acc8fcSmrg ;; 505255acc8fcSmrg 505355acc8fcSmrghaiku*) 505455acc8fcSmrg version_type=linux 505555acc8fcSmrg need_lib_prefix=no 505655acc8fcSmrg need_version=no 505755acc8fcSmrg dynamic_linker="$host_os runtime_loader" 505855acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 505955acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 506055acc8fcSmrg shlibpath_var=LIBRARY_PATH 506155acc8fcSmrg shlibpath_overrides_runpath=yes 506255acc8fcSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 506355acc8fcSmrg hardcode_into_libs=yes 506455acc8fcSmrg ;; 50653da084b3Smrg 506655acc8fcSmrghpux9* | hpux10* | hpux11*) 506755acc8fcSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 506855acc8fcSmrg # link against other versions. 506955acc8fcSmrg version_type=sunos 507055acc8fcSmrg need_lib_prefix=no 507155acc8fcSmrg need_version=no 507255acc8fcSmrg case $host_cpu in 507355acc8fcSmrg ia64*) 507455acc8fcSmrg shrext_cmds='.so' 507555acc8fcSmrg hardcode_into_libs=yes 507655acc8fcSmrg dynamic_linker="$host_os dld.so" 507755acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 507855acc8fcSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 507955acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 508055acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 508155acc8fcSmrg if test "X$HPUX_IA64_MODE" = X32; then 508255acc8fcSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 508355acc8fcSmrg else 508455acc8fcSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 508555acc8fcSmrg fi 508655acc8fcSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 508755acc8fcSmrg ;; 508855acc8fcSmrg hppa*64*) 508955acc8fcSmrg shrext_cmds='.sl' 509055acc8fcSmrg hardcode_into_libs=yes 509155acc8fcSmrg dynamic_linker="$host_os dld.sl" 509255acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 509355acc8fcSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 509455acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 509555acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 509655acc8fcSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 509755acc8fcSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 509855acc8fcSmrg ;; 509955acc8fcSmrg *) 510055acc8fcSmrg shrext_cmds='.sl' 510155acc8fcSmrg dynamic_linker="$host_os dld.sl" 510255acc8fcSmrg shlibpath_var=SHLIB_PATH 510355acc8fcSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 510455acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 510555acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 510655acc8fcSmrg ;; 510755acc8fcSmrg esac 510855acc8fcSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 510955acc8fcSmrg postinstall_cmds='chmod 555 $lib' 511055acc8fcSmrg # or fails outright, so override atomically: 511155acc8fcSmrg install_override_mode=555 511255acc8fcSmrg ;; 51133da084b3Smrg 511455acc8fcSmrginterix[[3-9]]*) 511555acc8fcSmrg version_type=linux 511655acc8fcSmrg need_lib_prefix=no 511755acc8fcSmrg need_version=no 511855acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 511955acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 512055acc8fcSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 512155acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 512255acc8fcSmrg shlibpath_overrides_runpath=no 512355acc8fcSmrg hardcode_into_libs=yes 512455acc8fcSmrg ;; 51253da084b3Smrg 512655acc8fcSmrgirix5* | irix6* | nonstopux*) 512755acc8fcSmrg case $host_os in 512855acc8fcSmrg nonstopux*) version_type=nonstopux ;; 512955acc8fcSmrg *) 513055acc8fcSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 513155acc8fcSmrg version_type=linux 513255acc8fcSmrg else 513355acc8fcSmrg version_type=irix 513455acc8fcSmrg fi ;; 513555acc8fcSmrg esac 513655acc8fcSmrg need_lib_prefix=no 513755acc8fcSmrg need_version=no 513855acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 513955acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 514055acc8fcSmrg case $host_os in 514155acc8fcSmrg irix5* | nonstopux*) 514255acc8fcSmrg libsuff= shlibsuff= 514355acc8fcSmrg ;; 514455acc8fcSmrg *) 514555acc8fcSmrg case $LD in # libtool.m4 will add one of these switches to LD 514655acc8fcSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 514755acc8fcSmrg libsuff= shlibsuff= libmagic=32-bit;; 514855acc8fcSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 514955acc8fcSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 515055acc8fcSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 515155acc8fcSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 515255acc8fcSmrg *) libsuff= shlibsuff= libmagic=never-match;; 515355acc8fcSmrg esac 515455acc8fcSmrg ;; 515555acc8fcSmrg esac 515655acc8fcSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 515755acc8fcSmrg shlibpath_overrides_runpath=no 515855acc8fcSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 515955acc8fcSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 516055acc8fcSmrg hardcode_into_libs=yes 516155acc8fcSmrg ;; 51623da084b3Smrg 516355acc8fcSmrg# No shared lib support for Linux oldld, aout, or coff. 516455acc8fcSmrglinux*oldld* | linux*aout* | linux*coff*) 516555acc8fcSmrg dynamic_linker=no 516655acc8fcSmrg ;; 51673da084b3Smrg 516855acc8fcSmrg# This must be Linux ELF. 516955acc8fcSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 517055acc8fcSmrg version_type=linux 517155acc8fcSmrg need_lib_prefix=no 517255acc8fcSmrg need_version=no 517355acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 517455acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 517555acc8fcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 517655acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 517755acc8fcSmrg shlibpath_overrides_runpath=no 51783da084b3Smrg 517955acc8fcSmrg # Some binutils ld are patched to set DT_RUNPATH 518055acc8fcSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 518155acc8fcSmrg [lt_cv_shlibpath_overrides_runpath=no 518255acc8fcSmrg save_LDFLAGS=$LDFLAGS 518355acc8fcSmrg save_libdir=$libdir 518455acc8fcSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 518555acc8fcSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 518655acc8fcSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 518755acc8fcSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 518855acc8fcSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 518955acc8fcSmrg LDFLAGS=$save_LDFLAGS 519055acc8fcSmrg libdir=$save_libdir 519155acc8fcSmrg ]) 519255acc8fcSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 51933da084b3Smrg 519455acc8fcSmrg # This implies no fast_install, which is unacceptable. 519555acc8fcSmrg # Some rework will be needed to allow for fast_install 519655acc8fcSmrg # before this can be enabled. 519755acc8fcSmrg hardcode_into_libs=yes 51983da084b3Smrg 519955acc8fcSmrg # Append ld.so.conf contents to the search path 520055acc8fcSmrg if test -f /etc/ld.so.conf; then 520155acc8fcSmrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 520255acc8fcSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 520355acc8fcSmrg fi 52043da084b3Smrg 520555acc8fcSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 520655acc8fcSmrg # powerpc, because MkLinux only supported shared libraries with the 520755acc8fcSmrg # GNU dynamic linker. Since this was broken with cross compilers, 520855acc8fcSmrg # most powerpc-linux boxes support dynamic linking these days and 520955acc8fcSmrg # people can always --disable-shared, the test was removed, and we 521055acc8fcSmrg # assume the GNU/Linux dynamic linker is in use. 521155acc8fcSmrg dynamic_linker='GNU/Linux ld.so' 521255acc8fcSmrg ;; 52133da084b3Smrg 521455acc8fcSmrgnetbsd*) 521555acc8fcSmrg version_type=sunos 521655acc8fcSmrg need_lib_prefix=no 521755acc8fcSmrg need_version=no 521855acc8fcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 521955acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 522055acc8fcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 522155acc8fcSmrg dynamic_linker='NetBSD (a.out) ld.so' 522255acc8fcSmrg else 522355acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 522455acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 522555acc8fcSmrg dynamic_linker='NetBSD ld.elf_so' 522655acc8fcSmrg fi 522755acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 522855acc8fcSmrg shlibpath_overrides_runpath=yes 522955acc8fcSmrg hardcode_into_libs=yes 523055acc8fcSmrg ;; 52313da084b3Smrg 523255acc8fcSmrgnewsos6) 523355acc8fcSmrg version_type=linux 523455acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 523555acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 523655acc8fcSmrg shlibpath_overrides_runpath=yes 523755acc8fcSmrg ;; 52383da084b3Smrg 523955acc8fcSmrg*nto* | *qnx*) 524055acc8fcSmrg version_type=qnx 524155acc8fcSmrg need_lib_prefix=no 524255acc8fcSmrg need_version=no 524355acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 524455acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 524555acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 524655acc8fcSmrg shlibpath_overrides_runpath=no 524755acc8fcSmrg hardcode_into_libs=yes 524855acc8fcSmrg dynamic_linker='ldqnx.so' 524955acc8fcSmrg ;; 52503da084b3Smrg 525155acc8fcSmrgopenbsd*) 525255acc8fcSmrg version_type=sunos 525355acc8fcSmrg sys_lib_dlsearch_path_spec="/usr/lib" 525455acc8fcSmrg need_lib_prefix=no 525555acc8fcSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 525655acc8fcSmrg case $host_os in 525755acc8fcSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 525855acc8fcSmrg *) need_version=no ;; 525955acc8fcSmrg esac 526055acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 526155acc8fcSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 526255acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 526355acc8fcSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 526455acc8fcSmrg case $host_os in 526555acc8fcSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 526655acc8fcSmrg shlibpath_overrides_runpath=no 526755acc8fcSmrg ;; 5268d63fdb69Smrg *) 526955acc8fcSmrg shlibpath_overrides_runpath=yes 5270d63fdb69Smrg ;; 5271d63fdb69Smrg esac 527255acc8fcSmrg else 527355acc8fcSmrg shlibpath_overrides_runpath=yes 527455acc8fcSmrg fi 527555acc8fcSmrg ;; 52763da084b3Smrg 527755acc8fcSmrgos2*) 527855acc8fcSmrg libname_spec='$name' 527955acc8fcSmrg shrext_cmds=".dll" 528055acc8fcSmrg need_lib_prefix=no 528155acc8fcSmrg library_names_spec='$libname${shared_ext} $libname.a' 528255acc8fcSmrg dynamic_linker='OS/2 ld.exe' 528355acc8fcSmrg shlibpath_var=LIBPATH 528455acc8fcSmrg ;; 52853da084b3Smrg 528655acc8fcSmrgosf3* | osf4* | osf5*) 528755acc8fcSmrg version_type=osf 528855acc8fcSmrg need_lib_prefix=no 528955acc8fcSmrg need_version=no 529055acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 529155acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 529255acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 529355acc8fcSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 529455acc8fcSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 529555acc8fcSmrg ;; 52963da084b3Smrg 529755acc8fcSmrgrdos*) 529855acc8fcSmrg dynamic_linker=no 529955acc8fcSmrg ;; 53003da084b3Smrg 530155acc8fcSmrgsolaris*) 530255acc8fcSmrg version_type=linux 530355acc8fcSmrg need_lib_prefix=no 530455acc8fcSmrg need_version=no 530555acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 530655acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 530755acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 530855acc8fcSmrg shlibpath_overrides_runpath=yes 530955acc8fcSmrg hardcode_into_libs=yes 531055acc8fcSmrg # ldd complains unless libraries are executable 531155acc8fcSmrg postinstall_cmds='chmod +x $lib' 531255acc8fcSmrg ;; 53133da084b3Smrg 531455acc8fcSmrgsunos4*) 531555acc8fcSmrg version_type=sunos 531655acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 531755acc8fcSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 531855acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 531955acc8fcSmrg shlibpath_overrides_runpath=yes 532055acc8fcSmrg if test "$with_gnu_ld" = yes; then 532155acc8fcSmrg need_lib_prefix=no 532255acc8fcSmrg fi 532355acc8fcSmrg need_version=yes 532455acc8fcSmrg ;; 53253da084b3Smrg 532655acc8fcSmrgsysv4 | sysv4.3*) 532755acc8fcSmrg version_type=linux 532855acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 532955acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 533055acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 533155acc8fcSmrg case $host_vendor in 533255acc8fcSmrg sni) 533355acc8fcSmrg shlibpath_overrides_runpath=no 533455acc8fcSmrg need_lib_prefix=no 533555acc8fcSmrg runpath_var=LD_RUN_PATH 5336d63fdb69Smrg ;; 533755acc8fcSmrg siemens) 533855acc8fcSmrg need_lib_prefix=no 533955acc8fcSmrg ;; 534055acc8fcSmrg motorola) 534155acc8fcSmrg need_lib_prefix=no 534255acc8fcSmrg need_version=no 534355acc8fcSmrg shlibpath_overrides_runpath=no 534455acc8fcSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 534555acc8fcSmrg ;; 534655acc8fcSmrg esac 534755acc8fcSmrg ;; 53483da084b3Smrg 534955acc8fcSmrgsysv4*MP*) 535055acc8fcSmrg if test -d /usr/nec ;then 535155acc8fcSmrg version_type=linux 535255acc8fcSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 535355acc8fcSmrg soname_spec='$libname${shared_ext}.$major' 535455acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 535555acc8fcSmrg fi 535655acc8fcSmrg ;; 535755acc8fcSmrg 535855acc8fcSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 535955acc8fcSmrg version_type=freebsd-elf 536055acc8fcSmrg need_lib_prefix=no 536155acc8fcSmrg need_version=no 536255acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 536355acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 536455acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 536555acc8fcSmrg shlibpath_overrides_runpath=yes 536655acc8fcSmrg hardcode_into_libs=yes 536755acc8fcSmrg if test "$with_gnu_ld" = yes; then 536855acc8fcSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 536955acc8fcSmrg else 537055acc8fcSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 537155acc8fcSmrg case $host_os in 537255acc8fcSmrg sco3.2v5*) 537355acc8fcSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 537455acc8fcSmrg ;; 537555acc8fcSmrg esac 537655acc8fcSmrg fi 537755acc8fcSmrg sys_lib_dlsearch_path_spec='/usr/lib' 537855acc8fcSmrg ;; 53793da084b3Smrg 538055acc8fcSmrgtpf*) 538155acc8fcSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 538255acc8fcSmrg version_type=linux 538355acc8fcSmrg need_lib_prefix=no 538455acc8fcSmrg need_version=no 538555acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 538655acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 538755acc8fcSmrg shlibpath_overrides_runpath=no 538855acc8fcSmrg hardcode_into_libs=yes 538955acc8fcSmrg ;; 53903da084b3Smrg 539155acc8fcSmrguts4*) 539255acc8fcSmrg version_type=linux 539355acc8fcSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 539455acc8fcSmrg soname_spec='${libname}${release}${shared_ext}$major' 539555acc8fcSmrg shlibpath_var=LD_LIBRARY_PATH 539655acc8fcSmrg ;; 5397d63fdb69Smrg 539855acc8fcSmrg*) 539955acc8fcSmrg dynamic_linker=no 540055acc8fcSmrg ;; 540155acc8fcSmrgesac 540255acc8fcSmrgAC_MSG_RESULT([$dynamic_linker]) 540355acc8fcSmrgtest "$dynamic_linker" = no && can_build_shared=no 5404d63fdb69Smrg 540555acc8fcSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 540655acc8fcSmrgif test "$GCC" = yes; then 540755acc8fcSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 540855acc8fcSmrgfi 5409d63fdb69Smrg 541055acc8fcSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 541155acc8fcSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 541255acc8fcSmrgfi 541355acc8fcSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 541455acc8fcSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 541555acc8fcSmrgfi 5416d63fdb69Smrg 541755acc8fcSmrg_LT_DECL([], [variables_saved_for_relink], [1], 541855acc8fcSmrg [Variables whose values should be saved in libtool wrapper scripts and 541955acc8fcSmrg restored at link time]) 542055acc8fcSmrg_LT_DECL([], [need_lib_prefix], [0], 542155acc8fcSmrg [Do we need the "lib" prefix for modules?]) 542255acc8fcSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 542355acc8fcSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 542455acc8fcSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 542555acc8fcSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 542655acc8fcSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 542755acc8fcSmrg [Is shlibpath searched before the hard-coded library search path?]) 542855acc8fcSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 542955acc8fcSmrg_LT_DECL([], [library_names_spec], [1], 543055acc8fcSmrg [[List of archive names. First name is the real one, the rest are links. 543155acc8fcSmrg The last name is the one that the linker finds with -lNAME]]) 543255acc8fcSmrg_LT_DECL([], [soname_spec], [1], 543355acc8fcSmrg [[The coded name of the library, if different from the real name]]) 543455acc8fcSmrg_LT_DECL([], [install_override_mode], [1], 543555acc8fcSmrg [Permission mode override for installation of shared libraries]) 543655acc8fcSmrg_LT_DECL([], [postinstall_cmds], [2], 543755acc8fcSmrg [Command to use after installation of a shared archive]) 543855acc8fcSmrg_LT_DECL([], [postuninstall_cmds], [2], 543955acc8fcSmrg [Command to use after uninstallation of a shared archive]) 544055acc8fcSmrg_LT_DECL([], [finish_cmds], [2], 544155acc8fcSmrg [Commands used to finish a libtool library installation in a directory]) 544255acc8fcSmrg_LT_DECL([], [finish_eval], [1], 544355acc8fcSmrg [[As "finish_cmds", except a single script fragment to be evaled but 544455acc8fcSmrg not shown]]) 544555acc8fcSmrg_LT_DECL([], [hardcode_into_libs], [0], 544655acc8fcSmrg [Whether we should hardcode library paths into libraries]) 544755acc8fcSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 544855acc8fcSmrg [Compile-time system search path for libraries]) 544955acc8fcSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 545055acc8fcSmrg [Run-time system search path for libraries]) 545155acc8fcSmrg])# _LT_SYS_DYNAMIC_LINKER 5452d63fdb69Smrg 5453d63fdb69Smrg 545455acc8fcSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 545555acc8fcSmrg# -------------------------- 545655acc8fcSmrg# find a file program which can recognize shared library 545755acc8fcSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 545855acc8fcSmrg[m4_require([_LT_DECL_EGREP])dnl 545955acc8fcSmrgAC_MSG_CHECKING([for $1]) 546055acc8fcSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 546155acc8fcSmrg[case $MAGIC_CMD in 546255acc8fcSmrg[[\\/*] | ?:[\\/]*]) 546355acc8fcSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 54643da084b3Smrg ;; 546555acc8fcSmrg*) 546655acc8fcSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 546755acc8fcSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 546855acc8fcSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 546955acc8fcSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 547055acc8fcSmrgdnl not every word. This closes a longstanding sh security hole. 547155acc8fcSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 547255acc8fcSmrg for ac_dir in $ac_dummy; do 547355acc8fcSmrg IFS="$lt_save_ifs" 547455acc8fcSmrg test -z "$ac_dir" && ac_dir=. 547555acc8fcSmrg if test -f $ac_dir/$1; then 547655acc8fcSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 547755acc8fcSmrg if test -n "$file_magic_test_file"; then 547855acc8fcSmrg case $deplibs_check_method in 547955acc8fcSmrg "file_magic "*) 548055acc8fcSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 548155acc8fcSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 548255acc8fcSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 548355acc8fcSmrg $EGREP "$file_magic_regex" > /dev/null; then 548455acc8fcSmrg : 548555acc8fcSmrg else 548655acc8fcSmrg cat <<_LT_EOF 1>&2 54873da084b3Smrg 548855acc8fcSmrg*** Warning: the command libtool uses to detect shared libraries, 548955acc8fcSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 549055acc8fcSmrg*** The result is that libtool may fail to recognize shared libraries 549155acc8fcSmrg*** as such. This will affect the creation of libtool libraries that 549255acc8fcSmrg*** depend on shared libraries, but programs linked with such libtool 549355acc8fcSmrg*** libraries will work regardless of this problem. Nevertheless, you 549455acc8fcSmrg*** may want to report the problem to your system manager and/or to 549555acc8fcSmrg*** bug-libtool@gnu.org 549655acc8fcSmrg 549755acc8fcSmrg_LT_EOF 549855acc8fcSmrg fi ;; 549955acc8fcSmrg esac 550055acc8fcSmrg fi 550155acc8fcSmrg break 550255acc8fcSmrg fi 550355acc8fcSmrg done 550455acc8fcSmrg IFS="$lt_save_ifs" 550555acc8fcSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 550655acc8fcSmrg ;; 550755acc8fcSmrgesac]) 550855acc8fcSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 550955acc8fcSmrgif test -n "$MAGIC_CMD"; then 551055acc8fcSmrg AC_MSG_RESULT($MAGIC_CMD) 551155acc8fcSmrgelse 551255acc8fcSmrg AC_MSG_RESULT(no) 551355acc8fcSmrgfi 551455acc8fcSmrg_LT_DECL([], [MAGIC_CMD], [0], 551555acc8fcSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 551655acc8fcSmrg])# _LT_PATH_TOOL_PREFIX 5517d63fdb69Smrg 551855acc8fcSmrg# Old name: 551955acc8fcSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 552055acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 552155acc8fcSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 5522d63fdb69Smrg 55233da084b3Smrg 552455acc8fcSmrg# _LT_PATH_MAGIC 552555acc8fcSmrg# -------------- 552655acc8fcSmrg# find a file program which can recognize a shared library 552755acc8fcSmrgm4_defun([_LT_PATH_MAGIC], 552855acc8fcSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 552955acc8fcSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 553055acc8fcSmrg if test -n "$ac_tool_prefix"; then 553155acc8fcSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 553255acc8fcSmrg else 553355acc8fcSmrg MAGIC_CMD=: 553455acc8fcSmrg fi 553555acc8fcSmrgfi 553655acc8fcSmrg])# _LT_PATH_MAGIC 55373da084b3Smrg 55383da084b3Smrg 553955acc8fcSmrg# LT_PATH_LD 554055acc8fcSmrg# ---------- 554155acc8fcSmrg# find the pathname to the GNU or non-GNU linker 554255acc8fcSmrgAC_DEFUN([LT_PATH_LD], 554355acc8fcSmrg[AC_REQUIRE([AC_PROG_CC])dnl 554455acc8fcSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 554555acc8fcSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 554655acc8fcSmrgm4_require([_LT_DECL_SED])dnl 554755acc8fcSmrgm4_require([_LT_DECL_EGREP])dnl 554855acc8fcSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 55493da084b3Smrg 555055acc8fcSmrgAC_ARG_WITH([gnu-ld], 555155acc8fcSmrg [AS_HELP_STRING([--with-gnu-ld], 555255acc8fcSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 555355acc8fcSmrg [test "$withval" = no || with_gnu_ld=yes], 555455acc8fcSmrg [with_gnu_ld=no])dnl 55553da084b3Smrg 555655acc8fcSmrgac_prog=ld 555755acc8fcSmrgif test "$GCC" = yes; then 555855acc8fcSmrg # Check if gcc -print-prog-name=ld gives a path. 555955acc8fcSmrg AC_MSG_CHECKING([for ld used by $CC]) 556055acc8fcSmrg case $host in 556155acc8fcSmrg *-*-mingw*) 556255acc8fcSmrg # gcc leaves a trailing carriage return which upsets mingw 556355acc8fcSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 556455acc8fcSmrg *) 556555acc8fcSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 556655acc8fcSmrg esac 556755acc8fcSmrg case $ac_prog in 556855acc8fcSmrg # Accept absolute paths. 556955acc8fcSmrg [[\\/]]* | ?:[[\\/]]*) 557055acc8fcSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 557155acc8fcSmrg # Canonicalize the pathname of ld 557255acc8fcSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 557355acc8fcSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 557455acc8fcSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 557555acc8fcSmrg done 557655acc8fcSmrg test -z "$LD" && LD="$ac_prog" 557755acc8fcSmrg ;; 557855acc8fcSmrg "") 557955acc8fcSmrg # If it fails, then pretend we aren't using GCC. 558055acc8fcSmrg ac_prog=ld 558155acc8fcSmrg ;; 558255acc8fcSmrg *) 558355acc8fcSmrg # If it is relative, then search for the first ld in PATH. 558455acc8fcSmrg with_gnu_ld=unknown 558555acc8fcSmrg ;; 558655acc8fcSmrg esac 558755acc8fcSmrgelif test "$with_gnu_ld" = yes; then 558855acc8fcSmrg AC_MSG_CHECKING([for GNU ld]) 558955acc8fcSmrgelse 559055acc8fcSmrg AC_MSG_CHECKING([for non-GNU ld]) 559155acc8fcSmrgfi 559255acc8fcSmrgAC_CACHE_VAL(lt_cv_path_LD, 559355acc8fcSmrg[if test -z "$LD"; then 559455acc8fcSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 559555acc8fcSmrg for ac_dir in $PATH; do 559655acc8fcSmrg IFS="$lt_save_ifs" 559755acc8fcSmrg test -z "$ac_dir" && ac_dir=. 559855acc8fcSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 559955acc8fcSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 560055acc8fcSmrg # Check to see if the program is GNU ld. I'd rather use --version, 560155acc8fcSmrg # but apparently some variants of GNU ld only accept -v. 560255acc8fcSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 560355acc8fcSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 560455acc8fcSmrg *GNU* | *'with BFD'*) 560555acc8fcSmrg test "$with_gnu_ld" != no && break 560655acc8fcSmrg ;; 560755acc8fcSmrg *) 560855acc8fcSmrg test "$with_gnu_ld" != yes && break 560955acc8fcSmrg ;; 561055acc8fcSmrg esac 561155acc8fcSmrg fi 561255acc8fcSmrg done 561355acc8fcSmrg IFS="$lt_save_ifs" 561455acc8fcSmrgelse 561555acc8fcSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 561655acc8fcSmrgfi]) 561755acc8fcSmrgLD="$lt_cv_path_LD" 561855acc8fcSmrgif test -n "$LD"; then 561955acc8fcSmrg AC_MSG_RESULT($LD) 562055acc8fcSmrgelse 562155acc8fcSmrg AC_MSG_RESULT(no) 562255acc8fcSmrgfi 562355acc8fcSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 562455acc8fcSmrg_LT_PATH_LD_GNU 562555acc8fcSmrgAC_SUBST([LD]) 56263da084b3Smrg 562755acc8fcSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 562855acc8fcSmrg])# LT_PATH_LD 56293da084b3Smrg 563055acc8fcSmrg# Old names: 563155acc8fcSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 563255acc8fcSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 563355acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 563455acc8fcSmrgdnl AC_DEFUN([AM_PROG_LD], []) 563555acc8fcSmrgdnl AC_DEFUN([AC_PROG_LD], []) 5636d63fdb69Smrg 5637d63fdb69Smrg 563855acc8fcSmrg# _LT_PATH_LD_GNU 563955acc8fcSmrg#- -------------- 564055acc8fcSmrgm4_defun([_LT_PATH_LD_GNU], 564155acc8fcSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 564255acc8fcSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 564355acc8fcSmrgcase `$LD -v 2>&1 </dev/null` in 564455acc8fcSmrg*GNU* | *'with BFD'*) 564555acc8fcSmrg lt_cv_prog_gnu_ld=yes 564655acc8fcSmrg ;; 564755acc8fcSmrg*) 564855acc8fcSmrg lt_cv_prog_gnu_ld=no 564955acc8fcSmrg ;; 565055acc8fcSmrgesac]) 565155acc8fcSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 565255acc8fcSmrg])# _LT_PATH_LD_GNU 5653d63fdb69Smrg 56543da084b3Smrg 565555acc8fcSmrg# _LT_CMD_RELOAD 565655acc8fcSmrg# -------------- 565755acc8fcSmrg# find reload flag for linker 565855acc8fcSmrg# -- PORTME Some linkers may need a different reload flag. 565955acc8fcSmrgm4_defun([_LT_CMD_RELOAD], 566055acc8fcSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 566155acc8fcSmrg lt_cv_ld_reload_flag, 566255acc8fcSmrg [lt_cv_ld_reload_flag='-r']) 566355acc8fcSmrgreload_flag=$lt_cv_ld_reload_flag 566455acc8fcSmrgcase $reload_flag in 566555acc8fcSmrg"" | " "*) ;; 566655acc8fcSmrg*) reload_flag=" $reload_flag" ;; 566755acc8fcSmrgesac 566855acc8fcSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 566955acc8fcSmrgcase $host_os in 567055acc8fcSmrg darwin*) 567155acc8fcSmrg if test "$GCC" = yes; then 567255acc8fcSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 567355acc8fcSmrg else 567455acc8fcSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 5675d63fdb69Smrg fi 5676d63fdb69Smrg ;; 567755acc8fcSmrgesac 567855acc8fcSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 567955acc8fcSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 568055acc8fcSmrg])# _LT_CMD_RELOAD 56813da084b3Smrg 56823da084b3Smrg 568355acc8fcSmrg# _LT_CHECK_MAGIC_METHOD 568455acc8fcSmrg# ---------------------- 568555acc8fcSmrg# how to check for library dependencies 568655acc8fcSmrg# -- PORTME fill in with the dynamic library characteristics 568755acc8fcSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 568855acc8fcSmrg[m4_require([_LT_DECL_EGREP]) 568955acc8fcSmrgm4_require([_LT_DECL_OBJDUMP]) 569055acc8fcSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 569155acc8fcSmrglt_cv_deplibs_check_method, 569255acc8fcSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 569355acc8fcSmrglt_cv_file_magic_test_file= 569455acc8fcSmrglt_cv_deplibs_check_method='unknown' 569555acc8fcSmrg# Need to set the preceding variable on all platforms that support 569655acc8fcSmrg# interlibrary dependencies. 569755acc8fcSmrg# 'none' -- dependencies not supported. 569855acc8fcSmrg# `unknown' -- same as none, but documents that we really don't know. 569955acc8fcSmrg# 'pass_all' -- all dependencies passed with no checks. 570055acc8fcSmrg# 'test_compile' -- check by making test program. 570155acc8fcSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 570255acc8fcSmrg# which responds to the $file_magic_cmd with a given extended regex. 570355acc8fcSmrg# If you have `file' or equivalent on your system and you're not sure 570455acc8fcSmrg# whether `pass_all' will *always* work, you probably want this one. 570555acc8fcSmrg 570655acc8fcSmrgcase $host_os in 570755acc8fcSmrgaix[[4-9]]*) 570855acc8fcSmrg lt_cv_deplibs_check_method=pass_all 570955acc8fcSmrg ;; 571055acc8fcSmrg 571155acc8fcSmrgbeos*) 571255acc8fcSmrg lt_cv_deplibs_check_method=pass_all 571355acc8fcSmrg ;; 57143da084b3Smrg 571555acc8fcSmrgbsdi[[45]]*) 571655acc8fcSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 571755acc8fcSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 571855acc8fcSmrg lt_cv_file_magic_test_file=/shlib/libc.so 571955acc8fcSmrg ;; 57203da084b3Smrg 572155acc8fcSmrgcygwin*) 572255acc8fcSmrg # func_win32_libid is a shell function defined in ltmain.sh 572355acc8fcSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 572455acc8fcSmrg lt_cv_file_magic_cmd='func_win32_libid' 572555acc8fcSmrg ;; 5726d63fdb69Smrg 572755acc8fcSmrgmingw* | pw32*) 572855acc8fcSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 572955acc8fcSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 573055acc8fcSmrg # unless we find 'file', for example because we are cross-compiling. 573155acc8fcSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 573255acc8fcSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 573355acc8fcSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 573455acc8fcSmrg lt_cv_file_magic_cmd='func_win32_libid' 573555acc8fcSmrg else 573655acc8fcSmrg # Keep this pattern in sync with the one in func_win32_libid. 573755acc8fcSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 573855acc8fcSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 573955acc8fcSmrg fi 574055acc8fcSmrg ;; 5741d63fdb69Smrg 574255acc8fcSmrgcegcc*) 574355acc8fcSmrg # use the weaker test based on 'objdump'. See mingw*. 574455acc8fcSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 574555acc8fcSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 574655acc8fcSmrg ;; 5747d63fdb69Smrg 574855acc8fcSmrgdarwin* | rhapsody*) 574955acc8fcSmrg lt_cv_deplibs_check_method=pass_all 575055acc8fcSmrg ;; 5751d63fdb69Smrg 575255acc8fcSmrgfreebsd* | dragonfly*) 575355acc8fcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 575455acc8fcSmrg case $host_cpu in 575555acc8fcSmrg i*86 ) 575655acc8fcSmrg # Not sure whether the presence of OpenBSD here was a mistake. 575755acc8fcSmrg # Let's accept both of them until this is cleared up. 575855acc8fcSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 575955acc8fcSmrg lt_cv_file_magic_cmd=/usr/bin/file 576055acc8fcSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 576155acc8fcSmrg ;; 576255acc8fcSmrg esac 576355acc8fcSmrg else 576455acc8fcSmrg lt_cv_deplibs_check_method=pass_all 576555acc8fcSmrg fi 576655acc8fcSmrg ;; 5767d63fdb69Smrg 576855acc8fcSmrggnu*) 576955acc8fcSmrg lt_cv_deplibs_check_method=pass_all 577055acc8fcSmrg ;; 5771d63fdb69Smrg 577255acc8fcSmrghaiku*) 577355acc8fcSmrg lt_cv_deplibs_check_method=pass_all 577455acc8fcSmrg ;; 5775d63fdb69Smrg 577655acc8fcSmrghpux10.20* | hpux11*) 577755acc8fcSmrg lt_cv_file_magic_cmd=/usr/bin/file 577855acc8fcSmrg case $host_cpu in 577955acc8fcSmrg ia64*) 578055acc8fcSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 578155acc8fcSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 578255acc8fcSmrg ;; 578355acc8fcSmrg hppa*64*) 578455acc8fcSmrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 578555acc8fcSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 578655acc8fcSmrg ;; 578755acc8fcSmrg *) 578855acc8fcSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 578955acc8fcSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 579055acc8fcSmrg ;; 579155acc8fcSmrg esac 579255acc8fcSmrg ;; 5793d63fdb69Smrg 579455acc8fcSmrginterix[[3-9]]*) 579555acc8fcSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 579655acc8fcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 579755acc8fcSmrg ;; 5798d63fdb69Smrg 579955acc8fcSmrgirix5* | irix6* | nonstopux*) 580055acc8fcSmrg case $LD in 580155acc8fcSmrg *-32|*"-32 ") libmagic=32-bit;; 580255acc8fcSmrg *-n32|*"-n32 ") libmagic=N32;; 580355acc8fcSmrg *-64|*"-64 ") libmagic=64-bit;; 580455acc8fcSmrg *) libmagic=never-match;; 580555acc8fcSmrg esac 580655acc8fcSmrg lt_cv_deplibs_check_method=pass_all 580755acc8fcSmrg ;; 5808d63fdb69Smrg 580955acc8fcSmrg# This must be Linux ELF. 581055acc8fcSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 581155acc8fcSmrg lt_cv_deplibs_check_method=pass_all 581255acc8fcSmrg ;; 5813d63fdb69Smrg 581455acc8fcSmrgnetbsd*) 581555acc8fcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 581655acc8fcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 58173da084b3Smrg else 581855acc8fcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 58193da084b3Smrg fi 582055acc8fcSmrg ;; 58213da084b3Smrg 582255acc8fcSmrgnewos6*) 582355acc8fcSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 582455acc8fcSmrg lt_cv_file_magic_cmd=/usr/bin/file 582555acc8fcSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 582655acc8fcSmrg ;; 58273da084b3Smrg 582855acc8fcSmrg*nto* | *qnx*) 582955acc8fcSmrg lt_cv_deplibs_check_method=pass_all 583055acc8fcSmrg ;; 58313da084b3Smrg 583255acc8fcSmrgopenbsd*) 583355acc8fcSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 583455acc8fcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 583555acc8fcSmrg else 583655acc8fcSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 583755acc8fcSmrg fi 583855acc8fcSmrg ;; 58393da084b3Smrg 584055acc8fcSmrgosf3* | osf4* | osf5*) 584155acc8fcSmrg lt_cv_deplibs_check_method=pass_all 584255acc8fcSmrg ;; 5843d63fdb69Smrg 584455acc8fcSmrgrdos*) 584555acc8fcSmrg lt_cv_deplibs_check_method=pass_all 584655acc8fcSmrg ;; 5847d63fdb69Smrg 584855acc8fcSmrgsolaris*) 584955acc8fcSmrg lt_cv_deplibs_check_method=pass_all 585055acc8fcSmrg ;; 5851d63fdb69Smrg 585255acc8fcSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 585355acc8fcSmrg lt_cv_deplibs_check_method=pass_all 585455acc8fcSmrg ;; 5855d63fdb69Smrg 585655acc8fcSmrgsysv4 | sysv4.3*) 585755acc8fcSmrg case $host_vendor in 585855acc8fcSmrg motorola) 585955acc8fcSmrg 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]]' 586055acc8fcSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 586155acc8fcSmrg ;; 586255acc8fcSmrg ncr) 586355acc8fcSmrg lt_cv_deplibs_check_method=pass_all 586455acc8fcSmrg ;; 586555acc8fcSmrg sequent) 586655acc8fcSmrg lt_cv_file_magic_cmd='/bin/file' 586755acc8fcSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 586855acc8fcSmrg ;; 586955acc8fcSmrg sni) 587055acc8fcSmrg lt_cv_file_magic_cmd='/bin/file' 587155acc8fcSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 587255acc8fcSmrg lt_cv_file_magic_test_file=/lib/libc.so 587355acc8fcSmrg ;; 587455acc8fcSmrg siemens) 587555acc8fcSmrg lt_cv_deplibs_check_method=pass_all 587655acc8fcSmrg ;; 587755acc8fcSmrg pc) 587855acc8fcSmrg lt_cv_deplibs_check_method=pass_all 587955acc8fcSmrg ;; 588055acc8fcSmrg esac 588155acc8fcSmrg ;; 5882d63fdb69Smrg 588355acc8fcSmrgtpf*) 588455acc8fcSmrg lt_cv_deplibs_check_method=pass_all 588555acc8fcSmrg ;; 588655acc8fcSmrgesac 588755acc8fcSmrg]) 588855acc8fcSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 588955acc8fcSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 589055acc8fcSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 5891d63fdb69Smrg 589255acc8fcSmrg_LT_DECL([], [deplibs_check_method], [1], 589355acc8fcSmrg [Method to check whether dependent libraries are shared objects]) 589455acc8fcSmrg_LT_DECL([], [file_magic_cmd], [1], 589555acc8fcSmrg [Command to use when deplibs_check_method == "file_magic"]) 589655acc8fcSmrg])# _LT_CHECK_MAGIC_METHOD 5897d63fdb69Smrg 5898d63fdb69Smrg 589955acc8fcSmrg# LT_PATH_NM 590055acc8fcSmrg# ---------- 590155acc8fcSmrg# find the pathname to a BSD- or MS-compatible name lister 590255acc8fcSmrgAC_DEFUN([LT_PATH_NM], 590355acc8fcSmrg[AC_REQUIRE([AC_PROG_CC])dnl 590455acc8fcSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 590555acc8fcSmrg[if test -n "$NM"; then 590655acc8fcSmrg # Let the user override the test. 590755acc8fcSmrg lt_cv_path_NM="$NM" 590855acc8fcSmrgelse 590955acc8fcSmrg lt_nm_to_check="${ac_tool_prefix}nm" 591055acc8fcSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 591155acc8fcSmrg lt_nm_to_check="$lt_nm_to_check nm" 591255acc8fcSmrg fi 591355acc8fcSmrg for lt_tmp_nm in $lt_nm_to_check; do 591455acc8fcSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 591555acc8fcSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 591655acc8fcSmrg IFS="$lt_save_ifs" 591755acc8fcSmrg test -z "$ac_dir" && ac_dir=. 591855acc8fcSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 591955acc8fcSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 592055acc8fcSmrg # Check to see if the nm accepts a BSD-compat flag. 592155acc8fcSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 592255acc8fcSmrg # nm: unknown option "B" ignored 592355acc8fcSmrg # Tru64's nm complains that /dev/null is an invalid object file 592455acc8fcSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 592555acc8fcSmrg */dev/null* | *'Invalid file or object type'*) 592655acc8fcSmrg lt_cv_path_NM="$tmp_nm -B" 592755acc8fcSmrg break 592855acc8fcSmrg ;; 592955acc8fcSmrg *) 593055acc8fcSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 593155acc8fcSmrg */dev/null*) 593255acc8fcSmrg lt_cv_path_NM="$tmp_nm -p" 593355acc8fcSmrg break 5934d63fdb69Smrg ;; 593555acc8fcSmrg *) 593655acc8fcSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 593755acc8fcSmrg continue # so that we can try to find one that supports BSD flags 593855acc8fcSmrg ;; 593955acc8fcSmrg esac 594055acc8fcSmrg ;; 594155acc8fcSmrg esac 594255acc8fcSmrg fi 594355acc8fcSmrg done 594455acc8fcSmrg IFS="$lt_save_ifs" 594555acc8fcSmrg done 594655acc8fcSmrg : ${lt_cv_path_NM=no} 594755acc8fcSmrgfi]) 594855acc8fcSmrgif test "$lt_cv_path_NM" != "no"; then 594955acc8fcSmrg NM="$lt_cv_path_NM" 595055acc8fcSmrgelse 595155acc8fcSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 595255acc8fcSmrg if test -n "$DUMPBIN"; then : 595355acc8fcSmrg # Let the user override the test. 595455acc8fcSmrg else 595555acc8fcSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 595655acc8fcSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 595755acc8fcSmrg *COFF*) 595855acc8fcSmrg DUMPBIN="$DUMPBIN -symbols" 595955acc8fcSmrg ;; 596055acc8fcSmrg *) 596155acc8fcSmrg DUMPBIN=: 596255acc8fcSmrg ;; 596355acc8fcSmrg esac 596455acc8fcSmrg fi 596555acc8fcSmrg AC_SUBST([DUMPBIN]) 596655acc8fcSmrg if test "$DUMPBIN" != ":"; then 596755acc8fcSmrg NM="$DUMPBIN" 596855acc8fcSmrg fi 596955acc8fcSmrgfi 597055acc8fcSmrgtest -z "$NM" && NM=nm 597155acc8fcSmrgAC_SUBST([NM]) 597255acc8fcSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 5973d63fdb69Smrg 597455acc8fcSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 597555acc8fcSmrg [lt_cv_nm_interface="BSD nm" 597655acc8fcSmrg echo "int some_variable = 0;" > conftest.$ac_ext 597755acc8fcSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 597855acc8fcSmrg (eval "$ac_compile" 2>conftest.err) 597955acc8fcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 598055acc8fcSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 598155acc8fcSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 598255acc8fcSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 598355acc8fcSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 598455acc8fcSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 598555acc8fcSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 598655acc8fcSmrg lt_cv_nm_interface="MS dumpbin" 598755acc8fcSmrg fi 598855acc8fcSmrg rm -f conftest*]) 598955acc8fcSmrg])# LT_PATH_NM 5990d63fdb69Smrg 599155acc8fcSmrg# Old names: 599255acc8fcSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 599355acc8fcSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 599455acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 599555acc8fcSmrgdnl AC_DEFUN([AM_PROG_NM], []) 599655acc8fcSmrgdnl AC_DEFUN([AC_PROG_NM], []) 5997d63fdb69Smrg 5998d63fdb69Smrg 599955acc8fcSmrg# LT_LIB_M 600055acc8fcSmrg# -------- 600155acc8fcSmrg# check for math library 600255acc8fcSmrgAC_DEFUN([LT_LIB_M], 600355acc8fcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 600455acc8fcSmrgLIBM= 600555acc8fcSmrgcase $host in 600655acc8fcSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 600755acc8fcSmrg # These system don't have libm, or don't need it 600855acc8fcSmrg ;; 600955acc8fcSmrg*-ncr-sysv4.3*) 601055acc8fcSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 601155acc8fcSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 601255acc8fcSmrg ;; 601355acc8fcSmrg*) 601455acc8fcSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 601555acc8fcSmrg ;; 601655acc8fcSmrgesac 601755acc8fcSmrgAC_SUBST([LIBM]) 601855acc8fcSmrg])# LT_LIB_M 6019d63fdb69Smrg 602055acc8fcSmrg# Old name: 602155acc8fcSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 602255acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 602355acc8fcSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 6024d63fdb69Smrg 6025d63fdb69Smrg 602655acc8fcSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 602755acc8fcSmrg# ------------------------------- 602855acc8fcSmrgm4_defun([_LT_COMPILER_NO_RTTI], 602955acc8fcSmrg[m4_require([_LT_TAG_COMPILER])dnl 6030d63fdb69Smrg 603155acc8fcSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6032d63fdb69Smrg 603355acc8fcSmrgif test "$GCC" = yes; then 603455acc8fcSmrg case $cc_basename in 603555acc8fcSmrg nvcc*) 603655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 603755acc8fcSmrg *) 603855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 603955acc8fcSmrg esac 6040d63fdb69Smrg 604155acc8fcSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 604255acc8fcSmrg lt_cv_prog_compiler_rtti_exceptions, 604355acc8fcSmrg [-fno-rtti -fno-exceptions], [], 604455acc8fcSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 604555acc8fcSmrgfi 604655acc8fcSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 604755acc8fcSmrg [Compiler flag to turn off builtin functions]) 604855acc8fcSmrg])# _LT_COMPILER_NO_RTTI 6049d63fdb69Smrg 6050d63fdb69Smrg 605155acc8fcSmrg# _LT_CMD_GLOBAL_SYMBOLS 605255acc8fcSmrg# ---------------------- 605355acc8fcSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 605455acc8fcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 605555acc8fcSmrgAC_REQUIRE([AC_PROG_CC])dnl 605655acc8fcSmrgAC_REQUIRE([AC_PROG_AWK])dnl 605755acc8fcSmrgAC_REQUIRE([LT_PATH_NM])dnl 605855acc8fcSmrgAC_REQUIRE([LT_PATH_LD])dnl 605955acc8fcSmrgm4_require([_LT_DECL_SED])dnl 606055acc8fcSmrgm4_require([_LT_DECL_EGREP])dnl 606155acc8fcSmrgm4_require([_LT_TAG_COMPILER])dnl 6062d63fdb69Smrg 606355acc8fcSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 606455acc8fcSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 606555acc8fcSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 606655acc8fcSmrg[ 606755acc8fcSmrg# These are sane defaults that work on at least a few old systems. 606855acc8fcSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 6069d63fdb69Smrg 607055acc8fcSmrg# Character class describing NM global symbol codes. 607155acc8fcSmrgsymcode='[[BCDEGRST]]' 6072d63fdb69Smrg 607355acc8fcSmrg# Regexp to match symbols that can be accessed directly from C. 607455acc8fcSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 6075d63fdb69Smrg 607655acc8fcSmrg# Define system-specific variables. 607755acc8fcSmrgcase $host_os in 607855acc8fcSmrgaix*) 607955acc8fcSmrg symcode='[[BCDT]]' 608055acc8fcSmrg ;; 608155acc8fcSmrgcygwin* | mingw* | pw32* | cegcc*) 608255acc8fcSmrg symcode='[[ABCDGISTW]]' 608355acc8fcSmrg ;; 608455acc8fcSmrghpux*) 608555acc8fcSmrg if test "$host_cpu" = ia64; then 608655acc8fcSmrg symcode='[[ABCDEGRST]]' 608755acc8fcSmrg fi 608855acc8fcSmrg ;; 608955acc8fcSmrgirix* | nonstopux*) 609055acc8fcSmrg symcode='[[BCDEGRST]]' 609155acc8fcSmrg ;; 609255acc8fcSmrgosf*) 609355acc8fcSmrg symcode='[[BCDEGQRST]]' 609455acc8fcSmrg ;; 609555acc8fcSmrgsolaris*) 609655acc8fcSmrg symcode='[[BDRT]]' 609755acc8fcSmrg ;; 609855acc8fcSmrgsco3.2v5*) 609955acc8fcSmrg symcode='[[DT]]' 610055acc8fcSmrg ;; 610155acc8fcSmrgsysv4.2uw2*) 610255acc8fcSmrg symcode='[[DT]]' 610355acc8fcSmrg ;; 610455acc8fcSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 610555acc8fcSmrg symcode='[[ABDT]]' 610655acc8fcSmrg ;; 610755acc8fcSmrgsysv4) 610855acc8fcSmrg symcode='[[DFNSTU]]' 610955acc8fcSmrg ;; 611055acc8fcSmrgesac 6111d63fdb69Smrg 611255acc8fcSmrg# If we're using GNU nm, then use its standard symbol codes. 611355acc8fcSmrgcase `$NM -V 2>&1` in 611455acc8fcSmrg*GNU* | *'with BFD'*) 611555acc8fcSmrg symcode='[[ABCDGIRSTW]]' ;; 611655acc8fcSmrgesac 6117d63fdb69Smrg 611855acc8fcSmrg# Transform an extracted symbol line into a proper C declaration. 611955acc8fcSmrg# Some systems (esp. on ia64) link data and code symbols differently, 612055acc8fcSmrg# so use this general approach. 612155acc8fcSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6122d63fdb69Smrg 612355acc8fcSmrg# Transform an extracted symbol line into symbol name and symbol address 612455acc8fcSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 612555acc8fcSmrglt_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'" 6126d63fdb69Smrg 612755acc8fcSmrg# Handle CRLF in mingw tool chain 612855acc8fcSmrgopt_cr= 612955acc8fcSmrgcase $build_os in 613055acc8fcSmrgmingw*) 613155acc8fcSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 613255acc8fcSmrg ;; 613355acc8fcSmrgesac 6134d63fdb69Smrg 613555acc8fcSmrg# Try without a prefix underscore, then with it. 613655acc8fcSmrgfor ac_symprfx in "" "_"; do 6137d63fdb69Smrg 613855acc8fcSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 613955acc8fcSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 6140d63fdb69Smrg 614155acc8fcSmrg # Write the raw and C identifiers. 614255acc8fcSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 614355acc8fcSmrg # Fake it for dumpbin and say T for any non-static function 614455acc8fcSmrg # and D for any global variable. 614555acc8fcSmrg # Also find C++ and __fastcall symbols from MSVC++, 614655acc8fcSmrg # which start with @ or ?. 614755acc8fcSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 614855acc8fcSmrg" {last_section=section; section=\$ 3};"\ 614955acc8fcSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 615055acc8fcSmrg" \$ 0!~/External *\|/{next};"\ 615155acc8fcSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 615255acc8fcSmrg" {if(hide[section]) next};"\ 615355acc8fcSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 615455acc8fcSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 615555acc8fcSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 615655acc8fcSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 615755acc8fcSmrg" ' prfx=^$ac_symprfx]" 615855acc8fcSmrg else 615955acc8fcSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 616055acc8fcSmrg fi 6161d63fdb69Smrg 616255acc8fcSmrg # Check to see that the pipe works correctly. 616355acc8fcSmrg pipe_works=no 6164d63fdb69Smrg 616555acc8fcSmrg rm -f conftest* 616655acc8fcSmrg cat > conftest.$ac_ext <<_LT_EOF 616755acc8fcSmrg#ifdef __cplusplus 616855acc8fcSmrgextern "C" { 616955acc8fcSmrg#endif 617055acc8fcSmrgchar nm_test_var; 617155acc8fcSmrgvoid nm_test_func(void); 617255acc8fcSmrgvoid nm_test_func(void){} 617355acc8fcSmrg#ifdef __cplusplus 617455acc8fcSmrg} 617555acc8fcSmrg#endif 617655acc8fcSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 617755acc8fcSmrg_LT_EOF 6178d63fdb69Smrg 617955acc8fcSmrg if AC_TRY_EVAL(ac_compile); then 618055acc8fcSmrg # Now try to grab the symbols. 618155acc8fcSmrg nlist=conftest.nm 618255acc8fcSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 618355acc8fcSmrg # Try sorting and uniquifying the output. 618455acc8fcSmrg if sort "$nlist" | uniq > "$nlist"T; then 618555acc8fcSmrg mv -f "$nlist"T "$nlist" 618655acc8fcSmrg else 618755acc8fcSmrg rm -f "$nlist"T 618855acc8fcSmrg fi 6189d63fdb69Smrg 619055acc8fcSmrg # Make sure that we snagged all the symbols we need. 619155acc8fcSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 619255acc8fcSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 619355acc8fcSmrg cat <<_LT_EOF > conftest.$ac_ext 619455acc8fcSmrg#ifdef __cplusplus 619555acc8fcSmrgextern "C" { 619655acc8fcSmrg#endif 6197d63fdb69Smrg 619855acc8fcSmrg_LT_EOF 619955acc8fcSmrg # Now generate the symbol file. 620055acc8fcSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 620155acc8fcSmrg 620255acc8fcSmrg cat <<_LT_EOF >> conftest.$ac_ext 620355acc8fcSmrg 620455acc8fcSmrg/* The mapping between symbol names and symbols. */ 620555acc8fcSmrgconst struct { 620655acc8fcSmrg const char *name; 620755acc8fcSmrg void *address; 620855acc8fcSmrg} 620955acc8fcSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 621055acc8fcSmrg{ 621155acc8fcSmrg { "@PROGRAM@", (void *) 0 }, 621255acc8fcSmrg_LT_EOF 621355acc8fcSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 621455acc8fcSmrg cat <<\_LT_EOF >> conftest.$ac_ext 621555acc8fcSmrg {0, (void *) 0} 621655acc8fcSmrg}; 621755acc8fcSmrg 621855acc8fcSmrg/* This works around a problem in FreeBSD linker */ 621955acc8fcSmrg#ifdef FREEBSD_WORKAROUND 622055acc8fcSmrgstatic const void *lt_preloaded_setup() { 622155acc8fcSmrg return lt__PROGRAM__LTX_preloaded_symbols; 622255acc8fcSmrg} 622355acc8fcSmrg#endif 622455acc8fcSmrg 622555acc8fcSmrg#ifdef __cplusplus 622655acc8fcSmrg} 622755acc8fcSmrg#endif 622855acc8fcSmrg_LT_EOF 622955acc8fcSmrg # Now try linking the two files. 623055acc8fcSmrg mv conftest.$ac_objext conftstm.$ac_objext 623155acc8fcSmrg lt_save_LIBS="$LIBS" 623255acc8fcSmrg lt_save_CFLAGS="$CFLAGS" 623355acc8fcSmrg LIBS="conftstm.$ac_objext" 623455acc8fcSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 623555acc8fcSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 623655acc8fcSmrg pipe_works=yes 623755acc8fcSmrg fi 623855acc8fcSmrg LIBS="$lt_save_LIBS" 623955acc8fcSmrg CFLAGS="$lt_save_CFLAGS" 624055acc8fcSmrg else 624155acc8fcSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 624255acc8fcSmrg fi 624355acc8fcSmrg else 624455acc8fcSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 624555acc8fcSmrg fi 624655acc8fcSmrg else 624755acc8fcSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 624855acc8fcSmrg fi 624955acc8fcSmrg else 625055acc8fcSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 625155acc8fcSmrg cat conftest.$ac_ext >&5 625255acc8fcSmrg fi 625355acc8fcSmrg rm -rf conftest* conftst* 6254d63fdb69Smrg 625555acc8fcSmrg # Do not use the global_symbol_pipe unless it works. 625655acc8fcSmrg if test "$pipe_works" = yes; then 625755acc8fcSmrg break 625855acc8fcSmrg else 625955acc8fcSmrg lt_cv_sys_global_symbol_pipe= 626055acc8fcSmrg fi 626155acc8fcSmrgdone 626255acc8fcSmrg]) 626355acc8fcSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 626455acc8fcSmrg lt_cv_sys_global_symbol_to_cdecl= 626555acc8fcSmrgfi 626655acc8fcSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 626755acc8fcSmrg AC_MSG_RESULT(failed) 626855acc8fcSmrgelse 626955acc8fcSmrg AC_MSG_RESULT(ok) 627055acc8fcSmrgfi 6271d63fdb69Smrg 627255acc8fcSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 627355acc8fcSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 627455acc8fcSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 627555acc8fcSmrg [Transform the output of nm in a proper C declaration]) 627655acc8fcSmrg_LT_DECL([global_symbol_to_c_name_address], 627755acc8fcSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 627855acc8fcSmrg [Transform the output of nm in a C name address pair]) 627955acc8fcSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 628055acc8fcSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 628155acc8fcSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 628255acc8fcSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 6283d63fdb69Smrg 6284d63fdb69Smrg 628555acc8fcSmrg# _LT_COMPILER_PIC([TAGNAME]) 628655acc8fcSmrg# --------------------------- 628755acc8fcSmrgm4_defun([_LT_COMPILER_PIC], 628855acc8fcSmrg[m4_require([_LT_TAG_COMPILER])dnl 628955acc8fcSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 629055acc8fcSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 629155acc8fcSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 6292d63fdb69Smrg 629355acc8fcSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 629455acc8fcSmrgm4_if([$1], [CXX], [ 629555acc8fcSmrg # C++ specific cases for pic, static, wl, etc. 629655acc8fcSmrg if test "$GXX" = yes; then 629755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 629855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6299d63fdb69Smrg 630055acc8fcSmrg case $host_os in 630155acc8fcSmrg aix*) 630255acc8fcSmrg # All AIX code is PIC. 630355acc8fcSmrg if test "$host_cpu" = ia64; then 630455acc8fcSmrg # AIX 5 now supports IA64 processor 630555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 630655acc8fcSmrg fi 630755acc8fcSmrg ;; 6308d63fdb69Smrg 630955acc8fcSmrg amigaos*) 631055acc8fcSmrg case $host_cpu in 631155acc8fcSmrg powerpc) 631255acc8fcSmrg # see comment about AmigaOS4 .so support 631355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 631455acc8fcSmrg ;; 631555acc8fcSmrg m68k) 631655acc8fcSmrg # FIXME: we need at least 68020 code to build shared libraries, but 631755acc8fcSmrg # adding the `-m68020' flag to GCC prevents building anything better, 631855acc8fcSmrg # like `-m68040'. 631955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 632055acc8fcSmrg ;; 632155acc8fcSmrg esac 632255acc8fcSmrg ;; 6323d63fdb69Smrg 632455acc8fcSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 632555acc8fcSmrg # PIC is the default for these OSes. 632655acc8fcSmrg ;; 632755acc8fcSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 632855acc8fcSmrg # This hack is so that the source file can tell whether it is being 632955acc8fcSmrg # built for inclusion in a dll (and should export symbols for example). 633055acc8fcSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 633155acc8fcSmrg # (--disable-auto-import) libraries 633255acc8fcSmrg m4_if([$1], [GCJ], [], 633355acc8fcSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 633455acc8fcSmrg ;; 633555acc8fcSmrg darwin* | rhapsody*) 633655acc8fcSmrg # PIC is the default on this platform 633755acc8fcSmrg # Common symbols not allowed in MH_DYLIB files 633855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 633955acc8fcSmrg ;; 634055acc8fcSmrg *djgpp*) 634155acc8fcSmrg # DJGPP does not support shared libraries at all 634255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 634355acc8fcSmrg ;; 634455acc8fcSmrg haiku*) 634555acc8fcSmrg # PIC is the default for Haiku. 634655acc8fcSmrg # The "-static" flag exists, but is broken. 634755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 634855acc8fcSmrg ;; 634955acc8fcSmrg interix[[3-9]]*) 635055acc8fcSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 635155acc8fcSmrg # Instead, we relocate shared libraries at runtime. 635255acc8fcSmrg ;; 635355acc8fcSmrg sysv4*MP*) 635455acc8fcSmrg if test -d /usr/nec; then 635555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 635655acc8fcSmrg fi 635755acc8fcSmrg ;; 635855acc8fcSmrg hpux*) 635955acc8fcSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 636055acc8fcSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 636155acc8fcSmrg # sets the default TLS model and affects inlining. 636255acc8fcSmrg case $host_cpu in 636355acc8fcSmrg hppa*64*) 6364d63fdb69Smrg ;; 636555acc8fcSmrg *) 636655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 636755acc8fcSmrg ;; 636855acc8fcSmrg esac 636955acc8fcSmrg ;; 637055acc8fcSmrg *qnx* | *nto*) 637155acc8fcSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 637255acc8fcSmrg # it will coredump. 637355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 637455acc8fcSmrg ;; 637555acc8fcSmrg *) 637655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 637755acc8fcSmrg ;; 637855acc8fcSmrg esac 637955acc8fcSmrg else 638055acc8fcSmrg case $host_os in 638155acc8fcSmrg aix[[4-9]]*) 638255acc8fcSmrg # All AIX code is PIC. 638355acc8fcSmrg if test "$host_cpu" = ia64; then 638455acc8fcSmrg # AIX 5 now supports IA64 processor 638555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6386d63fdb69Smrg else 638755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6388d63fdb69Smrg fi 63893da084b3Smrg ;; 639055acc8fcSmrg chorus*) 639155acc8fcSmrg case $cc_basename in 639255acc8fcSmrg cxch68*) 639355acc8fcSmrg # Green Hills C++ Compiler 639455acc8fcSmrg # _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" 639555acc8fcSmrg ;; 639655acc8fcSmrg esac 639755acc8fcSmrg ;; 639855acc8fcSmrg dgux*) 639955acc8fcSmrg case $cc_basename in 640055acc8fcSmrg ec++*) 640155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 64023da084b3Smrg ;; 640355acc8fcSmrg ghcx*) 640455acc8fcSmrg # Green Hills C++ Compiler 640555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 64063da084b3Smrg ;; 64073da084b3Smrg *) 640855acc8fcSmrg ;; 640955acc8fcSmrg esac 641055acc8fcSmrg ;; 641155acc8fcSmrg freebsd* | dragonfly*) 641255acc8fcSmrg # FreeBSD uses GNU C++ 641355acc8fcSmrg ;; 641455acc8fcSmrg hpux9* | hpux10* | hpux11*) 641555acc8fcSmrg case $cc_basename in 641655acc8fcSmrg CC*) 641755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 641855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 641955acc8fcSmrg if test "$host_cpu" != ia64; then 642055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6421d63fdb69Smrg fi 64223da084b3Smrg ;; 642355acc8fcSmrg aCC*) 642455acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 642555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 642655acc8fcSmrg case $host_cpu in 642755acc8fcSmrg hppa*64*|ia64*) 642855acc8fcSmrg # +Z the default 642955acc8fcSmrg ;; 643055acc8fcSmrg *) 643155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 643255acc8fcSmrg ;; 643355acc8fcSmrg esac 6434d63fdb69Smrg ;; 643555acc8fcSmrg *) 6436d63fdb69Smrg ;; 643755acc8fcSmrg esac 643855acc8fcSmrg ;; 643955acc8fcSmrg interix*) 644055acc8fcSmrg # This is c89, which is MS Visual C++ (no shared libs) 644155acc8fcSmrg # Anyone wants to do a port? 644255acc8fcSmrg ;; 644355acc8fcSmrg irix5* | irix6* | nonstopux*) 644455acc8fcSmrg case $cc_basename in 644555acc8fcSmrg CC*) 644655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 644755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 644855acc8fcSmrg # CC pic flag -KPIC is the default. 6449d63fdb69Smrg ;; 645055acc8fcSmrg *) 645155acc8fcSmrg ;; 645255acc8fcSmrg esac 645355acc8fcSmrg ;; 645455acc8fcSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 645555acc8fcSmrg case $cc_basename in 645655acc8fcSmrg KCC*) 645755acc8fcSmrg # KAI C++ Compiler 645855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 645955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 646055acc8fcSmrg ;; 646155acc8fcSmrg ecpc* ) 646255acc8fcSmrg # old Intel C++ for x86_64 which still supported -KPIC. 646355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 646455acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 646555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 646655acc8fcSmrg ;; 646755acc8fcSmrg icpc* ) 646855acc8fcSmrg # Intel C++, used to be incompatible with GCC. 646955acc8fcSmrg # ICC 10 doesn't accept -KPIC any more. 647055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 647155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 647255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 647355acc8fcSmrg ;; 647455acc8fcSmrg pgCC* | pgcpp*) 647555acc8fcSmrg # Portland Group C++ compiler 647655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 647755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 647855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 647955acc8fcSmrg ;; 648055acc8fcSmrg cxx*) 648155acc8fcSmrg # Compaq C++ 648255acc8fcSmrg # Make sure the PIC flag is empty. It appears that all Alpha 648355acc8fcSmrg # Linux and Compaq Tru64 Unix objects are PIC. 648455acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 648555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 648655acc8fcSmrg ;; 648755acc8fcSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 648855acc8fcSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 648955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 649055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 649155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 649255acc8fcSmrg ;; 649355acc8fcSmrg *) 649455acc8fcSmrg case `$CC -V 2>&1 | sed 5q` in 649555acc8fcSmrg *Sun\ C*) 649655acc8fcSmrg # Sun C++ 5.9 649755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 649855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 649955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 650055acc8fcSmrg ;; 6501d63fdb69Smrg esac 65023da084b3Smrg ;; 650355acc8fcSmrg esac 650455acc8fcSmrg ;; 650555acc8fcSmrg lynxos*) 650655acc8fcSmrg ;; 650755acc8fcSmrg m88k*) 650855acc8fcSmrg ;; 650955acc8fcSmrg mvs*) 651055acc8fcSmrg case $cc_basename in 651155acc8fcSmrg cxx*) 651255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 65133da084b3Smrg ;; 651455acc8fcSmrg *) 65153da084b3Smrg ;; 651655acc8fcSmrg esac 651755acc8fcSmrg ;; 651855acc8fcSmrg netbsd*) 651955acc8fcSmrg ;; 652055acc8fcSmrg *qnx* | *nto*) 652155acc8fcSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 652255acc8fcSmrg # it will coredump. 652355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6524d63fdb69Smrg ;; 652555acc8fcSmrg osf3* | osf4* | osf5*) 652655acc8fcSmrg case $cc_basename in 652755acc8fcSmrg KCC*) 652855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 652955acc8fcSmrg ;; 653055acc8fcSmrg RCC*) 653155acc8fcSmrg # Rational C++ 2.4.1 653255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 653355acc8fcSmrg ;; 653455acc8fcSmrg cxx*) 653555acc8fcSmrg # Digital/Compaq C++ 653655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 653755acc8fcSmrg # Make sure the PIC flag is empty. It appears that all Alpha 653855acc8fcSmrg # Linux and Compaq Tru64 Unix objects are PIC. 653955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 654055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 654155acc8fcSmrg ;; 654255acc8fcSmrg *) 654355acc8fcSmrg ;; 654455acc8fcSmrg esac 654555acc8fcSmrg ;; 654655acc8fcSmrg psos*) 654755acc8fcSmrg ;; 654855acc8fcSmrg solaris*) 65493da084b3Smrg case $cc_basename in 655055acc8fcSmrg CC* | sunCC*) 655155acc8fcSmrg # Sun C++ 4.2, 5.x and Centerline C++ 655255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 655355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 655455acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 655555acc8fcSmrg ;; 655655acc8fcSmrg gcx*) 655755acc8fcSmrg # Green Hills C++ Compiler 655855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 65593da084b3Smrg ;; 65603da084b3Smrg *) 65613da084b3Smrg ;; 65623da084b3Smrg esac 656355acc8fcSmrg ;; 656455acc8fcSmrg sunos4*) 656555acc8fcSmrg case $cc_basename in 656655acc8fcSmrg CC*) 656755acc8fcSmrg # Sun C++ 4.x 656855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 656955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 657055acc8fcSmrg ;; 657155acc8fcSmrg lcc*) 657255acc8fcSmrg # Lucid 657355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 657455acc8fcSmrg ;; 657555acc8fcSmrg *) 657655acc8fcSmrg ;; 657755acc8fcSmrg esac 657855acc8fcSmrg ;; 657955acc8fcSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 658055acc8fcSmrg case $cc_basename in 658155acc8fcSmrg CC*) 658255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 658355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 658455acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 658555acc8fcSmrg ;; 658655acc8fcSmrg esac 658755acc8fcSmrg ;; 65883da084b3Smrg tandem*) 658955acc8fcSmrg case $cc_basename in 659055acc8fcSmrg NCC*) 65913da084b3Smrg # NonStop-UX NCC 3.20 659255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 65933da084b3Smrg ;; 659455acc8fcSmrg *) 65953da084b3Smrg ;; 659655acc8fcSmrg esac 659755acc8fcSmrg ;; 65983da084b3Smrg vxworks*) 659955acc8fcSmrg ;; 66003da084b3Smrg *) 660155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 660255acc8fcSmrg ;; 66033da084b3Smrg esac 660455acc8fcSmrg fi 660555acc8fcSmrg], 660655acc8fcSmrg[ 660755acc8fcSmrg if test "$GCC" = yes; then 660855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 660955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 66103da084b3Smrg 661155acc8fcSmrg case $host_os in 661255acc8fcSmrg aix*) 661355acc8fcSmrg # All AIX code is PIC. 661455acc8fcSmrg if test "$host_cpu" = ia64; then 661555acc8fcSmrg # AIX 5 now supports IA64 processor 661655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 661755acc8fcSmrg fi 661855acc8fcSmrg ;; 66193da084b3Smrg 662055acc8fcSmrg amigaos*) 662155acc8fcSmrg case $host_cpu in 662255acc8fcSmrg powerpc) 662355acc8fcSmrg # see comment about AmigaOS4 .so support 662455acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 662555acc8fcSmrg ;; 662655acc8fcSmrg m68k) 662755acc8fcSmrg # FIXME: we need at least 68020 code to build shared libraries, but 662855acc8fcSmrg # adding the `-m68020' flag to GCC prevents building anything better, 662955acc8fcSmrg # like `-m68040'. 663055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 663155acc8fcSmrg ;; 663255acc8fcSmrg esac 663355acc8fcSmrg ;; 6634d63fdb69Smrg 663555acc8fcSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 663655acc8fcSmrg # PIC is the default for these OSes. 663755acc8fcSmrg ;; 66383da084b3Smrg 663955acc8fcSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 664055acc8fcSmrg # This hack is so that the source file can tell whether it is being 664155acc8fcSmrg # built for inclusion in a dll (and should export symbols for example). 664255acc8fcSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 664355acc8fcSmrg # (--disable-auto-import) libraries 664455acc8fcSmrg m4_if([$1], [GCJ], [], 664555acc8fcSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 664655acc8fcSmrg ;; 66473da084b3Smrg 664855acc8fcSmrg darwin* | rhapsody*) 664955acc8fcSmrg # PIC is the default on this platform 665055acc8fcSmrg # Common symbols not allowed in MH_DYLIB files 665155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 665255acc8fcSmrg ;; 66533da084b3Smrg 665455acc8fcSmrg haiku*) 665555acc8fcSmrg # PIC is the default for Haiku. 665655acc8fcSmrg # The "-static" flag exists, but is broken. 665755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 665855acc8fcSmrg ;; 66593da084b3Smrg 666055acc8fcSmrg hpux*) 666155acc8fcSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 666255acc8fcSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 666355acc8fcSmrg # sets the default TLS model and affects inlining. 666455acc8fcSmrg case $host_cpu in 666555acc8fcSmrg hppa*64*) 666655acc8fcSmrg # +Z the default 666755acc8fcSmrg ;; 666855acc8fcSmrg *) 666955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 667055acc8fcSmrg ;; 667155acc8fcSmrg esac 667255acc8fcSmrg ;; 66733da084b3Smrg 667455acc8fcSmrg interix[[3-9]]*) 667555acc8fcSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 667655acc8fcSmrg # Instead, we relocate shared libraries at runtime. 667755acc8fcSmrg ;; 66783da084b3Smrg 667955acc8fcSmrg msdosdjgpp*) 668055acc8fcSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 668155acc8fcSmrg # on systems that don't support them. 668255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 668355acc8fcSmrg enable_shared=no 668455acc8fcSmrg ;; 6685d63fdb69Smrg 668655acc8fcSmrg *nto* | *qnx*) 668755acc8fcSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 668855acc8fcSmrg # it will coredump. 668955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 66903da084b3Smrg ;; 66913da084b3Smrg 669255acc8fcSmrg sysv4*MP*) 669355acc8fcSmrg if test -d /usr/nec; then 669455acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 669555acc8fcSmrg fi 669655acc8fcSmrg ;; 66973da084b3Smrg 669855acc8fcSmrg *) 669955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 67003da084b3Smrg ;; 6701d63fdb69Smrg esac 67023da084b3Smrg 670355acc8fcSmrg case $cc_basename in 670455acc8fcSmrg nvcc*) # Cuda Compiler Driver 2.2 670555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 670655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 670755acc8fcSmrg ;; 670855acc8fcSmrg esac 670955acc8fcSmrg else 671055acc8fcSmrg # PORTME Check for flag to pass linker flags through the system compiler. 671155acc8fcSmrg case $host_os in 671255acc8fcSmrg aix*) 671355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 671455acc8fcSmrg if test "$host_cpu" = ia64; then 671555acc8fcSmrg # AIX 5 now supports IA64 processor 671655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 671755acc8fcSmrg else 671855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 671955acc8fcSmrg fi 672055acc8fcSmrg ;; 67213da084b3Smrg 672255acc8fcSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 672355acc8fcSmrg # This hack is so that the source file can tell whether it is being 672455acc8fcSmrg # built for inclusion in a dll (and should export symbols for example). 672555acc8fcSmrg m4_if([$1], [GCJ], [], 672655acc8fcSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 672755acc8fcSmrg ;; 6728d63fdb69Smrg 672955acc8fcSmrg hpux9* | hpux10* | hpux11*) 673055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 673155acc8fcSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 673255acc8fcSmrg # not for PA HP-UX. 673355acc8fcSmrg case $host_cpu in 673455acc8fcSmrg hppa*64*|ia64*) 673555acc8fcSmrg # +Z the default 673655acc8fcSmrg ;; 673755acc8fcSmrg *) 673855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 673955acc8fcSmrg ;; 674055acc8fcSmrg esac 674155acc8fcSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 674255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 674355acc8fcSmrg ;; 6744d63fdb69Smrg 674555acc8fcSmrg irix5* | irix6* | nonstopux*) 674655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 674755acc8fcSmrg # PIC (with -KPIC) is the default. 674855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 674955acc8fcSmrg ;; 67503da084b3Smrg 675155acc8fcSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 675255acc8fcSmrg case $cc_basename in 675355acc8fcSmrg # old Intel for x86_64 which still supported -KPIC. 675455acc8fcSmrg ecc*) 675555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 675655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 675755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 675855acc8fcSmrg ;; 675955acc8fcSmrg # icc used to be incompatible with GCC. 676055acc8fcSmrg # ICC 10 doesn't accept -KPIC any more. 676155acc8fcSmrg icc* | ifort*) 676255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 676355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 676455acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 676555acc8fcSmrg ;; 676655acc8fcSmrg # Lahey Fortran 8.1. 676755acc8fcSmrg lf95*) 676855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 676955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 677055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 677155acc8fcSmrg ;; 677255acc8fcSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 677355acc8fcSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 677455acc8fcSmrg # which looks to be a dead project) 677555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 677655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 677755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 677855acc8fcSmrg ;; 677955acc8fcSmrg ccc*) 678055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 678155acc8fcSmrg # All Alpha code is PIC. 678255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 678355acc8fcSmrg ;; 678455acc8fcSmrg xl* | bgxl* | bgf* | mpixl*) 678555acc8fcSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 678655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 678755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 678855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 678955acc8fcSmrg ;; 679055acc8fcSmrg *) 679155acc8fcSmrg case `$CC -V 2>&1 | sed 5q` in 679255acc8fcSmrg *Sun\ F* | *Sun*Fortran*) 679355acc8fcSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 679455acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 679555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 679655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 679755acc8fcSmrg ;; 679855acc8fcSmrg *Sun\ C*) 679955acc8fcSmrg # Sun C 5.9 680055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 680155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 680255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 680355acc8fcSmrg ;; 680455acc8fcSmrg esac 680555acc8fcSmrg ;; 680655acc8fcSmrg esac 680755acc8fcSmrg ;; 68083da084b3Smrg 680955acc8fcSmrg newsos6) 681055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 681155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 681255acc8fcSmrg ;; 68133da084b3Smrg 681455acc8fcSmrg *nto* | *qnx*) 681555acc8fcSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 681655acc8fcSmrg # it will coredump. 681755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 681855acc8fcSmrg ;; 68193da084b3Smrg 682055acc8fcSmrg osf3* | osf4* | osf5*) 682155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 682255acc8fcSmrg # All OSF/1 code is PIC. 682355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 682455acc8fcSmrg ;; 68253da084b3Smrg 682655acc8fcSmrg rdos*) 682755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 682855acc8fcSmrg ;; 68293da084b3Smrg 683055acc8fcSmrg solaris*) 683155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 683255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 683355acc8fcSmrg case $cc_basename in 683455acc8fcSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 683555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 683655acc8fcSmrg *) 683755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 683855acc8fcSmrg esac 683955acc8fcSmrg ;; 6840d63fdb69Smrg 684155acc8fcSmrg sunos4*) 684255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 684355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 684455acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 684555acc8fcSmrg ;; 68463da084b3Smrg 684755acc8fcSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 684855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 684955acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 685055acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 685155acc8fcSmrg ;; 68523da084b3Smrg 685355acc8fcSmrg sysv4*MP*) 685455acc8fcSmrg if test -d /usr/nec ;then 685555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 685655acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 685755acc8fcSmrg fi 685855acc8fcSmrg ;; 6859d63fdb69Smrg 686055acc8fcSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 686155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 686255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 686355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 686455acc8fcSmrg ;; 6865d63fdb69Smrg 686655acc8fcSmrg unicos*) 686755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 686855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 686955acc8fcSmrg ;; 68703da084b3Smrg 687155acc8fcSmrg uts4*) 687255acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 687355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 687455acc8fcSmrg ;; 68753da084b3Smrg 687655acc8fcSmrg *) 687755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 687855acc8fcSmrg ;; 68793da084b3Smrg esac 688055acc8fcSmrg fi 688155acc8fcSmrg]) 688255acc8fcSmrgcase $host_os in 688355acc8fcSmrg # For platforms which do not support PIC, -DPIC is meaningless: 688455acc8fcSmrg *djgpp*) 688555acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 688655acc8fcSmrg ;; 688755acc8fcSmrg *) 688855acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 688955acc8fcSmrg ;; 689055acc8fcSmrgesac 689155acc8fcSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 689255acc8fcSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 689355acc8fcSmrg [How to pass a linker flag through the compiler]) 6894d63fdb69Smrg 689555acc8fcSmrg# 689655acc8fcSmrg# Check to make sure the PIC flag actually works. 689755acc8fcSmrg# 689855acc8fcSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 689955acc8fcSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 690055acc8fcSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 690155acc8fcSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 690255acc8fcSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 690355acc8fcSmrg "" | " "*) ;; 690455acc8fcSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 690555acc8fcSmrg esac], 690655acc8fcSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 690755acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 690855acc8fcSmrgfi 690955acc8fcSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 691055acc8fcSmrg [Additional compiler flags for building library objects]) 6911d63fdb69Smrg 691255acc8fcSmrg# 691355acc8fcSmrg# Check to make sure the static flag actually works. 691455acc8fcSmrg# 691555acc8fcSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 691655acc8fcSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 691755acc8fcSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 691855acc8fcSmrg $lt_tmp_static_flag, 691955acc8fcSmrg [], 692055acc8fcSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 692155acc8fcSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 692255acc8fcSmrg [Compiler flag to prevent dynamic linking]) 692355acc8fcSmrg])# _LT_COMPILER_PIC 6924d63fdb69Smrg 6925d63fdb69Smrg 692655acc8fcSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 692755acc8fcSmrg# ---------------------------- 692855acc8fcSmrg# See if the linker supports building shared libraries. 692955acc8fcSmrgm4_defun([_LT_LINKER_SHLIBS], 693055acc8fcSmrg[AC_REQUIRE([LT_PATH_LD])dnl 693155acc8fcSmrgAC_REQUIRE([LT_PATH_NM])dnl 693255acc8fcSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 693355acc8fcSmrgm4_require([_LT_DECL_EGREP])dnl 693455acc8fcSmrgm4_require([_LT_DECL_SED])dnl 693555acc8fcSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 693655acc8fcSmrgm4_require([_LT_TAG_COMPILER])dnl 693755acc8fcSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 693855acc8fcSmrgm4_if([$1], [CXX], [ 693955acc8fcSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 694055acc8fcSmrg case $host_os in 694155acc8fcSmrg aix[[4-9]]*) 694255acc8fcSmrg # If we're using GNU nm, then we don't want the "-C" option. 694355acc8fcSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 694455acc8fcSmrg # Also, AIX nm treats weak defined symbols like other global defined 694555acc8fcSmrg # symbols, whereas GNU nm marks them as "W". 694655acc8fcSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 694755acc8fcSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 694855acc8fcSmrg else 694955acc8fcSmrg _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' 695055acc8fcSmrg fi 695155acc8fcSmrg ;; 695255acc8fcSmrg pw32*) 695355acc8fcSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 695455acc8fcSmrg ;; 695555acc8fcSmrg cygwin* | mingw* | cegcc*) 695655acc8fcSmrg _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' 695755acc8fcSmrg ;; 695855acc8fcSmrg *) 695955acc8fcSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 696055acc8fcSmrg ;; 696155acc8fcSmrg esac 696255acc8fcSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 696355acc8fcSmrg], [ 696455acc8fcSmrg runpath_var= 696555acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 696655acc8fcSmrg _LT_TAGVAR(always_export_symbols, $1)=no 696755acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)= 696855acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 696955acc8fcSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 697055acc8fcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 697155acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 697255acc8fcSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 697355acc8fcSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 697455acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 697555acc8fcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 697655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 697755acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 697855acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 697955acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 698055acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 698155acc8fcSmrg _LT_TAGVAR(inherit_rpath, $1)=no 698255acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 698355acc8fcSmrg _LT_TAGVAR(module_cmds, $1)= 698455acc8fcSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 698555acc8fcSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 698655acc8fcSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 698755acc8fcSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 698855acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 698955acc8fcSmrg # include_expsyms should be a list of space-separated symbols to be *always* 699055acc8fcSmrg # included in the symbol list 699155acc8fcSmrg _LT_TAGVAR(include_expsyms, $1)= 699255acc8fcSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 699355acc8fcSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 699455acc8fcSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 699555acc8fcSmrg # as well as any symbol that contains `d'. 699655acc8fcSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 699755acc8fcSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 699855acc8fcSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 699955acc8fcSmrg # the symbol is explicitly referenced. Since portable code cannot 700055acc8fcSmrg # rely on this symbol name, it's probably fine to never include it in 700155acc8fcSmrg # preloaded symbol tables. 700255acc8fcSmrg # Exclude shared library initialization/finalization symbols. 700355acc8fcSmrgdnl Note also adjust exclude_expsyms for C++ above. 700455acc8fcSmrg extract_expsyms_cmds= 700555acc8fcSmrg 700655acc8fcSmrg case $host_os in 700755acc8fcSmrg cygwin* | mingw* | pw32* | cegcc*) 700855acc8fcSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 700955acc8fcSmrg # When not using gcc, we currently assume that we are using 701055acc8fcSmrg # Microsoft Visual C++. 701155acc8fcSmrg if test "$GCC" != yes; then 701255acc8fcSmrg with_gnu_ld=no 701355acc8fcSmrg fi 701455acc8fcSmrg ;; 701555acc8fcSmrg interix*) 701655acc8fcSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 701755acc8fcSmrg with_gnu_ld=yes 701855acc8fcSmrg ;; 701955acc8fcSmrg openbsd*) 702055acc8fcSmrg with_gnu_ld=no 702155acc8fcSmrg ;; 702255acc8fcSmrg esac 7023d63fdb69Smrg 702455acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 70253da084b3Smrg 702655acc8fcSmrg # On some targets, GNU ld is compatible enough with the native linker 702755acc8fcSmrg # that we're better off using the native interface for both. 702855acc8fcSmrg lt_use_gnu_ld_interface=no 702955acc8fcSmrg if test "$with_gnu_ld" = yes; then 703055acc8fcSmrg case $host_os in 703155acc8fcSmrg aix*) 703255acc8fcSmrg # The AIX port of GNU ld has always aspired to compatibility 703355acc8fcSmrg # with the native linker. However, as the warning in the GNU ld 703455acc8fcSmrg # block says, versions before 2.19.5* couldn't really create working 703555acc8fcSmrg # shared libraries, regardless of the interface used. 703655acc8fcSmrg case `$LD -v 2>&1` in 703755acc8fcSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 703855acc8fcSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 703955acc8fcSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 704055acc8fcSmrg *) 704155acc8fcSmrg lt_use_gnu_ld_interface=yes 704255acc8fcSmrg ;; 704355acc8fcSmrg esac 704455acc8fcSmrg ;; 704555acc8fcSmrg *) 704655acc8fcSmrg lt_use_gnu_ld_interface=yes 704755acc8fcSmrg ;; 704855acc8fcSmrg esac 704955acc8fcSmrg fi 70503da084b3Smrg 705155acc8fcSmrg if test "$lt_use_gnu_ld_interface" = yes; then 705255acc8fcSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 705355acc8fcSmrg wlarc='${wl}' 70543da084b3Smrg 705555acc8fcSmrg # Set some defaults for GNU ld with shared library support. These 705655acc8fcSmrg # are reset later if shared libraries are not supported. Putting them 705755acc8fcSmrg # here allows them to be overridden if necessary. 705855acc8fcSmrg runpath_var=LD_RUN_PATH 705955acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 706055acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 706155acc8fcSmrg # ancient GNU ld didn't support --whole-archive et. al. 706255acc8fcSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 706355acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 706455acc8fcSmrg else 706555acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 706655acc8fcSmrg fi 706755acc8fcSmrg supports_anon_versioning=no 706855acc8fcSmrg case `$LD -v 2>&1` in 706955acc8fcSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 707055acc8fcSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 707155acc8fcSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 707255acc8fcSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 707355acc8fcSmrg *\ 2.11.*) ;; # other 2.11 versions 707455acc8fcSmrg *) supports_anon_versioning=yes ;; 707555acc8fcSmrg esac 70763da084b3Smrg 707755acc8fcSmrg # See if GNU ld supports shared libraries. 707855acc8fcSmrg case $host_os in 707955acc8fcSmrg aix[[3-9]]*) 708055acc8fcSmrg # On AIX/PPC, the GNU linker is very broken 708155acc8fcSmrg if test "$host_cpu" != ia64; then 708255acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 708355acc8fcSmrg cat <<_LT_EOF 1>&2 70843da084b3Smrg 708555acc8fcSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 708655acc8fcSmrg*** to be unable to reliably create shared libraries on AIX. 708755acc8fcSmrg*** Therefore, libtool is disabling shared libraries support. If you 708855acc8fcSmrg*** really care for shared libraries, you may want to install binutils 708955acc8fcSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 709055acc8fcSmrg*** You will then need to restart the configuration process. 70913da084b3Smrg 709255acc8fcSmrg_LT_EOF 709355acc8fcSmrg fi 709455acc8fcSmrg ;; 7095d63fdb69Smrg 709655acc8fcSmrg amigaos*) 709755acc8fcSmrg case $host_cpu in 709855acc8fcSmrg powerpc) 709955acc8fcSmrg # see comment about AmigaOS4 .so support 710055acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 710155acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 710255acc8fcSmrg ;; 710355acc8fcSmrg m68k) 710455acc8fcSmrg _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)' 710555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 710655acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 710755acc8fcSmrg ;; 710855acc8fcSmrg esac 710955acc8fcSmrg ;; 7110d63fdb69Smrg 711155acc8fcSmrg beos*) 711255acc8fcSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 711355acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 711455acc8fcSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 711555acc8fcSmrg # support --undefined. This deserves some investigation. FIXME 711655acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 711755acc8fcSmrg else 711855acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 711955acc8fcSmrg fi 712055acc8fcSmrg ;; 7121d63fdb69Smrg 712255acc8fcSmrg cygwin* | mingw* | pw32* | cegcc*) 712355acc8fcSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 712455acc8fcSmrg # as there is no search path for DLLs. 712555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 712655acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 712755acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 712855acc8fcSmrg _LT_TAGVAR(always_export_symbols, $1)=no 712955acc8fcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 713055acc8fcSmrg _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' 7131d63fdb69Smrg 713255acc8fcSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 713355acc8fcSmrg _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' 713455acc8fcSmrg # If the export-symbols file already is a .def file (1st line 713555acc8fcSmrg # is EXPORTS), use it as is; otherwise, prepend... 713655acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 713755acc8fcSmrg cp $export_symbols $output_objdir/$soname.def; 713855acc8fcSmrg else 713955acc8fcSmrg echo EXPORTS > $output_objdir/$soname.def; 714055acc8fcSmrg cat $export_symbols >> $output_objdir/$soname.def; 714155acc8fcSmrg fi~ 714255acc8fcSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 714355acc8fcSmrg else 714455acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 714555acc8fcSmrg fi 714655acc8fcSmrg ;; 71473da084b3Smrg 714855acc8fcSmrg haiku*) 714955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 715055acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 715155acc8fcSmrg ;; 71523da084b3Smrg 715355acc8fcSmrg interix[[3-9]]*) 715455acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 715555acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 715655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 715755acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 715855acc8fcSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 715955acc8fcSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 716055acc8fcSmrg # default) and relocated if they conflict, which is a slow very memory 716155acc8fcSmrg # consuming and fragmenting process. To avoid this, we pick a random, 716255acc8fcSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 716355acc8fcSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 716455acc8fcSmrg _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' 716555acc8fcSmrg _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' 716655acc8fcSmrg ;; 71673da084b3Smrg 716855acc8fcSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 716955acc8fcSmrg tmp_diet=no 717055acc8fcSmrg if test "$host_os" = linux-dietlibc; then 717155acc8fcSmrg case $cc_basename in 717255acc8fcSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 717355acc8fcSmrg esac 717455acc8fcSmrg fi 717555acc8fcSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 717655acc8fcSmrg && test "$tmp_diet" = no 717755acc8fcSmrg then 717855acc8fcSmrg tmp_addflag= 717955acc8fcSmrg tmp_sharedflag='-shared' 718055acc8fcSmrg case $cc_basename,$host_cpu in 718155acc8fcSmrg pgcc*) # Portland Group C compiler 718255acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 718355acc8fcSmrg tmp_addflag=' $pic_flag' 718455acc8fcSmrg ;; 718555acc8fcSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 718655acc8fcSmrg # Portland Group f77 and f90 compilers 718755acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 718855acc8fcSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 718955acc8fcSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 719055acc8fcSmrg tmp_addflag=' -i_dynamic' ;; 719155acc8fcSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 719255acc8fcSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 719355acc8fcSmrg ifc* | ifort*) # Intel Fortran compiler 719455acc8fcSmrg tmp_addflag=' -nofor_main' ;; 719555acc8fcSmrg lf95*) # Lahey Fortran 8.1 719655acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 719755acc8fcSmrg tmp_sharedflag='--shared' ;; 719855acc8fcSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 719955acc8fcSmrg tmp_sharedflag='-qmkshrobj' 720055acc8fcSmrg tmp_addflag= ;; 720155acc8fcSmrg nvcc*) # Cuda Compiler Driver 2.2 720255acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 720355acc8fcSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 720455acc8fcSmrg ;; 720555acc8fcSmrg esac 720655acc8fcSmrg case `$CC -V 2>&1 | sed 5q` in 720755acc8fcSmrg *Sun\ C*) # Sun C 5.9 720855acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 720955acc8fcSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 721055acc8fcSmrg tmp_sharedflag='-G' ;; 721155acc8fcSmrg *Sun\ F*) # Sun Fortran 8.3 721255acc8fcSmrg tmp_sharedflag='-G' ;; 721355acc8fcSmrg esac 721455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72153da084b3Smrg 721655acc8fcSmrg if test "x$supports_anon_versioning" = xyes; then 721755acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 721855acc8fcSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 721955acc8fcSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 722055acc8fcSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 722155acc8fcSmrg fi 722255acc8fcSmrg 722355acc8fcSmrg case $cc_basename in 722455acc8fcSmrg xlf* | bgf* | bgxlf* | mpixlf*) 722555acc8fcSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 722655acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 722755acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 722855acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 722955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 723055acc8fcSmrg if test "x$supports_anon_versioning" = xyes; then 723155acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 723255acc8fcSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 723355acc8fcSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 723455acc8fcSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 723555acc8fcSmrg fi 723655acc8fcSmrg ;; 723755acc8fcSmrg esac 723855acc8fcSmrg else 723955acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 724055acc8fcSmrg fi 724155acc8fcSmrg ;; 72423da084b3Smrg 724355acc8fcSmrg netbsd*) 724455acc8fcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 724555acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 724655acc8fcSmrg wlarc= 724755acc8fcSmrg else 724855acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 724955acc8fcSmrg _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' 725055acc8fcSmrg fi 725155acc8fcSmrg ;; 72523da084b3Smrg 725355acc8fcSmrg solaris*) 725455acc8fcSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 725555acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 725655acc8fcSmrg cat <<_LT_EOF 1>&2 72573da084b3Smrg 725855acc8fcSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 725955acc8fcSmrg*** create shared libraries on Solaris systems. Therefore, libtool 726055acc8fcSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 726155acc8fcSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 726255acc8fcSmrg*** your PATH or compiler configuration so that the native linker is 726355acc8fcSmrg*** used, and then restart. 72643da084b3Smrg 726555acc8fcSmrg_LT_EOF 726655acc8fcSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 726755acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 726855acc8fcSmrg _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' 726955acc8fcSmrg else 727055acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 727155acc8fcSmrg fi 727255acc8fcSmrg ;; 7273d63fdb69Smrg 727455acc8fcSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 727555acc8fcSmrg case `$LD -v 2>&1` in 727655acc8fcSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 727755acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 727855acc8fcSmrg cat <<_LT_EOF 1>&2 7279d63fdb69Smrg 728055acc8fcSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 728155acc8fcSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 728255acc8fcSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 728355acc8fcSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 728455acc8fcSmrg*** your PATH or compiler configuration so that the native linker is 728555acc8fcSmrg*** used, and then restart. 7286d63fdb69Smrg 728755acc8fcSmrg_LT_EOF 728855acc8fcSmrg ;; 728955acc8fcSmrg *) 729055acc8fcSmrg # For security reasons, it is highly recommended that you always 729155acc8fcSmrg # use absolute paths for naming shared libraries, and exclude the 729255acc8fcSmrg # DT_RUNPATH tag from executables and libraries. But doing so 729355acc8fcSmrg # requires that you compile everything twice, which is a pain. 729455acc8fcSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 729555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 729655acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 729755acc8fcSmrg _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' 729855acc8fcSmrg else 729955acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 730055acc8fcSmrg fi 730155acc8fcSmrg ;; 730255acc8fcSmrg esac 730355acc8fcSmrg ;; 7304d63fdb69Smrg 730555acc8fcSmrg sunos4*) 730655acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 730755acc8fcSmrg wlarc= 730855acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 730955acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 731055acc8fcSmrg ;; 7311d63fdb69Smrg 731255acc8fcSmrg *) 731355acc8fcSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 731455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 731555acc8fcSmrg _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' 731655acc8fcSmrg else 731755acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 731855acc8fcSmrg fi 731955acc8fcSmrg ;; 732055acc8fcSmrg esac 73213da084b3Smrg 732255acc8fcSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 732355acc8fcSmrg runpath_var= 732455acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 732555acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 732655acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 732755acc8fcSmrg fi 732855acc8fcSmrg else 732955acc8fcSmrg # PORTME fill in a description of your system's linker (not GNU ld) 733055acc8fcSmrg case $host_os in 733155acc8fcSmrg aix3*) 733255acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 733355acc8fcSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 733455acc8fcSmrg _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' 733555acc8fcSmrg # Note: this linker hardcodes the directories in LIBPATH if there 733655acc8fcSmrg # are no directories specified by -L. 733755acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 733855acc8fcSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 733955acc8fcSmrg # Neither direct hardcoding nor static linking is supported with a 734055acc8fcSmrg # broken collect2. 734155acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 734255acc8fcSmrg fi 734355acc8fcSmrg ;; 73443da084b3Smrg 734555acc8fcSmrg aix[[4-9]]*) 734655acc8fcSmrg if test "$host_cpu" = ia64; then 734755acc8fcSmrg # On IA64, the linker does run time linking by default, so we don't 734855acc8fcSmrg # have to do anything special. 734955acc8fcSmrg aix_use_runtimelinking=no 735055acc8fcSmrg exp_sym_flag='-Bexport' 735155acc8fcSmrg no_entry_flag="" 735255acc8fcSmrg else 735355acc8fcSmrg # If we're using GNU nm, then we don't want the "-C" option. 735455acc8fcSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 735555acc8fcSmrg # Also, AIX nm treats weak defined symbols like other global 735655acc8fcSmrg # defined symbols, whereas GNU nm marks them as "W". 735755acc8fcSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 735855acc8fcSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 735955acc8fcSmrg else 736055acc8fcSmrg _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' 736155acc8fcSmrg fi 736255acc8fcSmrg aix_use_runtimelinking=no 73633da084b3Smrg 736455acc8fcSmrg # Test if we are trying to use run time linking or normal 736555acc8fcSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 736655acc8fcSmrg # need to do runtime linking. 736755acc8fcSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 736855acc8fcSmrg for ld_flag in $LDFLAGS; do 736955acc8fcSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 737055acc8fcSmrg aix_use_runtimelinking=yes 737155acc8fcSmrg break 737255acc8fcSmrg fi 737355acc8fcSmrg done 737455acc8fcSmrg ;; 737555acc8fcSmrg esac 73763da084b3Smrg 737755acc8fcSmrg exp_sym_flag='-bexport' 737855acc8fcSmrg no_entry_flag='-bnoentry' 737955acc8fcSmrg fi 73803da084b3Smrg 738155acc8fcSmrg # When large executables or shared objects are built, AIX ld can 738255acc8fcSmrg # have problems creating the table of contents. If linking a library 738355acc8fcSmrg # or program results in "error TOC overflow" add -mminimal-toc to 738455acc8fcSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 738555acc8fcSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 73863da084b3Smrg 738755acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='' 738855acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 738955acc8fcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 739055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 739155acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 739255acc8fcSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 73933da084b3Smrg 739455acc8fcSmrg if test "$GCC" = yes; then 739555acc8fcSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 739655acc8fcSmrg # We only want to do this on AIX 4.2 and lower, the check 739755acc8fcSmrg # below for broken collect2 doesn't work under 4.3+ 739855acc8fcSmrg collect2name=`${CC} -print-prog-name=collect2` 739955acc8fcSmrg if test -f "$collect2name" && 740055acc8fcSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 740155acc8fcSmrg then 740255acc8fcSmrg # We have reworked collect2 740355acc8fcSmrg : 740455acc8fcSmrg else 740555acc8fcSmrg # We have old collect2 740655acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 740755acc8fcSmrg # It fails to find uninstalled libraries when the uninstalled 740855acc8fcSmrg # path is not listed in the libpath. Setting hardcode_minus_L 740955acc8fcSmrg # to unsupported forces relinking 741055acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 741155acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 741255acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 741355acc8fcSmrg fi 741455acc8fcSmrg ;; 741555acc8fcSmrg esac 741655acc8fcSmrg shared_flag='-shared' 741755acc8fcSmrg if test "$aix_use_runtimelinking" = yes; then 741855acc8fcSmrg shared_flag="$shared_flag "'${wl}-G' 741955acc8fcSmrg fi 742055acc8fcSmrg else 742155acc8fcSmrg # not using gcc 742255acc8fcSmrg if test "$host_cpu" = ia64; then 742355acc8fcSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 742455acc8fcSmrg # chokes on -Wl,-G. The following line is correct: 742555acc8fcSmrg shared_flag='-G' 742655acc8fcSmrg else 742755acc8fcSmrg if test "$aix_use_runtimelinking" = yes; then 742855acc8fcSmrg shared_flag='${wl}-G' 742955acc8fcSmrg else 743055acc8fcSmrg shared_flag='${wl}-bM:SRE' 743155acc8fcSmrg fi 743255acc8fcSmrg fi 743355acc8fcSmrg fi 74343da084b3Smrg 743555acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 743655acc8fcSmrg # It seems that -bexpall does not export symbols beginning with 743755acc8fcSmrg # underscore (_), so it is better to generate a list of symbols to export. 743855acc8fcSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 743955acc8fcSmrg if test "$aix_use_runtimelinking" = yes; then 744055acc8fcSmrg # Warning - without using the other runtime loading flags (-brtl), 744155acc8fcSmrg # -berok will link without error, but may produce a broken library. 744255acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 744355acc8fcSmrg # Determine the default libpath from the value encoded in an 744455acc8fcSmrg # empty executable. 744555acc8fcSmrg _LT_SYS_MODULE_PATH_AIX 744655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 744755acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 744855acc8fcSmrg else 744955acc8fcSmrg if test "$host_cpu" = ia64; then 745055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 745155acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 745255acc8fcSmrg _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" 745355acc8fcSmrg else 745455acc8fcSmrg # Determine the default libpath from the value encoded in an 745555acc8fcSmrg # empty executable. 745655acc8fcSmrg _LT_SYS_MODULE_PATH_AIX 745755acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 745855acc8fcSmrg # Warning - without using the other run time loading flags, 745955acc8fcSmrg # -berok will link without error, but may produce a broken library. 746055acc8fcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 746155acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 746255acc8fcSmrg if test "$with_gnu_ld" = yes; then 746355acc8fcSmrg # We only use this code for GNU lds that support --whole-archive. 746455acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 746555acc8fcSmrg else 746655acc8fcSmrg # Exported symbols can be pulled into shared objects from archives 746755acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 746855acc8fcSmrg fi 746955acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 747055acc8fcSmrg # This is similar to how AIX traditionally builds its shared libraries. 747155acc8fcSmrg _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' 747255acc8fcSmrg fi 747355acc8fcSmrg fi 747455acc8fcSmrg ;; 74753da084b3Smrg 747655acc8fcSmrg amigaos*) 747755acc8fcSmrg case $host_cpu in 747855acc8fcSmrg powerpc) 747955acc8fcSmrg # see comment about AmigaOS4 .so support 748055acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 748155acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 748255acc8fcSmrg ;; 748355acc8fcSmrg m68k) 748455acc8fcSmrg _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)' 748555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 748655acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 748755acc8fcSmrg ;; 748855acc8fcSmrg esac 748955acc8fcSmrg ;; 74903da084b3Smrg 749155acc8fcSmrg bsdi[[45]]*) 749255acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 749355acc8fcSmrg ;; 74943da084b3Smrg 749555acc8fcSmrg cygwin* | mingw* | pw32* | cegcc*) 749655acc8fcSmrg # When not using gcc, we currently assume that we are using 749755acc8fcSmrg # Microsoft Visual C++. 749855acc8fcSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 749955acc8fcSmrg # no search path for DLLs. 750055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 750155acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 750255acc8fcSmrg # Tell ltmain to make .lib files, not .a files. 750355acc8fcSmrg libext=lib 750455acc8fcSmrg # Tell ltmain to make .dll files, not .so files. 750555acc8fcSmrg shrext_cmds=".dll" 750655acc8fcSmrg # FIXME: Setting linknames here is a bad hack. 750755acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 750855acc8fcSmrg # The linker will automatically build a .lib file if we build a DLL. 750955acc8fcSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 751055acc8fcSmrg # FIXME: Should let the user specify the lib program. 751155acc8fcSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 751255acc8fcSmrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 751355acc8fcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 751455acc8fcSmrg ;; 75153da084b3Smrg 751655acc8fcSmrg darwin* | rhapsody*) 751755acc8fcSmrg _LT_DARWIN_LINKER_FEATURES($1) 751855acc8fcSmrg ;; 75193da084b3Smrg 752055acc8fcSmrg dgux*) 752155acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 752255acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 752355acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 752455acc8fcSmrg ;; 75253da084b3Smrg 752655acc8fcSmrg freebsd1*) 752755acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 752855acc8fcSmrg ;; 75293da084b3Smrg 753055acc8fcSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 753155acc8fcSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 753255acc8fcSmrg # does not break anything, and helps significantly (at the cost of a little 753355acc8fcSmrg # extra space). 753455acc8fcSmrg freebsd2.2*) 753555acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 753655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 753755acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 753855acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 753955acc8fcSmrg ;; 75403da084b3Smrg 754155acc8fcSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 754255acc8fcSmrg freebsd2*) 754355acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 754455acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 754555acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 754655acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 754755acc8fcSmrg ;; 75483da084b3Smrg 754955acc8fcSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 755055acc8fcSmrg freebsd* | dragonfly*) 755155acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 755255acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 755355acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 755455acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 755555acc8fcSmrg ;; 75563da084b3Smrg 755755acc8fcSmrg hpux9*) 755855acc8fcSmrg if test "$GCC" = yes; then 755955acc8fcSmrg _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' 756055acc8fcSmrg else 756155acc8fcSmrg _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' 756255acc8fcSmrg fi 756355acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 756455acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 756555acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 75663da084b3Smrg 756755acc8fcSmrg # hardcode_minus_L: Not really in the search PATH, 756855acc8fcSmrg # but as the default location of the library. 756955acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 757055acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 757155acc8fcSmrg ;; 75723da084b3Smrg 757355acc8fcSmrg hpux10*) 757455acc8fcSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 757555acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 757655acc8fcSmrg else 757755acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 757855acc8fcSmrg fi 757955acc8fcSmrg if test "$with_gnu_ld" = no; then 758055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 758155acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 758255acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 758355acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 758455acc8fcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 758555acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 758655acc8fcSmrg # hardcode_minus_L: Not really in the search PATH, 758755acc8fcSmrg # but as the default location of the library. 758855acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 758955acc8fcSmrg fi 759055acc8fcSmrg ;; 75913da084b3Smrg 759255acc8fcSmrg hpux11*) 759355acc8fcSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 759455acc8fcSmrg case $host_cpu in 759555acc8fcSmrg hppa*64*) 759655acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 759755acc8fcSmrg ;; 759855acc8fcSmrg ia64*) 759955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 760055acc8fcSmrg ;; 760155acc8fcSmrg *) 760255acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 760355acc8fcSmrg ;; 760455acc8fcSmrg esac 760555acc8fcSmrg else 760655acc8fcSmrg case $host_cpu in 760755acc8fcSmrg hppa*64*) 760855acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 760955acc8fcSmrg ;; 761055acc8fcSmrg ia64*) 761155acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 761255acc8fcSmrg ;; 761355acc8fcSmrg *) 761455acc8fcSmrg m4_if($1, [], [ 761555acc8fcSmrg # Older versions of the 11.00 compiler do not understand -b yet 761655acc8fcSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 761755acc8fcSmrg _LT_LINKER_OPTION([if $CC understands -b], 761855acc8fcSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 761955acc8fcSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 762055acc8fcSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 762155acc8fcSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 762255acc8fcSmrg ;; 762355acc8fcSmrg esac 762455acc8fcSmrg fi 762555acc8fcSmrg if test "$with_gnu_ld" = no; then 762655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 762755acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 76283da084b3Smrg 762955acc8fcSmrg case $host_cpu in 763055acc8fcSmrg hppa*64*|ia64*) 763155acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 763255acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 763355acc8fcSmrg ;; 763455acc8fcSmrg *) 763555acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 763655acc8fcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 763755acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 76383da084b3Smrg 763955acc8fcSmrg # hardcode_minus_L: Not really in the search PATH, 764055acc8fcSmrg # but as the default location of the library. 764155acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 764255acc8fcSmrg ;; 764355acc8fcSmrg esac 764455acc8fcSmrg fi 764555acc8fcSmrg ;; 76463da084b3Smrg 764755acc8fcSmrg irix5* | irix6* | nonstopux*) 764855acc8fcSmrg if test "$GCC" = yes; then 764955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 765055acc8fcSmrg # Try to use the -exported_symbol ld option, if it does not 765155acc8fcSmrg # work, assume that -exports_file does not work either and 765255acc8fcSmrg # implicitly export all symbols. 765355acc8fcSmrg save_LDFLAGS="$LDFLAGS" 765455acc8fcSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 765555acc8fcSmrg AC_LINK_IFELSE(int foo(void) {}, 765655acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 765755acc8fcSmrg ) 765855acc8fcSmrg LDFLAGS="$save_LDFLAGS" 765955acc8fcSmrg else 766055acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 766155acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 766255acc8fcSmrg fi 766355acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 766455acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 766555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 766655acc8fcSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 766755acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 766855acc8fcSmrg ;; 76693da084b3Smrg 767055acc8fcSmrg netbsd*) 767155acc8fcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 767255acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 767355acc8fcSmrg else 767455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 767555acc8fcSmrg fi 767655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 767755acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 767855acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 767955acc8fcSmrg ;; 76803da084b3Smrg 768155acc8fcSmrg newsos6) 768255acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 768355acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 768455acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 768555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 768655acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 768755acc8fcSmrg ;; 76883da084b3Smrg 768955acc8fcSmrg *nto* | *qnx*) 769055acc8fcSmrg ;; 76913da084b3Smrg 769255acc8fcSmrg openbsd*) 769355acc8fcSmrg if test -f /usr/libexec/ld.so; then 769455acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 769555acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 769655acc8fcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 769755acc8fcSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 769855acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 769955acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 770055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 770155acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 770255acc8fcSmrg else 770355acc8fcSmrg case $host_os in 770455acc8fcSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 770555acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 770655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 770755acc8fcSmrg ;; 770855acc8fcSmrg *) 770955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 771055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 771155acc8fcSmrg ;; 771255acc8fcSmrg esac 771355acc8fcSmrg fi 771455acc8fcSmrg else 771555acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 771655acc8fcSmrg fi 771755acc8fcSmrg ;; 77183da084b3Smrg 771955acc8fcSmrg os2*) 772055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 772155acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 772255acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 772355acc8fcSmrg _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' 772455acc8fcSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 772555acc8fcSmrg ;; 77263da084b3Smrg 772755acc8fcSmrg osf3*) 772855acc8fcSmrg if test "$GCC" = yes; then 772955acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 773055acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 773155acc8fcSmrg else 773255acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 773355acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 773455acc8fcSmrg fi 773555acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 773655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 773755acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 773855acc8fcSmrg ;; 77393da084b3Smrg 774055acc8fcSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 774155acc8fcSmrg if test "$GCC" = yes; then 774255acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 774355acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 774455acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 774555acc8fcSmrg else 774655acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 774755acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 774855acc8fcSmrg _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~ 774955acc8fcSmrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 77503da084b3Smrg 775155acc8fcSmrg # Both c and cxx compiler support -rpath directly 775255acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 775355acc8fcSmrg fi 775455acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 775555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 775655acc8fcSmrg ;; 77573da084b3Smrg 775855acc8fcSmrg solaris*) 775955acc8fcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 776055acc8fcSmrg if test "$GCC" = yes; then 776155acc8fcSmrg wlarc='${wl}' 776255acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 776355acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 776455acc8fcSmrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 776555acc8fcSmrg else 776655acc8fcSmrg case `$CC -V 2>&1` in 776755acc8fcSmrg *"Compilers 5.0"*) 776855acc8fcSmrg wlarc='' 776955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 777055acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 777155acc8fcSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 777255acc8fcSmrg ;; 777355acc8fcSmrg *) 777455acc8fcSmrg wlarc='${wl}' 777555acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 777655acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 777755acc8fcSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 777855acc8fcSmrg ;; 777955acc8fcSmrg esac 778055acc8fcSmrg fi 778155acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 778255acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 778355acc8fcSmrg case $host_os in 778455acc8fcSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 778555acc8fcSmrg *) 778655acc8fcSmrg # The compiler driver will combine and reorder linker options, 778755acc8fcSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 778855acc8fcSmrg # but is careful enough not to reorder. 778955acc8fcSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 779055acc8fcSmrg if test "$GCC" = yes; then 779155acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 779255acc8fcSmrg else 779355acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 779455acc8fcSmrg fi 779555acc8fcSmrg ;; 779655acc8fcSmrg esac 779755acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 779855acc8fcSmrg ;; 77993da084b3Smrg 780055acc8fcSmrg sunos4*) 780155acc8fcSmrg if test "x$host_vendor" = xsequent; then 780255acc8fcSmrg # Use $CC to link under sequent, because it throws in some extra .o 780355acc8fcSmrg # files that make .init and .fini sections work. 780455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 780555acc8fcSmrg else 780655acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 780755acc8fcSmrg fi 780855acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 780955acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 781055acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 781155acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 781255acc8fcSmrg ;; 78133da084b3Smrg 781455acc8fcSmrg sysv4) 781555acc8fcSmrg case $host_vendor in 781655acc8fcSmrg sni) 781755acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 781855acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 781955acc8fcSmrg ;; 782055acc8fcSmrg siemens) 782155acc8fcSmrg ## LD is ld it makes a PLAMLIB 782255acc8fcSmrg ## CC just makes a GrossModule. 782355acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 782455acc8fcSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 782555acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 782655acc8fcSmrg ;; 782755acc8fcSmrg motorola) 782855acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 782955acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 783055acc8fcSmrg ;; 783155acc8fcSmrg esac 783255acc8fcSmrg runpath_var='LD_RUN_PATH' 783355acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 783455acc8fcSmrg ;; 78353da084b3Smrg 783655acc8fcSmrg sysv4.3*) 783755acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 783855acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 783955acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 784055acc8fcSmrg ;; 78413da084b3Smrg 784255acc8fcSmrg sysv4*MP*) 784355acc8fcSmrg if test -d /usr/nec; then 784455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 784555acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 784655acc8fcSmrg runpath_var=LD_RUN_PATH 784755acc8fcSmrg hardcode_runpath_var=yes 784855acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 784955acc8fcSmrg fi 785055acc8fcSmrg ;; 78513da084b3Smrg 785255acc8fcSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 785355acc8fcSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 785455acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 785555acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 785655acc8fcSmrg runpath_var='LD_RUN_PATH' 78573da084b3Smrg 785855acc8fcSmrg if test "$GCC" = yes; then 785955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 786055acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 786155acc8fcSmrg else 786255acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 786355acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 786455acc8fcSmrg fi 786555acc8fcSmrg ;; 78663da084b3Smrg 786755acc8fcSmrg sysv5* | sco3.2v5* | sco5v6*) 786855acc8fcSmrg # Note: We can NOT use -z defs as we might desire, because we do not 786955acc8fcSmrg # link with -lc, and that would cause any symbols used from libc to 787055acc8fcSmrg # always be unresolved, which means just about no library would 787155acc8fcSmrg # ever link correctly. If we're not using GNU ld we use -z text 787255acc8fcSmrg # though, which does catch some bad symbols but isn't as heavy-handed 787355acc8fcSmrg # as -z defs. 787455acc8fcSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 787555acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 787655acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 787755acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 787855acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 787955acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 788055acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 788155acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 788255acc8fcSmrg runpath_var='LD_RUN_PATH' 78833da084b3Smrg 788455acc8fcSmrg if test "$GCC" = yes; then 788555acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788655acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788755acc8fcSmrg else 788855acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 788955acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78903da084b3Smrg fi 789155acc8fcSmrg ;; 78923da084b3Smrg 789355acc8fcSmrg uts4*) 789455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 789555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 789655acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 789755acc8fcSmrg ;; 78983da084b3Smrg 789955acc8fcSmrg *) 790055acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 790155acc8fcSmrg ;; 790255acc8fcSmrg esac 7903d63fdb69Smrg 790455acc8fcSmrg if test x$host_vendor = xsni; then 790555acc8fcSmrg case $host in 790655acc8fcSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 790755acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 790855acc8fcSmrg ;; 790955acc8fcSmrg esac 791055acc8fcSmrg fi 791155acc8fcSmrg fi 791255acc8fcSmrg]) 791355acc8fcSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 791455acc8fcSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7915d63fdb69Smrg 791655acc8fcSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 7917d63fdb69Smrg 791855acc8fcSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 791955acc8fcSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 792055acc8fcSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 792155acc8fcSmrg [The commands to extract the exported symbol list from a shared archive]) 7922d63fdb69Smrg 792355acc8fcSmrg# 792455acc8fcSmrg# Do we need to explicitly link libc? 792555acc8fcSmrg# 792655acc8fcSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 792755acc8fcSmrgx|xyes) 792855acc8fcSmrg # Assume -lc should be added 792955acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 793055acc8fcSmrg 793155acc8fcSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 793255acc8fcSmrg case $_LT_TAGVAR(archive_cmds, $1) in 793355acc8fcSmrg *'~'*) 793455acc8fcSmrg # FIXME: we may have to deal with multi-command sequences. 793555acc8fcSmrg ;; 793655acc8fcSmrg '$CC '*) 793755acc8fcSmrg # Test whether the compiler implicitly links with -lc since on some 793855acc8fcSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 793955acc8fcSmrg # to ld, don't add -lc before -lgcc. 794055acc8fcSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 794155acc8fcSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 794255acc8fcSmrg [$RM conftest* 794355acc8fcSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 794455acc8fcSmrg 794555acc8fcSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 794655acc8fcSmrg soname=conftest 794755acc8fcSmrg lib=conftest 794855acc8fcSmrg libobjs=conftest.$ac_objext 794955acc8fcSmrg deplibs= 795055acc8fcSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 795155acc8fcSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 795255acc8fcSmrg compiler_flags=-v 795355acc8fcSmrg linker_flags=-v 795455acc8fcSmrg verstring= 795555acc8fcSmrg output_objdir=. 795655acc8fcSmrg libname=conftest 795755acc8fcSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 795855acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 795955acc8fcSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 796055acc8fcSmrg then 796155acc8fcSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 796255acc8fcSmrg else 796355acc8fcSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 796455acc8fcSmrg fi 796555acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 796655acc8fcSmrg else 796755acc8fcSmrg cat conftest.err 1>&5 796855acc8fcSmrg fi 796955acc8fcSmrg $RM conftest* 797055acc8fcSmrg ]) 797155acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 797255acc8fcSmrg ;; 797355acc8fcSmrg esac 797455acc8fcSmrg fi 7975d63fdb69Smrg ;; 7976d63fdb69Smrgesac 79773da084b3Smrg 797855acc8fcSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 797955acc8fcSmrg [Whether or not to add -lc for building shared libraries]) 798055acc8fcSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 798155acc8fcSmrg [enable_shared_with_static_runtimes], [0], 798255acc8fcSmrg [Whether or not to disallow shared libs when runtime libs are static]) 798355acc8fcSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 798455acc8fcSmrg [Compiler flag to allow reflexive dlopens]) 798555acc8fcSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 798655acc8fcSmrg [Compiler flag to generate shared objects directly from archives]) 798755acc8fcSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 798855acc8fcSmrg [Whether the compiler copes with passing no objects directly]) 798955acc8fcSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 799055acc8fcSmrg [Create an old-style archive from a shared archive]) 799155acc8fcSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 799255acc8fcSmrg [Create a temporary old-style archive to link instead of a shared archive]) 799355acc8fcSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 799455acc8fcSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 799555acc8fcSmrg_LT_TAGDECL([], [module_cmds], [2], 799655acc8fcSmrg [Commands used to build a loadable module if different from building 799755acc8fcSmrg a shared archive.]) 799855acc8fcSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 799955acc8fcSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 800055acc8fcSmrg [Whether we are building with GNU ld or not]) 800155acc8fcSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 800255acc8fcSmrg [Flag that allows shared libraries with undefined symbols to be built]) 800355acc8fcSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 800455acc8fcSmrg [Flag that enforces no undefined symbols]) 800555acc8fcSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 800655acc8fcSmrg [Flag to hardcode $libdir into a binary during linking. 800755acc8fcSmrg This must work even if $libdir does not exist]) 800855acc8fcSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 800955acc8fcSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 801055acc8fcSmrg during linking. This must work even if $libdir does not exist]]) 801155acc8fcSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 801255acc8fcSmrg [Whether we need a single "-rpath" flag with a separated argument]) 801355acc8fcSmrg_LT_TAGDECL([], [hardcode_direct], [0], 801455acc8fcSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 801555acc8fcSmrg DIR into the resulting binary]) 801655acc8fcSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 801755acc8fcSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 801855acc8fcSmrg DIR into the resulting binary and the resulting library dependency is 801955acc8fcSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 802055acc8fcSmrg library is relocated]) 802155acc8fcSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 802255acc8fcSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 802355acc8fcSmrg into the resulting binary]) 802455acc8fcSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 802555acc8fcSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 802655acc8fcSmrg into the resulting binary]) 802755acc8fcSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 802855acc8fcSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 802955acc8fcSmrg into the library and all subsequent libraries and executables linked 803055acc8fcSmrg against it]) 803155acc8fcSmrg_LT_TAGDECL([], [inherit_rpath], [0], 803255acc8fcSmrg [Set to yes if linker adds runtime paths of dependent libraries 803355acc8fcSmrg to runtime path list]) 803455acc8fcSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 803555acc8fcSmrg [Whether libtool must link a program against all its dependency libraries]) 803655acc8fcSmrg_LT_TAGDECL([], [fix_srcfile_path], [1], 803755acc8fcSmrg [Fix the shell variable $srcfile for the compiler]) 803855acc8fcSmrg_LT_TAGDECL([], [always_export_symbols], [0], 803955acc8fcSmrg [Set to "yes" if exported symbols are required]) 804055acc8fcSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 804155acc8fcSmrg [The commands to list exported symbols]) 804255acc8fcSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 804355acc8fcSmrg [Symbols that should not be listed in the preloaded symbols]) 804455acc8fcSmrg_LT_TAGDECL([], [include_expsyms], [1], 804555acc8fcSmrg [Symbols that must always be exported]) 804655acc8fcSmrg_LT_TAGDECL([], [prelink_cmds], [2], 804755acc8fcSmrg [Commands necessary for linking programs (against libraries) with templates]) 804855acc8fcSmrg_LT_TAGDECL([], [file_list_spec], [1], 804955acc8fcSmrg [Specify filename containing input files]) 805055acc8fcSmrgdnl FIXME: Not yet implemented 805155acc8fcSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 805255acc8fcSmrgdnl [Compiler flag to generate thread safe objects]) 805355acc8fcSmrg])# _LT_LINKER_SHLIBS 80543da084b3Smrg 8055d63fdb69Smrg 805655acc8fcSmrg# _LT_LANG_C_CONFIG([TAG]) 805755acc8fcSmrg# ------------------------ 805855acc8fcSmrg# Ensure that the configuration variables for a C compiler are suitably 805955acc8fcSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 806055acc8fcSmrg# the compiler configuration to `libtool'. 806155acc8fcSmrgm4_defun([_LT_LANG_C_CONFIG], 806255acc8fcSmrg[m4_require([_LT_DECL_EGREP])dnl 806355acc8fcSmrglt_save_CC="$CC" 806455acc8fcSmrgAC_LANG_PUSH(C) 80653da084b3Smrg 806655acc8fcSmrg# Source file extension for C test sources. 806755acc8fcSmrgac_ext=c 80683da084b3Smrg 806955acc8fcSmrg# Object file extension for compiled C test sources. 807055acc8fcSmrgobjext=o 807155acc8fcSmrg_LT_TAGVAR(objext, $1)=$objext 80723da084b3Smrg 807355acc8fcSmrg# Code to be used in simple compile tests 807455acc8fcSmrglt_simple_compile_test_code="int some_variable = 0;" 80753da084b3Smrg 807655acc8fcSmrg# Code to be used in simple link tests 807755acc8fcSmrglt_simple_link_test_code='int main(){return(0);}' 80783da084b3Smrg 807955acc8fcSmrg_LT_TAG_COMPILER 808055acc8fcSmrg# Save the default compiler, since it gets overwritten when the other 808155acc8fcSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 808255acc8fcSmrgcompiler_DEFAULT=$CC 80833da084b3Smrg 808455acc8fcSmrg# save warnings/boilerplate of simple test code 808555acc8fcSmrg_LT_COMPILER_BOILERPLATE 808655acc8fcSmrg_LT_LINKER_BOILERPLATE 80873da084b3Smrg 808855acc8fcSmrgif test -n "$compiler"; then 808955acc8fcSmrg _LT_COMPILER_NO_RTTI($1) 809055acc8fcSmrg _LT_COMPILER_PIC($1) 809155acc8fcSmrg _LT_COMPILER_C_O($1) 809255acc8fcSmrg _LT_COMPILER_FILE_LOCKS($1) 809355acc8fcSmrg _LT_LINKER_SHLIBS($1) 809455acc8fcSmrg _LT_SYS_DYNAMIC_LINKER($1) 809555acc8fcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 809655acc8fcSmrg LT_SYS_DLOPEN_SELF 809755acc8fcSmrg _LT_CMD_STRIPLIB 80983da084b3Smrg 809955acc8fcSmrg # Report which library types will actually be built 810055acc8fcSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 810155acc8fcSmrg AC_MSG_RESULT([$can_build_shared]) 81023da084b3Smrg 810355acc8fcSmrg AC_MSG_CHECKING([whether to build shared libraries]) 810455acc8fcSmrg test "$can_build_shared" = "no" && enable_shared=no 810555acc8fcSmrg 810655acc8fcSmrg # On AIX, shared libraries and static libraries use the same namespace, and 810755acc8fcSmrg # are all built from PIC. 810855acc8fcSmrg case $host_os in 810955acc8fcSmrg aix3*) 811055acc8fcSmrg test "$enable_shared" = yes && enable_static=no 811155acc8fcSmrg if test -n "$RANLIB"; then 811255acc8fcSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 811355acc8fcSmrg postinstall_cmds='$RANLIB $lib' 811455acc8fcSmrg fi 8115d63fdb69Smrg ;; 81163da084b3Smrg 811755acc8fcSmrg aix[[4-9]]*) 811855acc8fcSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 811955acc8fcSmrg test "$enable_shared" = yes && enable_static=no 812055acc8fcSmrg fi 812155acc8fcSmrg ;; 812255acc8fcSmrg esac 812355acc8fcSmrg AC_MSG_RESULT([$enable_shared]) 81243da084b3Smrg 812555acc8fcSmrg AC_MSG_CHECKING([whether to build static libraries]) 812655acc8fcSmrg # Make sure either enable_shared or enable_static is yes. 812755acc8fcSmrg test "$enable_shared" = yes || enable_static=yes 812855acc8fcSmrg AC_MSG_RESULT([$enable_static]) 81293da084b3Smrg 813055acc8fcSmrg _LT_CONFIG($1) 813155acc8fcSmrgfi 813255acc8fcSmrgAC_LANG_POP 813355acc8fcSmrgCC="$lt_save_CC" 813455acc8fcSmrg])# _LT_LANG_C_CONFIG 8135d63fdb69Smrg 81363da084b3Smrg 813755acc8fcSmrg# _LT_LANG_CXX_CONFIG([TAG]) 813855acc8fcSmrg# -------------------------- 813955acc8fcSmrg# Ensure that the configuration variables for a C++ compiler are suitably 814055acc8fcSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 814155acc8fcSmrg# the compiler configuration to `libtool'. 814255acc8fcSmrgm4_defun([_LT_LANG_CXX_CONFIG], 814355acc8fcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 814455acc8fcSmrgm4_require([_LT_DECL_EGREP])dnl 814555acc8fcSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 814655acc8fcSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 814755acc8fcSmrg (test "X$CXX" != "Xg++"))) ; then 814855acc8fcSmrg AC_PROG_CXXCPP 814955acc8fcSmrgelse 815055acc8fcSmrg _lt_caught_CXX_error=yes 815155acc8fcSmrgfi 81523da084b3Smrg 815355acc8fcSmrgAC_LANG_PUSH(C++) 815455acc8fcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 815555acc8fcSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 815655acc8fcSmrg_LT_TAGVAR(always_export_symbols, $1)=no 815755acc8fcSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 815855acc8fcSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 815955acc8fcSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 816055acc8fcSmrg_LT_TAGVAR(hardcode_direct, $1)=no 816155acc8fcSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 816255acc8fcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 816355acc8fcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 816455acc8fcSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 816555acc8fcSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 816655acc8fcSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 816755acc8fcSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 816855acc8fcSmrg_LT_TAGVAR(inherit_rpath, $1)=no 816955acc8fcSmrg_LT_TAGVAR(module_cmds, $1)= 817055acc8fcSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 817155acc8fcSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 817255acc8fcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 817355acc8fcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 817455acc8fcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 817555acc8fcSmrg_LT_TAGVAR(no_undefined_flag, $1)= 817655acc8fcSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 817755acc8fcSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 81783da084b3Smrg 817955acc8fcSmrg# Source file extension for C++ test sources. 818055acc8fcSmrgac_ext=cpp 81813da084b3Smrg 818255acc8fcSmrg# Object file extension for compiled C++ test sources. 818355acc8fcSmrgobjext=o 818455acc8fcSmrg_LT_TAGVAR(objext, $1)=$objext 81853da084b3Smrg 818655acc8fcSmrg# No sense in running all these tests if we already determined that 818755acc8fcSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 818855acc8fcSmrg# are currently assumed to apply to all compilers on this platform, 818955acc8fcSmrg# and will be corrupted by setting them based on a non-working compiler. 819055acc8fcSmrgif test "$_lt_caught_CXX_error" != yes; then 819155acc8fcSmrg # Code to be used in simple compile tests 819255acc8fcSmrg lt_simple_compile_test_code="int some_variable = 0;" 81933da084b3Smrg 819455acc8fcSmrg # Code to be used in simple link tests 819555acc8fcSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 81963da084b3Smrg 819755acc8fcSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 819855acc8fcSmrg _LT_TAG_COMPILER 81993da084b3Smrg 820055acc8fcSmrg # save warnings/boilerplate of simple test code 820155acc8fcSmrg _LT_COMPILER_BOILERPLATE 820255acc8fcSmrg _LT_LINKER_BOILERPLATE 820355acc8fcSmrg 820455acc8fcSmrg # Allow CC to be a program name with arguments. 820555acc8fcSmrg lt_save_CC=$CC 820655acc8fcSmrg lt_save_LD=$LD 820755acc8fcSmrg lt_save_GCC=$GCC 820855acc8fcSmrg GCC=$GXX 820955acc8fcSmrg lt_save_with_gnu_ld=$with_gnu_ld 821055acc8fcSmrg lt_save_path_LD=$lt_cv_path_LD 821155acc8fcSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 821255acc8fcSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 821355acc8fcSmrg else 821455acc8fcSmrg $as_unset lt_cv_prog_gnu_ld 821555acc8fcSmrg fi 821655acc8fcSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 821755acc8fcSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 821855acc8fcSmrg else 821955acc8fcSmrg $as_unset lt_cv_path_LD 822055acc8fcSmrg fi 822155acc8fcSmrg test -z "${LDCXX+set}" || LD=$LDCXX 822255acc8fcSmrg CC=${CXX-"c++"} 822355acc8fcSmrg compiler=$CC 822455acc8fcSmrg _LT_TAGVAR(compiler, $1)=$CC 822555acc8fcSmrg _LT_CC_BASENAME([$compiler]) 82263da084b3Smrg 822755acc8fcSmrg if test -n "$compiler"; then 822855acc8fcSmrg # We don't want -fno-exception when compiling C++ code, so set the 822955acc8fcSmrg # no_builtin_flag separately 823055acc8fcSmrg if test "$GXX" = yes; then 823155acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 823255acc8fcSmrg else 823355acc8fcSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 823455acc8fcSmrg fi 82353da084b3Smrg 823655acc8fcSmrg if test "$GXX" = yes; then 823755acc8fcSmrg # Set up default GNU C++ configuration 82383da084b3Smrg 823955acc8fcSmrg LT_PATH_LD 82403da084b3Smrg 824155acc8fcSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 824255acc8fcSmrg # archiving commands below assume that GNU ld is being used. 824355acc8fcSmrg if test "$with_gnu_ld" = yes; then 824455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 824555acc8fcSmrg _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' 82463da084b3Smrg 824755acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 824855acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 82493da084b3Smrg 825055acc8fcSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 825155acc8fcSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 825255acc8fcSmrg # investigate it a little bit more. (MM) 825355acc8fcSmrg wlarc='${wl}' 82543da084b3Smrg 825555acc8fcSmrg # ancient GNU ld didn't support --whole-archive et. al. 825655acc8fcSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 825755acc8fcSmrg $GREP 'no-whole-archive' > /dev/null; then 825855acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 825955acc8fcSmrg else 826055acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 826155acc8fcSmrg fi 826255acc8fcSmrg else 826355acc8fcSmrg with_gnu_ld=no 826455acc8fcSmrg wlarc= 82653da084b3Smrg 826655acc8fcSmrg # A generic and very simple default shared library creation 826755acc8fcSmrg # command for GNU C++ for the case where it uses the native 826855acc8fcSmrg # linker, instead of GNU ld. If possible, this setting should 826955acc8fcSmrg # overridden to take advantage of the native linker features on 827055acc8fcSmrg # the platform it is being used on. 827155acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 827255acc8fcSmrg fi 82733da084b3Smrg 827455acc8fcSmrg # Commands to make compiler produce verbose output that lists 827555acc8fcSmrg # what "hidden" libraries, object files and flags are used when 827655acc8fcSmrg # linking a shared library. 827755acc8fcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 82783da084b3Smrg 827955acc8fcSmrg else 828055acc8fcSmrg GXX=no 828155acc8fcSmrg with_gnu_ld=no 828255acc8fcSmrg wlarc= 828355acc8fcSmrg fi 82843da084b3Smrg 828555acc8fcSmrg # PORTME: fill in a description of your system's C++ link characteristics 828655acc8fcSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 828755acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 828855acc8fcSmrg case $host_os in 828955acc8fcSmrg aix3*) 829055acc8fcSmrg # FIXME: insert proper C++ library support 829155acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 829255acc8fcSmrg ;; 829355acc8fcSmrg aix[[4-9]]*) 829455acc8fcSmrg if test "$host_cpu" = ia64; then 829555acc8fcSmrg # On IA64, the linker does run time linking by default, so we don't 829655acc8fcSmrg # have to do anything special. 829755acc8fcSmrg aix_use_runtimelinking=no 829855acc8fcSmrg exp_sym_flag='-Bexport' 829955acc8fcSmrg no_entry_flag="" 830055acc8fcSmrg else 830155acc8fcSmrg aix_use_runtimelinking=no 83023da084b3Smrg 830355acc8fcSmrg # Test if we are trying to use run time linking or normal 830455acc8fcSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 830555acc8fcSmrg # need to do runtime linking. 830655acc8fcSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 830755acc8fcSmrg for ld_flag in $LDFLAGS; do 830855acc8fcSmrg case $ld_flag in 830955acc8fcSmrg *-brtl*) 831055acc8fcSmrg aix_use_runtimelinking=yes 831155acc8fcSmrg break 831255acc8fcSmrg ;; 831355acc8fcSmrg esac 831455acc8fcSmrg done 831555acc8fcSmrg ;; 831655acc8fcSmrg esac 8317d63fdb69Smrg 831855acc8fcSmrg exp_sym_flag='-bexport' 831955acc8fcSmrg no_entry_flag='-bnoentry' 832055acc8fcSmrg fi 8321d63fdb69Smrg 832255acc8fcSmrg # When large executables or shared objects are built, AIX ld can 832355acc8fcSmrg # have problems creating the table of contents. If linking a library 832455acc8fcSmrg # or program results in "error TOC overflow" add -mminimal-toc to 832555acc8fcSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 832655acc8fcSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 83273da084b3Smrg 832855acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='' 832955acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 833055acc8fcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 833155acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 833255acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 833355acc8fcSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 83343da084b3Smrg 833555acc8fcSmrg if test "$GXX" = yes; then 833655acc8fcSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 833755acc8fcSmrg # We only want to do this on AIX 4.2 and lower, the check 833855acc8fcSmrg # below for broken collect2 doesn't work under 4.3+ 833955acc8fcSmrg collect2name=`${CC} -print-prog-name=collect2` 834055acc8fcSmrg if test -f "$collect2name" && 834155acc8fcSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 834255acc8fcSmrg then 834355acc8fcSmrg # We have reworked collect2 834455acc8fcSmrg : 834555acc8fcSmrg else 834655acc8fcSmrg # We have old collect2 834755acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 834855acc8fcSmrg # It fails to find uninstalled libraries when the uninstalled 834955acc8fcSmrg # path is not listed in the libpath. Setting hardcode_minus_L 835055acc8fcSmrg # to unsupported forces relinking 835155acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 835255acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 835355acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 835455acc8fcSmrg fi 835555acc8fcSmrg esac 835655acc8fcSmrg shared_flag='-shared' 835755acc8fcSmrg if test "$aix_use_runtimelinking" = yes; then 835855acc8fcSmrg shared_flag="$shared_flag "'${wl}-G' 835955acc8fcSmrg fi 836055acc8fcSmrg else 836155acc8fcSmrg # not using gcc 836255acc8fcSmrg if test "$host_cpu" = ia64; then 836355acc8fcSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 836455acc8fcSmrg # chokes on -Wl,-G. The following line is correct: 836555acc8fcSmrg shared_flag='-G' 836655acc8fcSmrg else 836755acc8fcSmrg if test "$aix_use_runtimelinking" = yes; then 836855acc8fcSmrg shared_flag='${wl}-G' 836955acc8fcSmrg else 837055acc8fcSmrg shared_flag='${wl}-bM:SRE' 837155acc8fcSmrg fi 837255acc8fcSmrg fi 837355acc8fcSmrg fi 8374d63fdb69Smrg 837555acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 837655acc8fcSmrg # It seems that -bexpall does not export symbols beginning with 837755acc8fcSmrg # underscore (_), so it is better to generate a list of symbols to 837855acc8fcSmrg # export. 837955acc8fcSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 838055acc8fcSmrg if test "$aix_use_runtimelinking" = yes; then 838155acc8fcSmrg # Warning - without using the other runtime loading flags (-brtl), 838255acc8fcSmrg # -berok will link without error, but may produce a broken library. 838355acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 838455acc8fcSmrg # Determine the default libpath from the value encoded in an empty 838555acc8fcSmrg # executable. 838655acc8fcSmrg _LT_SYS_MODULE_PATH_AIX 838755acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 83883da084b3Smrg 838955acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 839055acc8fcSmrg else 839155acc8fcSmrg if test "$host_cpu" = ia64; then 839255acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 839355acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 839455acc8fcSmrg _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" 839555acc8fcSmrg else 839655acc8fcSmrg # Determine the default libpath from the value encoded in an 839755acc8fcSmrg # empty executable. 839855acc8fcSmrg _LT_SYS_MODULE_PATH_AIX 839955acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 840055acc8fcSmrg # Warning - without using the other run time loading flags, 840155acc8fcSmrg # -berok will link without error, but may produce a broken library. 840255acc8fcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 840355acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 840455acc8fcSmrg if test "$with_gnu_ld" = yes; then 840555acc8fcSmrg # We only use this code for GNU lds that support --whole-archive. 840655acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 840755acc8fcSmrg else 840855acc8fcSmrg # Exported symbols can be pulled into shared objects from archives 840955acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 841055acc8fcSmrg fi 841155acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 841255acc8fcSmrg # This is similar to how AIX traditionally builds its shared 841355acc8fcSmrg # libraries. 841455acc8fcSmrg _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' 841555acc8fcSmrg fi 841655acc8fcSmrg fi 841755acc8fcSmrg ;; 84183da084b3Smrg 841955acc8fcSmrg beos*) 842055acc8fcSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 842155acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 842255acc8fcSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 842355acc8fcSmrg # support --undefined. This deserves some investigation. FIXME 842455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 842555acc8fcSmrg else 842655acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 842755acc8fcSmrg fi 842855acc8fcSmrg ;; 84293da084b3Smrg 843055acc8fcSmrg chorus*) 843155acc8fcSmrg case $cc_basename in 843255acc8fcSmrg *) 843355acc8fcSmrg # FIXME: insert proper C++ library support 843455acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 843555acc8fcSmrg ;; 843655acc8fcSmrg esac 843755acc8fcSmrg ;; 84383da084b3Smrg 843955acc8fcSmrg cygwin* | mingw* | pw32* | cegcc*) 844055acc8fcSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 844155acc8fcSmrg # as there is no search path for DLLs. 844255acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 844355acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 844455acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 844555acc8fcSmrg _LT_TAGVAR(always_export_symbols, $1)=no 844655acc8fcSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 84473da084b3Smrg 844855acc8fcSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 844955acc8fcSmrg _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' 845055acc8fcSmrg # If the export-symbols file already is a .def file (1st line 845155acc8fcSmrg # is EXPORTS), use it as is; otherwise, prepend... 845255acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 845355acc8fcSmrg cp $export_symbols $output_objdir/$soname.def; 845455acc8fcSmrg else 845555acc8fcSmrg echo EXPORTS > $output_objdir/$soname.def; 845655acc8fcSmrg cat $export_symbols >> $output_objdir/$soname.def; 845755acc8fcSmrg fi~ 845855acc8fcSmrg $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' 845955acc8fcSmrg else 846055acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 846155acc8fcSmrg fi 846255acc8fcSmrg ;; 846355acc8fcSmrg darwin* | rhapsody*) 846455acc8fcSmrg _LT_DARWIN_LINKER_FEATURES($1) 846555acc8fcSmrg ;; 84663da084b3Smrg 846755acc8fcSmrg dgux*) 846855acc8fcSmrg case $cc_basename in 846955acc8fcSmrg ec++*) 847055acc8fcSmrg # FIXME: insert proper C++ library support 847155acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 847255acc8fcSmrg ;; 847355acc8fcSmrg ghcx*) 847455acc8fcSmrg # Green Hills C++ Compiler 847555acc8fcSmrg # FIXME: insert proper C++ library support 847655acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 847755acc8fcSmrg ;; 847855acc8fcSmrg *) 847955acc8fcSmrg # FIXME: insert proper C++ library support 848055acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 848155acc8fcSmrg ;; 848255acc8fcSmrg esac 848355acc8fcSmrg ;; 84843da084b3Smrg 848555acc8fcSmrg freebsd[[12]]*) 848655acc8fcSmrg # C++ shared libraries reported to be fairly broken before 848755acc8fcSmrg # switch to ELF 848855acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 848955acc8fcSmrg ;; 84903da084b3Smrg 849155acc8fcSmrg freebsd-elf*) 849255acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 849355acc8fcSmrg ;; 84943da084b3Smrg 849555acc8fcSmrg freebsd* | dragonfly*) 849655acc8fcSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 849755acc8fcSmrg # conventions 849855acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 849955acc8fcSmrg ;; 85003da084b3Smrg 850155acc8fcSmrg gnu*) 850255acc8fcSmrg ;; 85033da084b3Smrg 850455acc8fcSmrg haiku*) 850555acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 850655acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 850755acc8fcSmrg ;; 85083da084b3Smrg 850955acc8fcSmrg hpux9*) 851055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 851155acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 851255acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 851355acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 851455acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 851555acc8fcSmrg # but as the default 851655acc8fcSmrg # location of the library. 85173da084b3Smrg 851855acc8fcSmrg case $cc_basename in 851955acc8fcSmrg CC*) 852055acc8fcSmrg # FIXME: insert proper C++ library support 852155acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 852255acc8fcSmrg ;; 852355acc8fcSmrg aCC*) 852455acc8fcSmrg _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' 852555acc8fcSmrg # Commands to make compiler produce verbose output that lists 852655acc8fcSmrg # what "hidden" libraries, object files and flags are used when 852755acc8fcSmrg # linking a shared library. 852855acc8fcSmrg # 852955acc8fcSmrg # There doesn't appear to be a way to prevent this compiler from 853055acc8fcSmrg # explicitly linking system object files so we need to strip them 853155acc8fcSmrg # from the output so that they don't get included in the library 853255acc8fcSmrg # dependencies. 853355acc8fcSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 853455acc8fcSmrg ;; 853555acc8fcSmrg *) 853655acc8fcSmrg if test "$GXX" = yes; then 853755acc8fcSmrg _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' 853855acc8fcSmrg else 853955acc8fcSmrg # FIXME: insert proper C++ library support 854055acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 854155acc8fcSmrg fi 854255acc8fcSmrg ;; 854355acc8fcSmrg esac 854455acc8fcSmrg ;; 85453da084b3Smrg 854655acc8fcSmrg hpux10*|hpux11*) 854755acc8fcSmrg if test $with_gnu_ld = no; then 854855acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 854955acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 85503da084b3Smrg 855155acc8fcSmrg case $host_cpu in 855255acc8fcSmrg hppa*64*|ia64*) 855355acc8fcSmrg ;; 855455acc8fcSmrg *) 855555acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 855655acc8fcSmrg ;; 855755acc8fcSmrg esac 855855acc8fcSmrg fi 855955acc8fcSmrg case $host_cpu in 856055acc8fcSmrg hppa*64*|ia64*) 856155acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 856255acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 856355acc8fcSmrg ;; 856455acc8fcSmrg *) 856555acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 856655acc8fcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 856755acc8fcSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 856855acc8fcSmrg # but as the default 856955acc8fcSmrg # location of the library. 857055acc8fcSmrg ;; 857155acc8fcSmrg esac 85723da084b3Smrg 857355acc8fcSmrg case $cc_basename in 857455acc8fcSmrg CC*) 857555acc8fcSmrg # FIXME: insert proper C++ library support 857655acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 857755acc8fcSmrg ;; 857855acc8fcSmrg aCC*) 857955acc8fcSmrg case $host_cpu in 858055acc8fcSmrg hppa*64*) 858155acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 858255acc8fcSmrg ;; 858355acc8fcSmrg ia64*) 858455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 858555acc8fcSmrg ;; 858655acc8fcSmrg *) 858755acc8fcSmrg _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' 858855acc8fcSmrg ;; 858955acc8fcSmrg esac 859055acc8fcSmrg # Commands to make compiler produce verbose output that lists 859155acc8fcSmrg # what "hidden" libraries, object files and flags are used when 859255acc8fcSmrg # linking a shared library. 859355acc8fcSmrg # 859455acc8fcSmrg # There doesn't appear to be a way to prevent this compiler from 859555acc8fcSmrg # explicitly linking system object files so we need to strip them 859655acc8fcSmrg # from the output so that they don't get included in the library 859755acc8fcSmrg # dependencies. 859855acc8fcSmrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 859955acc8fcSmrg ;; 860055acc8fcSmrg *) 860155acc8fcSmrg if test "$GXX" = yes; then 860255acc8fcSmrg if test $with_gnu_ld = no; then 860355acc8fcSmrg case $host_cpu in 860455acc8fcSmrg hppa*64*) 860555acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 860655acc8fcSmrg ;; 860755acc8fcSmrg ia64*) 860855acc8fcSmrg _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' 860955acc8fcSmrg ;; 861055acc8fcSmrg *) 861155acc8fcSmrg _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' 861255acc8fcSmrg ;; 861355acc8fcSmrg esac 861455acc8fcSmrg fi 861555acc8fcSmrg else 861655acc8fcSmrg # FIXME: insert proper C++ library support 861755acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 861855acc8fcSmrg fi 861955acc8fcSmrg ;; 862055acc8fcSmrg esac 862155acc8fcSmrg ;; 86223da084b3Smrg 862355acc8fcSmrg interix[[3-9]]*) 862455acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=no 862555acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 862655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 862755acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 862855acc8fcSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 862955acc8fcSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 863055acc8fcSmrg # default) and relocated if they conflict, which is a slow very memory 863155acc8fcSmrg # consuming and fragmenting process. To avoid this, we pick a random, 863255acc8fcSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 863355acc8fcSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 863455acc8fcSmrg _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' 863555acc8fcSmrg _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' 863655acc8fcSmrg ;; 863755acc8fcSmrg irix5* | irix6*) 863855acc8fcSmrg case $cc_basename in 863955acc8fcSmrg CC*) 864055acc8fcSmrg # SGI C++ 864155acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 86423da084b3Smrg 864355acc8fcSmrg # Archives containing C++ object files must be created using 864455acc8fcSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 864555acc8fcSmrg # necessary to make sure instantiated templates are included 864655acc8fcSmrg # in the archive. 864755acc8fcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 864855acc8fcSmrg ;; 864955acc8fcSmrg *) 865055acc8fcSmrg if test "$GXX" = yes; then 865155acc8fcSmrg if test "$with_gnu_ld" = no; then 865255acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 865355acc8fcSmrg else 865455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 865555acc8fcSmrg fi 865655acc8fcSmrg fi 865755acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 865855acc8fcSmrg ;; 865955acc8fcSmrg esac 866055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 866155acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 866255acc8fcSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 866355acc8fcSmrg ;; 86643da084b3Smrg 866555acc8fcSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 866655acc8fcSmrg case $cc_basename in 866755acc8fcSmrg KCC*) 866855acc8fcSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 86693da084b3Smrg 867055acc8fcSmrg # KCC will only create a shared library if the output file 867155acc8fcSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 867255acc8fcSmrg # to its proper name (with version) after linking. 867355acc8fcSmrg _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' 867455acc8fcSmrg _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' 867555acc8fcSmrg # Commands to make compiler produce verbose output that lists 867655acc8fcSmrg # what "hidden" libraries, object files and flags are used when 867755acc8fcSmrg # linking a shared library. 867855acc8fcSmrg # 867955acc8fcSmrg # There doesn't appear to be a way to prevent this compiler from 868055acc8fcSmrg # explicitly linking system object files so we need to strip them 868155acc8fcSmrg # from the output so that they don't get included in the library 868255acc8fcSmrg # dependencies. 868355acc8fcSmrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 86843da084b3Smrg 868555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 868655acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 86873da084b3Smrg 868855acc8fcSmrg # Archives containing C++ object files must be created using 868955acc8fcSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 869055acc8fcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 869155acc8fcSmrg ;; 869255acc8fcSmrg icpc* | ecpc* ) 869355acc8fcSmrg # Intel C++ 869455acc8fcSmrg with_gnu_ld=yes 869555acc8fcSmrg # version 8.0 and above of icpc choke on multiply defined symbols 869655acc8fcSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 869755acc8fcSmrg # earlier do not add the objects themselves. 869855acc8fcSmrg case `$CC -V 2>&1` in 869955acc8fcSmrg *"Version 7."*) 870055acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 870155acc8fcSmrg _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' 870255acc8fcSmrg ;; 870355acc8fcSmrg *) # Version 8.0 or newer 870455acc8fcSmrg tmp_idyn= 870555acc8fcSmrg case $host_cpu in 870655acc8fcSmrg ia64*) tmp_idyn=' -i_dynamic';; 870755acc8fcSmrg esac 870855acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 870955acc8fcSmrg _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' 871055acc8fcSmrg ;; 871155acc8fcSmrg esac 871255acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 871355acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 871455acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 871555acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 871655acc8fcSmrg ;; 871755acc8fcSmrg pgCC* | pgcpp*) 871855acc8fcSmrg # Portland Group C++ compiler 871955acc8fcSmrg case `$CC -V` in 872055acc8fcSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 872155acc8fcSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 872255acc8fcSmrg rm -rf $tpldir~ 872355acc8fcSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 872455acc8fcSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 872555acc8fcSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 872655acc8fcSmrg rm -rf $tpldir~ 872755acc8fcSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 872855acc8fcSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 872955acc8fcSmrg $RANLIB $oldlib' 873055acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 873155acc8fcSmrg rm -rf $tpldir~ 873255acc8fcSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 873355acc8fcSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 873455acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 873555acc8fcSmrg rm -rf $tpldir~ 873655acc8fcSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 873755acc8fcSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 873855acc8fcSmrg ;; 873955acc8fcSmrg *) # Version 6 and above use weak symbols 874055acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 874155acc8fcSmrg _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' 874255acc8fcSmrg ;; 874355acc8fcSmrg esac 87443da084b3Smrg 874555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 874655acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 874755acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 874855acc8fcSmrg ;; 874955acc8fcSmrg cxx*) 875055acc8fcSmrg # Compaq C++ 875155acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 875255acc8fcSmrg _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' 87533da084b3Smrg 875455acc8fcSmrg runpath_var=LD_RUN_PATH 875555acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 875655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 87573da084b3Smrg 875855acc8fcSmrg # Commands to make compiler produce verbose output that lists 875955acc8fcSmrg # what "hidden" libraries, object files and flags are used when 876055acc8fcSmrg # linking a shared library. 876155acc8fcSmrg # 876255acc8fcSmrg # There doesn't appear to be a way to prevent this compiler from 876355acc8fcSmrg # explicitly linking system object files so we need to strip them 876455acc8fcSmrg # from the output so that they don't get included in the library 876555acc8fcSmrg # dependencies. 876655acc8fcSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 876755acc8fcSmrg ;; 876855acc8fcSmrg xl* | mpixl* | bgxl*) 876955acc8fcSmrg # IBM XL 8.0 on PPC, with GNU ld 877055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 877155acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 877255acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 877355acc8fcSmrg if test "x$supports_anon_versioning" = xyes; then 877455acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 877555acc8fcSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 877655acc8fcSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 877755acc8fcSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 877855acc8fcSmrg fi 877955acc8fcSmrg ;; 878055acc8fcSmrg *) 878155acc8fcSmrg case `$CC -V 2>&1 | sed 5q` in 878255acc8fcSmrg *Sun\ C*) 878355acc8fcSmrg # Sun C++ 5.9 878455acc8fcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 878555acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 878655acc8fcSmrg _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' 878755acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 878855acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 878955acc8fcSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 87903da084b3Smrg 879155acc8fcSmrg # Not sure whether something based on 879255acc8fcSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 879355acc8fcSmrg # would be better. 879455acc8fcSmrg output_verbose_link_cmd='func_echo_all' 87953da084b3Smrg 879655acc8fcSmrg # Archives containing C++ object files must be created using 879755acc8fcSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 879855acc8fcSmrg # necessary to make sure instantiated templates are included 879955acc8fcSmrg # in the archive. 880055acc8fcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 880155acc8fcSmrg ;; 880255acc8fcSmrg esac 880355acc8fcSmrg ;; 880455acc8fcSmrg esac 880555acc8fcSmrg ;; 8806d63fdb69Smrg 880755acc8fcSmrg lynxos*) 880855acc8fcSmrg # FIXME: insert proper C++ library support 880955acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 881055acc8fcSmrg ;; 88113da084b3Smrg 881255acc8fcSmrg m88k*) 881355acc8fcSmrg # FIXME: insert proper C++ library support 881455acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 881555acc8fcSmrg ;; 88163da084b3Smrg 881755acc8fcSmrg mvs*) 881855acc8fcSmrg case $cc_basename in 881955acc8fcSmrg cxx*) 882055acc8fcSmrg # FIXME: insert proper C++ library support 882155acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 882255acc8fcSmrg ;; 882355acc8fcSmrg *) 882455acc8fcSmrg # FIXME: insert proper C++ library support 882555acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 882655acc8fcSmrg ;; 882755acc8fcSmrg esac 882855acc8fcSmrg ;; 88293da084b3Smrg 883055acc8fcSmrg netbsd*) 883155acc8fcSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 883255acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 883355acc8fcSmrg wlarc= 883455acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 883555acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 883655acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 883755acc8fcSmrg fi 883855acc8fcSmrg # Workaround some broken pre-1.5 toolchains 883955acc8fcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 884055acc8fcSmrg ;; 88413da084b3Smrg 884255acc8fcSmrg *nto* | *qnx*) 884355acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 884455acc8fcSmrg ;; 8845d63fdb69Smrg 884655acc8fcSmrg openbsd2*) 884755acc8fcSmrg # C++ shared libraries are fairly broken 884855acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 884955acc8fcSmrg ;; 8850d63fdb69Smrg 885155acc8fcSmrg openbsd*) 885255acc8fcSmrg if test -f /usr/libexec/ld.so; then 885355acc8fcSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 885455acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 885555acc8fcSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 885655acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 885755acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 885855acc8fcSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 885955acc8fcSmrg _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' 886055acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 886155acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 886255acc8fcSmrg fi 886355acc8fcSmrg output_verbose_link_cmd=func_echo_all 886455acc8fcSmrg else 886555acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 886655acc8fcSmrg fi 886755acc8fcSmrg ;; 8868d63fdb69Smrg 886955acc8fcSmrg osf3* | osf4* | osf5*) 887055acc8fcSmrg case $cc_basename in 887155acc8fcSmrg KCC*) 887255acc8fcSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8873d63fdb69Smrg 887455acc8fcSmrg # KCC will only create a shared library if the output file 887555acc8fcSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 887655acc8fcSmrg # to its proper name (with version) after linking. 887755acc8fcSmrg _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' 8878d63fdb69Smrg 887955acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 888055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8881d63fdb69Smrg 888255acc8fcSmrg # Archives containing C++ object files must be created using 888355acc8fcSmrg # the KAI C++ compiler. 888455acc8fcSmrg case $host in 888555acc8fcSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 888655acc8fcSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 888755acc8fcSmrg esac 888855acc8fcSmrg ;; 888955acc8fcSmrg RCC*) 889055acc8fcSmrg # Rational C++ 2.4.1 889155acc8fcSmrg # FIXME: insert proper C++ library support 889255acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 889355acc8fcSmrg ;; 889455acc8fcSmrg cxx*) 889555acc8fcSmrg case $host in 889655acc8fcSmrg osf3*) 889755acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 889855acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 889955acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 890055acc8fcSmrg ;; 890155acc8fcSmrg *) 890255acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 890355acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 890455acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 890555acc8fcSmrg echo "-hidden">> $lib.exp~ 890655acc8fcSmrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ 890755acc8fcSmrg $RM $lib.exp' 890855acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 890955acc8fcSmrg ;; 891055acc8fcSmrg esac 8911d63fdb69Smrg 891255acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8913d63fdb69Smrg 891455acc8fcSmrg # Commands to make compiler produce verbose output that lists 891555acc8fcSmrg # what "hidden" libraries, object files and flags are used when 891655acc8fcSmrg # linking a shared library. 891755acc8fcSmrg # 891855acc8fcSmrg # There doesn't appear to be a way to prevent this compiler from 891955acc8fcSmrg # explicitly linking system object files so we need to strip them 892055acc8fcSmrg # from the output so that they don't get included in the library 892155acc8fcSmrg # dependencies. 892255acc8fcSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 892355acc8fcSmrg ;; 892455acc8fcSmrg *) 892555acc8fcSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 892655acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 892755acc8fcSmrg case $host in 892855acc8fcSmrg osf3*) 892955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 893055acc8fcSmrg ;; 893155acc8fcSmrg *) 893255acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 893355acc8fcSmrg ;; 893455acc8fcSmrg esac 8935d63fdb69Smrg 893655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 893755acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8938d63fdb69Smrg 893955acc8fcSmrg # Commands to make compiler produce verbose output that lists 894055acc8fcSmrg # what "hidden" libraries, object files and flags are used when 894155acc8fcSmrg # linking a shared library. 894255acc8fcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8943d63fdb69Smrg 894455acc8fcSmrg else 894555acc8fcSmrg # FIXME: insert proper C++ library support 894655acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 894755acc8fcSmrg fi 894855acc8fcSmrg ;; 894955acc8fcSmrg esac 895055acc8fcSmrg ;; 8951d63fdb69Smrg 895255acc8fcSmrg psos*) 895355acc8fcSmrg # FIXME: insert proper C++ library support 895455acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 895555acc8fcSmrg ;; 8956d63fdb69Smrg 895755acc8fcSmrg sunos4*) 895855acc8fcSmrg case $cc_basename in 895955acc8fcSmrg CC*) 896055acc8fcSmrg # Sun C++ 4.x 896155acc8fcSmrg # FIXME: insert proper C++ library support 896255acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 896355acc8fcSmrg ;; 896455acc8fcSmrg lcc*) 896555acc8fcSmrg # Lucid 896655acc8fcSmrg # FIXME: insert proper C++ library support 896755acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 896855acc8fcSmrg ;; 896955acc8fcSmrg *) 897055acc8fcSmrg # FIXME: insert proper C++ library support 897155acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 897255acc8fcSmrg ;; 897355acc8fcSmrg esac 897455acc8fcSmrg ;; 8975d63fdb69Smrg 897655acc8fcSmrg solaris*) 897755acc8fcSmrg case $cc_basename in 897855acc8fcSmrg CC* | sunCC*) 897955acc8fcSmrg # Sun C++ 4.2, 5.x and Centerline C++ 898055acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 898155acc8fcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 898255acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 898355acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 898455acc8fcSmrg $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' 8985d63fdb69Smrg 898655acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 898755acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 898855acc8fcSmrg case $host_os in 898955acc8fcSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 899055acc8fcSmrg *) 899155acc8fcSmrg # The compiler driver will combine and reorder linker options, 899255acc8fcSmrg # but understands `-z linker_flag'. 899355acc8fcSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 899455acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 899555acc8fcSmrg ;; 899655acc8fcSmrg esac 899755acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8998d63fdb69Smrg 899955acc8fcSmrg output_verbose_link_cmd='func_echo_all' 9000d63fdb69Smrg 900155acc8fcSmrg # Archives containing C++ object files must be created using 900255acc8fcSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 900355acc8fcSmrg # necessary to make sure instantiated templates are included 900455acc8fcSmrg # in the archive. 900555acc8fcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 900655acc8fcSmrg ;; 900755acc8fcSmrg gcx*) 900855acc8fcSmrg # Green Hills C++ Compiler 900955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 9010d63fdb69Smrg 901155acc8fcSmrg # The C++ compiler must be used to create the archive. 901255acc8fcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 901355acc8fcSmrg ;; 901455acc8fcSmrg *) 901555acc8fcSmrg # GNU C++ compiler with Solaris linker 901655acc8fcSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 901755acc8fcSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 901855acc8fcSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 901955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 902055acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 902155acc8fcSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 9022d63fdb69Smrg 902355acc8fcSmrg # Commands to make compiler produce verbose output that lists 902455acc8fcSmrg # what "hidden" libraries, object files and flags are used when 902555acc8fcSmrg # linking a shared library. 902655acc8fcSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 902755acc8fcSmrg else 902855acc8fcSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 902955acc8fcSmrg # platform. 903055acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 903155acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 903255acc8fcSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 9033d63fdb69Smrg 903455acc8fcSmrg # Commands to make compiler produce verbose output that lists 903555acc8fcSmrg # what "hidden" libraries, object files and flags are used when 903655acc8fcSmrg # linking a shared library. 903755acc8fcSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 903855acc8fcSmrg fi 9039d63fdb69Smrg 904055acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 904155acc8fcSmrg case $host_os in 904255acc8fcSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 904355acc8fcSmrg *) 904455acc8fcSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 904555acc8fcSmrg ;; 904655acc8fcSmrg esac 904755acc8fcSmrg fi 904855acc8fcSmrg ;; 904955acc8fcSmrg esac 905055acc8fcSmrg ;; 9051d63fdb69Smrg 905255acc8fcSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 905355acc8fcSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 905455acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 905555acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 905655acc8fcSmrg runpath_var='LD_RUN_PATH' 9057d63fdb69Smrg 905855acc8fcSmrg case $cc_basename in 905955acc8fcSmrg CC*) 906055acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 906155acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 906255acc8fcSmrg ;; 906355acc8fcSmrg *) 906455acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 906555acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 906655acc8fcSmrg ;; 906755acc8fcSmrg esac 906855acc8fcSmrg ;; 9069d63fdb69Smrg 907055acc8fcSmrg sysv5* | sco3.2v5* | sco5v6*) 907155acc8fcSmrg # Note: We can NOT use -z defs as we might desire, because we do not 907255acc8fcSmrg # link with -lc, and that would cause any symbols used from libc to 907355acc8fcSmrg # always be unresolved, which means just about no library would 907455acc8fcSmrg # ever link correctly. If we're not using GNU ld we use -z text 907555acc8fcSmrg # though, which does catch some bad symbols but isn't as heavy-handed 907655acc8fcSmrg # as -z defs. 907755acc8fcSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 907855acc8fcSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 907955acc8fcSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 908055acc8fcSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 908155acc8fcSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 908255acc8fcSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 908355acc8fcSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 908455acc8fcSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 908555acc8fcSmrg runpath_var='LD_RUN_PATH' 9086d63fdb69Smrg 908755acc8fcSmrg case $cc_basename in 908855acc8fcSmrg CC*) 908955acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 909055acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 909155acc8fcSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 909255acc8fcSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 909355acc8fcSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 909455acc8fcSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 909555acc8fcSmrg ;; 909655acc8fcSmrg *) 909755acc8fcSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 909855acc8fcSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 909955acc8fcSmrg ;; 910055acc8fcSmrg esac 910155acc8fcSmrg ;; 9102d63fdb69Smrg 910355acc8fcSmrg tandem*) 910455acc8fcSmrg case $cc_basename in 910555acc8fcSmrg NCC*) 910655acc8fcSmrg # NonStop-UX NCC 3.20 910755acc8fcSmrg # FIXME: insert proper C++ library support 910855acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 910955acc8fcSmrg ;; 911055acc8fcSmrg *) 911155acc8fcSmrg # FIXME: insert proper C++ library support 911255acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 911355acc8fcSmrg ;; 911455acc8fcSmrg esac 911555acc8fcSmrg ;; 9116d63fdb69Smrg 911755acc8fcSmrg vxworks*) 911855acc8fcSmrg # FIXME: insert proper C++ library support 911955acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 912055acc8fcSmrg ;; 9121d63fdb69Smrg 912255acc8fcSmrg *) 912355acc8fcSmrg # FIXME: insert proper C++ library support 912455acc8fcSmrg _LT_TAGVAR(ld_shlibs, $1)=no 912555acc8fcSmrg ;; 912655acc8fcSmrg esac 9127d63fdb69Smrg 912855acc8fcSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 912955acc8fcSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 9130d63fdb69Smrg 913155acc8fcSmrg _LT_TAGVAR(GCC, $1)="$GXX" 913255acc8fcSmrg _LT_TAGVAR(LD, $1)="$LD" 9133d63fdb69Smrg 913455acc8fcSmrg ## CAVEAT EMPTOR: 913555acc8fcSmrg ## There is no encapsulation within the following macros, do not change 913655acc8fcSmrg ## the running order or otherwise move them around unless you know exactly 913755acc8fcSmrg ## what you are doing... 913855acc8fcSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 913955acc8fcSmrg _LT_COMPILER_PIC($1) 914055acc8fcSmrg _LT_COMPILER_C_O($1) 914155acc8fcSmrg _LT_COMPILER_FILE_LOCKS($1) 914255acc8fcSmrg _LT_LINKER_SHLIBS($1) 914355acc8fcSmrg _LT_SYS_DYNAMIC_LINKER($1) 914455acc8fcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 9145d63fdb69Smrg 914655acc8fcSmrg _LT_CONFIG($1) 914755acc8fcSmrg fi # test -n "$compiler" 9148d63fdb69Smrg 914955acc8fcSmrg CC=$lt_save_CC 915055acc8fcSmrg LDCXX=$LD 915155acc8fcSmrg LD=$lt_save_LD 915255acc8fcSmrg GCC=$lt_save_GCC 915355acc8fcSmrg with_gnu_ld=$lt_save_with_gnu_ld 915455acc8fcSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 915555acc8fcSmrg lt_cv_path_LD=$lt_save_path_LD 915655acc8fcSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 915755acc8fcSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 915855acc8fcSmrgfi # test "$_lt_caught_CXX_error" != yes 9159d63fdb69Smrg 916055acc8fcSmrgAC_LANG_POP 916155acc8fcSmrg])# _LT_LANG_CXX_CONFIG 9162d63fdb69Smrg 9163d63fdb69Smrg 916455acc8fcSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 916555acc8fcSmrg# --------------------------------- 916655acc8fcSmrg# Figure out "hidden" library dependencies from verbose 916755acc8fcSmrg# compiler output when linking a shared library. 916855acc8fcSmrg# Parse the compiler output and extract the necessary 916955acc8fcSmrg# objects, libraries and library flags. 917055acc8fcSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 917155acc8fcSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 917255acc8fcSmrg# Dependencies to place before and after the object being linked: 917355acc8fcSmrg_LT_TAGVAR(predep_objects, $1)= 917455acc8fcSmrg_LT_TAGVAR(postdep_objects, $1)= 917555acc8fcSmrg_LT_TAGVAR(predeps, $1)= 917655acc8fcSmrg_LT_TAGVAR(postdeps, $1)= 917755acc8fcSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 9178d63fdb69Smrg 917955acc8fcSmrgdnl we can't use the lt_simple_compile_test_code here, 918055acc8fcSmrgdnl because it contains code intended for an executable, 918155acc8fcSmrgdnl not a library. It's possible we should let each 918255acc8fcSmrgdnl tag define a new lt_????_link_test_code variable, 918355acc8fcSmrgdnl but it's only used here... 918455acc8fcSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 918555acc8fcSmrgint a; 918655acc8fcSmrgvoid foo (void) { a = 0; } 918755acc8fcSmrg_LT_EOF 918855acc8fcSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 918955acc8fcSmrgclass Foo 919055acc8fcSmrg{ 919155acc8fcSmrgpublic: 919255acc8fcSmrg Foo (void) { a = 0; } 919355acc8fcSmrgprivate: 919455acc8fcSmrg int a; 919555acc8fcSmrg}; 919655acc8fcSmrg_LT_EOF 919755acc8fcSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 919855acc8fcSmrg subroutine foo 919955acc8fcSmrg implicit none 920055acc8fcSmrg integer*4 a 920155acc8fcSmrg a=0 920255acc8fcSmrg return 920355acc8fcSmrg end 920455acc8fcSmrg_LT_EOF 920555acc8fcSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 920655acc8fcSmrg subroutine foo 920755acc8fcSmrg implicit none 920855acc8fcSmrg integer a 920955acc8fcSmrg a=0 921055acc8fcSmrg return 921155acc8fcSmrg end 921255acc8fcSmrg_LT_EOF 921355acc8fcSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 921455acc8fcSmrgpublic class foo { 921555acc8fcSmrg private int a; 921655acc8fcSmrg public void bar (void) { 921755acc8fcSmrg a = 0; 921855acc8fcSmrg } 921955acc8fcSmrg}; 922055acc8fcSmrg_LT_EOF 922155acc8fcSmrg]) 922255acc8fcSmrgdnl Parse the compiler output and extract the necessary 922355acc8fcSmrgdnl objects, libraries and library flags. 922455acc8fcSmrgif AC_TRY_EVAL(ac_compile); then 922555acc8fcSmrg # Parse the compiler output and extract the necessary 922655acc8fcSmrg # objects, libraries and library flags. 9227d63fdb69Smrg 922855acc8fcSmrg # Sentinel used to keep track of whether or not we are before 922955acc8fcSmrg # the conftest object file. 923055acc8fcSmrg pre_test_object_deps_done=no 9231d63fdb69Smrg 923255acc8fcSmrg for p in `eval "$output_verbose_link_cmd"`; do 923355acc8fcSmrg case $p in 9234d63fdb69Smrg 923555acc8fcSmrg -L* | -R* | -l*) 923655acc8fcSmrg # Some compilers place space between "-{L,R}" and the path. 923755acc8fcSmrg # Remove the space. 923855acc8fcSmrg if test $p = "-L" || 923955acc8fcSmrg test $p = "-R"; then 924055acc8fcSmrg prev=$p 924155acc8fcSmrg continue 924255acc8fcSmrg else 924355acc8fcSmrg prev= 924455acc8fcSmrg fi 9245d63fdb69Smrg 924655acc8fcSmrg if test "$pre_test_object_deps_done" = no; then 924755acc8fcSmrg case $p in 924855acc8fcSmrg -L* | -R*) 924955acc8fcSmrg # Internal compiler library paths should come after those 925055acc8fcSmrg # provided the user. The postdeps already come after the 925155acc8fcSmrg # user supplied libs so there is no need to process them. 925255acc8fcSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 925355acc8fcSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 925455acc8fcSmrg else 925555acc8fcSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 925655acc8fcSmrg fi 925755acc8fcSmrg ;; 925855acc8fcSmrg # The "-l" case would never come before the object being 925955acc8fcSmrg # linked, so don't bother handling this case. 926055acc8fcSmrg esac 926155acc8fcSmrg else 926255acc8fcSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 926355acc8fcSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 926455acc8fcSmrg else 926555acc8fcSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 926655acc8fcSmrg fi 926755acc8fcSmrg fi 926855acc8fcSmrg ;; 9269d63fdb69Smrg 927055acc8fcSmrg *.$objext) 927155acc8fcSmrg # This assumes that the test object file only shows up 927255acc8fcSmrg # once in the compiler output. 927355acc8fcSmrg if test "$p" = "conftest.$objext"; then 927455acc8fcSmrg pre_test_object_deps_done=yes 927555acc8fcSmrg continue 927655acc8fcSmrg fi 9277d63fdb69Smrg 927855acc8fcSmrg if test "$pre_test_object_deps_done" = no; then 927955acc8fcSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 928055acc8fcSmrg _LT_TAGVAR(predep_objects, $1)="$p" 928155acc8fcSmrg else 928255acc8fcSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 928355acc8fcSmrg fi 928455acc8fcSmrg else 928555acc8fcSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 928655acc8fcSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 928755acc8fcSmrg else 928855acc8fcSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 928955acc8fcSmrg fi 929055acc8fcSmrg fi 929155acc8fcSmrg ;; 9292d63fdb69Smrg 929355acc8fcSmrg *) ;; # Ignore the rest. 9294d63fdb69Smrg 929555acc8fcSmrg esac 929655acc8fcSmrg done 9297d63fdb69Smrg 929855acc8fcSmrg # Clean up. 929955acc8fcSmrg rm -f a.out a.exe 930055acc8fcSmrgelse 930155acc8fcSmrg echo "libtool.m4: error: problem compiling $1 test program" 930255acc8fcSmrgfi 9303d63fdb69Smrg 930455acc8fcSmrg$RM -f confest.$objext 9305d63fdb69Smrg 930655acc8fcSmrg# PORTME: override above test on systems where it is broken 930755acc8fcSmrgm4_if([$1], [CXX], 930855acc8fcSmrg[case $host_os in 930955acc8fcSmrginterix[[3-9]]*) 931055acc8fcSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 931155acc8fcSmrg # hack all around it, let's just trust "g++" to DTRT. 931255acc8fcSmrg _LT_TAGVAR(predep_objects,$1)= 931355acc8fcSmrg _LT_TAGVAR(postdep_objects,$1)= 931455acc8fcSmrg _LT_TAGVAR(postdeps,$1)= 931555acc8fcSmrg ;; 9316d63fdb69Smrg 931755acc8fcSmrglinux*) 931855acc8fcSmrg case `$CC -V 2>&1 | sed 5q` in 931955acc8fcSmrg *Sun\ C*) 932055acc8fcSmrg # Sun C++ 5.9 9321d63fdb69Smrg 932255acc8fcSmrg # The more standards-conforming stlport4 library is 932355acc8fcSmrg # incompatible with the Cstd library. Avoid specifying 932455acc8fcSmrg # it if it's in CXXFLAGS. Ignore libCrun as 932555acc8fcSmrg # -library=stlport4 depends on it. 932655acc8fcSmrg case " $CXX $CXXFLAGS " in 932755acc8fcSmrg *" -library=stlport4 "*) 932855acc8fcSmrg solaris_use_stlport4=yes 932955acc8fcSmrg ;; 933055acc8fcSmrg esac 9331d63fdb69Smrg 933255acc8fcSmrg if test "$solaris_use_stlport4" != yes; then 933355acc8fcSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 933455acc8fcSmrg fi 933555acc8fcSmrg ;; 933655acc8fcSmrg esac 933755acc8fcSmrg ;; 9338d63fdb69Smrg 933955acc8fcSmrgsolaris*) 934055acc8fcSmrg case $cc_basename in 934155acc8fcSmrg CC* | sunCC*) 934255acc8fcSmrg # The more standards-conforming stlport4 library is 934355acc8fcSmrg # incompatible with the Cstd library. Avoid specifying 934455acc8fcSmrg # it if it's in CXXFLAGS. Ignore libCrun as 934555acc8fcSmrg # -library=stlport4 depends on it. 934655acc8fcSmrg case " $CXX $CXXFLAGS " in 934755acc8fcSmrg *" -library=stlport4 "*) 934855acc8fcSmrg solaris_use_stlport4=yes 934955acc8fcSmrg ;; 935055acc8fcSmrg esac 9351d63fdb69Smrg 935255acc8fcSmrg # Adding this requires a known-good setup of shared libraries for 935355acc8fcSmrg # Sun compiler versions before 5.6, else PIC objects from an old 935455acc8fcSmrg # archive will be linked into the output, leading to subtle bugs. 935555acc8fcSmrg if test "$solaris_use_stlport4" != yes; then 935655acc8fcSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 935755acc8fcSmrg fi 935855acc8fcSmrg ;; 935955acc8fcSmrg esac 936055acc8fcSmrg ;; 936155acc8fcSmrgesac 936255acc8fcSmrg]) 9363d63fdb69Smrg 936455acc8fcSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 936555acc8fcSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 936655acc8fcSmrgesac 936755acc8fcSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 936855acc8fcSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 936955acc8fcSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 937055acc8fcSmrgfi 937155acc8fcSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 937255acc8fcSmrg [The directories searched by this compiler when creating a shared library]) 937355acc8fcSmrg_LT_TAGDECL([], [predep_objects], [1], 937455acc8fcSmrg [Dependencies to place before and after the objects being linked to 937555acc8fcSmrg create a shared library]) 937655acc8fcSmrg_LT_TAGDECL([], [postdep_objects], [1]) 937755acc8fcSmrg_LT_TAGDECL([], [predeps], [1]) 937855acc8fcSmrg_LT_TAGDECL([], [postdeps], [1]) 937955acc8fcSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 938055acc8fcSmrg [The library search path used internally by the compiler when linking 938155acc8fcSmrg a shared library]) 938255acc8fcSmrg])# _LT_SYS_HIDDEN_LIBDEPS 9383d63fdb69Smrg 9384d63fdb69Smrg 938555acc8fcSmrg# _LT_LANG_F77_CONFIG([TAG]) 938655acc8fcSmrg# -------------------------- 938755acc8fcSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 938855acc8fcSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 938955acc8fcSmrg# to write the compiler configuration to `libtool'. 939055acc8fcSmrgm4_defun([_LT_LANG_F77_CONFIG], 939155acc8fcSmrg[AC_LANG_PUSH(Fortran 77) 939255acc8fcSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 939355acc8fcSmrg _lt_disable_F77=yes 9394d63fdb69Smrgfi 9395d63fdb69Smrg 939655acc8fcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 939755acc8fcSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 939855acc8fcSmrg_LT_TAGVAR(always_export_symbols, $1)=no 939955acc8fcSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 940055acc8fcSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 940155acc8fcSmrg_LT_TAGVAR(hardcode_direct, $1)=no 940255acc8fcSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 940355acc8fcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 940455acc8fcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 940555acc8fcSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 940655acc8fcSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 940755acc8fcSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 940855acc8fcSmrg_LT_TAGVAR(inherit_rpath, $1)=no 940955acc8fcSmrg_LT_TAGVAR(module_cmds, $1)= 941055acc8fcSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 941155acc8fcSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 941255acc8fcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 941355acc8fcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 941455acc8fcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 941555acc8fcSmrg_LT_TAGVAR(no_undefined_flag, $1)= 941655acc8fcSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 941755acc8fcSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9418d63fdb69Smrg 941955acc8fcSmrg# Source file extension for f77 test sources. 942055acc8fcSmrgac_ext=f 9421d63fdb69Smrg 942255acc8fcSmrg# Object file extension for compiled f77 test sources. 942355acc8fcSmrgobjext=o 942455acc8fcSmrg_LT_TAGVAR(objext, $1)=$objext 9425d63fdb69Smrg 942655acc8fcSmrg# No sense in running all these tests if we already determined that 942755acc8fcSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 942855acc8fcSmrg# are currently assumed to apply to all compilers on this platform, 942955acc8fcSmrg# and will be corrupted by setting them based on a non-working compiler. 943055acc8fcSmrgif test "$_lt_disable_F77" != yes; then 943155acc8fcSmrg # Code to be used in simple compile tests 943255acc8fcSmrg lt_simple_compile_test_code="\ 943355acc8fcSmrg subroutine t 943455acc8fcSmrg return 943555acc8fcSmrg end 943655acc8fcSmrg" 9437d63fdb69Smrg 943855acc8fcSmrg # Code to be used in simple link tests 943955acc8fcSmrg lt_simple_link_test_code="\ 944055acc8fcSmrg program t 944155acc8fcSmrg end 944255acc8fcSmrg" 9443d63fdb69Smrg 944455acc8fcSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 944555acc8fcSmrg _LT_TAG_COMPILER 9446d63fdb69Smrg 944755acc8fcSmrg # save warnings/boilerplate of simple test code 944855acc8fcSmrg _LT_COMPILER_BOILERPLATE 944955acc8fcSmrg _LT_LINKER_BOILERPLATE 9450d63fdb69Smrg 945155acc8fcSmrg # Allow CC to be a program name with arguments. 945255acc8fcSmrg lt_save_CC="$CC" 945355acc8fcSmrg lt_save_GCC=$GCC 945455acc8fcSmrg CC=${F77-"f77"} 945555acc8fcSmrg compiler=$CC 945655acc8fcSmrg _LT_TAGVAR(compiler, $1)=$CC 945755acc8fcSmrg _LT_CC_BASENAME([$compiler]) 945855acc8fcSmrg GCC=$G77 945955acc8fcSmrg if test -n "$compiler"; then 946055acc8fcSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 946155acc8fcSmrg AC_MSG_RESULT([$can_build_shared]) 9462d63fdb69Smrg 946355acc8fcSmrg AC_MSG_CHECKING([whether to build shared libraries]) 946455acc8fcSmrg test "$can_build_shared" = "no" && enable_shared=no 9465d63fdb69Smrg 946655acc8fcSmrg # On AIX, shared libraries and static libraries use the same namespace, and 946755acc8fcSmrg # are all built from PIC. 946855acc8fcSmrg case $host_os in 946955acc8fcSmrg aix3*) 947055acc8fcSmrg test "$enable_shared" = yes && enable_static=no 947155acc8fcSmrg if test -n "$RANLIB"; then 947255acc8fcSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 947355acc8fcSmrg postinstall_cmds='$RANLIB $lib' 9474d63fdb69Smrg fi 947555acc8fcSmrg ;; 947655acc8fcSmrg aix[[4-9]]*) 947755acc8fcSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 947855acc8fcSmrg test "$enable_shared" = yes && enable_static=no 947955acc8fcSmrg fi 948055acc8fcSmrg ;; 948155acc8fcSmrg esac 948255acc8fcSmrg AC_MSG_RESULT([$enable_shared]) 9483d63fdb69Smrg 948455acc8fcSmrg AC_MSG_CHECKING([whether to build static libraries]) 948555acc8fcSmrg # Make sure either enable_shared or enable_static is yes. 948655acc8fcSmrg test "$enable_shared" = yes || enable_static=yes 948755acc8fcSmrg AC_MSG_RESULT([$enable_static]) 948855acc8fcSmrg 948955acc8fcSmrg _LT_TAGVAR(GCC, $1)="$G77" 949055acc8fcSmrg _LT_TAGVAR(LD, $1)="$LD" 949155acc8fcSmrg 949255acc8fcSmrg ## CAVEAT EMPTOR: 949355acc8fcSmrg ## There is no encapsulation within the following macros, do not change 949455acc8fcSmrg ## the running order or otherwise move them around unless you know exactly 949555acc8fcSmrg ## what you are doing... 949655acc8fcSmrg _LT_COMPILER_PIC($1) 949755acc8fcSmrg _LT_COMPILER_C_O($1) 949855acc8fcSmrg _LT_COMPILER_FILE_LOCKS($1) 949955acc8fcSmrg _LT_LINKER_SHLIBS($1) 950055acc8fcSmrg _LT_SYS_DYNAMIC_LINKER($1) 950155acc8fcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 950255acc8fcSmrg 950355acc8fcSmrg _LT_CONFIG($1) 950455acc8fcSmrg fi # test -n "$compiler" 950555acc8fcSmrg 950655acc8fcSmrg GCC=$lt_save_GCC 950755acc8fcSmrg CC="$lt_save_CC" 950855acc8fcSmrgfi # test "$_lt_disable_F77" != yes 950955acc8fcSmrg 951055acc8fcSmrgAC_LANG_POP 951155acc8fcSmrg])# _LT_LANG_F77_CONFIG 951255acc8fcSmrg 951355acc8fcSmrg 951455acc8fcSmrg# _LT_LANG_FC_CONFIG([TAG]) 951555acc8fcSmrg# ------------------------- 951655acc8fcSmrg# Ensure that the configuration variables for a Fortran compiler are 951755acc8fcSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 951855acc8fcSmrg# to write the compiler configuration to `libtool'. 951955acc8fcSmrgm4_defun([_LT_LANG_FC_CONFIG], 952055acc8fcSmrg[AC_LANG_PUSH(Fortran) 952155acc8fcSmrg 952255acc8fcSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 952355acc8fcSmrg _lt_disable_FC=yes 952455acc8fcSmrgfi 952555acc8fcSmrg 952655acc8fcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 952755acc8fcSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 952855acc8fcSmrg_LT_TAGVAR(always_export_symbols, $1)=no 952955acc8fcSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 953055acc8fcSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 953155acc8fcSmrg_LT_TAGVAR(hardcode_direct, $1)=no 953255acc8fcSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 953355acc8fcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 953455acc8fcSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 953555acc8fcSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 953655acc8fcSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 953755acc8fcSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 953855acc8fcSmrg_LT_TAGVAR(inherit_rpath, $1)=no 953955acc8fcSmrg_LT_TAGVAR(module_cmds, $1)= 954055acc8fcSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 954155acc8fcSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 954255acc8fcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 954355acc8fcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 954455acc8fcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 954555acc8fcSmrg_LT_TAGVAR(no_undefined_flag, $1)= 954655acc8fcSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 954755acc8fcSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9548d63fdb69Smrg 954955acc8fcSmrg# Source file extension for fc test sources. 955055acc8fcSmrgac_ext=${ac_fc_srcext-f} 9551d63fdb69Smrg 955255acc8fcSmrg# Object file extension for compiled fc test sources. 955355acc8fcSmrgobjext=o 955455acc8fcSmrg_LT_TAGVAR(objext, $1)=$objext 9555d63fdb69Smrg 955655acc8fcSmrg# No sense in running all these tests if we already determined that 955755acc8fcSmrg# the FC compiler isn't working. Some variables (like enable_shared) 955855acc8fcSmrg# are currently assumed to apply to all compilers on this platform, 955955acc8fcSmrg# and will be corrupted by setting them based on a non-working compiler. 956055acc8fcSmrgif test "$_lt_disable_FC" != yes; then 956155acc8fcSmrg # Code to be used in simple compile tests 956255acc8fcSmrg lt_simple_compile_test_code="\ 956355acc8fcSmrg subroutine t 956455acc8fcSmrg return 956555acc8fcSmrg end 956655acc8fcSmrg" 9567d63fdb69Smrg 956855acc8fcSmrg # Code to be used in simple link tests 956955acc8fcSmrg lt_simple_link_test_code="\ 957055acc8fcSmrg program t 957155acc8fcSmrg end 957255acc8fcSmrg" 9573d63fdb69Smrg 957455acc8fcSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 957555acc8fcSmrg _LT_TAG_COMPILER 9576d63fdb69Smrg 957755acc8fcSmrg # save warnings/boilerplate of simple test code 957855acc8fcSmrg _LT_COMPILER_BOILERPLATE 957955acc8fcSmrg _LT_LINKER_BOILERPLATE 95803da084b3Smrg 958155acc8fcSmrg # Allow CC to be a program name with arguments. 958255acc8fcSmrg lt_save_CC="$CC" 958355acc8fcSmrg lt_save_GCC=$GCC 958455acc8fcSmrg CC=${FC-"f95"} 958555acc8fcSmrg compiler=$CC 958655acc8fcSmrg GCC=$ac_cv_fc_compiler_gnu 9587d63fdb69Smrg 958855acc8fcSmrg _LT_TAGVAR(compiler, $1)=$CC 958955acc8fcSmrg _LT_CC_BASENAME([$compiler]) 95903da084b3Smrg 959155acc8fcSmrg if test -n "$compiler"; then 959255acc8fcSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 959355acc8fcSmrg AC_MSG_RESULT([$can_build_shared]) 95943da084b3Smrg 959555acc8fcSmrg AC_MSG_CHECKING([whether to build shared libraries]) 959655acc8fcSmrg test "$can_build_shared" = "no" && enable_shared=no 95973da084b3Smrg 959855acc8fcSmrg # On AIX, shared libraries and static libraries use the same namespace, and 959955acc8fcSmrg # are all built from PIC. 960055acc8fcSmrg case $host_os in 960155acc8fcSmrg aix3*) 960255acc8fcSmrg test "$enable_shared" = yes && enable_static=no 960355acc8fcSmrg if test -n "$RANLIB"; then 960455acc8fcSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 960555acc8fcSmrg postinstall_cmds='$RANLIB $lib' 960655acc8fcSmrg fi 960755acc8fcSmrg ;; 960855acc8fcSmrg aix[[4-9]]*) 960955acc8fcSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 961055acc8fcSmrg test "$enable_shared" = yes && enable_static=no 961155acc8fcSmrg fi 961255acc8fcSmrg ;; 961355acc8fcSmrg esac 961455acc8fcSmrg AC_MSG_RESULT([$enable_shared]) 96153da084b3Smrg 961655acc8fcSmrg AC_MSG_CHECKING([whether to build static libraries]) 961755acc8fcSmrg # Make sure either enable_shared or enable_static is yes. 961855acc8fcSmrg test "$enable_shared" = yes || enable_static=yes 961955acc8fcSmrg AC_MSG_RESULT([$enable_static]) 96203da084b3Smrg 962155acc8fcSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 962255acc8fcSmrg _LT_TAGVAR(LD, $1)="$LD" 96233da084b3Smrg 962455acc8fcSmrg ## CAVEAT EMPTOR: 962555acc8fcSmrg ## There is no encapsulation within the following macros, do not change 962655acc8fcSmrg ## the running order or otherwise move them around unless you know exactly 962755acc8fcSmrg ## what you are doing... 962855acc8fcSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 962955acc8fcSmrg _LT_COMPILER_PIC($1) 963055acc8fcSmrg _LT_COMPILER_C_O($1) 963155acc8fcSmrg _LT_COMPILER_FILE_LOCKS($1) 963255acc8fcSmrg _LT_LINKER_SHLIBS($1) 963355acc8fcSmrg _LT_SYS_DYNAMIC_LINKER($1) 963455acc8fcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 96353da084b3Smrg 963655acc8fcSmrg _LT_CONFIG($1) 963755acc8fcSmrg fi # test -n "$compiler" 96383da084b3Smrg 963955acc8fcSmrg GCC=$lt_save_GCC 964055acc8fcSmrg CC="$lt_save_CC" 964155acc8fcSmrgfi # test "$_lt_disable_FC" != yes 96423da084b3Smrg 964355acc8fcSmrgAC_LANG_POP 964455acc8fcSmrg])# _LT_LANG_FC_CONFIG 96453da084b3Smrg 96463da084b3Smrg 964755acc8fcSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 964855acc8fcSmrg# -------------------------- 964955acc8fcSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 965055acc8fcSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 965155acc8fcSmrg# to write the compiler configuration to `libtool'. 965255acc8fcSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 965355acc8fcSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 965455acc8fcSmrgAC_LANG_SAVE 96553da084b3Smrg 965655acc8fcSmrg# Source file extension for Java test sources. 965755acc8fcSmrgac_ext=java 96583da084b3Smrg 965955acc8fcSmrg# Object file extension for compiled Java test sources. 966055acc8fcSmrgobjext=o 966155acc8fcSmrg_LT_TAGVAR(objext, $1)=$objext 96623da084b3Smrg 966355acc8fcSmrg# Code to be used in simple compile tests 966455acc8fcSmrglt_simple_compile_test_code="class foo {}" 96653da084b3Smrg 966655acc8fcSmrg# Code to be used in simple link tests 966755acc8fcSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 96683da084b3Smrg 966955acc8fcSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 967055acc8fcSmrg_LT_TAG_COMPILER 96713da084b3Smrg 967255acc8fcSmrg# save warnings/boilerplate of simple test code 967355acc8fcSmrg_LT_COMPILER_BOILERPLATE 967455acc8fcSmrg_LT_LINKER_BOILERPLATE 9675d63fdb69Smrg 967655acc8fcSmrg# Allow CC to be a program name with arguments. 967755acc8fcSmrglt_save_CC="$CC" 967855acc8fcSmrglt_save_GCC=$GCC 967955acc8fcSmrgGCC=yes 968055acc8fcSmrgCC=${GCJ-"gcj"} 968155acc8fcSmrgcompiler=$CC 968255acc8fcSmrg_LT_TAGVAR(compiler, $1)=$CC 968355acc8fcSmrg_LT_TAGVAR(LD, $1)="$LD" 968455acc8fcSmrg_LT_CC_BASENAME([$compiler]) 96853da084b3Smrg 968655acc8fcSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 968755acc8fcSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 96883da084b3Smrg 968955acc8fcSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 969055acc8fcSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 969155acc8fcSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 969255acc8fcSmrg 969355acc8fcSmrgif test -n "$compiler"; then 969455acc8fcSmrg _LT_COMPILER_NO_RTTI($1) 969555acc8fcSmrg _LT_COMPILER_PIC($1) 969655acc8fcSmrg _LT_COMPILER_C_O($1) 969755acc8fcSmrg _LT_COMPILER_FILE_LOCKS($1) 969855acc8fcSmrg _LT_LINKER_SHLIBS($1) 969955acc8fcSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 970055acc8fcSmrg 970155acc8fcSmrg _LT_CONFIG($1) 97023da084b3Smrgfi 97033da084b3Smrg 970455acc8fcSmrgAC_LANG_RESTORE 97053da084b3Smrg 970655acc8fcSmrgGCC=$lt_save_GCC 970755acc8fcSmrgCC="$lt_save_CC" 970855acc8fcSmrg])# _LT_LANG_GCJ_CONFIG 97093da084b3Smrg 97103da084b3Smrg 971155acc8fcSmrg# _LT_LANG_RC_CONFIG([TAG]) 971255acc8fcSmrg# ------------------------- 971355acc8fcSmrg# Ensure that the configuration variables for the Windows resource compiler 971455acc8fcSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 971555acc8fcSmrg# to write the compiler configuration to `libtool'. 971655acc8fcSmrgm4_defun([_LT_LANG_RC_CONFIG], 971755acc8fcSmrg[AC_REQUIRE([LT_PROG_RC])dnl 971855acc8fcSmrgAC_LANG_SAVE 97193da084b3Smrg 972055acc8fcSmrg# Source file extension for RC test sources. 972155acc8fcSmrgac_ext=rc 97223da084b3Smrg 972355acc8fcSmrg# Object file extension for compiled RC test sources. 972455acc8fcSmrgobjext=o 972555acc8fcSmrg_LT_TAGVAR(objext, $1)=$objext 97263da084b3Smrg 972755acc8fcSmrg# Code to be used in simple compile tests 972855acc8fcSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 97293da084b3Smrg 973055acc8fcSmrg# Code to be used in simple link tests 973155acc8fcSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 973255acc8fcSmrg 973355acc8fcSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 973455acc8fcSmrg_LT_TAG_COMPILER 97353da084b3Smrg 973655acc8fcSmrg# save warnings/boilerplate of simple test code 973755acc8fcSmrg_LT_COMPILER_BOILERPLATE 973855acc8fcSmrg_LT_LINKER_BOILERPLATE 97393da084b3Smrg 974055acc8fcSmrg# Allow CC to be a program name with arguments. 974155acc8fcSmrglt_save_CC="$CC" 974255acc8fcSmrglt_save_GCC=$GCC 974355acc8fcSmrgGCC= 974455acc8fcSmrgCC=${RC-"windres"} 974555acc8fcSmrgcompiler=$CC 974655acc8fcSmrg_LT_TAGVAR(compiler, $1)=$CC 974755acc8fcSmrg_LT_CC_BASENAME([$compiler]) 974855acc8fcSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 97493da084b3Smrg 975055acc8fcSmrgif test -n "$compiler"; then 975155acc8fcSmrg : 975255acc8fcSmrg _LT_CONFIG($1) 975355acc8fcSmrgfi 97543da084b3Smrg 975555acc8fcSmrgGCC=$lt_save_GCC 975655acc8fcSmrgAC_LANG_RESTORE 975755acc8fcSmrgCC="$lt_save_CC" 975855acc8fcSmrg])# _LT_LANG_RC_CONFIG 97593da084b3Smrg 97603da084b3Smrg 976155acc8fcSmrg# LT_PROG_GCJ 976255acc8fcSmrg# ----------- 976355acc8fcSmrgAC_DEFUN([LT_PROG_GCJ], 976455acc8fcSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 976555acc8fcSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 976655acc8fcSmrg [AC_CHECK_TOOL(GCJ, gcj,) 976755acc8fcSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 976855acc8fcSmrg AC_SUBST(GCJFLAGS)])])[]dnl 976955acc8fcSmrg]) 97703da084b3Smrg 977155acc8fcSmrg# Old name: 977255acc8fcSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 977355acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 977455acc8fcSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 97753da084b3Smrg 97763da084b3Smrg 977755acc8fcSmrg# LT_PROG_RC 977855acc8fcSmrg# ---------- 977955acc8fcSmrgAC_DEFUN([LT_PROG_RC], 978055acc8fcSmrg[AC_CHECK_TOOL(RC, windres,) 978155acc8fcSmrg]) 97823da084b3Smrg 978355acc8fcSmrg# Old name: 978455acc8fcSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 978555acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 978655acc8fcSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 97873da084b3Smrg 97883da084b3Smrg 978955acc8fcSmrg# _LT_DECL_EGREP 979055acc8fcSmrg# -------------- 979155acc8fcSmrg# If we don't have a new enough Autoconf to choose the best grep 979255acc8fcSmrg# available, choose the one first in the user's PATH. 979355acc8fcSmrgm4_defun([_LT_DECL_EGREP], 979455acc8fcSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 979555acc8fcSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 979655acc8fcSmrgtest -z "$GREP" && GREP=grep 979755acc8fcSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 979855acc8fcSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 979955acc8fcSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 980055acc8fcSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 980155acc8fcSmrgAC_SUBST([GREP]) 980255acc8fcSmrg]) 98033da084b3Smrg 98043da084b3Smrg 980555acc8fcSmrg# _LT_DECL_OBJDUMP 980655acc8fcSmrg# -------------- 980755acc8fcSmrg# If we don't have a new enough Autoconf to choose the best objdump 980855acc8fcSmrg# available, choose the one first in the user's PATH. 980955acc8fcSmrgm4_defun([_LT_DECL_OBJDUMP], 981055acc8fcSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 981155acc8fcSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 981255acc8fcSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 981355acc8fcSmrgAC_SUBST([OBJDUMP]) 98143da084b3Smrg]) 981555acc8fcSmrg 981655acc8fcSmrg 981755acc8fcSmrg# _LT_DECL_SED 981855acc8fcSmrg# ------------ 981955acc8fcSmrg# Check for a fully-functional sed program, that truncates 982055acc8fcSmrg# as few characters as possible. Prefer GNU sed if found. 982155acc8fcSmrgm4_defun([_LT_DECL_SED], 982255acc8fcSmrg[AC_PROG_SED 982355acc8fcSmrgtest -z "$SED" && SED=sed 982455acc8fcSmrgXsed="$SED -e 1s/^X//" 982555acc8fcSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 982655acc8fcSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 982755acc8fcSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 982855acc8fcSmrg])# _LT_DECL_SED 982955acc8fcSmrg 983055acc8fcSmrgm4_ifndef([AC_PROG_SED], [ 983155acc8fcSmrg# NOTE: This macro has been submitted for inclusion into # 983255acc8fcSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 983355acc8fcSmrg# a released version of Autoconf we should remove this # 983455acc8fcSmrg# macro and use it instead. # 983555acc8fcSmrg 983655acc8fcSmrgm4_defun([AC_PROG_SED], 983755acc8fcSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 983855acc8fcSmrgAC_CACHE_VAL(lt_cv_path_SED, 983955acc8fcSmrg[# Loop through the user's path and test for sed and gsed. 984055acc8fcSmrg# Then use that list of sed's as ones to test for truncation. 984155acc8fcSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 984255acc8fcSmrgfor as_dir in $PATH 984355acc8fcSmrgdo 984455acc8fcSmrg IFS=$as_save_IFS 984555acc8fcSmrg test -z "$as_dir" && as_dir=. 984655acc8fcSmrg for lt_ac_prog in sed gsed; do 984755acc8fcSmrg for ac_exec_ext in '' $ac_executable_extensions; do 984855acc8fcSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 984955acc8fcSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 985055acc8fcSmrg fi 985155acc8fcSmrg done 985255acc8fcSmrg done 985355acc8fcSmrgdone 985455acc8fcSmrgIFS=$as_save_IFS 985555acc8fcSmrglt_ac_max=0 985655acc8fcSmrglt_ac_count=0 985755acc8fcSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 985855acc8fcSmrg# along with /bin/sed that truncates output. 985955acc8fcSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 986055acc8fcSmrg test ! -f $lt_ac_sed && continue 986155acc8fcSmrg cat /dev/null > conftest.in 986255acc8fcSmrg lt_ac_count=0 986355acc8fcSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 986455acc8fcSmrg # Check for GNU sed and select it if it is found. 986555acc8fcSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 986655acc8fcSmrg lt_cv_path_SED=$lt_ac_sed 986755acc8fcSmrg break 986855acc8fcSmrg fi 986955acc8fcSmrg while true; do 987055acc8fcSmrg cat conftest.in conftest.in >conftest.tmp 987155acc8fcSmrg mv conftest.tmp conftest.in 987255acc8fcSmrg cp conftest.in conftest.nl 987355acc8fcSmrg echo >>conftest.nl 987455acc8fcSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 987555acc8fcSmrg cmp -s conftest.out conftest.nl || break 987655acc8fcSmrg # 10000 chars as input seems more than enough 987755acc8fcSmrg test $lt_ac_count -gt 10 && break 987855acc8fcSmrg lt_ac_count=`expr $lt_ac_count + 1` 987955acc8fcSmrg if test $lt_ac_count -gt $lt_ac_max; then 988055acc8fcSmrg lt_ac_max=$lt_ac_count 988155acc8fcSmrg lt_cv_path_SED=$lt_ac_sed 988255acc8fcSmrg fi 988355acc8fcSmrg done 988455acc8fcSmrgdone 98853da084b3Smrg]) 988655acc8fcSmrgSED=$lt_cv_path_SED 988755acc8fcSmrgAC_SUBST([SED]) 988855acc8fcSmrgAC_MSG_RESULT([$SED]) 988955acc8fcSmrg])#AC_PROG_SED 989055acc8fcSmrg])#m4_ifndef 98913da084b3Smrg 989255acc8fcSmrg# Old name: 989355acc8fcSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 989455acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 989555acc8fcSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 9896d63fdb69Smrg 98973da084b3Smrg 989855acc8fcSmrg# _LT_CHECK_SHELL_FEATURES 989955acc8fcSmrg# ------------------------ 990055acc8fcSmrg# Find out whether the shell is Bourne or XSI compatible, 990155acc8fcSmrg# or has some other useful features. 990255acc8fcSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 990355acc8fcSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 990455acc8fcSmrg# Try some XSI features 990555acc8fcSmrgxsi_shell=no 990655acc8fcSmrg( _lt_dummy="a/b/c" 990755acc8fcSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 990855acc8fcSmrg = c,a/b,, \ 990955acc8fcSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 991055acc8fcSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 991155acc8fcSmrg && xsi_shell=yes 991255acc8fcSmrgAC_MSG_RESULT([$xsi_shell]) 991355acc8fcSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 99143da084b3Smrg 991555acc8fcSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 991655acc8fcSmrglt_shell_append=no 991755acc8fcSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 991855acc8fcSmrg >/dev/null 2>&1 \ 991955acc8fcSmrg && lt_shell_append=yes 992055acc8fcSmrgAC_MSG_RESULT([$lt_shell_append]) 992155acc8fcSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 992255acc8fcSmrg 992355acc8fcSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 992455acc8fcSmrg lt_unset=unset 992555acc8fcSmrgelse 992655acc8fcSmrg lt_unset=false 992755acc8fcSmrgfi 992855acc8fcSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 992955acc8fcSmrg 993055acc8fcSmrg# test EBCDIC or ASCII 993155acc8fcSmrgcase `echo X|tr X '\101'` in 993255acc8fcSmrg A) # ASCII based system 993355acc8fcSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 993455acc8fcSmrg lt_SP2NL='tr \040 \012' 993555acc8fcSmrg lt_NL2SP='tr \015\012 \040\040' 993655acc8fcSmrg ;; 993755acc8fcSmrg *) # EBCDIC based system 993855acc8fcSmrg lt_SP2NL='tr \100 \n' 993955acc8fcSmrg lt_NL2SP='tr \r\n \100\100' 994055acc8fcSmrg ;; 994155acc8fcSmrgesac 994255acc8fcSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 994355acc8fcSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 994455acc8fcSmrg])# _LT_CHECK_SHELL_FEATURES 994555acc8fcSmrg 994655acc8fcSmrg 994755acc8fcSmrg# _LT_PROG_XSI_SHELLFNS 994855acc8fcSmrg# --------------------- 994955acc8fcSmrg# Bourne and XSI compatible variants of some useful shell functions. 995055acc8fcSmrgm4_defun([_LT_PROG_XSI_SHELLFNS], 995155acc8fcSmrg[case $xsi_shell in 995255acc8fcSmrg yes) 995355acc8fcSmrg cat << \_LT_EOF >> "$cfgfile" 995455acc8fcSmrg 995555acc8fcSmrg# func_dirname file append nondir_replacement 995655acc8fcSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 995755acc8fcSmrg# otherwise set result to NONDIR_REPLACEMENT. 995855acc8fcSmrgfunc_dirname () 995955acc8fcSmrg{ 996055acc8fcSmrg case ${1} in 996155acc8fcSmrg */*) func_dirname_result="${1%/*}${2}" ;; 996255acc8fcSmrg * ) func_dirname_result="${3}" ;; 99633da084b3Smrg esac 996455acc8fcSmrg} 99653da084b3Smrg 996655acc8fcSmrg# func_basename file 996755acc8fcSmrgfunc_basename () 996855acc8fcSmrg{ 996955acc8fcSmrg func_basename_result="${1##*/}" 997055acc8fcSmrg} 99713da084b3Smrg 997255acc8fcSmrg# func_dirname_and_basename file append nondir_replacement 997355acc8fcSmrg# perform func_basename and func_dirname in a single function 997455acc8fcSmrg# call: 997555acc8fcSmrg# dirname: Compute the dirname of FILE. If nonempty, 997655acc8fcSmrg# add APPEND to the result, otherwise set result 997755acc8fcSmrg# to NONDIR_REPLACEMENT. 997855acc8fcSmrg# value returned in "$func_dirname_result" 997955acc8fcSmrg# basename: Compute filename of FILE. 998055acc8fcSmrg# value retuned in "$func_basename_result" 998155acc8fcSmrg# Implementation must be kept synchronized with func_dirname 998255acc8fcSmrg# and func_basename. For efficiency, we do not delegate to 998355acc8fcSmrg# those functions but instead duplicate the functionality here. 998455acc8fcSmrgfunc_dirname_and_basename () 998555acc8fcSmrg{ 998655acc8fcSmrg case ${1} in 998755acc8fcSmrg */*) func_dirname_result="${1%/*}${2}" ;; 998855acc8fcSmrg * ) func_dirname_result="${3}" ;; 9989d63fdb69Smrg esac 999055acc8fcSmrg func_basename_result="${1##*/}" 999155acc8fcSmrg} 99923da084b3Smrg 999355acc8fcSmrg# func_stripname prefix suffix name 999455acc8fcSmrg# strip PREFIX and SUFFIX off of NAME. 999555acc8fcSmrg# PREFIX and SUFFIX must not contain globbing or regex special 999655acc8fcSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 999755acc8fcSmrg# dot (in which case that matches only a dot). 999855acc8fcSmrgfunc_stripname () 999955acc8fcSmrg{ 1000055acc8fcSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 1000155acc8fcSmrg # positional parameters, so assign one to ordinary parameter first. 1000255acc8fcSmrg func_stripname_result=${3} 1000355acc8fcSmrg func_stripname_result=${func_stripname_result#"${1}"} 1000455acc8fcSmrg func_stripname_result=${func_stripname_result%"${2}"} 1000555acc8fcSmrg} 100063da084b3Smrg 1000755acc8fcSmrg# func_opt_split 1000855acc8fcSmrgfunc_opt_split () 1000955acc8fcSmrg{ 1001055acc8fcSmrg func_opt_split_opt=${1%%=*} 1001155acc8fcSmrg func_opt_split_arg=${1#*=} 1001255acc8fcSmrg} 100133da084b3Smrg 1001455acc8fcSmrg# func_lo2o object 1001555acc8fcSmrgfunc_lo2o () 1001655acc8fcSmrg{ 1001755acc8fcSmrg case ${1} in 1001855acc8fcSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 1001955acc8fcSmrg *) func_lo2o_result=${1} ;; 1002055acc8fcSmrg esac 1002155acc8fcSmrg} 100223da084b3Smrg 1002355acc8fcSmrg# func_xform libobj-or-source 1002455acc8fcSmrgfunc_xform () 1002555acc8fcSmrg{ 1002655acc8fcSmrg func_xform_result=${1%.*}.lo 1002755acc8fcSmrg} 100283da084b3Smrg 1002955acc8fcSmrg# func_arith arithmetic-term... 1003055acc8fcSmrgfunc_arith () 1003155acc8fcSmrg{ 1003255acc8fcSmrg func_arith_result=$(( $[*] )) 1003355acc8fcSmrg} 100343da084b3Smrg 1003555acc8fcSmrg# func_len string 1003655acc8fcSmrg# STRING may not start with a hyphen. 1003755acc8fcSmrgfunc_len () 1003855acc8fcSmrg{ 1003955acc8fcSmrg func_len_result=${#1} 1004055acc8fcSmrg} 100413da084b3Smrg 1004255acc8fcSmrg_LT_EOF 1004355acc8fcSmrg ;; 1004455acc8fcSmrg *) # Bourne compatible functions. 1004555acc8fcSmrg cat << \_LT_EOF >> "$cfgfile" 1004655acc8fcSmrg 1004755acc8fcSmrg# func_dirname file append nondir_replacement 1004855acc8fcSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 1004955acc8fcSmrg# otherwise set result to NONDIR_REPLACEMENT. 1005055acc8fcSmrgfunc_dirname () 1005155acc8fcSmrg{ 1005255acc8fcSmrg # Extract subdirectory from the argument. 1005355acc8fcSmrg func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` 1005455acc8fcSmrg if test "X$func_dirname_result" = "X${1}"; then 1005555acc8fcSmrg func_dirname_result="${3}" 1005655acc8fcSmrg else 1005755acc8fcSmrg func_dirname_result="$func_dirname_result${2}" 1005855acc8fcSmrg fi 1005955acc8fcSmrg} 1006055acc8fcSmrg 1006155acc8fcSmrg# func_basename file 1006255acc8fcSmrgfunc_basename () 1006355acc8fcSmrg{ 1006455acc8fcSmrg func_basename_result=`$ECHO "${1}" | $SED "$basename"` 1006555acc8fcSmrg} 100663da084b3Smrg 1006755acc8fcSmrgdnl func_dirname_and_basename 1006855acc8fcSmrgdnl A portable version of this function is already defined in general.m4sh 1006955acc8fcSmrgdnl so there is no need for it here. 100703da084b3Smrg 1007155acc8fcSmrg# func_stripname prefix suffix name 1007255acc8fcSmrg# strip PREFIX and SUFFIX off of NAME. 1007355acc8fcSmrg# PREFIX and SUFFIX must not contain globbing or regex special 1007455acc8fcSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 1007555acc8fcSmrg# dot (in which case that matches only a dot). 1007655acc8fcSmrg# func_strip_suffix prefix name 1007755acc8fcSmrgfunc_stripname () 1007855acc8fcSmrg{ 1007955acc8fcSmrg case ${2} in 1008055acc8fcSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 1008155acc8fcSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 1008255acc8fcSmrg esac 1008355acc8fcSmrg} 100843da084b3Smrg 1008555acc8fcSmrg# sed scripts: 1008655acc8fcSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 1008755acc8fcSmrgmy_sed_long_arg='1s/^-[[^=]]*=//' 100883da084b3Smrg 1008955acc8fcSmrg# func_opt_split 1009055acc8fcSmrgfunc_opt_split () 1009155acc8fcSmrg{ 1009255acc8fcSmrg func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` 1009355acc8fcSmrg func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` 1009455acc8fcSmrg} 100953da084b3Smrg 1009655acc8fcSmrg# func_lo2o object 1009755acc8fcSmrgfunc_lo2o () 1009855acc8fcSmrg{ 1009955acc8fcSmrg func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 1010055acc8fcSmrg} 101013da084b3Smrg 1010255acc8fcSmrg# func_xform libobj-or-source 1010355acc8fcSmrgfunc_xform () 1010455acc8fcSmrg{ 1010555acc8fcSmrg func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` 1010655acc8fcSmrg} 101073da084b3Smrg 1010855acc8fcSmrg# func_arith arithmetic-term... 1010955acc8fcSmrgfunc_arith () 1011055acc8fcSmrg{ 1011155acc8fcSmrg func_arith_result=`expr "$[@]"` 1011255acc8fcSmrg} 101133da084b3Smrg 1011455acc8fcSmrg# func_len string 1011555acc8fcSmrg# STRING may not start with a hyphen. 1011655acc8fcSmrgfunc_len () 1011755acc8fcSmrg{ 1011855acc8fcSmrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 1011955acc8fcSmrg} 101203da084b3Smrg 1012155acc8fcSmrg_LT_EOF 1012255acc8fcSmrgesac 101233da084b3Smrg 1012455acc8fcSmrgcase $lt_shell_append in 1012555acc8fcSmrg yes) 1012655acc8fcSmrg cat << \_LT_EOF >> "$cfgfile" 101273da084b3Smrg 1012855acc8fcSmrg# func_append var value 1012955acc8fcSmrg# Append VALUE to the end of shell variable VAR. 1013055acc8fcSmrgfunc_append () 1013155acc8fcSmrg{ 1013255acc8fcSmrg eval "$[1]+=\$[2]" 1013355acc8fcSmrg} 1013455acc8fcSmrg_LT_EOF 1013555acc8fcSmrg ;; 10136d63fdb69Smrg *) 1013755acc8fcSmrg cat << \_LT_EOF >> "$cfgfile" 1013855acc8fcSmrg 1013955acc8fcSmrg# func_append var value 1014055acc8fcSmrg# Append VALUE to the end of shell variable VAR. 1014155acc8fcSmrgfunc_append () 1014255acc8fcSmrg{ 1014355acc8fcSmrg eval "$[1]=\$$[1]\$[2]" 1014455acc8fcSmrg} 1014555acc8fcSmrg 1014655acc8fcSmrg_LT_EOF 1014755acc8fcSmrg ;; 10148d63fdb69Smrg esac 101493da084b3Smrg]) 101503da084b3Smrg 1015155acc8fcSmrg# Helper functions for option handling. -*- Autoconf -*- 101523da084b3Smrg# 1015355acc8fcSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 1015455acc8fcSmrg# Inc. 1015555acc8fcSmrg# Written by Gary V. Vaughan, 2004 1015655acc8fcSmrg# 1015755acc8fcSmrg# This file is free software; the Free Software Foundation gives 1015855acc8fcSmrg# unlimited permission to copy and/or distribute it, with or without 1015955acc8fcSmrg# modifications, as long as this notice is preserved. 101603da084b3Smrg 1016155acc8fcSmrg# serial 7 ltoptions.m4 101623da084b3Smrg 1016355acc8fcSmrg# This is to help aclocal find these macros, as it can't see m4_define. 1016455acc8fcSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 101653da084b3Smrg 101663da084b3Smrg 1016755acc8fcSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 1016855acc8fcSmrg# ------------------------------------------ 1016955acc8fcSmrgm4_define([_LT_MANGLE_OPTION], 1017055acc8fcSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 101713da084b3Smrg 101723da084b3Smrg 1017355acc8fcSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 1017455acc8fcSmrg# --------------------------------------- 1017555acc8fcSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 1017655acc8fcSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 1017755acc8fcSmrg# saved as a flag. 1017855acc8fcSmrgm4_define([_LT_SET_OPTION], 1017955acc8fcSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 1018055acc8fcSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 1018155acc8fcSmrg _LT_MANGLE_DEFUN([$1], [$2]), 1018255acc8fcSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 1018355acc8fcSmrg]) 101843da084b3Smrg 101853da084b3Smrg 1018655acc8fcSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 1018755acc8fcSmrg# ------------------------------------------------------------ 101883da084b3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1018955acc8fcSmrgm4_define([_LT_IF_OPTION], 1019055acc8fcSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 101913da084b3Smrg 101923da084b3Smrg 1019355acc8fcSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 1019455acc8fcSmrg# ------------------------------------------------------- 1019555acc8fcSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 1019655acc8fcSmrg# are set. 1019755acc8fcSmrgm4_define([_LT_UNLESS_OPTIONS], 1019855acc8fcSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 1019955acc8fcSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 1020055acc8fcSmrg [m4_define([$0_found])])])[]dnl 1020155acc8fcSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 1020255acc8fcSmrg])[]dnl 1020355acc8fcSmrg]) 1020455acc8fcSmrg 1020555acc8fcSmrg 1020655acc8fcSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 1020755acc8fcSmrg# ---------------------------------------- 1020855acc8fcSmrg# OPTION-LIST is a space-separated list of Libtool options associated 1020955acc8fcSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 1021055acc8fcSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 1021155acc8fcSmrg# the unknown option and exit. 1021255acc8fcSmrgm4_defun([_LT_SET_OPTIONS], 1021355acc8fcSmrg[# Set options 1021455acc8fcSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 1021555acc8fcSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 1021655acc8fcSmrg 1021755acc8fcSmrgm4_if([$1],[LT_INIT],[ 1021855acc8fcSmrg dnl 1021955acc8fcSmrg dnl Simply set some default values (i.e off) if boolean options were not 1022055acc8fcSmrg dnl specified: 1022155acc8fcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 1022255acc8fcSmrg ]) 1022355acc8fcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 1022455acc8fcSmrg ]) 1022555acc8fcSmrg dnl 1022655acc8fcSmrg dnl If no reference was made to various pairs of opposing options, then 1022755acc8fcSmrg dnl we run the default mode handler for the pair. For example, if neither 1022855acc8fcSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 1022955acc8fcSmrg dnl archives by default: 1023055acc8fcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 1023155acc8fcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 1023255acc8fcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 1023355acc8fcSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 1023455acc8fcSmrg [_LT_ENABLE_FAST_INSTALL]) 1023555acc8fcSmrg ]) 1023655acc8fcSmrg])# _LT_SET_OPTIONS 102373da084b3Smrg 102383da084b3Smrg 10239d63fdb69Smrg 1024055acc8fcSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 1024155acc8fcSmrg# ----------------------------------------- 1024255acc8fcSmrgm4_define([_LT_MANGLE_DEFUN], 1024355acc8fcSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 102443da084b3Smrg 102453da084b3Smrg 1024655acc8fcSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 1024755acc8fcSmrg# ----------------------------------------------- 1024855acc8fcSmrgm4_define([LT_OPTION_DEFINE], 1024955acc8fcSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 1025055acc8fcSmrg])# LT_OPTION_DEFINE 102513da084b3Smrg 10252d63fdb69Smrg 1025355acc8fcSmrg# dlopen 1025455acc8fcSmrg# ------ 1025555acc8fcSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 1025655acc8fcSmrg]) 10257d63fdb69Smrg 1025855acc8fcSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 1025955acc8fcSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 1026055acc8fcSmrgAC_DIAGNOSE([obsolete], 1026155acc8fcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1026255acc8fcSmrgput the `dlopen' option into LT_INIT's first parameter.]) 10263d63fdb69Smrg]) 10264d63fdb69Smrg 1026555acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 1026655acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 102673da084b3Smrg 102683da084b3Smrg 1026955acc8fcSmrg# win32-dll 1027055acc8fcSmrg# --------- 1027155acc8fcSmrg# Declare package support for building win32 dll's. 1027255acc8fcSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 1027355acc8fcSmrg[enable_win32_dll=yes 10274d63fdb69Smrg 1027555acc8fcSmrgcase $host in 1027655acc8fcSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 1027755acc8fcSmrg AC_CHECK_TOOL(AS, as, false) 1027855acc8fcSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1027955acc8fcSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 1028055acc8fcSmrg ;; 1028155acc8fcSmrgesac 10282d63fdb69Smrg 1028355acc8fcSmrgtest -z "$AS" && AS=as 1028455acc8fcSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 10285d63fdb69Smrg 1028655acc8fcSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 1028755acc8fcSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 10288d63fdb69Smrg 1028955acc8fcSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 1029055acc8fcSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 1029155acc8fcSmrg])# win32-dll 102923da084b3Smrg 1029355acc8fcSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 1029455acc8fcSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1029555acc8fcSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 1029655acc8fcSmrgAC_DIAGNOSE([obsolete], 1029755acc8fcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1029855acc8fcSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 1029955acc8fcSmrg]) 103003da084b3Smrg 1030155acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 1030255acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 103033da084b3Smrg 103043da084b3Smrg 1030555acc8fcSmrg# _LT_ENABLE_SHARED([DEFAULT]) 1030655acc8fcSmrg# ---------------------------- 1030755acc8fcSmrg# implement the --enable-shared flag, and supports the `shared' and 1030855acc8fcSmrg# `disable-shared' LT_INIT options. 1030955acc8fcSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1031055acc8fcSmrgm4_define([_LT_ENABLE_SHARED], 1031155acc8fcSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 1031255acc8fcSmrgAC_ARG_ENABLE([shared], 1031355acc8fcSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 1031455acc8fcSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 1031555acc8fcSmrg [p=${PACKAGE-default} 1031655acc8fcSmrg case $enableval in 1031755acc8fcSmrg yes) enable_shared=yes ;; 1031855acc8fcSmrg no) enable_shared=no ;; 1031955acc8fcSmrg *) 1032055acc8fcSmrg enable_shared=no 1032155acc8fcSmrg # Look at the argument we got. We use all the common list separators. 1032255acc8fcSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1032355acc8fcSmrg for pkg in $enableval; do 1032455acc8fcSmrg IFS="$lt_save_ifs" 1032555acc8fcSmrg if test "X$pkg" = "X$p"; then 1032655acc8fcSmrg enable_shared=yes 1032755acc8fcSmrg fi 1032855acc8fcSmrg done 1032955acc8fcSmrg IFS="$lt_save_ifs" 1033055acc8fcSmrg ;; 1033155acc8fcSmrg esac], 1033255acc8fcSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 1033355acc8fcSmrg 1033455acc8fcSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 1033555acc8fcSmrg [Whether or not to build shared libraries]) 1033655acc8fcSmrg])# _LT_ENABLE_SHARED 103373da084b3Smrg 1033855acc8fcSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 1033955acc8fcSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 103403da084b3Smrg 1034155acc8fcSmrg# Old names: 1034255acc8fcSmrgAC_DEFUN([AC_ENABLE_SHARED], 1034355acc8fcSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 1034455acc8fcSmrg]) 103453da084b3Smrg 1034655acc8fcSmrgAC_DEFUN([AC_DISABLE_SHARED], 1034755acc8fcSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 1034855acc8fcSmrg]) 10349d63fdb69Smrg 1035055acc8fcSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 1035155acc8fcSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 10352d63fdb69Smrg 1035355acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 1035455acc8fcSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 1035555acc8fcSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 10356d63fdb69Smrg 10357d63fdb69Smrg 1035855acc8fcSmrg 1035955acc8fcSmrg# _LT_ENABLE_STATIC([DEFAULT]) 1036055acc8fcSmrg# ---------------------------- 1036155acc8fcSmrg# implement the --enable-static flag, and support the `static' and 1036255acc8fcSmrg# `disable-static' LT_INIT options. 1036355acc8fcSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1036455acc8fcSmrgm4_define([_LT_ENABLE_STATIC], 1036555acc8fcSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 1036655acc8fcSmrgAC_ARG_ENABLE([static], 1036755acc8fcSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 1036855acc8fcSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 1036955acc8fcSmrg [p=${PACKAGE-default} 1037055acc8fcSmrg case $enableval in 1037155acc8fcSmrg yes) enable_static=yes ;; 1037255acc8fcSmrg no) enable_static=no ;; 1037355acc8fcSmrg *) 1037455acc8fcSmrg enable_static=no 1037555acc8fcSmrg # Look at the argument we got. We use all the common list separators. 1037655acc8fcSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1037755acc8fcSmrg for pkg in $enableval; do 1037855acc8fcSmrg IFS="$lt_save_ifs" 1037955acc8fcSmrg if test "X$pkg" = "X$p"; then 1038055acc8fcSmrg enable_static=yes 10381d63fdb69Smrg fi 1038255acc8fcSmrg done 1038355acc8fcSmrg IFS="$lt_save_ifs" 1038455acc8fcSmrg ;; 1038555acc8fcSmrg esac], 1038655acc8fcSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 10387d63fdb69Smrg 1038855acc8fcSmrg _LT_DECL([build_old_libs], [enable_static], [0], 1038955acc8fcSmrg [Whether or not to build static libraries]) 1039055acc8fcSmrg])# _LT_ENABLE_STATIC 10391d63fdb69Smrg 1039255acc8fcSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 1039355acc8fcSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 10394d63fdb69Smrg 1039555acc8fcSmrg# Old names: 1039655acc8fcSmrgAC_DEFUN([AC_ENABLE_STATIC], 1039755acc8fcSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 1039855acc8fcSmrg]) 10399d63fdb69Smrg 1040055acc8fcSmrgAC_DEFUN([AC_DISABLE_STATIC], 1040155acc8fcSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 1040255acc8fcSmrg]) 10403d63fdb69Smrg 1040455acc8fcSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 1040555acc8fcSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 10406d63fdb69Smrg 1040755acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 1040855acc8fcSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 1040955acc8fcSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 10410d63fdb69Smrg 10411d63fdb69Smrg 10412d63fdb69Smrg 1041355acc8fcSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 1041455acc8fcSmrg# ---------------------------------- 1041555acc8fcSmrg# implement the --enable-fast-install flag, and support the `fast-install' 1041655acc8fcSmrg# and `disable-fast-install' LT_INIT options. 1041755acc8fcSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 1041855acc8fcSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 1041955acc8fcSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 1042055acc8fcSmrgAC_ARG_ENABLE([fast-install], 1042155acc8fcSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 1042255acc8fcSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 1042355acc8fcSmrg [p=${PACKAGE-default} 1042455acc8fcSmrg case $enableval in 1042555acc8fcSmrg yes) enable_fast_install=yes ;; 1042655acc8fcSmrg no) enable_fast_install=no ;; 1042755acc8fcSmrg *) 1042855acc8fcSmrg enable_fast_install=no 1042955acc8fcSmrg # Look at the argument we got. We use all the common list separators. 1043055acc8fcSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 1043155acc8fcSmrg for pkg in $enableval; do 1043255acc8fcSmrg IFS="$lt_save_ifs" 1043355acc8fcSmrg if test "X$pkg" = "X$p"; then 1043455acc8fcSmrg enable_fast_install=yes 1043555acc8fcSmrg fi 1043655acc8fcSmrg done 1043755acc8fcSmrg IFS="$lt_save_ifs" 1043855acc8fcSmrg ;; 1043955acc8fcSmrg esac], 1044055acc8fcSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 1044155acc8fcSmrg 1044255acc8fcSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 1044355acc8fcSmrg [Whether or not to optimize for fast installation])dnl 1044455acc8fcSmrg])# _LT_ENABLE_FAST_INSTALL 10445d63fdb69Smrg 1044655acc8fcSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 1044755acc8fcSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 10448d63fdb69Smrg 1044955acc8fcSmrg# Old names: 1045055acc8fcSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 1045155acc8fcSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 1045255acc8fcSmrgAC_DIAGNOSE([obsolete], 1045355acc8fcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 1045455acc8fcSmrgthe `fast-install' option into LT_INIT's first parameter.]) 1045555acc8fcSmrg]) 10456d63fdb69Smrg 1045755acc8fcSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 1045855acc8fcSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 1045955acc8fcSmrgAC_DIAGNOSE([obsolete], 1046055acc8fcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 1046155acc8fcSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 1046255acc8fcSmrg]) 10463d63fdb69Smrg 1046455acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 1046555acc8fcSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 1046655acc8fcSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 10467d63fdb69Smrg 10468d63fdb69Smrg 1046955acc8fcSmrg# _LT_WITH_PIC([MODE]) 1047055acc8fcSmrg# -------------------- 1047155acc8fcSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 1047255acc8fcSmrg# LT_INIT options. 1047355acc8fcSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 1047455acc8fcSmrgm4_define([_LT_WITH_PIC], 1047555acc8fcSmrg[AC_ARG_WITH([pic], 1047655acc8fcSmrg [AS_HELP_STRING([--with-pic], 1047755acc8fcSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 1047855acc8fcSmrg [pic_mode="$withval"], 1047955acc8fcSmrg [pic_mode=default]) 10480d63fdb69Smrg 1048155acc8fcSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 10482d63fdb69Smrg 1048355acc8fcSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 1048455acc8fcSmrg])# _LT_WITH_PIC 10485d63fdb69Smrg 1048655acc8fcSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 1048755acc8fcSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 10488d63fdb69Smrg 1048955acc8fcSmrg# Old name: 1049055acc8fcSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 1049155acc8fcSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 1049255acc8fcSmrgAC_DIAGNOSE([obsolete], 1049355acc8fcSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 1049455acc8fcSmrgput the `pic-only' option into LT_INIT's first parameter.]) 1049555acc8fcSmrg]) 10496d63fdb69Smrg 1049755acc8fcSmrgdnl aclocal-1.4 backwards compatibility: 1049855acc8fcSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 10499d63fdb69Smrg 10500d63fdb69Smrg 1050155acc8fcSmrgm4_define([_LTDL_MODE], []) 1050255acc8fcSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 1050355acc8fcSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 1050455acc8fcSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 1050555acc8fcSmrg [m4_define([_LTDL_MODE], [recursive])]) 1050655acc8fcSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 1050755acc8fcSmrg [m4_define([_LTDL_MODE], [subproject])]) 10508d63fdb69Smrg 1050955acc8fcSmrgm4_define([_LTDL_TYPE], []) 1051055acc8fcSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 1051155acc8fcSmrg [m4_define([_LTDL_TYPE], [installable])]) 1051255acc8fcSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 1051355acc8fcSmrg [m4_define([_LTDL_TYPE], [convenience])]) 10514d63fdb69Smrg 1051555acc8fcSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 10516d63fdb69Smrg# 1051755acc8fcSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 1051855acc8fcSmrg# Written by Gary V. Vaughan, 2004 1051955acc8fcSmrg# 1052055acc8fcSmrg# This file is free software; the Free Software Foundation gives 1052155acc8fcSmrg# unlimited permission to copy and/or distribute it, with or without 1052255acc8fcSmrg# modifications, as long as this notice is preserved. 10523d63fdb69Smrg 1052455acc8fcSmrg# serial 6 ltsugar.m4 10525d63fdb69Smrg 1052655acc8fcSmrg# This is to help aclocal find these macros, as it can't see m4_define. 1052755acc8fcSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 10528d63fdb69Smrg 10529d63fdb69Smrg 1053055acc8fcSmrg# lt_join(SEP, ARG1, [ARG2...]) 1053155acc8fcSmrg# ----------------------------- 1053255acc8fcSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 1053355acc8fcSmrg# associated separator. 1053455acc8fcSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 1053555acc8fcSmrg# versions in m4sugar had bugs. 1053655acc8fcSmrgm4_define([lt_join], 1053755acc8fcSmrg[m4_if([$#], [1], [], 1053855acc8fcSmrg [$#], [2], [[$2]], 1053955acc8fcSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 1054055acc8fcSmrgm4_define([_lt_join], 1054155acc8fcSmrg[m4_if([$#$2], [2], [], 1054255acc8fcSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 10543d63fdb69Smrg 10544d63fdb69Smrg 1054555acc8fcSmrg# lt_car(LIST) 1054655acc8fcSmrg# lt_cdr(LIST) 1054755acc8fcSmrg# ------------ 1054855acc8fcSmrg# Manipulate m4 lists. 1054955acc8fcSmrg# These macros are necessary as long as will still need to support 1055055acc8fcSmrg# Autoconf-2.59 which quotes differently. 1055155acc8fcSmrgm4_define([lt_car], [[$1]]) 1055255acc8fcSmrgm4_define([lt_cdr], 1055355acc8fcSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 1055455acc8fcSmrg [$#], 1, [], 1055555acc8fcSmrg [m4_dquote(m4_shift($@))])]) 1055655acc8fcSmrgm4_define([lt_unquote], $1) 10557d63fdb69Smrg 10558d63fdb69Smrg 1055955acc8fcSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 1056055acc8fcSmrg# ------------------------------------------ 1056155acc8fcSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 1056255acc8fcSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 1056355acc8fcSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 1056455acc8fcSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 1056555acc8fcSmrg# than defined and empty). 10566d63fdb69Smrg# 1056755acc8fcSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 1056855acc8fcSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 1056955acc8fcSmrgm4_define([lt_append], 1057055acc8fcSmrg[m4_define([$1], 1057155acc8fcSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 10572d63fdb69Smrg 10573d63fdb69Smrg 10574d63fdb69Smrg 1057555acc8fcSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 1057655acc8fcSmrg# ---------------------------------------------------------- 1057755acc8fcSmrg# Produce a SEP delimited list of all paired combinations of elements of 1057855acc8fcSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 1057955acc8fcSmrg# has the form PREFIXmINFIXSUFFIXn. 1058055acc8fcSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 1058155acc8fcSmrgm4_define([lt_combine], 1058255acc8fcSmrg[m4_if(m4_eval([$# > 3]), [1], 1058355acc8fcSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 1058455acc8fcSmrg[[m4_foreach([_Lt_prefix], [$2], 1058555acc8fcSmrg [m4_foreach([_Lt_suffix], 1058655acc8fcSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 1058755acc8fcSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 1058855acc8fcSmrg 1058955acc8fcSmrg 1059055acc8fcSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 1059155acc8fcSmrg# ----------------------------------------------------------------------- 1059255acc8fcSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 1059355acc8fcSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 1059455acc8fcSmrgm4_define([lt_if_append_uniq], 1059555acc8fcSmrg[m4_ifdef([$1], 1059655acc8fcSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 1059755acc8fcSmrg [lt_append([$1], [$2], [$3])$4], 1059855acc8fcSmrg [$5])], 1059955acc8fcSmrg [lt_append([$1], [$2], [$3])$4])]) 1060055acc8fcSmrg 1060155acc8fcSmrg 1060255acc8fcSmrg# lt_dict_add(DICT, KEY, VALUE) 1060355acc8fcSmrg# ----------------------------- 1060455acc8fcSmrgm4_define([lt_dict_add], 1060555acc8fcSmrg[m4_define([$1($2)], [$3])]) 10606d63fdb69Smrg 10607d63fdb69Smrg 1060855acc8fcSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 1060955acc8fcSmrg# -------------------------------------------- 1061055acc8fcSmrgm4_define([lt_dict_add_subkey], 1061155acc8fcSmrg[m4_define([$1($2:$3)], [$4])]) 10612d63fdb69Smrg 10613d63fdb69Smrg 1061455acc8fcSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 1061555acc8fcSmrg# ---------------------------------- 1061655acc8fcSmrgm4_define([lt_dict_fetch], 1061755acc8fcSmrg[m4_ifval([$3], 1061855acc8fcSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 1061955acc8fcSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 10620d63fdb69Smrg 1062155acc8fcSmrg 1062255acc8fcSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 1062355acc8fcSmrg# ----------------------------------------------------------------- 1062455acc8fcSmrgm4_define([lt_if_dict_fetch], 1062555acc8fcSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 1062655acc8fcSmrg [$5], 1062755acc8fcSmrg [$6])]) 1062855acc8fcSmrg 1062955acc8fcSmrg 1063055acc8fcSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 1063155acc8fcSmrg# -------------------------------------------------------------- 1063255acc8fcSmrgm4_define([lt_dict_filter], 1063355acc8fcSmrg[m4_if([$5], [], [], 1063455acc8fcSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 1063555acc8fcSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 1063655acc8fcSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 1063755acc8fcSmrg]) 1063855acc8fcSmrg 1063955acc8fcSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 10640d63fdb69Smrg# 1064155acc8fcSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 1064255acc8fcSmrg# Written by Scott James Remnant, 2004 10643d63fdb69Smrg# 1064455acc8fcSmrg# This file is free software; the Free Software Foundation gives 1064555acc8fcSmrg# unlimited permission to copy and/or distribute it, with or without 1064655acc8fcSmrg# modifications, as long as this notice is preserved. 10647d63fdb69Smrg 1064855acc8fcSmrg# Generated from ltversion.in. 10649d63fdb69Smrg 1065055acc8fcSmrg# serial 3175 ltversion.m4 1065155acc8fcSmrg# This file is part of GNU Libtool 10652d63fdb69Smrg 1065355acc8fcSmrgm4_define([LT_PACKAGE_VERSION], [2.2.10]) 1065455acc8fcSmrgm4_define([LT_PACKAGE_REVISION], [1.3175]) 1065555acc8fcSmrg 1065655acc8fcSmrgAC_DEFUN([LTVERSION_VERSION], 1065755acc8fcSmrg[macro_version='2.2.10' 1065855acc8fcSmrgmacro_revision='1.3175' 1065955acc8fcSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 1066055acc8fcSmrg_LT_DECL(, macro_revision, 0) 1066155acc8fcSmrg]) 1066255acc8fcSmrg 1066355acc8fcSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 10664d63fdb69Smrg# 1066555acc8fcSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 1066655acc8fcSmrg# Written by Scott James Remnant, 2004. 10667d63fdb69Smrg# 1066855acc8fcSmrg# This file is free software; the Free Software Foundation gives 1066955acc8fcSmrg# unlimited permission to copy and/or distribute it, with or without 1067055acc8fcSmrg# modifications, as long as this notice is preserved. 10671d63fdb69Smrg 1067255acc8fcSmrg# serial 5 lt~obsolete.m4 10673d63fdb69Smrg 1067455acc8fcSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 10675d63fdb69Smrg# 1067655acc8fcSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 1067755acc8fcSmrg# which have later been changed to m4_define as they aren't part of the 1067855acc8fcSmrg# exported API, or moved to Autoconf or Automake where they belong. 10679d63fdb69Smrg# 1068055acc8fcSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 1068155acc8fcSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 1068255acc8fcSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 1068355acc8fcSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 1068455acc8fcSmrg# and doesn't know about Autoconf macros at all.) 10685d63fdb69Smrg# 1068655acc8fcSmrg# So we provide this file, which has a silly filename so it's always 1068755acc8fcSmrg# included after everything else. This provides aclocal with the 1068855acc8fcSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 1068955acc8fcSmrg# because those macros already exist, or will be overwritten later. 1069055acc8fcSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 1069155acc8fcSmrg# 1069255acc8fcSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 1069355acc8fcSmrg# Yes, that means every name once taken will need to remain here until 1069455acc8fcSmrg# we give up compatibility with versions before 1.7, at which point 1069555acc8fcSmrg# we need to keep only those names which we still refer to. 1069655acc8fcSmrg 1069755acc8fcSmrg# This is to help aclocal find these macros, as it can't see m4_define. 1069855acc8fcSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 1069955acc8fcSmrg 1070055acc8fcSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 1070155acc8fcSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 1070255acc8fcSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 1070355acc8fcSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 1070455acc8fcSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 1070555acc8fcSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 1070655acc8fcSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 1070755acc8fcSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 1070855acc8fcSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 1070955acc8fcSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 1071055acc8fcSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 1071155acc8fcSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 1071255acc8fcSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 1071355acc8fcSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 1071455acc8fcSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 1071555acc8fcSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 1071655acc8fcSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 1071755acc8fcSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 1071855acc8fcSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 1071955acc8fcSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 1072055acc8fcSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 1072155acc8fcSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 1072255acc8fcSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 1072355acc8fcSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 1072455acc8fcSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 1072555acc8fcSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 1072655acc8fcSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 1072755acc8fcSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 1072855acc8fcSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 1072955acc8fcSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 1073055acc8fcSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 1073155acc8fcSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 1073255acc8fcSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 1073355acc8fcSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 1073455acc8fcSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 1073555acc8fcSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 1073655acc8fcSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 1073755acc8fcSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 1073855acc8fcSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 1073955acc8fcSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 1074055acc8fcSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 1074155acc8fcSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 1074255acc8fcSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 1074355acc8fcSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 1074455acc8fcSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 1074555acc8fcSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 1074655acc8fcSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 1074755acc8fcSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 1074855acc8fcSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 1074955acc8fcSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 1075055acc8fcSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 1075155acc8fcSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 1075255acc8fcSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 1075355acc8fcSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 1075455acc8fcSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 1075555acc8fcSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 1075655acc8fcSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 1075755acc8fcSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 1075855acc8fcSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 1075955acc8fcSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 1076055acc8fcSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 10761d63fdb69Smrg 10762