aclocal.m4 revision fc544a13
1fc544a13Smrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 2fc544a13Smrg 3fc544a13Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4ff559fabSmrg 5ff559fabSmrg# This file is free software; the Free Software Foundation 6ff559fabSmrg# gives unlimited permission to copy and/or distribute it, 7ff559fabSmrg# with or without modifications, as long as this notice is preserved. 8ff559fabSmrg 9ff559fabSmrg# This program is distributed in the hope that it will be useful, 10ff559fabSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ff559fabSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ff559fabSmrg# PARTICULAR PURPOSE. 13ff559fabSmrg 14fc544a13Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 157a3b38f7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 167a3b38f7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17fc544a13Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18fc544a13Smrg[m4_warning([this file was generated for autoconf 2.69. 197a3b38f7SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 207a3b38f7SmrgIf you have problems, you may need to regenerate the build system entirely. 21fc544a13SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22ff559fabSmrg 23fc544a13Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 24ff559fabSmrg# 2544dda7b2Smrg# This file is free software; the Free Software Foundation 2644dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 2744dda7b2Smrg# with or without modifications, as long as this notice is preserved. 2844dda7b2Smrg 2944dda7b2Smrg# AM_AUTOMAKE_VERSION(VERSION) 3044dda7b2Smrg# ---------------------------- 3144dda7b2Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3244dda7b2Smrg# generated from the m4 files accompanying Automake X.Y. 3344dda7b2Smrg# (This private macro should not be called outside this file.) 3444dda7b2SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35fc544a13Smrg[am__api_version='1.15' 3644dda7b2Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3744dda7b2Smrgdnl require some minimum version. Point them to the right macro. 38fc544a13Smrgm4_if([$1], [1.15], [], 3944dda7b2Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 4044dda7b2Smrg]) 4144dda7b2Smrg 4244dda7b2Smrg# _AM_AUTOCONF_VERSION(VERSION) 4344dda7b2Smrg# ----------------------------- 4444dda7b2Smrg# aclocal traces this macro to find the Autoconf version. 4544dda7b2Smrg# This is a private macro too. Using m4_define simplifies 4644dda7b2Smrg# the logic in aclocal, which can simply ignore this definition. 4744dda7b2Smrgm4_define([_AM_AUTOCONF_VERSION], []) 4844dda7b2Smrg 4944dda7b2Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 5044dda7b2Smrg# ------------------------------- 5144dda7b2Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5244dda7b2Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5344dda7b2SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54fc544a13Smrg[AM_AUTOMAKE_VERSION([1.15])dnl 5544dda7b2Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5644dda7b2Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5744dda7b2Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5844dda7b2Smrg 5944dda7b2Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6044dda7b2Smrg 61fc544a13Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 62ff559fabSmrg# 6344dda7b2Smrg# This file is free software; the Free Software Foundation 6444dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 6544dda7b2Smrg# with or without modifications, as long as this notice is preserved. 667a3b38f7Smrg 6744dda7b2Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68fc544a13Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69fc544a13Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70ff559fabSmrg# 7144dda7b2Smrg# Of course, Automake must honor this variable whenever it calls a 7244dda7b2Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7344dda7b2Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7444dda7b2Smrg# depending on how configure is run. This is pretty annoying, since 7544dda7b2Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7644dda7b2Smrg# source directory, any form will work fine, but in subdirectories a 7744dda7b2Smrg# relative path needs to be adjusted first. 78ff559fabSmrg# 7944dda7b2Smrg# $ac_aux_dir/missing 8044dda7b2Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8144dda7b2Smrg# $top_srcdir/$ac_aux_dir/missing 8244dda7b2Smrg# fails if $ac_aux_dir is absolute, 8344dda7b2Smrg# fails when called from a subdirectory in a VPATH build with 8444dda7b2Smrg# a relative $ac_aux_dir 85ff559fabSmrg# 8644dda7b2Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8744dda7b2Smrg# are both prefixed by $srcdir. In an in-source build this is usually 88fc544a13Smrg# harmless because $srcdir is '.', but things will broke when you 8944dda7b2Smrg# start a VPATH build or use an absolute $srcdir. 90ff559fabSmrg# 9144dda7b2Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9244dda7b2Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9344dda7b2Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9444dda7b2Smrg# and then we would define $MISSING as 9544dda7b2Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9644dda7b2Smrg# This will work as long as MISSING is not called from configure, because 9744dda7b2Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9844dda7b2Smrg# However there are other variables, like CC, which are often used in 9944dda7b2Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100ff559fabSmrg# 10144dda7b2Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10244dda7b2Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10344dda7b2Smrg# configured tree to be moved without reconfiguration. 104ff559fabSmrg 10544dda7b2SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106fc544a13Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107fc544a13Smrg# Expand $ac_aux_dir to an absolute path. 108fc544a13Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1097a3b38f7Smrg]) 110ff559fabSmrg 11144dda7b2Smrg# AM_CONDITIONAL -*- Autoconf -*- 112ff559fabSmrg 113fc544a13Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11444dda7b2Smrg# 11544dda7b2Smrg# This file is free software; the Free Software Foundation 11644dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 11744dda7b2Smrg# with or without modifications, as long as this notice is preserved. 118ff559fabSmrg 11944dda7b2Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12044dda7b2Smrg# ------------------------------------- 12144dda7b2Smrg# Define a conditional. 12244dda7b2SmrgAC_DEFUN([AM_CONDITIONAL], 123fc544a13Smrg[AC_PREREQ([2.52])dnl 124fc544a13Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125fc544a13Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12644dda7b2SmrgAC_SUBST([$1_TRUE])dnl 12744dda7b2SmrgAC_SUBST([$1_FALSE])dnl 12844dda7b2Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 12944dda7b2Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13044dda7b2Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13144dda7b2Smrgif $2; then 13244dda7b2Smrg $1_TRUE= 13344dda7b2Smrg $1_FALSE='#' 13444dda7b2Smrgelse 13544dda7b2Smrg $1_TRUE='#' 13644dda7b2Smrg $1_FALSE= 13744dda7b2Smrgfi 13844dda7b2SmrgAC_CONFIG_COMMANDS_PRE( 13944dda7b2Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14044dda7b2Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14144dda7b2SmrgUsually this means the macro was only invoked conditionally.]]) 14244dda7b2Smrgfi])]) 143ff559fabSmrg 144fc544a13Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 14544dda7b2Smrg# 14644dda7b2Smrg# This file is free software; the Free Software Foundation 14744dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 14844dda7b2Smrg# with or without modifications, as long as this notice is preserved. 149ff559fabSmrg 150ff559fabSmrg 151fc544a13Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 15244dda7b2Smrg# written in clear, in which case automake, when reading aclocal.m4, 15344dda7b2Smrg# will think it sees a *use*, and therefore will trigger all it's 15444dda7b2Smrg# C support machinery. Also note that it means that autoscan, seeing 15544dda7b2Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156ff559fabSmrg 157ff559fabSmrg 15844dda7b2Smrg# _AM_DEPENDENCIES(NAME) 1597a3b38f7Smrg# ---------------------- 16044dda7b2Smrg# See how the compiler implements dependency checking. 161fc544a13Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 16244dda7b2Smrg# We try a few techniques and use that to set a single cache variable. 16344dda7b2Smrg# 16444dda7b2Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 16544dda7b2Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 16644dda7b2Smrg# dependency, and given that the user is not expected to run this macro, 16744dda7b2Smrg# just rely on AC_PROG_CC. 16844dda7b2SmrgAC_DEFUN([_AM_DEPENDENCIES], 16944dda7b2Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17044dda7b2SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17144dda7b2SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17244dda7b2SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1737a3b38f7Smrg 174fc544a13Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 175fc544a13Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 176fc544a13Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 177fc544a13Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 178fc544a13Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 179fc544a13Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 180fc544a13Smrg [depcc="$$1" am_compiler_list=]) 1817a3b38f7Smrg 18244dda7b2SmrgAC_CACHE_CHECK([dependency style of $depcc], 18344dda7b2Smrg [am_cv_$1_dependencies_compiler_type], 18444dda7b2Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18544dda7b2Smrg # We make a subdir and do the tests there. Otherwise we can end up 18644dda7b2Smrg # making bogus files that we don't know about and never remove. For 18744dda7b2Smrg # instance it was reported that on HP-UX the gcc test will end up 188fc544a13Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 189fc544a13Smrg # in D". 190fc544a13Smrg rm -rf conftest.dir 19144dda7b2Smrg mkdir conftest.dir 19244dda7b2Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19344dda7b2Smrg # using a relative directory. 19444dda7b2Smrg cp "$am_depcomp" conftest.dir 19544dda7b2Smrg cd conftest.dir 19644dda7b2Smrg # We will build objects and dependencies in a subdirectory because 19744dda7b2Smrg # it helps to detect inapplicable dependency modes. For instance 19844dda7b2Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 19944dda7b2Smrg # side effect of compilation, but ICC will put the dependencies in 20044dda7b2Smrg # the current directory while Tru64 will put them in the object 20144dda7b2Smrg # directory. 20244dda7b2Smrg mkdir sub 203ff559fabSmrg 20444dda7b2Smrg am_cv_$1_dependencies_compiler_type=none 20544dda7b2Smrg if test "$am_compiler_list" = ""; then 20644dda7b2Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207ff559fabSmrg fi 20844dda7b2Smrg am__universal=false 20944dda7b2Smrg m4_case([$1], [CC], 21044dda7b2Smrg [case " $depcc " in #( 21144dda7b2Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21244dda7b2Smrg esac], 21344dda7b2Smrg [CXX], 21444dda7b2Smrg [case " $depcc " in #( 21544dda7b2Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21644dda7b2Smrg esac]) 217ff559fabSmrg 21844dda7b2Smrg for depmode in $am_compiler_list; do 21944dda7b2Smrg # Setup a source with many dependencies, because some compilers 22044dda7b2Smrg # like to wrap large dependency lists on column 80 (with \), and 22144dda7b2Smrg # we should not choose a depcomp mode which is confused by this. 22244dda7b2Smrg # 22344dda7b2Smrg # We need to recreate these files for each test, as the compiler may 22444dda7b2Smrg # overwrite some of them when testing with obscure command lines. 22544dda7b2Smrg # This happens at least with the AIX C compiler. 22644dda7b2Smrg : > sub/conftest.c 22744dda7b2Smrg for i in 1 2 3 4 5 6; do 22844dda7b2Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 229fc544a13Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 230fc544a13Smrg # Solaris 10 /bin/sh. 231fc544a13Smrg echo '/* dummy */' > sub/conftst$i.h 23244dda7b2Smrg done 23344dda7b2Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234ff559fabSmrg 235fc544a13Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 23644dda7b2Smrg # mode. It turns out that the SunPro C++ compiler does not properly 237fc544a13Smrg # handle '-M -o', and we need to detect this. Also, some Intel 238fc544a13Smrg # versions had trouble with output in subdirs. 23944dda7b2Smrg am__obj=sub/conftest.${OBJEXT-o} 24044dda7b2Smrg am__minus_obj="-o $am__obj" 24144dda7b2Smrg case $depmode in 24244dda7b2Smrg gcc) 24344dda7b2Smrg # This depmode causes a compiler race in universal mode. 24444dda7b2Smrg test "$am__universal" = false || continue 24544dda7b2Smrg ;; 24644dda7b2Smrg nosideeffect) 247fc544a13Smrg # After this tag, mechanisms are not by side-effect, so they'll 248fc544a13Smrg # only be used when explicitly requested. 24944dda7b2Smrg if test "x$enable_dependency_tracking" = xyes; then 25044dda7b2Smrg continue 25144dda7b2Smrg else 25244dda7b2Smrg break 25344dda7b2Smrg fi 25444dda7b2Smrg ;; 255fc544a13Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 256fc544a13Smrg # This compiler won't grok '-c -o', but also, the minuso test has 25744dda7b2Smrg # not run yet. These depmodes are late enough in the game, and 25844dda7b2Smrg # so weak that their functioning should not be impacted. 25944dda7b2Smrg am__obj=conftest.${OBJEXT-o} 26044dda7b2Smrg am__minus_obj= 26144dda7b2Smrg ;; 26244dda7b2Smrg none) break ;; 26344dda7b2Smrg esac 26444dda7b2Smrg if depmode=$depmode \ 26544dda7b2Smrg source=sub/conftest.c object=$am__obj \ 26644dda7b2Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 26744dda7b2Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 26844dda7b2Smrg >/dev/null 2>conftest.err && 26944dda7b2Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27044dda7b2Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27144dda7b2Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27244dda7b2Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27344dda7b2Smrg # icc doesn't choke on unknown options, it will just issue warnings 27444dda7b2Smrg # or remarks (even with -Werror). So we grep stderr for any message 27544dda7b2Smrg # that says an option was ignored or not supported. 27644dda7b2Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 27744dda7b2Smrg # icc: Command line warning: ignoring option '-M'; no argument required 27844dda7b2Smrg # The diagnosis changed in icc 8.0: 27944dda7b2Smrg # icc: Command line remark: option '-MP' not supported 28044dda7b2Smrg if (grep 'ignoring option' conftest.err || 28144dda7b2Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28244dda7b2Smrg am_cv_$1_dependencies_compiler_type=$depmode 28344dda7b2Smrg break 28444dda7b2Smrg fi 28544dda7b2Smrg fi 28644dda7b2Smrg done 2877a3b38f7Smrg 28844dda7b2Smrg cd .. 28944dda7b2Smrg rm -rf conftest.dir 29044dda7b2Smrgelse 29144dda7b2Smrg am_cv_$1_dependencies_compiler_type=none 29244dda7b2Smrgfi 29344dda7b2Smrg]) 29444dda7b2SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29544dda7b2SmrgAM_CONDITIONAL([am__fastdep$1], [ 29644dda7b2Smrg test "x$enable_dependency_tracking" != xno \ 29744dda7b2Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 29844dda7b2Smrg]) 299ff559fabSmrg 300ff559fabSmrg 30144dda7b2Smrg# AM_SET_DEPDIR 30244dda7b2Smrg# ------------- 30344dda7b2Smrg# Choose a directory name for dependency files. 304fc544a13Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 30544dda7b2SmrgAC_DEFUN([AM_SET_DEPDIR], 30644dda7b2Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 30744dda7b2SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 30844dda7b2Smrg]) 309ff559fabSmrg 3107a3b38f7Smrg 31144dda7b2Smrg# AM_DEP_TRACK 31244dda7b2Smrg# ------------ 31344dda7b2SmrgAC_DEFUN([AM_DEP_TRACK], 314fc544a13Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 315fc544a13SmrgAS_HELP_STRING( 316fc544a13Smrg [--enable-dependency-tracking], 317fc544a13Smrg [do not reject slow dependency extractors]) 318fc544a13SmrgAS_HELP_STRING( 319fc544a13Smrg [--disable-dependency-tracking], 320fc544a13Smrg [speeds up one-time build])]) 32144dda7b2Smrgif test "x$enable_dependency_tracking" != xno; then 32244dda7b2Smrg am_depcomp="$ac_aux_dir/depcomp" 32344dda7b2Smrg AMDEPBACKSLASH='\' 324fc544a13Smrg am__nodep='_no' 32544dda7b2Smrgfi 32644dda7b2SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32744dda7b2SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32844dda7b2Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329fc544a13SmrgAC_SUBST([am__nodep])dnl 330fc544a13Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 33144dda7b2Smrg]) 3327a3b38f7Smrg 33344dda7b2Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3347a3b38f7Smrg 335fc544a13Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 33644dda7b2Smrg# 33744dda7b2Smrg# This file is free software; the Free Software Foundation 33844dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 33944dda7b2Smrg# with or without modifications, as long as this notice is preserved. 3407a3b38f7Smrg 3417a3b38f7Smrg 34244dda7b2Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3437a3b38f7Smrg# ------------------------------ 34444dda7b2SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34544dda7b2Smrg[{ 346fc544a13Smrg # Older Autoconf quotes --file arguments for eval, but not when files 34744dda7b2Smrg # are listed without --file. Let's play safe and only enable the eval 34844dda7b2Smrg # if we detect the quoting. 34944dda7b2Smrg case $CONFIG_FILES in 35044dda7b2Smrg *\'*) eval set x "$CONFIG_FILES" ;; 35144dda7b2Smrg *) set x $CONFIG_FILES ;; 35244dda7b2Smrg esac 35344dda7b2Smrg shift 35444dda7b2Smrg for mf 35544dda7b2Smrg do 35644dda7b2Smrg # Strip MF so we end up with the name of the file. 35744dda7b2Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35844dda7b2Smrg # Check whether this is an Automake generated Makefile or not. 359fc544a13Smrg # We used to match only the files named 'Makefile.in', but 36044dda7b2Smrg # some people rename them; so instead we look at the file content. 36144dda7b2Smrg # Grep'ing the first line is not enough: some people post-process 36244dda7b2Smrg # each Makefile.in and add a new line on top of each file to say so. 36344dda7b2Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36444dda7b2Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36544dda7b2Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36644dda7b2Smrg dirpart=`AS_DIRNAME("$mf")` 36744dda7b2Smrg else 36844dda7b2Smrg continue 36944dda7b2Smrg fi 37044dda7b2Smrg # Extract the definition of DEPDIR, am__include, and am__quote 371fc544a13Smrg # from the Makefile without running 'make'. 37244dda7b2Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37344dda7b2Smrg test -z "$DEPDIR" && continue 37444dda7b2Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 375fc544a13Smrg test -z "$am__include" && continue 37644dda7b2Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37744dda7b2Smrg # Find all dependency output files, they are included files with 37844dda7b2Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37944dda7b2Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38044dda7b2Smrg # expansion. 38144dda7b2Smrg for file in `sed -n " 38244dda7b2Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383fc544a13Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 38444dda7b2Smrg # Make sure the directory exists. 38544dda7b2Smrg test -f "$dirpart/$file" && continue 38644dda7b2Smrg fdir=`AS_DIRNAME(["$file"])` 38744dda7b2Smrg AS_MKDIR_P([$dirpart/$fdir]) 38844dda7b2Smrg # echo "creating $dirpart/$file" 38944dda7b2Smrg echo '# dummy' > "$dirpart/$file" 39044dda7b2Smrg done 39144dda7b2Smrg done 39244dda7b2Smrg} 39344dda7b2Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3947a3b38f7Smrg 3957a3b38f7Smrg 39644dda7b2Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39744dda7b2Smrg# ----------------------------- 39844dda7b2Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 39944dda7b2Smrg# 40044dda7b2Smrg# This code is only required when automatic dependency tracking 401fc544a13Smrg# is enabled. FIXME. This creates each '.P' file that we will 40244dda7b2Smrg# need in order to bootstrap the dependency handling code. 40344dda7b2SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40444dda7b2Smrg[AC_CONFIG_COMMANDS([depfiles], 40544dda7b2Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40644dda7b2Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407ff559fabSmrg]) 4087a3b38f7Smrg 40944dda7b2Smrg# Do all the work for Automake. -*- Autoconf -*- 4107a3b38f7Smrg 411fc544a13Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 41244dda7b2Smrg# 41344dda7b2Smrg# This file is free software; the Free Software Foundation 41444dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 41544dda7b2Smrg# with or without modifications, as long as this notice is preserved. 4167a3b38f7Smrg 41744dda7b2Smrg# This macro actually does too much. Some checks are only needed if 41844dda7b2Smrg# your package does certain things. But this isn't really a big deal. 419ff559fabSmrg 420fc544a13Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 421fc544a13Smrgm4_define([AC_PROG_CC], 422fc544a13Smrgm4_defn([AC_PROG_CC]) 423fc544a13Smrg[_AM_PROG_CC_C_O 424fc544a13Smrg]) 425fc544a13Smrg 42644dda7b2Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 42744dda7b2Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 42844dda7b2Smrg# ----------------------------------------------- 42944dda7b2Smrg# The call with PACKAGE and VERSION arguments is the old style 43044dda7b2Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 43144dda7b2Smrg# and VERSION should now be passed to AC_INIT and removed from 43244dda7b2Smrg# the call to AM_INIT_AUTOMAKE. 43344dda7b2Smrg# We support both call styles for the transition. After 43444dda7b2Smrg# the next Automake release, Autoconf can make the AC_INIT 43544dda7b2Smrg# arguments mandatory, and then we can depend on a new Autoconf 43644dda7b2Smrg# release and drop the old call support. 43744dda7b2SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 438fc544a13Smrg[AC_PREREQ([2.65])dnl 43944dda7b2Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 44044dda7b2Smrgdnl the ones we care about. 44144dda7b2Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 44244dda7b2SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 44344dda7b2SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 44444dda7b2Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 44544dda7b2Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 44644dda7b2Smrg # is not polluted with repeated "-I." 44744dda7b2Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 44844dda7b2Smrg # test to see if srcdir already configured 44944dda7b2Smrg if test -f $srcdir/config.status; then 45044dda7b2Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 45144dda7b2Smrg fi 45244dda7b2Smrgfi 453ff559fabSmrg 45444dda7b2Smrg# test whether we have cygpath 45544dda7b2Smrgif test -z "$CYGPATH_W"; then 45644dda7b2Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 45744dda7b2Smrg CYGPATH_W='cygpath -w' 45844dda7b2Smrg else 45944dda7b2Smrg CYGPATH_W=echo 46044dda7b2Smrg fi 46144dda7b2Smrgfi 46244dda7b2SmrgAC_SUBST([CYGPATH_W]) 463ff559fabSmrg 46444dda7b2Smrg# Define the identity of the package. 46544dda7b2Smrgdnl Distinguish between old-style and new-style calls. 46644dda7b2Smrgm4_ifval([$2], 467fc544a13Smrg[AC_DIAGNOSE([obsolete], 468fc544a13Smrg [$0: two- and three-arguments forms are deprecated.]) 469fc544a13Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 47044dda7b2Smrg AC_SUBST([PACKAGE], [$1])dnl 47144dda7b2Smrg AC_SUBST([VERSION], [$2])], 47244dda7b2Smrg[_AM_SET_OPTIONS([$1])dnl 47344dda7b2Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 474fc544a13Smrgm4_if( 475fc544a13Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 476fc544a13Smrg [ok:ok],, 47744dda7b2Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 47844dda7b2Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 47944dda7b2Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 480ff559fabSmrg 48144dda7b2Smrg_AM_IF_OPTION([no-define],, 482fc544a13Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 483fc544a13Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 484ff559fabSmrg 48544dda7b2Smrg# Some tools Automake needs. 48644dda7b2SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 48744dda7b2SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 488fc544a13SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 489fc544a13SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 490fc544a13SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 491fc544a13SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 492fc544a13SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 49344dda7b2SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49444dda7b2SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 495fc544a13SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 496fc544a13Smrg# For better backward compatibility. To be removed once Automake 1.9.x 497fc544a13Smrg# dies out for good. For more background, see: 498fc544a13Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 499fc544a13Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 500fc544a13SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 501fc544a13Smrg# We need awk for the "check" target (and possibly the TAP driver). The 502fc544a13Smrg# system "awk" is bad on some platforms. 50344dda7b2SmrgAC_REQUIRE([AC_PROG_AWK])dnl 50444dda7b2SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50544dda7b2SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50644dda7b2Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50744dda7b2Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50844dda7b2Smrg [_AM_PROG_TAR([v7])])]) 50944dda7b2Smrg_AM_IF_OPTION([no-dependencies],, 51044dda7b2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 511fc544a13Smrg [_AM_DEPENDENCIES([CC])], 512fc544a13Smrg [m4_define([AC_PROG_CC], 513fc544a13Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 51444dda7b2SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 515fc544a13Smrg [_AM_DEPENDENCIES([CXX])], 516fc544a13Smrg [m4_define([AC_PROG_CXX], 517fc544a13Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 51844dda7b2SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 519fc544a13Smrg [_AM_DEPENDENCIES([OBJC])], 520fc544a13Smrg [m4_define([AC_PROG_OBJC], 521fc544a13Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 522fc544a13SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 523fc544a13Smrg [_AM_DEPENDENCIES([OBJCXX])], 524fc544a13Smrg [m4_define([AC_PROG_OBJCXX], 525fc544a13Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 52644dda7b2Smrg]) 527fc544a13SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 528fc544a13Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 529fc544a13Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 530fc544a13Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 53144dda7b2SmrgAC_CONFIG_COMMANDS_PRE(dnl 53244dda7b2Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 53344dda7b2Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 534fc544a13Smrg 535fc544a13Smrg# POSIX will say in a future version that running "rm -f" with no argument 536fc544a13Smrg# is OK; and we want to be able to make that assumption in our Makefile 537fc544a13Smrg# recipes. So use an aggressive probe to check that the usage we want is 538fc544a13Smrg# actually supported "in the wild" to an acceptable degree. 539fc544a13Smrg# See automake bug#10828. 540fc544a13Smrg# To make any issue more visible, cause the running configure to be aborted 541fc544a13Smrg# by default if the 'rm' program in use doesn't match our expectations; the 542fc544a13Smrg# user can still override this though. 543fc544a13Smrgif rm -f && rm -fr && rm -rf; then : OK; else 544fc544a13Smrg cat >&2 <<'END' 545fc544a13SmrgOops! 546fc544a13Smrg 547fc544a13SmrgYour 'rm' program seems unable to run without file operands specified 548fc544a13Smrgon the command line, even when the '-f' option is present. This is contrary 549fc544a13Smrgto the behaviour of most rm programs out there, and not conforming with 550fc544a13Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 551fc544a13Smrg 552fc544a13SmrgPlease tell bug-automake@gnu.org about your system, including the value 553fc544a13Smrgof your $PATH and any error possibly output before this message. This 554fc544a13Smrgcan help us improve future automake versions. 555fc544a13Smrg 556fc544a13SmrgEND 557fc544a13Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 558fc544a13Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 559fc544a13Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 560fc544a13Smrg echo >&2 561fc544a13Smrg else 562fc544a13Smrg cat >&2 <<'END' 563fc544a13SmrgAborting the configuration process, to ensure you take notice of the issue. 564fc544a13Smrg 565fc544a13SmrgYou can download and install GNU coreutils to get an 'rm' implementation 566fc544a13Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 567fc544a13Smrg 568fc544a13SmrgIf you want to complete the configuration process using your problematic 569fc544a13Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 570fc544a13Smrgto "yes", and re-run configure. 571fc544a13Smrg 572fc544a13SmrgEND 573fc544a13Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 574fc544a13Smrg fi 575fc544a13Smrgfi 576fc544a13Smrgdnl The trailing newline in this macro's definition is deliberate, for 577fc544a13Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 578fc544a13Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 5797a3b38f7Smrg]) 580ff559fabSmrg 581fc544a13Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 58244dda7b2Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 58344dda7b2Smrgdnl mangled by Autoconf and run in a shell conditional statement. 58444dda7b2Smrgm4_define([_AC_COMPILER_EXEEXT], 58544dda7b2Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 586ff559fabSmrg 58744dda7b2Smrg# When config.status generates a header, we must update the stamp-h file. 58844dda7b2Smrg# This file resides in the same directory as the config header 58944dda7b2Smrg# that is generated. The stamp files are numbered to have different names. 590ff559fabSmrg 59144dda7b2Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 59244dda7b2Smrg# loop where config.status creates the headers, so we can generate 59344dda7b2Smrg# our stamp files there. 59444dda7b2SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 59544dda7b2Smrg[# Compute $1's index in $config_headers. 59644dda7b2Smrg_am_arg=$1 59744dda7b2Smrg_am_stamp_count=1 59844dda7b2Smrgfor _am_header in $config_headers :; do 59944dda7b2Smrg case $_am_header in 60044dda7b2Smrg $_am_arg | $_am_arg:* ) 60144dda7b2Smrg break ;; 60244dda7b2Smrg * ) 60344dda7b2Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 60444dda7b2Smrg esac 60544dda7b2Smrgdone 60644dda7b2Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 607ff559fabSmrg 608fc544a13Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 60944dda7b2Smrg# 61044dda7b2Smrg# This file is free software; the Free Software Foundation 61144dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 61244dda7b2Smrg# with or without modifications, as long as this notice is preserved. 613ff559fabSmrg 61444dda7b2Smrg# AM_PROG_INSTALL_SH 61544dda7b2Smrg# ------------------ 61644dda7b2Smrg# Define $install_sh. 61744dda7b2SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 61844dda7b2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 619fc544a13Smrgif test x"${install_sh+set}" != xset; then 62044dda7b2Smrg case $am_aux_dir in 62144dda7b2Smrg *\ * | *\ *) 62244dda7b2Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 62344dda7b2Smrg *) 62444dda7b2Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 62544dda7b2Smrg esac 62644dda7b2Smrgfi 627fc544a13SmrgAC_SUBST([install_sh])]) 628ff559fabSmrg 629fc544a13Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 63044dda7b2Smrg# 63144dda7b2Smrg# This file is free software; the Free Software Foundation 63244dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 63344dda7b2Smrg# with or without modifications, as long as this notice is preserved. 634ff559fabSmrg 63544dda7b2Smrg# Check whether the underlying file-system supports filenames 63644dda7b2Smrg# with a leading dot. For instance MS-DOS doesn't. 63744dda7b2SmrgAC_DEFUN([AM_SET_LEADING_DOT], 63844dda7b2Smrg[rm -rf .tst 2>/dev/null 63944dda7b2Smrgmkdir .tst 2>/dev/null 64044dda7b2Smrgif test -d .tst; then 64144dda7b2Smrg am__leading_dot=. 64244dda7b2Smrgelse 64344dda7b2Smrg am__leading_dot=_ 64444dda7b2Smrgfi 64544dda7b2Smrgrmdir .tst 2>/dev/null 64644dda7b2SmrgAC_SUBST([am__leading_dot])]) 6477a3b38f7Smrg 64844dda7b2Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 64944dda7b2Smrg 650fc544a13Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 651ff559fabSmrg# 65244dda7b2Smrg# This file is free software; the Free Software Foundation 65344dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 65444dda7b2Smrg# with or without modifications, as long as this notice is preserved. 655ff559fabSmrg 65644dda7b2Smrg# AM_MAKE_INCLUDE() 65744dda7b2Smrg# ----------------- 65844dda7b2Smrg# Check to see how make treats includes. 65944dda7b2SmrgAC_DEFUN([AM_MAKE_INCLUDE], 66044dda7b2Smrg[am_make=${MAKE-make} 66144dda7b2Smrgcat > confinc << 'END' 66244dda7b2Smrgam__doit: 66344dda7b2Smrg @echo this is the am__doit target 66444dda7b2Smrg.PHONY: am__doit 66544dda7b2SmrgEND 66644dda7b2Smrg# If we don't find an include directive, just comment out the code. 66744dda7b2SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 66844dda7b2Smrgam__include="#" 66944dda7b2Smrgam__quote= 67044dda7b2Smrg_am_result=none 67144dda7b2Smrg# First try GNU make style include. 67244dda7b2Smrgecho "include confinc" > confmf 673fc544a13Smrg# Ignore all kinds of additional output from 'make'. 67444dda7b2Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 67544dda7b2Smrg*the\ am__doit\ target*) 67644dda7b2Smrg am__include=include 67744dda7b2Smrg am__quote= 67844dda7b2Smrg _am_result=GNU 67944dda7b2Smrg ;; 68044dda7b2Smrgesac 68144dda7b2Smrg# Now try BSD make style include. 68244dda7b2Smrgif test "$am__include" = "#"; then 68344dda7b2Smrg echo '.include "confinc"' > confmf 68444dda7b2Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 68544dda7b2Smrg *the\ am__doit\ target*) 68644dda7b2Smrg am__include=.include 68744dda7b2Smrg am__quote="\"" 68844dda7b2Smrg _am_result=BSD 68944dda7b2Smrg ;; 69044dda7b2Smrg esac 69144dda7b2Smrgfi 69244dda7b2SmrgAC_SUBST([am__include]) 69344dda7b2SmrgAC_SUBST([am__quote]) 69444dda7b2SmrgAC_MSG_RESULT([$_am_result]) 69544dda7b2Smrgrm -f confinc confmf 69644dda7b2Smrg]) 6977a3b38f7Smrg 69844dda7b2Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6997a3b38f7Smrg 700fc544a13Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 70144dda7b2Smrg# 70244dda7b2Smrg# This file is free software; the Free Software Foundation 70344dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 70444dda7b2Smrg# with or without modifications, as long as this notice is preserved. 7057a3b38f7Smrg 70644dda7b2Smrg# AM_MISSING_PROG(NAME, PROGRAM) 707ff559fabSmrg# ------------------------------ 70844dda7b2SmrgAC_DEFUN([AM_MISSING_PROG], 70944dda7b2Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 71044dda7b2Smrg$1=${$1-"${am_missing_run}$2"} 71144dda7b2SmrgAC_SUBST($1)]) 7127a3b38f7Smrg 71344dda7b2Smrg# AM_MISSING_HAS_RUN 71444dda7b2Smrg# ------------------ 715fc544a13Smrg# Define MISSING if not defined so far and test if it is modern enough. 716fc544a13Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 71744dda7b2SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 71844dda7b2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 71944dda7b2SmrgAC_REQUIRE_AUX_FILE([missing])dnl 72044dda7b2Smrgif test x"${MISSING+set}" != xset; then 72144dda7b2Smrg case $am_aux_dir in 72244dda7b2Smrg *\ * | *\ *) 72344dda7b2Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 72444dda7b2Smrg *) 72544dda7b2Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 72644dda7b2Smrg esac 72744dda7b2Smrgfi 72844dda7b2Smrg# Use eval to expand $SHELL 729fc544a13Smrgif eval "$MISSING --is-lightweight"; then 730fc544a13Smrg am_missing_run="$MISSING " 73144dda7b2Smrgelse 73244dda7b2Smrg am_missing_run= 733fc544a13Smrg AC_MSG_WARN(['missing' script is too old or missing]) 73444dda7b2Smrgfi 73544dda7b2Smrg]) 736ff559fabSmrg 73744dda7b2Smrg# Helper functions for option handling. -*- Autoconf -*- 738ff559fabSmrg 739fc544a13Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 74044dda7b2Smrg# 74144dda7b2Smrg# This file is free software; the Free Software Foundation 74244dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 74344dda7b2Smrg# with or without modifications, as long as this notice is preserved. 7447a3b38f7Smrg 74544dda7b2Smrg# _AM_MANGLE_OPTION(NAME) 74644dda7b2Smrg# ----------------------- 74744dda7b2SmrgAC_DEFUN([_AM_MANGLE_OPTION], 74844dda7b2Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 749ff559fabSmrg 75044dda7b2Smrg# _AM_SET_OPTION(NAME) 751fc544a13Smrg# -------------------- 75244dda7b2Smrg# Set option NAME. Presently that only means defining a flag for this option. 75344dda7b2SmrgAC_DEFUN([_AM_SET_OPTION], 754fc544a13Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 755ff559fabSmrg 75644dda7b2Smrg# _AM_SET_OPTIONS(OPTIONS) 757fc544a13Smrg# ------------------------ 75844dda7b2Smrg# OPTIONS is a space-separated list of Automake options. 75944dda7b2SmrgAC_DEFUN([_AM_SET_OPTIONS], 76044dda7b2Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 761ff559fabSmrg 76244dda7b2Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 76344dda7b2Smrg# ------------------------------------------- 76444dda7b2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 76544dda7b2SmrgAC_DEFUN([_AM_IF_OPTION], 76644dda7b2Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 767ff559fabSmrg 768fc544a13Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 769fc544a13Smrg# 770fc544a13Smrg# This file is free software; the Free Software Foundation 771fc544a13Smrg# gives unlimited permission to copy and/or distribute it, 772fc544a13Smrg# with or without modifications, as long as this notice is preserved. 773fc544a13Smrg 774fc544a13Smrg# _AM_PROG_CC_C_O 775fc544a13Smrg# --------------- 776fc544a13Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 777fc544a13Smrg# to automatically call this. 778fc544a13SmrgAC_DEFUN([_AM_PROG_CC_C_O], 779fc544a13Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 780fc544a13SmrgAC_REQUIRE_AUX_FILE([compile])dnl 781fc544a13SmrgAC_LANG_PUSH([C])dnl 782fc544a13SmrgAC_CACHE_CHECK( 783fc544a13Smrg [whether $CC understands -c and -o together], 784fc544a13Smrg [am_cv_prog_cc_c_o], 785fc544a13Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 786fc544a13Smrg # Make sure it works both with $CC and with simple cc. 787fc544a13Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 788fc544a13Smrg # compilers refuse to overwrite an existing .o file with -o, 789fc544a13Smrg # though they will create one. 790fc544a13Smrg am_cv_prog_cc_c_o=yes 791fc544a13Smrg for am_i in 1 2; do 792fc544a13Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 793fc544a13Smrg && test -f conftest2.$ac_objext; then 794fc544a13Smrg : OK 795fc544a13Smrg else 796fc544a13Smrg am_cv_prog_cc_c_o=no 797fc544a13Smrg break 798fc544a13Smrg fi 799fc544a13Smrg done 800fc544a13Smrg rm -f core conftest* 801fc544a13Smrg unset am_i]) 802fc544a13Smrgif test "$am_cv_prog_cc_c_o" != yes; then 803fc544a13Smrg # Losing compiler, so override with the script. 804fc544a13Smrg # FIXME: It is wrong to rewrite CC. 805fc544a13Smrg # But if we don't then we get into trouble of one sort or another. 806fc544a13Smrg # A longer-term fix would be to have automake use am__CC in this case, 807fc544a13Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 808fc544a13Smrg CC="$am_aux_dir/compile $CC" 809fc544a13Smrgfi 810fc544a13SmrgAC_LANG_POP([C])]) 811ff559fabSmrg 812fc544a13Smrg# For backward compatibility. 813fc544a13SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 814fc544a13Smrg 815fc544a13Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 81644dda7b2Smrg# 81744dda7b2Smrg# This file is free software; the Free Software Foundation 81844dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 81944dda7b2Smrg# with or without modifications, as long as this notice is preserved. 820ff559fabSmrg 821fc544a13Smrg# AM_RUN_LOG(COMMAND) 822fc544a13Smrg# ------------------- 823fc544a13Smrg# Run COMMAND, save the exit status in ac_status, and log it. 824fc544a13Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 825fc544a13SmrgAC_DEFUN([AM_RUN_LOG], 826fc544a13Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 827fc544a13Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 828fc544a13Smrg ac_status=$? 829fc544a13Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 830fc544a13Smrg (exit $ac_status); }]) 831fc544a13Smrg 832fc544a13Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 833fc544a13Smrg 834fc544a13Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 835fc544a13Smrg# 836fc544a13Smrg# This file is free software; the Free Software Foundation 837fc544a13Smrg# gives unlimited permission to copy and/or distribute it, 838fc544a13Smrg# with or without modifications, as long as this notice is preserved. 839ff559fabSmrg 84044dda7b2Smrg# AM_SANITY_CHECK 84144dda7b2Smrg# --------------- 84244dda7b2SmrgAC_DEFUN([AM_SANITY_CHECK], 84344dda7b2Smrg[AC_MSG_CHECKING([whether build environment is sane]) 84444dda7b2Smrg# Reject unsafe characters in $srcdir or the absolute working directory 84544dda7b2Smrg# name. Accept space and tab only in the latter. 84644dda7b2Smrgam_lf=' 84744dda7b2Smrg' 84844dda7b2Smrgcase `pwd` in 84944dda7b2Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 85044dda7b2Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 85144dda7b2Smrgesac 85244dda7b2Smrgcase $srcdir in 85344dda7b2Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 854fc544a13Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 85544dda7b2Smrgesac 8567a3b38f7Smrg 857fc544a13Smrg# Do 'set' in a subshell so we don't clobber the current shell's 85844dda7b2Smrg# arguments. Must try -L first in case configure is actually a 85944dda7b2Smrg# symlink; some systems play weird games with the mod time of symlinks 86044dda7b2Smrg# (eg FreeBSD returns the mod time of the symlink's containing 86144dda7b2Smrg# directory). 86244dda7b2Smrgif ( 863fc544a13Smrg am_has_slept=no 864fc544a13Smrg for am_try in 1 2; do 865fc544a13Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 866fc544a13Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 867fc544a13Smrg if test "$[*]" = "X"; then 868fc544a13Smrg # -L didn't work. 869fc544a13Smrg set X `ls -t "$srcdir/configure" conftest.file` 870fc544a13Smrg fi 871fc544a13Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 872fc544a13Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 873fc544a13Smrg 874fc544a13Smrg # If neither matched, then we have a broken ls. This can happen 875fc544a13Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 876fc544a13Smrg # broken ls alias from the environment. This has actually 877fc544a13Smrg # happened. Such a system could not be considered "sane". 878fc544a13Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 879fc544a13Smrg alias in your environment]) 880fc544a13Smrg fi 881fc544a13Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 882fc544a13Smrg break 883fc544a13Smrg fi 884fc544a13Smrg # Just in case. 885fc544a13Smrg sleep 1 886fc544a13Smrg am_has_slept=yes 887fc544a13Smrg done 88844dda7b2Smrg test "$[2]" = conftest.file 88944dda7b2Smrg ) 89044dda7b2Smrgthen 89144dda7b2Smrg # Ok. 89244dda7b2Smrg : 89344dda7b2Smrgelse 89444dda7b2Smrg AC_MSG_ERROR([newly created file is older than distributed files! 89544dda7b2SmrgCheck your system clock]) 896ff559fabSmrgfi 897fc544a13SmrgAC_MSG_RESULT([yes]) 898fc544a13Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 899fc544a13Smrg# generated files are strictly newer. 900fc544a13Smrgam_sleep_pid= 901fc544a13Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 902fc544a13Smrg ( sleep 1 ) & 903fc544a13Smrg am_sleep_pid=$! 904fc544a13Smrgfi 905fc544a13SmrgAC_CONFIG_COMMANDS_PRE( 906fc544a13Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 907fc544a13Smrg if test -n "$am_sleep_pid"; then 908fc544a13Smrg # Hide warnings about reused PIDs. 909fc544a13Smrg wait $am_sleep_pid 2>/dev/null 910fc544a13Smrg fi 911fc544a13Smrg AC_MSG_RESULT([done])]) 912fc544a13Smrgrm -f conftest.file 913fc544a13Smrg]) 9147a3b38f7Smrg 915fc544a13Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 91644dda7b2Smrg# 91744dda7b2Smrg# This file is free software; the Free Software Foundation 91844dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 91944dda7b2Smrg# with or without modifications, as long as this notice is preserved. 920ff559fabSmrg 92144dda7b2Smrg# AM_SILENT_RULES([DEFAULT]) 92244dda7b2Smrg# -------------------------- 92344dda7b2Smrg# Enable less verbose build rules; with the default set to DEFAULT 924fc544a13Smrg# ("yes" being less verbose, "no" or empty being verbose). 92544dda7b2SmrgAC_DEFUN([AM_SILENT_RULES], 926fc544a13Smrg[AC_ARG_ENABLE([silent-rules], [dnl 927fc544a13SmrgAS_HELP_STRING( 928fc544a13Smrg [--enable-silent-rules], 929fc544a13Smrg [less verbose build output (undo: "make V=1")]) 930fc544a13SmrgAS_HELP_STRING( 931fc544a13Smrg [--disable-silent-rules], 932fc544a13Smrg [verbose build output (undo: "make V=0")])dnl 933fc544a13Smrg]) 934fc544a13Smrgcase $enable_silent_rules in @%:@ ((( 935fc544a13Smrg yes) AM_DEFAULT_VERBOSITY=0;; 936fc544a13Smrg no) AM_DEFAULT_VERBOSITY=1;; 937fc544a13Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 93844dda7b2Smrgesac 939fc544a13Smrgdnl 940fc544a13Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 941fc544a13Smrgdnl do not support nested variable expansions. 942fc544a13Smrgdnl See automake bug#9928 and bug#10237. 943fc544a13Smrgam_make=${MAKE-make} 944fc544a13SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 945fc544a13Smrg [am_cv_make_support_nested_variables], 946fc544a13Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 947fc544a13SmrgBAR0=false 948fc544a13SmrgBAR1=true 949fc544a13SmrgV=1 950fc544a13Smrgam__doit: 951fc544a13Smrg @$(TRUE) 952fc544a13Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 953fc544a13Smrg am_cv_make_support_nested_variables=yes 954fc544a13Smrgelse 955fc544a13Smrg am_cv_make_support_nested_variables=no 956fc544a13Smrgfi]) 957fc544a13Smrgif test $am_cv_make_support_nested_variables = yes; then 958fc544a13Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 959fc544a13Smrg AM_V='$(V)' 960fc544a13Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 961fc544a13Smrgelse 962fc544a13Smrg AM_V=$AM_DEFAULT_VERBOSITY 963fc544a13Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 964fc544a13Smrgfi 965fc544a13SmrgAC_SUBST([AM_V])dnl 966fc544a13SmrgAM_SUBST_NOTMAKE([AM_V])dnl 967fc544a13SmrgAC_SUBST([AM_DEFAULT_V])dnl 968fc544a13SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 96944dda7b2SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 97044dda7b2SmrgAM_BACKSLASH='\' 97144dda7b2SmrgAC_SUBST([AM_BACKSLASH])dnl 97244dda7b2Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 97344dda7b2Smrg]) 9747a3b38f7Smrg 975fc544a13Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 976ff559fabSmrg# 97744dda7b2Smrg# This file is free software; the Free Software Foundation 97844dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 97944dda7b2Smrg# with or without modifications, as long as this notice is preserved. 9807a3b38f7Smrg 98144dda7b2Smrg# AM_PROG_INSTALL_STRIP 98244dda7b2Smrg# --------------------- 983fc544a13Smrg# One issue with vendor 'install' (even GNU) is that you can't 98444dda7b2Smrg# specify the program used to strip binaries. This is especially 98544dda7b2Smrg# annoying in cross-compiling environments, where the build's strip 98644dda7b2Smrg# is unlikely to handle the host's binaries. 98744dda7b2Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 988fc544a13Smrg# always use install-sh in "make install-strip", and initialize 98944dda7b2Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 99044dda7b2SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 99144dda7b2Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 992fc544a13Smrg# Installed binaries are usually stripped using 'strip' when the user 993fc544a13Smrg# run "make install-strip". However 'strip' might not be the right 99444dda7b2Smrg# tool to use in cross-compilation environments, therefore Automake 995fc544a13Smrg# will honor the 'STRIP' environment variable to overrule this program. 996fc544a13Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 99744dda7b2Smrgif test "$cross_compiling" != no; then 99844dda7b2Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9997a3b38f7Smrgfi 100044dda7b2SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 100144dda7b2SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1002ff559fabSmrg 1003fc544a13Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 100444dda7b2Smrg# 100544dda7b2Smrg# This file is free software; the Free Software Foundation 100644dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 100744dda7b2Smrg# with or without modifications, as long as this notice is preserved. 1008ff559fabSmrg 100944dda7b2Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 101044dda7b2Smrg# --------------------------- 101144dda7b2Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 101244dda7b2Smrg# This macro is traced by Automake. 101344dda7b2SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1014ff559fabSmrg 101544dda7b2Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1016fc544a13Smrg# -------------------------- 101744dda7b2Smrg# Public sister of _AM_SUBST_NOTMAKE. 101844dda7b2SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1019ff559fabSmrg 102044dda7b2Smrg# Check how to create a tarball. -*- Autoconf -*- 1021ff559fabSmrg 1022fc544a13Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 102344dda7b2Smrg# 102444dda7b2Smrg# This file is free software; the Free Software Foundation 102544dda7b2Smrg# gives unlimited permission to copy and/or distribute it, 102644dda7b2Smrg# with or without modifications, as long as this notice is preserved. 1027ff559fabSmrg 102844dda7b2Smrg# _AM_PROG_TAR(FORMAT) 102944dda7b2Smrg# -------------------- 103044dda7b2Smrg# Check how to create a tarball in format FORMAT. 1031fc544a13Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 103244dda7b2Smrg# 103344dda7b2Smrg# Substitute a variable $(am__tar) that is a command 103444dda7b2Smrg# writing to stdout a FORMAT-tarball containing the directory 103544dda7b2Smrg# $tardir. 103644dda7b2Smrg# tardir=directory && $(am__tar) > result.tar 103744dda7b2Smrg# 103844dda7b2Smrg# Substitute a variable $(am__untar) that extract such 103944dda7b2Smrg# a tarball read from stdin. 104044dda7b2Smrg# $(am__untar) < result.tar 1041862f5301Smrg# 1042fc544a13SmrgAC_DEFUN([_AM_PROG_TAR], 1043fc544a13Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1044fc544a13Smrg# in the wild :-( We should find a proper way to deprecate it ... 1045fc544a13SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1046ff559fabSmrg 1047fc544a13Smrg# We'll loop over all known methods to create a tar archive until one works. 1048fc544a13Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1049ff559fabSmrg 1050fc544a13Smrgm4_if([$1], [v7], 1051fc544a13Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1052fc544a13Smrg 1053fc544a13Smrg [m4_case([$1], 1054fc544a13Smrg [ustar], 1055fc544a13Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1056fc544a13Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1057fc544a13Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1058fc544a13Smrg # and bug#13588). 1059fc544a13Smrg am_max_uid=2097151 # 2^21 - 1 1060fc544a13Smrg am_max_gid=$am_max_uid 1061fc544a13Smrg # The $UID and $GID variables are not portable, so we need to resort 1062fc544a13Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1063fc544a13Smrg # below are definitely unexpected, so allow the users to see them 1064fc544a13Smrg # (that is, avoid stderr redirection). 1065fc544a13Smrg am_uid=`id -u || echo unknown` 1066fc544a13Smrg am_gid=`id -g || echo unknown` 1067fc544a13Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1068fc544a13Smrg if test $am_uid -le $am_max_uid; then 1069fc544a13Smrg AC_MSG_RESULT([yes]) 1070fc544a13Smrg else 1071fc544a13Smrg AC_MSG_RESULT([no]) 1072fc544a13Smrg _am_tools=none 1073fc544a13Smrg fi 1074fc544a13Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1075fc544a13Smrg if test $am_gid -le $am_max_gid; then 1076fc544a13Smrg AC_MSG_RESULT([yes]) 1077fc544a13Smrg else 1078fc544a13Smrg AC_MSG_RESULT([no]) 1079fc544a13Smrg _am_tools=none 1080fc544a13Smrg fi], 1081ff559fabSmrg 1082fc544a13Smrg [pax], 1083fc544a13Smrg [], 1084ff559fabSmrg 1085fc544a13Smrg [m4_fatal([Unknown tar format])]) 1086ff559fabSmrg 1087fc544a13Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1088ff559fabSmrg 1089fc544a13Smrg # Go ahead even if we have the value already cached. We do so because we 1090fc544a13Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1091fc544a13Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 109244dda7b2Smrg 1093fc544a13Smrg for _am_tool in $_am_tools; do 1094fc544a13Smrg case $_am_tool in 1095fc544a13Smrg gnutar) 1096fc544a13Smrg for _am_tar in tar gnutar gtar; do 1097fc544a13Smrg AM_RUN_LOG([$_am_tar --version]) && break 1098fc544a13Smrg done 1099fc544a13Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1100fc544a13Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1101fc544a13Smrg am__untar="$_am_tar -xf -" 1102fc544a13Smrg ;; 1103fc544a13Smrg plaintar) 1104fc544a13Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1105fc544a13Smrg # ustar tarball either. 1106fc544a13Smrg (tar --version) >/dev/null 2>&1 && continue 1107fc544a13Smrg am__tar='tar chf - "$$tardir"' 1108fc544a13Smrg am__tar_='tar chf - "$tardir"' 1109fc544a13Smrg am__untar='tar xf -' 1110fc544a13Smrg ;; 1111fc544a13Smrg pax) 1112fc544a13Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1113fc544a13Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1114fc544a13Smrg am__untar='pax -r' 1115fc544a13Smrg ;; 1116fc544a13Smrg cpio) 1117fc544a13Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1118fc544a13Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1119fc544a13Smrg am__untar='cpio -i -H $1 -d' 1120fc544a13Smrg ;; 1121fc544a13Smrg none) 1122fc544a13Smrg am__tar=false 1123fc544a13Smrg am__tar_=false 1124fc544a13Smrg am__untar=false 1125fc544a13Smrg ;; 1126fc544a13Smrg esac 1127ff559fabSmrg 1128fc544a13Smrg # If the value was cached, stop now. We just wanted to have am__tar 1129fc544a13Smrg # and am__untar set. 1130fc544a13Smrg test -n "${am_cv_prog_tar_$1}" && break 1131fc544a13Smrg 1132fc544a13Smrg # tar/untar a dummy directory, and stop if the command works. 1133fc544a13Smrg rm -rf conftest.dir 1134fc544a13Smrg mkdir conftest.dir 1135fc544a13Smrg echo GrepMe > conftest.dir/file 1136fc544a13Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1137fc544a13Smrg rm -rf conftest.dir 1138fc544a13Smrg if test -s conftest.tar; then 1139fc544a13Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1140fc544a13Smrg AM_RUN_LOG([cat conftest.dir/file]) 1141fc544a13Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1142fc544a13Smrg fi 1143fc544a13Smrg done 1144fc544a13Smrg rm -rf conftest.dir 1145862f5301Smrg 1146fc544a13Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1147fc544a13Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1148862f5301Smrg 1149fc544a13SmrgAC_SUBST([am__tar]) 1150fc544a13SmrgAC_SUBST([am__untar]) 1151fc544a13Smrg]) # _AM_PROG_TAR 1152ff559fabSmrg 1153862f5301Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1154862f5301Smrg# 1155862f5301Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1156fc544a13Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1157fc544a13Smrg# Foundation, Inc. 1158862f5301Smrg# Written by Gordon Matzigkeit, 1996 1159862f5301Smrg# 1160862f5301Smrg# This file is free software; the Free Software Foundation gives 1161862f5301Smrg# unlimited permission to copy and/or distribute it, with or without 1162862f5301Smrg# modifications, as long as this notice is preserved. 1163ff559fabSmrg 1164862f5301Smrgm4_define([_LT_COPYING], [dnl 1165862f5301Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1166fc544a13Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1167fc544a13Smrg# Foundation, Inc. 1168862f5301Smrg# Written by Gordon Matzigkeit, 1996 116944dda7b2Smrg# 1170862f5301Smrg# This file is part of GNU Libtool. 1171862f5301Smrg# 1172862f5301Smrg# GNU Libtool is free software; you can redistribute it and/or 1173862f5301Smrg# modify it under the terms of the GNU General Public License as 1174862f5301Smrg# published by the Free Software Foundation; either version 2 of 1175862f5301Smrg# the License, or (at your option) any later version. 1176862f5301Smrg# 1177862f5301Smrg# As a special exception to the GNU General Public License, 1178862f5301Smrg# if you distribute this file as part of a program or library that 1179862f5301Smrg# is built using GNU Libtool, you may include this file under the 1180862f5301Smrg# same distribution terms that you use for the rest of that program. 1181862f5301Smrg# 1182862f5301Smrg# GNU Libtool is distributed in the hope that it will be useful, 1183862f5301Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1184862f5301Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1185862f5301Smrg# GNU General Public License for more details. 1186862f5301Smrg# 1187862f5301Smrg# You should have received a copy of the GNU General Public License 1188862f5301Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 1189862f5301Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 1190862f5301Smrg# obtained by writing to the Free Software Foundation, Inc., 1191862f5301Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1192862f5301Smrg]) 11937a3b38f7Smrg 1194862f5301Smrg# serial 57 LT_INIT 1195ff559fabSmrg 1196ff559fabSmrg 1197862f5301Smrg# LT_PREREQ(VERSION) 1198862f5301Smrg# ------------------ 1199862f5301Smrg# Complain and exit if this libtool version is less that VERSION. 1200862f5301Smrgm4_defun([LT_PREREQ], 1201862f5301Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 1202862f5301Smrg [m4_default([$3], 1203862f5301Smrg [m4_fatal([Libtool version $1 or higher is required], 1204862f5301Smrg 63)])], 1205862f5301Smrg [$2])]) 1206ff559fabSmrg 1207ff559fabSmrg 1208862f5301Smrg# _LT_CHECK_BUILDDIR 1209862f5301Smrg# ------------------ 1210862f5301Smrg# Complain if the absolute build directory name contains unusual characters 1211862f5301Smrgm4_defun([_LT_CHECK_BUILDDIR], 1212862f5301Smrg[case `pwd` in 1213862f5301Smrg *\ * | *\ *) 1214862f5301Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1215862f5301Smrgesac 1216862f5301Smrg]) 1217ff559fabSmrg 1218ff559fabSmrg 1219862f5301Smrg# LT_INIT([OPTIONS]) 1220862f5301Smrg# ------------------ 1221862f5301SmrgAC_DEFUN([LT_INIT], 1222862f5301Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 1223862f5301SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1224862f5301SmrgAC_BEFORE([$0], [LT_LANG])dnl 1225862f5301SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 1226862f5301SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 1227862f5301Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 1228ff559fabSmrg 1229862f5301Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 1230862f5301Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1231862f5301Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1232862f5301Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1233862f5301Smrgdnl unless we require an AC_DEFUNed macro: 1234862f5301SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1235862f5301SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1236862f5301SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1237862f5301SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1238862f5301Smrgm4_require([_LT_PROG_LTMAIN])dnl 1239ff559fabSmrg 1240862f5301Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1241ff559fabSmrg 1242862f5301Smrgdnl Parse OPTIONS 1243862f5301Smrg_LT_SET_OPTIONS([$0], [$1]) 1244ff559fabSmrg 1245862f5301Smrg# This can be used to rebuild libtool when needed 1246862f5301SmrgLIBTOOL_DEPS="$ltmain" 1247ff559fabSmrg 1248862f5301Smrg# Always use our own libtool. 1249862f5301SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1250862f5301SmrgAC_SUBST(LIBTOOL)dnl 1251ff559fabSmrg 1252862f5301Smrg_LT_SETUP 1253ff559fabSmrg 1254862f5301Smrg# Only expand once: 1255862f5301Smrgm4_define([LT_INIT]) 1256862f5301Smrg])# LT_INIT 1257ff559fabSmrg 1258862f5301Smrg# Old names: 1259862f5301SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1260862f5301SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1261862f5301Smrgdnl aclocal-1.4 backwards compatibility: 1262862f5301Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1263862f5301Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1264ff559fabSmrg 1265ff559fabSmrg 1266862f5301Smrg# _LT_CC_BASENAME(CC) 1267862f5301Smrg# ------------------- 1268862f5301Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1269862f5301Smrgm4_defun([_LT_CC_BASENAME], 1270862f5301Smrg[for cc_temp in $1""; do 1271862f5301Smrg case $cc_temp in 1272862f5301Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1273862f5301Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1274862f5301Smrg \-*) ;; 1275862f5301Smrg *) break;; 1276862f5301Smrg esac 1277862f5301Smrgdone 1278862f5301Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1279862f5301Smrg]) 1280ff559fabSmrg 1281ff559fabSmrg 1282862f5301Smrg# _LT_FILEUTILS_DEFAULTS 1283862f5301Smrg# ---------------------- 1284862f5301Smrg# It is okay to use these file commands and assume they have been set 1285862f5301Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1286862f5301Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1287862f5301Smrg[: ${CP="cp -f"} 1288862f5301Smrg: ${MV="mv -f"} 1289862f5301Smrg: ${RM="rm -f"} 1290862f5301Smrg])# _LT_FILEUTILS_DEFAULTS 1291ff559fabSmrg 1292ff559fabSmrg 1293862f5301Smrg# _LT_SETUP 1294862f5301Smrg# --------- 1295862f5301Smrgm4_defun([_LT_SETUP], 1296862f5301Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1297862f5301SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1298862f5301SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1299862f5301SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 130044dda7b2Smrg 1301fc544a13Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1302fc544a13Smrgdnl 1303862f5301Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1304862f5301Smrg_LT_DECL([], [host], [0])dnl 1305862f5301Smrg_LT_DECL([], [host_os], [0])dnl 1306862f5301Smrgdnl 1307862f5301Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1308862f5301Smrg_LT_DECL([], [build], [0])dnl 1309862f5301Smrg_LT_DECL([], [build_os], [0])dnl 1310862f5301Smrgdnl 1311862f5301SmrgAC_REQUIRE([AC_PROG_CC])dnl 1312862f5301SmrgAC_REQUIRE([LT_PATH_LD])dnl 1313862f5301SmrgAC_REQUIRE([LT_PATH_NM])dnl 1314862f5301Smrgdnl 1315862f5301SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1316862f5301Smrgtest -z "$LN_S" && LN_S="ln -s" 1317862f5301Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1318862f5301Smrgdnl 1319862f5301SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1320862f5301Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1321862f5301Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1322862f5301Smrgdnl 1323862f5301Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1324862f5301Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1325862f5301Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1326862f5301Smrgm4_require([_LT_CMD_RELOAD])dnl 1327862f5301Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1328862f5301Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1329862f5301Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1330862f5301Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1331862f5301Smrgm4_require([_LT_WITH_SYSROOT])dnl 1332862f5301Smrg 1333862f5301Smrg_LT_CONFIG_LIBTOOL_INIT([ 1334862f5301Smrg# See if we are running on zsh, and set the options which allow our 1335862f5301Smrg# commands through without removal of \ escapes INIT. 1336862f5301Smrgif test -n "\${ZSH_VERSION+set}" ; then 1337862f5301Smrg setopt NO_GLOB_SUBST 1338862f5301Smrgfi 1339862f5301Smrg]) 1340862f5301Smrgif test -n "${ZSH_VERSION+set}" ; then 1341862f5301Smrg setopt NO_GLOB_SUBST 134244dda7b2Smrgfi 1343ff559fabSmrg 1344862f5301Smrg_LT_CHECK_OBJDIR 1345ff559fabSmrg 1346862f5301Smrgm4_require([_LT_TAG_COMPILER])dnl 134744dda7b2Smrg 1348862f5301Smrgcase $host_os in 1349862f5301Smrgaix3*) 1350862f5301Smrg # AIX sometimes has problems with the GCC collect2 program. For some 1351862f5301Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 1352862f5301Smrg # vanish in a puff of smoke. 1353862f5301Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 1354862f5301Smrg COLLECT_NAMES= 1355862f5301Smrg export COLLECT_NAMES 1356862f5301Smrg fi 1357862f5301Smrg ;; 1358862f5301Smrgesac 135944dda7b2Smrg 1360862f5301Smrg# Global variables: 1361862f5301Smrgofile=libtool 1362862f5301Smrgcan_build_shared=yes 1363ff559fabSmrg 1364862f5301Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 1365862f5301Smrg# which needs '.lib'). 1366862f5301Smrglibext=a 136744dda7b2Smrg 1368862f5301Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1369ff559fabSmrg 1370862f5301Smrgold_CC="$CC" 1371862f5301Smrgold_CFLAGS="$CFLAGS" 137244dda7b2Smrg 1373862f5301Smrg# Set sane defaults for various variables 1374862f5301Smrgtest -z "$CC" && CC=cc 1375862f5301Smrgtest -z "$LTCC" && LTCC=$CC 1376862f5301Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 1377862f5301Smrgtest -z "$LD" && LD=ld 1378862f5301Smrgtest -z "$ac_objext" && ac_objext=o 1379ff559fabSmrg 1380862f5301Smrg_LT_CC_BASENAME([$compiler]) 1381ff559fabSmrg 1382862f5301Smrg# Only perform the check for file, if the check method requires it 1383862f5301Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 1384862f5301Smrgcase $deplibs_check_method in 1385862f5301Smrgfile_magic*) 1386862f5301Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1387862f5301Smrg _LT_PATH_MAGIC 1388862f5301Smrg fi 1389862f5301Smrg ;; 1390862f5301Smrgesac 1391ff559fabSmrg 1392862f5301Smrg# Use C for the default configuration in the libtool script 1393862f5301SmrgLT_SUPPORTED_TAG([CC]) 1394862f5301Smrg_LT_LANG_C_CONFIG 1395862f5301Smrg_LT_LANG_DEFAULT_CONFIG 1396862f5301Smrg_LT_CONFIG_COMMANDS 1397862f5301Smrg])# _LT_SETUP 1398ff559fabSmrg 139944dda7b2Smrg 1400862f5301Smrg# _LT_PREPARE_SED_QUOTE_VARS 1401862f5301Smrg# -------------------------- 1402862f5301Smrg# Define a few sed substitution that help us do robust quoting. 1403862f5301Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 1404862f5301Smrg[# Backslashify metacharacters that are still active within 1405862f5301Smrg# double-quoted strings. 1406862f5301Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1407ff559fabSmrg 1408862f5301Smrg# Same as above, but do not quote variable references. 1409862f5301Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 141044dda7b2Smrg 1411862f5301Smrg# Sed substitution to delay expansion of an escaped shell variable in a 1412862f5301Smrg# double_quote_subst'ed string. 1413862f5301Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1414ff559fabSmrg 1415862f5301Smrg# Sed substitution to delay expansion of an escaped single quote. 1416862f5301Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 141744dda7b2Smrg 1418862f5301Smrg# Sed substitution to avoid accidental globbing in evaled expressions 1419862f5301Smrgno_glob_subst='s/\*/\\\*/g' 1420862f5301Smrg]) 142144dda7b2Smrg 1422862f5301Smrg# _LT_PROG_LTMAIN 1423862f5301Smrg# --------------- 1424862f5301Smrg# Note that this code is called both from `configure', and `config.status' 1425862f5301Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 1426862f5301Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 1427862f5301Smrg# so we pass a copy along to make sure it has a sensible value anyway. 1428862f5301Smrgm4_defun([_LT_PROG_LTMAIN], 1429862f5301Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 1430862f5301Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 1431862f5301Smrgltmain="$ac_aux_dir/ltmain.sh" 1432862f5301Smrg])# _LT_PROG_LTMAIN 1433ff559fabSmrg 1434ff559fabSmrg 1435ff559fabSmrg 1436862f5301Smrg# So that we can recreate a full libtool script including additional 1437862f5301Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 1438862f5301Smrg# in macros and then make a single call at the end using the `libtool' 1439862f5301Smrg# label. 1440ff559fabSmrg 1441ff559fabSmrg 1442862f5301Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 1443862f5301Smrg# ---------------------------------------- 1444862f5301Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1445862f5301Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 1446862f5301Smrg[m4_ifval([$1], 1447862f5301Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 1448862f5301Smrg [$1 1449862f5301Smrg])])]) 1450ff559fabSmrg 1451862f5301Smrg# Initialize. 1452862f5301Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1453ff559fabSmrg 1454ff559fabSmrg 1455862f5301Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 1456862f5301Smrg# ------------------------------ 1457862f5301Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 1458862f5301Smrgm4_define([_LT_CONFIG_LIBTOOL], 1459862f5301Smrg[m4_ifval([$1], 1460862f5301Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 1461862f5301Smrg [$1 1462862f5301Smrg])])]) 1463ff559fabSmrg 1464862f5301Smrg# Initialize. 1465862f5301Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1466ff559fabSmrg 1467ff559fabSmrg 1468862f5301Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 1469862f5301Smrg# ----------------------------------------------------- 1470862f5301Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 1471862f5301Smrg[_LT_CONFIG_LIBTOOL([$1]) 1472862f5301Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 1473862f5301Smrg]) 1474ff559fabSmrg 1475ff559fabSmrg 1476862f5301Smrg# _LT_FORMAT_COMMENT([COMMENT]) 1477862f5301Smrg# ----------------------------- 1478862f5301Smrg# Add leading comment marks to the start of each line, and a trailing 1479862f5301Smrg# full-stop to the whole comment if one is not present already. 1480862f5301Smrgm4_define([_LT_FORMAT_COMMENT], 1481862f5301Smrg[m4_ifval([$1], [ 1482862f5301Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 1483862f5301Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 1484862f5301Smrg)]) 1485ff559fabSmrg 1486ff559fabSmrg 1487ff559fabSmrg 1488ff559fabSmrg 1489ff559fabSmrg 1490862f5301Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 1491862f5301Smrg# ------------------------------------------------------------------- 1492862f5301Smrg# CONFIGNAME is the name given to the value in the libtool script. 1493862f5301Smrg# VARNAME is the (base) name used in the configure script. 1494862f5301Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 1495862f5301Smrg# VARNAME. Any other value will be used directly. 1496862f5301Smrgm4_define([_LT_DECL], 1497862f5301Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 1498862f5301Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 1499862f5301Smrg [m4_ifval([$1], [$1], [$2])]) 1500862f5301Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 1501862f5301Smrg m4_ifval([$4], 1502862f5301Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 1503862f5301Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 1504862f5301Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 1505862f5301Smrg]) 1506ff559fabSmrg 1507ff559fabSmrg 1508862f5301Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 1509862f5301Smrg# -------------------------------------------------------- 1510862f5301Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1511ff559fabSmrg 1512ff559fabSmrg 1513862f5301Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 1514862f5301Smrg# ------------------------------------------------ 1515862f5301Smrgm4_define([lt_decl_tag_varnames], 1516862f5301Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 1517862f5301Smrg 1518862f5301Smrg 1519862f5301Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 1520862f5301Smrg# --------------------------------------------------------- 1521862f5301Smrgm4_define([_lt_decl_filter], 1522862f5301Smrg[m4_case([$#], 1523862f5301Smrg [0], [m4_fatal([$0: too few arguments: $#])], 1524862f5301Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 1525862f5301Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 1526862f5301Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 1527862f5301Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 152844dda7b2Smrg]) 1529ff559fabSmrg 1530ff559fabSmrg 1531862f5301Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 1532862f5301Smrg# -------------------------------------------------- 1533862f5301Smrgm4_define([lt_decl_quote_varnames], 1534862f5301Smrg[_lt_decl_filter([value], [1], $@)]) 15357a3b38f7Smrg 1536ff559fabSmrg 1537862f5301Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 1538862f5301Smrg# --------------------------------------------------- 1539862f5301Smrgm4_define([lt_decl_dquote_varnames], 1540862f5301Smrg[_lt_decl_filter([value], [2], $@)]) 1541ff559fabSmrg 1542ff559fabSmrg 1543862f5301Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 1544862f5301Smrg# --------------------------------------------------- 1545862f5301Smrgm4_define([lt_decl_varnames_tagged], 1546862f5301Smrg[m4_assert([$# <= 2])dnl 1547862f5301Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 1548862f5301Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 1549862f5301Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 1550862f5301Smrgm4_define([_lt_decl_varnames_tagged], 1551862f5301Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 15527a3b38f7Smrg 15537a3b38f7Smrg 1554862f5301Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 1555862f5301Smrg# ------------------------------------------------ 1556862f5301Smrgm4_define([lt_decl_all_varnames], 1557862f5301Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 1558862f5301Smrg m4_if([$2], [], 1559862f5301Smrg m4_quote(lt_decl_varnames), 1560862f5301Smrg m4_quote(m4_shift($@))))[]dnl 1561862f5301Smrg]) 1562862f5301Smrgm4_define([_lt_decl_all_varnames], 1563862f5301Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 1564862f5301Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 1565862f5301Smrg]) 15667a3b38f7Smrg 15677a3b38f7Smrg 1568862f5301Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 1569862f5301Smrg# ------------------------------------ 1570862f5301Smrg# Quote a variable value, and forward it to `config.status' so that its 1571862f5301Smrg# declaration there will have the same value as in `configure'. VARNAME 1572862f5301Smrg# must have a single quote delimited value for this to work. 1573862f5301Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 1574862f5301Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1575ff559fabSmrg 15767a3b38f7Smrg 1577862f5301Smrg# _LT_CONFIG_STATUS_DECLARATIONS 1578862f5301Smrg# ------------------------------ 1579862f5301Smrg# We delimit libtool config variables with single quotes, so when 1580862f5301Smrg# we write them to config.status, we have to be sure to quote all 1581862f5301Smrg# embedded single quotes properly. In configure, this macro expands 1582862f5301Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1583862f5301Smrg# 1584862f5301Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 1585862f5301Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 1586862f5301Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 1587862f5301Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 15887a3b38f7Smrg 158944dda7b2Smrg 1590862f5301Smrg# _LT_LIBTOOL_TAGS 1591862f5301Smrg# ---------------- 1592862f5301Smrg# Output comment and list of tags supported by the script 1593862f5301Smrgm4_defun([_LT_LIBTOOL_TAGS], 1594862f5301Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 1595862f5301Smrgavailable_tags="_LT_TAGS"dnl 1596862f5301Smrg]) 1597ff559fabSmrg 1598ff559fabSmrg 1599862f5301Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 1600862f5301Smrg# ----------------------------------- 1601862f5301Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 1602862f5301Smrg# expand to a commented shell variable setting: 160344dda7b2Smrg# 1604862f5301Smrg# # Some comment about what VAR is for. 1605862f5301Smrg# visible_name=$lt_internal_name 1606862f5301Smrgm4_define([_LT_LIBTOOL_DECLARE], 1607862f5301Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 1608862f5301Smrg [description])))[]dnl 1609862f5301Smrgm4_pushdef([_libtool_name], 1610862f5301Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 1611862f5301Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 1612862f5301Smrg [0], [_libtool_name=[$]$1], 1613862f5301Smrg [1], [_libtool_name=$lt_[]$1], 1614862f5301Smrg [2], [_libtool_name=$lt_[]$1], 1615862f5301Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 1616862f5301Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 161744dda7b2Smrg]) 1618ff559fabSmrg 1619ff559fabSmrg 1620862f5301Smrg# _LT_LIBTOOL_CONFIG_VARS 1621862f5301Smrg# ----------------------- 1622862f5301Smrg# Produce commented declarations of non-tagged libtool config variables 1623862f5301Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 1624862f5301Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 1625862f5301Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 1626862f5301Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 1627862f5301Smrg[m4_foreach([_lt_var], 1628862f5301Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 1629862f5301Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1630ff559fabSmrg 1631ff559fabSmrg 1632862f5301Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 1633862f5301Smrg# ------------------------- 1634862f5301Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 1635862f5301Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 1636862f5301Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1637ff559fabSmrg 1638ff559fabSmrg 1639862f5301Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 1640862f5301Smrg# ------------------------------ 1641862f5301Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1642ff559fabSmrg 1643ff559fabSmrg 1644862f5301Smrg# _LT_CONFIG_COMMANDS 1645862f5301Smrg# ------------------- 1646862f5301Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 1647862f5301Smrg# variables for single and double quote escaping we saved from calls 1648862f5301Smrg# to _LT_DECL, we can put quote escaped variables declarations 1649862f5301Smrg# into `config.status', and then the shell code to quote escape them in 1650862f5301Smrg# for loops in `config.status'. Finally, any additional code accumulated 1651862f5301Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 1652862f5301Smrgm4_defun([_LT_CONFIG_COMMANDS], 1653862f5301Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 1654862f5301Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 1655862f5301Smrg dnl instead of duplicating it all over again into config.status, 1656862f5301Smrg dnl then we will have config.status run $CONFIG_LT later, so it 1657862f5301Smrg dnl needs to know what name is stored there: 1658862f5301Smrg [AC_CONFIG_COMMANDS([libtool], 1659862f5301Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 1660862f5301Smrg dnl If the libtool generation code is destined for config.status, 1661862f5301Smrg dnl expand the accumulated commands and init code now: 1662862f5301Smrg [AC_CONFIG_COMMANDS([libtool], 1663862f5301Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 1664862f5301Smrg])#_LT_CONFIG_COMMANDS 1665ff559fabSmrg 1666ff559fabSmrg 1667862f5301Smrg# Initialize. 1668862f5301Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 1669862f5301Smrg[ 167044dda7b2Smrg 1671862f5301Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1672862f5301Smrg# if CDPATH is set. 1673862f5301Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 167444dda7b2Smrg 1675862f5301Smrgsed_quote_subst='$sed_quote_subst' 1676862f5301Smrgdouble_quote_subst='$double_quote_subst' 1677862f5301Smrgdelay_variable_subst='$delay_variable_subst' 1678862f5301Smrg_LT_CONFIG_STATUS_DECLARATIONS 1679862f5301SmrgLTCC='$LTCC' 1680862f5301SmrgLTCFLAGS='$LTCFLAGS' 1681862f5301Smrgcompiler='$compiler_DEFAULT' 168244dda7b2Smrg 1683862f5301Smrg# A function that is used when there is no print builtin or printf. 1684862f5301Smrgfunc_fallback_echo () 1685862f5301Smrg{ 1686862f5301Smrg eval 'cat <<_LTECHO_EOF 1687862f5301Smrg\$[]1 1688862f5301Smrg_LTECHO_EOF' 1689862f5301Smrg} 169044dda7b2Smrg 1691862f5301Smrg# Quote evaled strings. 1692862f5301Smrgfor var in lt_decl_all_varnames([[ \ 1693862f5301Smrg]], lt_decl_quote_varnames); do 1694862f5301Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1695862f5301Smrg *[[\\\\\\\`\\"\\\$]]*) 1696862f5301Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 1697862f5301Smrg ;; 1698862f5301Smrg *) 1699862f5301Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1700862f5301Smrg ;; 1701862f5301Smrg esac 170244dda7b2Smrgdone 1703ff559fabSmrg 1704862f5301Smrg# Double-quote double-evaled strings. 1705862f5301Smrgfor var in lt_decl_all_varnames([[ \ 1706862f5301Smrg]], lt_decl_dquote_varnames); do 1707862f5301Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 1708862f5301Smrg *[[\\\\\\\`\\"\\\$]]*) 1709862f5301Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 1710862f5301Smrg ;; 1711862f5301Smrg *) 1712862f5301Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 1713862f5301Smrg ;; 1714862f5301Smrg esac 1715862f5301Smrgdone 1716ff559fabSmrg 1717862f5301Smrg_LT_OUTPUT_LIBTOOL_INIT 1718862f5301Smrg]) 17197a3b38f7Smrg 1720862f5301Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 1721862f5301Smrg# ------------------------------------ 1722862f5301Smrg# Generate a child script FILE with all initialization necessary to 1723862f5301Smrg# reuse the environment learned by the parent script, and make the 1724862f5301Smrg# file executable. If COMMENT is supplied, it is inserted after the 1725862f5301Smrg# `#!' sequence but before initialization text begins. After this 1726862f5301Smrg# macro, additional text can be appended to FILE to form the body of 1727862f5301Smrg# the child script. The macro ends with non-zero status if the 1728862f5301Smrg# file could not be fully written (such as if the disk is full). 1729862f5301Smrgm4_ifdef([AS_INIT_GENERATED], 1730862f5301Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 1731862f5301Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 1732862f5301Smrg[m4_require([AS_PREPARE])]dnl 1733862f5301Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 1734862f5301Smrg[lt_write_fail=0 1735862f5301Smrgcat >$1 <<_ASEOF || lt_write_fail=1 1736862f5301Smrg#! $SHELL 1737862f5301Smrg# Generated by $as_me. 1738862f5301Smrg$2 1739862f5301SmrgSHELL=\${CONFIG_SHELL-$SHELL} 1740862f5301Smrgexport SHELL 1741862f5301Smrg_ASEOF 1742862f5301Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 1743862f5301SmrgAS_SHELL_SANITIZE 1744862f5301Smrg_AS_PREPARE 1745862f5301Smrgexec AS_MESSAGE_FD>&1 1746862f5301Smrg_ASEOF 1747862f5301Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 1748862f5301Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 17497a3b38f7Smrg 1750862f5301Smrg# LT_OUTPUT 175144dda7b2Smrg# --------- 1752862f5301Smrg# This macro allows early generation of the libtool script (before 1753862f5301Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 1754862f5301Smrg# tests. 1755862f5301SmrgAC_DEFUN([LT_OUTPUT], 1756862f5301Smrg[: ${CONFIG_LT=./config.lt} 1757862f5301SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 1758862f5301Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 1759862f5301Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 1760ff559fabSmrg 1761862f5301Smrgcat >>"$CONFIG_LT" <<\_LTEOF 1762862f5301Smrglt_cl_silent=false 1763862f5301Smrgexec AS_MESSAGE_LOG_FD>>config.log 1764862f5301Smrg{ 1765862f5301Smrg echo 1766862f5301Smrg AS_BOX([Running $as_me.]) 1767862f5301Smrg} >&AS_MESSAGE_LOG_FD 1768ff559fabSmrg 1769862f5301Smrglt_cl_help="\ 1770862f5301Smrg\`$as_me' creates a local libtool stub from the current configuration, 1771862f5301Smrgfor use in further configure time tests before the real libtool is 1772862f5301Smrggenerated. 1773ff559fabSmrg 1774862f5301SmrgUsage: $[0] [[OPTIONS]] 1775ff559fabSmrg 1776862f5301Smrg -h, --help print this help, then exit 1777862f5301Smrg -V, --version print version number, then exit 1778862f5301Smrg -q, --quiet do not print progress messages 1779862f5301Smrg -d, --debug don't remove temporary files 1780ff559fabSmrg 1781862f5301SmrgReport bugs to <bug-libtool@gnu.org>." 1782ff559fabSmrg 1783862f5301Smrglt_cl_version="\ 1784862f5301Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 1785862f5301Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 1786862f5301Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1787ff559fabSmrg 1788fc544a13SmrgCopyright (C) 2011 Free Software Foundation, Inc. 1789862f5301SmrgThis config.lt script is free software; the Free Software Foundation 1790862f5301Smrggives unlimited permision to copy, distribute and modify it." 1791ff559fabSmrg 1792862f5301Smrgwhile test $[#] != 0 1793862f5301Smrgdo 1794862f5301Smrg case $[1] in 1795862f5301Smrg --version | --v* | -V ) 1796862f5301Smrg echo "$lt_cl_version"; exit 0 ;; 1797862f5301Smrg --help | --h* | -h ) 1798862f5301Smrg echo "$lt_cl_help"; exit 0 ;; 1799862f5301Smrg --debug | --d* | -d ) 1800862f5301Smrg debug=: ;; 1801862f5301Smrg --quiet | --q* | --silent | --s* | -q ) 1802862f5301Smrg lt_cl_silent=: ;; 1803ff559fabSmrg 1804862f5301Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 1805862f5301SmrgTry \`$[0] --help' for more information.]) ;; 1806ff559fabSmrg 1807862f5301Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 1808862f5301SmrgTry \`$[0] --help' for more information.]) ;; 1809862f5301Smrg esac 1810862f5301Smrg shift 1811862f5301Smrgdone 1812ff559fabSmrg 1813862f5301Smrgif $lt_cl_silent; then 1814862f5301Smrg exec AS_MESSAGE_FD>/dev/null 1815862f5301Smrgfi 1816862f5301Smrg_LTEOF 1817ff559fabSmrg 1818862f5301Smrgcat >>"$CONFIG_LT" <<_LTEOF 1819862f5301Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 1820862f5301Smrg_LTEOF 1821ff559fabSmrg 1822862f5301Smrgcat >>"$CONFIG_LT" <<\_LTEOF 1823862f5301SmrgAC_MSG_NOTICE([creating $ofile]) 1824862f5301Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 1825862f5301SmrgAS_EXIT(0) 1826862f5301Smrg_LTEOF 1827862f5301Smrgchmod +x "$CONFIG_LT" 1828ff559fabSmrg 1829862f5301Smrg# configure is writing to config.log, but config.lt does its own redirection, 1830862f5301Smrg# appending to config.log, which fails on DOS, as config.log is still kept 1831862f5301Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 1832862f5301Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 1833862f5301Smrglt_cl_success=: 1834862f5301Smrgtest "$silent" = yes && 1835862f5301Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 1836862f5301Smrgexec AS_MESSAGE_LOG_FD>/dev/null 1837862f5301Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 1838862f5301Smrgexec AS_MESSAGE_LOG_FD>>config.log 1839862f5301Smrg$lt_cl_success || AS_EXIT(1) 1840862f5301Smrg])# LT_OUTPUT 1841ff559fabSmrg 1842ff559fabSmrg 1843862f5301Smrg# _LT_CONFIG(TAG) 184444dda7b2Smrg# --------------- 1845862f5301Smrg# If TAG is the built-in tag, create an initial libtool script with a 1846862f5301Smrg# default configuration from the untagged config vars. Otherwise add code 1847862f5301Smrg# to config.status for appending the configuration named by TAG from the 1848862f5301Smrg# matching tagged config vars. 1849862f5301Smrgm4_defun([_LT_CONFIG], 1850862f5301Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1851862f5301Smrg_LT_CONFIG_SAVE_COMMANDS([ 1852862f5301Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 1853862f5301Smrg m4_if(_LT_TAG, [C], [ 1854862f5301Smrg # See if we are running on zsh, and set the options which allow our 1855862f5301Smrg # commands through without removal of \ escapes. 1856862f5301Smrg if test -n "${ZSH_VERSION+set}" ; then 1857862f5301Smrg setopt NO_GLOB_SUBST 1858862f5301Smrg fi 1859ff559fabSmrg 1860862f5301Smrg cfgfile="${ofile}T" 1861862f5301Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 1862862f5301Smrg $RM "$cfgfile" 1863ff559fabSmrg 1864862f5301Smrg cat <<_LT_EOF >> "$cfgfile" 1865862f5301Smrg#! $SHELL 18667a3b38f7Smrg 1867862f5301Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 1868862f5301Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 1869862f5301Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 1870862f5301Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1871862f5301Smrg# 1872862f5301Smrg_LT_COPYING 1873862f5301Smrg_LT_LIBTOOL_TAGS 1874ff559fabSmrg 1875862f5301Smrg# ### BEGIN LIBTOOL CONFIG 1876862f5301Smrg_LT_LIBTOOL_CONFIG_VARS 1877862f5301Smrg_LT_LIBTOOL_TAG_VARS 1878862f5301Smrg# ### END LIBTOOL CONFIG 1879ff559fabSmrg 1880862f5301Smrg_LT_EOF 1881ff559fabSmrg 1882862f5301Smrg case $host_os in 1883862f5301Smrg aix3*) 1884862f5301Smrg cat <<\_LT_EOF >> "$cfgfile" 1885862f5301Smrg# AIX sometimes has problems with the GCC collect2 program. For some 1886862f5301Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 1887862f5301Smrg# vanish in a puff of smoke. 1888862f5301Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 1889862f5301Smrg COLLECT_NAMES= 1890862f5301Smrg export COLLECT_NAMES 1891862f5301Smrgfi 1892862f5301Smrg_LT_EOF 1893862f5301Smrg ;; 1894862f5301Smrg esac 1895ff559fabSmrg 1896862f5301Smrg _LT_PROG_LTMAIN 1897ff559fabSmrg 1898862f5301Smrg # We use sed instead of cat because bash on DJGPP gets confused if 1899862f5301Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 1900862f5301Smrg # text mode, it properly converts lines to CR/LF. This bash problem 1901862f5301Smrg # is reportedly fixed, but why not run on old versions too? 1902862f5301Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 1903862f5301Smrg || (rm -f "$cfgfile"; exit 1) 1904ff559fabSmrg 1905862f5301Smrg _LT_PROG_REPLACE_SHELLFNS 1906ff559fabSmrg 1907862f5301Smrg mv -f "$cfgfile" "$ofile" || 1908862f5301Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 1909862f5301Smrg chmod +x "$ofile" 1910862f5301Smrg], 1911862f5301Smrg[cat <<_LT_EOF >> "$ofile" 1912ff559fabSmrg 1913862f5301Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 1914862f5301Smrgdnl in a comment (ie after a #). 1915862f5301Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 1916862f5301Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 1917862f5301Smrg# ### END LIBTOOL TAG CONFIG: $1 1918862f5301Smrg_LT_EOF 1919862f5301Smrg])dnl /m4_if 1920862f5301Smrg], 1921862f5301Smrg[m4_if([$1], [], [ 1922862f5301Smrg PACKAGE='$PACKAGE' 1923862f5301Smrg VERSION='$VERSION' 1924862f5301Smrg TIMESTAMP='$TIMESTAMP' 1925862f5301Smrg RM='$RM' 1926862f5301Smrg ofile='$ofile'], []) 1927862f5301Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 1928862f5301Smrg])# _LT_CONFIG 1929ff559fabSmrg 1930ff559fabSmrg 1931862f5301Smrg# LT_SUPPORTED_TAG(TAG) 1932862f5301Smrg# --------------------- 1933862f5301Smrg# Trace this macro to discover what tags are supported by the libtool 1934862f5301Smrg# --tag option, using: 1935862f5301Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 1936862f5301SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1937ff559fabSmrg 19387a3b38f7Smrg 1939862f5301Smrg# C support is built-in for now 1940862f5301Smrgm4_define([_LT_LANG_C_enabled], []) 1941862f5301Smrgm4_define([_LT_TAGS], []) 19427a3b38f7Smrg 1943ff559fabSmrg 1944862f5301Smrg# LT_LANG(LANG) 1945862f5301Smrg# ------------- 1946862f5301Smrg# Enable libtool support for the given language if not already enabled. 1947862f5301SmrgAC_DEFUN([LT_LANG], 1948862f5301Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 1949862f5301Smrgm4_case([$1], 1950862f5301Smrg [C], [_LT_LANG(C)], 1951862f5301Smrg [C++], [_LT_LANG(CXX)], 1952fc544a13Smrg [Go], [_LT_LANG(GO)], 1953862f5301Smrg [Java], [_LT_LANG(GCJ)], 1954862f5301Smrg [Fortran 77], [_LT_LANG(F77)], 1955862f5301Smrg [Fortran], [_LT_LANG(FC)], 1956862f5301Smrg [Windows Resource], [_LT_LANG(RC)], 1957862f5301Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 1958862f5301Smrg [_LT_LANG($1)], 1959862f5301Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 1960862f5301Smrg])# LT_LANG 1961ff559fabSmrg 19627a3b38f7Smrg 1963862f5301Smrg# _LT_LANG(LANGNAME) 1964862f5301Smrg# ------------------ 1965862f5301Smrgm4_defun([_LT_LANG], 1966862f5301Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 1967862f5301Smrg [LT_SUPPORTED_TAG([$1])dnl 1968862f5301Smrg m4_append([_LT_TAGS], [$1 ])dnl 1969862f5301Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 1970862f5301Smrg _LT_LANG_$1_CONFIG($1)])dnl 1971862f5301Smrg])# _LT_LANG 19727a3b38f7Smrg 1973ff559fabSmrg 1974fc544a13Smrgm4_ifndef([AC_PROG_GO], [ 1975fc544a13Smrg# NOTE: This macro has been submitted for inclusion into # 1976fc544a13Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 1977fc544a13Smrg# a released version of Autoconf we should remove this # 1978fc544a13Smrg# macro and use it instead. # 1979fc544a13Smrgm4_defun([AC_PROG_GO], 1980fc544a13Smrg[AC_LANG_PUSH(Go)dnl 1981fc544a13SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 1982fc544a13SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1983fc544a13Smrg_AC_ARG_VAR_LDFLAGS()dnl 1984fc544a13SmrgAC_CHECK_TOOL(GOC, gccgo) 1985fc544a13Smrgif test -z "$GOC"; then 1986fc544a13Smrg if test -n "$ac_tool_prefix"; then 1987fc544a13Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1988fc544a13Smrg fi 1989fc544a13Smrgfi 1990fc544a13Smrgif test -z "$GOC"; then 1991fc544a13Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1992fc544a13Smrgfi 1993fc544a13Smrg])#m4_defun 1994fc544a13Smrg])#m4_ifndef 1995fc544a13Smrg 1996fc544a13Smrg 1997862f5301Smrg# _LT_LANG_DEFAULT_CONFIG 1998862f5301Smrg# ----------------------- 1999862f5301Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 2000862f5301Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 2001862f5301Smrg [LT_LANG(CXX)], 2002862f5301Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 20037a3b38f7Smrg 2004862f5301SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 2005862f5301Smrg [LT_LANG(F77)], 2006862f5301Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 20077a3b38f7Smrg 2008862f5301SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 2009862f5301Smrg [LT_LANG(FC)], 2010862f5301Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 20117a3b38f7Smrg 2012862f5301Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 2013862f5301Smrgdnl pulling things in needlessly. 2014862f5301SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 2015862f5301Smrg [LT_LANG(GCJ)], 2016862f5301Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 2017862f5301Smrg [LT_LANG(GCJ)], 2018862f5301Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 2019862f5301Smrg [LT_LANG(GCJ)], 2020862f5301Smrg [m4_ifdef([AC_PROG_GCJ], 2021862f5301Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 2022862f5301Smrg m4_ifdef([A][M_PROG_GCJ], 2023862f5301Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 2024862f5301Smrg m4_ifdef([LT_PROG_GCJ], 2025862f5301Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 2026ff559fabSmrg 2027fc544a13SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 2028fc544a13Smrg [LT_LANG(GO)], 2029fc544a13Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 2030fc544a13Smrg 2031862f5301SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 2032862f5301Smrg [LT_LANG(RC)], 2033862f5301Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 2034862f5301Smrg])# _LT_LANG_DEFAULT_CONFIG 2035ff559fabSmrg 2036862f5301Smrg# Obsolete macros: 2037862f5301SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 2038862f5301SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 2039862f5301SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 2040862f5301SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 2041862f5301SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 2042862f5301Smrgdnl aclocal-1.4 backwards compatibility: 2043862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 2044862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 2045862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 2046862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 2047862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 2048ff559fabSmrg 2049ff559fabSmrg 2050862f5301Smrg# _LT_TAG_COMPILER 205144dda7b2Smrg# ---------------- 2052862f5301Smrgm4_defun([_LT_TAG_COMPILER], 2053862f5301Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2054ff559fabSmrg 2055862f5301Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 2056862f5301Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 2057862f5301Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 2058862f5301Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2059ff559fabSmrg 2060862f5301Smrg# If no C compiler was specified, use CC. 2061862f5301SmrgLTCC=${LTCC-"$CC"} 2062ff559fabSmrg 2063862f5301Smrg# If no C compiler flags were specified, use CFLAGS. 2064862f5301SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2065ff559fabSmrg 2066862f5301Smrg# Allow CC to be a program name with arguments. 2067862f5301Smrgcompiler=$CC 2068862f5301Smrg])# _LT_TAG_COMPILER 2069ff559fabSmrg 2070ff559fabSmrg 2071862f5301Smrg# _LT_COMPILER_BOILERPLATE 2072862f5301Smrg# ------------------------ 2073862f5301Smrg# Check for compiler boilerplate output or warnings with 2074862f5301Smrg# the simple compiler test code. 2075862f5301Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 2076862f5301Smrg[m4_require([_LT_DECL_SED])dnl 2077862f5301Smrgac_outfile=conftest.$ac_objext 2078862f5301Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 2079862f5301Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2080862f5301Smrg_lt_compiler_boilerplate=`cat conftest.err` 2081862f5301Smrg$RM conftest* 2082862f5301Smrg])# _LT_COMPILER_BOILERPLATE 2083ff559fabSmrg 2084ff559fabSmrg 2085862f5301Smrg# _LT_LINKER_BOILERPLATE 2086862f5301Smrg# ---------------------- 2087862f5301Smrg# Check for linker boilerplate output or warnings with 2088862f5301Smrg# the simple link test code. 2089862f5301Smrgm4_defun([_LT_LINKER_BOILERPLATE], 2090862f5301Smrg[m4_require([_LT_DECL_SED])dnl 2091862f5301Smrgac_outfile=conftest.$ac_objext 2092862f5301Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 2093862f5301Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 2094862f5301Smrg_lt_linker_boilerplate=`cat conftest.err` 2095862f5301Smrg$RM -r conftest* 2096862f5301Smrg])# _LT_LINKER_BOILERPLATE 2097ff559fabSmrg 2098862f5301Smrg# _LT_REQUIRED_DARWIN_CHECKS 2099862f5301Smrg# ------------------------- 2100862f5301Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 2101862f5301Smrg case $host_os in 2102862f5301Smrg rhapsody* | darwin*) 2103862f5301Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 2104862f5301Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 2105862f5301Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 2106862f5301Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 2107862f5301Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 2108862f5301Smrg _LT_DECL([], [DSYMUTIL], [1], 2109862f5301Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 2110862f5301Smrg _LT_DECL([], [NMEDIT], [1], 2111862f5301Smrg [Tool to change global to local symbols on Mac OS X]) 2112862f5301Smrg _LT_DECL([], [LIPO], [1], 2113862f5301Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 2114862f5301Smrg _LT_DECL([], [OTOOL], [1], 2115862f5301Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 2116862f5301Smrg _LT_DECL([], [OTOOL64], [1], 2117862f5301Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2118ff559fabSmrg 2119862f5301Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 2120862f5301Smrg [lt_cv_apple_cc_single_mod=no 2121862f5301Smrg if test -z "${LT_MULTI_MODULE}"; then 2122862f5301Smrg # By default we will add the -single_module flag. You can override 2123862f5301Smrg # by either setting the environment variable LT_MULTI_MODULE 2124862f5301Smrg # non-empty at configure time, or by adding -multi_module to the 2125862f5301Smrg # link flags. 2126862f5301Smrg rm -rf libconftest.dylib* 2127862f5301Smrg echo "int foo(void){return 1;}" > conftest.c 2128862f5301Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2129862f5301Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 2130862f5301Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 2131862f5301Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 2132862f5301Smrg _lt_result=$? 2133fc544a13Smrg # If there is a non-empty error log, and "single_module" 2134fc544a13Smrg # appears in it, assume the flag caused a linker warning 2135fc544a13Smrg if test -s conftest.err && $GREP single_module conftest.err; then 2136fc544a13Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2137fc544a13Smrg # Otherwise, if the output was created with a 0 exit code from 2138fc544a13Smrg # the compiler, it worked. 2139fc544a13Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 2140862f5301Smrg lt_cv_apple_cc_single_mod=yes 2141862f5301Smrg else 2142862f5301Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2143862f5301Smrg fi 2144862f5301Smrg rm -rf libconftest.dylib* 2145862f5301Smrg rm -f conftest.* 2146862f5301Smrg fi]) 2147fc544a13Smrg 2148862f5301Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 2149862f5301Smrg [lt_cv_ld_exported_symbols_list], 2150862f5301Smrg [lt_cv_ld_exported_symbols_list=no 2151862f5301Smrg save_LDFLAGS=$LDFLAGS 2152862f5301Smrg echo "_main" > conftest.sym 2153862f5301Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 2154862f5301Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2155862f5301Smrg [lt_cv_ld_exported_symbols_list=yes], 2156862f5301Smrg [lt_cv_ld_exported_symbols_list=no]) 2157862f5301Smrg LDFLAGS="$save_LDFLAGS" 2158862f5301Smrg ]) 2159fc544a13Smrg 2160862f5301Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 2161862f5301Smrg [lt_cv_ld_force_load=no 2162862f5301Smrg cat > conftest.c << _LT_EOF 2163862f5301Smrgint forced_loaded() { return 2;} 2164862f5301Smrg_LT_EOF 2165862f5301Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 2166862f5301Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 2167862f5301Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 2168862f5301Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 2169862f5301Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 2170862f5301Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 2171862f5301Smrg cat > conftest.c << _LT_EOF 2172862f5301Smrgint main() { return 0;} 2173862f5301Smrg_LT_EOF 2174862f5301Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 2175862f5301Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 2176862f5301Smrg _lt_result=$? 2177fc544a13Smrg if test -s conftest.err && $GREP force_load conftest.err; then 2178fc544a13Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2179fc544a13Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 2180862f5301Smrg lt_cv_ld_force_load=yes 2181862f5301Smrg else 2182862f5301Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2183862f5301Smrg fi 2184862f5301Smrg rm -f conftest.err libconftest.a conftest conftest.c 2185862f5301Smrg rm -rf conftest.dSYM 2186862f5301Smrg ]) 2187862f5301Smrg case $host_os in 2188862f5301Smrg rhapsody* | darwin1.[[012]]) 2189862f5301Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 2190862f5301Smrg darwin1.*) 2191862f5301Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2192862f5301Smrg darwin*) # darwin 5.x on 2193862f5301Smrg # if running on 10.5 or later, the deployment target defaults 2194862f5301Smrg # to the OS version, if on x86, and 10.4, the deployment 2195862f5301Smrg # target defaults to 10.4. Don't you love it? 2196862f5301Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 2197862f5301Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 2198862f5301Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2199862f5301Smrg 10.[[012]]*) 2200862f5301Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 2201862f5301Smrg 10.*) 2202862f5301Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 2203862f5301Smrg esac 2204862f5301Smrg ;; 2205862f5301Smrg esac 2206862f5301Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 2207862f5301Smrg _lt_dar_single_mod='$single_module' 2208862f5301Smrg fi 2209862f5301Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 2210862f5301Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2211862f5301Smrg else 2212862f5301Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 2213862f5301Smrg fi 2214862f5301Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 2215862f5301Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 2216862f5301Smrg else 2217862f5301Smrg _lt_dsymutil= 2218862f5301Smrg fi 2219862f5301Smrg ;; 2220862f5301Smrg esac 2221862f5301Smrg]) 2222ff559fabSmrg 2223ff559fabSmrg 2224fc544a13Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 2225fc544a13Smrg# --------------------------------- 2226862f5301Smrg# Checks for linker and compiler features on darwin 2227862f5301Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 2228862f5301Smrg[ 2229862f5301Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 2230862f5301Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 2231862f5301Smrg _LT_TAGVAR(hardcode_direct, $1)=no 2232862f5301Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 2233862f5301Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 2234862f5301Smrg if test "$lt_cv_ld_force_load" = "yes"; then 2235862f5301Smrg _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\"`' 2236fc544a13Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2237fc544a13Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 2238862f5301Smrg else 2239862f5301Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 2240862f5301Smrg fi 2241862f5301Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 2242862f5301Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 2243862f5301Smrg case $cc_basename in 2244862f5301Smrg ifort*) _lt_dar_can_shared=yes ;; 2245862f5301Smrg *) _lt_dar_can_shared=$GCC ;; 2246862f5301Smrg esac 2247862f5301Smrg if test "$_lt_dar_can_shared" = "yes"; then 2248862f5301Smrg output_verbose_link_cmd=func_echo_all 2249862f5301Smrg _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}" 2250862f5301Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 2251862f5301Smrg _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}" 2252862f5301Smrg _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}" 2253862f5301Smrg m4_if([$1], [CXX], 2254862f5301Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 2255862f5301Smrg _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}" 2256862f5301Smrg _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}" 2257862f5301Smrg fi 2258862f5301Smrg],[]) 2259862f5301Smrg else 2260862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 2261862f5301Smrg fi 22627a3b38f7Smrg]) 2263ff559fabSmrg 2264862f5301Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 2265862f5301Smrg# ---------------------------------- 2266862f5301Smrg# Links a minimal program and checks the executable 2267862f5301Smrg# for the system default hardcoded library path. In most cases, 2268862f5301Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 2269862f5301Smrg# the location of the communication and MPI libs are included too. 2270862f5301Smrg# If we don't find anything, use the default library path according 2271862f5301Smrg# to the aix ld manual. 2272862f5301Smrg# Store the results from the different compilers for each TAGNAME. 2273862f5301Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 2274862f5301Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 2275862f5301Smrg[m4_require([_LT_DECL_SED])dnl 2276862f5301Smrgif test "${lt_cv_aix_libpath+set}" = set; then 2277862f5301Smrg aix_libpath=$lt_cv_aix_libpath 2278862f5301Smrgelse 2279862f5301Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 2280862f5301Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 2281862f5301Smrg lt_aix_libpath_sed='[ 2282862f5301Smrg /Import File Strings/,/^$/ { 2283862f5301Smrg /^0/ { 2284862f5301Smrg s/^0 *\([^ ]*\) *$/\1/ 2285862f5301Smrg p 2286862f5301Smrg } 2287862f5301Smrg }]' 2288862f5301Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2289862f5301Smrg # Check for a 64-bit object if we didn't find anything. 2290862f5301Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2291862f5301Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 2292862f5301Smrg fi],[]) 2293862f5301Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 2294862f5301Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 2295862f5301Smrg fi 2296862f5301Smrg ]) 2297862f5301Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2298862f5301Smrgfi 2299862f5301Smrg])# _LT_SYS_MODULE_PATH_AIX 2300ff559fabSmrg 2301ff559fabSmrg 2302862f5301Smrg# _LT_SHELL_INIT(ARG) 2303862f5301Smrg# ------------------- 2304862f5301Smrgm4_define([_LT_SHELL_INIT], 2305862f5301Smrg[m4_divert_text([M4SH-INIT], [$1 2306862f5301Smrg])])# _LT_SHELL_INIT 23077a3b38f7Smrg 2308ff559fabSmrg 2309ff559fabSmrg 2310862f5301Smrg# _LT_PROG_ECHO_BACKSLASH 2311862f5301Smrg# ----------------------- 2312862f5301Smrg# Find how we can fake an echo command that does not interpret backslash. 2313862f5301Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 2314862f5301Smrg# of the generated configure script which will find a shell with a builtin 2315862f5301Smrg# printf (which we can use as an echo command). 2316862f5301Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 2317862f5301Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2318862f5301SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2319862f5301SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2320ff559fabSmrg 2321862f5301SmrgAC_MSG_CHECKING([how to print strings]) 2322862f5301Smrg# Test print first, because it will be a builtin if present. 2323862f5301Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 2324862f5301Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 2325862f5301Smrg ECHO='print -r --' 2326862f5301Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 2327862f5301Smrg ECHO='printf %s\n' 2328862f5301Smrgelse 2329862f5301Smrg # Use this function as a fallback that always works. 2330862f5301Smrg func_fallback_echo () 2331862f5301Smrg { 2332862f5301Smrg eval 'cat <<_LTECHO_EOF 2333862f5301Smrg$[]1 2334862f5301Smrg_LTECHO_EOF' 2335862f5301Smrg } 2336862f5301Smrg ECHO='func_fallback_echo' 2337862f5301Smrgfi 2338ff559fabSmrg 2339862f5301Smrg# func_echo_all arg... 2340862f5301Smrg# Invoke $ECHO with all args, space-separated. 2341862f5301Smrgfunc_echo_all () 2342862f5301Smrg{ 2343862f5301Smrg $ECHO "$*" 2344862f5301Smrg} 2345ff559fabSmrg 2346862f5301Smrgcase "$ECHO" in 2347862f5301Smrg printf*) AC_MSG_RESULT([printf]) ;; 2348862f5301Smrg print*) AC_MSG_RESULT([print -r]) ;; 2349862f5301Smrg *) AC_MSG_RESULT([cat]) ;; 2350862f5301Smrgesac 2351ff559fabSmrg 2352862f5301Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 2353862f5301Smrg[_AS_DETECT_SUGGESTED([ 2354862f5301Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 2355862f5301Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 2356862f5301Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 2357862f5301Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2358862f5301Smrg PATH=/empty FPATH=/empty; export PATH FPATH 2359862f5301Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 2360862f5301Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2361ff559fabSmrg 2362862f5301Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 2363862f5301Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 2364862f5301Smrg])# _LT_PROG_ECHO_BACKSLASH 2365ff559fabSmrg 2366ff559fabSmrg 2367862f5301Smrg# _LT_WITH_SYSROOT 2368862f5301Smrg# ---------------- 2369862f5301SmrgAC_DEFUN([_LT_WITH_SYSROOT], 2370862f5301Smrg[AC_MSG_CHECKING([for sysroot]) 2371862f5301SmrgAC_ARG_WITH([sysroot], 2372862f5301Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 2373862f5301Smrg (or the compiler's sysroot if not specified).], 2374862f5301Smrg[], [with_sysroot=no]) 2375862f5301Smrg 2376862f5301Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 2377862f5301Smrgdnl in case the user passed a directory name. 2378862f5301Smrglt_sysroot= 2379862f5301Smrgcase ${with_sysroot} in #( 2380862f5301Smrg yes) 2381862f5301Smrg if test "$GCC" = yes; then 2382862f5301Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 2383862f5301Smrg fi 2384862f5301Smrg ;; #( 2385862f5301Smrg /*) 2386862f5301Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 2387862f5301Smrg ;; #( 2388862f5301Smrg no|'') 2389862f5301Smrg ;; #( 2390862f5301Smrg *) 2391862f5301Smrg AC_MSG_RESULT([${with_sysroot}]) 2392862f5301Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 2393862f5301Smrg ;; 2394862f5301Smrgesac 2395ff559fabSmrg 2396862f5301Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 2397862f5301Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 2398862f5301Smrg[dependent libraries, and in which our libraries should be installed.])]) 2399ff559fabSmrg 2400862f5301Smrg# _LT_ENABLE_LOCK 2401862f5301Smrg# --------------- 2402862f5301Smrgm4_defun([_LT_ENABLE_LOCK], 2403862f5301Smrg[AC_ARG_ENABLE([libtool-lock], 2404862f5301Smrg [AS_HELP_STRING([--disable-libtool-lock], 2405862f5301Smrg [avoid locking (might break parallel builds)])]) 2406862f5301Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2407ff559fabSmrg 2408862f5301Smrg# Some flags need to be propagated to the compiler or linker for good 2409862f5301Smrg# libtool support. 2410862f5301Smrgcase $host in 2411862f5301Smrgia64-*-hpux*) 2412862f5301Smrg # Find out which ABI we are using. 2413862f5301Smrg echo 'int i;' > conftest.$ac_ext 2414862f5301Smrg if AC_TRY_EVAL(ac_compile); then 2415862f5301Smrg case `/usr/bin/file conftest.$ac_objext` in 2416862f5301Smrg *ELF-32*) 2417862f5301Smrg HPUX_IA64_MODE="32" 2418862f5301Smrg ;; 2419862f5301Smrg *ELF-64*) 2420862f5301Smrg HPUX_IA64_MODE="64" 2421862f5301Smrg ;; 2422862f5301Smrg esac 2423862f5301Smrg fi 2424862f5301Smrg rm -rf conftest* 2425862f5301Smrg ;; 2426862f5301Smrg*-*-irix6*) 2427862f5301Smrg # Find out which ABI we are using. 2428862f5301Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 2429862f5301Smrg if AC_TRY_EVAL(ac_compile); then 2430862f5301Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2431862f5301Smrg case `/usr/bin/file conftest.$ac_objext` in 2432862f5301Smrg *32-bit*) 2433862f5301Smrg LD="${LD-ld} -melf32bsmip" 2434862f5301Smrg ;; 2435862f5301Smrg *N32*) 2436862f5301Smrg LD="${LD-ld} -melf32bmipn32" 2437862f5301Smrg ;; 2438862f5301Smrg *64-bit*) 2439862f5301Smrg LD="${LD-ld} -melf64bmip" 2440862f5301Smrg ;; 2441862f5301Smrg esac 2442862f5301Smrg else 2443862f5301Smrg case `/usr/bin/file conftest.$ac_objext` in 2444862f5301Smrg *32-bit*) 2445862f5301Smrg LD="${LD-ld} -32" 2446862f5301Smrg ;; 2447862f5301Smrg *N32*) 2448862f5301Smrg LD="${LD-ld} -n32" 2449862f5301Smrg ;; 2450862f5301Smrg *64-bit*) 2451862f5301Smrg LD="${LD-ld} -64" 2452862f5301Smrg ;; 2453862f5301Smrg esac 2454862f5301Smrg fi 2455862f5301Smrg fi 2456862f5301Smrg rm -rf conftest* 2457862f5301Smrg ;; 2458ff559fabSmrg 2459862f5301Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 2460862f5301Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 2461862f5301Smrg # Find out which ABI we are using. 2462862f5301Smrg echo 'int i;' > conftest.$ac_ext 2463862f5301Smrg if AC_TRY_EVAL(ac_compile); then 2464862f5301Smrg case `/usr/bin/file conftest.o` in 2465862f5301Smrg *32-bit*) 2466862f5301Smrg case $host in 2467862f5301Smrg x86_64-*kfreebsd*-gnu) 2468862f5301Smrg LD="${LD-ld} -m elf_i386_fbsd" 2469862f5301Smrg ;; 2470862f5301Smrg x86_64-*linux*) 2471862f5301Smrg LD="${LD-ld} -m elf_i386" 2472862f5301Smrg ;; 2473862f5301Smrg ppc64-*linux*|powerpc64-*linux*) 2474862f5301Smrg LD="${LD-ld} -m elf32ppclinux" 2475862f5301Smrg ;; 2476862f5301Smrg s390x-*linux*) 2477862f5301Smrg LD="${LD-ld} -m elf_s390" 2478862f5301Smrg ;; 2479862f5301Smrg sparc64-*linux*) 2480862f5301Smrg LD="${LD-ld} -m elf32_sparc" 2481862f5301Smrg ;; 2482862f5301Smrg esac 2483862f5301Smrg ;; 2484862f5301Smrg *64-bit*) 2485862f5301Smrg case $host in 2486862f5301Smrg x86_64-*kfreebsd*-gnu) 2487862f5301Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 2488862f5301Smrg ;; 2489862f5301Smrg x86_64-*linux*) 2490862f5301Smrg LD="${LD-ld} -m elf_x86_64" 2491862f5301Smrg ;; 2492862f5301Smrg ppc*-*linux*|powerpc*-*linux*) 2493862f5301Smrg LD="${LD-ld} -m elf64ppc" 2494862f5301Smrg ;; 2495862f5301Smrg s390*-*linux*|s390*-*tpf*) 2496862f5301Smrg LD="${LD-ld} -m elf64_s390" 2497862f5301Smrg ;; 2498862f5301Smrg sparc*-*linux*) 2499862f5301Smrg LD="${LD-ld} -m elf64_sparc" 2500862f5301Smrg ;; 2501862f5301Smrg esac 2502862f5301Smrg ;; 2503862f5301Smrg esac 2504862f5301Smrg fi 2505862f5301Smrg rm -rf conftest* 2506862f5301Smrg ;; 2507ff559fabSmrg 2508862f5301Smrg*-*-sco3.2v5*) 2509862f5301Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 2510862f5301Smrg SAVE_CFLAGS="$CFLAGS" 2511862f5301Smrg CFLAGS="$CFLAGS -belf" 2512862f5301Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 2513862f5301Smrg [AC_LANG_PUSH(C) 2514862f5301Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 2515862f5301Smrg AC_LANG_POP]) 2516862f5301Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 2517862f5301Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 2518862f5301Smrg CFLAGS="$SAVE_CFLAGS" 2519862f5301Smrg fi 2520862f5301Smrg ;; 2521fc544a13Smrg*-*solaris*) 2522862f5301Smrg # Find out which ABI we are using. 2523862f5301Smrg echo 'int i;' > conftest.$ac_ext 2524862f5301Smrg if AC_TRY_EVAL(ac_compile); then 2525862f5301Smrg case `/usr/bin/file conftest.o` in 2526862f5301Smrg *64-bit*) 2527862f5301Smrg case $lt_cv_prog_gnu_ld in 2528fc544a13Smrg yes*) 2529fc544a13Smrg case $host in 2530fc544a13Smrg i?86-*-solaris*) 2531fc544a13Smrg LD="${LD-ld} -m elf_x86_64" 2532fc544a13Smrg ;; 2533fc544a13Smrg sparc*-*-solaris*) 2534fc544a13Smrg LD="${LD-ld} -m elf64_sparc" 2535fc544a13Smrg ;; 2536fc544a13Smrg esac 2537fc544a13Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2538fc544a13Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2539fc544a13Smrg LD="${LD-ld}_sol2" 2540fc544a13Smrg fi 2541fc544a13Smrg ;; 2542862f5301Smrg *) 2543862f5301Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 2544862f5301Smrg LD="${LD-ld} -64" 2545862f5301Smrg fi 2546862f5301Smrg ;; 2547862f5301Smrg esac 2548862f5301Smrg ;; 2549862f5301Smrg esac 2550862f5301Smrg fi 2551862f5301Smrg rm -rf conftest* 2552862f5301Smrg ;; 2553862f5301Smrgesac 2554ff559fabSmrg 2555862f5301Smrgneed_locks="$enable_libtool_lock" 2556862f5301Smrg])# _LT_ENABLE_LOCK 2557ff559fabSmrg 2558ff559fabSmrg 2559862f5301Smrg# _LT_PROG_AR 2560862f5301Smrg# ----------- 2561862f5301Smrgm4_defun([_LT_PROG_AR], 2562862f5301Smrg[AC_CHECK_TOOLS(AR, [ar], false) 2563862f5301Smrg: ${AR=ar} 2564862f5301Smrg: ${AR_FLAGS=cru} 2565862f5301Smrg_LT_DECL([], [AR], [1], [The archiver]) 2566862f5301Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 2567862f5301Smrg 2568862f5301SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 2569862f5301Smrg [lt_cv_ar_at_file=no 2570862f5301Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 2571862f5301Smrg [echo conftest.$ac_objext > conftest.lst 2572862f5301Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 2573862f5301Smrg AC_TRY_EVAL([lt_ar_try]) 2574862f5301Smrg if test "$ac_status" -eq 0; then 2575862f5301Smrg # Ensure the archiver fails upon bogus file names. 2576862f5301Smrg rm -f conftest.$ac_objext libconftest.a 2577862f5301Smrg AC_TRY_EVAL([lt_ar_try]) 2578862f5301Smrg if test "$ac_status" -ne 0; then 2579862f5301Smrg lt_cv_ar_at_file=@ 2580862f5301Smrg fi 2581862f5301Smrg fi 2582862f5301Smrg rm -f conftest.* libconftest.a 2583862f5301Smrg ]) 2584862f5301Smrg ]) 2585ff559fabSmrg 2586862f5301Smrgif test "x$lt_cv_ar_at_file" = xno; then 2587862f5301Smrg archiver_list_spec= 2588862f5301Smrgelse 2589862f5301Smrg archiver_list_spec=$lt_cv_ar_at_file 2590862f5301Smrgfi 2591862f5301Smrg_LT_DECL([], [archiver_list_spec], [1], 2592862f5301Smrg [How to feed a file listing to the archiver]) 2593862f5301Smrg])# _LT_PROG_AR 2594ff559fabSmrg 2595ff559fabSmrg 2596862f5301Smrg# _LT_CMD_OLD_ARCHIVE 2597862f5301Smrg# ------------------- 2598862f5301Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 2599862f5301Smrg[_LT_PROG_AR 2600ff559fabSmrg 2601862f5301SmrgAC_CHECK_TOOL(STRIP, strip, :) 2602862f5301Smrgtest -z "$STRIP" && STRIP=: 2603862f5301Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2604ff559fabSmrg 2605862f5301SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 2606862f5301Smrgtest -z "$RANLIB" && RANLIB=: 2607862f5301Smrg_LT_DECL([], [RANLIB], [1], 2608862f5301Smrg [Commands used to install an old-style archive]) 2609ff559fabSmrg 2610862f5301Smrg# Determine commands to create old-style static archives. 2611862f5301Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 2612862f5301Smrgold_postinstall_cmds='chmod 644 $oldlib' 2613862f5301Smrgold_postuninstall_cmds= 2614ff559fabSmrg 2615862f5301Smrgif test -n "$RANLIB"; then 2616862f5301Smrg case $host_os in 2617862f5301Smrg openbsd*) 2618fc544a13Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2619862f5301Smrg ;; 2620862f5301Smrg *) 2621fc544a13Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2622862f5301Smrg ;; 2623862f5301Smrg esac 2624fc544a13Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 2625862f5301Smrgfi 2626ff559fabSmrg 2627862f5301Smrgcase $host_os in 2628862f5301Smrg darwin*) 2629862f5301Smrg lock_old_archive_extraction=yes ;; 2630862f5301Smrg *) 2631862f5301Smrg lock_old_archive_extraction=no ;; 2632862f5301Smrgesac 2633862f5301Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 2634862f5301Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 2635862f5301Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 2636862f5301Smrg [Commands used to build an old-style archive]) 2637862f5301Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 2638862f5301Smrg [Whether to use a lock for old archive extraction]) 2639862f5301Smrg])# _LT_CMD_OLD_ARCHIVE 2640ff559fabSmrg 2641ff559fabSmrg 2642862f5301Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2643862f5301Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 2644862f5301Smrg# ---------------------------------------------------------------- 2645862f5301Smrg# Check whether the given compiler option works 2646862f5301SmrgAC_DEFUN([_LT_COMPILER_OPTION], 2647862f5301Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2648862f5301Smrgm4_require([_LT_DECL_SED])dnl 2649862f5301SmrgAC_CACHE_CHECK([$1], [$2], 2650862f5301Smrg [$2=no 2651862f5301Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 2652862f5301Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2653862f5301Smrg lt_compiler_flag="$3" 2654862f5301Smrg # Insert the option either (1) after the last *FLAGS variable, or 2655862f5301Smrg # (2) before a word containing "conftest.", or (3) at the end. 2656862f5301Smrg # Note that $ac_compile itself does not contain backslashes and begins 2657862f5301Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2658862f5301Smrg # The option is referenced via a variable to avoid confusing sed. 2659862f5301Smrg lt_compile=`echo "$ac_compile" | $SED \ 2660862f5301Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2661862f5301Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2662862f5301Smrg -e 's:$: $lt_compiler_flag:'` 2663862f5301Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2664862f5301Smrg (eval "$lt_compile" 2>conftest.err) 2665862f5301Smrg ac_status=$? 2666862f5301Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2667862f5301Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2668862f5301Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 2669862f5301Smrg # The compiler can only warn and ignore the option if not recognized 2670862f5301Smrg # So say no if there are warnings other than the usual output. 2671862f5301Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 2672862f5301Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2673862f5301Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 2674862f5301Smrg $2=yes 2675862f5301Smrg fi 2676862f5301Smrg fi 2677862f5301Smrg $RM conftest* 2678862f5301Smrg]) 2679ff559fabSmrg 2680862f5301Smrgif test x"[$]$2" = xyes; then 2681862f5301Smrg m4_if([$5], , :, [$5]) 2682862f5301Smrgelse 2683862f5301Smrg m4_if([$6], , :, [$6]) 2684862f5301Smrgfi 2685862f5301Smrg])# _LT_COMPILER_OPTION 2686ff559fabSmrg 2687862f5301Smrg# Old name: 2688862f5301SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2689862f5301Smrgdnl aclocal-1.4 backwards compatibility: 2690862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2691ff559fabSmrg 2692ff559fabSmrg 2693862f5301Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 2694862f5301Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 2695862f5301Smrg# ---------------------------------------------------- 2696862f5301Smrg# Check whether the given linker option works 2697862f5301SmrgAC_DEFUN([_LT_LINKER_OPTION], 2698862f5301Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 2699862f5301Smrgm4_require([_LT_DECL_SED])dnl 2700862f5301SmrgAC_CACHE_CHECK([$1], [$2], 2701862f5301Smrg [$2=no 2702862f5301Smrg save_LDFLAGS="$LDFLAGS" 2703862f5301Smrg LDFLAGS="$LDFLAGS $3" 2704862f5301Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 2705862f5301Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 2706862f5301Smrg # The linker can only warn and ignore the option if not recognized 2707862f5301Smrg # So say no if there are warnings 2708862f5301Smrg if test -s conftest.err; then 2709862f5301Smrg # Append any errors to the config.log. 2710862f5301Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 2711862f5301Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 2712862f5301Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 2713862f5301Smrg if diff conftest.exp conftest.er2 >/dev/null; then 2714862f5301Smrg $2=yes 2715862f5301Smrg fi 2716862f5301Smrg else 2717862f5301Smrg $2=yes 2718862f5301Smrg fi 2719862f5301Smrg fi 2720862f5301Smrg $RM -r conftest* 2721862f5301Smrg LDFLAGS="$save_LDFLAGS" 2722862f5301Smrg]) 2723ff559fabSmrg 2724862f5301Smrgif test x"[$]$2" = xyes; then 2725862f5301Smrg m4_if([$4], , :, [$4]) 2726862f5301Smrgelse 2727862f5301Smrg m4_if([$5], , :, [$5]) 2728862f5301Smrgfi 2729862f5301Smrg])# _LT_LINKER_OPTION 2730ff559fabSmrg 2731862f5301Smrg# Old name: 2732862f5301SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2733862f5301Smrgdnl aclocal-1.4 backwards compatibility: 2734862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2735ff559fabSmrg 2736ff559fabSmrg 2737862f5301Smrg# LT_CMD_MAX_LEN 2738862f5301Smrg#--------------- 2739862f5301SmrgAC_DEFUN([LT_CMD_MAX_LEN], 2740862f5301Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2741862f5301Smrg# find the maximum length of command line arguments 2742862f5301SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 2743862f5301SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 2744862f5301Smrg i=0 2745862f5301Smrg teststring="ABCD" 2746ff559fabSmrg 2747862f5301Smrg case $build_os in 2748862f5301Smrg msdosdjgpp*) 2749862f5301Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 2750862f5301Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 2751862f5301Smrg # during glob expansion). Even if it were fixed, the result of this 2752862f5301Smrg # check would be larger than it should be. 2753862f5301Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 2754862f5301Smrg ;; 2755ff559fabSmrg 2756862f5301Smrg gnu*) 2757862f5301Smrg # Under GNU Hurd, this test is not required because there is 2758862f5301Smrg # no limit to the length of command line arguments. 2759862f5301Smrg # Libtool will interpret -1 as no limit whatsoever 2760862f5301Smrg lt_cv_sys_max_cmd_len=-1; 2761862f5301Smrg ;; 276244dda7b2Smrg 2763862f5301Smrg cygwin* | mingw* | cegcc*) 2764862f5301Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 2765862f5301Smrg # about 5 minutes as the teststring grows exponentially. 2766862f5301Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 2767862f5301Smrg # you end up with a "frozen" computer, even though with patience 2768862f5301Smrg # the test eventually succeeds (with a max line length of 256k). 2769862f5301Smrg # Instead, let's just punt: use the minimum linelength reported by 2770862f5301Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 2771862f5301Smrg lt_cv_sys_max_cmd_len=8192; 2772862f5301Smrg ;; 277344dda7b2Smrg 2774862f5301Smrg mint*) 2775862f5301Smrg # On MiNT this can take a long time and run out of memory. 2776862f5301Smrg lt_cv_sys_max_cmd_len=8192; 2777862f5301Smrg ;; 277844dda7b2Smrg 2779862f5301Smrg amigaos*) 2780862f5301Smrg # On AmigaOS with pdksh, this test takes hours, literally. 2781862f5301Smrg # So we just punt and use a minimum line length of 8192. 2782862f5301Smrg lt_cv_sys_max_cmd_len=8192; 2783862f5301Smrg ;; 278444dda7b2Smrg 2785862f5301Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 2786862f5301Smrg # This has been around since 386BSD, at least. Likely further. 2787862f5301Smrg if test -x /sbin/sysctl; then 2788862f5301Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 2789862f5301Smrg elif test -x /usr/sbin/sysctl; then 2790862f5301Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2791862f5301Smrg else 2792862f5301Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2793862f5301Smrg fi 2794862f5301Smrg # And add a safety zone 2795862f5301Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2796862f5301Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 2797862f5301Smrg ;; 279844dda7b2Smrg 2799862f5301Smrg interix*) 2800862f5301Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 2801862f5301Smrg lt_cv_sys_max_cmd_len=196608 2802862f5301Smrg ;; 280344dda7b2Smrg 2804fc544a13Smrg os2*) 2805fc544a13Smrg # The test takes a long time on OS/2. 2806fc544a13Smrg lt_cv_sys_max_cmd_len=8192 2807fc544a13Smrg ;; 2808fc544a13Smrg 2809862f5301Smrg osf*) 2810862f5301Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 2811862f5301Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 2812862f5301Smrg # nice to cause kernel panics so lets avoid the loop below. 2813862f5301Smrg # First set a reasonable default. 2814862f5301Smrg lt_cv_sys_max_cmd_len=16384 2815862f5301Smrg # 2816862f5301Smrg if test -x /sbin/sysconfig; then 2817862f5301Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 2818862f5301Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 281944dda7b2Smrg esac 282044dda7b2Smrg fi 2821862f5301Smrg ;; 2822862f5301Smrg sco3.2v5*) 2823862f5301Smrg lt_cv_sys_max_cmd_len=102400 2824862f5301Smrg ;; 2825862f5301Smrg sysv5* | sco5v6* | sysv4.2uw2*) 2826862f5301Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 2827862f5301Smrg if test -n "$kargmax"; then 2828862f5301Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 282944dda7b2Smrg else 2830862f5301Smrg lt_cv_sys_max_cmd_len=32768 283144dda7b2Smrg fi 2832862f5301Smrg ;; 2833862f5301Smrg *) 2834862f5301Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 2835862f5301Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 2836862f5301Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 2837862f5301Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 283844dda7b2Smrg else 2839862f5301Smrg # Make teststring a little bigger before we do anything with it. 2840862f5301Smrg # a 1K string should be a reasonable start. 2841862f5301Smrg for i in 1 2 3 4 5 6 7 8 ; do 2842862f5301Smrg teststring=$teststring$teststring 2843862f5301Smrg done 2844862f5301Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 2845862f5301Smrg # If test is not a shell built-in, we'll probably end up computing a 2846862f5301Smrg # maximum length that is only half of the actual maximum length, but 2847862f5301Smrg # we can't tell. 2848fc544a13Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 2849862f5301Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 2850862f5301Smrg test $i != 17 # 1/2 MB should be enough 2851862f5301Smrg do 2852862f5301Smrg i=`expr $i + 1` 2853862f5301Smrg teststring=$teststring$teststring 2854862f5301Smrg done 2855862f5301Smrg # Only check the string length outside the loop. 2856862f5301Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 2857862f5301Smrg teststring= 2858862f5301Smrg # Add a significant safety factor because C++ compilers can tack on 2859862f5301Smrg # massive amounts of additional arguments before passing them to the 2860862f5301Smrg # linker. It appears as though 1/2 is a usable value. 2861862f5301Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 286244dda7b2Smrg fi 286344dda7b2Smrg ;; 286444dda7b2Smrg esac 286544dda7b2Smrg]) 2866862f5301Smrgif test -n $lt_cv_sys_max_cmd_len ; then 2867862f5301Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 2868862f5301Smrgelse 2869862f5301Smrg AC_MSG_RESULT(none) 2870862f5301Smrgfi 2871862f5301Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 2872862f5301Smrg_LT_DECL([], [max_cmd_len], [0], 2873862f5301Smrg [What is the maximum length of a command?]) 2874862f5301Smrg])# LT_CMD_MAX_LEN 287544dda7b2Smrg 2876862f5301Smrg# Old name: 2877862f5301SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 2878862f5301Smrgdnl aclocal-1.4 backwards compatibility: 2879862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 288044dda7b2Smrg 288144dda7b2Smrg 2882862f5301Smrg# _LT_HEADER_DLFCN 2883862f5301Smrg# ---------------- 2884862f5301Smrgm4_defun([_LT_HEADER_DLFCN], 2885862f5301Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 2886862f5301Smrg])# _LT_HEADER_DLFCN 288744dda7b2Smrg 288844dda7b2Smrg 2889862f5301Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 2890862f5301Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 2891862f5301Smrg# ---------------------------------------------------------------- 2892862f5301Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 2893862f5301Smrg[m4_require([_LT_HEADER_DLFCN])dnl 2894862f5301Smrgif test "$cross_compiling" = yes; then : 2895862f5301Smrg [$4] 2896862f5301Smrgelse 2897862f5301Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 2898862f5301Smrg lt_status=$lt_dlunknown 2899862f5301Smrg cat > conftest.$ac_ext <<_LT_EOF 2900862f5301Smrg[#line $LINENO "configure" 2901862f5301Smrg#include "confdefs.h" 290244dda7b2Smrg 2903862f5301Smrg#if HAVE_DLFCN_H 2904862f5301Smrg#include <dlfcn.h> 2905862f5301Smrg#endif 290644dda7b2Smrg 2907862f5301Smrg#include <stdio.h> 290844dda7b2Smrg 2909862f5301Smrg#ifdef RTLD_GLOBAL 2910862f5301Smrg# define LT_DLGLOBAL RTLD_GLOBAL 2911862f5301Smrg#else 2912862f5301Smrg# ifdef DL_GLOBAL 2913862f5301Smrg# define LT_DLGLOBAL DL_GLOBAL 2914862f5301Smrg# else 2915862f5301Smrg# define LT_DLGLOBAL 0 2916862f5301Smrg# endif 2917862f5301Smrg#endif 291844dda7b2Smrg 2919862f5301Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 2920862f5301Smrg find out it does not work in some platform. */ 2921862f5301Smrg#ifndef LT_DLLAZY_OR_NOW 2922862f5301Smrg# ifdef RTLD_LAZY 2923862f5301Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 2924862f5301Smrg# else 2925862f5301Smrg# ifdef DL_LAZY 2926862f5301Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 2927862f5301Smrg# else 2928862f5301Smrg# ifdef RTLD_NOW 2929862f5301Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 2930862f5301Smrg# else 2931862f5301Smrg# ifdef DL_NOW 2932862f5301Smrg# define LT_DLLAZY_OR_NOW DL_NOW 2933862f5301Smrg# else 2934862f5301Smrg# define LT_DLLAZY_OR_NOW 0 2935862f5301Smrg# endif 2936862f5301Smrg# endif 2937862f5301Smrg# endif 2938862f5301Smrg# endif 2939862f5301Smrg#endif 294044dda7b2Smrg 2941862f5301Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 2942862f5301Smrg correspondingly for the symbols needed. */ 2943862f5301Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 2944862f5301Smrgint fnord () __attribute__((visibility("default"))); 2945862f5301Smrg#endif 2946862f5301Smrg 2947862f5301Smrgint fnord () { return 42; } 2948862f5301Smrgint main () 294944dda7b2Smrg{ 2950862f5301Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 2951862f5301Smrg int status = $lt_dlunknown; 295244dda7b2Smrg 2953862f5301Smrg if (self) 2954862f5301Smrg { 2955862f5301Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2956862f5301Smrg else 2957862f5301Smrg { 2958862f5301Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 2959862f5301Smrg else puts (dlerror ()); 2960862f5301Smrg } 2961862f5301Smrg /* dlclose (self); */ 2962862f5301Smrg } 2963862f5301Smrg else 2964862f5301Smrg puts (dlerror ()); 296544dda7b2Smrg 2966862f5301Smrg return status; 2967862f5301Smrg}] 2968862f5301Smrg_LT_EOF 2969862f5301Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 2970862f5301Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 2971862f5301Smrg lt_status=$? 2972862f5301Smrg case x$lt_status in 2973862f5301Smrg x$lt_dlno_uscore) $1 ;; 2974862f5301Smrg x$lt_dlneed_uscore) $2 ;; 2975862f5301Smrg x$lt_dlunknown|x*) $3 ;; 2976862f5301Smrg esac 2977862f5301Smrg else : 2978862f5301Smrg # compilation failed 2979862f5301Smrg $3 2980862f5301Smrg fi 2981862f5301Smrgfi 2982862f5301Smrgrm -fr conftest* 2983862f5301Smrg])# _LT_TRY_DLOPEN_SELF 298444dda7b2Smrg 298544dda7b2Smrg 2986862f5301Smrg# LT_SYS_DLOPEN_SELF 2987862f5301Smrg# ------------------ 2988862f5301SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 2989862f5301Smrg[m4_require([_LT_HEADER_DLFCN])dnl 2990862f5301Smrgif test "x$enable_dlopen" != xyes; then 2991862f5301Smrg enable_dlopen=unknown 2992862f5301Smrg enable_dlopen_self=unknown 2993862f5301Smrg enable_dlopen_self_static=unknown 2994862f5301Smrgelse 2995862f5301Smrg lt_cv_dlopen=no 2996862f5301Smrg lt_cv_dlopen_libs= 299744dda7b2Smrg 2998862f5301Smrg case $host_os in 2999862f5301Smrg beos*) 3000862f5301Smrg lt_cv_dlopen="load_add_on" 3001862f5301Smrg lt_cv_dlopen_libs= 3002862f5301Smrg lt_cv_dlopen_self=yes 3003862f5301Smrg ;; 300444dda7b2Smrg 3005862f5301Smrg mingw* | pw32* | cegcc*) 3006862f5301Smrg lt_cv_dlopen="LoadLibrary" 3007862f5301Smrg lt_cv_dlopen_libs= 3008862f5301Smrg ;; 300944dda7b2Smrg 3010862f5301Smrg cygwin*) 3011862f5301Smrg lt_cv_dlopen="dlopen" 3012862f5301Smrg lt_cv_dlopen_libs= 3013862f5301Smrg ;; 301444dda7b2Smrg 3015862f5301Smrg darwin*) 3016862f5301Smrg # if libdl is installed we need to link against it 3017862f5301Smrg AC_CHECK_LIB([dl], [dlopen], 3018862f5301Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 3019862f5301Smrg lt_cv_dlopen="dyld" 3020862f5301Smrg lt_cv_dlopen_libs= 3021862f5301Smrg lt_cv_dlopen_self=yes 3022862f5301Smrg ]) 3023862f5301Smrg ;; 302444dda7b2Smrg 3025862f5301Smrg *) 3026862f5301Smrg AC_CHECK_FUNC([shl_load], 3027862f5301Smrg [lt_cv_dlopen="shl_load"], 3028862f5301Smrg [AC_CHECK_LIB([dld], [shl_load], 3029862f5301Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 3030862f5301Smrg [AC_CHECK_FUNC([dlopen], 3031862f5301Smrg [lt_cv_dlopen="dlopen"], 3032862f5301Smrg [AC_CHECK_LIB([dl], [dlopen], 3033862f5301Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 3034862f5301Smrg [AC_CHECK_LIB([svld], [dlopen], 3035862f5301Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 3036862f5301Smrg [AC_CHECK_LIB([dld], [dld_link], 3037862f5301Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 3038862f5301Smrg ]) 3039862f5301Smrg ]) 3040862f5301Smrg ]) 3041862f5301Smrg ]) 3042862f5301Smrg ]) 3043862f5301Smrg ;; 3044862f5301Smrg esac 304544dda7b2Smrg 3046862f5301Smrg if test "x$lt_cv_dlopen" != xno; then 3047862f5301Smrg enable_dlopen=yes 3048862f5301Smrg else 3049862f5301Smrg enable_dlopen=no 3050862f5301Smrg fi 305144dda7b2Smrg 3052862f5301Smrg case $lt_cv_dlopen in 3053862f5301Smrg dlopen) 3054862f5301Smrg save_CPPFLAGS="$CPPFLAGS" 3055862f5301Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 305644dda7b2Smrg 3057862f5301Smrg save_LDFLAGS="$LDFLAGS" 3058862f5301Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 305944dda7b2Smrg 3060862f5301Smrg save_LIBS="$LIBS" 3061862f5301Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 306244dda7b2Smrg 3063862f5301Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 3064862f5301Smrg lt_cv_dlopen_self, [dnl 3065862f5301Smrg _LT_TRY_DLOPEN_SELF( 3066862f5301Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 3067862f5301Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 3068862f5301Smrg ]) 306944dda7b2Smrg 3070862f5301Smrg if test "x$lt_cv_dlopen_self" = xyes; then 3071862f5301Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 3072862f5301Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 3073862f5301Smrg lt_cv_dlopen_self_static, [dnl 3074862f5301Smrg _LT_TRY_DLOPEN_SELF( 3075862f5301Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 3076862f5301Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 3077862f5301Smrg ]) 3078862f5301Smrg fi 3079862f5301Smrg 3080862f5301Smrg CPPFLAGS="$save_CPPFLAGS" 3081862f5301Smrg LDFLAGS="$save_LDFLAGS" 3082862f5301Smrg LIBS="$save_LIBS" 308344dda7b2Smrg ;; 308444dda7b2Smrg esac 3085862f5301Smrg 3086862f5301Smrg case $lt_cv_dlopen_self in 3087862f5301Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 3088862f5301Smrg *) enable_dlopen_self=unknown ;; 3089862f5301Smrg esac 3090862f5301Smrg 3091862f5301Smrg case $lt_cv_dlopen_self_static in 3092862f5301Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 3093862f5301Smrg *) enable_dlopen_self_static=unknown ;; 3094862f5301Smrg esac 309544dda7b2Smrgfi 3096862f5301Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 3097862f5301Smrg [Whether dlopen is supported]) 3098862f5301Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 3099862f5301Smrg [Whether dlopen of programs is supported]) 3100862f5301Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 3101862f5301Smrg [Whether dlopen of statically linked programs is supported]) 3102862f5301Smrg])# LT_SYS_DLOPEN_SELF 310344dda7b2Smrg 3104862f5301Smrg# Old name: 3105862f5301SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 3106862f5301Smrgdnl aclocal-1.4 backwards compatibility: 3107862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 310844dda7b2Smrg 310944dda7b2Smrg 3110862f5301Smrg# _LT_COMPILER_C_O([TAGNAME]) 3111862f5301Smrg# --------------------------- 3112862f5301Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 3113862f5301Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 3114862f5301Smrgm4_defun([_LT_COMPILER_C_O], 3115862f5301Smrg[m4_require([_LT_DECL_SED])dnl 3116862f5301Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3117862f5301Smrgm4_require([_LT_TAG_COMPILER])dnl 3118862f5301SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 3119862f5301Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 3120862f5301Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 3121862f5301Smrg $RM -r conftest 2>/dev/null 3122862f5301Smrg mkdir conftest 3123862f5301Smrg cd conftest 3124862f5301Smrg mkdir out 312544dda7b2Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3126862f5301Smrg 3127862f5301Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 312844dda7b2Smrg # Insert the option either (1) after the last *FLAGS variable, or 312944dda7b2Smrg # (2) before a word containing "conftest.", or (3) at the end. 313044dda7b2Smrg # Note that $ac_compile itself does not contain backslashes and begins 313144dda7b2Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 313244dda7b2Smrg lt_compile=`echo "$ac_compile" | $SED \ 313344dda7b2Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 313444dda7b2Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 313544dda7b2Smrg -e 's:$: $lt_compiler_flag:'` 313644dda7b2Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 3137862f5301Smrg (eval "$lt_compile" 2>out/conftest.err) 313844dda7b2Smrg ac_status=$? 3139862f5301Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 314044dda7b2Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3141862f5301Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 3142862f5301Smrg then 314344dda7b2Smrg # The compiler can only warn and ignore the option if not recognized 3144862f5301Smrg # So say no if there are warnings 3145862f5301Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 3146862f5301Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 3147862f5301Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 3148862f5301Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 314944dda7b2Smrg fi 315044dda7b2Smrg fi 3151862f5301Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 3152862f5301Smrg $RM conftest* 3153862f5301Smrg # SGI C++ compiler will create directory out/ii_files/ for 3154862f5301Smrg # template instantiation 3155862f5301Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 3156862f5301Smrg $RM out/* && rmdir out 3157862f5301Smrg cd .. 3158862f5301Smrg $RM -r conftest 315944dda7b2Smrg $RM conftest* 316044dda7b2Smrg]) 3161862f5301Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 3162862f5301Smrg [Does compiler simultaneously support -c and -o options?]) 3163862f5301Smrg])# _LT_COMPILER_C_O 316444dda7b2Smrg 316544dda7b2Smrg 3166862f5301Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 3167862f5301Smrg# ---------------------------------- 3168862f5301Smrg# Check to see if we can do hard links to lock some files if needed 3169862f5301Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 3170862f5301Smrg[m4_require([_LT_ENABLE_LOCK])dnl 3171862f5301Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3172862f5301Smrg_LT_COMPILER_C_O([$1]) 317344dda7b2Smrg 3174862f5301Smrghard_links="nottested" 3175862f5301Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 3176862f5301Smrg # do not overwrite the value of need_locks provided by the user 3177862f5301Smrg AC_MSG_CHECKING([if we can lock with hard links]) 3178862f5301Smrg hard_links=yes 3179862f5301Smrg $RM conftest* 3180862f5301Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 3181862f5301Smrg touch conftest.a 3182862f5301Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 3183862f5301Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 3184862f5301Smrg AC_MSG_RESULT([$hard_links]) 3185862f5301Smrg if test "$hard_links" = no; then 3186862f5301Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 3187862f5301Smrg need_locks=warn 3188862f5301Smrg fi 318944dda7b2Smrgelse 3190862f5301Smrg need_locks=no 319144dda7b2Smrgfi 3192862f5301Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 3193862f5301Smrg])# _LT_COMPILER_FILE_LOCKS 319444dda7b2Smrg 319544dda7b2Smrg 3196862f5301Smrg# _LT_CHECK_OBJDIR 3197862f5301Smrg# ---------------- 3198862f5301Smrgm4_defun([_LT_CHECK_OBJDIR], 3199862f5301Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 3200862f5301Smrg[rm -f .libs 2>/dev/null 3201862f5301Smrgmkdir .libs 2>/dev/null 3202862f5301Smrgif test -d .libs; then 3203862f5301Smrg lt_cv_objdir=.libs 3204862f5301Smrgelse 3205862f5301Smrg # MS-DOS does not allow filenames that begin with a dot. 3206862f5301Smrg lt_cv_objdir=_libs 3207862f5301Smrgfi 3208862f5301Smrgrmdir .libs 2>/dev/null]) 3209862f5301Smrgobjdir=$lt_cv_objdir 3210862f5301Smrg_LT_DECL([], [objdir], [0], 3211862f5301Smrg [The name of the directory that contains temporary libtool files])dnl 3212862f5301Smrgm4_pattern_allow([LT_OBJDIR])dnl 3213862f5301SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 3214862f5301Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 3215862f5301Smrg])# _LT_CHECK_OBJDIR 321644dda7b2Smrg 321744dda7b2Smrg 3218862f5301Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 3219862f5301Smrg# -------------------------------------- 3220862f5301Smrg# Check hardcoding attributes. 3221862f5301Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 3222862f5301Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 3223862f5301Smrg_LT_TAGVAR(hardcode_action, $1)= 3224862f5301Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 3225862f5301Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 3226862f5301Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 322744dda7b2Smrg 3228862f5301Smrg # We can hardcode non-existent directories. 3229862f5301Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 3230862f5301Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 3231862f5301Smrg # have to relink, otherwise we might link with an installed library 3232862f5301Smrg # when we should be linking with a yet-to-be-installed one 3233862f5301Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 3234862f5301Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 3235862f5301Smrg # Linking always hardcodes the temporary library directory. 3236862f5301Smrg _LT_TAGVAR(hardcode_action, $1)=relink 3237862f5301Smrg else 3238862f5301Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 3239862f5301Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 3240862f5301Smrg fi 3241862f5301Smrgelse 3242862f5301Smrg # We cannot hardcode anything, or else we can only hardcode existing 3243862f5301Smrg # directories. 3244862f5301Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 3245862f5301Smrgfi 3246862f5301SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 324744dda7b2Smrg 3248862f5301Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 3249862f5301Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 3250862f5301Smrg # Fast installation is not supported 3251862f5301Smrg enable_fast_install=no 3252862f5301Smrgelif test "$shlibpath_overrides_runpath" = yes || 3253862f5301Smrg test "$enable_shared" = no; then 3254862f5301Smrg # Fast installation is not necessary 3255862f5301Smrg enable_fast_install=needless 3256862f5301Smrgfi 3257862f5301Smrg_LT_TAGDECL([], [hardcode_action], [0], 3258862f5301Smrg [How to hardcode a shared library path into an executable]) 3259862f5301Smrg])# _LT_LINKER_HARDCODE_LIBPATH 326044dda7b2Smrg 326144dda7b2Smrg 3262862f5301Smrg# _LT_CMD_STRIPLIB 3263862f5301Smrg# ---------------- 3264862f5301Smrgm4_defun([_LT_CMD_STRIPLIB], 3265862f5301Smrg[m4_require([_LT_DECL_EGREP]) 3266862f5301Smrgstriplib= 3267862f5301Smrgold_striplib= 3268862f5301SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 3269862f5301Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 3270862f5301Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 3271862f5301Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 3272862f5301Smrg AC_MSG_RESULT([yes]) 3273862f5301Smrgelse 3274862f5301Smrg# FIXME - insert some real tests, host_os isn't really good enough 3275862f5301Smrg case $host_os in 3276862f5301Smrg darwin*) 3277862f5301Smrg if test -n "$STRIP" ; then 3278862f5301Smrg striplib="$STRIP -x" 3279862f5301Smrg old_striplib="$STRIP -S" 3280862f5301Smrg AC_MSG_RESULT([yes]) 328144dda7b2Smrg else 3282862f5301Smrg AC_MSG_RESULT([no]) 328344dda7b2Smrg fi 328444dda7b2Smrg ;; 3285862f5301Smrg *) 3286862f5301Smrg AC_MSG_RESULT([no]) 328744dda7b2Smrg ;; 3288862f5301Smrg esac 3289862f5301Smrgfi 3290862f5301Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 3291862f5301Smrg_LT_DECL([], [striplib], [1]) 3292862f5301Smrg])# _LT_CMD_STRIPLIB 329344dda7b2Smrg 3294862f5301Smrg 3295862f5301Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 3296862f5301Smrg# ----------------------------- 3297862f5301Smrg# PORTME Fill in your ld.so characteristics 3298862f5301Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 3299862f5301Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3300862f5301Smrgm4_require([_LT_DECL_EGREP])dnl 3301862f5301Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 3302862f5301Smrgm4_require([_LT_DECL_OBJDUMP])dnl 3303862f5301Smrgm4_require([_LT_DECL_SED])dnl 3304862f5301Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 3305862f5301SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 3306862f5301Smrgm4_if([$1], 3307862f5301Smrg [], [ 3308862f5301Smrgif test "$GCC" = yes; then 3309862f5301Smrg case $host_os in 3310862f5301Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 3311862f5301Smrg *) lt_awk_arg="/^libraries:/" ;; 3312862f5301Smrg esac 3313862f5301Smrg case $host_os in 3314862f5301Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 3315862f5301Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 3316862f5301Smrg esac 3317862f5301Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 3318862f5301Smrg case $lt_search_path_spec in 3319862f5301Smrg *\;*) 3320862f5301Smrg # if the path contains ";" then we assume it to be the separator 3321862f5301Smrg # otherwise default to the standard path separator (i.e. ":") - it is 3322862f5301Smrg # assumed that no part of a normal pathname contains ";" but that should 3323862f5301Smrg # okay in the real world where ";" in dirpaths is itself problematic. 3324862f5301Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 332544dda7b2Smrg ;; 332644dda7b2Smrg *) 3327862f5301Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 3328862f5301Smrg ;; 3329862f5301Smrg esac 3330862f5301Smrg # Ok, now we have the path, separated by spaces, we can step through it 3331862f5301Smrg # and add multilib dir if necessary. 3332862f5301Smrg lt_tmp_lt_search_path_spec= 3333862f5301Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 3334862f5301Smrg for lt_sys_path in $lt_search_path_spec; do 3335862f5301Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 3336862f5301Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 333744dda7b2Smrg else 3338862f5301Smrg test -d "$lt_sys_path" && \ 3339862f5301Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 334044dda7b2Smrg fi 3341862f5301Smrg done 3342862f5301Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 3343862f5301SmrgBEGIN {RS=" "; FS="/|\n";} { 3344862f5301Smrg lt_foo=""; 3345862f5301Smrg lt_count=0; 3346862f5301Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 3347862f5301Smrg if ($lt_i != "" && $lt_i != ".") { 3348862f5301Smrg if ($lt_i == "..") { 3349862f5301Smrg lt_count++; 3350862f5301Smrg } else { 3351862f5301Smrg if (lt_count == 0) { 3352862f5301Smrg lt_foo="/" $lt_i lt_foo; 3353862f5301Smrg } else { 3354862f5301Smrg lt_count--; 3355862f5301Smrg } 3356862f5301Smrg } 3357862f5301Smrg } 3358862f5301Smrg } 3359862f5301Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 3360862f5301Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 3361862f5301Smrg}'` 3362862f5301Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 3363862f5301Smrg # for these hosts. 3364862f5301Smrg case $host_os in 3365862f5301Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 3366862f5301Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 336744dda7b2Smrg esac 3368862f5301Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 336944dda7b2Smrgelse 3370862f5301Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3371862f5301Smrgfi]) 3372862f5301Smrglibrary_names_spec= 3373862f5301Smrglibname_spec='lib$name' 3374862f5301Smrgsoname_spec= 3375862f5301Smrgshrext_cmds=".so" 3376862f5301Smrgpostinstall_cmds= 3377862f5301Smrgpostuninstall_cmds= 3378862f5301Smrgfinish_cmds= 3379862f5301Smrgfinish_eval= 3380862f5301Smrgshlibpath_var= 3381862f5301Smrgshlibpath_overrides_runpath=unknown 3382862f5301Smrgversion_type=none 3383862f5301Smrgdynamic_linker="$host_os ld.so" 3384862f5301Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 3385862f5301Smrgneed_lib_prefix=unknown 3386862f5301Smrghardcode_into_libs=no 338744dda7b2Smrg 3388862f5301Smrg# when you set need_version to no, make sure it does not cause -set_version 3389862f5301Smrg# flags to be left without arguments 3390862f5301Smrgneed_version=unknown 339144dda7b2Smrg 3392862f5301Smrgcase $host_os in 3393862f5301Smrgaix3*) 3394fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3395862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 3396862f5301Smrg shlibpath_var=LIBPATH 339744dda7b2Smrg 3398862f5301Smrg # AIX 3 has no versioning support, so we append a major version to the name. 3399862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3400862f5301Smrg ;; 340144dda7b2Smrg 3402862f5301Smrgaix[[4-9]]*) 3403fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3404862f5301Smrg need_lib_prefix=no 3405862f5301Smrg need_version=no 3406862f5301Smrg hardcode_into_libs=yes 3407862f5301Smrg if test "$host_cpu" = ia64; then 3408862f5301Smrg # AIX 5 supports IA64 3409862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 3410862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3411862f5301Smrg else 3412862f5301Smrg # With GCC up to 2.95.x, collect2 would create an import file 3413862f5301Smrg # for dependence libraries. The import file would start with 3414862f5301Smrg # the line `#! .'. This would cause the generated library to 3415862f5301Smrg # depend on `.', always an invalid library. This was fixed in 3416862f5301Smrg # development snapshots of GCC prior to 3.0. 3417862f5301Smrg case $host_os in 3418862f5301Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 3419862f5301Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 3420862f5301Smrg echo ' yes ' 3421862f5301Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 3422862f5301Smrg : 3423862f5301Smrg else 3424862f5301Smrg can_build_shared=no 3425862f5301Smrg fi 3426862f5301Smrg ;; 3427862f5301Smrg esac 3428862f5301Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 3429862f5301Smrg # soname into executable. Probably we can add versioning support to 3430862f5301Smrg # collect2, so additional links can be useful in future. 3431862f5301Smrg if test "$aix_use_runtimelinking" = yes; then 3432862f5301Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 3433862f5301Smrg # instead of lib<name>.a to let people know that these are not 3434862f5301Smrg # typical AIX shared libraries. 3435862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3436862f5301Smrg else 3437862f5301Smrg # We preserve .a as extension for shared libraries through AIX4.2 3438862f5301Smrg # and later when we are not doing run time linking. 3439862f5301Smrg library_names_spec='${libname}${release}.a $libname.a' 3440862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3441862f5301Smrg fi 3442862f5301Smrg shlibpath_var=LIBPATH 3443862f5301Smrg fi 3444862f5301Smrg ;; 344544dda7b2Smrg 3446862f5301Smrgamigaos*) 3447862f5301Smrg case $host_cpu in 3448862f5301Smrg powerpc) 3449862f5301Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 3450862f5301Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 3451862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3452862f5301Smrg ;; 3453862f5301Smrg m68k) 3454862f5301Smrg library_names_spec='$libname.ixlibrary $libname.a' 3455862f5301Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 3456862f5301Smrg 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' 3457862f5301Smrg ;; 3458862f5301Smrg esac 3459862f5301Smrg ;; 346044dda7b2Smrg 3461862f5301Smrgbeos*) 3462862f5301Smrg library_names_spec='${libname}${shared_ext}' 3463862f5301Smrg dynamic_linker="$host_os ld.so" 3464862f5301Smrg shlibpath_var=LIBRARY_PATH 3465862f5301Smrg ;; 346644dda7b2Smrg 3467862f5301Smrgbsdi[[45]]*) 3468fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3469862f5301Smrg need_version=no 3470862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3471862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3472862f5301Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 3473862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3474862f5301Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 3475862f5301Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 3476862f5301Smrg # the default ld.so.conf also contains /usr/contrib/lib and 3477862f5301Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 3478862f5301Smrg # libtool to hard-code these into programs 3479862f5301Smrg ;; 348044dda7b2Smrg 3481862f5301Smrgcygwin* | mingw* | pw32* | cegcc*) 3482862f5301Smrg version_type=windows 3483862f5301Smrg shrext_cmds=".dll" 3484862f5301Smrg need_version=no 3485862f5301Smrg need_lib_prefix=no 348644dda7b2Smrg 3487862f5301Smrg case $GCC,$cc_basename in 3488862f5301Smrg yes,*) 3489862f5301Smrg # gcc 3490862f5301Smrg library_names_spec='$libname.dll.a' 3491862f5301Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 3492862f5301Smrg postinstall_cmds='base_file=`basename \${file}`~ 3493862f5301Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3494862f5301Smrg dldir=$destdir/`dirname \$dlpath`~ 3495862f5301Smrg test -d \$dldir || mkdir -p \$dldir~ 3496862f5301Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 3497862f5301Smrg chmod a+x \$dldir/$dlname~ 3498862f5301Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3499862f5301Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3500862f5301Smrg fi' 3501862f5301Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3502862f5301Smrg dlpath=$dir/\$dldll~ 3503862f5301Smrg $RM \$dlpath' 3504862f5301Smrg shlibpath_overrides_runpath=yes 350544dda7b2Smrg 3506862f5301Smrg case $host_os in 3507862f5301Smrg cygwin*) 3508862f5301Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 3509862f5301Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3510862f5301Smrgm4_if([$1], [],[ 3511862f5301Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 3512862f5301Smrg ;; 3513862f5301Smrg mingw* | cegcc*) 3514862f5301Smrg # MinGW DLLs use traditional 'lib' prefix 3515862f5301Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3516862f5301Smrg ;; 3517862f5301Smrg pw32*) 3518862f5301Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 3519862f5301Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3520862f5301Smrg ;; 3521862f5301Smrg esac 3522862f5301Smrg dynamic_linker='Win32 ld.exe' 3523862f5301Smrg ;; 352444dda7b2Smrg 3525862f5301Smrg *,cl*) 3526862f5301Smrg # Native MSVC 3527862f5301Smrg libname_spec='$name' 3528862f5301Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 3529862f5301Smrg library_names_spec='${libname}.dll.lib' 3530862f5301Smrg 3531862f5301Smrg case $build_os in 3532862f5301Smrg mingw*) 3533862f5301Smrg sys_lib_search_path_spec= 3534862f5301Smrg lt_save_ifs=$IFS 3535862f5301Smrg IFS=';' 3536862f5301Smrg for lt_path in $LIB 3537862f5301Smrg do 3538862f5301Smrg IFS=$lt_save_ifs 3539862f5301Smrg # Let DOS variable expansion print the short 8.3 style file name. 3540862f5301Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 3541862f5301Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 3542862f5301Smrg done 3543862f5301Smrg IFS=$lt_save_ifs 3544862f5301Smrg # Convert to MSYS style. 3545862f5301Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 3546862f5301Smrg ;; 3547862f5301Smrg cygwin*) 3548862f5301Smrg # Convert to unix form, then to dos form, then back to unix form 3549862f5301Smrg # but this time dos style (no spaces!) so that the unix form looks 3550862f5301Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 3551862f5301Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 3552862f5301Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 3553862f5301Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3554862f5301Smrg ;; 3555862f5301Smrg *) 3556862f5301Smrg sys_lib_search_path_spec="$LIB" 3557862f5301Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 3558862f5301Smrg # It is most probably a Windows format PATH. 3559862f5301Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 356044dda7b2Smrg else 3561862f5301Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 3562862f5301Smrg fi 3563862f5301Smrg # FIXME: find the short name or the path components, as spaces are 3564862f5301Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 3565862f5301Smrg ;; 3566ff559fabSmrg esac 3567ff559fabSmrg 3568862f5301Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 3569862f5301Smrg postinstall_cmds='base_file=`basename \${file}`~ 3570862f5301Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 3571862f5301Smrg dldir=$destdir/`dirname \$dlpath`~ 3572862f5301Smrg test -d \$dldir || mkdir -p \$dldir~ 3573862f5301Smrg $install_prog $dir/$dlname \$dldir/$dlname' 3574862f5301Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 3575862f5301Smrg dlpath=$dir/\$dldll~ 3576862f5301Smrg $RM \$dlpath' 3577862f5301Smrg shlibpath_overrides_runpath=yes 3578862f5301Smrg dynamic_linker='Win32 link.exe' 357944dda7b2Smrg ;; 3580ff559fabSmrg 3581862f5301Smrg *) 3582862f5301Smrg # Assume MSVC wrapper 3583862f5301Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 3584862f5301Smrg dynamic_linker='Win32 ld.exe' 358544dda7b2Smrg ;; 3586862f5301Smrg esac 3587862f5301Smrg # FIXME: first we should search . and the directory the executable is in 3588862f5301Smrg shlibpath_var=PATH 3589862f5301Smrg ;; 3590ff559fabSmrg 3591862f5301Smrgdarwin* | rhapsody*) 3592862f5301Smrg dynamic_linker="$host_os dyld" 3593862f5301Smrg version_type=darwin 3594862f5301Smrg need_lib_prefix=no 3595862f5301Smrg need_version=no 3596862f5301Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 3597862f5301Smrg soname_spec='${libname}${release}${major}$shared_ext' 3598862f5301Smrg shlibpath_overrides_runpath=yes 3599862f5301Smrg shlibpath_var=DYLD_LIBRARY_PATH 3600862f5301Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 3601862f5301Smrgm4_if([$1], [],[ 3602862f5301Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 3603862f5301Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3604862f5301Smrg ;; 3605ff559fabSmrg 3606862f5301Smrgdgux*) 3607fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3608862f5301Smrg need_lib_prefix=no 3609862f5301Smrg need_version=no 3610862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3611862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3612862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3613862f5301Smrg ;; 36147a3b38f7Smrg 3615862f5301Smrgfreebsd* | dragonfly*) 3616862f5301Smrg # DragonFly does not have aout. When/if they implement a new 3617862f5301Smrg # versioning mechanism, adjust this. 3618862f5301Smrg if test -x /usr/bin/objformat; then 3619862f5301Smrg objformat=`/usr/bin/objformat` 362044dda7b2Smrg else 3621862f5301Smrg case $host_os in 3622fc544a13Smrg freebsd[[23]].*) objformat=aout ;; 3623862f5301Smrg *) objformat=elf ;; 3624862f5301Smrg esac 362544dda7b2Smrg fi 3626862f5301Smrg version_type=freebsd-$objformat 3627862f5301Smrg case $version_type in 3628862f5301Smrg freebsd-elf*) 3629862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3630862f5301Smrg need_version=no 3631862f5301Smrg need_lib_prefix=no 3632862f5301Smrg ;; 3633862f5301Smrg freebsd-*) 3634862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 3635862f5301Smrg need_version=yes 3636862f5301Smrg ;; 3637862f5301Smrg esac 3638862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3639862f5301Smrg case $host_os in 3640fc544a13Smrg freebsd2.*) 3641862f5301Smrg shlibpath_overrides_runpath=yes 3642862f5301Smrg ;; 3643862f5301Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 3644862f5301Smrg shlibpath_overrides_runpath=yes 3645862f5301Smrg hardcode_into_libs=yes 3646862f5301Smrg ;; 3647862f5301Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 3648862f5301Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 3649862f5301Smrg shlibpath_overrides_runpath=no 3650862f5301Smrg hardcode_into_libs=yes 3651862f5301Smrg ;; 3652862f5301Smrg *) # from 4.6 on, and DragonFly 3653862f5301Smrg shlibpath_overrides_runpath=yes 3654862f5301Smrg hardcode_into_libs=yes 3655862f5301Smrg ;; 3656862f5301Smrg esac 3657862f5301Smrg ;; 36587a3b38f7Smrg 3659862f5301Smrggnu*) 3660fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3661862f5301Smrg need_lib_prefix=no 3662862f5301Smrg need_version=no 3663862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3664862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3665862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3666fc544a13Smrg shlibpath_overrides_runpath=no 3667862f5301Smrg hardcode_into_libs=yes 3668862f5301Smrg ;; 36697a3b38f7Smrg 3670862f5301Smrghaiku*) 3671fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3672862f5301Smrg need_lib_prefix=no 3673862f5301Smrg need_version=no 3674862f5301Smrg dynamic_linker="$host_os runtime_loader" 3675862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 3676862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3677862f5301Smrg shlibpath_var=LIBRARY_PATH 3678862f5301Smrg shlibpath_overrides_runpath=yes 3679862f5301Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 3680862f5301Smrg hardcode_into_libs=yes 3681862f5301Smrg ;; 36827a3b38f7Smrg 3683862f5301Smrghpux9* | hpux10* | hpux11*) 3684862f5301Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 3685862f5301Smrg # link against other versions. 3686862f5301Smrg version_type=sunos 3687862f5301Smrg need_lib_prefix=no 3688862f5301Smrg need_version=no 3689862f5301Smrg case $host_cpu in 3690862f5301Smrg ia64*) 3691862f5301Smrg shrext_cmds='.so' 3692862f5301Smrg hardcode_into_libs=yes 3693862f5301Smrg dynamic_linker="$host_os dld.so" 3694862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3695862f5301Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3696862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3697862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3698862f5301Smrg if test "X$HPUX_IA64_MODE" = X32; then 3699862f5301Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3700862f5301Smrg else 3701862f5301Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 370244dda7b2Smrg fi 3703862f5301Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3704862f5301Smrg ;; 3705862f5301Smrg hppa*64*) 3706862f5301Smrg shrext_cmds='.sl' 3707862f5301Smrg hardcode_into_libs=yes 3708862f5301Smrg dynamic_linker="$host_os dld.sl" 3709862f5301Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 3710862f5301Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 3711862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3712862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3713862f5301Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 3714862f5301Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3715862f5301Smrg ;; 3716862f5301Smrg *) 3717862f5301Smrg shrext_cmds='.sl' 3718862f5301Smrg dynamic_linker="$host_os dld.sl" 3719862f5301Smrg shlibpath_var=SHLIB_PATH 3720862f5301Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 3721862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3722862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 372344dda7b2Smrg ;; 372444dda7b2Smrg esac 3725862f5301Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 3726862f5301Smrg postinstall_cmds='chmod 555 $lib' 3727862f5301Smrg # or fails outright, so override atomically: 3728862f5301Smrg install_override_mode=555 3729862f5301Smrg ;; 37307a3b38f7Smrg 3731862f5301Smrginterix[[3-9]]*) 3732fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3733862f5301Smrg need_lib_prefix=no 3734862f5301Smrg need_version=no 3735862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3736862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3737862f5301Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 3738862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3739862f5301Smrg shlibpath_overrides_runpath=no 3740862f5301Smrg hardcode_into_libs=yes 3741862f5301Smrg ;; 37427a3b38f7Smrg 3743862f5301Smrgirix5* | irix6* | nonstopux*) 3744862f5301Smrg case $host_os in 3745862f5301Smrg nonstopux*) version_type=nonstopux ;; 3746862f5301Smrg *) 3747862f5301Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3748fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3749862f5301Smrg else 3750862f5301Smrg version_type=irix 3751862f5301Smrg fi ;; 375244dda7b2Smrg esac 3753862f5301Smrg need_lib_prefix=no 3754862f5301Smrg need_version=no 3755862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3756862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 3757862f5301Smrg case $host_os in 3758862f5301Smrg irix5* | nonstopux*) 3759862f5301Smrg libsuff= shlibsuff= 3760862f5301Smrg ;; 3761862f5301Smrg *) 3762862f5301Smrg case $LD in # libtool.m4 will add one of these switches to LD 3763862f5301Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 3764862f5301Smrg libsuff= shlibsuff= libmagic=32-bit;; 3765862f5301Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 3766862f5301Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 3767862f5301Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 3768862f5301Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 3769862f5301Smrg *) libsuff= shlibsuff= libmagic=never-match;; 3770862f5301Smrg esac 3771862f5301Smrg ;; 3772862f5301Smrg esac 3773862f5301Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 3774862f5301Smrg shlibpath_overrides_runpath=no 3775862f5301Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 3776862f5301Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 3777862f5301Smrg hardcode_into_libs=yes 3778862f5301Smrg ;; 37797a3b38f7Smrg 3780862f5301Smrg# No shared lib support for Linux oldld, aout, or coff. 3781862f5301Smrglinux*oldld* | linux*aout* | linux*coff*) 3782862f5301Smrg dynamic_linker=no 3783862f5301Smrg ;; 37847a3b38f7Smrg 3785fc544a13Smrg# This must be glibc/ELF. 3786862f5301Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3787fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3788862f5301Smrg need_lib_prefix=no 3789862f5301Smrg need_version=no 3790862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3791862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3792862f5301Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 3793862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3794862f5301Smrg shlibpath_overrides_runpath=no 37957a3b38f7Smrg 3796862f5301Smrg # Some binutils ld are patched to set DT_RUNPATH 3797862f5301Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 3798862f5301Smrg [lt_cv_shlibpath_overrides_runpath=no 3799862f5301Smrg save_LDFLAGS=$LDFLAGS 3800862f5301Smrg save_libdir=$libdir 3801862f5301Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 3802862f5301Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 3803862f5301Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3804862f5301Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 3805862f5301Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 3806862f5301Smrg LDFLAGS=$save_LDFLAGS 3807862f5301Smrg libdir=$save_libdir 3808862f5301Smrg ]) 3809862f5301Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 38107a3b38f7Smrg 3811862f5301Smrg # This implies no fast_install, which is unacceptable. 3812862f5301Smrg # Some rework will be needed to allow for fast_install 3813862f5301Smrg # before this can be enabled. 3814862f5301Smrg hardcode_into_libs=yes 38157a3b38f7Smrg 3816862f5301Smrg # Append ld.so.conf contents to the search path 3817862f5301Smrg if test -f /etc/ld.so.conf; then 3818862f5301Smrg 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' ' '` 3819862f5301Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 382044dda7b2Smrg fi 38217a3b38f7Smrg 3822862f5301Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 3823862f5301Smrg # powerpc, because MkLinux only supported shared libraries with the 3824862f5301Smrg # GNU dynamic linker. Since this was broken with cross compilers, 3825862f5301Smrg # most powerpc-linux boxes support dynamic linking these days and 3826862f5301Smrg # people can always --disable-shared, the test was removed, and we 3827862f5301Smrg # assume the GNU/Linux dynamic linker is in use. 3828862f5301Smrg dynamic_linker='GNU/Linux ld.so' 3829862f5301Smrg ;; 38307a3b38f7Smrg 3831862f5301Smrgnetbsd*) 3832862f5301Smrg version_type=sunos 3833862f5301Smrg need_lib_prefix=no 3834862f5301Smrg need_version=no 3835862f5301Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 3836862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3837862f5301Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3838862f5301Smrg dynamic_linker='NetBSD (a.out) ld.so' 383944dda7b2Smrg else 3840862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 3841862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3842862f5301Smrg dynamic_linker='NetBSD ld.elf_so' 384344dda7b2Smrg fi 3844862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3845862f5301Smrg shlibpath_overrides_runpath=yes 3846862f5301Smrg hardcode_into_libs=yes 3847862f5301Smrg ;; 3848ff559fabSmrg 3849862f5301Smrgnewsos6) 3850fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3851862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3852862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3853862f5301Smrg shlibpath_overrides_runpath=yes 3854862f5301Smrg ;; 3855ff559fabSmrg 3856862f5301Smrg*nto* | *qnx*) 3857862f5301Smrg version_type=qnx 3858862f5301Smrg need_lib_prefix=no 3859862f5301Smrg need_version=no 3860862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3861862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3862862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3863862f5301Smrg shlibpath_overrides_runpath=no 3864862f5301Smrg hardcode_into_libs=yes 3865862f5301Smrg dynamic_linker='ldqnx.so' 3866862f5301Smrg ;; 3867ff559fabSmrg 3868862f5301Smrgopenbsd*) 3869862f5301Smrg version_type=sunos 3870862f5301Smrg sys_lib_dlsearch_path_spec="/usr/lib" 3871862f5301Smrg need_lib_prefix=no 3872862f5301Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 38737a3b38f7Smrg case $host_os in 3874862f5301Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 3875862f5301Smrg *) need_version=no ;; 3876ff559fabSmrg esac 3877862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3878862f5301Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3879862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3880862f5301Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3881862f5301Smrg case $host_os in 3882862f5301Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 3883862f5301Smrg shlibpath_overrides_runpath=no 3884862f5301Smrg ;; 3885862f5301Smrg *) 3886862f5301Smrg shlibpath_overrides_runpath=yes 3887862f5301Smrg ;; 3888862f5301Smrg esac 3889862f5301Smrg else 3890862f5301Smrg shlibpath_overrides_runpath=yes 3891862f5301Smrg fi 3892862f5301Smrg ;; 3893ff559fabSmrg 3894862f5301Smrgos2*) 3895862f5301Smrg libname_spec='$name' 3896862f5301Smrg shrext_cmds=".dll" 3897862f5301Smrg need_lib_prefix=no 3898862f5301Smrg library_names_spec='$libname${shared_ext} $libname.a' 3899862f5301Smrg dynamic_linker='OS/2 ld.exe' 3900862f5301Smrg shlibpath_var=LIBPATH 3901862f5301Smrg ;; 3902ff559fabSmrg 3903862f5301Smrgosf3* | osf4* | osf5*) 3904862f5301Smrg version_type=osf 3905862f5301Smrg need_lib_prefix=no 3906862f5301Smrg need_version=no 3907862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3908862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3909862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3910862f5301Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3911862f5301Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 3912862f5301Smrg ;; 3913862f5301Smrg 3914862f5301Smrgrdos*) 3915862f5301Smrg dynamic_linker=no 3916862f5301Smrg ;; 3917862f5301Smrg 3918862f5301Smrgsolaris*) 3919fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3920862f5301Smrg need_lib_prefix=no 3921862f5301Smrg need_version=no 3922862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3923862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3924862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3925862f5301Smrg shlibpath_overrides_runpath=yes 3926862f5301Smrg hardcode_into_libs=yes 3927862f5301Smrg # ldd complains unless libraries are executable 3928862f5301Smrg postinstall_cmds='chmod +x $lib' 3929862f5301Smrg ;; 3930862f5301Smrg 3931862f5301Smrgsunos4*) 3932862f5301Smrg version_type=sunos 3933862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 3934862f5301Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3935862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3936862f5301Smrg shlibpath_overrides_runpath=yes 3937862f5301Smrg if test "$with_gnu_ld" = yes; then 3938862f5301Smrg need_lib_prefix=no 3939862f5301Smrg fi 3940862f5301Smrg need_version=yes 3941862f5301Smrg ;; 3942862f5301Smrg 3943862f5301Smrgsysv4 | sysv4.3*) 3944fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3945862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3946862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3947862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3948862f5301Smrg case $host_vendor in 3949862f5301Smrg sni) 3950862f5301Smrg shlibpath_overrides_runpath=no 3951862f5301Smrg need_lib_prefix=no 3952862f5301Smrg runpath_var=LD_RUN_PATH 3953862f5301Smrg ;; 3954862f5301Smrg siemens) 3955862f5301Smrg need_lib_prefix=no 3956862f5301Smrg ;; 3957862f5301Smrg motorola) 3958862f5301Smrg need_lib_prefix=no 3959862f5301Smrg need_version=no 3960862f5301Smrg shlibpath_overrides_runpath=no 3961862f5301Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3962862f5301Smrg ;; 396344dda7b2Smrg esac 3964862f5301Smrg ;; 396544dda7b2Smrg 3966862f5301Smrgsysv4*MP*) 3967862f5301Smrg if test -d /usr/nec ;then 3968fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 3969862f5301Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 3970862f5301Smrg soname_spec='$libname${shared_ext}.$major' 3971862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3972862f5301Smrg fi 397344dda7b2Smrg ;; 397444dda7b2Smrg 3975862f5301Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3976862f5301Smrg version_type=freebsd-elf 397744dda7b2Smrg need_lib_prefix=no 397844dda7b2Smrg need_version=no 3979862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 3980862f5301Smrg soname_spec='${libname}${release}${shared_ext}$major' 3981862f5301Smrg shlibpath_var=LD_LIBRARY_PATH 3982862f5301Smrg shlibpath_overrides_runpath=yes 398344dda7b2Smrg hardcode_into_libs=yes 3984862f5301Smrg if test "$with_gnu_ld" = yes; then 3985862f5301Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 398644dda7b2Smrg else 3987862f5301Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 398844dda7b2Smrg case $host_os in 3989862f5301Smrg sco3.2v5*) 3990862f5301Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3991862f5301Smrg ;; 399244dda7b2Smrg esac 399344dda7b2Smrg fi 3994862f5301Smrg sys_lib_dlsearch_path_spec='/usr/lib' 399544dda7b2Smrg ;; 3996ff559fabSmrg 3997862f5301Smrgtpf*) 3998862f5301Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3999fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 4000862f5301Smrg need_lib_prefix=no 400144dda7b2Smrg need_version=no 400244dda7b2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 400344dda7b2Smrg shlibpath_var=LD_LIBRARY_PATH 4004862f5301Smrg shlibpath_overrides_runpath=no 4005862f5301Smrg hardcode_into_libs=yes 400644dda7b2Smrg ;; 4007ff559fabSmrg 4008862f5301Smrguts4*) 4009fc544a13Smrg version_type=linux # correct to gnu/linux during the next big refactor 4010862f5301Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 401144dda7b2Smrg soname_spec='${libname}${release}${shared_ext}$major' 401244dda7b2Smrg shlibpath_var=LD_LIBRARY_PATH 401344dda7b2Smrg ;; 401444dda7b2Smrg 4015862f5301Smrg*) 401644dda7b2Smrg dynamic_linker=no 401744dda7b2Smrg ;; 4018862f5301Smrgesac 4019862f5301SmrgAC_MSG_RESULT([$dynamic_linker]) 4020862f5301Smrgtest "$dynamic_linker" = no && can_build_shared=no 402144dda7b2Smrg 4022862f5301Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 4023862f5301Smrgif test "$GCC" = yes; then 4024862f5301Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 4025862f5301Smrgfi 402644dda7b2Smrg 4027862f5301Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 4028862f5301Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 4029862f5301Smrgfi 4030862f5301Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 4031862f5301Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 4032862f5301Smrgfi 4033ff559fabSmrg 4034862f5301Smrg_LT_DECL([], [variables_saved_for_relink], [1], 4035862f5301Smrg [Variables whose values should be saved in libtool wrapper scripts and 4036862f5301Smrg restored at link time]) 4037862f5301Smrg_LT_DECL([], [need_lib_prefix], [0], 4038862f5301Smrg [Do we need the "lib" prefix for modules?]) 4039862f5301Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 4040862f5301Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 4041862f5301Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 4042862f5301Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 4043862f5301Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 4044862f5301Smrg [Is shlibpath searched before the hard-coded library search path?]) 4045862f5301Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 4046862f5301Smrg_LT_DECL([], [library_names_spec], [1], 4047862f5301Smrg [[List of archive names. First name is the real one, the rest are links. 4048862f5301Smrg The last name is the one that the linker finds with -lNAME]]) 4049862f5301Smrg_LT_DECL([], [soname_spec], [1], 4050862f5301Smrg [[The coded name of the library, if different from the real name]]) 4051862f5301Smrg_LT_DECL([], [install_override_mode], [1], 4052862f5301Smrg [Permission mode override for installation of shared libraries]) 4053862f5301Smrg_LT_DECL([], [postinstall_cmds], [2], 4054862f5301Smrg [Command to use after installation of a shared archive]) 4055862f5301Smrg_LT_DECL([], [postuninstall_cmds], [2], 4056862f5301Smrg [Command to use after uninstallation of a shared archive]) 4057862f5301Smrg_LT_DECL([], [finish_cmds], [2], 4058862f5301Smrg [Commands used to finish a libtool library installation in a directory]) 4059862f5301Smrg_LT_DECL([], [finish_eval], [1], 4060862f5301Smrg [[As "finish_cmds", except a single script fragment to be evaled but 4061862f5301Smrg not shown]]) 4062862f5301Smrg_LT_DECL([], [hardcode_into_libs], [0], 4063862f5301Smrg [Whether we should hardcode library paths into libraries]) 4064862f5301Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 4065862f5301Smrg [Compile-time system search path for libraries]) 4066862f5301Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 4067862f5301Smrg [Run-time system search path for libraries]) 4068862f5301Smrg])# _LT_SYS_DYNAMIC_LINKER 406944dda7b2Smrg 407044dda7b2Smrg 4071862f5301Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 4072862f5301Smrg# -------------------------- 4073862f5301Smrg# find a file program which can recognize shared library 4074862f5301SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 4075862f5301Smrg[m4_require([_LT_DECL_EGREP])dnl 4076862f5301SmrgAC_MSG_CHECKING([for $1]) 4077862f5301SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4078862f5301Smrg[case $MAGIC_CMD in 4079862f5301Smrg[[\\/*] | ?:[\\/]*]) 4080862f5301Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 408144dda7b2Smrg ;; 4082862f5301Smrg*) 4083862f5301Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 4084862f5301Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4085862f5301Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 4086862f5301Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 4087862f5301Smrgdnl not every word. This closes a longstanding sh security hole. 4088862f5301Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 4089862f5301Smrg for ac_dir in $ac_dummy; do 4090862f5301Smrg IFS="$lt_save_ifs" 4091862f5301Smrg test -z "$ac_dir" && ac_dir=. 4092862f5301Smrg if test -f $ac_dir/$1; then 4093862f5301Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4094862f5301Smrg if test -n "$file_magic_test_file"; then 4095862f5301Smrg case $deplibs_check_method in 4096862f5301Smrg "file_magic "*) 4097862f5301Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4098862f5301Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4099862f5301Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4100862f5301Smrg $EGREP "$file_magic_regex" > /dev/null; then 4101862f5301Smrg : 4102862f5301Smrg else 4103862f5301Smrg cat <<_LT_EOF 1>&2 4104ff559fabSmrg 4105862f5301Smrg*** Warning: the command libtool uses to detect shared libraries, 4106862f5301Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 4107862f5301Smrg*** The result is that libtool may fail to recognize shared libraries 4108862f5301Smrg*** as such. This will affect the creation of libtool libraries that 4109862f5301Smrg*** depend on shared libraries, but programs linked with such libtool 4110862f5301Smrg*** libraries will work regardless of this problem. Nevertheless, you 4111862f5301Smrg*** may want to report the problem to your system manager and/or to 4112862f5301Smrg*** bug-libtool@gnu.org 4113ff559fabSmrg 4114862f5301Smrg_LT_EOF 4115862f5301Smrg fi ;; 4116862f5301Smrg esac 4117862f5301Smrg fi 4118862f5301Smrg break 4119862f5301Smrg fi 4120862f5301Smrg done 4121862f5301Smrg IFS="$lt_save_ifs" 4122862f5301Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 412344dda7b2Smrg ;; 4124862f5301Smrgesac]) 4125862f5301SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4126862f5301Smrgif test -n "$MAGIC_CMD"; then 4127862f5301Smrg AC_MSG_RESULT($MAGIC_CMD) 4128862f5301Smrgelse 4129862f5301Smrg AC_MSG_RESULT(no) 4130862f5301Smrgfi 4131862f5301Smrg_LT_DECL([], [MAGIC_CMD], [0], 4132862f5301Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4133862f5301Smrg])# _LT_PATH_TOOL_PREFIX 4134ff559fabSmrg 4135862f5301Smrg# Old name: 4136862f5301SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4137862f5301Smrgdnl aclocal-1.4 backwards compatibility: 4138862f5301Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4139ff559fabSmrg 4140ff559fabSmrg 4141862f5301Smrg# _LT_PATH_MAGIC 4142862f5301Smrg# -------------- 4143862f5301Smrg# find a file program which can recognize a shared library 4144862f5301Smrgm4_defun([_LT_PATH_MAGIC], 4145862f5301Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 4146862f5301Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 4147862f5301Smrg if test -n "$ac_tool_prefix"; then 4148862f5301Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 414944dda7b2Smrg else 4150862f5301Smrg MAGIC_CMD=: 415144dda7b2Smrg fi 4152862f5301Smrgfi 4153862f5301Smrg])# _LT_PATH_MAGIC 4154ff559fabSmrg 4155ff559fabSmrg 4156862f5301Smrg# LT_PATH_LD 4157862f5301Smrg# ---------- 4158862f5301Smrg# find the pathname to the GNU or non-GNU linker 4159862f5301SmrgAC_DEFUN([LT_PATH_LD], 4160862f5301Smrg[AC_REQUIRE([AC_PROG_CC])dnl 4161862f5301SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 4162862f5301SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 4163862f5301Smrgm4_require([_LT_DECL_SED])dnl 4164862f5301Smrgm4_require([_LT_DECL_EGREP])dnl 4165862f5301Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 416644dda7b2Smrg 4167862f5301SmrgAC_ARG_WITH([gnu-ld], 4168862f5301Smrg [AS_HELP_STRING([--with-gnu-ld], 4169862f5301Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4170862f5301Smrg [test "$withval" = no || with_gnu_ld=yes], 4171862f5301Smrg [with_gnu_ld=no])dnl 4172862f5301Smrg 4173862f5301Smrgac_prog=ld 4174862f5301Smrgif test "$GCC" = yes; then 4175862f5301Smrg # Check if gcc -print-prog-name=ld gives a path. 4176862f5301Smrg AC_MSG_CHECKING([for ld used by $CC]) 4177862f5301Smrg case $host in 4178862f5301Smrg *-*-mingw*) 4179862f5301Smrg # gcc leaves a trailing carriage return which upsets mingw 4180862f5301Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 4181862f5301Smrg *) 4182862f5301Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 418344dda7b2Smrg esac 4184862f5301Smrg case $ac_prog in 4185862f5301Smrg # Accept absolute paths. 4186862f5301Smrg [[\\/]]* | ?:[[\\/]]*) 4187862f5301Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 4188862f5301Smrg # Canonicalize the pathname of ld 4189862f5301Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4190862f5301Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4191862f5301Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 4192862f5301Smrg done 4193862f5301Smrg test -z "$LD" && LD="$ac_prog" 4194862f5301Smrg ;; 4195862f5301Smrg "") 4196862f5301Smrg # If it fails, then pretend we aren't using GCC. 4197862f5301Smrg ac_prog=ld 4198862f5301Smrg ;; 4199862f5301Smrg *) 4200862f5301Smrg # If it is relative, then search for the first ld in PATH. 4201862f5301Smrg with_gnu_ld=unknown 4202862f5301Smrg ;; 4203862f5301Smrg esac 4204862f5301Smrgelif test "$with_gnu_ld" = yes; then 4205862f5301Smrg AC_MSG_CHECKING([for GNU ld]) 4206862f5301Smrgelse 4207862f5301Smrg AC_MSG_CHECKING([for non-GNU ld]) 4208862f5301Smrgfi 4209862f5301SmrgAC_CACHE_VAL(lt_cv_path_LD, 4210862f5301Smrg[if test -z "$LD"; then 4211862f5301Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4212862f5301Smrg for ac_dir in $PATH; do 4213862f5301Smrg IFS="$lt_save_ifs" 4214862f5301Smrg test -z "$ac_dir" && ac_dir=. 4215862f5301Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 4216862f5301Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 4217862f5301Smrg # Check to see if the program is GNU ld. I'd rather use --version, 4218862f5301Smrg # but apparently some variants of GNU ld only accept -v. 4219862f5301Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 4220862f5301Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 4221862f5301Smrg *GNU* | *'with BFD'*) 4222862f5301Smrg test "$with_gnu_ld" != no && break 422344dda7b2Smrg ;; 422444dda7b2Smrg *) 4225862f5301Smrg test "$with_gnu_ld" != yes && break 422644dda7b2Smrg ;; 42277a3b38f7Smrg esac 4228862f5301Smrg fi 4229862f5301Smrg done 4230862f5301Smrg IFS="$lt_save_ifs" 4231862f5301Smrgelse 4232862f5301Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 4233862f5301Smrgfi]) 4234862f5301SmrgLD="$lt_cv_path_LD" 4235862f5301Smrgif test -n "$LD"; then 4236862f5301Smrg AC_MSG_RESULT($LD) 4237862f5301Smrgelse 4238862f5301Smrg AC_MSG_RESULT(no) 4239862f5301Smrgfi 4240862f5301Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4241862f5301Smrg_LT_PATH_LD_GNU 4242862f5301SmrgAC_SUBST([LD]) 4243ff559fabSmrg 4244862f5301Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4245862f5301Smrg])# LT_PATH_LD 4246ff559fabSmrg 4247862f5301Smrg# Old names: 4248862f5301SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4249862f5301SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4250862f5301Smrgdnl aclocal-1.4 backwards compatibility: 4251862f5301Smrgdnl AC_DEFUN([AM_PROG_LD], []) 4252862f5301Smrgdnl AC_DEFUN([AC_PROG_LD], []) 4253ff559fabSmrg 4254ff559fabSmrg 4255862f5301Smrg# _LT_PATH_LD_GNU 4256862f5301Smrg#- -------------- 4257862f5301Smrgm4_defun([_LT_PATH_LD_GNU], 4258862f5301Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 4259862f5301Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 4260862f5301Smrgcase `$LD -v 2>&1 </dev/null` in 4261862f5301Smrg*GNU* | *'with BFD'*) 4262862f5301Smrg lt_cv_prog_gnu_ld=yes 426344dda7b2Smrg ;; 4264862f5301Smrg*) 4265862f5301Smrg lt_cv_prog_gnu_ld=no 426644dda7b2Smrg ;; 4267862f5301Smrgesac]) 4268862f5301Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 4269862f5301Smrg])# _LT_PATH_LD_GNU 4270ff559fabSmrg 4271862f5301Smrg 4272862f5301Smrg# _LT_CMD_RELOAD 4273862f5301Smrg# -------------- 4274862f5301Smrg# find reload flag for linker 4275862f5301Smrg# -- PORTME Some linkers may need a different reload flag. 4276862f5301Smrgm4_defun([_LT_CMD_RELOAD], 4277862f5301Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 4278862f5301Smrg lt_cv_ld_reload_flag, 4279862f5301Smrg [lt_cv_ld_reload_flag='-r']) 4280862f5301Smrgreload_flag=$lt_cv_ld_reload_flag 4281862f5301Smrgcase $reload_flag in 4282862f5301Smrg"" | " "*) ;; 4283862f5301Smrg*) reload_flag=" $reload_flag" ;; 4284862f5301Smrgesac 4285862f5301Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 4286862f5301Smrgcase $host_os in 4287862f5301Smrg cygwin* | mingw* | pw32* | cegcc*) 4288862f5301Smrg if test "$GCC" != yes; then 4289862f5301Smrg reload_cmds=false 4290862f5301Smrg fi 4291862f5301Smrg ;; 4292862f5301Smrg darwin*) 4293862f5301Smrg if test "$GCC" = yes; then 4294862f5301Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 4295862f5301Smrg else 4296862f5301Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 4297862f5301Smrg fi 4298862f5301Smrg ;; 4299862f5301Smrgesac 4300862f5301Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 4301862f5301Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 4302862f5301Smrg])# _LT_CMD_RELOAD 4303862f5301Smrg 4304862f5301Smrg 4305862f5301Smrg# _LT_CHECK_MAGIC_METHOD 4306862f5301Smrg# ---------------------- 4307862f5301Smrg# how to check for library dependencies 4308862f5301Smrg# -- PORTME fill in with the dynamic library characteristics 4309862f5301Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 4310862f5301Smrg[m4_require([_LT_DECL_EGREP]) 4311862f5301Smrgm4_require([_LT_DECL_OBJDUMP]) 4312862f5301SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 4313862f5301Smrglt_cv_deplibs_check_method, 4314862f5301Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 4315862f5301Smrglt_cv_file_magic_test_file= 4316862f5301Smrglt_cv_deplibs_check_method='unknown' 4317862f5301Smrg# Need to set the preceding variable on all platforms that support 4318862f5301Smrg# interlibrary dependencies. 4319862f5301Smrg# 'none' -- dependencies not supported. 4320862f5301Smrg# `unknown' -- same as none, but documents that we really don't know. 4321862f5301Smrg# 'pass_all' -- all dependencies passed with no checks. 4322862f5301Smrg# 'test_compile' -- check by making test program. 4323862f5301Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 4324862f5301Smrg# which responds to the $file_magic_cmd with a given extended regex. 4325862f5301Smrg# If you have `file' or equivalent on your system and you're not sure 4326862f5301Smrg# whether `pass_all' will *always* work, you probably want this one. 4327862f5301Smrg 4328862f5301Smrgcase $host_os in 4329862f5301Smrgaix[[4-9]]*) 4330862f5301Smrg lt_cv_deplibs_check_method=pass_all 433144dda7b2Smrg ;; 4332ff559fabSmrg 4333862f5301Smrgbeos*) 4334862f5301Smrg lt_cv_deplibs_check_method=pass_all 433544dda7b2Smrg ;; 4336ff559fabSmrg 4337862f5301Smrgbsdi[[45]]*) 4338862f5301Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 4339862f5301Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 4340862f5301Smrg lt_cv_file_magic_test_file=/shlib/libc.so 4341862f5301Smrg ;; 4342862f5301Smrg 4343862f5301Smrgcygwin*) 4344862f5301Smrg # func_win32_libid is a shell function defined in ltmain.sh 4345862f5301Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4346862f5301Smrg lt_cv_file_magic_cmd='func_win32_libid' 4347862f5301Smrg ;; 4348862f5301Smrg 4349862f5301Smrgmingw* | pw32*) 4350862f5301Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 4351862f5301Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 4352862f5301Smrg # unless we find 'file', for example because we are cross-compiling. 4353862f5301Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 4354862f5301Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 4355862f5301Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 4356862f5301Smrg lt_cv_file_magic_cmd='func_win32_libid' 435744dda7b2Smrg else 4358862f5301Smrg # Keep this pattern in sync with the one in func_win32_libid. 4359862f5301Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 4360862f5301Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 436144dda7b2Smrg fi 436244dda7b2Smrg ;; 4363ff559fabSmrg 4364862f5301Smrgcegcc*) 4365862f5301Smrg # use the weaker test based on 'objdump'. See mingw*. 4366862f5301Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4367862f5301Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 436844dda7b2Smrg ;; 4369ff559fabSmrg 4370862f5301Smrgdarwin* | rhapsody*) 4371862f5301Smrg lt_cv_deplibs_check_method=pass_all 437244dda7b2Smrg ;; 4373ff559fabSmrg 4374862f5301Smrgfreebsd* | dragonfly*) 4375862f5301Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4376862f5301Smrg case $host_cpu in 4377862f5301Smrg i*86 ) 4378862f5301Smrg # Not sure whether the presence of OpenBSD here was a mistake. 4379862f5301Smrg # Let's accept both of them until this is cleared up. 4380862f5301Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 4381862f5301Smrg lt_cv_file_magic_cmd=/usr/bin/file 4382862f5301Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4383862f5301Smrg ;; 4384862f5301Smrg esac 4385862f5301Smrg else 4386862f5301Smrg lt_cv_deplibs_check_method=pass_all 4387862f5301Smrg fi 438844dda7b2Smrg ;; 4389ff559fabSmrg 4390862f5301Smrggnu*) 4391862f5301Smrg lt_cv_deplibs_check_method=pass_all 4392862f5301Smrg ;; 4393ff559fabSmrg 4394862f5301Smrghaiku*) 4395862f5301Smrg lt_cv_deplibs_check_method=pass_all 4396862f5301Smrg ;; 4397ff559fabSmrg 4398862f5301Smrghpux10.20* | hpux11*) 4399862f5301Smrg lt_cv_file_magic_cmd=/usr/bin/file 4400862f5301Smrg case $host_cpu in 4401862f5301Smrg ia64*) 4402862f5301Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 4403862f5301Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 4404862f5301Smrg ;; 4405862f5301Smrg hppa*64*) 4406862f5301Smrg [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]'] 4407862f5301Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4408862f5301Smrg ;; 4409862f5301Smrg *) 4410862f5301Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 4411862f5301Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 4412862f5301Smrg ;; 4413862f5301Smrg esac 4414862f5301Smrg ;; 4415ff559fabSmrg 4416862f5301Smrginterix[[3-9]]*) 4417862f5301Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 4418862f5301Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 441944dda7b2Smrg ;; 4420ff559fabSmrg 4421862f5301Smrgirix5* | irix6* | nonstopux*) 4422862f5301Smrg case $LD in 4423862f5301Smrg *-32|*"-32 ") libmagic=32-bit;; 4424862f5301Smrg *-n32|*"-n32 ") libmagic=N32;; 4425862f5301Smrg *-64|*"-64 ") libmagic=64-bit;; 4426862f5301Smrg *) libmagic=never-match;; 4427862f5301Smrg esac 4428862f5301Smrg lt_cv_deplibs_check_method=pass_all 4429862f5301Smrg ;; 443044dda7b2Smrg 4431fc544a13Smrg# This must be glibc/ELF. 4432862f5301Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 4433862f5301Smrg lt_cv_deplibs_check_method=pass_all 443444dda7b2Smrg ;; 443544dda7b2Smrg 4436862f5301Smrgnetbsd*) 4437862f5301Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 4438862f5301Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4439862f5301Smrg else 4440862f5301Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 4441862f5301Smrg fi 4442862f5301Smrg ;; 4443ff559fabSmrg 4444862f5301Smrgnewos6*) 4445862f5301Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 4446862f5301Smrg lt_cv_file_magic_cmd=/usr/bin/file 4447862f5301Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 4448862f5301Smrg ;; 4449ff559fabSmrg 4450862f5301Smrg*nto* | *qnx*) 4451862f5301Smrg lt_cv_deplibs_check_method=pass_all 4452862f5301Smrg ;; 4453862f5301Smrg 4454862f5301Smrgopenbsd*) 4455862f5301Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4456862f5301Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 445744dda7b2Smrg else 4458862f5301Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 445944dda7b2Smrg fi 4460862f5301Smrg ;; 4461ff559fabSmrg 4462862f5301Smrgosf3* | osf4* | osf5*) 4463862f5301Smrg lt_cv_deplibs_check_method=pass_all 4464862f5301Smrg ;; 4465ff559fabSmrg 4466862f5301Smrgrdos*) 4467862f5301Smrg lt_cv_deplibs_check_method=pass_all 4468862f5301Smrg ;; 4469ff559fabSmrg 4470862f5301Smrgsolaris*) 4471862f5301Smrg lt_cv_deplibs_check_method=pass_all 4472862f5301Smrg ;; 4473ff559fabSmrg 4474862f5301Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4475862f5301Smrg lt_cv_deplibs_check_method=pass_all 4476862f5301Smrg ;; 4477862f5301Smrg 4478862f5301Smrgsysv4 | sysv4.3*) 4479862f5301Smrg case $host_vendor in 4480862f5301Smrg motorola) 4481862f5301Smrg 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]]' 4482862f5301Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 448344dda7b2Smrg ;; 4484862f5301Smrg ncr) 4485862f5301Smrg lt_cv_deplibs_check_method=pass_all 4486862f5301Smrg ;; 4487862f5301Smrg sequent) 4488862f5301Smrg lt_cv_file_magic_cmd='/bin/file' 4489862f5301Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 4490862f5301Smrg ;; 4491862f5301Smrg sni) 4492862f5301Smrg lt_cv_file_magic_cmd='/bin/file' 4493862f5301Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 4494862f5301Smrg lt_cv_file_magic_test_file=/lib/libc.so 4495862f5301Smrg ;; 4496862f5301Smrg siemens) 4497862f5301Smrg lt_cv_deplibs_check_method=pass_all 4498862f5301Smrg ;; 4499862f5301Smrg pc) 4500862f5301Smrg lt_cv_deplibs_check_method=pass_all 450144dda7b2Smrg ;; 450244dda7b2Smrg esac 450344dda7b2Smrg ;; 450444dda7b2Smrg 4505862f5301Smrgtpf*) 4506862f5301Smrg lt_cv_deplibs_check_method=pass_all 4507862f5301Smrg ;; 450844dda7b2Smrgesac 4509862f5301Smrg]) 4510862f5301Smrg 4511862f5301Smrgfile_magic_glob= 4512862f5301Smrgwant_nocaseglob=no 4513862f5301Smrgif test "$build" = "$host"; then 4514862f5301Smrg case $host_os in 4515862f5301Smrg mingw* | pw32*) 4516862f5301Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 4517862f5301Smrg want_nocaseglob=yes 451844dda7b2Smrg else 4519862f5301Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 452044dda7b2Smrg fi 452144dda7b2Smrg ;; 4522862f5301Smrg esac 4523862f5301Smrgfi 4524ff559fabSmrg 4525862f5301Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 4526862f5301Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 4527862f5301Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4528ff559fabSmrg 452944dda7b2Smrg_LT_DECL([], [deplibs_check_method], [1], 453044dda7b2Smrg [Method to check whether dependent libraries are shared objects]) 453144dda7b2Smrg_LT_DECL([], [file_magic_cmd], [1], 4532862f5301Smrg [Command to use when deplibs_check_method = "file_magic"]) 4533862f5301Smrg_LT_DECL([], [file_magic_glob], [1], 4534862f5301Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 4535862f5301Smrg_LT_DECL([], [want_nocaseglob], [1], 4536862f5301Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 453744dda7b2Smrg])# _LT_CHECK_MAGIC_METHOD 4538ff559fabSmrg 4539ff559fabSmrg 454044dda7b2Smrg# LT_PATH_NM 454144dda7b2Smrg# ---------- 454244dda7b2Smrg# find the pathname to a BSD- or MS-compatible name lister 454344dda7b2SmrgAC_DEFUN([LT_PATH_NM], 454444dda7b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 454544dda7b2SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 454644dda7b2Smrg[if test -n "$NM"; then 454744dda7b2Smrg # Let the user override the test. 454844dda7b2Smrg lt_cv_path_NM="$NM" 45497a3b38f7Smrgelse 455044dda7b2Smrg lt_nm_to_check="${ac_tool_prefix}nm" 455144dda7b2Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 455244dda7b2Smrg lt_nm_to_check="$lt_nm_to_check nm" 455344dda7b2Smrg fi 455444dda7b2Smrg for lt_tmp_nm in $lt_nm_to_check; do 455544dda7b2Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 455644dda7b2Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 455744dda7b2Smrg IFS="$lt_save_ifs" 455844dda7b2Smrg test -z "$ac_dir" && ac_dir=. 455944dda7b2Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 456044dda7b2Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 456144dda7b2Smrg # Check to see if the nm accepts a BSD-compat flag. 456244dda7b2Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 456344dda7b2Smrg # nm: unknown option "B" ignored 456444dda7b2Smrg # Tru64's nm complains that /dev/null is an invalid object file 456544dda7b2Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 456644dda7b2Smrg */dev/null* | *'Invalid file or object type'*) 456744dda7b2Smrg lt_cv_path_NM="$tmp_nm -B" 456844dda7b2Smrg break 456944dda7b2Smrg ;; 457044dda7b2Smrg *) 457144dda7b2Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 457244dda7b2Smrg */dev/null*) 457344dda7b2Smrg lt_cv_path_NM="$tmp_nm -p" 457444dda7b2Smrg break 457544dda7b2Smrg ;; 457644dda7b2Smrg *) 457744dda7b2Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 457844dda7b2Smrg continue # so that we can try to find one that supports BSD flags 457944dda7b2Smrg ;; 458044dda7b2Smrg esac 458144dda7b2Smrg ;; 458244dda7b2Smrg esac 458344dda7b2Smrg fi 458444dda7b2Smrg done 458544dda7b2Smrg IFS="$lt_save_ifs" 458644dda7b2Smrg done 458744dda7b2Smrg : ${lt_cv_path_NM=no} 458844dda7b2Smrgfi]) 458944dda7b2Smrgif test "$lt_cv_path_NM" != "no"; then 459044dda7b2Smrg NM="$lt_cv_path_NM" 459144dda7b2Smrgelse 459244dda7b2Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 459344dda7b2Smrg if test -n "$DUMPBIN"; then : 459444dda7b2Smrg # Let the user override the test. 459544dda7b2Smrg else 459644dda7b2Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 459744dda7b2Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 459844dda7b2Smrg *COFF*) 459944dda7b2Smrg DUMPBIN="$DUMPBIN -symbols" 460044dda7b2Smrg ;; 460144dda7b2Smrg *) 460244dda7b2Smrg DUMPBIN=: 460344dda7b2Smrg ;; 460444dda7b2Smrg esac 460544dda7b2Smrg fi 460644dda7b2Smrg AC_SUBST([DUMPBIN]) 460744dda7b2Smrg if test "$DUMPBIN" != ":"; then 460844dda7b2Smrg NM="$DUMPBIN" 460944dda7b2Smrg fi 46107a3b38f7Smrgfi 461144dda7b2Smrgtest -z "$NM" && NM=nm 461244dda7b2SmrgAC_SUBST([NM]) 461344dda7b2Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 461444dda7b2Smrg 461544dda7b2SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 461644dda7b2Smrg [lt_cv_nm_interface="BSD nm" 461744dda7b2Smrg echo "int some_variable = 0;" > conftest.$ac_ext 461844dda7b2Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 461944dda7b2Smrg (eval "$ac_compile" 2>conftest.err) 462044dda7b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 462144dda7b2Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 462244dda7b2Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 462344dda7b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 462444dda7b2Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 462544dda7b2Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 462644dda7b2Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 462744dda7b2Smrg lt_cv_nm_interface="MS dumpbin" 462844dda7b2Smrg fi 462944dda7b2Smrg rm -f conftest*]) 463044dda7b2Smrg])# LT_PATH_NM 4631ff559fabSmrg 463244dda7b2Smrg# Old names: 463344dda7b2SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 463444dda7b2SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 46357a3b38f7Smrgdnl aclocal-1.4 backwards compatibility: 463644dda7b2Smrgdnl AC_DEFUN([AM_PROG_NM], []) 463744dda7b2Smrgdnl AC_DEFUN([AC_PROG_NM], []) 4638ff559fabSmrg 4639862f5301Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4640862f5301Smrg# -------------------------------- 4641862f5301Smrg# how to determine the name of the shared library 4642862f5301Smrg# associated with a specific link library. 4643862f5301Smrg# -- PORTME fill in with the dynamic library characteristics 4644862f5301Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 4645862f5301Smrg[m4_require([_LT_DECL_EGREP]) 4646862f5301Smrgm4_require([_LT_DECL_OBJDUMP]) 4647862f5301Smrgm4_require([_LT_DECL_DLLTOOL]) 4648862f5301SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 4649862f5301Smrglt_cv_sharedlib_from_linklib_cmd, 4650862f5301Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4651862f5301Smrg 4652862f5301Smrgcase $host_os in 4653862f5301Smrgcygwin* | mingw* | pw32* | cegcc*) 4654862f5301Smrg # two different shell functions defined in ltmain.sh 4655862f5301Smrg # decide which to use based on capabilities of $DLLTOOL 4656862f5301Smrg case `$DLLTOOL --help 2>&1` in 4657862f5301Smrg *--identify-strict*) 4658862f5301Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 4659862f5301Smrg ;; 4660862f5301Smrg *) 4661862f5301Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 4662862f5301Smrg ;; 4663862f5301Smrg esac 4664862f5301Smrg ;; 4665862f5301Smrg*) 4666862f5301Smrg # fallback: assume linklib IS sharedlib 4667862f5301Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 4668862f5301Smrg ;; 4669862f5301Smrgesac 4670862f5301Smrg]) 4671862f5301Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 4672862f5301Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4673862f5301Smrg 4674862f5301Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 4675862f5301Smrg [Command to associate shared and link libraries]) 4676862f5301Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4677862f5301Smrg 4678862f5301Smrg 4679862f5301Smrg# _LT_PATH_MANIFEST_TOOL 4680862f5301Smrg# ---------------------- 4681862f5301Smrg# locate the manifest tool 4682862f5301Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 4683862f5301Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 4684862f5301Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 4685862f5301SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 4686862f5301Smrg [lt_cv_path_mainfest_tool=no 4687862f5301Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 4688862f5301Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 4689862f5301Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 4690862f5301Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 4691862f5301Smrg lt_cv_path_mainfest_tool=yes 4692862f5301Smrg fi 4693862f5301Smrg rm -f conftest*]) 4694862f5301Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 4695862f5301Smrg MANIFEST_TOOL=: 4696862f5301Smrgfi 4697862f5301Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 4698862f5301Smrg])# _LT_PATH_MANIFEST_TOOL 4699862f5301Smrg 4700ff559fabSmrg 470144dda7b2Smrg# LT_LIB_M 470244dda7b2Smrg# -------- 470344dda7b2Smrg# check for math library 470444dda7b2SmrgAC_DEFUN([LT_LIB_M], 470544dda7b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 470644dda7b2SmrgLIBM= 470744dda7b2Smrgcase $host in 470844dda7b2Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 470944dda7b2Smrg # These system don't have libm, or don't need it 471044dda7b2Smrg ;; 471144dda7b2Smrg*-ncr-sysv4.3*) 471244dda7b2Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 471344dda7b2Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 471444dda7b2Smrg ;; 471544dda7b2Smrg*) 471644dda7b2Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 471744dda7b2Smrg ;; 471844dda7b2Smrgesac 471944dda7b2SmrgAC_SUBST([LIBM]) 472044dda7b2Smrg])# LT_LIB_M 472144dda7b2Smrg 472244dda7b2Smrg# Old name: 472344dda7b2SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 472444dda7b2Smrgdnl aclocal-1.4 backwards compatibility: 472544dda7b2Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 47267a3b38f7Smrg 4727ff559fabSmrg 472844dda7b2Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 472944dda7b2Smrg# ------------------------------- 473044dda7b2Smrgm4_defun([_LT_COMPILER_NO_RTTI], 473144dda7b2Smrg[m4_require([_LT_TAG_COMPILER])dnl 4732ff559fabSmrg 473344dda7b2Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 47347a3b38f7Smrg 473544dda7b2Smrgif test "$GCC" = yes; then 473644dda7b2Smrg case $cc_basename in 473744dda7b2Smrg nvcc*) 473844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 473944dda7b2Smrg *) 474044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 474144dda7b2Smrg esac 47427a3b38f7Smrg 474344dda7b2Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 474444dda7b2Smrg lt_cv_prog_compiler_rtti_exceptions, 474544dda7b2Smrg [-fno-rtti -fno-exceptions], [], 474644dda7b2Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 474744dda7b2Smrgfi 474844dda7b2Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 474944dda7b2Smrg [Compiler flag to turn off builtin functions]) 475044dda7b2Smrg])# _LT_COMPILER_NO_RTTI 47517a3b38f7Smrg 47527a3b38f7Smrg 475344dda7b2Smrg# _LT_CMD_GLOBAL_SYMBOLS 475444dda7b2Smrg# ---------------------- 475544dda7b2Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 475644dda7b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 475744dda7b2SmrgAC_REQUIRE([AC_PROG_CC])dnl 475844dda7b2SmrgAC_REQUIRE([AC_PROG_AWK])dnl 475944dda7b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 476044dda7b2SmrgAC_REQUIRE([LT_PATH_LD])dnl 476144dda7b2Smrgm4_require([_LT_DECL_SED])dnl 476244dda7b2Smrgm4_require([_LT_DECL_EGREP])dnl 476344dda7b2Smrgm4_require([_LT_TAG_COMPILER])dnl 47647a3b38f7Smrg 476544dda7b2Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 476644dda7b2SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 476744dda7b2SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 476844dda7b2Smrg[ 476944dda7b2Smrg# These are sane defaults that work on at least a few old systems. 477044dda7b2Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4771ff559fabSmrg 477244dda7b2Smrg# Character class describing NM global symbol codes. 477344dda7b2Smrgsymcode='[[BCDEGRST]]' 4774ff559fabSmrg 477544dda7b2Smrg# Regexp to match symbols that can be accessed directly from C. 477644dda7b2Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4777ff559fabSmrg 477844dda7b2Smrg# Define system-specific variables. 477944dda7b2Smrgcase $host_os in 478044dda7b2Smrgaix*) 478144dda7b2Smrg symcode='[[BCDT]]' 478244dda7b2Smrg ;; 478344dda7b2Smrgcygwin* | mingw* | pw32* | cegcc*) 478444dda7b2Smrg symcode='[[ABCDGISTW]]' 478544dda7b2Smrg ;; 478644dda7b2Smrghpux*) 478744dda7b2Smrg if test "$host_cpu" = ia64; then 478844dda7b2Smrg symcode='[[ABCDEGRST]]' 478944dda7b2Smrg fi 479044dda7b2Smrg ;; 479144dda7b2Smrgirix* | nonstopux*) 479244dda7b2Smrg symcode='[[BCDEGRST]]' 479344dda7b2Smrg ;; 479444dda7b2Smrgosf*) 479544dda7b2Smrg symcode='[[BCDEGQRST]]' 479644dda7b2Smrg ;; 479744dda7b2Smrgsolaris*) 479844dda7b2Smrg symcode='[[BDRT]]' 479944dda7b2Smrg ;; 480044dda7b2Smrgsco3.2v5*) 480144dda7b2Smrg symcode='[[DT]]' 480244dda7b2Smrg ;; 480344dda7b2Smrgsysv4.2uw2*) 480444dda7b2Smrg symcode='[[DT]]' 480544dda7b2Smrg ;; 480644dda7b2Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 480744dda7b2Smrg symcode='[[ABDT]]' 480844dda7b2Smrg ;; 480944dda7b2Smrgsysv4) 481044dda7b2Smrg symcode='[[DFNSTU]]' 481144dda7b2Smrg ;; 481244dda7b2Smrgesac 4813ff559fabSmrg 481444dda7b2Smrg# If we're using GNU nm, then use its standard symbol codes. 481544dda7b2Smrgcase `$NM -V 2>&1` in 481644dda7b2Smrg*GNU* | *'with BFD'*) 481744dda7b2Smrg symcode='[[ABCDGIRSTW]]' ;; 481844dda7b2Smrgesac 4819ff559fabSmrg 482044dda7b2Smrg# Transform an extracted symbol line into a proper C declaration. 482144dda7b2Smrg# Some systems (esp. on ia64) link data and code symbols differently, 482244dda7b2Smrg# so use this general approach. 482344dda7b2Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4824ff559fabSmrg 482544dda7b2Smrg# Transform an extracted symbol line into symbol name and symbol address 4826862f5301Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 4827862f5301Smrglt_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'" 4828ff559fabSmrg 482944dda7b2Smrg# Handle CRLF in mingw tool chain 483044dda7b2Smrgopt_cr= 483144dda7b2Smrgcase $build_os in 483244dda7b2Smrgmingw*) 483344dda7b2Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 483444dda7b2Smrg ;; 483544dda7b2Smrgesac 48367a3b38f7Smrg 483744dda7b2Smrg# Try without a prefix underscore, then with it. 483844dda7b2Smrgfor ac_symprfx in "" "_"; do 4839ff559fabSmrg 484044dda7b2Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 484144dda7b2Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4842ff559fabSmrg 484344dda7b2Smrg # Write the raw and C identifiers. 484444dda7b2Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 484544dda7b2Smrg # Fake it for dumpbin and say T for any non-static function 484644dda7b2Smrg # and D for any global variable. 484744dda7b2Smrg # Also find C++ and __fastcall symbols from MSVC++, 484844dda7b2Smrg # which start with @ or ?. 484944dda7b2Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 485044dda7b2Smrg" {last_section=section; section=\$ 3};"\ 4851fc544a13Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 485244dda7b2Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 485344dda7b2Smrg" \$ 0!~/External *\|/{next};"\ 485444dda7b2Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 485544dda7b2Smrg" {if(hide[section]) next};"\ 485644dda7b2Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 485744dda7b2Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 485844dda7b2Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 485944dda7b2Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 486044dda7b2Smrg" ' prfx=^$ac_symprfx]" 486144dda7b2Smrg else 486244dda7b2Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 486344dda7b2Smrg fi 4864862f5301Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4865ff559fabSmrg 486644dda7b2Smrg # Check to see that the pipe works correctly. 486744dda7b2Smrg pipe_works=no 48687a3b38f7Smrg 486944dda7b2Smrg rm -f conftest* 487044dda7b2Smrg cat > conftest.$ac_ext <<_LT_EOF 487144dda7b2Smrg#ifdef __cplusplus 487244dda7b2Smrgextern "C" { 487344dda7b2Smrg#endif 487444dda7b2Smrgchar nm_test_var; 487544dda7b2Smrgvoid nm_test_func(void); 487644dda7b2Smrgvoid nm_test_func(void){} 487744dda7b2Smrg#ifdef __cplusplus 487844dda7b2Smrg} 487944dda7b2Smrg#endif 488044dda7b2Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 488144dda7b2Smrg_LT_EOF 4882ff559fabSmrg 488344dda7b2Smrg if AC_TRY_EVAL(ac_compile); then 488444dda7b2Smrg # Now try to grab the symbols. 488544dda7b2Smrg nlist=conftest.nm 488644dda7b2Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 488744dda7b2Smrg # Try sorting and uniquifying the output. 488844dda7b2Smrg if sort "$nlist" | uniq > "$nlist"T; then 488944dda7b2Smrg mv -f "$nlist"T "$nlist" 489044dda7b2Smrg else 489144dda7b2Smrg rm -f "$nlist"T 489244dda7b2Smrg fi 4893ff559fabSmrg 489444dda7b2Smrg # Make sure that we snagged all the symbols we need. 489544dda7b2Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 489644dda7b2Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 489744dda7b2Smrg cat <<_LT_EOF > conftest.$ac_ext 4898862f5301Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4899862f5301Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 4900862f5301Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 4901862f5301Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4902862f5301Smrg# define LT@&t@_DLSYM_CONST 4903862f5301Smrg#elif defined(__osf__) 4904862f5301Smrg/* This system does not cope well with relocations in const data. */ 4905862f5301Smrg# define LT@&t@_DLSYM_CONST 4906862f5301Smrg#else 4907862f5301Smrg# define LT@&t@_DLSYM_CONST const 4908862f5301Smrg#endif 4909862f5301Smrg 491044dda7b2Smrg#ifdef __cplusplus 491144dda7b2Smrgextern "C" { 491244dda7b2Smrg#endif 49137a3b38f7Smrg 491444dda7b2Smrg_LT_EOF 491544dda7b2Smrg # Now generate the symbol file. 491644dda7b2Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 49177a3b38f7Smrg 491844dda7b2Smrg cat <<_LT_EOF >> conftest.$ac_ext 4919ff559fabSmrg 492044dda7b2Smrg/* The mapping between symbol names and symbols. */ 4921862f5301SmrgLT@&t@_DLSYM_CONST struct { 492244dda7b2Smrg const char *name; 492344dda7b2Smrg void *address; 492444dda7b2Smrg} 492544dda7b2Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 492644dda7b2Smrg{ 492744dda7b2Smrg { "@PROGRAM@", (void *) 0 }, 492844dda7b2Smrg_LT_EOF 492944dda7b2Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 493044dda7b2Smrg cat <<\_LT_EOF >> conftest.$ac_ext 493144dda7b2Smrg {0, (void *) 0} 493244dda7b2Smrg}; 49337a3b38f7Smrg 493444dda7b2Smrg/* This works around a problem in FreeBSD linker */ 493544dda7b2Smrg#ifdef FREEBSD_WORKAROUND 493644dda7b2Smrgstatic const void *lt_preloaded_setup() { 493744dda7b2Smrg return lt__PROGRAM__LTX_preloaded_symbols; 493844dda7b2Smrg} 493944dda7b2Smrg#endif 4940ff559fabSmrg 494144dda7b2Smrg#ifdef __cplusplus 494244dda7b2Smrg} 494344dda7b2Smrg#endif 494444dda7b2Smrg_LT_EOF 494544dda7b2Smrg # Now try linking the two files. 494644dda7b2Smrg mv conftest.$ac_objext conftstm.$ac_objext 4947862f5301Smrg lt_globsym_save_LIBS=$LIBS 4948862f5301Smrg lt_globsym_save_CFLAGS=$CFLAGS 494944dda7b2Smrg LIBS="conftstm.$ac_objext" 495044dda7b2Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 495144dda7b2Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 495244dda7b2Smrg pipe_works=yes 495344dda7b2Smrg fi 4954862f5301Smrg LIBS=$lt_globsym_save_LIBS 4955862f5301Smrg CFLAGS=$lt_globsym_save_CFLAGS 49567a3b38f7Smrg else 495744dda7b2Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49587a3b38f7Smrg fi 495944dda7b2Smrg else 496044dda7b2Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 496144dda7b2Smrg fi 496244dda7b2Smrg else 496344dda7b2Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 496444dda7b2Smrg fi 496544dda7b2Smrg else 496644dda7b2Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 496744dda7b2Smrg cat conftest.$ac_ext >&5 496844dda7b2Smrg fi 496944dda7b2Smrg rm -rf conftest* conftst* 4970ff559fabSmrg 497144dda7b2Smrg # Do not use the global_symbol_pipe unless it works. 497244dda7b2Smrg if test "$pipe_works" = yes; then 497344dda7b2Smrg break 497444dda7b2Smrg else 497544dda7b2Smrg lt_cv_sys_global_symbol_pipe= 497644dda7b2Smrg fi 497744dda7b2Smrgdone 497844dda7b2Smrg]) 497944dda7b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 498044dda7b2Smrg lt_cv_sys_global_symbol_to_cdecl= 498144dda7b2Smrgfi 498244dda7b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 498344dda7b2Smrg AC_MSG_RESULT(failed) 498444dda7b2Smrgelse 498544dda7b2Smrg AC_MSG_RESULT(ok) 498644dda7b2Smrgfi 4987ff559fabSmrg 4988862f5301Smrg# Response file support. 4989862f5301Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4990862f5301Smrg nm_file_list_spec='@' 4991862f5301Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4992862f5301Smrg nm_file_list_spec='@' 4993862f5301Smrgfi 4994862f5301Smrg 499544dda7b2Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 499644dda7b2Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 499744dda7b2Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 499844dda7b2Smrg [Transform the output of nm in a proper C declaration]) 499944dda7b2Smrg_LT_DECL([global_symbol_to_c_name_address], 500044dda7b2Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 500144dda7b2Smrg [Transform the output of nm in a C name address pair]) 500244dda7b2Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 500344dda7b2Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 500444dda7b2Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 5005862f5301Smrg_LT_DECL([], [nm_file_list_spec], [1], 5006862f5301Smrg [Specify filename containing input files for $NM]) 500744dda7b2Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 5008ff559fabSmrg 5009ff559fabSmrg 501044dda7b2Smrg# _LT_COMPILER_PIC([TAGNAME]) 501144dda7b2Smrg# --------------------------- 501244dda7b2Smrgm4_defun([_LT_COMPILER_PIC], 501344dda7b2Smrg[m4_require([_LT_TAG_COMPILER])dnl 501444dda7b2Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 501544dda7b2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 501644dda7b2Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 5017ff559fabSmrg 501844dda7b2Smrgm4_if([$1], [CXX], [ 501944dda7b2Smrg # C++ specific cases for pic, static, wl, etc. 502044dda7b2Smrg if test "$GXX" = yes; then 502144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 502244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5023ff559fabSmrg 502444dda7b2Smrg case $host_os in 502544dda7b2Smrg aix*) 502644dda7b2Smrg # All AIX code is PIC. 502744dda7b2Smrg if test "$host_cpu" = ia64; then 502844dda7b2Smrg # AIX 5 now supports IA64 processor 502944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 503044dda7b2Smrg fi 503144dda7b2Smrg ;; 50327a3b38f7Smrg 503344dda7b2Smrg amigaos*) 503444dda7b2Smrg case $host_cpu in 503544dda7b2Smrg powerpc) 503644dda7b2Smrg # see comment about AmigaOS4 .so support 503744dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50387a3b38f7Smrg ;; 503944dda7b2Smrg m68k) 504044dda7b2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 504144dda7b2Smrg # adding the `-m68020' flag to GCC prevents building anything better, 504244dda7b2Smrg # like `-m68040'. 504344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50447a3b38f7Smrg ;; 504544dda7b2Smrg esac 504644dda7b2Smrg ;; 5047ff559fabSmrg 504844dda7b2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 504944dda7b2Smrg # PIC is the default for these OSes. 505044dda7b2Smrg ;; 505144dda7b2Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 505244dda7b2Smrg # This hack is so that the source file can tell whether it is being 505344dda7b2Smrg # built for inclusion in a dll (and should export symbols for example). 505444dda7b2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 505544dda7b2Smrg # (--disable-auto-import) libraries 505644dda7b2Smrg m4_if([$1], [GCJ], [], 505744dda7b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 505844dda7b2Smrg ;; 505944dda7b2Smrg darwin* | rhapsody*) 506044dda7b2Smrg # PIC is the default on this platform 506144dda7b2Smrg # Common symbols not allowed in MH_DYLIB files 506244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 506344dda7b2Smrg ;; 506444dda7b2Smrg *djgpp*) 506544dda7b2Smrg # DJGPP does not support shared libraries at all 506644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 506744dda7b2Smrg ;; 506844dda7b2Smrg haiku*) 506944dda7b2Smrg # PIC is the default for Haiku. 507044dda7b2Smrg # The "-static" flag exists, but is broken. 507144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 507244dda7b2Smrg ;; 507344dda7b2Smrg interix[[3-9]]*) 507444dda7b2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 507544dda7b2Smrg # Instead, we relocate shared libraries at runtime. 507644dda7b2Smrg ;; 507744dda7b2Smrg sysv4*MP*) 507844dda7b2Smrg if test -d /usr/nec; then 507944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 508044dda7b2Smrg fi 508144dda7b2Smrg ;; 508244dda7b2Smrg hpux*) 508344dda7b2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 508444dda7b2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 508544dda7b2Smrg # sets the default TLS model and affects inlining. 508644dda7b2Smrg case $host_cpu in 508744dda7b2Smrg hppa*64*) 50887a3b38f7Smrg ;; 508944dda7b2Smrg *) 509044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 509144dda7b2Smrg ;; 509244dda7b2Smrg esac 509344dda7b2Smrg ;; 509444dda7b2Smrg *qnx* | *nto*) 509544dda7b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 509644dda7b2Smrg # it will coredump. 509744dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 509844dda7b2Smrg ;; 509944dda7b2Smrg *) 510044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 510144dda7b2Smrg ;; 510244dda7b2Smrg esac 510344dda7b2Smrg else 510444dda7b2Smrg case $host_os in 510544dda7b2Smrg aix[[4-9]]*) 510644dda7b2Smrg # All AIX code is PIC. 510744dda7b2Smrg if test "$host_cpu" = ia64; then 510844dda7b2Smrg # AIX 5 now supports IA64 processor 510944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 511044dda7b2Smrg else 511144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 511244dda7b2Smrg fi 511344dda7b2Smrg ;; 511444dda7b2Smrg chorus*) 511544dda7b2Smrg case $cc_basename in 511644dda7b2Smrg cxch68*) 511744dda7b2Smrg # Green Hills C++ Compiler 511844dda7b2Smrg # _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" 511944dda7b2Smrg ;; 512044dda7b2Smrg esac 512144dda7b2Smrg ;; 5122862f5301Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 5123862f5301Smrg # This hack is so that the source file can tell whether it is being 5124862f5301Smrg # built for inclusion in a dll (and should export symbols for example). 5125862f5301Smrg m4_if([$1], [GCJ], [], 5126862f5301Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5127862f5301Smrg ;; 512844dda7b2Smrg dgux*) 512944dda7b2Smrg case $cc_basename in 513044dda7b2Smrg ec++*) 513144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51327a3b38f7Smrg ;; 513344dda7b2Smrg ghcx*) 513444dda7b2Smrg # Green Hills C++ Compiler 513544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51367a3b38f7Smrg ;; 513744dda7b2Smrg *) 51387a3b38f7Smrg ;; 513944dda7b2Smrg esac 514044dda7b2Smrg ;; 514144dda7b2Smrg freebsd* | dragonfly*) 514244dda7b2Smrg # FreeBSD uses GNU C++ 514344dda7b2Smrg ;; 514444dda7b2Smrg hpux9* | hpux10* | hpux11*) 514544dda7b2Smrg case $cc_basename in 514644dda7b2Smrg CC*) 514744dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 514844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 514944dda7b2Smrg if test "$host_cpu" != ia64; then 515044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 515144dda7b2Smrg fi 51527a3b38f7Smrg ;; 515344dda7b2Smrg aCC*) 515444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 515544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 515644dda7b2Smrg case $host_cpu in 515744dda7b2Smrg hppa*64*|ia64*) 515844dda7b2Smrg # +Z the default 51597a3b38f7Smrg ;; 516044dda7b2Smrg *) 516144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51627a3b38f7Smrg ;; 51637a3b38f7Smrg esac 516444dda7b2Smrg ;; 516544dda7b2Smrg *) 516644dda7b2Smrg ;; 516744dda7b2Smrg esac 516844dda7b2Smrg ;; 516944dda7b2Smrg interix*) 517044dda7b2Smrg # This is c89, which is MS Visual C++ (no shared libs) 517144dda7b2Smrg # Anyone wants to do a port? 517244dda7b2Smrg ;; 517344dda7b2Smrg irix5* | irix6* | nonstopux*) 517444dda7b2Smrg case $cc_basename in 517544dda7b2Smrg CC*) 517644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 517744dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 517844dda7b2Smrg # CC pic flag -KPIC is the default. 517944dda7b2Smrg ;; 518044dda7b2Smrg *) 518144dda7b2Smrg ;; 518244dda7b2Smrg esac 518344dda7b2Smrg ;; 518444dda7b2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 518544dda7b2Smrg case $cc_basename in 518644dda7b2Smrg KCC*) 518744dda7b2Smrg # KAI C++ Compiler 518844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 518944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 519044dda7b2Smrg ;; 519144dda7b2Smrg ecpc* ) 519244dda7b2Smrg # old Intel C++ for x86_64 which still supported -KPIC. 519344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 519444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 519544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 519644dda7b2Smrg ;; 519744dda7b2Smrg icpc* ) 519844dda7b2Smrg # Intel C++, used to be incompatible with GCC. 519944dda7b2Smrg # ICC 10 doesn't accept -KPIC any more. 520044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 520244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 520344dda7b2Smrg ;; 520444dda7b2Smrg pgCC* | pgcpp*) 520544dda7b2Smrg # Portland Group C++ compiler 520644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520744dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 520844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 520944dda7b2Smrg ;; 52107a3b38f7Smrg cxx*) 52117a3b38f7Smrg # Compaq C++ 521244dda7b2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 521344dda7b2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 521444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 521544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52167a3b38f7Smrg ;; 521744dda7b2Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 521844dda7b2Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 521944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 522144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 52227a3b38f7Smrg ;; 52237a3b38f7Smrg *) 52247a3b38f7Smrg case `$CC -V 2>&1 | sed 5q` in 52257a3b38f7Smrg *Sun\ C*) 52267a3b38f7Smrg # Sun C++ 5.9 522744dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 522844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 522944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52307a3b38f7Smrg ;; 52317a3b38f7Smrg esac 52327a3b38f7Smrg ;; 52337a3b38f7Smrg esac 52347a3b38f7Smrg ;; 523544dda7b2Smrg lynxos*) 523644dda7b2Smrg ;; 523744dda7b2Smrg m88k*) 523844dda7b2Smrg ;; 523944dda7b2Smrg mvs*) 524044dda7b2Smrg case $cc_basename in 524144dda7b2Smrg cxx*) 524244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 524344dda7b2Smrg ;; 524444dda7b2Smrg *) 524544dda7b2Smrg ;; 524644dda7b2Smrg esac 524744dda7b2Smrg ;; 524844dda7b2Smrg netbsd*) 524944dda7b2Smrg ;; 525044dda7b2Smrg *qnx* | *nto*) 525144dda7b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 525244dda7b2Smrg # it will coredump. 525344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 525444dda7b2Smrg ;; 525544dda7b2Smrg osf3* | osf4* | osf5*) 525644dda7b2Smrg case $cc_basename in 525744dda7b2Smrg KCC*) 525844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 525944dda7b2Smrg ;; 526044dda7b2Smrg RCC*) 526144dda7b2Smrg # Rational C++ 2.4.1 526244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 526344dda7b2Smrg ;; 526444dda7b2Smrg cxx*) 526544dda7b2Smrg # Digital/Compaq C++ 526644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 526744dda7b2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 526844dda7b2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 526944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 527044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 527144dda7b2Smrg ;; 527244dda7b2Smrg *) 527344dda7b2Smrg ;; 527444dda7b2Smrg esac 527544dda7b2Smrg ;; 527644dda7b2Smrg psos*) 52777a3b38f7Smrg ;; 527844dda7b2Smrg solaris*) 527944dda7b2Smrg case $cc_basename in 528044dda7b2Smrg CC* | sunCC*) 528144dda7b2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 528244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 528344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 528444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 528544dda7b2Smrg ;; 528644dda7b2Smrg gcx*) 528744dda7b2Smrg # Green Hills C++ Compiler 528844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 528944dda7b2Smrg ;; 529044dda7b2Smrg *) 529144dda7b2Smrg ;; 529244dda7b2Smrg esac 52937a3b38f7Smrg ;; 529444dda7b2Smrg sunos4*) 529544dda7b2Smrg case $cc_basename in 529644dda7b2Smrg CC*) 529744dda7b2Smrg # Sun C++ 4.x 529844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 529944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 530044dda7b2Smrg ;; 530144dda7b2Smrg lcc*) 530244dda7b2Smrg # Lucid 530344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 53047a3b38f7Smrg ;; 53057a3b38f7Smrg *) 53067a3b38f7Smrg ;; 53077a3b38f7Smrg esac 53087a3b38f7Smrg ;; 530944dda7b2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 531044dda7b2Smrg case $cc_basename in 531144dda7b2Smrg CC*) 531244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 531344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 531444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 531544dda7b2Smrg ;; 531644dda7b2Smrg esac 53177a3b38f7Smrg ;; 531844dda7b2Smrg tandem*) 531944dda7b2Smrg case $cc_basename in 532044dda7b2Smrg NCC*) 532144dda7b2Smrg # NonStop-UX NCC 3.20 532244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 532344dda7b2Smrg ;; 532444dda7b2Smrg *) 532544dda7b2Smrg ;; 532644dda7b2Smrg esac 53277a3b38f7Smrg ;; 532844dda7b2Smrg vxworks*) 53297a3b38f7Smrg ;; 533044dda7b2Smrg *) 533144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53327a3b38f7Smrg ;; 533344dda7b2Smrg esac 533444dda7b2Smrg fi 533544dda7b2Smrg], 533644dda7b2Smrg[ 533744dda7b2Smrg if test "$GCC" = yes; then 533844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 533944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5340ff559fabSmrg 534144dda7b2Smrg case $host_os in 534244dda7b2Smrg aix*) 534344dda7b2Smrg # All AIX code is PIC. 534444dda7b2Smrg if test "$host_cpu" = ia64; then 534544dda7b2Smrg # AIX 5 now supports IA64 processor 534644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 534744dda7b2Smrg fi 534844dda7b2Smrg ;; 5349ff559fabSmrg 535044dda7b2Smrg amigaos*) 535144dda7b2Smrg case $host_cpu in 535244dda7b2Smrg powerpc) 535344dda7b2Smrg # see comment about AmigaOS4 .so support 535444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 535544dda7b2Smrg ;; 535644dda7b2Smrg m68k) 535744dda7b2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 535844dda7b2Smrg # adding the `-m68020' flag to GCC prevents building anything better, 535944dda7b2Smrg # like `-m68040'. 536044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 536144dda7b2Smrg ;; 536244dda7b2Smrg esac 536344dda7b2Smrg ;; 53647a3b38f7Smrg 536544dda7b2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 536644dda7b2Smrg # PIC is the default for these OSes. 536744dda7b2Smrg ;; 53687a3b38f7Smrg 536944dda7b2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 537044dda7b2Smrg # This hack is so that the source file can tell whether it is being 537144dda7b2Smrg # built for inclusion in a dll (and should export symbols for example). 537244dda7b2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 537344dda7b2Smrg # (--disable-auto-import) libraries 537444dda7b2Smrg m4_if([$1], [GCJ], [], 537544dda7b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 537644dda7b2Smrg ;; 53777a3b38f7Smrg 537844dda7b2Smrg darwin* | rhapsody*) 537944dda7b2Smrg # PIC is the default on this platform 538044dda7b2Smrg # Common symbols not allowed in MH_DYLIB files 538144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 538244dda7b2Smrg ;; 5383ff559fabSmrg 538444dda7b2Smrg haiku*) 538544dda7b2Smrg # PIC is the default for Haiku. 538644dda7b2Smrg # The "-static" flag exists, but is broken. 538744dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 538844dda7b2Smrg ;; 5389ff559fabSmrg 539044dda7b2Smrg hpux*) 539144dda7b2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 539244dda7b2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 539344dda7b2Smrg # sets the default TLS model and affects inlining. 539444dda7b2Smrg case $host_cpu in 539544dda7b2Smrg hppa*64*) 539644dda7b2Smrg # +Z the default 539744dda7b2Smrg ;; 539844dda7b2Smrg *) 539944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 540044dda7b2Smrg ;; 540144dda7b2Smrg esac 540244dda7b2Smrg ;; 5403ff559fabSmrg 540444dda7b2Smrg interix[[3-9]]*) 540544dda7b2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 540644dda7b2Smrg # Instead, we relocate shared libraries at runtime. 540744dda7b2Smrg ;; 54087a3b38f7Smrg 540944dda7b2Smrg msdosdjgpp*) 541044dda7b2Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 541144dda7b2Smrg # on systems that don't support them. 541244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 541344dda7b2Smrg enable_shared=no 541444dda7b2Smrg ;; 5415ff559fabSmrg 541644dda7b2Smrg *nto* | *qnx*) 541744dda7b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 541844dda7b2Smrg # it will coredump. 541944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 542044dda7b2Smrg ;; 5421ff559fabSmrg 542244dda7b2Smrg sysv4*MP*) 542344dda7b2Smrg if test -d /usr/nec; then 542444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 542544dda7b2Smrg fi 542644dda7b2Smrg ;; 5427ff559fabSmrg 542844dda7b2Smrg *) 542944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 543044dda7b2Smrg ;; 543144dda7b2Smrg esac 54327a3b38f7Smrg 543344dda7b2Smrg case $cc_basename in 543444dda7b2Smrg nvcc*) # Cuda Compiler Driver 2.2 543544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5436fc544a13Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5437fc544a13Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5438fc544a13Smrg fi 543944dda7b2Smrg ;; 544044dda7b2Smrg esac 544144dda7b2Smrg else 544244dda7b2Smrg # PORTME Check for flag to pass linker flags through the system compiler. 544344dda7b2Smrg case $host_os in 544444dda7b2Smrg aix*) 544544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 544644dda7b2Smrg if test "$host_cpu" = ia64; then 544744dda7b2Smrg # AIX 5 now supports IA64 processor 544844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 544944dda7b2Smrg else 545044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 545144dda7b2Smrg fi 545244dda7b2Smrg ;; 54537a3b38f7Smrg 545444dda7b2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 545544dda7b2Smrg # This hack is so that the source file can tell whether it is being 545644dda7b2Smrg # built for inclusion in a dll (and should export symbols for example). 545744dda7b2Smrg m4_if([$1], [GCJ], [], 545844dda7b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 545944dda7b2Smrg ;; 54607a3b38f7Smrg 546144dda7b2Smrg hpux9* | hpux10* | hpux11*) 546244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 546344dda7b2Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 546444dda7b2Smrg # not for PA HP-UX. 546544dda7b2Smrg case $host_cpu in 546644dda7b2Smrg hppa*64*|ia64*) 546744dda7b2Smrg # +Z the default 546844dda7b2Smrg ;; 546944dda7b2Smrg *) 547044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 547144dda7b2Smrg ;; 547244dda7b2Smrg esac 547344dda7b2Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 547444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 547544dda7b2Smrg ;; 5476ff559fabSmrg 547744dda7b2Smrg irix5* | irix6* | nonstopux*) 547844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 547944dda7b2Smrg # PIC (with -KPIC) is the default. 548044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 548144dda7b2Smrg ;; 5482ff559fabSmrg 548344dda7b2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 54847a3b38f7Smrg case $cc_basename in 548544dda7b2Smrg # old Intel for x86_64 which still supported -KPIC. 548644dda7b2Smrg ecc*) 548744dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 548844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 548944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 549044dda7b2Smrg ;; 549144dda7b2Smrg # icc used to be incompatible with GCC. 549244dda7b2Smrg # ICC 10 doesn't accept -KPIC any more. 549344dda7b2Smrg icc* | ifort*) 549444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 549544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 549644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 549744dda7b2Smrg ;; 549844dda7b2Smrg # Lahey Fortran 8.1. 549944dda7b2Smrg lf95*) 550044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 550244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 550344dda7b2Smrg ;; 5504862f5301Smrg nagfor*) 5505862f5301Smrg # NAG Fortran compiler 5506862f5301Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 5507862f5301Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5508862f5301Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5509862f5301Smrg ;; 551044dda7b2Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 551144dda7b2Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 551244dda7b2Smrg # which looks to be a dead project) 551344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 551444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 551544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 551644dda7b2Smrg ;; 551744dda7b2Smrg ccc*) 551844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 551944dda7b2Smrg # All Alpha code is PIC. 552044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 552144dda7b2Smrg ;; 552244dda7b2Smrg xl* | bgxl* | bgf* | mpixl*) 552344dda7b2Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 552444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 552544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 552644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 552744dda7b2Smrg ;; 552844dda7b2Smrg *) 552944dda7b2Smrg case `$CC -V 2>&1 | sed 5q` in 5530fc544a13Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 553144dda7b2Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 553244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 553344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 553444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 55357a3b38f7Smrg ;; 5536fc544a13Smrg *Sun\ F* | *Sun*Fortran*) 5537fc544a13Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5538fc544a13Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5539fc544a13Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5540fc544a13Smrg ;; 554144dda7b2Smrg *Sun\ C*) 554244dda7b2Smrg # Sun C 5.9 554344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 554444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 554544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55467a3b38f7Smrg ;; 5547fc544a13Smrg *Intel*\ [[CF]]*Compiler*) 5548fc544a13Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5549fc544a13Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5550fc544a13Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5551fc544a13Smrg ;; 5552fc544a13Smrg *Portland\ Group*) 5553fc544a13Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5554fc544a13Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5555fc544a13Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5556fc544a13Smrg ;; 555744dda7b2Smrg esac 555844dda7b2Smrg ;; 55597a3b38f7Smrg esac 55607a3b38f7Smrg ;; 5561ff559fabSmrg 556244dda7b2Smrg newsos6) 556344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 556444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 556544dda7b2Smrg ;; 5566ff559fabSmrg 556744dda7b2Smrg *nto* | *qnx*) 556844dda7b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 556944dda7b2Smrg # it will coredump. 557044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 55717a3b38f7Smrg ;; 5572ff559fabSmrg 557344dda7b2Smrg osf3* | osf4* | osf5*) 557444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 557544dda7b2Smrg # All OSF/1 code is PIC. 557644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 557744dda7b2Smrg ;; 5578ff559fabSmrg 557944dda7b2Smrg rdos*) 558044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 558144dda7b2Smrg ;; 5582ff559fabSmrg 558344dda7b2Smrg solaris*) 558444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 558544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 558644dda7b2Smrg case $cc_basename in 558744dda7b2Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 558844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 55897a3b38f7Smrg *) 559044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 559144dda7b2Smrg esac 559244dda7b2Smrg ;; 5593ff559fabSmrg 559444dda7b2Smrg sunos4*) 559544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 559644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 559744dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 559844dda7b2Smrg ;; 55997a3b38f7Smrg 560044dda7b2Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 560144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 560244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 560344dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 560444dda7b2Smrg ;; 56057a3b38f7Smrg 560644dda7b2Smrg sysv4*MP*) 560744dda7b2Smrg if test -d /usr/nec ;then 560844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 560944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 561044dda7b2Smrg fi 561144dda7b2Smrg ;; 56127a3b38f7Smrg 561344dda7b2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 561444dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 561544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 561644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 561744dda7b2Smrg ;; 56187a3b38f7Smrg 561944dda7b2Smrg unicos*) 562044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 562144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 562244dda7b2Smrg ;; 5623ff559fabSmrg 562444dda7b2Smrg uts4*) 562544dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 562644dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 562744dda7b2Smrg ;; 5628ff559fabSmrg 562944dda7b2Smrg *) 563044dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 563144dda7b2Smrg ;; 563244dda7b2Smrg esac 563344dda7b2Smrg fi 563444dda7b2Smrg]) 563544dda7b2Smrgcase $host_os in 563644dda7b2Smrg # For platforms which do not support PIC, -DPIC is meaningless: 563744dda7b2Smrg *djgpp*) 563844dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 563944dda7b2Smrg ;; 564044dda7b2Smrg *) 564144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 564244dda7b2Smrg ;; 564344dda7b2Smrgesac 5644862f5301Smrg 5645862f5301SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 5646862f5301Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5647862f5301Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5648862f5301Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5649ff559fabSmrg 565044dda7b2Smrg# 565144dda7b2Smrg# Check to make sure the PIC flag actually works. 565244dda7b2Smrg# 565344dda7b2Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 565444dda7b2Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 565544dda7b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 565644dda7b2Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 565744dda7b2Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 565844dda7b2Smrg "" | " "*) ;; 565944dda7b2Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 566044dda7b2Smrg esac], 566144dda7b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 566244dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 566344dda7b2Smrgfi 566444dda7b2Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 566544dda7b2Smrg [Additional compiler flags for building library objects]) 5666ff559fabSmrg 5667862f5301Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5668862f5301Smrg [How to pass a linker flag through the compiler]) 566944dda7b2Smrg# 567044dda7b2Smrg# Check to make sure the static flag actually works. 567144dda7b2Smrg# 567244dda7b2Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 567344dda7b2Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 567444dda7b2Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 567544dda7b2Smrg $lt_tmp_static_flag, 567644dda7b2Smrg [], 567744dda7b2Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 567844dda7b2Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 567944dda7b2Smrg [Compiler flag to prevent dynamic linking]) 568044dda7b2Smrg])# _LT_COMPILER_PIC 56817a3b38f7Smrg 56827a3b38f7Smrg 568344dda7b2Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 568444dda7b2Smrg# ---------------------------- 568544dda7b2Smrg# See if the linker supports building shared libraries. 568644dda7b2Smrgm4_defun([_LT_LINKER_SHLIBS], 568744dda7b2Smrg[AC_REQUIRE([LT_PATH_LD])dnl 568844dda7b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 5689862f5301Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 569044dda7b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 569144dda7b2Smrgm4_require([_LT_DECL_EGREP])dnl 569244dda7b2Smrgm4_require([_LT_DECL_SED])dnl 569344dda7b2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 569444dda7b2Smrgm4_require([_LT_TAG_COMPILER])dnl 569544dda7b2SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 569644dda7b2Smrgm4_if([$1], [CXX], [ 569744dda7b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5698862f5301Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 569944dda7b2Smrg case $host_os in 570044dda7b2Smrg aix[[4-9]]*) 570144dda7b2Smrg # If we're using GNU nm, then we don't want the "-C" option. 570244dda7b2Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 570344dda7b2Smrg # Also, AIX nm treats weak defined symbols like other global defined 570444dda7b2Smrg # symbols, whereas GNU nm marks them as "W". 570544dda7b2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 570644dda7b2Smrg _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' 570744dda7b2Smrg else 570844dda7b2Smrg _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' 570944dda7b2Smrg fi 571044dda7b2Smrg ;; 571144dda7b2Smrg pw32*) 571244dda7b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 5713862f5301Smrg ;; 571444dda7b2Smrg cygwin* | mingw* | cegcc*) 5715862f5301Smrg case $cc_basename in 5716fc544a13Smrg cl*) 5717fc544a13Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5718fc544a13Smrg ;; 5719862f5301Smrg *) 5720862f5301Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 5721862f5301Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5722862f5301Smrg ;; 5723862f5301Smrg esac 5724862f5301Smrg ;; 572544dda7b2Smrg *) 572644dda7b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5727862f5301Smrg ;; 572844dda7b2Smrg esac 572944dda7b2Smrg], [ 573044dda7b2Smrg runpath_var= 573144dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 573244dda7b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 573344dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)= 573444dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 573544dda7b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 573644dda7b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 573744dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 573844dda7b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 573944dda7b2Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 574044dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 574144dda7b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 574244dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 574344dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 574444dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 574544dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 574644dda7b2Smrg _LT_TAGVAR(inherit_rpath, $1)=no 574744dda7b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 574844dda7b2Smrg _LT_TAGVAR(module_cmds, $1)= 574944dda7b2Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 575044dda7b2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 575144dda7b2Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 575244dda7b2Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 575344dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 575444dda7b2Smrg # include_expsyms should be a list of space-separated symbols to be *always* 575544dda7b2Smrg # included in the symbol list 575644dda7b2Smrg _LT_TAGVAR(include_expsyms, $1)= 575744dda7b2Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 575844dda7b2Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 575944dda7b2Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 576044dda7b2Smrg # as well as any symbol that contains `d'. 576144dda7b2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 576244dda7b2Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 576344dda7b2Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 576444dda7b2Smrg # the symbol is explicitly referenced. Since portable code cannot 576544dda7b2Smrg # rely on this symbol name, it's probably fine to never include it in 576644dda7b2Smrg # preloaded symbol tables. 576744dda7b2Smrg # Exclude shared library initialization/finalization symbols. 576844dda7b2Smrgdnl Note also adjust exclude_expsyms for C++ above. 576944dda7b2Smrg extract_expsyms_cmds= 577044dda7b2Smrg 577144dda7b2Smrg case $host_os in 577244dda7b2Smrg cygwin* | mingw* | pw32* | cegcc*) 577344dda7b2Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 577444dda7b2Smrg # When not using gcc, we currently assume that we are using 577544dda7b2Smrg # Microsoft Visual C++. 577644dda7b2Smrg if test "$GCC" != yes; then 577744dda7b2Smrg with_gnu_ld=no 577844dda7b2Smrg fi 577944dda7b2Smrg ;; 578044dda7b2Smrg interix*) 578144dda7b2Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 578244dda7b2Smrg with_gnu_ld=yes 578344dda7b2Smrg ;; 578444dda7b2Smrg openbsd*) 578544dda7b2Smrg with_gnu_ld=no 578644dda7b2Smrg ;; 578744dda7b2Smrg esac 57887a3b38f7Smrg 578944dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 57907a3b38f7Smrg 579144dda7b2Smrg # On some targets, GNU ld is compatible enough with the native linker 579244dda7b2Smrg # that we're better off using the native interface for both. 579344dda7b2Smrg lt_use_gnu_ld_interface=no 579444dda7b2Smrg if test "$with_gnu_ld" = yes; then 579544dda7b2Smrg case $host_os in 579644dda7b2Smrg aix*) 579744dda7b2Smrg # The AIX port of GNU ld has always aspired to compatibility 579844dda7b2Smrg # with the native linker. However, as the warning in the GNU ld 579944dda7b2Smrg # block says, versions before 2.19.5* couldn't really create working 580044dda7b2Smrg # shared libraries, regardless of the interface used. 580144dda7b2Smrg case `$LD -v 2>&1` in 580244dda7b2Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 580344dda7b2Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 580444dda7b2Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 580544dda7b2Smrg *) 580644dda7b2Smrg lt_use_gnu_ld_interface=yes 580744dda7b2Smrg ;; 580844dda7b2Smrg esac 580944dda7b2Smrg ;; 581044dda7b2Smrg *) 581144dda7b2Smrg lt_use_gnu_ld_interface=yes 581244dda7b2Smrg ;; 581344dda7b2Smrg esac 581444dda7b2Smrg fi 58157a3b38f7Smrg 581644dda7b2Smrg if test "$lt_use_gnu_ld_interface" = yes; then 581744dda7b2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 581844dda7b2Smrg wlarc='${wl}' 58197a3b38f7Smrg 582044dda7b2Smrg # Set some defaults for GNU ld with shared library support. These 582144dda7b2Smrg # are reset later if shared libraries are not supported. Putting them 582244dda7b2Smrg # here allows them to be overridden if necessary. 582344dda7b2Smrg runpath_var=LD_RUN_PATH 582444dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 582544dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 582644dda7b2Smrg # ancient GNU ld didn't support --whole-archive et. al. 582744dda7b2Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 582844dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 582944dda7b2Smrg else 583044dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 583144dda7b2Smrg fi 583244dda7b2Smrg supports_anon_versioning=no 583344dda7b2Smrg case `$LD -v 2>&1` in 583444dda7b2Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 583544dda7b2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 583644dda7b2Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 583744dda7b2Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 583844dda7b2Smrg *\ 2.11.*) ;; # other 2.11 versions 583944dda7b2Smrg *) supports_anon_versioning=yes ;; 584044dda7b2Smrg esac 58417a3b38f7Smrg 584244dda7b2Smrg # See if GNU ld supports shared libraries. 584344dda7b2Smrg case $host_os in 584444dda7b2Smrg aix[[3-9]]*) 584544dda7b2Smrg # On AIX/PPC, the GNU linker is very broken 584644dda7b2Smrg if test "$host_cpu" != ia64; then 584744dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 584844dda7b2Smrg cat <<_LT_EOF 1>&2 58497a3b38f7Smrg 585044dda7b2Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 585144dda7b2Smrg*** to be unable to reliably create shared libraries on AIX. 585244dda7b2Smrg*** Therefore, libtool is disabling shared libraries support. If you 585344dda7b2Smrg*** really care for shared libraries, you may want to install binutils 585444dda7b2Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 585544dda7b2Smrg*** You will then need to restart the configuration process. 58567a3b38f7Smrg 585744dda7b2Smrg_LT_EOF 585844dda7b2Smrg fi 585944dda7b2Smrg ;; 58607a3b38f7Smrg 586144dda7b2Smrg amigaos*) 586244dda7b2Smrg case $host_cpu in 586344dda7b2Smrg powerpc) 586444dda7b2Smrg # see comment about AmigaOS4 .so support 586544dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 586644dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 586744dda7b2Smrg ;; 586844dda7b2Smrg m68k) 586944dda7b2Smrg _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)' 587044dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 587144dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 587244dda7b2Smrg ;; 587344dda7b2Smrg esac 587444dda7b2Smrg ;; 58757a3b38f7Smrg 587644dda7b2Smrg beos*) 587744dda7b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 587844dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 587944dda7b2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 588044dda7b2Smrg # support --undefined. This deserves some investigation. FIXME 588144dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 588244dda7b2Smrg else 588344dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 588444dda7b2Smrg fi 588544dda7b2Smrg ;; 58867a3b38f7Smrg 588744dda7b2Smrg cygwin* | mingw* | pw32* | cegcc*) 588844dda7b2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 588944dda7b2Smrg # as there is no search path for DLLs. 589044dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 589144dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 589244dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 589344dda7b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 589444dda7b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5895862f5301Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 5896862f5301Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 58977a3b38f7Smrg 589844dda7b2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 589944dda7b2Smrg _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' 590044dda7b2Smrg # If the export-symbols file already is a .def file (1st line 590144dda7b2Smrg # is EXPORTS), use it as is; otherwise, prepend... 590244dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 590344dda7b2Smrg cp $export_symbols $output_objdir/$soname.def; 590444dda7b2Smrg else 590544dda7b2Smrg echo EXPORTS > $output_objdir/$soname.def; 590644dda7b2Smrg cat $export_symbols >> $output_objdir/$soname.def; 590744dda7b2Smrg fi~ 590844dda7b2Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 590944dda7b2Smrg else 591044dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 591144dda7b2Smrg fi 59127a3b38f7Smrg ;; 59137a3b38f7Smrg 591444dda7b2Smrg haiku*) 591544dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 591644dda7b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 591744dda7b2Smrg ;; 5918ff559fabSmrg 591944dda7b2Smrg interix[[3-9]]*) 592044dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 592144dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 592244dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 592344dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 592444dda7b2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 592544dda7b2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 592644dda7b2Smrg # default) and relocated if they conflict, which is a slow very memory 592744dda7b2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 592844dda7b2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 592944dda7b2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 593044dda7b2Smrg _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' 593144dda7b2Smrg _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' 59327a3b38f7Smrg ;; 59337a3b38f7Smrg 593444dda7b2Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 593544dda7b2Smrg tmp_diet=no 593644dda7b2Smrg if test "$host_os" = linux-dietlibc; then 593744dda7b2Smrg case $cc_basename in 593844dda7b2Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 593944dda7b2Smrg esac 594044dda7b2Smrg fi 594144dda7b2Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 594244dda7b2Smrg && test "$tmp_diet" = no 594344dda7b2Smrg then 5944862f5301Smrg tmp_addflag=' $pic_flag' 594544dda7b2Smrg tmp_sharedflag='-shared' 594644dda7b2Smrg case $cc_basename,$host_cpu in 594744dda7b2Smrg pgcc*) # Portland Group C compiler 594844dda7b2Smrg _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' 594944dda7b2Smrg tmp_addflag=' $pic_flag' 595044dda7b2Smrg ;; 595144dda7b2Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 595244dda7b2Smrg # Portland Group f77 and f90 compilers 595344dda7b2Smrg _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' 595444dda7b2Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 595544dda7b2Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 595644dda7b2Smrg tmp_addflag=' -i_dynamic' ;; 595744dda7b2Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 595844dda7b2Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 595944dda7b2Smrg ifc* | ifort*) # Intel Fortran compiler 596044dda7b2Smrg tmp_addflag=' -nofor_main' ;; 596144dda7b2Smrg lf95*) # Lahey Fortran 8.1 596244dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 596344dda7b2Smrg tmp_sharedflag='--shared' ;; 596444dda7b2Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 596544dda7b2Smrg tmp_sharedflag='-qmkshrobj' 596644dda7b2Smrg tmp_addflag= ;; 596744dda7b2Smrg nvcc*) # Cuda Compiler Driver 2.2 596844dda7b2Smrg _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' 596944dda7b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 597044dda7b2Smrg ;; 597144dda7b2Smrg esac 597244dda7b2Smrg case `$CC -V 2>&1 | sed 5q` in 597344dda7b2Smrg *Sun\ C*) # Sun C 5.9 597444dda7b2Smrg _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' 597544dda7b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 597644dda7b2Smrg tmp_sharedflag='-G' ;; 597744dda7b2Smrg *Sun\ F*) # Sun Fortran 8.3 597844dda7b2Smrg tmp_sharedflag='-G' ;; 597944dda7b2Smrg esac 598044dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5981ff559fabSmrg 598244dda7b2Smrg if test "x$supports_anon_versioning" = xyes; then 598344dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 598444dda7b2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 598544dda7b2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 598644dda7b2Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 598744dda7b2Smrg fi 59887a3b38f7Smrg 598944dda7b2Smrg case $cc_basename in 599044dda7b2Smrg xlf* | bgf* | bgxlf* | mpixlf*) 599144dda7b2Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 599244dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5993fc544a13Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 599444dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 599544dda7b2Smrg if test "x$supports_anon_versioning" = xyes; then 599644dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 599744dda7b2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 599844dda7b2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 599944dda7b2Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 600044dda7b2Smrg fi 600144dda7b2Smrg ;; 600244dda7b2Smrg esac 600344dda7b2Smrg else 600444dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 600544dda7b2Smrg fi 600644dda7b2Smrg ;; 60077a3b38f7Smrg 600844dda7b2Smrg netbsd*) 600944dda7b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 601044dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 601144dda7b2Smrg wlarc= 601244dda7b2Smrg else 6013862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6014862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 601544dda7b2Smrg fi 601644dda7b2Smrg ;; 6017ff559fabSmrg 601844dda7b2Smrg solaris*) 601944dda7b2Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 602044dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 602144dda7b2Smrg cat <<_LT_EOF 1>&2 6022ff559fabSmrg 602344dda7b2Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 602444dda7b2Smrg*** create shared libraries on Solaris systems. Therefore, libtool 602544dda7b2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 602644dda7b2Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 602744dda7b2Smrg*** your PATH or compiler configuration so that the native linker is 602844dda7b2Smrg*** used, and then restart. 6029ff559fabSmrg 603044dda7b2Smrg_LT_EOF 603144dda7b2Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6032862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6033862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 603444dda7b2Smrg else 603544dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 603644dda7b2Smrg fi 603744dda7b2Smrg ;; 6038ff559fabSmrg 603944dda7b2Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 604044dda7b2Smrg case `$LD -v 2>&1` in 604144dda7b2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 604244dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 604344dda7b2Smrg cat <<_LT_EOF 1>&2 6044ff559fabSmrg 604544dda7b2Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 604644dda7b2Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 604744dda7b2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 604844dda7b2Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 604944dda7b2Smrg*** your PATH or compiler configuration so that the native linker is 605044dda7b2Smrg*** used, and then restart. 6051ff559fabSmrg 605244dda7b2Smrg_LT_EOF 605344dda7b2Smrg ;; 605444dda7b2Smrg *) 605544dda7b2Smrg # For security reasons, it is highly recommended that you always 605644dda7b2Smrg # use absolute paths for naming shared libraries, and exclude the 605744dda7b2Smrg # DT_RUNPATH tag from executables and libraries. But doing so 605844dda7b2Smrg # requires that you compile everything twice, which is a pain. 605944dda7b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 606044dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 606144dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 606244dda7b2Smrg _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' 606344dda7b2Smrg else 606444dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 606544dda7b2Smrg fi 606644dda7b2Smrg ;; 606744dda7b2Smrg esac 606844dda7b2Smrg ;; 60697a3b38f7Smrg 607044dda7b2Smrg sunos4*) 607144dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 607244dda7b2Smrg wlarc= 607344dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 607444dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 607544dda7b2Smrg ;; 6076ff559fabSmrg 607744dda7b2Smrg *) 607844dda7b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6079862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6080862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 608144dda7b2Smrg else 608244dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 608344dda7b2Smrg fi 608444dda7b2Smrg ;; 608544dda7b2Smrg esac 6086ff559fabSmrg 608744dda7b2Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 608844dda7b2Smrg runpath_var= 608944dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 609044dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 609144dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 609244dda7b2Smrg fi 609344dda7b2Smrg else 609444dda7b2Smrg # PORTME fill in a description of your system's linker (not GNU ld) 609544dda7b2Smrg case $host_os in 609644dda7b2Smrg aix3*) 609744dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 609844dda7b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 609944dda7b2Smrg _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' 610044dda7b2Smrg # Note: this linker hardcodes the directories in LIBPATH if there 610144dda7b2Smrg # are no directories specified by -L. 610244dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 610344dda7b2Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 610444dda7b2Smrg # Neither direct hardcoding nor static linking is supported with a 610544dda7b2Smrg # broken collect2. 610644dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 610744dda7b2Smrg fi 610844dda7b2Smrg ;; 6109ff559fabSmrg 611044dda7b2Smrg aix[[4-9]]*) 611144dda7b2Smrg if test "$host_cpu" = ia64; then 611244dda7b2Smrg # On IA64, the linker does run time linking by default, so we don't 611344dda7b2Smrg # have to do anything special. 611444dda7b2Smrg aix_use_runtimelinking=no 611544dda7b2Smrg exp_sym_flag='-Bexport' 611644dda7b2Smrg no_entry_flag="" 611744dda7b2Smrg else 611844dda7b2Smrg # If we're using GNU nm, then we don't want the "-C" option. 611944dda7b2Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 612044dda7b2Smrg # Also, AIX nm treats weak defined symbols like other global 612144dda7b2Smrg # defined symbols, whereas GNU nm marks them as "W". 612244dda7b2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 612344dda7b2Smrg _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' 612444dda7b2Smrg else 612544dda7b2Smrg _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' 612644dda7b2Smrg fi 612744dda7b2Smrg aix_use_runtimelinking=no 6128ff559fabSmrg 612944dda7b2Smrg # Test if we are trying to use run time linking or normal 613044dda7b2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 613144dda7b2Smrg # need to do runtime linking. 613244dda7b2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 613344dda7b2Smrg for ld_flag in $LDFLAGS; do 613444dda7b2Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 613544dda7b2Smrg aix_use_runtimelinking=yes 613644dda7b2Smrg break 613744dda7b2Smrg fi 613844dda7b2Smrg done 613944dda7b2Smrg ;; 614044dda7b2Smrg esac 6141ff559fabSmrg 614244dda7b2Smrg exp_sym_flag='-bexport' 614344dda7b2Smrg no_entry_flag='-bnoentry' 614444dda7b2Smrg fi 61457a3b38f7Smrg 614644dda7b2Smrg # When large executables or shared objects are built, AIX ld can 614744dda7b2Smrg # have problems creating the table of contents. If linking a library 614844dda7b2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 614944dda7b2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 615044dda7b2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 61517a3b38f7Smrg 615244dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='' 615344dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 615444dda7b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 615544dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 615644dda7b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 615744dda7b2Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 61587a3b38f7Smrg 615944dda7b2Smrg if test "$GCC" = yes; then 616044dda7b2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 616144dda7b2Smrg # We only want to do this on AIX 4.2 and lower, the check 616244dda7b2Smrg # below for broken collect2 doesn't work under 4.3+ 616344dda7b2Smrg collect2name=`${CC} -print-prog-name=collect2` 616444dda7b2Smrg if test -f "$collect2name" && 616544dda7b2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 616644dda7b2Smrg then 616744dda7b2Smrg # We have reworked collect2 616844dda7b2Smrg : 616944dda7b2Smrg else 617044dda7b2Smrg # We have old collect2 617144dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 617244dda7b2Smrg # It fails to find uninstalled libraries when the uninstalled 617344dda7b2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 617444dda7b2Smrg # to unsupported forces relinking 617544dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 617644dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 617744dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 617844dda7b2Smrg fi 617944dda7b2Smrg ;; 618044dda7b2Smrg esac 618144dda7b2Smrg shared_flag='-shared' 618244dda7b2Smrg if test "$aix_use_runtimelinking" = yes; then 618344dda7b2Smrg shared_flag="$shared_flag "'${wl}-G' 618444dda7b2Smrg fi 618544dda7b2Smrg else 618644dda7b2Smrg # not using gcc 618744dda7b2Smrg if test "$host_cpu" = ia64; then 618844dda7b2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 618944dda7b2Smrg # chokes on -Wl,-G. The following line is correct: 619044dda7b2Smrg shared_flag='-G' 619144dda7b2Smrg else 619244dda7b2Smrg if test "$aix_use_runtimelinking" = yes; then 619344dda7b2Smrg shared_flag='${wl}-G' 619444dda7b2Smrg else 619544dda7b2Smrg shared_flag='${wl}-bM:SRE' 619644dda7b2Smrg fi 619744dda7b2Smrg fi 619844dda7b2Smrg fi 61997a3b38f7Smrg 620044dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 620144dda7b2Smrg # It seems that -bexpall does not export symbols beginning with 620244dda7b2Smrg # underscore (_), so it is better to generate a list of symbols to export. 620344dda7b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 620444dda7b2Smrg if test "$aix_use_runtimelinking" = yes; then 620544dda7b2Smrg # Warning - without using the other runtime loading flags (-brtl), 620644dda7b2Smrg # -berok will link without error, but may produce a broken library. 620744dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 620844dda7b2Smrg # Determine the default libpath from the value encoded in an 620944dda7b2Smrg # empty executable. 6210862f5301Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 621144dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 621244dda7b2Smrg _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" 621344dda7b2Smrg else 621444dda7b2Smrg if test "$host_cpu" = ia64; then 621544dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 621644dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 621744dda7b2Smrg _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" 621844dda7b2Smrg else 621944dda7b2Smrg # Determine the default libpath from the value encoded in an 622044dda7b2Smrg # empty executable. 6221862f5301Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 622244dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 622344dda7b2Smrg # Warning - without using the other run time loading flags, 622444dda7b2Smrg # -berok will link without error, but may produce a broken library. 622544dda7b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 622644dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 622744dda7b2Smrg if test "$with_gnu_ld" = yes; then 622844dda7b2Smrg # We only use this code for GNU lds that support --whole-archive. 622944dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 623044dda7b2Smrg else 623144dda7b2Smrg # Exported symbols can be pulled into shared objects from archives 623244dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 623344dda7b2Smrg fi 623444dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 623544dda7b2Smrg # This is similar to how AIX traditionally builds its shared libraries. 623644dda7b2Smrg _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' 623744dda7b2Smrg fi 623844dda7b2Smrg fi 623944dda7b2Smrg ;; 62407a3b38f7Smrg 624144dda7b2Smrg amigaos*) 624244dda7b2Smrg case $host_cpu in 624344dda7b2Smrg powerpc) 624444dda7b2Smrg # see comment about AmigaOS4 .so support 624544dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 624644dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 624744dda7b2Smrg ;; 624844dda7b2Smrg m68k) 624944dda7b2Smrg _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)' 625044dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 625144dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 625244dda7b2Smrg ;; 625344dda7b2Smrg esac 625444dda7b2Smrg ;; 62557a3b38f7Smrg 625644dda7b2Smrg bsdi[[45]]*) 625744dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 625844dda7b2Smrg ;; 6259ff559fabSmrg 626044dda7b2Smrg cygwin* | mingw* | pw32* | cegcc*) 626144dda7b2Smrg # When not using gcc, we currently assume that we are using 626244dda7b2Smrg # Microsoft Visual C++. 626344dda7b2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 626444dda7b2Smrg # no search path for DLLs. 6265862f5301Smrg case $cc_basename in 6266862f5301Smrg cl*) 6267862f5301Smrg # Native MSVC 6268862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6269862f5301Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6270862f5301Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6271862f5301Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6272862f5301Smrg # Tell ltmain to make .lib files, not .a files. 6273862f5301Smrg libext=lib 6274862f5301Smrg # Tell ltmain to make .dll files, not .so files. 6275862f5301Smrg shrext_cmds=".dll" 6276862f5301Smrg # FIXME: Setting linknames here is a bad hack. 6277862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6278862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6279862f5301Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6280862f5301Smrg else 6281862f5301Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6282862f5301Smrg fi~ 6283862f5301Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6284862f5301Smrg linknames=' 6285862f5301Smrg # The linker will not automatically build a static lib if we build a DLL. 6286862f5301Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6287862f5301Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6288fc544a13Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 6289862f5301Smrg _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' 6290862f5301Smrg # Don't use ranlib 6291862f5301Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6292862f5301Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6293862f5301Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6294862f5301Smrg case $lt_outputfile in 6295862f5301Smrg *.exe|*.EXE) ;; 6296862f5301Smrg *) 6297862f5301Smrg lt_outputfile="$lt_outputfile.exe" 6298862f5301Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6299862f5301Smrg ;; 6300862f5301Smrg esac~ 6301862f5301Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6302862f5301Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6303862f5301Smrg $RM "$lt_outputfile.manifest"; 6304862f5301Smrg fi' 6305862f5301Smrg ;; 6306862f5301Smrg *) 6307862f5301Smrg # Assume MSVC wrapper 6308862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6309862f5301Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6310862f5301Smrg # Tell ltmain to make .lib files, not .a files. 6311862f5301Smrg libext=lib 6312862f5301Smrg # Tell ltmain to make .dll files, not .so files. 6313862f5301Smrg shrext_cmds=".dll" 6314862f5301Smrg # FIXME: Setting linknames here is a bad hack. 6315862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 6316862f5301Smrg # The linker will automatically build a .lib file if we build a DLL. 6317862f5301Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6318862f5301Smrg # FIXME: Should let the user specify the lib program. 6319862f5301Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 6320862f5301Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6321862f5301Smrg ;; 6322862f5301Smrg esac 632344dda7b2Smrg ;; 63247a3b38f7Smrg 632544dda7b2Smrg darwin* | rhapsody*) 632644dda7b2Smrg _LT_DARWIN_LINKER_FEATURES($1) 632744dda7b2Smrg ;; 63287a3b38f7Smrg 632944dda7b2Smrg dgux*) 633044dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6331fc544a13Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6332fc544a13Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 633344dda7b2Smrg ;; 6334ff559fabSmrg 633544dda7b2Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 633644dda7b2Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 633744dda7b2Smrg # does not break anything, and helps significantly (at the cost of a little 633844dda7b2Smrg # extra space). 633944dda7b2Smrg freebsd2.2*) 634044dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 634144dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 634244dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 634344dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 634444dda7b2Smrg ;; 6345ff559fabSmrg 634644dda7b2Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6347fc544a13Smrg freebsd2.*) 634844dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 634944dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 635044dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 635144dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 635244dda7b2Smrg ;; 63537a3b38f7Smrg 635444dda7b2Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 635544dda7b2Smrg freebsd* | dragonfly*) 6356862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 635744dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 635844dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 635944dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 636044dda7b2Smrg ;; 63617a3b38f7Smrg 636244dda7b2Smrg hpux9*) 636344dda7b2Smrg if test "$GCC" = yes; then 6364862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 636544dda7b2Smrg else 636644dda7b2Smrg _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' 636744dda7b2Smrg fi 636844dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 636944dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 637044dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63717a3b38f7Smrg 637244dda7b2Smrg # hardcode_minus_L: Not really in the search PATH, 637344dda7b2Smrg # but as the default location of the library. 637444dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 637544dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 637644dda7b2Smrg ;; 63777a3b38f7Smrg 637844dda7b2Smrg hpux10*) 637944dda7b2Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6380862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 638144dda7b2Smrg else 638244dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 638344dda7b2Smrg fi 638444dda7b2Smrg if test "$with_gnu_ld" = no; then 638544dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 638644dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 638744dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 638844dda7b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 638944dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 639044dda7b2Smrg # hardcode_minus_L: Not really in the search PATH, 639144dda7b2Smrg # but as the default location of the library. 639244dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 639344dda7b2Smrg fi 639444dda7b2Smrg ;; 6395ff559fabSmrg 639644dda7b2Smrg hpux11*) 639744dda7b2Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 639844dda7b2Smrg case $host_cpu in 639944dda7b2Smrg hppa*64*) 640044dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 640144dda7b2Smrg ;; 640244dda7b2Smrg ia64*) 6403862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 640444dda7b2Smrg ;; 640544dda7b2Smrg *) 6406862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 640744dda7b2Smrg ;; 640844dda7b2Smrg esac 640944dda7b2Smrg else 641044dda7b2Smrg case $host_cpu in 641144dda7b2Smrg hppa*64*) 641244dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 641344dda7b2Smrg ;; 641444dda7b2Smrg ia64*) 641544dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 641644dda7b2Smrg ;; 641744dda7b2Smrg *) 641844dda7b2Smrg m4_if($1, [], [ 641944dda7b2Smrg # Older versions of the 11.00 compiler do not understand -b yet 642044dda7b2Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 642144dda7b2Smrg _LT_LINKER_OPTION([if $CC understands -b], 642244dda7b2Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 642344dda7b2Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 642444dda7b2Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 642544dda7b2Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 642644dda7b2Smrg ;; 642744dda7b2Smrg esac 642844dda7b2Smrg fi 642944dda7b2Smrg if test "$with_gnu_ld" = no; then 643044dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 643144dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64327a3b38f7Smrg 643344dda7b2Smrg case $host_cpu in 643444dda7b2Smrg hppa*64*|ia64*) 643544dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 643644dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 643744dda7b2Smrg ;; 643844dda7b2Smrg *) 643944dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 644044dda7b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 644144dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 64427a3b38f7Smrg 644344dda7b2Smrg # hardcode_minus_L: Not really in the search PATH, 644444dda7b2Smrg # but as the default location of the library. 644544dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 644644dda7b2Smrg ;; 644744dda7b2Smrg esac 644844dda7b2Smrg fi 644944dda7b2Smrg ;; 64507a3b38f7Smrg 645144dda7b2Smrg irix5* | irix6* | nonstopux*) 645244dda7b2Smrg if test "$GCC" = yes; then 6453862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 645444dda7b2Smrg # Try to use the -exported_symbol ld option, if it does not 645544dda7b2Smrg # work, assume that -exports_file does not work either and 645644dda7b2Smrg # implicitly export all symbols. 6457862f5301Smrg # This should be the same for all languages, so no per-tag cache variable. 6458862f5301Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 6459862f5301Smrg [lt_cv_irix_exported_symbol], 6460862f5301Smrg [save_LDFLAGS="$LDFLAGS" 6461862f5301Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 6462862f5301Smrg AC_LINK_IFELSE( 6463862f5301Smrg [AC_LANG_SOURCE( 6464862f5301Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 6465862f5301Smrg [C++], [[int foo (void) { return 0; }]], 6466862f5301Smrg [Fortran 77], [[ 6467862f5301Smrg subroutine foo 6468862f5301Smrg end]], 6469862f5301Smrg [Fortran], [[ 6470862f5301Smrg subroutine foo 6471862f5301Smrg end]])])], 6472862f5301Smrg [lt_cv_irix_exported_symbol=yes], 6473862f5301Smrg [lt_cv_irix_exported_symbol=no]) 6474862f5301Smrg LDFLAGS="$save_LDFLAGS"]) 6475862f5301Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 6476862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 6477862f5301Smrg fi 647844dda7b2Smrg else 647944dda7b2Smrg _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' 648044dda7b2Smrg _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' 648144dda7b2Smrg fi 648244dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 648344dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 648444dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 648544dda7b2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 648644dda7b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 648744dda7b2Smrg ;; 64887a3b38f7Smrg 648944dda7b2Smrg netbsd*) 649044dda7b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 649144dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 649244dda7b2Smrg else 649344dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 649444dda7b2Smrg fi 649544dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 649644dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 649744dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 649844dda7b2Smrg ;; 64997a3b38f7Smrg 650044dda7b2Smrg newsos6) 650144dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 650244dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 650344dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 650444dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 650544dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 650644dda7b2Smrg ;; 65077a3b38f7Smrg 650844dda7b2Smrg *nto* | *qnx*) 650944dda7b2Smrg ;; 65107a3b38f7Smrg 651144dda7b2Smrg openbsd*) 651244dda7b2Smrg if test -f /usr/libexec/ld.so; then 651344dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 651444dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 651544dda7b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 651644dda7b2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 651744dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 651844dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 651944dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 652044dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 652144dda7b2Smrg else 652244dda7b2Smrg case $host_os in 652344dda7b2Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 652444dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 652544dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 652644dda7b2Smrg ;; 652744dda7b2Smrg *) 652844dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 652944dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 653044dda7b2Smrg ;; 653144dda7b2Smrg esac 6532ff559fabSmrg fi 653344dda7b2Smrg else 653444dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 653544dda7b2Smrg fi 653644dda7b2Smrg ;; 65377a3b38f7Smrg 653844dda7b2Smrg os2*) 653944dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 654044dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 654144dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 654244dda7b2Smrg _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' 654344dda7b2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 654444dda7b2Smrg ;; 65457a3b38f7Smrg 654644dda7b2Smrg osf3*) 654744dda7b2Smrg if test "$GCC" = yes; then 654844dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 654944dda7b2Smrg _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' 655044dda7b2Smrg else 655144dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 655244dda7b2Smrg _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' 655344dda7b2Smrg fi 655444dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 655544dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 655644dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 655744dda7b2Smrg ;; 65587a3b38f7Smrg 655944dda7b2Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 656044dda7b2Smrg if test "$GCC" = yes; then 656144dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6562862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 656344dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 656444dda7b2Smrg else 656544dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 656644dda7b2Smrg _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' 656744dda7b2Smrg _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~ 656844dda7b2Smrg $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' 65697a3b38f7Smrg 657044dda7b2Smrg # Both c and cxx compiler support -rpath directly 657144dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 657244dda7b2Smrg fi 657344dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 657444dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 657544dda7b2Smrg ;; 65767a3b38f7Smrg 657744dda7b2Smrg solaris*) 657844dda7b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 657944dda7b2Smrg if test "$GCC" = yes; then 658044dda7b2Smrg wlarc='${wl}' 6581862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 658244dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6583862f5301Smrg $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 658444dda7b2Smrg else 658544dda7b2Smrg case `$CC -V 2>&1` in 658644dda7b2Smrg *"Compilers 5.0"*) 658744dda7b2Smrg wlarc='' 658844dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 658944dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 659044dda7b2Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 659144dda7b2Smrg ;; 659244dda7b2Smrg *) 659344dda7b2Smrg wlarc='${wl}' 659444dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 659544dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 659644dda7b2Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 659744dda7b2Smrg ;; 659844dda7b2Smrg esac 659944dda7b2Smrg fi 660044dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 660144dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 660244dda7b2Smrg case $host_os in 660344dda7b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 660444dda7b2Smrg *) 660544dda7b2Smrg # The compiler driver will combine and reorder linker options, 660644dda7b2Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 660744dda7b2Smrg # but is careful enough not to reorder. 660844dda7b2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 660944dda7b2Smrg if test "$GCC" = yes; then 661044dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 661144dda7b2Smrg else 661244dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 661344dda7b2Smrg fi 661444dda7b2Smrg ;; 661544dda7b2Smrg esac 661644dda7b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 661744dda7b2Smrg ;; 6618ff559fabSmrg 661944dda7b2Smrg sunos4*) 662044dda7b2Smrg if test "x$host_vendor" = xsequent; then 662144dda7b2Smrg # Use $CC to link under sequent, because it throws in some extra .o 662244dda7b2Smrg # files that make .init and .fini sections work. 662344dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 662444dda7b2Smrg else 662544dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 662644dda7b2Smrg fi 662744dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 662844dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 662944dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 663044dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 663144dda7b2Smrg ;; 6632ff559fabSmrg 663344dda7b2Smrg sysv4) 663444dda7b2Smrg case $host_vendor in 663544dda7b2Smrg sni) 663644dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 663744dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 663844dda7b2Smrg ;; 663944dda7b2Smrg siemens) 664044dda7b2Smrg ## LD is ld it makes a PLAMLIB 664144dda7b2Smrg ## CC just makes a GrossModule. 664244dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 664344dda7b2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 664444dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 664544dda7b2Smrg ;; 664644dda7b2Smrg motorola) 664744dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 664844dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 664944dda7b2Smrg ;; 665044dda7b2Smrg esac 665144dda7b2Smrg runpath_var='LD_RUN_PATH' 665244dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 665344dda7b2Smrg ;; 6654ff559fabSmrg 665544dda7b2Smrg sysv4.3*) 665644dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 665744dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 665844dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 665944dda7b2Smrg ;; 6660ff559fabSmrg 666144dda7b2Smrg sysv4*MP*) 666244dda7b2Smrg if test -d /usr/nec; then 666344dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 666444dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 666544dda7b2Smrg runpath_var=LD_RUN_PATH 666644dda7b2Smrg hardcode_runpath_var=yes 666744dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 666844dda7b2Smrg fi 666944dda7b2Smrg ;; 6670ff559fabSmrg 667144dda7b2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 667244dda7b2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 667344dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 667444dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 667544dda7b2Smrg runpath_var='LD_RUN_PATH' 6676ff559fabSmrg 667744dda7b2Smrg if test "$GCC" = yes; then 667844dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 667944dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 668044dda7b2Smrg else 668144dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 668244dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 668344dda7b2Smrg fi 668444dda7b2Smrg ;; 6685ff559fabSmrg 668644dda7b2Smrg sysv5* | sco3.2v5* | sco5v6*) 668744dda7b2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 668844dda7b2Smrg # link with -lc, and that would cause any symbols used from libc to 668944dda7b2Smrg # always be unresolved, which means just about no library would 669044dda7b2Smrg # ever link correctly. If we're not using GNU ld we use -z text 669144dda7b2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 669244dda7b2Smrg # as -z defs. 669344dda7b2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 669444dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 669544dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 669644dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 669744dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 669844dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 669944dda7b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 670044dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 670144dda7b2Smrg runpath_var='LD_RUN_PATH' 67027a3b38f7Smrg 670344dda7b2Smrg if test "$GCC" = yes; then 670444dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 670544dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 670644dda7b2Smrg else 670744dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 670844dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 670944dda7b2Smrg fi 671044dda7b2Smrg ;; 67117a3b38f7Smrg 671244dda7b2Smrg uts4*) 671344dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 671444dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 671544dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 671644dda7b2Smrg ;; 67177a3b38f7Smrg 671844dda7b2Smrg *) 671944dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 672044dda7b2Smrg ;; 672144dda7b2Smrg esac 67227a3b38f7Smrg 672344dda7b2Smrg if test x$host_vendor = xsni; then 672444dda7b2Smrg case $host in 672544dda7b2Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 672644dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 672744dda7b2Smrg ;; 672844dda7b2Smrg esac 672944dda7b2Smrg fi 673044dda7b2Smrg fi 673144dda7b2Smrg]) 673244dda7b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 673344dda7b2Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 67347a3b38f7Smrg 673544dda7b2Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 67367a3b38f7Smrg 673744dda7b2Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 673844dda7b2Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 673944dda7b2Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 674044dda7b2Smrg [The commands to extract the exported symbol list from a shared archive]) 67417a3b38f7Smrg 674244dda7b2Smrg# 674344dda7b2Smrg# Do we need to explicitly link libc? 674444dda7b2Smrg# 674544dda7b2Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 674644dda7b2Smrgx|xyes) 674744dda7b2Smrg # Assume -lc should be added 674844dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67497a3b38f7Smrg 675044dda7b2Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 675144dda7b2Smrg case $_LT_TAGVAR(archive_cmds, $1) in 675244dda7b2Smrg *'~'*) 675344dda7b2Smrg # FIXME: we may have to deal with multi-command sequences. 675444dda7b2Smrg ;; 675544dda7b2Smrg '$CC '*) 675644dda7b2Smrg # Test whether the compiler implicitly links with -lc since on some 675744dda7b2Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 675844dda7b2Smrg # to ld, don't add -lc before -lgcc. 675944dda7b2Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 676044dda7b2Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 676144dda7b2Smrg [$RM conftest* 676244dda7b2Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 676344dda7b2Smrg 676444dda7b2Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 676544dda7b2Smrg soname=conftest 676644dda7b2Smrg lib=conftest 676744dda7b2Smrg libobjs=conftest.$ac_objext 676844dda7b2Smrg deplibs= 676944dda7b2Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 677044dda7b2Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 677144dda7b2Smrg compiler_flags=-v 677244dda7b2Smrg linker_flags=-v 677344dda7b2Smrg verstring= 677444dda7b2Smrg output_objdir=. 677544dda7b2Smrg libname=conftest 677644dda7b2Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 677744dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 677844dda7b2Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 677944dda7b2Smrg then 678044dda7b2Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 678144dda7b2Smrg else 678244dda7b2Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 678344dda7b2Smrg fi 678444dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 678544dda7b2Smrg else 678644dda7b2Smrg cat conftest.err 1>&5 678744dda7b2Smrg fi 678844dda7b2Smrg $RM conftest* 678944dda7b2Smrg ]) 679044dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 679144dda7b2Smrg ;; 679244dda7b2Smrg esac 679344dda7b2Smrg fi 679444dda7b2Smrg ;; 679544dda7b2Smrgesac 67967a3b38f7Smrg 679744dda7b2Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 679844dda7b2Smrg [Whether or not to add -lc for building shared libraries]) 679944dda7b2Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 680044dda7b2Smrg [enable_shared_with_static_runtimes], [0], 680144dda7b2Smrg [Whether or not to disallow shared libs when runtime libs are static]) 680244dda7b2Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 680344dda7b2Smrg [Compiler flag to allow reflexive dlopens]) 680444dda7b2Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 680544dda7b2Smrg [Compiler flag to generate shared objects directly from archives]) 680644dda7b2Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 680744dda7b2Smrg [Whether the compiler copes with passing no objects directly]) 680844dda7b2Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 680944dda7b2Smrg [Create an old-style archive from a shared archive]) 681044dda7b2Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 681144dda7b2Smrg [Create a temporary old-style archive to link instead of a shared archive]) 681244dda7b2Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 681344dda7b2Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 681444dda7b2Smrg_LT_TAGDECL([], [module_cmds], [2], 681544dda7b2Smrg [Commands used to build a loadable module if different from building 681644dda7b2Smrg a shared archive.]) 681744dda7b2Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 681844dda7b2Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 681944dda7b2Smrg [Whether we are building with GNU ld or not]) 682044dda7b2Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 682144dda7b2Smrg [Flag that allows shared libraries with undefined symbols to be built]) 682244dda7b2Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 682344dda7b2Smrg [Flag that enforces no undefined symbols]) 682444dda7b2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 682544dda7b2Smrg [Flag to hardcode $libdir into a binary during linking. 682644dda7b2Smrg This must work even if $libdir does not exist]) 682744dda7b2Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 682844dda7b2Smrg [Whether we need a single "-rpath" flag with a separated argument]) 682944dda7b2Smrg_LT_TAGDECL([], [hardcode_direct], [0], 683044dda7b2Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 683144dda7b2Smrg DIR into the resulting binary]) 683244dda7b2Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 683344dda7b2Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 683444dda7b2Smrg DIR into the resulting binary and the resulting library dependency is 683544dda7b2Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 683644dda7b2Smrg library is relocated]) 683744dda7b2Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 683844dda7b2Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 683944dda7b2Smrg into the resulting binary]) 684044dda7b2Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 684144dda7b2Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 684244dda7b2Smrg into the resulting binary]) 684344dda7b2Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 684444dda7b2Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 684544dda7b2Smrg into the library and all subsequent libraries and executables linked 684644dda7b2Smrg against it]) 684744dda7b2Smrg_LT_TAGDECL([], [inherit_rpath], [0], 684844dda7b2Smrg [Set to yes if linker adds runtime paths of dependent libraries 684944dda7b2Smrg to runtime path list]) 685044dda7b2Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 685144dda7b2Smrg [Whether libtool must link a program against all its dependency libraries]) 685244dda7b2Smrg_LT_TAGDECL([], [always_export_symbols], [0], 685344dda7b2Smrg [Set to "yes" if exported symbols are required]) 685444dda7b2Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 685544dda7b2Smrg [The commands to list exported symbols]) 685644dda7b2Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 685744dda7b2Smrg [Symbols that should not be listed in the preloaded symbols]) 685844dda7b2Smrg_LT_TAGDECL([], [include_expsyms], [1], 685944dda7b2Smrg [Symbols that must always be exported]) 686044dda7b2Smrg_LT_TAGDECL([], [prelink_cmds], [2], 686144dda7b2Smrg [Commands necessary for linking programs (against libraries) with templates]) 6862862f5301Smrg_LT_TAGDECL([], [postlink_cmds], [2], 6863862f5301Smrg [Commands necessary for finishing linking programs]) 686444dda7b2Smrg_LT_TAGDECL([], [file_list_spec], [1], 686544dda7b2Smrg [Specify filename containing input files]) 686644dda7b2Smrgdnl FIXME: Not yet implemented 686744dda7b2Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 686844dda7b2Smrgdnl [Compiler flag to generate thread safe objects]) 686944dda7b2Smrg])# _LT_LINKER_SHLIBS 68707a3b38f7Smrg 68717a3b38f7Smrg 687244dda7b2Smrg# _LT_LANG_C_CONFIG([TAG]) 687344dda7b2Smrg# ------------------------ 687444dda7b2Smrg# Ensure that the configuration variables for a C compiler are suitably 687544dda7b2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 687644dda7b2Smrg# the compiler configuration to `libtool'. 687744dda7b2Smrgm4_defun([_LT_LANG_C_CONFIG], 687844dda7b2Smrg[m4_require([_LT_DECL_EGREP])dnl 687944dda7b2Smrglt_save_CC="$CC" 688044dda7b2SmrgAC_LANG_PUSH(C) 68817a3b38f7Smrg 688244dda7b2Smrg# Source file extension for C test sources. 688344dda7b2Smrgac_ext=c 68847a3b38f7Smrg 688544dda7b2Smrg# Object file extension for compiled C test sources. 68867a3b38f7Smrgobjext=o 68877a3b38f7Smrg_LT_TAGVAR(objext, $1)=$objext 68887a3b38f7Smrg 68897a3b38f7Smrg# Code to be used in simple compile tests 689044dda7b2Smrglt_simple_compile_test_code="int some_variable = 0;" 68917a3b38f7Smrg 68927a3b38f7Smrg# Code to be used in simple link tests 689344dda7b2Smrglt_simple_link_test_code='int main(){return(0);}' 68947a3b38f7Smrg 68957a3b38f7Smrg_LT_TAG_COMPILER 689644dda7b2Smrg# Save the default compiler, since it gets overwritten when the other 689744dda7b2Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 689844dda7b2Smrgcompiler_DEFAULT=$CC 68997a3b38f7Smrg 69007a3b38f7Smrg# save warnings/boilerplate of simple test code 69017a3b38f7Smrg_LT_COMPILER_BOILERPLATE 69027a3b38f7Smrg_LT_LINKER_BOILERPLATE 69037a3b38f7Smrg 69047a3b38f7Smrgif test -n "$compiler"; then 690544dda7b2Smrg _LT_COMPILER_NO_RTTI($1) 690644dda7b2Smrg _LT_COMPILER_PIC($1) 690744dda7b2Smrg _LT_COMPILER_C_O($1) 690844dda7b2Smrg _LT_COMPILER_FILE_LOCKS($1) 690944dda7b2Smrg _LT_LINKER_SHLIBS($1) 691044dda7b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 691144dda7b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 691244dda7b2Smrg LT_SYS_DLOPEN_SELF 691344dda7b2Smrg _LT_CMD_STRIPLIB 69147a3b38f7Smrg 691544dda7b2Smrg # Report which library types will actually be built 691644dda7b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 691744dda7b2Smrg AC_MSG_RESULT([$can_build_shared]) 69187a3b38f7Smrg 691944dda7b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 692044dda7b2Smrg test "$can_build_shared" = "no" && enable_shared=no 69217a3b38f7Smrg 692244dda7b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 692344dda7b2Smrg # are all built from PIC. 692444dda7b2Smrg case $host_os in 692544dda7b2Smrg aix3*) 692644dda7b2Smrg test "$enable_shared" = yes && enable_static=no 692744dda7b2Smrg if test -n "$RANLIB"; then 692844dda7b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 692944dda7b2Smrg postinstall_cmds='$RANLIB $lib' 693044dda7b2Smrg fi 693144dda7b2Smrg ;; 69327a3b38f7Smrg 693344dda7b2Smrg aix[[4-9]]*) 693444dda7b2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 693544dda7b2Smrg test "$enable_shared" = yes && enable_static=no 693644dda7b2Smrg fi 693744dda7b2Smrg ;; 69387a3b38f7Smrg esac 693944dda7b2Smrg AC_MSG_RESULT([$enable_shared]) 69407a3b38f7Smrg 694144dda7b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 694244dda7b2Smrg # Make sure either enable_shared or enable_static is yes. 694344dda7b2Smrg test "$enable_shared" = yes || enable_static=yes 694444dda7b2Smrg AC_MSG_RESULT([$enable_static]) 69457a3b38f7Smrg 694644dda7b2Smrg _LT_CONFIG($1) 694744dda7b2Smrgfi 694844dda7b2SmrgAC_LANG_POP 694944dda7b2SmrgCC="$lt_save_CC" 695044dda7b2Smrg])# _LT_LANG_C_CONFIG 69517a3b38f7Smrg 69527a3b38f7Smrg 695344dda7b2Smrg# _LT_LANG_CXX_CONFIG([TAG]) 695444dda7b2Smrg# -------------------------- 695544dda7b2Smrg# Ensure that the configuration variables for a C++ compiler are suitably 695644dda7b2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 695744dda7b2Smrg# the compiler configuration to `libtool'. 695844dda7b2Smrgm4_defun([_LT_LANG_CXX_CONFIG], 695944dda7b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 696044dda7b2Smrgm4_require([_LT_DECL_EGREP])dnl 6961862f5301Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 696244dda7b2Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 696344dda7b2Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 696444dda7b2Smrg (test "X$CXX" != "Xg++"))) ; then 696544dda7b2Smrg AC_PROG_CXXCPP 696644dda7b2Smrgelse 696744dda7b2Smrg _lt_caught_CXX_error=yes 696844dda7b2Smrgfi 69697a3b38f7Smrg 697044dda7b2SmrgAC_LANG_PUSH(C++) 697144dda7b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 697244dda7b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 697344dda7b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 697444dda7b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 697544dda7b2Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 697644dda7b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 697744dda7b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 697844dda7b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 697944dda7b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 698044dda7b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 698144dda7b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 698244dda7b2Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 698344dda7b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 698444dda7b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 698544dda7b2Smrg_LT_TAGVAR(module_cmds, $1)= 698644dda7b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 698744dda7b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 698844dda7b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 698944dda7b2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 699044dda7b2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 699144dda7b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 699244dda7b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 699344dda7b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 69947a3b38f7Smrg 699544dda7b2Smrg# Source file extension for C++ test sources. 699644dda7b2Smrgac_ext=cpp 69977a3b38f7Smrg 699844dda7b2Smrg# Object file extension for compiled C++ test sources. 699944dda7b2Smrgobjext=o 700044dda7b2Smrg_LT_TAGVAR(objext, $1)=$objext 70017a3b38f7Smrg 700244dda7b2Smrg# No sense in running all these tests if we already determined that 700344dda7b2Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 700444dda7b2Smrg# are currently assumed to apply to all compilers on this platform, 700544dda7b2Smrg# and will be corrupted by setting them based on a non-working compiler. 700644dda7b2Smrgif test "$_lt_caught_CXX_error" != yes; then 700744dda7b2Smrg # Code to be used in simple compile tests 700844dda7b2Smrg lt_simple_compile_test_code="int some_variable = 0;" 70097a3b38f7Smrg 701044dda7b2Smrg # Code to be used in simple link tests 701144dda7b2Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 70127a3b38f7Smrg 701344dda7b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 701444dda7b2Smrg _LT_TAG_COMPILER 70157a3b38f7Smrg 701644dda7b2Smrg # save warnings/boilerplate of simple test code 701744dda7b2Smrg _LT_COMPILER_BOILERPLATE 701844dda7b2Smrg _LT_LINKER_BOILERPLATE 70197a3b38f7Smrg 702044dda7b2Smrg # Allow CC to be a program name with arguments. 702144dda7b2Smrg lt_save_CC=$CC 7022862f5301Smrg lt_save_CFLAGS=$CFLAGS 702344dda7b2Smrg lt_save_LD=$LD 702444dda7b2Smrg lt_save_GCC=$GCC 702544dda7b2Smrg GCC=$GXX 702644dda7b2Smrg lt_save_with_gnu_ld=$with_gnu_ld 702744dda7b2Smrg lt_save_path_LD=$lt_cv_path_LD 702844dda7b2Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 702944dda7b2Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 703044dda7b2Smrg else 703144dda7b2Smrg $as_unset lt_cv_prog_gnu_ld 703244dda7b2Smrg fi 703344dda7b2Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 703444dda7b2Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 703544dda7b2Smrg else 703644dda7b2Smrg $as_unset lt_cv_path_LD 703744dda7b2Smrg fi 703844dda7b2Smrg test -z "${LDCXX+set}" || LD=$LDCXX 703944dda7b2Smrg CC=${CXX-"c++"} 7040862f5301Smrg CFLAGS=$CXXFLAGS 704144dda7b2Smrg compiler=$CC 704244dda7b2Smrg _LT_TAGVAR(compiler, $1)=$CC 704344dda7b2Smrg _LT_CC_BASENAME([$compiler]) 70447a3b38f7Smrg 704544dda7b2Smrg if test -n "$compiler"; then 704644dda7b2Smrg # We don't want -fno-exception when compiling C++ code, so set the 704744dda7b2Smrg # no_builtin_flag separately 704844dda7b2Smrg if test "$GXX" = yes; then 704944dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 705044dda7b2Smrg else 705144dda7b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 705244dda7b2Smrg fi 70537a3b38f7Smrg 705444dda7b2Smrg if test "$GXX" = yes; then 705544dda7b2Smrg # Set up default GNU C++ configuration 70567a3b38f7Smrg 705744dda7b2Smrg LT_PATH_LD 70587a3b38f7Smrg 705944dda7b2Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 706044dda7b2Smrg # archiving commands below assume that GNU ld is being used. 706144dda7b2Smrg if test "$with_gnu_ld" = yes; then 7062862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7063862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 70647a3b38f7Smrg 706544dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 706644dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 70677a3b38f7Smrg 706844dda7b2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 706944dda7b2Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 707044dda7b2Smrg # investigate it a little bit more. (MM) 707144dda7b2Smrg wlarc='${wl}' 70727a3b38f7Smrg 707344dda7b2Smrg # ancient GNU ld didn't support --whole-archive et. al. 707444dda7b2Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 707544dda7b2Smrg $GREP 'no-whole-archive' > /dev/null; then 707644dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 707744dda7b2Smrg else 707844dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 707944dda7b2Smrg fi 708044dda7b2Smrg else 708144dda7b2Smrg with_gnu_ld=no 708244dda7b2Smrg wlarc= 70837a3b38f7Smrg 708444dda7b2Smrg # A generic and very simple default shared library creation 708544dda7b2Smrg # command for GNU C++ for the case where it uses the native 708644dda7b2Smrg # linker, instead of GNU ld. If possible, this setting should 708744dda7b2Smrg # overridden to take advantage of the native linker features on 708844dda7b2Smrg # the platform it is being used on. 708944dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 709044dda7b2Smrg fi 70917a3b38f7Smrg 709244dda7b2Smrg # Commands to make compiler produce verbose output that lists 709344dda7b2Smrg # what "hidden" libraries, object files and flags are used when 709444dda7b2Smrg # linking a shared library. 709544dda7b2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 70967a3b38f7Smrg 709744dda7b2Smrg else 709844dda7b2Smrg GXX=no 709944dda7b2Smrg with_gnu_ld=no 710044dda7b2Smrg wlarc= 710144dda7b2Smrg fi 71027a3b38f7Smrg 710344dda7b2Smrg # PORTME: fill in a description of your system's C++ link characteristics 710444dda7b2Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 710544dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 710644dda7b2Smrg case $host_os in 710744dda7b2Smrg aix3*) 710844dda7b2Smrg # FIXME: insert proper C++ library support 710944dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 711044dda7b2Smrg ;; 711144dda7b2Smrg aix[[4-9]]*) 711244dda7b2Smrg if test "$host_cpu" = ia64; then 711344dda7b2Smrg # On IA64, the linker does run time linking by default, so we don't 711444dda7b2Smrg # have to do anything special. 711544dda7b2Smrg aix_use_runtimelinking=no 711644dda7b2Smrg exp_sym_flag='-Bexport' 711744dda7b2Smrg no_entry_flag="" 711844dda7b2Smrg else 711944dda7b2Smrg aix_use_runtimelinking=no 71207a3b38f7Smrg 712144dda7b2Smrg # Test if we are trying to use run time linking or normal 712244dda7b2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 712344dda7b2Smrg # need to do runtime linking. 712444dda7b2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 712544dda7b2Smrg for ld_flag in $LDFLAGS; do 712644dda7b2Smrg case $ld_flag in 712744dda7b2Smrg *-brtl*) 712844dda7b2Smrg aix_use_runtimelinking=yes 712944dda7b2Smrg break 713044dda7b2Smrg ;; 713144dda7b2Smrg esac 713244dda7b2Smrg done 713344dda7b2Smrg ;; 713444dda7b2Smrg esac 71357a3b38f7Smrg 713644dda7b2Smrg exp_sym_flag='-bexport' 713744dda7b2Smrg no_entry_flag='-bnoentry' 713844dda7b2Smrg fi 71397a3b38f7Smrg 714044dda7b2Smrg # When large executables or shared objects are built, AIX ld can 714144dda7b2Smrg # have problems creating the table of contents. If linking a library 714244dda7b2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 714344dda7b2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 714444dda7b2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 71457a3b38f7Smrg 714644dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='' 714744dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 714844dda7b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 714944dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 715044dda7b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 715144dda7b2Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 71527a3b38f7Smrg 715344dda7b2Smrg if test "$GXX" = yes; then 715444dda7b2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 715544dda7b2Smrg # We only want to do this on AIX 4.2 and lower, the check 715644dda7b2Smrg # below for broken collect2 doesn't work under 4.3+ 715744dda7b2Smrg collect2name=`${CC} -print-prog-name=collect2` 715844dda7b2Smrg if test -f "$collect2name" && 715944dda7b2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 716044dda7b2Smrg then 716144dda7b2Smrg # We have reworked collect2 716244dda7b2Smrg : 716344dda7b2Smrg else 716444dda7b2Smrg # We have old collect2 716544dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 716644dda7b2Smrg # It fails to find uninstalled libraries when the uninstalled 716744dda7b2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 716844dda7b2Smrg # to unsupported forces relinking 716944dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 717044dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 717144dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 717244dda7b2Smrg fi 717344dda7b2Smrg esac 717444dda7b2Smrg shared_flag='-shared' 717544dda7b2Smrg if test "$aix_use_runtimelinking" = yes; then 717644dda7b2Smrg shared_flag="$shared_flag "'${wl}-G' 717744dda7b2Smrg fi 717844dda7b2Smrg else 717944dda7b2Smrg # not using gcc 718044dda7b2Smrg if test "$host_cpu" = ia64; then 718144dda7b2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 718244dda7b2Smrg # chokes on -Wl,-G. The following line is correct: 718344dda7b2Smrg shared_flag='-G' 718444dda7b2Smrg else 718544dda7b2Smrg if test "$aix_use_runtimelinking" = yes; then 718644dda7b2Smrg shared_flag='${wl}-G' 718744dda7b2Smrg else 718844dda7b2Smrg shared_flag='${wl}-bM:SRE' 718944dda7b2Smrg fi 719044dda7b2Smrg fi 719144dda7b2Smrg fi 71927a3b38f7Smrg 719344dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 719444dda7b2Smrg # It seems that -bexpall does not export symbols beginning with 719544dda7b2Smrg # underscore (_), so it is better to generate a list of symbols to 719644dda7b2Smrg # export. 719744dda7b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 719844dda7b2Smrg if test "$aix_use_runtimelinking" = yes; then 719944dda7b2Smrg # Warning - without using the other runtime loading flags (-brtl), 720044dda7b2Smrg # -berok will link without error, but may produce a broken library. 720144dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 720244dda7b2Smrg # Determine the default libpath from the value encoded in an empty 720344dda7b2Smrg # executable. 7204862f5301Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 720544dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72067a3b38f7Smrg 720744dda7b2Smrg _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" 720844dda7b2Smrg else 720944dda7b2Smrg if test "$host_cpu" = ia64; then 721044dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 721144dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 721244dda7b2Smrg _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" 721344dda7b2Smrg else 721444dda7b2Smrg # Determine the default libpath from the value encoded in an 721544dda7b2Smrg # empty executable. 7216862f5301Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 721744dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 721844dda7b2Smrg # Warning - without using the other run time loading flags, 721944dda7b2Smrg # -berok will link without error, but may produce a broken library. 722044dda7b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 722144dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 722244dda7b2Smrg if test "$with_gnu_ld" = yes; then 722344dda7b2Smrg # We only use this code for GNU lds that support --whole-archive. 722444dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 722544dda7b2Smrg else 722644dda7b2Smrg # Exported symbols can be pulled into shared objects from archives 722744dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 722844dda7b2Smrg fi 722944dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 723044dda7b2Smrg # This is similar to how AIX traditionally builds its shared 723144dda7b2Smrg # libraries. 723244dda7b2Smrg _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' 723344dda7b2Smrg fi 723444dda7b2Smrg fi 723544dda7b2Smrg ;; 72367a3b38f7Smrg 723744dda7b2Smrg beos*) 723844dda7b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 723944dda7b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 724044dda7b2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 724144dda7b2Smrg # support --undefined. This deserves some investigation. FIXME 724244dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 724344dda7b2Smrg else 724444dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 724544dda7b2Smrg fi 724644dda7b2Smrg ;; 72477a3b38f7Smrg 724844dda7b2Smrg chorus*) 724944dda7b2Smrg case $cc_basename in 725044dda7b2Smrg *) 725144dda7b2Smrg # FIXME: insert proper C++ library support 725244dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 725344dda7b2Smrg ;; 725444dda7b2Smrg esac 725544dda7b2Smrg ;; 72567a3b38f7Smrg 725744dda7b2Smrg cygwin* | mingw* | pw32* | cegcc*) 7258862f5301Smrg case $GXX,$cc_basename in 7259862f5301Smrg ,cl* | no,cl*) 7260862f5301Smrg # Native MSVC 7261862f5301Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 7262862f5301Smrg # no search path for DLLs. 7263862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7264862f5301Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7265862f5301Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7266862f5301Smrg _LT_TAGVAR(file_list_spec, $1)='@' 7267862f5301Smrg # Tell ltmain to make .lib files, not .a files. 7268862f5301Smrg libext=lib 7269862f5301Smrg # Tell ltmain to make .dll files, not .so files. 7270862f5301Smrg shrext_cmds=".dll" 7271862f5301Smrg # FIXME: Setting linknames here is a bad hack. 7272862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 7273862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7274862f5301Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 7275862f5301Smrg else 7276862f5301Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 7277862f5301Smrg fi~ 7278862f5301Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 7279862f5301Smrg linknames=' 7280862f5301Smrg # The linker will not automatically build a static lib if we build a DLL. 7281862f5301Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7282862f5301Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7283862f5301Smrg # Don't use ranlib 7284862f5301Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 7285862f5301Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 7286862f5301Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 7287862f5301Smrg case $lt_outputfile in 7288862f5301Smrg *.exe|*.EXE) ;; 7289862f5301Smrg *) 7290862f5301Smrg lt_outputfile="$lt_outputfile.exe" 7291862f5301Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 7292862f5301Smrg ;; 7293862f5301Smrg esac~ 7294862f5301Smrg func_to_tool_file "$lt_outputfile"~ 7295862f5301Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 7296862f5301Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 7297862f5301Smrg $RM "$lt_outputfile.manifest"; 7298862f5301Smrg fi' 7299862f5301Smrg ;; 7300862f5301Smrg *) 7301862f5301Smrg # g++ 7302862f5301Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7303862f5301Smrg # as there is no search path for DLLs. 7304862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7305862f5301Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7306862f5301Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7307862f5301Smrg _LT_TAGVAR(always_export_symbols, $1)=no 7308862f5301Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7309862f5301Smrg 7310862f5301Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7311862f5301Smrg _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' 7312862f5301Smrg # If the export-symbols file already is a .def file (1st line 7313862f5301Smrg # is EXPORTS), use it as is; otherwise, prepend... 7314862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7315862f5301Smrg cp $export_symbols $output_objdir/$soname.def; 7316862f5301Smrg else 7317862f5301Smrg echo EXPORTS > $output_objdir/$soname.def; 7318862f5301Smrg cat $export_symbols >> $output_objdir/$soname.def; 7319862f5301Smrg fi~ 7320862f5301Smrg $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' 7321862f5301Smrg else 7322862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7323862f5301Smrg fi 7324862f5301Smrg ;; 7325862f5301Smrg esac 7326862f5301Smrg ;; 732744dda7b2Smrg darwin* | rhapsody*) 732844dda7b2Smrg _LT_DARWIN_LINKER_FEATURES($1) 732944dda7b2Smrg ;; 73307a3b38f7Smrg 733144dda7b2Smrg dgux*) 733244dda7b2Smrg case $cc_basename in 733344dda7b2Smrg ec++*) 733444dda7b2Smrg # FIXME: insert proper C++ library support 733544dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 733644dda7b2Smrg ;; 733744dda7b2Smrg ghcx*) 733844dda7b2Smrg # Green Hills C++ Compiler 733944dda7b2Smrg # FIXME: insert proper C++ library support 734044dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 734144dda7b2Smrg ;; 734244dda7b2Smrg *) 734344dda7b2Smrg # FIXME: insert proper C++ library support 734444dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 734544dda7b2Smrg ;; 734644dda7b2Smrg esac 734744dda7b2Smrg ;; 73487a3b38f7Smrg 7349fc544a13Smrg freebsd2.*) 735044dda7b2Smrg # C++ shared libraries reported to be fairly broken before 735144dda7b2Smrg # switch to ELF 735244dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 735344dda7b2Smrg ;; 73547a3b38f7Smrg 735544dda7b2Smrg freebsd-elf*) 735644dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 735744dda7b2Smrg ;; 73587a3b38f7Smrg 735944dda7b2Smrg freebsd* | dragonfly*) 736044dda7b2Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 736144dda7b2Smrg # conventions 736244dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 736344dda7b2Smrg ;; 73647a3b38f7Smrg 736544dda7b2Smrg gnu*) 736644dda7b2Smrg ;; 73677a3b38f7Smrg 736844dda7b2Smrg haiku*) 736944dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 737044dda7b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 737144dda7b2Smrg ;; 73727a3b38f7Smrg 737344dda7b2Smrg hpux9*) 737444dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 737544dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 737644dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 737744dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 737844dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 737944dda7b2Smrg # but as the default 738044dda7b2Smrg # location of the library. 73817a3b38f7Smrg 738244dda7b2Smrg case $cc_basename in 738344dda7b2Smrg CC*) 738444dda7b2Smrg # FIXME: insert proper C++ library support 738544dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 738644dda7b2Smrg ;; 738744dda7b2Smrg aCC*) 738844dda7b2Smrg _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' 738944dda7b2Smrg # Commands to make compiler produce verbose output that lists 739044dda7b2Smrg # what "hidden" libraries, object files and flags are used when 739144dda7b2Smrg # linking a shared library. 739244dda7b2Smrg # 739344dda7b2Smrg # There doesn't appear to be a way to prevent this compiler from 739444dda7b2Smrg # explicitly linking system object files so we need to strip them 739544dda7b2Smrg # from the output so that they don't get included in the library 739644dda7b2Smrg # dependencies. 739744dda7b2Smrg 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"' 739844dda7b2Smrg ;; 739944dda7b2Smrg *) 740044dda7b2Smrg if test "$GXX" = yes; then 7401862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 740244dda7b2Smrg else 740344dda7b2Smrg # FIXME: insert proper C++ library support 740444dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 740544dda7b2Smrg fi 740644dda7b2Smrg ;; 740744dda7b2Smrg esac 740844dda7b2Smrg ;; 74097a3b38f7Smrg 741044dda7b2Smrg hpux10*|hpux11*) 741144dda7b2Smrg if test $with_gnu_ld = no; then 741244dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 741344dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74147a3b38f7Smrg 741544dda7b2Smrg case $host_cpu in 741644dda7b2Smrg hppa*64*|ia64*) 741744dda7b2Smrg ;; 741844dda7b2Smrg *) 741944dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 742044dda7b2Smrg ;; 742144dda7b2Smrg esac 742244dda7b2Smrg fi 742344dda7b2Smrg case $host_cpu in 742444dda7b2Smrg hppa*64*|ia64*) 742544dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 742644dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 742744dda7b2Smrg ;; 742844dda7b2Smrg *) 742944dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 743044dda7b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 743144dda7b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 743244dda7b2Smrg # but as the default 743344dda7b2Smrg # location of the library. 743444dda7b2Smrg ;; 743544dda7b2Smrg esac 74367a3b38f7Smrg 743744dda7b2Smrg case $cc_basename in 743844dda7b2Smrg CC*) 743944dda7b2Smrg # FIXME: insert proper C++ library support 744044dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 744144dda7b2Smrg ;; 744244dda7b2Smrg aCC*) 744344dda7b2Smrg case $host_cpu in 744444dda7b2Smrg hppa*64*) 744544dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 744644dda7b2Smrg ;; 744744dda7b2Smrg ia64*) 744844dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 744944dda7b2Smrg ;; 745044dda7b2Smrg *) 745144dda7b2Smrg _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' 745244dda7b2Smrg ;; 745344dda7b2Smrg esac 745444dda7b2Smrg # Commands to make compiler produce verbose output that lists 745544dda7b2Smrg # what "hidden" libraries, object files and flags are used when 745644dda7b2Smrg # linking a shared library. 745744dda7b2Smrg # 745844dda7b2Smrg # There doesn't appear to be a way to prevent this compiler from 745944dda7b2Smrg # explicitly linking system object files so we need to strip them 746044dda7b2Smrg # from the output so that they don't get included in the library 746144dda7b2Smrg # dependencies. 746244dda7b2Smrg 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"' 746344dda7b2Smrg ;; 746444dda7b2Smrg *) 746544dda7b2Smrg if test "$GXX" = yes; then 746644dda7b2Smrg if test $with_gnu_ld = no; then 746744dda7b2Smrg case $host_cpu in 746844dda7b2Smrg hppa*64*) 746944dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 747044dda7b2Smrg ;; 747144dda7b2Smrg ia64*) 7472862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 747344dda7b2Smrg ;; 747444dda7b2Smrg *) 7475862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 747644dda7b2Smrg ;; 747744dda7b2Smrg esac 747844dda7b2Smrg fi 747944dda7b2Smrg else 748044dda7b2Smrg # FIXME: insert proper C++ library support 748144dda7b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 748244dda7b2Smrg fi 748344dda7b2Smrg ;; 748444dda7b2Smrg esac 748544dda7b2Smrg ;; 74867a3b38f7Smrg 748744dda7b2Smrg interix[[3-9]]*) 748844dda7b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 748944dda7b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 749044dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 749144dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 749244dda7b2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 749344dda7b2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 749444dda7b2Smrg # default) and relocated if they conflict, which is a slow very memory 749544dda7b2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 749644dda7b2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 749744dda7b2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 749844dda7b2Smrg _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' 749944dda7b2Smrg _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' 750044dda7b2Smrg ;; 750144dda7b2Smrg irix5* | irix6*) 750244dda7b2Smrg case $cc_basename in 750344dda7b2Smrg CC*) 750444dda7b2Smrg # SGI C++ 750544dda7b2Smrg _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' 75067a3b38f7Smrg 750744dda7b2Smrg # Archives containing C++ object files must be created using 750844dda7b2Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 750944dda7b2Smrg # necessary to make sure instantiated templates are included 751044dda7b2Smrg # in the archive. 751144dda7b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 751244dda7b2Smrg ;; 751344dda7b2Smrg *) 751444dda7b2Smrg if test "$GXX" = yes; then 751544dda7b2Smrg if test "$with_gnu_ld" = no; then 7516862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 751744dda7b2Smrg else 7518862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 751944dda7b2Smrg fi 752044dda7b2Smrg fi 752144dda7b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 752244dda7b2Smrg ;; 752344dda7b2Smrg esac 752444dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 752544dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 752644dda7b2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 752744dda7b2Smrg ;; 75287a3b38f7Smrg 752944dda7b2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 753044dda7b2Smrg case $cc_basename in 753144dda7b2Smrg KCC*) 753244dda7b2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 75337a3b38f7Smrg 753444dda7b2Smrg # KCC will only create a shared library if the output file 753544dda7b2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 753644dda7b2Smrg # to its proper name (with version) after linking. 753744dda7b2Smrg _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' 753844dda7b2Smrg _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' 753944dda7b2Smrg # Commands to make compiler produce verbose output that lists 754044dda7b2Smrg # what "hidden" libraries, object files and flags are used when 754144dda7b2Smrg # linking a shared library. 754244dda7b2Smrg # 754344dda7b2Smrg # There doesn't appear to be a way to prevent this compiler from 754444dda7b2Smrg # explicitly linking system object files so we need to strip them 754544dda7b2Smrg # from the output so that they don't get included in the library 754644dda7b2Smrg # dependencies. 754744dda7b2Smrg 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"' 75487a3b38f7Smrg 754944dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 755044dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75517a3b38f7Smrg 755244dda7b2Smrg # Archives containing C++ object files must be created using 755344dda7b2Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 755444dda7b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 755544dda7b2Smrg ;; 755644dda7b2Smrg icpc* | ecpc* ) 755744dda7b2Smrg # Intel C++ 755844dda7b2Smrg with_gnu_ld=yes 755944dda7b2Smrg # version 8.0 and above of icpc choke on multiply defined symbols 756044dda7b2Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 756144dda7b2Smrg # earlier do not add the objects themselves. 756244dda7b2Smrg case `$CC -V 2>&1` in 756344dda7b2Smrg *"Version 7."*) 756444dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 756544dda7b2Smrg _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' 756644dda7b2Smrg ;; 756744dda7b2Smrg *) # Version 8.0 or newer 756844dda7b2Smrg tmp_idyn= 756944dda7b2Smrg case $host_cpu in 757044dda7b2Smrg ia64*) tmp_idyn=' -i_dynamic';; 757144dda7b2Smrg esac 757244dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 757344dda7b2Smrg _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' 757444dda7b2Smrg ;; 757544dda7b2Smrg esac 757644dda7b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 757744dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 757844dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 757944dda7b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 758044dda7b2Smrg ;; 758144dda7b2Smrg pgCC* | pgcpp*) 758244dda7b2Smrg # Portland Group C++ compiler 758344dda7b2Smrg case `$CC -V` in 758444dda7b2Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 758544dda7b2Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 758644dda7b2Smrg rm -rf $tpldir~ 758744dda7b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 758844dda7b2Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 758944dda7b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 759044dda7b2Smrg rm -rf $tpldir~ 759144dda7b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 759244dda7b2Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 759344dda7b2Smrg $RANLIB $oldlib' 759444dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 759544dda7b2Smrg rm -rf $tpldir~ 759644dda7b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 759744dda7b2Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 759844dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 759944dda7b2Smrg rm -rf $tpldir~ 760044dda7b2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 760144dda7b2Smrg $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' 760244dda7b2Smrg ;; 760344dda7b2Smrg *) # Version 6 and above use weak symbols 760444dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 760544dda7b2Smrg _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' 760644dda7b2Smrg ;; 760744dda7b2Smrg esac 76087a3b38f7Smrg 760944dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 761044dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 761144dda7b2Smrg _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' 761244dda7b2Smrg ;; 761344dda7b2Smrg cxx*) 761444dda7b2Smrg # Compaq C++ 761544dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 761644dda7b2Smrg _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' 76177a3b38f7Smrg 761844dda7b2Smrg runpath_var=LD_RUN_PATH 761944dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 762044dda7b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 76217a3b38f7Smrg 762244dda7b2Smrg # Commands to make compiler produce verbose output that lists 762344dda7b2Smrg # what "hidden" libraries, object files and flags are used when 762444dda7b2Smrg # linking a shared library. 762544dda7b2Smrg # 762644dda7b2Smrg # There doesn't appear to be a way to prevent this compiler from 762744dda7b2Smrg # explicitly linking system object files so we need to strip them 762844dda7b2Smrg # from the output so that they don't get included in the library 762944dda7b2Smrg # dependencies. 763044dda7b2Smrg 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' 763144dda7b2Smrg ;; 763244dda7b2Smrg xl* | mpixl* | bgxl*) 763344dda7b2Smrg # IBM XL 8.0 on PPC, with GNU ld 763444dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 763544dda7b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 763644dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 763744dda7b2Smrg if test "x$supports_anon_versioning" = xyes; then 763844dda7b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 763944dda7b2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 764044dda7b2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 764144dda7b2Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 764244dda7b2Smrg fi 764344dda7b2Smrg ;; 764444dda7b2Smrg *) 764544dda7b2Smrg case `$CC -V 2>&1 | sed 5q` in 764644dda7b2Smrg *Sun\ C*) 764744dda7b2Smrg # Sun C++ 5.9 764844dda7b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 764944dda7b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 765044dda7b2Smrg _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' 765144dda7b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 765244dda7b2Smrg _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' 765344dda7b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 76547a3b38f7Smrg 7655862f5301Smrg # Not sure whether something based on 7656862f5301Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7657862f5301Smrg # would be better. 7658862f5301Smrg output_verbose_link_cmd='func_echo_all' 7659862f5301Smrg 7660862f5301Smrg # Archives containing C++ object files must be created using 7661862f5301Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7662862f5301Smrg # necessary to make sure instantiated templates are included 7663862f5301Smrg # in the archive. 7664862f5301Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7665862f5301Smrg ;; 7666862f5301Smrg esac 7667862f5301Smrg ;; 7668862f5301Smrg esac 7669862f5301Smrg ;; 7670862f5301Smrg 7671862f5301Smrg lynxos*) 7672862f5301Smrg # FIXME: insert proper C++ library support 7673862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7674862f5301Smrg ;; 7675862f5301Smrg 7676862f5301Smrg m88k*) 7677862f5301Smrg # FIXME: insert proper C++ library support 7678862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7679862f5301Smrg ;; 7680862f5301Smrg 7681862f5301Smrg mvs*) 7682862f5301Smrg case $cc_basename in 7683862f5301Smrg cxx*) 7684862f5301Smrg # FIXME: insert proper C++ library support 7685862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7686862f5301Smrg ;; 7687862f5301Smrg *) 7688862f5301Smrg # FIXME: insert proper C++ library support 7689862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7690862f5301Smrg ;; 7691862f5301Smrg esac 7692862f5301Smrg ;; 7693862f5301Smrg 7694862f5301Smrg netbsd*) 7695862f5301Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7696862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7697862f5301Smrg wlarc= 7698862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7699862f5301Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7700862f5301Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7701862f5301Smrg fi 7702862f5301Smrg # Workaround some broken pre-1.5 toolchains 7703862f5301Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7704862f5301Smrg ;; 7705862f5301Smrg 7706862f5301Smrg *nto* | *qnx*) 7707862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7708862f5301Smrg ;; 7709862f5301Smrg 7710862f5301Smrg openbsd2*) 7711862f5301Smrg # C++ shared libraries are fairly broken 7712862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7713862f5301Smrg ;; 7714862f5301Smrg 7715862f5301Smrg openbsd*) 7716862f5301Smrg if test -f /usr/libexec/ld.so; then 7717862f5301Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7718862f5301Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7719862f5301Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7720862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7721862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7722862f5301Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7723862f5301Smrg _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' 7724862f5301Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7725862f5301Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7726862f5301Smrg fi 7727862f5301Smrg output_verbose_link_cmd=func_echo_all 7728862f5301Smrg else 7729862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7730862f5301Smrg fi 7731862f5301Smrg ;; 7732862f5301Smrg 7733862f5301Smrg osf3* | osf4* | osf5*) 7734862f5301Smrg case $cc_basename in 7735862f5301Smrg KCC*) 7736862f5301Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7737862f5301Smrg 7738862f5301Smrg # KCC will only create a shared library if the output file 7739862f5301Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7740862f5301Smrg # to its proper name (with version) after linking. 7741862f5301Smrg _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' 7742862f5301Smrg 7743862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7744862f5301Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7745862f5301Smrg 7746862f5301Smrg # Archives containing C++ object files must be created using 7747862f5301Smrg # the KAI C++ compiler. 7748862f5301Smrg case $host in 7749862f5301Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7750862f5301Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7751862f5301Smrg esac 7752862f5301Smrg ;; 7753862f5301Smrg RCC*) 7754862f5301Smrg # Rational C++ 2.4.1 7755862f5301Smrg # FIXME: insert proper C++ library support 7756862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7757862f5301Smrg ;; 7758862f5301Smrg cxx*) 7759862f5301Smrg case $host in 7760862f5301Smrg osf3*) 7761862f5301Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7762862f5301Smrg _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' 7763862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7764862f5301Smrg ;; 7765862f5301Smrg *) 7766862f5301Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7767862f5301Smrg _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' 7768862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7769862f5301Smrg echo "-hidden">> $lib.exp~ 7770862f5301Smrg $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~ 7771862f5301Smrg $RM $lib.exp' 7772862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7773862f5301Smrg ;; 7774862f5301Smrg esac 7775862f5301Smrg 7776862f5301Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7777862f5301Smrg 7778862f5301Smrg # Commands to make compiler produce verbose output that lists 7779862f5301Smrg # what "hidden" libraries, object files and flags are used when 7780862f5301Smrg # linking a shared library. 7781862f5301Smrg # 7782862f5301Smrg # There doesn't appear to be a way to prevent this compiler from 7783862f5301Smrg # explicitly linking system object files so we need to strip them 7784862f5301Smrg # from the output so that they don't get included in the library 7785862f5301Smrg # dependencies. 7786862f5301Smrg 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"' 7787862f5301Smrg ;; 7788862f5301Smrg *) 7789862f5301Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7790862f5301Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7791862f5301Smrg case $host in 7792862f5301Smrg osf3*) 7793862f5301Smrg _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' 7794862f5301Smrg ;; 7795862f5301Smrg *) 7796862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7797862f5301Smrg ;; 7798862f5301Smrg esac 7799862f5301Smrg 7800862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7801862f5301Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7802862f5301Smrg 7803862f5301Smrg # Commands to make compiler produce verbose output that lists 7804862f5301Smrg # what "hidden" libraries, object files and flags are used when 7805862f5301Smrg # linking a shared library. 7806862f5301Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7807862f5301Smrg 7808862f5301Smrg else 7809862f5301Smrg # FIXME: insert proper C++ library support 7810862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7811862f5301Smrg fi 7812862f5301Smrg ;; 7813862f5301Smrg esac 7814862f5301Smrg ;; 7815862f5301Smrg 7816862f5301Smrg psos*) 7817862f5301Smrg # FIXME: insert proper C++ library support 7818862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7819862f5301Smrg ;; 7820862f5301Smrg 7821862f5301Smrg sunos4*) 7822862f5301Smrg case $cc_basename in 7823862f5301Smrg CC*) 7824862f5301Smrg # Sun C++ 4.x 7825862f5301Smrg # FIXME: insert proper C++ library support 7826862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7827862f5301Smrg ;; 7828862f5301Smrg lcc*) 7829862f5301Smrg # Lucid 7830862f5301Smrg # FIXME: insert proper C++ library support 7831862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7832862f5301Smrg ;; 7833862f5301Smrg *) 7834862f5301Smrg # FIXME: insert proper C++ library support 7835862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7836862f5301Smrg ;; 7837862f5301Smrg esac 7838862f5301Smrg ;; 7839862f5301Smrg 7840862f5301Smrg solaris*) 7841862f5301Smrg case $cc_basename in 7842862f5301Smrg CC* | sunCC*) 7843862f5301Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7844862f5301Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7845862f5301Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7846862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7847862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7848862f5301Smrg $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' 7849862f5301Smrg 7850862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7851862f5301Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7852862f5301Smrg case $host_os in 7853862f5301Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7854862f5301Smrg *) 7855862f5301Smrg # The compiler driver will combine and reorder linker options, 7856862f5301Smrg # but understands `-z linker_flag'. 7857862f5301Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7858862f5301Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7859862f5301Smrg ;; 7860862f5301Smrg esac 7861862f5301Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7862862f5301Smrg 7863862f5301Smrg output_verbose_link_cmd='func_echo_all' 7864862f5301Smrg 7865862f5301Smrg # Archives containing C++ object files must be created using 7866862f5301Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7867862f5301Smrg # necessary to make sure instantiated templates are included 7868862f5301Smrg # in the archive. 7869862f5301Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7870862f5301Smrg ;; 7871862f5301Smrg gcx*) 7872862f5301Smrg # Green Hills C++ Compiler 7873862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7874862f5301Smrg 7875862f5301Smrg # The C++ compiler must be used to create the archive. 7876862f5301Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7877862f5301Smrg ;; 7878862f5301Smrg *) 7879862f5301Smrg # GNU C++ compiler with Solaris linker 7880862f5301Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7881862f5301Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7882862f5301Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7883862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7884862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7885862f5301Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7886862f5301Smrg 7887862f5301Smrg # Commands to make compiler produce verbose output that lists 7888862f5301Smrg # what "hidden" libraries, object files and flags are used when 7889862f5301Smrg # linking a shared library. 7890862f5301Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7891862f5301Smrg else 7892862f5301Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 7893862f5301Smrg # platform. 7894862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7895862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7896862f5301Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7897862f5301Smrg 7898862f5301Smrg # Commands to make compiler produce verbose output that lists 7899862f5301Smrg # what "hidden" libraries, object files and flags are used when 7900862f5301Smrg # linking a shared library. 7901862f5301Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7902862f5301Smrg fi 7903862f5301Smrg 7904862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7905862f5301Smrg case $host_os in 7906862f5301Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7907862f5301Smrg *) 7908862f5301Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7909862f5301Smrg ;; 7910862f5301Smrg esac 7911862f5301Smrg fi 7912862f5301Smrg ;; 7913862f5301Smrg esac 7914862f5301Smrg ;; 7915862f5301Smrg 7916862f5301Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7917862f5301Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7918862f5301Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7919862f5301Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7920862f5301Smrg runpath_var='LD_RUN_PATH' 7921862f5301Smrg 7922862f5301Smrg case $cc_basename in 7923862f5301Smrg CC*) 7924862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7925862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7926862f5301Smrg ;; 7927862f5301Smrg *) 7928862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7929862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7930862f5301Smrg ;; 7931862f5301Smrg esac 7932862f5301Smrg ;; 7933862f5301Smrg 7934862f5301Smrg sysv5* | sco3.2v5* | sco5v6*) 7935862f5301Smrg # Note: We can NOT use -z defs as we might desire, because we do not 7936862f5301Smrg # link with -lc, and that would cause any symbols used from libc to 7937862f5301Smrg # always be unresolved, which means just about no library would 7938862f5301Smrg # ever link correctly. If we're not using GNU ld we use -z text 7939862f5301Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7940862f5301Smrg # as -z defs. 7941862f5301Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7942862f5301Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7943862f5301Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7944862f5301Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7945862f5301Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7946862f5301Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7947862f5301Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7948862f5301Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7949862f5301Smrg runpath_var='LD_RUN_PATH' 7950862f5301Smrg 7951862f5301Smrg case $cc_basename in 7952862f5301Smrg CC*) 7953862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7954862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7955862f5301Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7956862f5301Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7957862f5301Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7958862f5301Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 7959862f5301Smrg ;; 7960862f5301Smrg *) 7961862f5301Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7962862f5301Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7963862f5301Smrg ;; 7964862f5301Smrg esac 7965862f5301Smrg ;; 7966862f5301Smrg 7967862f5301Smrg tandem*) 7968862f5301Smrg case $cc_basename in 7969862f5301Smrg NCC*) 7970862f5301Smrg # NonStop-UX NCC 3.20 7971862f5301Smrg # FIXME: insert proper C++ library support 7972862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7973862f5301Smrg ;; 7974862f5301Smrg *) 7975862f5301Smrg # FIXME: insert proper C++ library support 7976862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7977862f5301Smrg ;; 7978862f5301Smrg esac 7979862f5301Smrg ;; 7980862f5301Smrg 7981862f5301Smrg vxworks*) 7982862f5301Smrg # FIXME: insert proper C++ library support 7983862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7984862f5301Smrg ;; 7985862f5301Smrg 7986862f5301Smrg *) 7987862f5301Smrg # FIXME: insert proper C++ library support 7988862f5301Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7989862f5301Smrg ;; 7990862f5301Smrg esac 7991862f5301Smrg 7992862f5301Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7993862f5301Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7994862f5301Smrg 7995862f5301Smrg _LT_TAGVAR(GCC, $1)="$GXX" 7996862f5301Smrg _LT_TAGVAR(LD, $1)="$LD" 7997862f5301Smrg 7998862f5301Smrg ## CAVEAT EMPTOR: 7999862f5301Smrg ## There is no encapsulation within the following macros, do not change 8000862f5301Smrg ## the running order or otherwise move them around unless you know exactly 8001862f5301Smrg ## what you are doing... 8002862f5301Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 8003862f5301Smrg _LT_COMPILER_PIC($1) 8004862f5301Smrg _LT_COMPILER_C_O($1) 8005862f5301Smrg _LT_COMPILER_FILE_LOCKS($1) 8006862f5301Smrg _LT_LINKER_SHLIBS($1) 8007862f5301Smrg _LT_SYS_DYNAMIC_LINKER($1) 8008862f5301Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8009862f5301Smrg 8010862f5301Smrg _LT_CONFIG($1) 8011862f5301Smrg fi # test -n "$compiler" 8012862f5301Smrg 8013862f5301Smrg CC=$lt_save_CC 8014862f5301Smrg CFLAGS=$lt_save_CFLAGS 8015862f5301Smrg LDCXX=$LD 8016862f5301Smrg LD=$lt_save_LD 8017862f5301Smrg GCC=$lt_save_GCC 8018862f5301Smrg with_gnu_ld=$lt_save_with_gnu_ld 8019862f5301Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 8020862f5301Smrg lt_cv_path_LD=$lt_save_path_LD 8021862f5301Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8022862f5301Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8023862f5301Smrgfi # test "$_lt_caught_CXX_error" != yes 8024862f5301Smrg 8025862f5301SmrgAC_LANG_POP 8026862f5301Smrg])# _LT_LANG_CXX_CONFIG 8027862f5301Smrg 8028862f5301Smrg 8029862f5301Smrg# _LT_FUNC_STRIPNAME_CNF 8030862f5301Smrg# ---------------------- 8031862f5301Smrg# func_stripname_cnf prefix suffix name 8032862f5301Smrg# strip PREFIX and SUFFIX off of NAME. 8033862f5301Smrg# PREFIX and SUFFIX must not contain globbing or regex special 8034862f5301Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 8035862f5301Smrg# dot (in which case that matches only a dot). 8036862f5301Smrg# 8037862f5301Smrg# This function is identical to the (non-XSI) version of func_stripname, 8038862f5301Smrg# except this one can be used by m4 code that may be executed by configure, 8039862f5301Smrg# rather than the libtool script. 8040862f5301Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 8041862f5301SmrgAC_REQUIRE([_LT_DECL_SED]) 8042862f5301SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 8043862f5301Smrgfunc_stripname_cnf () 8044862f5301Smrg{ 8045862f5301Smrg case ${2} in 8046862f5301Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 8047862f5301Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 8048862f5301Smrg esac 8049862f5301Smrg} # func_stripname_cnf 8050862f5301Smrg])# _LT_FUNC_STRIPNAME_CNF 8051862f5301Smrg 8052862f5301Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8053862f5301Smrg# --------------------------------- 8054862f5301Smrg# Figure out "hidden" library dependencies from verbose 8055862f5301Smrg# compiler output when linking a shared library. 8056862f5301Smrg# Parse the compiler output and extract the necessary 8057862f5301Smrg# objects, libraries and library flags. 8058862f5301Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8059862f5301Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8060862f5301SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 8061862f5301Smrg# Dependencies to place before and after the object being linked: 8062862f5301Smrg_LT_TAGVAR(predep_objects, $1)= 8063862f5301Smrg_LT_TAGVAR(postdep_objects, $1)= 8064862f5301Smrg_LT_TAGVAR(predeps, $1)= 8065862f5301Smrg_LT_TAGVAR(postdeps, $1)= 8066862f5301Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 8067862f5301Smrg 8068862f5301Smrgdnl we can't use the lt_simple_compile_test_code here, 8069862f5301Smrgdnl because it contains code intended for an executable, 8070862f5301Smrgdnl not a library. It's possible we should let each 8071862f5301Smrgdnl tag define a new lt_????_link_test_code variable, 8072862f5301Smrgdnl but it's only used here... 8073862f5301Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8074862f5301Smrgint a; 8075862f5301Smrgvoid foo (void) { a = 0; } 8076862f5301Smrg_LT_EOF 8077862f5301Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8078862f5301Smrgclass Foo 8079862f5301Smrg{ 8080862f5301Smrgpublic: 8081862f5301Smrg Foo (void) { a = 0; } 8082862f5301Smrgprivate: 8083862f5301Smrg int a; 8084862f5301Smrg}; 8085862f5301Smrg_LT_EOF 8086862f5301Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8087862f5301Smrg subroutine foo 8088862f5301Smrg implicit none 8089862f5301Smrg integer*4 a 8090862f5301Smrg a=0 8091862f5301Smrg return 8092862f5301Smrg end 8093862f5301Smrg_LT_EOF 8094862f5301Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8095862f5301Smrg subroutine foo 8096862f5301Smrg implicit none 8097862f5301Smrg integer a 8098862f5301Smrg a=0 8099862f5301Smrg return 8100862f5301Smrg end 8101862f5301Smrg_LT_EOF 8102862f5301Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8103862f5301Smrgpublic class foo { 8104862f5301Smrg private int a; 8105862f5301Smrg public void bar (void) { 8106862f5301Smrg a = 0; 8107862f5301Smrg } 8108862f5301Smrg}; 8109862f5301Smrg_LT_EOF 8110fc544a13Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 8111fc544a13Smrgpackage foo 8112fc544a13Smrgfunc foo() { 8113fc544a13Smrg} 8114fc544a13Smrg_LT_EOF 8115862f5301Smrg]) 8116862f5301Smrg 8117862f5301Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 8118862f5301Smrgcase "$CC $CFLAGS " in #( 8119862f5301Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 8120862f5301Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8121fc544a13Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 8122862f5301Smrgesac 8123862f5301Smrg 8124862f5301Smrgdnl Parse the compiler output and extract the necessary 8125862f5301Smrgdnl objects, libraries and library flags. 8126862f5301Smrgif AC_TRY_EVAL(ac_compile); then 8127862f5301Smrg # Parse the compiler output and extract the necessary 8128862f5301Smrg # objects, libraries and library flags. 8129862f5301Smrg 8130862f5301Smrg # Sentinel used to keep track of whether or not we are before 8131862f5301Smrg # the conftest object file. 8132862f5301Smrg pre_test_object_deps_done=no 8133862f5301Smrg 8134862f5301Smrg for p in `eval "$output_verbose_link_cmd"`; do 8135862f5301Smrg case ${prev}${p} in 8136862f5301Smrg 8137862f5301Smrg -L* | -R* | -l*) 8138862f5301Smrg # Some compilers place space between "-{L,R}" and the path. 8139862f5301Smrg # Remove the space. 8140862f5301Smrg if test $p = "-L" || 8141862f5301Smrg test $p = "-R"; then 8142862f5301Smrg prev=$p 8143862f5301Smrg continue 8144862f5301Smrg fi 8145862f5301Smrg 8146862f5301Smrg # Expand the sysroot to ease extracting the directories later. 8147862f5301Smrg if test -z "$prev"; then 8148862f5301Smrg case $p in 8149862f5301Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 8150862f5301Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 8151862f5301Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 8152862f5301Smrg esac 8153862f5301Smrg fi 8154862f5301Smrg case $p in 8155862f5301Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 8156862f5301Smrg esac 8157862f5301Smrg if test "$pre_test_object_deps_done" = no; then 8158862f5301Smrg case ${prev} in 8159862f5301Smrg -L | -R) 8160862f5301Smrg # Internal compiler library paths should come after those 8161862f5301Smrg # provided the user. The postdeps already come after the 8162862f5301Smrg # user supplied libs so there is no need to process them. 8163862f5301Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8164862f5301Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8165862f5301Smrg else 8166862f5301Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8167862f5301Smrg fi 8168862f5301Smrg ;; 8169862f5301Smrg # The "-l" case would never come before the object being 8170862f5301Smrg # linked, so don't bother handling this case. 8171862f5301Smrg esac 8172862f5301Smrg else 8173862f5301Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8174862f5301Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8175862f5301Smrg else 8176862f5301Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8177862f5301Smrg fi 8178862f5301Smrg fi 8179862f5301Smrg prev= 8180862f5301Smrg ;; 8181862f5301Smrg 8182862f5301Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 8183862f5301Smrg *.$objext) 8184862f5301Smrg # This assumes that the test object file only shows up 8185862f5301Smrg # once in the compiler output. 8186862f5301Smrg if test "$p" = "conftest.$objext"; then 8187862f5301Smrg pre_test_object_deps_done=yes 8188862f5301Smrg continue 8189862f5301Smrg fi 8190862f5301Smrg 8191862f5301Smrg if test "$pre_test_object_deps_done" = no; then 8192862f5301Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8193862f5301Smrg _LT_TAGVAR(predep_objects, $1)="$p" 8194862f5301Smrg else 8195862f5301Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8196862f5301Smrg fi 8197862f5301Smrg else 8198862f5301Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8199862f5301Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 8200862f5301Smrg else 8201862f5301Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8202862f5301Smrg fi 8203862f5301Smrg fi 8204862f5301Smrg ;; 82057a3b38f7Smrg 8206862f5301Smrg *) ;; # Ignore the rest. 82077a3b38f7Smrg 8208862f5301Smrg esac 8209862f5301Smrg done 82107a3b38f7Smrg 8211862f5301Smrg # Clean up. 8212862f5301Smrg rm -f a.out a.exe 8213862f5301Smrgelse 8214862f5301Smrg echo "libtool.m4: error: problem compiling $1 test program" 8215862f5301Smrgfi 82167a3b38f7Smrg 8217862f5301Smrg$RM -f confest.$objext 8218862f5301SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 82197a3b38f7Smrg 8220862f5301Smrg# PORTME: override above test on systems where it is broken 8221862f5301Smrgm4_if([$1], [CXX], 8222862f5301Smrg[case $host_os in 8223862f5301Smrginterix[[3-9]]*) 8224862f5301Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 8225862f5301Smrg # hack all around it, let's just trust "g++" to DTRT. 8226862f5301Smrg _LT_TAGVAR(predep_objects,$1)= 8227862f5301Smrg _LT_TAGVAR(postdep_objects,$1)= 8228862f5301Smrg _LT_TAGVAR(postdeps,$1)= 8229862f5301Smrg ;; 82307a3b38f7Smrg 8231862f5301Smrglinux*) 8232862f5301Smrg case `$CC -V 2>&1 | sed 5q` in 8233862f5301Smrg *Sun\ C*) 8234862f5301Smrg # Sun C++ 5.9 82357a3b38f7Smrg 8236862f5301Smrg # The more standards-conforming stlport4 library is 8237862f5301Smrg # incompatible with the Cstd library. Avoid specifying 8238862f5301Smrg # it if it's in CXXFLAGS. Ignore libCrun as 8239862f5301Smrg # -library=stlport4 depends on it. 8240862f5301Smrg case " $CXX $CXXFLAGS " in 8241862f5301Smrg *" -library=stlport4 "*) 8242862f5301Smrg solaris_use_stlport4=yes 8243862f5301Smrg ;; 8244862f5301Smrg esac 82457a3b38f7Smrg 8246862f5301Smrg if test "$solaris_use_stlport4" != yes; then 8247862f5301Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8248862f5301Smrg fi 8249862f5301Smrg ;; 8250862f5301Smrg esac 8251862f5301Smrg ;; 82527a3b38f7Smrg 8253862f5301Smrgsolaris*) 8254862f5301Smrg case $cc_basename in 8255862f5301Smrg CC* | sunCC*) 8256862f5301Smrg # The more standards-conforming stlport4 library is 8257862f5301Smrg # incompatible with the Cstd library. Avoid specifying 8258862f5301Smrg # it if it's in CXXFLAGS. Ignore libCrun as 8259862f5301Smrg # -library=stlport4 depends on it. 8260862f5301Smrg case " $CXX $CXXFLAGS " in 8261862f5301Smrg *" -library=stlport4 "*) 8262862f5301Smrg solaris_use_stlport4=yes 8263862f5301Smrg ;; 8264862f5301Smrg esac 82657a3b38f7Smrg 8266862f5301Smrg # Adding this requires a known-good setup of shared libraries for 8267862f5301Smrg # Sun compiler versions before 5.6, else PIC objects from an old 8268862f5301Smrg # archive will be linked into the output, leading to subtle bugs. 8269862f5301Smrg if test "$solaris_use_stlport4" != yes; then 8270862f5301Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8271862f5301Smrg fi 8272862f5301Smrg ;; 8273862f5301Smrg esac 8274862f5301Smrg ;; 8275862f5301Smrgesac 8276862f5301Smrg]) 82777a3b38f7Smrg 8278862f5301Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 8279862f5301Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8280862f5301Smrgesac 8281862f5301Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8282862f5301Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8283862f5301Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8284862f5301Smrgfi 8285862f5301Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8286862f5301Smrg [The directories searched by this compiler when creating a shared library]) 8287862f5301Smrg_LT_TAGDECL([], [predep_objects], [1], 8288862f5301Smrg [Dependencies to place before and after the objects being linked to 8289862f5301Smrg create a shared library]) 8290862f5301Smrg_LT_TAGDECL([], [postdep_objects], [1]) 8291862f5301Smrg_LT_TAGDECL([], [predeps], [1]) 8292862f5301Smrg_LT_TAGDECL([], [postdeps], [1]) 8293862f5301Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 8294862f5301Smrg [The library search path used internally by the compiler when linking 8295862f5301Smrg a shared library]) 8296862f5301Smrg])# _LT_SYS_HIDDEN_LIBDEPS 82977a3b38f7Smrg 82987a3b38f7Smrg 8299862f5301Smrg# _LT_LANG_F77_CONFIG([TAG]) 8300862f5301Smrg# -------------------------- 8301862f5301Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 8302862f5301Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8303862f5301Smrg# to write the compiler configuration to `libtool'. 8304862f5301Smrgm4_defun([_LT_LANG_F77_CONFIG], 8305862f5301Smrg[AC_LANG_PUSH(Fortran 77) 8306862f5301Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 8307862f5301Smrg _lt_disable_F77=yes 8308862f5301Smrgfi 8309862f5301Smrg 8310862f5301Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8311862f5301Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 8312862f5301Smrg_LT_TAGVAR(always_export_symbols, $1)=no 8313862f5301Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8314862f5301Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8315862f5301Smrg_LT_TAGVAR(hardcode_direct, $1)=no 8316862f5301Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8317862f5301Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8318862f5301Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8319862f5301Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8320862f5301Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 8321862f5301Smrg_LT_TAGVAR(inherit_rpath, $1)=no 8322862f5301Smrg_LT_TAGVAR(module_cmds, $1)= 8323862f5301Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 8324862f5301Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8325862f5301Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8326862f5301Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8327862f5301Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8328862f5301Smrg_LT_TAGVAR(no_undefined_flag, $1)= 8329862f5301Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8330862f5301Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8331862f5301Smrg 8332862f5301Smrg# Source file extension for f77 test sources. 8333862f5301Smrgac_ext=f 8334862f5301Smrg 8335862f5301Smrg# Object file extension for compiled f77 test sources. 8336862f5301Smrgobjext=o 8337862f5301Smrg_LT_TAGVAR(objext, $1)=$objext 8338862f5301Smrg 8339862f5301Smrg# No sense in running all these tests if we already determined that 8340862f5301Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 8341862f5301Smrg# are currently assumed to apply to all compilers on this platform, 8342862f5301Smrg# and will be corrupted by setting them based on a non-working compiler. 8343862f5301Smrgif test "$_lt_disable_F77" != yes; then 8344862f5301Smrg # Code to be used in simple compile tests 8345862f5301Smrg lt_simple_compile_test_code="\ 8346862f5301Smrg subroutine t 8347862f5301Smrg return 8348862f5301Smrg end 8349862f5301Smrg" 8350862f5301Smrg 8351862f5301Smrg # Code to be used in simple link tests 8352862f5301Smrg lt_simple_link_test_code="\ 8353862f5301Smrg program t 8354862f5301Smrg end 8355862f5301Smrg" 83567a3b38f7Smrg 8357862f5301Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8358862f5301Smrg _LT_TAG_COMPILER 83597a3b38f7Smrg 8360862f5301Smrg # save warnings/boilerplate of simple test code 8361862f5301Smrg _LT_COMPILER_BOILERPLATE 8362862f5301Smrg _LT_LINKER_BOILERPLATE 83637a3b38f7Smrg 8364862f5301Smrg # Allow CC to be a program name with arguments. 8365862f5301Smrg lt_save_CC="$CC" 8366862f5301Smrg lt_save_GCC=$GCC 8367862f5301Smrg lt_save_CFLAGS=$CFLAGS 8368862f5301Smrg CC=${F77-"f77"} 8369862f5301Smrg CFLAGS=$FFLAGS 8370862f5301Smrg compiler=$CC 8371862f5301Smrg _LT_TAGVAR(compiler, $1)=$CC 8372862f5301Smrg _LT_CC_BASENAME([$compiler]) 8373862f5301Smrg GCC=$G77 8374862f5301Smrg if test -n "$compiler"; then 8375862f5301Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8376862f5301Smrg AC_MSG_RESULT([$can_build_shared]) 83777a3b38f7Smrg 8378862f5301Smrg AC_MSG_CHECKING([whether to build shared libraries]) 8379862f5301Smrg test "$can_build_shared" = "no" && enable_shared=no 83807a3b38f7Smrg 8381862f5301Smrg # On AIX, shared libraries and static libraries use the same namespace, and 8382862f5301Smrg # are all built from PIC. 8383862f5301Smrg case $host_os in 8384862f5301Smrg aix3*) 8385862f5301Smrg test "$enable_shared" = yes && enable_static=no 8386862f5301Smrg if test -n "$RANLIB"; then 8387862f5301Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8388862f5301Smrg postinstall_cmds='$RANLIB $lib' 8389862f5301Smrg fi 839044dda7b2Smrg ;; 8391862f5301Smrg aix[[4-9]]*) 8392862f5301Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8393862f5301Smrg test "$enable_shared" = yes && enable_static=no 8394862f5301Smrg fi 839544dda7b2Smrg ;; 8396862f5301Smrg esac 8397862f5301Smrg AC_MSG_RESULT([$enable_shared]) 83987a3b38f7Smrg 8399862f5301Smrg AC_MSG_CHECKING([whether to build static libraries]) 8400862f5301Smrg # Make sure either enable_shared or enable_static is yes. 8401862f5301Smrg test "$enable_shared" = yes || enable_static=yes 8402862f5301Smrg AC_MSG_RESULT([$enable_static]) 84037a3b38f7Smrg 8404862f5301Smrg _LT_TAGVAR(GCC, $1)="$G77" 8405862f5301Smrg _LT_TAGVAR(LD, $1)="$LD" 84067a3b38f7Smrg 8407862f5301Smrg ## CAVEAT EMPTOR: 8408862f5301Smrg ## There is no encapsulation within the following macros, do not change 8409862f5301Smrg ## the running order or otherwise move them around unless you know exactly 8410862f5301Smrg ## what you are doing... 8411862f5301Smrg _LT_COMPILER_PIC($1) 8412862f5301Smrg _LT_COMPILER_C_O($1) 8413862f5301Smrg _LT_COMPILER_FILE_LOCKS($1) 8414862f5301Smrg _LT_LINKER_SHLIBS($1) 8415862f5301Smrg _LT_SYS_DYNAMIC_LINKER($1) 8416862f5301Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 84177a3b38f7Smrg 8418862f5301Smrg _LT_CONFIG($1) 8419862f5301Smrg fi # test -n "$compiler" 84207a3b38f7Smrg 8421862f5301Smrg GCC=$lt_save_GCC 8422862f5301Smrg CC="$lt_save_CC" 8423862f5301Smrg CFLAGS="$lt_save_CFLAGS" 8424862f5301Smrgfi # test "$_lt_disable_F77" != yes 84257a3b38f7Smrg 8426862f5301SmrgAC_LANG_POP 8427862f5301Smrg])# _LT_LANG_F77_CONFIG 84287a3b38f7Smrg 84297a3b38f7Smrg 8430862f5301Smrg# _LT_LANG_FC_CONFIG([TAG]) 8431862f5301Smrg# ------------------------- 8432862f5301Smrg# Ensure that the configuration variables for a Fortran compiler are 8433862f5301Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8434862f5301Smrg# to write the compiler configuration to `libtool'. 8435862f5301Smrgm4_defun([_LT_LANG_FC_CONFIG], 8436862f5301Smrg[AC_LANG_PUSH(Fortran) 84377a3b38f7Smrg 8438862f5301Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 8439862f5301Smrg _lt_disable_FC=yes 8440862f5301Smrgfi 84417a3b38f7Smrg 8442862f5301Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8443862f5301Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 8444862f5301Smrg_LT_TAGVAR(always_export_symbols, $1)=no 8445862f5301Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8446862f5301Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8447862f5301Smrg_LT_TAGVAR(hardcode_direct, $1)=no 8448862f5301Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8449862f5301Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8450862f5301Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8451862f5301Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8452862f5301Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 8453862f5301Smrg_LT_TAGVAR(inherit_rpath, $1)=no 8454862f5301Smrg_LT_TAGVAR(module_cmds, $1)= 8455862f5301Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 8456862f5301Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8457862f5301Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8458862f5301Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8459862f5301Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8460862f5301Smrg_LT_TAGVAR(no_undefined_flag, $1)= 8461862f5301Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8462862f5301Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8463862f5301Smrg 8464862f5301Smrg# Source file extension for fc test sources. 8465862f5301Smrgac_ext=${ac_fc_srcext-f} 8466862f5301Smrg 8467862f5301Smrg# Object file extension for compiled fc test sources. 8468862f5301Smrgobjext=o 8469862f5301Smrg_LT_TAGVAR(objext, $1)=$objext 8470862f5301Smrg 8471862f5301Smrg# No sense in running all these tests if we already determined that 8472862f5301Smrg# the FC compiler isn't working. Some variables (like enable_shared) 8473862f5301Smrg# are currently assumed to apply to all compilers on this platform, 8474862f5301Smrg# and will be corrupted by setting them based on a non-working compiler. 8475862f5301Smrgif test "$_lt_disable_FC" != yes; then 8476862f5301Smrg # Code to be used in simple compile tests 8477862f5301Smrg lt_simple_compile_test_code="\ 8478862f5301Smrg subroutine t 8479862f5301Smrg return 8480862f5301Smrg end 8481862f5301Smrg" 8482862f5301Smrg 8483862f5301Smrg # Code to be used in simple link tests 8484862f5301Smrg lt_simple_link_test_code="\ 8485862f5301Smrg program t 8486862f5301Smrg end 8487862f5301Smrg" 8488862f5301Smrg 8489862f5301Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8490862f5301Smrg _LT_TAG_COMPILER 84917a3b38f7Smrg 8492862f5301Smrg # save warnings/boilerplate of simple test code 8493862f5301Smrg _LT_COMPILER_BOILERPLATE 8494862f5301Smrg _LT_LINKER_BOILERPLATE 84957a3b38f7Smrg 8496862f5301Smrg # Allow CC to be a program name with arguments. 8497862f5301Smrg lt_save_CC="$CC" 8498862f5301Smrg lt_save_GCC=$GCC 8499862f5301Smrg lt_save_CFLAGS=$CFLAGS 8500862f5301Smrg CC=${FC-"f95"} 8501862f5301Smrg CFLAGS=$FCFLAGS 8502862f5301Smrg compiler=$CC 8503862f5301Smrg GCC=$ac_cv_fc_compiler_gnu 85047a3b38f7Smrg 8505862f5301Smrg _LT_TAGVAR(compiler, $1)=$CC 8506862f5301Smrg _LT_CC_BASENAME([$compiler]) 85077a3b38f7Smrg 8508862f5301Smrg if test -n "$compiler"; then 8509862f5301Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8510862f5301Smrg AC_MSG_RESULT([$can_build_shared]) 85117a3b38f7Smrg 8512862f5301Smrg AC_MSG_CHECKING([whether to build shared libraries]) 8513862f5301Smrg test "$can_build_shared" = "no" && enable_shared=no 8514862f5301Smrg 8515862f5301Smrg # On AIX, shared libraries and static libraries use the same namespace, and 8516862f5301Smrg # are all built from PIC. 8517862f5301Smrg case $host_os in 8518862f5301Smrg aix3*) 8519862f5301Smrg test "$enable_shared" = yes && enable_static=no 8520862f5301Smrg if test -n "$RANLIB"; then 8521862f5301Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8522862f5301Smrg postinstall_cmds='$RANLIB $lib' 8523862f5301Smrg fi 8524862f5301Smrg ;; 8525862f5301Smrg aix[[4-9]]*) 8526862f5301Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8527862f5301Smrg test "$enable_shared" = yes && enable_static=no 8528862f5301Smrg fi 852944dda7b2Smrg ;; 853044dda7b2Smrg esac 8531862f5301Smrg AC_MSG_RESULT([$enable_shared]) 85327a3b38f7Smrg 8533862f5301Smrg AC_MSG_CHECKING([whether to build static libraries]) 8534862f5301Smrg # Make sure either enable_shared or enable_static is yes. 8535862f5301Smrg test "$enable_shared" = yes || enable_static=yes 8536862f5301Smrg AC_MSG_RESULT([$enable_static]) 85377a3b38f7Smrg 8538862f5301Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 853944dda7b2Smrg _LT_TAGVAR(LD, $1)="$LD" 85407a3b38f7Smrg 854144dda7b2Smrg ## CAVEAT EMPTOR: 854244dda7b2Smrg ## There is no encapsulation within the following macros, do not change 854344dda7b2Smrg ## the running order or otherwise move them around unless you know exactly 854444dda7b2Smrg ## what you are doing... 854544dda7b2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 854644dda7b2Smrg _LT_COMPILER_PIC($1) 854744dda7b2Smrg _LT_COMPILER_C_O($1) 854844dda7b2Smrg _LT_COMPILER_FILE_LOCKS($1) 854944dda7b2Smrg _LT_LINKER_SHLIBS($1) 855044dda7b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 855144dda7b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 85527a3b38f7Smrg 8553862f5301Smrg _LT_CONFIG($1) 8554862f5301Smrg fi # test -n "$compiler" 8555862f5301Smrg 8556862f5301Smrg GCC=$lt_save_GCC 8557862f5301Smrg CC=$lt_save_CC 8558862f5301Smrg CFLAGS=$lt_save_CFLAGS 8559862f5301Smrgfi # test "$_lt_disable_FC" != yes 8560862f5301Smrg 8561862f5301SmrgAC_LANG_POP 8562862f5301Smrg])# _LT_LANG_FC_CONFIG 8563862f5301Smrg 8564862f5301Smrg 8565862f5301Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 8566862f5301Smrg# -------------------------- 8567862f5301Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 8568862f5301Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8569862f5301Smrg# to write the compiler configuration to `libtool'. 8570862f5301Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 8571862f5301Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 8572862f5301SmrgAC_LANG_SAVE 8573862f5301Smrg 8574862f5301Smrg# Source file extension for Java test sources. 8575862f5301Smrgac_ext=java 8576862f5301Smrg 8577862f5301Smrg# Object file extension for compiled Java test sources. 8578862f5301Smrgobjext=o 8579862f5301Smrg_LT_TAGVAR(objext, $1)=$objext 8580862f5301Smrg 8581862f5301Smrg# Code to be used in simple compile tests 8582862f5301Smrglt_simple_compile_test_code="class foo {}" 8583862f5301Smrg 8584862f5301Smrg# Code to be used in simple link tests 8585862f5301Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8586862f5301Smrg 8587862f5301Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8588862f5301Smrg_LT_TAG_COMPILER 8589862f5301Smrg 8590862f5301Smrg# save warnings/boilerplate of simple test code 8591862f5301Smrg_LT_COMPILER_BOILERPLATE 8592862f5301Smrg_LT_LINKER_BOILERPLATE 8593862f5301Smrg 8594862f5301Smrg# Allow CC to be a program name with arguments. 8595862f5301Smrglt_save_CC=$CC 8596862f5301Smrglt_save_CFLAGS=$CFLAGS 8597862f5301Smrglt_save_GCC=$GCC 8598862f5301SmrgGCC=yes 8599862f5301SmrgCC=${GCJ-"gcj"} 8600862f5301SmrgCFLAGS=$GCJFLAGS 8601862f5301Smrgcompiler=$CC 8602862f5301Smrg_LT_TAGVAR(compiler, $1)=$CC 8603862f5301Smrg_LT_TAGVAR(LD, $1)="$LD" 8604862f5301Smrg_LT_CC_BASENAME([$compiler]) 8605862f5301Smrg 8606862f5301Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 8607862f5301Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8608862f5301Smrg 8609862f5301Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8610862f5301Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8611862f5301Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8612862f5301Smrg 8613862f5301Smrgif test -n "$compiler"; then 8614862f5301Smrg _LT_COMPILER_NO_RTTI($1) 8615862f5301Smrg _LT_COMPILER_PIC($1) 8616862f5301Smrg _LT_COMPILER_C_O($1) 8617862f5301Smrg _LT_COMPILER_FILE_LOCKS($1) 8618862f5301Smrg _LT_LINKER_SHLIBS($1) 8619862f5301Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8620862f5301Smrg 8621862f5301Smrg _LT_CONFIG($1) 8622862f5301Smrgfi 8623862f5301Smrg 8624862f5301SmrgAC_LANG_RESTORE 8625862f5301Smrg 8626862f5301SmrgGCC=$lt_save_GCC 8627862f5301SmrgCC=$lt_save_CC 8628862f5301SmrgCFLAGS=$lt_save_CFLAGS 8629862f5301Smrg])# _LT_LANG_GCJ_CONFIG 8630862f5301Smrg 8631862f5301Smrg 8632fc544a13Smrg# _LT_LANG_GO_CONFIG([TAG]) 8633fc544a13Smrg# -------------------------- 8634fc544a13Smrg# Ensure that the configuration variables for the GNU Go compiler 8635fc544a13Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8636fc544a13Smrg# to write the compiler configuration to `libtool'. 8637fc544a13Smrgm4_defun([_LT_LANG_GO_CONFIG], 8638fc544a13Smrg[AC_REQUIRE([LT_PROG_GO])dnl 8639fc544a13SmrgAC_LANG_SAVE 8640fc544a13Smrg 8641fc544a13Smrg# Source file extension for Go test sources. 8642fc544a13Smrgac_ext=go 8643fc544a13Smrg 8644fc544a13Smrg# Object file extension for compiled Go test sources. 8645fc544a13Smrgobjext=o 8646fc544a13Smrg_LT_TAGVAR(objext, $1)=$objext 8647fc544a13Smrg 8648fc544a13Smrg# Code to be used in simple compile tests 8649fc544a13Smrglt_simple_compile_test_code="package main; func main() { }" 8650fc544a13Smrg 8651fc544a13Smrg# Code to be used in simple link tests 8652fc544a13Smrglt_simple_link_test_code='package main; func main() { }' 8653fc544a13Smrg 8654fc544a13Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8655fc544a13Smrg_LT_TAG_COMPILER 8656fc544a13Smrg 8657fc544a13Smrg# save warnings/boilerplate of simple test code 8658fc544a13Smrg_LT_COMPILER_BOILERPLATE 8659fc544a13Smrg_LT_LINKER_BOILERPLATE 8660fc544a13Smrg 8661fc544a13Smrg# Allow CC to be a program name with arguments. 8662fc544a13Smrglt_save_CC=$CC 8663fc544a13Smrglt_save_CFLAGS=$CFLAGS 8664fc544a13Smrglt_save_GCC=$GCC 8665fc544a13SmrgGCC=yes 8666fc544a13SmrgCC=${GOC-"gccgo"} 8667fc544a13SmrgCFLAGS=$GOFLAGS 8668fc544a13Smrgcompiler=$CC 8669fc544a13Smrg_LT_TAGVAR(compiler, $1)=$CC 8670fc544a13Smrg_LT_TAGVAR(LD, $1)="$LD" 8671fc544a13Smrg_LT_CC_BASENAME([$compiler]) 8672fc544a13Smrg 8673fc544a13Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 8674fc544a13Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8675fc544a13Smrg 8676fc544a13Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8677fc544a13Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8678fc544a13Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8679fc544a13Smrg 8680fc544a13Smrgif test -n "$compiler"; then 8681fc544a13Smrg _LT_COMPILER_NO_RTTI($1) 8682fc544a13Smrg _LT_COMPILER_PIC($1) 8683fc544a13Smrg _LT_COMPILER_C_O($1) 8684fc544a13Smrg _LT_COMPILER_FILE_LOCKS($1) 8685fc544a13Smrg _LT_LINKER_SHLIBS($1) 8686fc544a13Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8687fc544a13Smrg 8688fc544a13Smrg _LT_CONFIG($1) 8689fc544a13Smrgfi 8690fc544a13Smrg 8691fc544a13SmrgAC_LANG_RESTORE 8692fc544a13Smrg 8693fc544a13SmrgGCC=$lt_save_GCC 8694fc544a13SmrgCC=$lt_save_CC 8695fc544a13SmrgCFLAGS=$lt_save_CFLAGS 8696fc544a13Smrg])# _LT_LANG_GO_CONFIG 8697fc544a13Smrg 8698fc544a13Smrg 8699862f5301Smrg# _LT_LANG_RC_CONFIG([TAG]) 8700862f5301Smrg# ------------------------- 8701862f5301Smrg# Ensure that the configuration variables for the Windows resource compiler 8702862f5301Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8703862f5301Smrg# to write the compiler configuration to `libtool'. 8704862f5301Smrgm4_defun([_LT_LANG_RC_CONFIG], 8705862f5301Smrg[AC_REQUIRE([LT_PROG_RC])dnl 8706862f5301SmrgAC_LANG_SAVE 8707862f5301Smrg 8708862f5301Smrg# Source file extension for RC test sources. 8709862f5301Smrgac_ext=rc 8710862f5301Smrg 8711862f5301Smrg# Object file extension for compiled RC test sources. 8712862f5301Smrgobjext=o 8713862f5301Smrg_LT_TAGVAR(objext, $1)=$objext 8714862f5301Smrg 8715862f5301Smrg# Code to be used in simple compile tests 8716862f5301Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8717862f5301Smrg 8718862f5301Smrg# Code to be used in simple link tests 8719862f5301Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 8720862f5301Smrg 8721862f5301Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8722862f5301Smrg_LT_TAG_COMPILER 8723862f5301Smrg 8724862f5301Smrg# save warnings/boilerplate of simple test code 8725862f5301Smrg_LT_COMPILER_BOILERPLATE 8726862f5301Smrg_LT_LINKER_BOILERPLATE 8727862f5301Smrg 8728862f5301Smrg# Allow CC to be a program name with arguments. 8729862f5301Smrglt_save_CC="$CC" 8730862f5301Smrglt_save_CFLAGS=$CFLAGS 8731862f5301Smrglt_save_GCC=$GCC 8732862f5301SmrgGCC= 8733862f5301SmrgCC=${RC-"windres"} 8734862f5301SmrgCFLAGS= 8735862f5301Smrgcompiler=$CC 8736862f5301Smrg_LT_TAGVAR(compiler, $1)=$CC 8737862f5301Smrg_LT_CC_BASENAME([$compiler]) 8738862f5301Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8739862f5301Smrg 8740862f5301Smrgif test -n "$compiler"; then 8741862f5301Smrg : 8742862f5301Smrg _LT_CONFIG($1) 8743862f5301Smrgfi 8744862f5301Smrg 8745862f5301SmrgGCC=$lt_save_GCC 8746862f5301SmrgAC_LANG_RESTORE 8747862f5301SmrgCC=$lt_save_CC 8748862f5301SmrgCFLAGS=$lt_save_CFLAGS 8749862f5301Smrg])# _LT_LANG_RC_CONFIG 8750862f5301Smrg 8751862f5301Smrg 8752862f5301Smrg# LT_PROG_GCJ 8753862f5301Smrg# ----------- 8754862f5301SmrgAC_DEFUN([LT_PROG_GCJ], 8755862f5301Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8756862f5301Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8757862f5301Smrg [AC_CHECK_TOOL(GCJ, gcj,) 8758862f5301Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8759862f5301Smrg AC_SUBST(GCJFLAGS)])])[]dnl 8760862f5301Smrg]) 8761862f5301Smrg 8762862f5301Smrg# Old name: 8763862f5301SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8764862f5301Smrgdnl aclocal-1.4 backwards compatibility: 8765862f5301Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8766862f5301Smrg 8767862f5301Smrg 8768fc544a13Smrg# LT_PROG_GO 8769fc544a13Smrg# ---------- 8770fc544a13SmrgAC_DEFUN([LT_PROG_GO], 8771fc544a13Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8772fc544a13Smrg]) 8773fc544a13Smrg 8774fc544a13Smrg 8775862f5301Smrg# LT_PROG_RC 8776862f5301Smrg# ---------- 8777862f5301SmrgAC_DEFUN([LT_PROG_RC], 8778862f5301Smrg[AC_CHECK_TOOL(RC, windres,) 8779862f5301Smrg]) 8780862f5301Smrg 8781862f5301Smrg# Old name: 8782862f5301SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8783862f5301Smrgdnl aclocal-1.4 backwards compatibility: 8784862f5301Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8785862f5301Smrg 8786862f5301Smrg 8787862f5301Smrg# _LT_DECL_EGREP 8788862f5301Smrg# -------------- 8789862f5301Smrg# If we don't have a new enough Autoconf to choose the best grep 8790862f5301Smrg# available, choose the one first in the user's PATH. 8791862f5301Smrgm4_defun([_LT_DECL_EGREP], 8792862f5301Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8793862f5301SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8794862f5301Smrgtest -z "$GREP" && GREP=grep 8795862f5301Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8796862f5301Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8797862f5301Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8798862f5301Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8799862f5301SmrgAC_SUBST([GREP]) 8800862f5301Smrg]) 8801862f5301Smrg 88027a3b38f7Smrg 8803862f5301Smrg# _LT_DECL_OBJDUMP 8804862f5301Smrg# -------------- 8805862f5301Smrg# If we don't have a new enough Autoconf to choose the best objdump 8806862f5301Smrg# available, choose the one first in the user's PATH. 8807862f5301Smrgm4_defun([_LT_DECL_OBJDUMP], 8808862f5301Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8809862f5301Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8810862f5301Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8811862f5301SmrgAC_SUBST([OBJDUMP]) 8812862f5301Smrg]) 88137a3b38f7Smrg 8814862f5301Smrg# _LT_DECL_DLLTOOL 8815862f5301Smrg# ---------------- 8816862f5301Smrg# Ensure DLLTOOL variable is set. 8817862f5301Smrgm4_defun([_LT_DECL_DLLTOOL], 8818862f5301Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8819862f5301Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8820862f5301Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8821862f5301SmrgAC_SUBST([DLLTOOL]) 8822862f5301Smrg]) 88237a3b38f7Smrg 8824862f5301Smrg# _LT_DECL_SED 8825862f5301Smrg# ------------ 8826862f5301Smrg# Check for a fully-functional sed program, that truncates 8827862f5301Smrg# as few characters as possible. Prefer GNU sed if found. 8828862f5301Smrgm4_defun([_LT_DECL_SED], 8829862f5301Smrg[AC_PROG_SED 8830862f5301Smrgtest -z "$SED" && SED=sed 8831862f5301SmrgXsed="$SED -e 1s/^X//" 8832862f5301Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8833862f5301Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8834862f5301Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8835862f5301Smrg])# _LT_DECL_SED 88367a3b38f7Smrg 8837862f5301Smrgm4_ifndef([AC_PROG_SED], [ 8838862f5301Smrg# NOTE: This macro has been submitted for inclusion into # 8839862f5301Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8840862f5301Smrg# a released version of Autoconf we should remove this # 8841862f5301Smrg# macro and use it instead. # 88427a3b38f7Smrg 8843862f5301Smrgm4_defun([AC_PROG_SED], 8844862f5301Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8845862f5301SmrgAC_CACHE_VAL(lt_cv_path_SED, 8846862f5301Smrg[# Loop through the user's path and test for sed and gsed. 8847862f5301Smrg# Then use that list of sed's as ones to test for truncation. 8848862f5301Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8849862f5301Smrgfor as_dir in $PATH 8850862f5301Smrgdo 8851862f5301Smrg IFS=$as_save_IFS 8852862f5301Smrg test -z "$as_dir" && as_dir=. 8853862f5301Smrg for lt_ac_prog in sed gsed; do 8854862f5301Smrg for ac_exec_ext in '' $ac_executable_extensions; do 8855862f5301Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8856862f5301Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8857862f5301Smrg fi 8858862f5301Smrg done 8859862f5301Smrg done 8860862f5301Smrgdone 8861862f5301SmrgIFS=$as_save_IFS 8862862f5301Smrglt_ac_max=0 8863862f5301Smrglt_ac_count=0 8864862f5301Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8865862f5301Smrg# along with /bin/sed that truncates output. 8866862f5301Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8867862f5301Smrg test ! -f $lt_ac_sed && continue 8868862f5301Smrg cat /dev/null > conftest.in 8869862f5301Smrg lt_ac_count=0 8870862f5301Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8871862f5301Smrg # Check for GNU sed and select it if it is found. 8872862f5301Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8873862f5301Smrg lt_cv_path_SED=$lt_ac_sed 8874862f5301Smrg break 8875862f5301Smrg fi 8876862f5301Smrg while true; do 8877862f5301Smrg cat conftest.in conftest.in >conftest.tmp 8878862f5301Smrg mv conftest.tmp conftest.in 8879862f5301Smrg cp conftest.in conftest.nl 8880862f5301Smrg echo >>conftest.nl 8881862f5301Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8882862f5301Smrg cmp -s conftest.out conftest.nl || break 8883862f5301Smrg # 10000 chars as input seems more than enough 8884862f5301Smrg test $lt_ac_count -gt 10 && break 8885862f5301Smrg lt_ac_count=`expr $lt_ac_count + 1` 8886862f5301Smrg if test $lt_ac_count -gt $lt_ac_max; then 8887862f5301Smrg lt_ac_max=$lt_ac_count 8888862f5301Smrg lt_cv_path_SED=$lt_ac_sed 8889862f5301Smrg fi 8890862f5301Smrg done 8891862f5301Smrgdone 889244dda7b2Smrg]) 8893862f5301SmrgSED=$lt_cv_path_SED 8894862f5301SmrgAC_SUBST([SED]) 8895862f5301SmrgAC_MSG_RESULT([$SED]) 8896862f5301Smrg])#AC_PROG_SED 8897862f5301Smrg])#m4_ifndef 88987a3b38f7Smrg 8899862f5301Smrg# Old name: 8900862f5301SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8901862f5301Smrgdnl aclocal-1.4 backwards compatibility: 8902862f5301Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 89037a3b38f7Smrg 89047a3b38f7Smrg 8905862f5301Smrg# _LT_CHECK_SHELL_FEATURES 8906862f5301Smrg# ------------------------ 8907862f5301Smrg# Find out whether the shell is Bourne or XSI compatible, 8908862f5301Smrg# or has some other useful features. 8909862f5301Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8910862f5301Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8911862f5301Smrg# Try some XSI features 8912862f5301Smrgxsi_shell=no 8913862f5301Smrg( _lt_dummy="a/b/c" 8914862f5301Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 8915862f5301Smrg = c,a/b,b/c, \ 8916862f5301Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 8917862f5301Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8918862f5301Smrg && xsi_shell=yes 8919862f5301SmrgAC_MSG_RESULT([$xsi_shell]) 8920862f5301Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 89217a3b38f7Smrg 8922862f5301SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 8923862f5301Smrglt_shell_append=no 8924862f5301Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8925862f5301Smrg >/dev/null 2>&1 \ 8926862f5301Smrg && lt_shell_append=yes 8927862f5301SmrgAC_MSG_RESULT([$lt_shell_append]) 8928862f5301Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 89297a3b38f7Smrg 8930862f5301Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8931862f5301Smrg lt_unset=unset 8932862f5301Smrgelse 8933862f5301Smrg lt_unset=false 8934862f5301Smrgfi 8935862f5301Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 89367a3b38f7Smrg 8937862f5301Smrg# test EBCDIC or ASCII 8938862f5301Smrgcase `echo X|tr X '\101'` in 8939862f5301Smrg A) # ASCII based system 8940862f5301Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8941862f5301Smrg lt_SP2NL='tr \040 \012' 8942862f5301Smrg lt_NL2SP='tr \015\012 \040\040' 8943862f5301Smrg ;; 8944862f5301Smrg *) # EBCDIC based system 8945862f5301Smrg lt_SP2NL='tr \100 \n' 8946862f5301Smrg lt_NL2SP='tr \r\n \100\100' 8947862f5301Smrg ;; 8948862f5301Smrgesac 8949862f5301Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8950862f5301Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8951862f5301Smrg])# _LT_CHECK_SHELL_FEATURES 8952862f5301Smrg 8953862f5301Smrg 8954862f5301Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 8955862f5301Smrg# ------------------------------------------------------ 8956862f5301Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 8957862f5301Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 8958862f5301Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 8959862f5301Smrg[dnl { 8960862f5301Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 8961862f5301Smrg$1 ()\ 8962862f5301Smrg{\ 8963862f5301Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 8964862f5301Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 8965862f5301Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 8966862f5301Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 8967862f5301Smrgtest 0 -eq $? || _lt_function_replace_fail=: 8968862f5301Smrg]) 89697a3b38f7Smrg 89707a3b38f7Smrg 8971862f5301Smrg# _LT_PROG_REPLACE_SHELLFNS 8972862f5301Smrg# ------------------------- 8973862f5301Smrg# Replace existing portable implementations of several shell functions with 8974862f5301Smrg# equivalent extended shell implementations where those features are available.. 8975862f5301Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 8976862f5301Smrg[if test x"$xsi_shell" = xyes; then 8977862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 8978862f5301Smrg case ${1} in 8979862f5301Smrg */*) func_dirname_result="${1%/*}${2}" ;; 8980862f5301Smrg * ) func_dirname_result="${3}" ;; 8981862f5301Smrg esac]) 8982862f5301Smrg 8983862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 8984862f5301Smrg func_basename_result="${1##*/}"]) 8985862f5301Smrg 8986862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 8987862f5301Smrg case ${1} in 8988862f5301Smrg */*) func_dirname_result="${1%/*}${2}" ;; 8989862f5301Smrg * ) func_dirname_result="${3}" ;; 899044dda7b2Smrg esac 8991862f5301Smrg func_basename_result="${1##*/}"]) 89927a3b38f7Smrg 8993862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 8994862f5301Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 8995862f5301Smrg # positional parameters, so assign one to ordinary parameter first. 8996862f5301Smrg func_stripname_result=${3} 8997862f5301Smrg func_stripname_result=${func_stripname_result#"${1}"} 8998862f5301Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 8999862f5301Smrg 9000862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 9001862f5301Smrg func_split_long_opt_name=${1%%=*} 9002862f5301Smrg func_split_long_opt_arg=${1#*=}]) 9003862f5301Smrg 9004862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 9005862f5301Smrg func_split_short_opt_arg=${1#??} 9006862f5301Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 9007862f5301Smrg 9008862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 9009862f5301Smrg case ${1} in 9010862f5301Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9011862f5301Smrg *) func_lo2o_result=${1} ;; 9012862f5301Smrg esac]) 9013862f5301Smrg 9014862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 9015862f5301Smrg 9016862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 9017862f5301Smrg 9018862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 901944dda7b2Smrgfi 90207a3b38f7Smrg 9021862f5301Smrgif test x"$lt_shell_append" = xyes; then 9022862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 90237a3b38f7Smrg 9024862f5301Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 9025862f5301Smrg func_quote_for_eval "${2}" 9026862f5301Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 9027862f5301Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 90287a3b38f7Smrg 9029862f5301Smrg # Save a `func_append' function call where possible by direct use of '+=' 9030862f5301Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 9031862f5301Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 9032862f5301Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9033862f5301Smrg test 0 -eq $? || _lt_function_replace_fail=: 9034862f5301Smrgelse 9035862f5301Smrg # Save a `func_append' function call even when '+=' is not available 9036862f5301Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 9037862f5301Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 9038862f5301Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 9039862f5301Smrg test 0 -eq $? || _lt_function_replace_fail=: 9040862f5301Smrgfi 90417a3b38f7Smrg 9042862f5301Smrgif test x"$_lt_function_replace_fail" = x":"; then 9043862f5301Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 9044862f5301Smrgfi 9045862f5301Smrg]) 90467a3b38f7Smrg 9047862f5301Smrg# _LT_PATH_CONVERSION_FUNCTIONS 9048862f5301Smrg# ----------------------------- 9049862f5301Smrg# Determine which file name conversion functions should be used by 9050862f5301Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 9051862f5301Smrg# for certain cross-compile configurations and native mingw. 9052862f5301Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 9053862f5301Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9054862f5301SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 9055862f5301SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 9056862f5301SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 9057862f5301Smrg[case $host in 9058862f5301Smrg *-*-mingw* ) 9059862f5301Smrg case $build in 9060862f5301Smrg *-*-mingw* ) # actually msys 9061862f5301Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 9062862f5301Smrg ;; 9063862f5301Smrg *-*-cygwin* ) 9064862f5301Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 9065862f5301Smrg ;; 9066862f5301Smrg * ) # otherwise, assume *nix 9067862f5301Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 9068862f5301Smrg ;; 9069862f5301Smrg esac 907044dda7b2Smrg ;; 9071862f5301Smrg *-*-cygwin* ) 9072862f5301Smrg case $build in 9073862f5301Smrg *-*-mingw* ) # actually msys 9074862f5301Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 9075862f5301Smrg ;; 9076862f5301Smrg *-*-cygwin* ) 9077862f5301Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 9078862f5301Smrg ;; 9079862f5301Smrg * ) # otherwise, assume *nix 9080862f5301Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 9081862f5301Smrg ;; 908244dda7b2Smrg esac 908344dda7b2Smrg ;; 9084862f5301Smrg * ) # unhandled hosts (and "normal" native builds) 9085862f5301Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 9086862f5301Smrg ;; 908744dda7b2Smrgesac 908844dda7b2Smrg]) 9089862f5301Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 9090862f5301SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 9091862f5301Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 9092862f5301Smrg [0], [convert $build file names to $host format])dnl 9093862f5301Smrg 9094862f5301SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 9095862f5301SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 9096862f5301Smrg[#assume ordinary cross tools, or native build. 9097862f5301Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 9098862f5301Smrgcase $host in 9099862f5301Smrg *-*-mingw* ) 9100862f5301Smrg case $build in 9101862f5301Smrg *-*-mingw* ) # actually msys 9102862f5301Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 9103862f5301Smrg ;; 9104862f5301Smrg esac 9105862f5301Smrg ;; 910644dda7b2Smrgesac 9107862f5301Smrg]) 9108862f5301Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 9109862f5301SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 9110862f5301Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 9111862f5301Smrg [0], [convert $build files to toolchain format])dnl 9112862f5301Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 91137a3b38f7Smrg 9114862f5301Smrg# Helper functions for option handling. -*- Autoconf -*- 9115862f5301Smrg# 9116862f5301Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9117862f5301Smrg# Inc. 9118862f5301Smrg# Written by Gary V. Vaughan, 2004 9119862f5301Smrg# 9120862f5301Smrg# This file is free software; the Free Software Foundation gives 9121862f5301Smrg# unlimited permission to copy and/or distribute it, with or without 9122862f5301Smrg# modifications, as long as this notice is preserved. 91237a3b38f7Smrg 9124862f5301Smrg# serial 7 ltoptions.m4 91257a3b38f7Smrg 9126862f5301Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9127862f5301SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 91287a3b38f7Smrg 91297a3b38f7Smrg 9130862f5301Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9131862f5301Smrg# ------------------------------------------ 9132862f5301Smrgm4_define([_LT_MANGLE_OPTION], 9133862f5301Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 91347a3b38f7Smrg 91357a3b38f7Smrg 9136862f5301Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9137862f5301Smrg# --------------------------------------- 9138862f5301Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9139862f5301Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9140862f5301Smrg# saved as a flag. 9141862f5301Smrgm4_define([_LT_SET_OPTION], 9142862f5301Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9143862f5301Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9144862f5301Smrg _LT_MANGLE_DEFUN([$1], [$2]), 9145862f5301Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9146862f5301Smrg]) 91477a3b38f7Smrg 914844dda7b2Smrg 9149862f5301Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9150862f5301Smrg# ------------------------------------------------------------ 9151862f5301Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9152862f5301Smrgm4_define([_LT_IF_OPTION], 9153862f5301Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 915444dda7b2Smrg 915544dda7b2Smrg 9156862f5301Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9157862f5301Smrg# ------------------------------------------------------- 9158862f5301Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9159862f5301Smrg# are set. 9160862f5301Smrgm4_define([_LT_UNLESS_OPTIONS], 9161862f5301Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9162862f5301Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9163862f5301Smrg [m4_define([$0_found])])])[]dnl 9164862f5301Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9165862f5301Smrg])[]dnl 9166862f5301Smrg]) 9167862f5301Smrg 9168862f5301Smrg 9169862f5301Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9170862f5301Smrg# ---------------------------------------- 9171862f5301Smrg# OPTION-LIST is a space-separated list of Libtool options associated 9172862f5301Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 9173862f5301Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9174862f5301Smrg# the unknown option and exit. 9175862f5301Smrgm4_defun([_LT_SET_OPTIONS], 9176862f5301Smrg[# Set options 9177862f5301Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9178862f5301Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 9179862f5301Smrg 9180862f5301Smrgm4_if([$1],[LT_INIT],[ 9181862f5301Smrg dnl 9182862f5301Smrg dnl Simply set some default values (i.e off) if boolean options were not 9183862f5301Smrg dnl specified: 9184862f5301Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9185862f5301Smrg ]) 9186862f5301Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9187862f5301Smrg ]) 9188862f5301Smrg dnl 9189862f5301Smrg dnl If no reference was made to various pairs of opposing options, then 9190862f5301Smrg dnl we run the default mode handler for the pair. For example, if neither 9191862f5301Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 9192862f5301Smrg dnl archives by default: 9193862f5301Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9194862f5301Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9195862f5301Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9196862f5301Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9197862f5301Smrg [_LT_ENABLE_FAST_INSTALL]) 9198862f5301Smrg ]) 9199862f5301Smrg])# _LT_SET_OPTIONS 9200862f5301Smrg 920144dda7b2Smrg 92027a3b38f7Smrg 9203862f5301Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9204862f5301Smrg# ----------------------------------------- 9205862f5301Smrgm4_define([_LT_MANGLE_DEFUN], 9206862f5301Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 92077a3b38f7Smrg 92087a3b38f7Smrg 9209862f5301Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9210862f5301Smrg# ----------------------------------------------- 9211862f5301Smrgm4_define([LT_OPTION_DEFINE], 9212862f5301Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9213862f5301Smrg])# LT_OPTION_DEFINE 92147a3b38f7Smrg 92157a3b38f7Smrg 9216862f5301Smrg# dlopen 9217862f5301Smrg# ------ 9218862f5301SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9219862f5301Smrg]) 92207a3b38f7Smrg 9221862f5301SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 9222862f5301Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 9223862f5301SmrgAC_DIAGNOSE([obsolete], 9224862f5301Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9225862f5301Smrgput the `dlopen' option into LT_INIT's first parameter.]) 9226862f5301Smrg]) 92277a3b38f7Smrg 9228862f5301Smrgdnl aclocal-1.4 backwards compatibility: 9229862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 92307a3b38f7Smrg 92317a3b38f7Smrg 9232862f5301Smrg# win32-dll 9233862f5301Smrg# --------- 9234862f5301Smrg# Declare package support for building win32 dll's. 9235862f5301SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 9236862f5301Smrg[enable_win32_dll=yes 92377a3b38f7Smrg 9238862f5301Smrgcase $host in 9239862f5301Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9240862f5301Smrg AC_CHECK_TOOL(AS, as, false) 9241862f5301Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9242862f5301Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 9243862f5301Smrg ;; 9244862f5301Smrgesac 92457a3b38f7Smrg 9246862f5301Smrgtest -z "$AS" && AS=as 9247862f5301Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 92487a3b38f7Smrg 9249862f5301Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 9250862f5301Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 92517a3b38f7Smrg 9252862f5301Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9253862f5301Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9254862f5301Smrg])# win32-dll 92557a3b38f7Smrg 9256862f5301SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9257862f5301Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9258862f5301Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 9259862f5301SmrgAC_DIAGNOSE([obsolete], 9260862f5301Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9261862f5301Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 9262862f5301Smrg]) 92637a3b38f7Smrg 9264862f5301Smrgdnl aclocal-1.4 backwards compatibility: 9265862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 926644dda7b2Smrg 92677a3b38f7Smrg 9268862f5301Smrg# _LT_ENABLE_SHARED([DEFAULT]) 9269862f5301Smrg# ---------------------------- 9270862f5301Smrg# implement the --enable-shared flag, and supports the `shared' and 9271862f5301Smrg# `disable-shared' LT_INIT options. 9272862f5301Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9273862f5301Smrgm4_define([_LT_ENABLE_SHARED], 9274862f5301Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9275862f5301SmrgAC_ARG_ENABLE([shared], 9276862f5301Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9277862f5301Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9278862f5301Smrg [p=${PACKAGE-default} 9279862f5301Smrg case $enableval in 9280862f5301Smrg yes) enable_shared=yes ;; 9281862f5301Smrg no) enable_shared=no ;; 9282862f5301Smrg *) 9283862f5301Smrg enable_shared=no 9284862f5301Smrg # Look at the argument we got. We use all the common list separators. 9285862f5301Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9286862f5301Smrg for pkg in $enableval; do 9287862f5301Smrg IFS="$lt_save_ifs" 9288862f5301Smrg if test "X$pkg" = "X$p"; then 9289862f5301Smrg enable_shared=yes 9290862f5301Smrg fi 9291862f5301Smrg done 9292862f5301Smrg IFS="$lt_save_ifs" 9293862f5301Smrg ;; 9294862f5301Smrg esac], 9295862f5301Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 92967a3b38f7Smrg 9297862f5301Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 9298862f5301Smrg [Whether or not to build shared libraries]) 9299862f5301Smrg])# _LT_ENABLE_SHARED 93007a3b38f7Smrg 9301862f5301SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9302862f5301SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 93037a3b38f7Smrg 9304862f5301Smrg# Old names: 9305862f5301SmrgAC_DEFUN([AC_ENABLE_SHARED], 9306862f5301Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9307862f5301Smrg]) 93087a3b38f7Smrg 9309862f5301SmrgAC_DEFUN([AC_DISABLE_SHARED], 9310862f5301Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9311862f5301Smrg]) 93127a3b38f7Smrg 9313862f5301SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9314862f5301SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 93157a3b38f7Smrg 9316862f5301Smrgdnl aclocal-1.4 backwards compatibility: 9317862f5301Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 9318862f5301Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 93197a3b38f7Smrg 93207a3b38f7Smrg 93217a3b38f7Smrg 9322862f5301Smrg# _LT_ENABLE_STATIC([DEFAULT]) 9323862f5301Smrg# ---------------------------- 9324862f5301Smrg# implement the --enable-static flag, and support the `static' and 9325862f5301Smrg# `disable-static' LT_INIT options. 9326862f5301Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9327862f5301Smrgm4_define([_LT_ENABLE_STATIC], 9328862f5301Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9329862f5301SmrgAC_ARG_ENABLE([static], 9330862f5301Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9331862f5301Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9332862f5301Smrg [p=${PACKAGE-default} 9333862f5301Smrg case $enableval in 9334862f5301Smrg yes) enable_static=yes ;; 9335862f5301Smrg no) enable_static=no ;; 9336862f5301Smrg *) 9337862f5301Smrg enable_static=no 9338862f5301Smrg # Look at the argument we got. We use all the common list separators. 9339862f5301Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9340862f5301Smrg for pkg in $enableval; do 9341862f5301Smrg IFS="$lt_save_ifs" 9342862f5301Smrg if test "X$pkg" = "X$p"; then 9343862f5301Smrg enable_static=yes 9344862f5301Smrg fi 9345862f5301Smrg done 9346862f5301Smrg IFS="$lt_save_ifs" 9347862f5301Smrg ;; 9348862f5301Smrg esac], 9349862f5301Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9350862f5301Smrg 9351862f5301Smrg _LT_DECL([build_old_libs], [enable_static], [0], 9352862f5301Smrg [Whether or not to build static libraries]) 9353862f5301Smrg])# _LT_ENABLE_STATIC 9354862f5301Smrg 9355862f5301SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9356862f5301SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 93577a3b38f7Smrg 9358862f5301Smrg# Old names: 9359862f5301SmrgAC_DEFUN([AC_ENABLE_STATIC], 9360862f5301Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9361862f5301Smrg]) 93627a3b38f7Smrg 9363862f5301SmrgAC_DEFUN([AC_DISABLE_STATIC], 9364862f5301Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 9365862f5301Smrg]) 93667a3b38f7Smrg 9367862f5301SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9368862f5301SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 93697a3b38f7Smrg 9370862f5301Smrgdnl aclocal-1.4 backwards compatibility: 9371862f5301Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 9372862f5301Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 93737a3b38f7Smrg 93747a3b38f7Smrg 93757a3b38f7Smrg 9376862f5301Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9377862f5301Smrg# ---------------------------------- 9378862f5301Smrg# implement the --enable-fast-install flag, and support the `fast-install' 9379862f5301Smrg# and `disable-fast-install' LT_INIT options. 9380862f5301Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9381862f5301Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 9382862f5301Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9383862f5301SmrgAC_ARG_ENABLE([fast-install], 9384862f5301Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9385862f5301Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9386862f5301Smrg [p=${PACKAGE-default} 9387862f5301Smrg case $enableval in 9388862f5301Smrg yes) enable_fast_install=yes ;; 9389862f5301Smrg no) enable_fast_install=no ;; 9390862f5301Smrg *) 9391862f5301Smrg enable_fast_install=no 9392862f5301Smrg # Look at the argument we got. We use all the common list separators. 9393862f5301Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9394862f5301Smrg for pkg in $enableval; do 9395862f5301Smrg IFS="$lt_save_ifs" 9396862f5301Smrg if test "X$pkg" = "X$p"; then 9397862f5301Smrg enable_fast_install=yes 9398862f5301Smrg fi 9399862f5301Smrg done 9400862f5301Smrg IFS="$lt_save_ifs" 9401862f5301Smrg ;; 9402862f5301Smrg esac], 9403862f5301Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 94047a3b38f7Smrg 9405862f5301Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 9406862f5301Smrg [Whether or not to optimize for fast installation])dnl 9407862f5301Smrg])# _LT_ENABLE_FAST_INSTALL 94087a3b38f7Smrg 9409862f5301SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9410862f5301SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 94117a3b38f7Smrg 9412862f5301Smrg# Old names: 9413862f5301SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 9414862f5301Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9415862f5301SmrgAC_DIAGNOSE([obsolete], 9416862f5301Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9417862f5301Smrgthe `fast-install' option into LT_INIT's first parameter.]) 9418862f5301Smrg]) 94197a3b38f7Smrg 9420862f5301SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 9421862f5301Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9422862f5301SmrgAC_DIAGNOSE([obsolete], 9423862f5301Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9424862f5301Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 9425862f5301Smrg]) 94267a3b38f7Smrg 9427862f5301Smrgdnl aclocal-1.4 backwards compatibility: 9428862f5301Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9429862f5301Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 94307a3b38f7Smrg 94317a3b38f7Smrg 9432862f5301Smrg# _LT_WITH_PIC([MODE]) 9433862f5301Smrg# -------------------- 9434862f5301Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9435862f5301Smrg# LT_INIT options. 9436862f5301Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9437862f5301Smrgm4_define([_LT_WITH_PIC], 9438862f5301Smrg[AC_ARG_WITH([pic], 9439fc544a13Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 9440862f5301Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9441fc544a13Smrg [lt_p=${PACKAGE-default} 9442fc544a13Smrg case $withval in 9443fc544a13Smrg yes|no) pic_mode=$withval ;; 9444fc544a13Smrg *) 9445fc544a13Smrg pic_mode=default 9446fc544a13Smrg # Look at the argument we got. We use all the common list separators. 9447fc544a13Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9448fc544a13Smrg for lt_pkg in $withval; do 9449fc544a13Smrg IFS="$lt_save_ifs" 9450fc544a13Smrg if test "X$lt_pkg" = "X$lt_p"; then 9451fc544a13Smrg pic_mode=yes 9452fc544a13Smrg fi 9453fc544a13Smrg done 9454fc544a13Smrg IFS="$lt_save_ifs" 9455fc544a13Smrg ;; 9456fc544a13Smrg esac], 9457862f5301Smrg [pic_mode=default]) 9458ff559fabSmrg 9459862f5301Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 9460ff559fabSmrg 9461862f5301Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9462862f5301Smrg])# _LT_WITH_PIC 9463ff559fabSmrg 9464862f5301SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 9465862f5301SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9466ff559fabSmrg 9467862f5301Smrg# Old name: 9468862f5301SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 9469862f5301Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 9470862f5301SmrgAC_DIAGNOSE([obsolete], 9471862f5301Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9472862f5301Smrgput the `pic-only' option into LT_INIT's first parameter.]) 9473862f5301Smrg]) 9474ff559fabSmrg 9475862f5301Smrgdnl aclocal-1.4 backwards compatibility: 9476862f5301Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9477ff559fabSmrg 9478ff559fabSmrg 9479862f5301Smrgm4_define([_LTDL_MODE], []) 9480862f5301SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 9481862f5301Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 9482862f5301SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 9483862f5301Smrg [m4_define([_LTDL_MODE], [recursive])]) 9484862f5301SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 9485862f5301Smrg [m4_define([_LTDL_MODE], [subproject])]) 9486ff559fabSmrg 9487862f5301Smrgm4_define([_LTDL_TYPE], []) 9488862f5301SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 9489862f5301Smrg [m4_define([_LTDL_TYPE], [installable])]) 9490862f5301SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 9491862f5301Smrg [m4_define([_LTDL_TYPE], [convenience])]) 9492ff559fabSmrg 9493862f5301Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9494862f5301Smrg# 9495862f5301Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 9496862f5301Smrg# Written by Gary V. Vaughan, 2004 9497862f5301Smrg# 9498862f5301Smrg# This file is free software; the Free Software Foundation gives 9499862f5301Smrg# unlimited permission to copy and/or distribute it, with or without 9500862f5301Smrg# modifications, as long as this notice is preserved. 9501ff559fabSmrg 9502862f5301Smrg# serial 6 ltsugar.m4 950344dda7b2Smrg 9504862f5301Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9505862f5301SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 950644dda7b2Smrg 950744dda7b2Smrg 9508862f5301Smrg# lt_join(SEP, ARG1, [ARG2...]) 9509862f5301Smrg# ----------------------------- 9510862f5301Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 9511862f5301Smrg# associated separator. 9512862f5301Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 9513862f5301Smrg# versions in m4sugar had bugs. 9514862f5301Smrgm4_define([lt_join], 9515862f5301Smrg[m4_if([$#], [1], [], 9516862f5301Smrg [$#], [2], [[$2]], 9517862f5301Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 9518862f5301Smrgm4_define([_lt_join], 9519862f5301Smrg[m4_if([$#$2], [2], [], 9520862f5301Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 952144dda7b2Smrg 952244dda7b2Smrg 9523862f5301Smrg# lt_car(LIST) 9524862f5301Smrg# lt_cdr(LIST) 9525862f5301Smrg# ------------ 9526862f5301Smrg# Manipulate m4 lists. 9527862f5301Smrg# These macros are necessary as long as will still need to support 9528862f5301Smrg# Autoconf-2.59 which quotes differently. 9529862f5301Smrgm4_define([lt_car], [[$1]]) 9530862f5301Smrgm4_define([lt_cdr], 9531862f5301Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 9532862f5301Smrg [$#], 1, [], 9533862f5301Smrg [m4_dquote(m4_shift($@))])]) 9534862f5301Smrgm4_define([lt_unquote], $1) 9535ff559fabSmrg 9536ff559fabSmrg 9537862f5301Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 9538862f5301Smrg# ------------------------------------------ 9539862f5301Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 9540862f5301Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 9541862f5301Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 9542862f5301Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 9543862f5301Smrg# than defined and empty). 9544862f5301Smrg# 9545862f5301Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 9546862f5301Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 9547862f5301Smrgm4_define([lt_append], 9548862f5301Smrg[m4_define([$1], 9549862f5301Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9550ff559fabSmrg 9551ff559fabSmrg 9552ff559fabSmrg 9553862f5301Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 9554862f5301Smrg# ---------------------------------------------------------- 9555862f5301Smrg# Produce a SEP delimited list of all paired combinations of elements of 9556862f5301Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 9557862f5301Smrg# has the form PREFIXmINFIXSUFFIXn. 9558862f5301Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 9559862f5301Smrgm4_define([lt_combine], 9560862f5301Smrg[m4_if(m4_eval([$# > 3]), [1], 9561862f5301Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 9562862f5301Smrg[[m4_foreach([_Lt_prefix], [$2], 9563862f5301Smrg [m4_foreach([_Lt_suffix], 9564862f5301Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 9565862f5301Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9566ff559fabSmrg 9567ff559fabSmrg 9568862f5301Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 9569862f5301Smrg# ----------------------------------------------------------------------- 9570862f5301Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 9571862f5301Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 9572862f5301Smrgm4_define([lt_if_append_uniq], 9573862f5301Smrg[m4_ifdef([$1], 9574862f5301Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 9575862f5301Smrg [lt_append([$1], [$2], [$3])$4], 9576862f5301Smrg [$5])], 9577862f5301Smrg [lt_append([$1], [$2], [$3])$4])]) 95787a3b38f7Smrg 9579ff559fabSmrg 9580862f5301Smrg# lt_dict_add(DICT, KEY, VALUE) 9581862f5301Smrg# ----------------------------- 9582862f5301Smrgm4_define([lt_dict_add], 9583862f5301Smrg[m4_define([$1($2)], [$3])]) 9584ff559fabSmrg 9585ff559fabSmrg 9586862f5301Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 9587862f5301Smrg# -------------------------------------------- 9588862f5301Smrgm4_define([lt_dict_add_subkey], 9589862f5301Smrg[m4_define([$1($2:$3)], [$4])]) 9590ff559fabSmrg 9591ff559fabSmrg 9592862f5301Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 9593862f5301Smrg# ---------------------------------- 9594862f5301Smrgm4_define([lt_dict_fetch], 9595862f5301Smrg[m4_ifval([$3], 9596862f5301Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 9597862f5301Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9598ff559fabSmrg 9599ff559fabSmrg 9600862f5301Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 9601862f5301Smrg# ----------------------------------------------------------------- 9602862f5301Smrgm4_define([lt_if_dict_fetch], 9603862f5301Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 9604862f5301Smrg [$5], 9605862f5301Smrg [$6])]) 9606ff559fabSmrg 9607ff559fabSmrg 9608862f5301Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 9609862f5301Smrg# -------------------------------------------------------------- 9610862f5301Smrgm4_define([lt_dict_filter], 9611862f5301Smrg[m4_if([$5], [], [], 9612862f5301Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 9613862f5301Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 9614862f5301Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9615862f5301Smrg]) 9616ff559fabSmrg 9617862f5301Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 9618862f5301Smrg# 9619862f5301Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 9620862f5301Smrg# Written by Scott James Remnant, 2004 9621862f5301Smrg# 9622862f5301Smrg# This file is free software; the Free Software Foundation gives 9623862f5301Smrg# unlimited permission to copy and/or distribute it, with or without 9624862f5301Smrg# modifications, as long as this notice is preserved. 9625ff559fabSmrg 9626862f5301Smrg# @configure_input@ 9627ff559fabSmrg 9628fc544a13Smrg# serial 3337 ltversion.m4 9629862f5301Smrg# This file is part of GNU Libtool 9630ff559fabSmrg 9631fc544a13Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 9632fc544a13Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 9633ff559fabSmrg 9634862f5301SmrgAC_DEFUN([LTVERSION_VERSION], 9635fc544a13Smrg[macro_version='2.4.2' 9636fc544a13Smrgmacro_revision='1.3337' 9637862f5301Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9638862f5301Smrg_LT_DECL(, macro_revision, 0) 9639862f5301Smrg]) 9640ff559fabSmrg 9641862f5301Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9642862f5301Smrg# 9643862f5301Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 9644862f5301Smrg# Written by Scott James Remnant, 2004. 9645862f5301Smrg# 9646862f5301Smrg# This file is free software; the Free Software Foundation gives 9647862f5301Smrg# unlimited permission to copy and/or distribute it, with or without 9648862f5301Smrg# modifications, as long as this notice is preserved. 9649ff559fabSmrg 9650862f5301Smrg# serial 5 lt~obsolete.m4 9651ff559fabSmrg 9652862f5301Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 9653862f5301Smrg# 9654862f5301Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 9655862f5301Smrg# which have later been changed to m4_define as they aren't part of the 9656862f5301Smrg# exported API, or moved to Autoconf or Automake where they belong. 9657862f5301Smrg# 9658862f5301Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9659862f5301Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9660862f5301Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 9661862f5301Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9662862f5301Smrg# and doesn't know about Autoconf macros at all.) 9663862f5301Smrg# 9664862f5301Smrg# So we provide this file, which has a silly filename so it's always 9665862f5301Smrg# included after everything else. This provides aclocal with the 9666862f5301Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9667862f5301Smrg# because those macros already exist, or will be overwritten later. 9668862f5301Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9669862f5301Smrg# 9670862f5301Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9671862f5301Smrg# Yes, that means every name once taken will need to remain here until 9672862f5301Smrg# we give up compatibility with versions before 1.7, at which point 9673862f5301Smrg# we need to keep only those names which we still refer to. 9674ff559fabSmrg 9675862f5301Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9676862f5301SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9677ff559fabSmrg 9678862f5301Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9679862f5301Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9680862f5301Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9681862f5301Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9682862f5301Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9683862f5301Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9684862f5301Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9685862f5301Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9686862f5301Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9687862f5301Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9688862f5301Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9689862f5301Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9690862f5301Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9691862f5301Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9692862f5301Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9693862f5301Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9694862f5301Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9695862f5301Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9696862f5301Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9697862f5301Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9698862f5301Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9699862f5301Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9700862f5301Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9701862f5301Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9702862f5301Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9703862f5301Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9704862f5301Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9705862f5301Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9706862f5301Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9707862f5301Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9708862f5301Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9709862f5301Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9710862f5301Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9711862f5301Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9712862f5301Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9713862f5301Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9714862f5301Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9715862f5301Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9716862f5301Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9717862f5301Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9718862f5301Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9719862f5301Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9720862f5301Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9721862f5301Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9722862f5301Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9723862f5301Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9724862f5301Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9725862f5301Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9726862f5301Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9727862f5301Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9728862f5301Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9729862f5301Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9730862f5301Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9731862f5301Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9732862f5301Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9733862f5301Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9734862f5301Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9735862f5301Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9736862f5301Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9737862f5301Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9738862f5301Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9739ff559fabSmrg 9740fc544a13Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9741fc544a13Smrg# 9742fc544a13Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9743fc544a13Smrg# 9744fc544a13Smrg# This program is free software; you can redistribute it and/or modify 9745fc544a13Smrg# it under the terms of the GNU General Public License as published by 9746fc544a13Smrg# the Free Software Foundation; either version 2 of the License, or 9747fc544a13Smrg# (at your option) any later version. 9748fc544a13Smrg# 9749fc544a13Smrg# This program is distributed in the hope that it will be useful, but 9750fc544a13Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9751fc544a13Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9752fc544a13Smrg# General Public License for more details. 9753fc544a13Smrg# 9754fc544a13Smrg# You should have received a copy of the GNU General Public License 9755fc544a13Smrg# along with this program; if not, write to the Free Software 9756fc544a13Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9757fc544a13Smrg# 9758fc544a13Smrg# As a special exception to the GNU General Public License, if you 9759fc544a13Smrg# distribute this file as part of a program that contains a 9760fc544a13Smrg# configuration script generated by Autoconf, you may include it under 9761fc544a13Smrg# the same distribution terms that you use for the rest of that program. 9762fc544a13Smrg 9763fc544a13Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9764fc544a13Smrg# ---------------------------------- 9765fc544a13SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9766fc544a13Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9767fc544a13Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9768fc544a13SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9769fc544a13Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9770fc544a13Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9771fc544a13Smrgfi 9772fc544a13Smrgif test -n "$PKG_CONFIG"; then 9773fc544a13Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 9774fc544a13Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9775fc544a13Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9776fc544a13Smrg AC_MSG_RESULT([yes]) 9777fc544a13Smrg else 9778fc544a13Smrg AC_MSG_RESULT([no]) 9779fc544a13Smrg PKG_CONFIG="" 9780fc544a13Smrg fi 9781fc544a13Smrg 9782fc544a13Smrgfi[]dnl 9783fc544a13Smrg])# PKG_PROG_PKG_CONFIG 9784fc544a13Smrg 9785fc544a13Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9786fc544a13Smrg# 9787fc544a13Smrg# Check to see whether a particular set of modules exists. Similar 9788fc544a13Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9789fc544a13Smrg# 9790fc544a13Smrg# 9791fc544a13Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9792fc544a13Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 9793fc544a13Smrg# PKG_CHECK_EXISTS manually 9794fc544a13Smrg# -------------------------------------------------------------- 9795fc544a13SmrgAC_DEFUN([PKG_CHECK_EXISTS], 9796fc544a13Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9797fc544a13Smrgif test -n "$PKG_CONFIG" && \ 9798fc544a13Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9799fc544a13Smrg m4_ifval([$2], [$2], [:]) 9800fc544a13Smrgm4_ifvaln([$3], [else 9801fc544a13Smrg $3])dnl 9802fc544a13Smrgfi]) 9803fc544a13Smrg 9804fc544a13Smrg 9805fc544a13Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9806fc544a13Smrg# --------------------------------------------- 9807fc544a13Smrgm4_define([_PKG_CONFIG], 9808fc544a13Smrg[if test -n "$$1"; then 9809fc544a13Smrg pkg_cv_[]$1="$$1" 9810fc544a13Smrg elif test -n "$PKG_CONFIG"; then 9811fc544a13Smrg PKG_CHECK_EXISTS([$3], 9812fc544a13Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9813fc544a13Smrg [pkg_failed=yes]) 9814fc544a13Smrg else 9815fc544a13Smrg pkg_failed=untried 9816fc544a13Smrgfi[]dnl 9817fc544a13Smrg])# _PKG_CONFIG 9818fc544a13Smrg 9819fc544a13Smrg# _PKG_SHORT_ERRORS_SUPPORTED 9820fc544a13Smrg# ----------------------------- 9821fc544a13SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9822fc544a13Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9823fc544a13Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9824fc544a13Smrg _pkg_short_errors_supported=yes 9825fc544a13Smrgelse 9826fc544a13Smrg _pkg_short_errors_supported=no 9827fc544a13Smrgfi[]dnl 9828fc544a13Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 9829fc544a13Smrg 9830fc544a13Smrg 9831fc544a13Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9832fc544a13Smrg# [ACTION-IF-NOT-FOUND]) 9833fc544a13Smrg# 9834fc544a13Smrg# 9835fc544a13Smrg# Note that if there is a possibility the first call to 9836fc544a13Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 9837fc544a13Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9838fc544a13Smrg# 9839fc544a13Smrg# 9840fc544a13Smrg# -------------------------------------------------------------- 9841fc544a13SmrgAC_DEFUN([PKG_CHECK_MODULES], 9842fc544a13Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9843fc544a13SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9844fc544a13SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9845fc544a13Smrg 9846fc544a13Smrgpkg_failed=no 9847fc544a13SmrgAC_MSG_CHECKING([for $1]) 9848fc544a13Smrg 9849fc544a13Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9850fc544a13Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9851fc544a13Smrg 9852fc544a13Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9853fc544a13Smrgand $1[]_LIBS to avoid the need to call pkg-config. 9854fc544a13SmrgSee the pkg-config man page for more details.]) 9855fc544a13Smrg 9856fc544a13Smrgif test $pkg_failed = yes; then 9857fc544a13Smrg _PKG_SHORT_ERRORS_SUPPORTED 9858fc544a13Smrg if test $_pkg_short_errors_supported = yes; then 9859fc544a13Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9860fc544a13Smrg else 9861fc544a13Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9862fc544a13Smrg fi 9863fc544a13Smrg # Put the nasty error message in config.log where it belongs 9864fc544a13Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9865fc544a13Smrg 9866fc544a13Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 9867fc544a13Smrg[Package requirements ($2) were not met: 9868fc544a13Smrg 9869fc544a13Smrg$$1_PKG_ERRORS 9870fc544a13Smrg 9871fc544a13SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9872fc544a13Smrginstalled software in a non-standard prefix. 9873fc544a13Smrg 9874fc544a13Smrg_PKG_TEXT 9875fc544a13Smrg])], 9876fc544a13Smrg [AC_MSG_RESULT([no]) 9877fc544a13Smrg $4]) 9878fc544a13Smrgelif test $pkg_failed = untried; then 9879fc544a13Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 9880fc544a13Smrg[The pkg-config script could not be found or is too old. Make sure it 9881fc544a13Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 9882fc544a13Smrgpath to pkg-config. 9883fc544a13Smrg 9884fc544a13Smrg_PKG_TEXT 9885fc544a13Smrg 9886fc544a13SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9887fc544a13Smrg [$4]) 9888fc544a13Smrgelse 9889fc544a13Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9890fc544a13Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9891fc544a13Smrg AC_MSG_RESULT([yes]) 9892fc544a13Smrg ifelse([$3], , :, [$3]) 9893fc544a13Smrgfi[]dnl 9894fc544a13Smrg])# PKG_CHECK_MODULES 9895fc544a13Smrg 9896862f5301Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9897862f5301Smrgdnl 9898862f5301Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9899fc544a13Smrgdnl 9900862f5301Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9901862f5301Smrgdnl copy of this software and associated documentation files (the "Software"), 9902862f5301Smrgdnl to deal in the Software without restriction, including without limitation 9903862f5301Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9904862f5301Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9905862f5301Smrgdnl Software is furnished to do so, subject to the following conditions: 9906862f5301Smrgdnl 9907862f5301Smrgdnl The above copyright notice and this permission notice (including the next 9908862f5301Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9909862f5301Smrgdnl Software. 9910862f5301Smrgdnl 9911862f5301Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9912862f5301Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9913862f5301Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9914862f5301Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9915862f5301Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9916862f5301Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9917862f5301Smrgdnl DEALINGS IN THE SOFTWARE. 991844dda7b2Smrg 9919862f5301Smrg# XORG_MACROS_VERSION(required-version) 9920862f5301Smrg# ------------------------------------- 9921862f5301Smrg# Minimum version: 1.1.0 9922862f5301Smrg# 9923862f5301Smrg# If you're using a macro added in Version 1.1 or newer, include this in 9924862f5301Smrg# your configure.ac with the minimum required version, such as: 9925862f5301Smrg# XORG_MACROS_VERSION(1.1) 9926862f5301Smrg# 9927862f5301Smrg# To ensure that this macro is defined, also add: 9928862f5301Smrg# m4_ifndef([XORG_MACROS_VERSION], 9929862f5301Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9930862f5301Smrg# 9931862f5301Smrg# 9932fc544a13Smrg# See the "minimum version" comment for each macro you use to see what 9933862f5301Smrg# version you require. 9934862f5301Smrgm4_defun([XORG_MACROS_VERSION],[ 9935fc544a13Smrgm4_define([vers_have], [1.19.0]) 9936862f5301Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9937862f5301Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9938862f5301Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9939862f5301Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9940862f5301Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9941862f5301Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9942862f5301Smrgm4_undefine([vers_have]) 9943862f5301Smrgm4_undefine([maj_have]) 9944862f5301Smrgm4_undefine([maj_needed]) 9945862f5301Smrg]) # XORG_MACROS_VERSION 994644dda7b2Smrg 9947862f5301Smrg# XORG_PROG_RAWCPP() 9948862f5301Smrg# ------------------ 9949862f5301Smrg# Minimum version: 1.0.0 9950862f5301Smrg# 9951862f5301Smrg# Find cpp program and necessary flags for use in pre-processing text files 9952862f5301Smrg# such as man pages and config files 9953862f5301SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9954862f5301SmrgAC_REQUIRE([AC_PROG_CPP]) 9955fc544a13SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9956862f5301Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9957ff559fabSmrg 9958862f5301Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9959862f5301Smrg# which is not the best choice for supporting other OS'es, but covers most 9960862f5301Smrg# of the ones we need for now. 9961862f5301SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9962862f5301SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9963862f5301Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9964862f5301Smrg AC_MSG_RESULT([no]) 9965862f5301Smrgelse 9966862f5301Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9967862f5301Smrg RAWCPPFLAGS=-undef 9968862f5301Smrg AC_MSG_RESULT([yes]) 9969862f5301Smrg # under Cygwin unix is still defined even with -undef 9970862f5301Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9971862f5301Smrg RAWCPPFLAGS="-undef -ansi" 9972862f5301Smrg AC_MSG_RESULT([yes, with -ansi]) 9973862f5301Smrg else 9974862f5301Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9975862f5301Smrg fi 9976862f5301Smrgfi 9977862f5301Smrgrm -f conftest.$ac_ext 9978ff559fabSmrg 9979862f5301SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9980862f5301SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9981862f5301Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9982862f5301Smrg AC_MSG_RESULT([no]) 9983862f5301Smrgelse 9984862f5301Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9985fc544a13Smrg TRADITIONALCPPFLAGS="-traditional" 9986862f5301Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9987862f5301Smrg AC_MSG_RESULT([yes]) 9988862f5301Smrg else 9989862f5301Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9990862f5301Smrg fi 9991862f5301Smrgfi 9992862f5301Smrgrm -f conftest.$ac_ext 9993862f5301SmrgAC_SUBST(RAWCPPFLAGS) 9994fc544a13SmrgAC_SUBST(TRADITIONALCPPFLAGS) 9995862f5301Smrg]) # XORG_PROG_RAWCPP 9996ff559fabSmrg 9997862f5301Smrg# XORG_MANPAGE_SECTIONS() 9998862f5301Smrg# ----------------------- 9999862f5301Smrg# Minimum version: 1.0.0 10000862f5301Smrg# 10001862f5301Smrg# Determine which sections man pages go in for the different man page types 10002862f5301Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 10003862f5301Smrg# Not sure if there's any better way than just hardcoding by OS name. 10004862f5301Smrg# Override default settings by setting environment variables 10005862f5301Smrg# Added MAN_SUBSTS in version 1.8 10006862f5301Smrg# Added AC_PROG_SED in version 1.8 10007ff559fabSmrg 10008862f5301SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 10009862f5301SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10010862f5301SmrgAC_REQUIRE([AC_PROG_SED]) 10011ff559fabSmrg 10012862f5301Smrgif test x$APP_MAN_SUFFIX = x ; then 10013862f5301Smrg APP_MAN_SUFFIX=1 10014862f5301Smrgfi 10015862f5301Smrgif test x$APP_MAN_DIR = x ; then 10016862f5301Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 10017862f5301Smrgfi 10018ff559fabSmrg 10019862f5301Smrgif test x$LIB_MAN_SUFFIX = x ; then 10020862f5301Smrg LIB_MAN_SUFFIX=3 10021862f5301Smrgfi 10022862f5301Smrgif test x$LIB_MAN_DIR = x ; then 10023862f5301Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 10024862f5301Smrgfi 1002544dda7b2Smrg 10026862f5301Smrgif test x$FILE_MAN_SUFFIX = x ; then 10027862f5301Smrg case $host_os in 10028862f5301Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 10029862f5301Smrg *) FILE_MAN_SUFFIX=5 ;; 10030862f5301Smrg esac 10031862f5301Smrgfi 10032862f5301Smrgif test x$FILE_MAN_DIR = x ; then 10033862f5301Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 10034862f5301Smrgfi 1003544dda7b2Smrg 10036862f5301Smrgif test x$MISC_MAN_SUFFIX = x ; then 10037862f5301Smrg case $host_os in 10038862f5301Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 10039862f5301Smrg *) MISC_MAN_SUFFIX=7 ;; 10040862f5301Smrg esac 10041862f5301Smrgfi 10042862f5301Smrgif test x$MISC_MAN_DIR = x ; then 10043862f5301Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 10044862f5301Smrgfi 1004544dda7b2Smrg 10046862f5301Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 10047862f5301Smrg case $host_os in 10048862f5301Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 10049862f5301Smrg *) DRIVER_MAN_SUFFIX=4 ;; 10050862f5301Smrg esac 10051862f5301Smrgfi 10052862f5301Smrgif test x$DRIVER_MAN_DIR = x ; then 10053862f5301Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 10054862f5301Smrgfi 1005544dda7b2Smrg 10056862f5301Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 10057862f5301Smrg case $host_os in 10058862f5301Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 10059862f5301Smrg *) ADMIN_MAN_SUFFIX=8 ;; 10060862f5301Smrg esac 10061862f5301Smrgfi 10062862f5301Smrgif test x$ADMIN_MAN_DIR = x ; then 10063862f5301Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 10064862f5301Smrgfi 1006544dda7b2Smrg 1006644dda7b2Smrg 10067862f5301SmrgAC_SUBST([APP_MAN_SUFFIX]) 10068862f5301SmrgAC_SUBST([LIB_MAN_SUFFIX]) 10069862f5301SmrgAC_SUBST([FILE_MAN_SUFFIX]) 10070862f5301SmrgAC_SUBST([MISC_MAN_SUFFIX]) 10071862f5301SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 10072862f5301SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 10073862f5301SmrgAC_SUBST([APP_MAN_DIR]) 10074862f5301SmrgAC_SUBST([LIB_MAN_DIR]) 10075862f5301SmrgAC_SUBST([FILE_MAN_DIR]) 10076862f5301SmrgAC_SUBST([MISC_MAN_DIR]) 10077862f5301SmrgAC_SUBST([DRIVER_MAN_DIR]) 10078862f5301SmrgAC_SUBST([ADMIN_MAN_DIR]) 1007944dda7b2Smrg 10080862f5301SmrgXORG_MAN_PAGE="X Version 11" 10081862f5301SmrgAC_SUBST([XORG_MAN_PAGE]) 10082862f5301SmrgMAN_SUBSTS="\ 10083862f5301Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10084862f5301Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10085862f5301Smrg -e 's|__xservername__|Xorg|g' \ 10086862f5301Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 10087862f5301Smrg -e 's|__projectroot__|\$(prefix)|g' \ 10088862f5301Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 10089862f5301Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 10090862f5301Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 10091862f5301Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 10092862f5301Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 10093862f5301Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 10094862f5301Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 10095862f5301SmrgAC_SUBST([MAN_SUBSTS]) 1009644dda7b2Smrg 10097862f5301Smrg]) # XORG_MANPAGE_SECTIONS 10098ff559fabSmrg 10099862f5301Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 10100862f5301Smrg# ------------------------ 10101862f5301Smrg# Minimum version: 1.7.0 1010244dda7b2Smrg# 10103862f5301Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 10104862f5301Smrg# provided by xorg-sgml-doctools, if installed. 10105862f5301SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 10106862f5301SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 10107862f5301SmrgXORG_SGML_PATH= 10108862f5301SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 10109862f5301Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 10110862f5301Smrg [m4_ifval([$1],[:], 10111862f5301Smrg [if test x"$cross_compiling" != x"yes" ; then 10112862f5301Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10113862f5301Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 10114862f5301Smrg fi]) 10115862f5301Smrg ]) 10116ff559fabSmrg 10117862f5301Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10118862f5301Smrg# the path and the name of the doc stylesheet 10119862f5301Smrgif test "x$XORG_SGML_PATH" != "x" ; then 10120862f5301Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 10121862f5301Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10122862f5301Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10123862f5301Smrgelse 10124862f5301Smrg AC_MSG_RESULT([no]) 10125862f5301Smrgfi 10126ff559fabSmrg 10127862f5301SmrgAC_SUBST(XORG_SGML_PATH) 10128862f5301SmrgAC_SUBST(STYLESHEET_SRCDIR) 10129862f5301SmrgAC_SUBST(XSL_STYLESHEET) 10130862f5301SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10131862f5301Smrg]) # XORG_CHECK_SGML_DOCTOOLS 10132ff559fabSmrg 10133862f5301Smrg# XORG_CHECK_LINUXDOC 10134862f5301Smrg# ------------------- 10135862f5301Smrg# Minimum version: 1.0.0 10136862f5301Smrg# 10137862f5301Smrg# Defines the variable MAKE_TEXT if the necessary tools and 10138862f5301Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10139862f5301Smrg# Whether or not the necessary tools and files are found can be checked 10140862f5301Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10141862f5301SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 10142862f5301SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10143862f5301SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10144ff559fabSmrg 10145862f5301SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10146ff559fabSmrg 10147862f5301SmrgAC_MSG_CHECKING([whether to build documentation]) 10148ff559fabSmrg 10149862f5301Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10150862f5301Smrg BUILDDOC=yes 10151862f5301Smrgelse 10152862f5301Smrg BUILDDOC=no 10153862f5301Smrgfi 10154ff559fabSmrg 10155862f5301SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10156ff559fabSmrg 10157862f5301SmrgAC_MSG_RESULT([$BUILDDOC]) 10158ff559fabSmrg 10159862f5301SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10160ff559fabSmrg 10161862f5301Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10162862f5301Smrg BUILDPDFDOC=yes 10163862f5301Smrgelse 10164862f5301Smrg BUILDPDFDOC=no 10165862f5301Smrgfi 10166ff559fabSmrg 10167862f5301SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10168ff559fabSmrg 10169862f5301SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10170ff559fabSmrg 10171862f5301SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10172862f5301SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10173862f5301SmrgMAKE_PDF="$PS2PDF" 10174862f5301SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10175ff559fabSmrg 10176862f5301SmrgAC_SUBST(MAKE_TEXT) 10177862f5301SmrgAC_SUBST(MAKE_PS) 10178862f5301SmrgAC_SUBST(MAKE_PDF) 10179862f5301SmrgAC_SUBST(MAKE_HTML) 10180862f5301Smrg]) # XORG_CHECK_LINUXDOC 10181ff559fabSmrg 10182862f5301Smrg# XORG_CHECK_DOCBOOK 10183862f5301Smrg# ------------------- 10184862f5301Smrg# Minimum version: 1.0.0 10185862f5301Smrg# 10186862f5301Smrg# Checks for the ability to build output formats from SGML DocBook source. 10187862f5301Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10188862f5301Smrg# indicates whether the necessary tools and files are found and, if set, 10189862f5301Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10190862f5301SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 10191862f5301SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10192ff559fabSmrg 10193862f5301SmrgBUILDTXTDOC=no 10194862f5301SmrgBUILDPDFDOC=no 10195862f5301SmrgBUILDPSDOC=no 10196862f5301SmrgBUILDHTMLDOC=no 10197ff559fabSmrg 10198862f5301SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 10199862f5301SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10200862f5301SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 10201862f5301SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1020244dda7b2Smrg 10203862f5301SmrgAC_MSG_CHECKING([whether to build text documentation]) 10204862f5301Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10205862f5301Smrg test x$BUILD_TXTDOC != xno; then 10206862f5301Smrg BUILDTXTDOC=yes 10207862f5301Smrgfi 10208862f5301SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10209862f5301SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1021044dda7b2Smrg 10211862f5301SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 10212862f5301Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10213862f5301Smrg test x$BUILD_PDFDOC != xno; then 10214862f5301Smrg BUILDPDFDOC=yes 10215862f5301Smrgfi 10216862f5301SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10217862f5301SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 102187a3b38f7Smrg 10219862f5301SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 10220862f5301Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10221862f5301Smrg test x$BUILD_PSDOC != xno; then 10222862f5301Smrg BUILDPSDOC=yes 10223862f5301Smrgfi 10224862f5301SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10225862f5301SmrgAC_MSG_RESULT([$BUILDPSDOC]) 102267a3b38f7Smrg 10227862f5301SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 10228862f5301Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10229862f5301Smrg test x$BUILD_HTMLDOC != xno; then 10230862f5301Smrg BUILDHTMLDOC=yes 10231862f5301Smrgfi 10232862f5301SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10233862f5301SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10234ff559fabSmrg 10235862f5301SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10236862f5301SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10237862f5301SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10238862f5301SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10239ff559fabSmrg 10240862f5301SmrgAC_SUBST(MAKE_TEXT) 10241862f5301SmrgAC_SUBST(MAKE_PS) 10242862f5301SmrgAC_SUBST(MAKE_PDF) 10243862f5301SmrgAC_SUBST(MAKE_HTML) 10244862f5301Smrg]) # XORG_CHECK_DOCBOOK 10245ff559fabSmrg 10246862f5301Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10247862f5301Smrg# ---------------- 10248862f5301Smrg# Minimum version: 1.5.0 10249862f5301Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10250862f5301Smrg# 10251862f5301Smrg# Documentation tools are not always available on all platforms and sometimes 10252862f5301Smrg# not at the appropriate level. This macro enables a module to test for the 10253862f5301Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10254862f5301Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 10255862f5301Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 10256862f5301Smrg# --with-xmlto assumes 'auto'. 10257862f5301Smrg# 10258862f5301Smrg# Interface to module: 10259862f5301Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10260862f5301Smrg# XMLTO: returns the path of the xmlto program found 10261862f5301Smrg# returns the path set by the user in the environment 10262862f5301Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 10263862f5301Smrg# 'no' user instructs the module not to use xmlto 10264862f5301Smrg# 10265862f5301Smrg# Added in version 1.10.0 10266862f5301Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10267862f5301Smrg# xmlto for text output requires either lynx, links, or w3m browsers 10268862f5301Smrg# 10269862f5301Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10270862f5301Smrg# 10271862f5301SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 10272862f5301SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 10273862f5301Smrgm4_define([_defopt], m4_default([$2], [auto])) 10274862f5301SmrgAC_ARG_WITH(xmlto, 10275862f5301Smrg AS_HELP_STRING([--with-xmlto], 10276862f5301Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10277862f5301Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 10278862f5301Smrgm4_undefine([_defopt]) 10279ff559fabSmrg 10280862f5301Smrgif test "x$use_xmlto" = x"auto"; then 10281862f5301Smrg AC_PATH_PROG([XMLTO], [xmlto]) 10282862f5301Smrg if test "x$XMLTO" = "x"; then 10283862f5301Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10284862f5301Smrg have_xmlto=no 10285862f5301Smrg else 10286862f5301Smrg have_xmlto=yes 10287862f5301Smrg fi 10288862f5301Smrgelif test "x$use_xmlto" = x"yes" ; then 10289862f5301Smrg AC_PATH_PROG([XMLTO], [xmlto]) 10290862f5301Smrg if test "x$XMLTO" = "x"; then 10291862f5301Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10292862f5301Smrg fi 10293862f5301Smrg have_xmlto=yes 10294862f5301Smrgelif test "x$use_xmlto" = x"no" ; then 10295862f5301Smrg if test "x$XMLTO" != "x"; then 10296862f5301Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10297862f5301Smrg fi 10298862f5301Smrg have_xmlto=no 10299862f5301Smrgelse 10300862f5301Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10301862f5301Smrgfi 10302ff559fabSmrg 10303862f5301Smrg# Test for a minimum version of xmlto, if provided. 10304862f5301Smrgm4_ifval([$1], 10305862f5301Smrg[if test "$have_xmlto" = yes; then 10306862f5301Smrg # scrape the xmlto version 10307862f5301Smrg AC_MSG_CHECKING([the xmlto version]) 10308862f5301Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10309862f5301Smrg AC_MSG_RESULT([$xmlto_version]) 10310862f5301Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 10311862f5301Smrg [if test "x$use_xmlto" = xauto; then 10312862f5301Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10313862f5301Smrg have_xmlto=no 10314862f5301Smrg else 10315862f5301Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10316862f5301Smrg fi]) 10317862f5301Smrgfi]) 10318ff559fabSmrg 10319862f5301Smrg# Test for the ability of xmlto to generate a text target 10320862f5301Smrghave_xmlto_text=no 10321862f5301Smrgcat > conftest.xml << "EOF" 10322862f5301SmrgEOF 10323862f5301SmrgAS_IF([test "$have_xmlto" = yes], 10324862f5301Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10325862f5301Smrg [have_xmlto_text=yes], 10326862f5301Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10327862f5301Smrgrm -f conftest.xml 10328862f5301SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10329862f5301SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10330862f5301Smrg]) # XORG_WITH_XMLTO 10331ff559fabSmrg 10332862f5301Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10333862f5301Smrg# -------------------------------------------- 10334862f5301Smrg# Minimum version: 1.12.0 10335862f5301Smrg# Minimum version for optional DEFAULT argument: 1.12.0 10336862f5301Smrg# 10337862f5301Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10338862f5301Smrg# XML-based language used for the transformation of XML documents. 10339862f5301Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10340862f5301Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 10341862f5301Smrg# The XSLT processor is often used as a standalone tool for transformations. 10342862f5301Smrg# It should not be assumed that this tool is used only to work with documnetation. 10343862f5301Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10344862f5301Smrg# 10345862f5301Smrg# Interface to module: 10346862f5301Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10347862f5301Smrg# XSLTPROC: returns the path of the xsltproc program found 10348862f5301Smrg# returns the path set by the user in the environment 10349862f5301Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10350862f5301Smrg# 'no' user instructs the module not to use xsltproc 10351862f5301Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 10352862f5301Smrg# 10353862f5301Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10354862f5301Smrg# 10355862f5301SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 10356862f5301SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10357862f5301Smrg# Preserves the interface, should it be implemented later 10358862f5301Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10359862f5301Smrgm4_define([_defopt], m4_default([$2], [auto])) 10360862f5301SmrgAC_ARG_WITH(xsltproc, 10361862f5301Smrg AS_HELP_STRING([--with-xsltproc], 10362862f5301Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10363862f5301Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10364862f5301Smrgm4_undefine([_defopt]) 10365ff559fabSmrg 10366862f5301Smrgif test "x$use_xsltproc" = x"auto"; then 10367862f5301Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10368862f5301Smrg if test "x$XSLTPROC" = "x"; then 10369862f5301Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10370862f5301Smrg have_xsltproc=no 10371862f5301Smrg else 10372862f5301Smrg have_xsltproc=yes 10373862f5301Smrg fi 10374862f5301Smrgelif test "x$use_xsltproc" = x"yes" ; then 10375862f5301Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10376862f5301Smrg if test "x$XSLTPROC" = "x"; then 10377862f5301Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10378862f5301Smrg fi 10379862f5301Smrg have_xsltproc=yes 10380862f5301Smrgelif test "x$use_xsltproc" = x"no" ; then 10381862f5301Smrg if test "x$XSLTPROC" != "x"; then 10382862f5301Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10383862f5301Smrg fi 10384862f5301Smrg have_xsltproc=no 10385862f5301Smrgelse 10386862f5301Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10387862f5301Smrgfi 10388ff559fabSmrg 10389862f5301SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10390862f5301Smrg]) # XORG_WITH_XSLTPROC 10391ff559fabSmrg 10392862f5301Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10393862f5301Smrg# ---------------------------------------- 10394862f5301Smrg# Minimum version: 1.15.0 10395862f5301Smrg# 10396862f5301Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 10397862f5301Smrg# scanning arbitrary text files, extracting information from those text files, 10398862f5301Smrg# and printing reports based on that information. 10399862f5301Smrg# 10400862f5301Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 10401862f5301Smrg# 10402862f5301Smrg# Interface to module: 10403862f5301Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 10404862f5301Smrg# PERL: returns the path of the perl program found 10405862f5301Smrg# returns the path set by the user in the environment 10406862f5301Smrg# --with-perl: 'yes' user instructs the module to use perl 10407862f5301Smrg# 'no' user instructs the module not to use perl 10408862f5301Smrg# have_perl: returns yes if perl found in PATH or no 10409862f5301Smrg# 10410862f5301Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10411862f5301Smrg# 10412862f5301SmrgAC_DEFUN([XORG_WITH_PERL],[ 10413862f5301SmrgAC_ARG_VAR([PERL], [Path to perl command]) 10414862f5301Smrg# Preserves the interface, should it be implemented later 10415862f5301Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10416862f5301Smrgm4_define([_defopt], m4_default([$2], [auto])) 10417862f5301SmrgAC_ARG_WITH(perl, 10418862f5301Smrg AS_HELP_STRING([--with-perl], 10419862f5301Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 10420862f5301Smrg [use_perl=$withval], [use_perl=]_defopt) 10421862f5301Smrgm4_undefine([_defopt]) 1042244dda7b2Smrg 10423862f5301Smrgif test "x$use_perl" = x"auto"; then 10424862f5301Smrg AC_PATH_PROG([PERL], [perl]) 10425862f5301Smrg if test "x$PERL" = "x"; then 10426862f5301Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 10427862f5301Smrg have_perl=no 10428862f5301Smrg else 10429862f5301Smrg have_perl=yes 10430862f5301Smrg fi 10431862f5301Smrgelif test "x$use_perl" = x"yes" ; then 10432862f5301Smrg AC_PATH_PROG([PERL], [perl]) 10433862f5301Smrg if test "x$PERL" = "x"; then 10434862f5301Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 10435862f5301Smrg fi 10436862f5301Smrg have_perl=yes 10437862f5301Smrgelif test "x$use_perl" = x"no" ; then 10438862f5301Smrg if test "x$PERL" != "x"; then 10439862f5301Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 10440862f5301Smrg fi 10441862f5301Smrg have_perl=no 10442862f5301Smrgelse 10443862f5301Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 10444862f5301Smrgfi 1044544dda7b2Smrg 10446862f5301SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 10447862f5301Smrg]) # XORG_WITH_PERL 1044844dda7b2Smrg 10449862f5301Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10450862f5301Smrg# ---------------- 10451862f5301Smrg# Minimum version: 1.5.0 10452862f5301Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10453862f5301Smrg# 10454862f5301Smrg# Documentation tools are not always available on all platforms and sometimes 10455862f5301Smrg# not at the appropriate level. This macro enables a module to test for the 10456862f5301Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10457862f5301Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10458862f5301Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10459862f5301Smrg# --with-asciidoc assumes 'auto'. 10460862f5301Smrg# 10461862f5301Smrg# Interface to module: 10462862f5301Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10463862f5301Smrg# ASCIIDOC: returns the path of the asciidoc program found 10464862f5301Smrg# returns the path set by the user in the environment 10465862f5301Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10466862f5301Smrg# 'no' user instructs the module not to use asciidoc 10467862f5301Smrg# 10468862f5301Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10469862f5301Smrg# 10470862f5301SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 10471862f5301SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10472862f5301Smrgm4_define([_defopt], m4_default([$2], [auto])) 10473862f5301SmrgAC_ARG_WITH(asciidoc, 10474862f5301Smrg AS_HELP_STRING([--with-asciidoc], 10475862f5301Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10476862f5301Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10477862f5301Smrgm4_undefine([_defopt]) 10478ff559fabSmrg 10479862f5301Smrgif test "x$use_asciidoc" = x"auto"; then 10480862f5301Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10481862f5301Smrg if test "x$ASCIIDOC" = "x"; then 10482862f5301Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10483862f5301Smrg have_asciidoc=no 10484862f5301Smrg else 10485862f5301Smrg have_asciidoc=yes 10486862f5301Smrg fi 10487862f5301Smrgelif test "x$use_asciidoc" = x"yes" ; then 10488862f5301Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10489862f5301Smrg if test "x$ASCIIDOC" = "x"; then 10490862f5301Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10491862f5301Smrg fi 10492862f5301Smrg have_asciidoc=yes 10493862f5301Smrgelif test "x$use_asciidoc" = x"no" ; then 10494862f5301Smrg if test "x$ASCIIDOC" != "x"; then 10495862f5301Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10496862f5301Smrg fi 10497862f5301Smrg have_asciidoc=no 10498862f5301Smrgelse 10499862f5301Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10500862f5301Smrgfi 10501862f5301Smrgm4_ifval([$1], 10502862f5301Smrg[if test "$have_asciidoc" = yes; then 10503862f5301Smrg # scrape the asciidoc version 10504862f5301Smrg AC_MSG_CHECKING([the asciidoc version]) 10505862f5301Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10506862f5301Smrg AC_MSG_RESULT([$asciidoc_version]) 10507862f5301Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 10508862f5301Smrg [if test "x$use_asciidoc" = xauto; then 10509862f5301Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10510862f5301Smrg have_asciidoc=no 10511862f5301Smrg else 10512862f5301Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10513862f5301Smrg fi]) 10514862f5301Smrgfi]) 10515862f5301SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10516862f5301Smrg]) # XORG_WITH_ASCIIDOC 10517ff559fabSmrg 10518862f5301Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10519fc544a13Smrg# ------------------------------------------- 10520862f5301Smrg# Minimum version: 1.5.0 10521862f5301Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10522fc544a13Smrg# Minimum version for optional DOT checking: 1.18.0 10523862f5301Smrg# 10524862f5301Smrg# Documentation tools are not always available on all platforms and sometimes 10525862f5301Smrg# not at the appropriate level. This macro enables a module to test for the 10526862f5301Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10527862f5301Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 10528862f5301Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 10529862f5301Smrg# --with-doxygen assumes 'auto'. 10530862f5301Smrg# 10531862f5301Smrg# Interface to module: 10532862f5301Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10533862f5301Smrg# DOXYGEN: returns the path of the doxygen program found 10534862f5301Smrg# returns the path set by the user in the environment 10535862f5301Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 10536862f5301Smrg# 'no' user instructs the module not to use doxygen 10537862f5301Smrg# 10538862f5301Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10539862f5301Smrg# 10540862f5301SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10541862f5301SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10542fc544a13SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10543862f5301Smrgm4_define([_defopt], m4_default([$2], [auto])) 10544862f5301SmrgAC_ARG_WITH(doxygen, 10545862f5301Smrg AS_HELP_STRING([--with-doxygen], 10546862f5301Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10547862f5301Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 10548862f5301Smrgm4_undefine([_defopt]) 10549ff559fabSmrg 10550862f5301Smrgif test "x$use_doxygen" = x"auto"; then 10551862f5301Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10552862f5301Smrg if test "x$DOXYGEN" = "x"; then 10553862f5301Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10554862f5301Smrg have_doxygen=no 10555862f5301Smrg else 10556862f5301Smrg have_doxygen=yes 10557862f5301Smrg fi 10558862f5301Smrgelif test "x$use_doxygen" = x"yes" ; then 10559862f5301Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10560862f5301Smrg if test "x$DOXYGEN" = "x"; then 10561862f5301Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10562862f5301Smrg fi 10563862f5301Smrg have_doxygen=yes 10564862f5301Smrgelif test "x$use_doxygen" = x"no" ; then 10565862f5301Smrg if test "x$DOXYGEN" != "x"; then 10566862f5301Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10567862f5301Smrg fi 10568862f5301Smrg have_doxygen=no 10569862f5301Smrgelse 10570862f5301Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10571862f5301Smrgfi 10572862f5301Smrgm4_ifval([$1], 10573862f5301Smrg[if test "$have_doxygen" = yes; then 10574862f5301Smrg # scrape the doxygen version 10575862f5301Smrg AC_MSG_CHECKING([the doxygen version]) 10576862f5301Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10577862f5301Smrg AC_MSG_RESULT([$doxygen_version]) 10578862f5301Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10579862f5301Smrg [if test "x$use_doxygen" = xauto; then 10580862f5301Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10581862f5301Smrg have_doxygen=no 10582862f5301Smrg else 10583862f5301Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10584862f5301Smrg fi]) 10585862f5301Smrgfi]) 10586fc544a13Smrg 10587fc544a13Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10588fc544a13Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10589fc544a13Smrgdnl HAVE_DOT = @HAVE_DOT@ 10590fc544a13SmrgHAVE_DOT=no 10591fc544a13Smrgif test "x$have_doxygen" = "xyes"; then 10592fc544a13Smrg AC_PATH_PROG([DOT], [dot]) 10593fc544a13Smrg if test "x$DOT" != "x"; then 10594fc544a13Smrg HAVE_DOT=yes 10595fc544a13Smrg fi 10596fc544a13Smrgfi 10597fc544a13Smrg 10598fc544a13SmrgAC_SUBST([HAVE_DOT]) 10599fc544a13SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10600862f5301SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10601862f5301Smrg]) # XORG_WITH_DOXYGEN 106027a3b38f7Smrg 10603862f5301Smrg# XORG_WITH_GROFF([DEFAULT]) 10604862f5301Smrg# ---------------- 10605862f5301Smrg# Minimum version: 1.6.0 10606862f5301Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10607862f5301Smrg# 10608862f5301Smrg# Documentation tools are not always available on all platforms and sometimes 10609862f5301Smrg# not at the appropriate level. This macro enables a module to test for the 10610862f5301Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10611862f5301Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 10612862f5301Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 10613862f5301Smrg# --with-groff assumes 'auto'. 10614862f5301Smrg# 10615862f5301Smrg# Interface to module: 10616862f5301Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10617862f5301Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10618862f5301Smrg# HAVE_GROFF_MS: the -ms macros package 10619862f5301Smrg# GROFF: returns the path of the groff program found 10620862f5301Smrg# returns the path set by the user in the environment 10621862f5301Smrg# --with-groff: 'yes' user instructs the module to use groff 10622862f5301Smrg# 'no' user instructs the module not to use groff 10623862f5301Smrg# 10624862f5301Smrg# Added in version 1.9.0: 10625862f5301Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10626862f5301Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10627862f5301Smrg# psselect from the psutils package. 10628862f5301Smrg# the ghostcript package. Refer to the grohtml man pages 10629862f5301Smrg# 10630862f5301Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10631862f5301Smrg# 10632862f5301Smrg# OS and distros often splits groff in a basic and full package, the former 10633862f5301Smrg# having the groff program and the later having devices, fonts and macros 10634862f5301Smrg# Checking for the groff executable is not enough. 10635862f5301Smrg# 10636862f5301Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10637862f5301Smrg# unset HAVE_GROFF or GROFF env variables. 10638862f5301Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10639862f5301Smrg# 10640862f5301SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10641862f5301SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10642862f5301Smrgm4_define([_defopt], m4_default([$1], [auto])) 10643862f5301SmrgAC_ARG_WITH(groff, 10644862f5301Smrg AS_HELP_STRING([--with-groff], 10645862f5301Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10646862f5301Smrg [use_groff=$withval], [use_groff=]_defopt) 10647862f5301Smrgm4_undefine([_defopt]) 106487a3b38f7Smrg 10649862f5301Smrgif test "x$use_groff" = x"auto"; then 10650862f5301Smrg AC_PATH_PROG([GROFF], [groff]) 10651862f5301Smrg if test "x$GROFF" = "x"; then 10652862f5301Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10653862f5301Smrg have_groff=no 10654862f5301Smrg else 10655862f5301Smrg have_groff=yes 10656862f5301Smrg fi 10657862f5301Smrgelif test "x$use_groff" = x"yes" ; then 10658862f5301Smrg AC_PATH_PROG([GROFF], [groff]) 10659862f5301Smrg if test "x$GROFF" = "x"; then 10660862f5301Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10661862f5301Smrg fi 10662862f5301Smrg have_groff=yes 10663862f5301Smrgelif test "x$use_groff" = x"no" ; then 10664862f5301Smrg if test "x$GROFF" != "x"; then 10665862f5301Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10666862f5301Smrg fi 10667862f5301Smrg have_groff=no 10668862f5301Smrgelse 10669862f5301Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10670862f5301Smrgfi 106717a3b38f7Smrg 10672862f5301Smrg# We have groff, test for the presence of the macro packages 10673862f5301Smrgif test "x$have_groff" = x"yes"; then 10674862f5301Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10675862f5301Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10676862f5301Smrg groff_ms_works=yes 10677862f5301Smrg else 10678862f5301Smrg groff_ms_works=no 10679862f5301Smrg fi 10680862f5301Smrg AC_MSG_RESULT([$groff_ms_works]) 10681862f5301Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10682862f5301Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10683862f5301Smrg groff_mm_works=yes 10684862f5301Smrg else 10685862f5301Smrg groff_mm_works=no 10686862f5301Smrg fi 10687862f5301Smrg AC_MSG_RESULT([$groff_mm_works]) 10688862f5301Smrgfi 10689ff559fabSmrg 10690862f5301Smrg# We have groff, test for HTML dependencies, one command per package 10691862f5301Smrgif test "x$have_groff" = x"yes"; then 10692862f5301Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10693862f5301Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10694862f5301Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10695862f5301Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10696862f5301Smrg have_groff_html=yes 10697862f5301Smrg else 10698862f5301Smrg have_groff_html=no 10699862f5301Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10700862f5301Smrg fi 10701862f5301Smrgfi 10702ff559fabSmrg 10703862f5301Smrg# Set Automake conditionals for Makefiles 10704862f5301SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10705862f5301SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10706862f5301SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10707862f5301SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10708862f5301Smrg]) # XORG_WITH_GROFF 10709ff559fabSmrg 10710862f5301Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10711862f5301Smrg# --------------------------------------- 10712862f5301Smrg# Minimum version: 1.6.0 10713862f5301Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10714862f5301Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10715862f5301Smrg# 10716862f5301Smrg# Documentation tools are not always available on all platforms and sometimes 10717862f5301Smrg# not at the appropriate level. This macro enables a module to test for the 10718862f5301Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10719862f5301Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 10720862f5301Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 10721862f5301Smrg# --with-fop assumes 'auto'. 10722862f5301Smrg# 10723862f5301Smrg# Interface to module: 10724862f5301Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10725862f5301Smrg# FOP: returns the path of the fop program found 10726862f5301Smrg# returns the path set by the user in the environment 10727862f5301Smrg# --with-fop: 'yes' user instructs the module to use fop 10728862f5301Smrg# 'no' user instructs the module not to use fop 10729862f5301Smrg# 10730862f5301Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10731862f5301Smrg# 10732862f5301SmrgAC_DEFUN([XORG_WITH_FOP],[ 10733862f5301SmrgAC_ARG_VAR([FOP], [Path to fop command]) 10734862f5301Smrgm4_define([_defopt], m4_default([$2], [auto])) 10735862f5301SmrgAC_ARG_WITH(fop, 10736862f5301Smrg AS_HELP_STRING([--with-fop], 10737862f5301Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10738862f5301Smrg [use_fop=$withval], [use_fop=]_defopt) 10739862f5301Smrgm4_undefine([_defopt]) 10740ff559fabSmrg 10741862f5301Smrgif test "x$use_fop" = x"auto"; then 10742862f5301Smrg AC_PATH_PROG([FOP], [fop]) 10743862f5301Smrg if test "x$FOP" = "x"; then 10744862f5301Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10745862f5301Smrg have_fop=no 10746862f5301Smrg else 10747862f5301Smrg have_fop=yes 10748862f5301Smrg fi 10749862f5301Smrgelif test "x$use_fop" = x"yes" ; then 10750862f5301Smrg AC_PATH_PROG([FOP], [fop]) 10751862f5301Smrg if test "x$FOP" = "x"; then 10752862f5301Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10753862f5301Smrg fi 10754862f5301Smrg have_fop=yes 10755862f5301Smrgelif test "x$use_fop" = x"no" ; then 10756862f5301Smrg if test "x$FOP" != "x"; then 10757862f5301Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10758862f5301Smrg fi 10759862f5301Smrg have_fop=no 10760862f5301Smrgelse 10761862f5301Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10762862f5301Smrgfi 10763ff559fabSmrg 10764862f5301Smrg# Test for a minimum version of fop, if provided. 10765862f5301Smrgm4_ifval([$1], 10766862f5301Smrg[if test "$have_fop" = yes; then 10767862f5301Smrg # scrape the fop version 10768862f5301Smrg AC_MSG_CHECKING([for fop minimum version]) 10769862f5301Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10770862f5301Smrg AC_MSG_RESULT([$fop_version]) 10771862f5301Smrg AS_VERSION_COMPARE([$fop_version], [$1], 10772862f5301Smrg [if test "x$use_fop" = xauto; then 10773862f5301Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10774862f5301Smrg have_fop=no 10775862f5301Smrg else 10776862f5301Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10777862f5301Smrg fi]) 10778862f5301Smrgfi]) 10779862f5301SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10780862f5301Smrg]) # XORG_WITH_FOP 10781ff559fabSmrg 10782fc544a13Smrg# XORG_WITH_M4([MIN-VERSION]) 10783fc544a13Smrg# --------------------------- 10784fc544a13Smrg# Minimum version: 1.19.0 10785fc544a13Smrg# 10786fc544a13Smrg# This macro attempts to locate an m4 macro processor which supports 10787fc544a13Smrg# -I option and is only useful for modules relying on M4 in order to 10788fc544a13Smrg# expand macros in source code files. 10789fc544a13Smrg# 10790fc544a13Smrg# Interface to module: 10791fc544a13Smrg# M4: returns the path of the m4 program found 10792fc544a13Smrg# returns the path set by the user in the environment 10793fc544a13Smrg# 10794fc544a13SmrgAC_DEFUN([XORG_WITH_M4], [ 10795fc544a13SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10796fc544a13Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10797fc544a13Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10798fc544a13Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10799fc544a13Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 10800fc544a13Smrg [$PATH:/usr/gnu/bin])]) 10801fc544a13Smrg 10802fc544a13SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 10803fc544a13Smrg]) # XORG_WITH_M4 10804fc544a13Smrg 10805862f5301Smrg# XORG_WITH_PS2PDF([DEFAULT]) 10806862f5301Smrg# ---------------- 10807862f5301Smrg# Minimum version: 1.6.0 10808862f5301Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10809862f5301Smrg# 10810862f5301Smrg# Documentation tools are not always available on all platforms and sometimes 10811862f5301Smrg# not at the appropriate level. This macro enables a module to test for the 10812862f5301Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10813862f5301Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10814862f5301Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10815862f5301Smrg# --with-ps2pdf assumes 'auto'. 10816862f5301Smrg# 10817862f5301Smrg# Interface to module: 10818862f5301Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10819862f5301Smrg# PS2PDF: returns the path of the ps2pdf program found 10820862f5301Smrg# returns the path set by the user in the environment 10821862f5301Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10822862f5301Smrg# 'no' user instructs the module not to use ps2pdf 10823862f5301Smrg# 10824862f5301Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10825862f5301Smrg# 10826862f5301SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10827862f5301SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10828862f5301Smrgm4_define([_defopt], m4_default([$1], [auto])) 10829862f5301SmrgAC_ARG_WITH(ps2pdf, 10830862f5301Smrg AS_HELP_STRING([--with-ps2pdf], 10831862f5301Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10832862f5301Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10833862f5301Smrgm4_undefine([_defopt]) 10834ff559fabSmrg 10835862f5301Smrgif test "x$use_ps2pdf" = x"auto"; then 10836862f5301Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10837862f5301Smrg if test "x$PS2PDF" = "x"; then 10838862f5301Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10839862f5301Smrg have_ps2pdf=no 10840862f5301Smrg else 10841862f5301Smrg have_ps2pdf=yes 10842862f5301Smrg fi 10843862f5301Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10844862f5301Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10845862f5301Smrg if test "x$PS2PDF" = "x"; then 10846862f5301Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10847862f5301Smrg fi 10848862f5301Smrg have_ps2pdf=yes 10849862f5301Smrgelif test "x$use_ps2pdf" = x"no" ; then 10850862f5301Smrg if test "x$PS2PDF" != "x"; then 10851862f5301Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10852862f5301Smrg fi 10853862f5301Smrg have_ps2pdf=no 10854862f5301Smrgelse 10855862f5301Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10856862f5301Smrgfi 10857862f5301SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10858862f5301Smrg]) # XORG_WITH_PS2PDF 10859ff559fabSmrg 10860862f5301Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10861862f5301Smrg# ---------------- 10862862f5301Smrg# Minimum version: 1.6.0 10863862f5301Smrg# 10864862f5301Smrg# Documentation tools are not always available on all platforms and sometimes 10865862f5301Smrg# not at the appropriate level. This macro enables a builder to skip all 10866862f5301Smrg# documentation targets except traditional man pages. 10867862f5301Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10868862f5301Smrg# maximum flexibilty in controlling documentation building. 10869862f5301Smrg# Refer to: 10870862f5301Smrg# XORG_WITH_XMLTO --with-xmlto 10871862f5301Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10872862f5301Smrg# XORG_WITH_DOXYGEN --with-doxygen 10873862f5301Smrg# XORG_WITH_FOP --with-fop 10874862f5301Smrg# XORG_WITH_GROFF --with-groff 10875862f5301Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10876862f5301Smrg# 10877862f5301Smrg# Interface to module: 10878862f5301Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10879862f5301Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10880862f5301Smrg# 'no' user instructs the module not to generate docs 10881862f5301Smrg# parm1: specify the default value, yes or no. 10882862f5301Smrg# 10883862f5301SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10884862f5301Smrgm4_define([docs_default], m4_default([$1], [yes])) 10885862f5301SmrgAC_ARG_ENABLE(docs, 10886862f5301Smrg AS_HELP_STRING([--enable-docs], 10887862f5301Smrg [Enable building the documentation (default: ]docs_default[)]), 10888862f5301Smrg [build_docs=$enableval], [build_docs=]docs_default) 10889862f5301Smrgm4_undefine([docs_default]) 10890862f5301SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10891862f5301SmrgAC_MSG_CHECKING([whether to build documentation]) 10892862f5301SmrgAC_MSG_RESULT([$build_docs]) 10893862f5301Smrg]) # XORG_ENABLE_DOCS 10894ff559fabSmrg 10895862f5301Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10896862f5301Smrg# ---------------- 10897862f5301Smrg# Minimum version: 1.6.0 10898862f5301Smrg# 10899862f5301Smrg# This macro enables a builder to skip all developer documentation. 10900862f5301Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10901862f5301Smrg# maximum flexibilty in controlling documentation building. 10902862f5301Smrg# Refer to: 10903862f5301Smrg# XORG_WITH_XMLTO --with-xmlto 10904862f5301Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10905862f5301Smrg# XORG_WITH_DOXYGEN --with-doxygen 10906862f5301Smrg# XORG_WITH_FOP --with-fop 10907862f5301Smrg# XORG_WITH_GROFF --with-groff 10908862f5301Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10909862f5301Smrg# 10910862f5301Smrg# Interface to module: 10911862f5301Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10912862f5301Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10913862f5301Smrg# 'no' user instructs the module not to generate developer docs 10914862f5301Smrg# parm1: specify the default value, yes or no. 10915862f5301Smrg# 10916862f5301SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10917862f5301Smrgm4_define([devel_default], m4_default([$1], [yes])) 10918862f5301SmrgAC_ARG_ENABLE(devel-docs, 10919862f5301Smrg AS_HELP_STRING([--enable-devel-docs], 10920862f5301Smrg [Enable building the developer documentation (default: ]devel_default[)]), 10921862f5301Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10922862f5301Smrgm4_undefine([devel_default]) 10923862f5301SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10924862f5301SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10925862f5301SmrgAC_MSG_RESULT([$build_devel_docs]) 10926862f5301Smrg]) # XORG_ENABLE_DEVEL_DOCS 1092744dda7b2Smrg 10928862f5301Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10929862f5301Smrg# ---------------- 10930862f5301Smrg# Minimum version: 1.6.0 10931862f5301Smrg# 10932862f5301Smrg# This macro enables a builder to skip all functional specification targets. 10933862f5301Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10934862f5301Smrg# maximum flexibilty in controlling documentation building. 10935862f5301Smrg# Refer to: 10936862f5301Smrg# XORG_WITH_XMLTO --with-xmlto 10937862f5301Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10938862f5301Smrg# XORG_WITH_DOXYGEN --with-doxygen 10939862f5301Smrg# XORG_WITH_FOP --with-fop 10940862f5301Smrg# XORG_WITH_GROFF --with-groff 10941862f5301Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10942862f5301Smrg# 10943862f5301Smrg# Interface to module: 10944862f5301Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10945862f5301Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10946862f5301Smrg# 'no' user instructs the module not to generate specs 10947862f5301Smrg# parm1: specify the default value, yes or no. 10948862f5301Smrg# 10949862f5301SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10950862f5301Smrgm4_define([spec_default], m4_default([$1], [yes])) 10951862f5301SmrgAC_ARG_ENABLE(specs, 10952862f5301Smrg AS_HELP_STRING([--enable-specs], 10953862f5301Smrg [Enable building the specs (default: ]spec_default[)]), 10954862f5301Smrg [build_specs=$enableval], [build_specs=]spec_default) 10955862f5301Smrgm4_undefine([spec_default]) 10956862f5301SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10957862f5301SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10958862f5301SmrgAC_MSG_RESULT([$build_specs]) 10959862f5301Smrg]) # XORG_ENABLE_SPECS 109607a3b38f7Smrg 10961862f5301Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10962862f5301Smrg# ---------------------------------------------- 10963862f5301Smrg# Minimum version: 1.13.0 10964862f5301Smrg# 10965862f5301Smrg# This macro enables a builder to enable/disable unit testing 10966862f5301Smrg# It makes no assumption about the test cases implementation 10967862f5301Smrg# Test cases may or may not use Automake "Support for test suites" 10968862f5301Smrg# They may or may not use the software utility library GLib 10969862f5301Smrg# 10970862f5301Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10971862f5301Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10972862f5301Smrg# The variable enable_unit_tests is used by other macros in this file. 10973862f5301Smrg# 10974862f5301Smrg# Interface to module: 10975862f5301Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10976862f5301Smrg# enable_unit_tests: used in configure.ac for additional configuration 10977862f5301Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10978862f5301Smrg# 'no' user instructs the module not to build tests 10979862f5301Smrg# parm1: specify the default value, yes or no. 10980862f5301Smrg# 10981862f5301SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10982862f5301SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10983862f5301SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10984862f5301SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10985862f5301Smrgm4_define([_defopt], m4_default([$1], [auto])) 10986862f5301SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10987862f5301Smrg [Enable building unit test cases (default: ]_defopt[)]), 10988862f5301Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10989862f5301Smrgm4_undefine([_defopt]) 10990862f5301SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10991862f5301SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10992862f5301SmrgAC_MSG_RESULT([$enable_unit_tests]) 10993862f5301Smrg]) # XORG_ENABLE_UNIT_TESTS 109947a3b38f7Smrg 10995fc544a13Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10996fc544a13Smrg# ------------------------------------------------------ 10997fc544a13Smrg# Minimum version: 1.17.0 10998fc544a13Smrg# 10999fc544a13Smrg# This macro enables a builder to enable/disable integration testing 11000fc544a13Smrg# It makes no assumption about the test cases' implementation 11001fc544a13Smrg# Test cases may or may not use Automake "Support for test suites" 11002fc544a13Smrg# 11003fc544a13Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 11004fc544a13Smrg# usually requires less dependencies and may be built and run under less 11005fc544a13Smrg# stringent environments than integration tests. 11006fc544a13Smrg# 11007fc544a13Smrg# Interface to module: 11008fc544a13Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 11009fc544a13Smrg# enable_integration_tests: used in configure.ac for additional configuration 11010fc544a13Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 11011fc544a13Smrg# 'no' user instructs the module not to build tests 11012fc544a13Smrg# parm1: specify the default value, yes or no. 11013fc544a13Smrg# 11014fc544a13SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 11015fc544a13SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 11016fc544a13Smrgm4_define([_defopt], m4_default([$1], [auto])) 11017fc544a13SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 11018fc544a13Smrg [Enable building integration test cases (default: ]_defopt[)]), 11019fc544a13Smrg [enable_integration_tests=$enableval], 11020fc544a13Smrg [enable_integration_tests=]_defopt) 11021fc544a13Smrgm4_undefine([_defopt]) 11022fc544a13SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 11023fc544a13Smrg [test "x$enable_integration_tests" != xno]) 11024fc544a13SmrgAC_MSG_CHECKING([whether to build unit test cases]) 11025fc544a13SmrgAC_MSG_RESULT([$enable_integration_tests]) 11026fc544a13Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 11027fc544a13Smrg 11028862f5301Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 11029862f5301Smrg# ---------------------------------------- 11030862f5301Smrg# Minimum version: 1.13.0 11031862f5301Smrg# 11032862f5301Smrg# GLib is a library which provides advanced data structures and functions. 11033862f5301Smrg# This macro enables a module to test for the presence of Glib. 11034862f5301Smrg# 11035862f5301Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 11036862f5301Smrg# Otherwise the value of $enable_unit_tests is blank. 11037862f5301Smrg# 11038fc544a13Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 11039fc544a13Smrg# test support usually requires less dependencies and may be built and run under 11040fc544a13Smrg# less stringent environments than integration tests. 11041fc544a13Smrg# 11042862f5301Smrg# Interface to module: 11043862f5301Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 11044862f5301Smrg# with_glib: used in configure.ac to know if GLib has been found 11045862f5301Smrg# --with-glib: 'yes' user instructs the module to use glib 11046862f5301Smrg# 'no' user instructs the module not to use glib 11047862f5301Smrg# 11048862f5301SmrgAC_DEFUN([XORG_WITH_GLIB],[ 11049862f5301SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11050862f5301Smrgm4_define([_defopt], m4_default([$2], [auto])) 11051862f5301SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 11052862f5301Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 11053862f5301Smrg [with_glib=$withval], [with_glib=]_defopt) 11054862f5301Smrgm4_undefine([_defopt]) 11055ff559fabSmrg 11056862f5301Smrghave_glib=no 11057862f5301Smrg# Do not probe GLib if user explicitly disabled unit testing 11058862f5301Smrgif test "x$enable_unit_tests" != x"no"; then 11059862f5301Smrg # Do not probe GLib if user explicitly disabled it 11060862f5301Smrg if test "x$with_glib" != x"no"; then 11061862f5301Smrg m4_ifval( 11062862f5301Smrg [$1], 11063862f5301Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 11064862f5301Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 11065862f5301Smrg ) 11066862f5301Smrg fi 11067862f5301Smrgfi 11068ff559fabSmrg 11069862f5301Smrg# Not having GLib when unit testing has been explicitly requested is an error 11070862f5301Smrgif test "x$enable_unit_tests" = x"yes"; then 11071862f5301Smrg if test "x$have_glib" = x"no"; then 11072862f5301Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11073862f5301Smrg fi 11074862f5301Smrgfi 11075ff559fabSmrg 11076862f5301Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 11077862f5301Smrgif test "x$enable_unit_tests" = x"no"; then 11078862f5301Smrg if test "x$with_glib" = x"yes"; then 11079862f5301Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11080862f5301Smrg fi 11081862f5301Smrgfi 11082ff559fabSmrg 11083862f5301Smrg# Not having GLib when it has been explicitly requested is an error 11084862f5301Smrgif test "x$with_glib" = x"yes"; then 11085862f5301Smrg if test "x$have_glib" = x"no"; then 11086862f5301Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 11087862f5301Smrg fi 11088862f5301Smrgfi 11089ff559fabSmrg 11090862f5301SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 11091862f5301Smrg]) # XORG_WITH_GLIB 11092ff559fabSmrg 11093862f5301Smrg# XORG_LD_WRAP([required|optional]) 11094862f5301Smrg# --------------------------------- 11095862f5301Smrg# Minimum version: 1.13.0 11096862f5301Smrg# 11097862f5301Smrg# Check if linker supports -wrap, passed via compiler flags 11098862f5301Smrg# 11099862f5301Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 11100862f5301Smrg# Otherwise the value of $enable_unit_tests is blank. 11101862f5301Smrg# 11102862f5301Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 11103862f5301Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 11104862f5301Smrg# available, an argument of "optional" allows use when some unit tests require 11105862f5301Smrg# ld -wrap and others do not. 11106862f5301Smrg# 11107862f5301SmrgAC_DEFUN([XORG_LD_WRAP],[ 11108862f5301SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 11109862f5301Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 11110862f5301Smrg void __wrap_exit(int status) { return; }], 11111862f5301Smrg [exit(0);])]) 11112862f5301Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 11113862f5301Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 11114862f5301Smrg if test "x$have_ld_wrap" = x"no"; then 11115862f5301Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 11116862f5301Smrg fi 11117862f5301Smrgfi 11118862f5301SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 11119862f5301Smrg# 11120862f5301Smrg]) # XORG_LD_WRAP 11121ff559fabSmrg 11122862f5301Smrg# XORG_CHECK_LINKER_FLAGS 11123862f5301Smrg# ----------------------- 11124862f5301Smrg# SYNOPSIS 11125862f5301Smrg# 11126862f5301Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 11127862f5301Smrg# 11128862f5301Smrg# DESCRIPTION 11129862f5301Smrg# 11130862f5301Smrg# Check whether the given linker FLAGS work with the current language's 11131862f5301Smrg# linker, or whether they give an error. 11132862f5301Smrg# 11133862f5301Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 11134862f5301Smrg# success/failure. 11135862f5301Smrg# 11136862f5301Smrg# PROGRAM-SOURCE is the program source to link with, if needed 11137862f5301Smrg# 11138862f5301Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 11139862f5301Smrg# 11140862f5301Smrg# LICENSE 11141862f5301Smrg# 11142862f5301Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 11143862f5301Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 11144862f5301Smrg# Copyright (c) 2009 Matteo Frigo 11145862f5301Smrg# 11146862f5301Smrg# This program is free software: you can redistribute it and/or modify it 11147862f5301Smrg# under the terms of the GNU General Public License as published by the 11148862f5301Smrg# Free Software Foundation, either version 3 of the License, or (at your 11149862f5301Smrg# option) any later version. 11150862f5301Smrg# 11151862f5301Smrg# This program is distributed in the hope that it will be useful, but 11152862f5301Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 11153862f5301Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11154862f5301Smrg# Public License for more details. 11155862f5301Smrg# 11156862f5301Smrg# You should have received a copy of the GNU General Public License along 11157862f5301Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 11158862f5301Smrg# 11159862f5301Smrg# As a special exception, the respective Autoconf Macro's copyright owner 11160862f5301Smrg# gives unlimited permission to copy, distribute and modify the configure 11161862f5301Smrg# scripts that are the output of Autoconf when processing the Macro. You 11162862f5301Smrg# need not follow the terms of the GNU General Public License when using 11163862f5301Smrg# or distributing such scripts, even though portions of the text of the 11164862f5301Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 11165862f5301Smrg# all other use of the material that constitutes the Autoconf Macro. 11166862f5301Smrg# 11167862f5301Smrg# This special exception to the GPL applies to versions of the Autoconf 11168862f5301Smrg# Macro released by the Autoconf Archive. When you make and distribute a 11169862f5301Smrg# modified version of the Autoconf Macro, you may extend this special 11170862f5301Smrg# exception to the GPL to apply to your modified version as well.# 11171862f5301SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11172862f5301Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 11173862f5301Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11174862f5301SmrgAS_LITERAL_IF([$1], 11175862f5301Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11176862f5301Smrg ax_save_FLAGS=$LDFLAGS 11177862f5301Smrg LDFLAGS="$1" 11178862f5301Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11179862f5301Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11180862f5301Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11181862f5301Smrg LDFLAGS=$ax_save_FLAGS])], 11182862f5301Smrg [ax_save_FLAGS=$LDFLAGS 11183862f5301Smrg LDFLAGS="$1" 11184862f5301Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11185862f5301Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11186862f5301Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11187862f5301Smrg LDFLAGS=$ax_save_FLAGS]) 11188862f5301Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11189862f5301SmrgAC_MSG_RESULT($xorg_check_linker_flags) 11190862f5301Smrgif test "x$xorg_check_linker_flags" = xyes; then 11191862f5301Smrg m4_default([$2], :) 11192862f5301Smrgelse 11193862f5301Smrg m4_default([$3], :) 11194862f5301Smrgfi 11195862f5301Smrg]) # XORG_CHECK_LINKER_FLAGS 11196ff559fabSmrg 11197862f5301Smrg# XORG_MEMORY_CHECK_FLAGS 11198862f5301Smrg# ----------------------- 11199862f5301Smrg# Minimum version: 1.16.0 11200862f5301Smrg# 11201862f5301Smrg# This macro attempts to find appropriate memory checking functionality 11202862f5301Smrg# for various platforms which unit testing code may use to catch various 11203862f5301Smrg# forms of memory allocation and access errors in testing. 11204862f5301Smrg# 11205862f5301Smrg# Interface to module: 11206862f5301Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11207862f5301Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 11208862f5301Smrg# 11209862f5301Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11210862f5301Smrg# 11211862f5301SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11212ff559fabSmrg 11213862f5301SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 11214862f5301SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11215862f5301Smrg [Environment variables to enable memory checking in tests]) 11216ff559fabSmrg 11217862f5301Smrg# Check for different types of support on different platforms 11218862f5301Smrgcase $host_os in 11219862f5301Smrg solaris*) 11220862f5301Smrg AC_CHECK_LIB([umem], [umem_alloc], 11221862f5301Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11222862f5301Smrg ;; 11223862f5301Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11224862f5301Smrg # both directly and inverted, so should not be 0 or 255. 11225862f5301Smrg malloc_debug_env='MALLOC_PERTURB_=15' 11226862f5301Smrg ;; 11227862f5301Smrg darwin*) 11228862f5301Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11229862f5301Smrg ;; 11230862f5301Smrg *bsd*) 11231862f5301Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11232862f5301Smrg ;; 11233862f5301Smrgesac 11234ff559fabSmrg 11235862f5301Smrg# User supplied flags override default flags 11236862f5301Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11237862f5301Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11238862f5301Smrgfi 11239ff559fabSmrg 11240862f5301SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11241862f5301Smrg]) # XORG_WITH_LINT 11242ff559fabSmrg 11243862f5301Smrg# XORG_CHECK_MALLOC_ZERO 11244862f5301Smrg# ---------------------- 11245862f5301Smrg# Minimum version: 1.0.0 1124644dda7b2Smrg# 11247862f5301Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11248862f5301Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 11249862f5301Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11250862f5301SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11251862f5301SmrgAC_ARG_ENABLE(malloc0returnsnull, 11252862f5301Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 11253862f5301Smrg [malloc(0) returns NULL (default: auto)]), 11254862f5301Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 11255862f5301Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 112567a3b38f7Smrg 11257862f5301SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 11258862f5301Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11259fc544a13SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 11260fc544a13Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11261862f5301Smrg#include <stdlib.h> 11262862f5301Smrg],[ 11263862f5301Smrg char *m0, *r0, *c0, *p; 11264862f5301Smrg m0 = malloc(0); 11265862f5301Smrg p = malloc(10); 11266862f5301Smrg r0 = realloc(p,0); 11267862f5301Smrg c0 = calloc(0,10); 11268862f5301Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11269862f5301Smrg])], 11270fc544a13Smrg [xorg_cv_malloc0_returns_null=yes], 11271fc544a13Smrg [xorg_cv_malloc0_returns_null=no])]) 11272fc544a13SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 11273862f5301Smrgfi 11274862f5301SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 112757a3b38f7Smrg 11276862f5301Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11277862f5301Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11278862f5301Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11279862f5301Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11280862f5301Smrgelse 11281862f5301Smrg MALLOC_ZERO_CFLAGS="" 11282862f5301Smrg XMALLOC_ZERO_CFLAGS="" 11283862f5301Smrg XTMALLOC_ZERO_CFLAGS="" 11284862f5301Smrgfi 11285ff559fabSmrg 11286862f5301SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 11287862f5301SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 11288862f5301SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11289862f5301Smrg]) # XORG_CHECK_MALLOC_ZERO 11290ff559fabSmrg 11291862f5301Smrg# XORG_WITH_LINT() 11292862f5301Smrg# ---------------- 11293862f5301Smrg# Minimum version: 1.1.0 11294862f5301Smrg# 11295862f5301Smrg# This macro enables the use of a tool that flags some suspicious and 11296862f5301Smrg# non-portable constructs (likely to be bugs) in C language source code. 11297862f5301Smrg# It will attempt to locate the tool and use appropriate options. 11298862f5301Smrg# There are various lint type tools on different platforms. 11299862f5301Smrg# 11300862f5301Smrg# Interface to module: 11301862f5301Smrg# LINT: returns the path to the tool found on the platform 11302862f5301Smrg# or the value set to LINT on the configure cmd line 11303862f5301Smrg# also an Automake conditional 11304862f5301Smrg# LINT_FLAGS: an Automake variable with appropriate flags 11305862f5301Smrg# 11306862f5301Smrg# --with-lint: 'yes' user instructs the module to use lint 11307862f5301Smrg# 'no' user instructs the module not to use lint (default) 11308862f5301Smrg# 11309862f5301Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11310862f5301Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 11311862f5301Smrg# 11312862f5301SmrgAC_DEFUN([XORG_WITH_LINT],[ 113137a3b38f7Smrg 11314862f5301SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 11315862f5301SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11316862f5301SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11317862f5301Smrg [Use a lint-style source code checker (default: disabled)])], 11318862f5301Smrg [use_lint=$withval], [use_lint=no]) 113197a3b38f7Smrg 11320862f5301Smrg# Obtain platform specific info like program name and options 11321862f5301Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11322862f5301Smrgcase $host_os in 11323862f5301Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11324862f5301Smrg lint_name=splint 11325862f5301Smrg lint_options="-badflag" 11326862f5301Smrg ;; 11327862f5301Smrg *freebsd* | *netbsd*) 11328862f5301Smrg lint_name=lint 11329862f5301Smrg lint_options="-u -b" 11330862f5301Smrg ;; 11331862f5301Smrg *solaris*) 11332862f5301Smrg lint_name=lint 11333862f5301Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11334862f5301Smrg ;; 11335862f5301Smrgesac 113367a3b38f7Smrg 11337862f5301Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 11338862f5301Smrgif test "x$use_lint" = x"yes" ; then 11339862f5301Smrg AC_PATH_PROG([LINT], [$lint_name]) 11340862f5301Smrg if test "x$LINT" = "x"; then 11341862f5301Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11342862f5301Smrg fi 11343862f5301Smrgelif test "x$use_lint" = x"no" ; then 11344862f5301Smrg if test "x$LINT" != "x"; then 11345862f5301Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11346862f5301Smrg fi 11347862f5301Smrgelse 11348862f5301Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11349862f5301Smrgfi 113507a3b38f7Smrg 11351862f5301Smrg# User supplied flags override default flags 11352862f5301Smrgif test "x$LINT_FLAGS" != "x"; then 11353862f5301Smrg lint_options=$LINT_FLAGS 11354862f5301Smrgfi 11355ff559fabSmrg 11356862f5301SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 11357862f5301SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11358ff559fabSmrg 11359862f5301Smrg]) # XORG_WITH_LINT 11360ff559fabSmrg 11361862f5301Smrg# XORG_LINT_LIBRARY(LIBNAME) 11362862f5301Smrg# -------------------------- 11363862f5301Smrg# Minimum version: 1.1.0 11364862f5301Smrg# 11365862f5301Smrg# Sets up flags for building lint libraries for checking programs that call 11366862f5301Smrg# functions in the library. 11367862f5301Smrg# 11368862f5301Smrg# Interface to module: 11369862f5301Smrg# LINTLIB - Automake variable with the name of lint library file to make 11370862f5301Smrg# MAKE_LINT_LIB - Automake conditional 11371862f5301Smrg# 11372862f5301Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11373862f5301Smrg# - 'no' user instructs the module not to create a lint library (default) 113747a3b38f7Smrg 11375862f5301SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 11376862f5301SmrgAC_REQUIRE([XORG_WITH_LINT]) 11377862f5301SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11378862f5301Smrg [Create lint library (default: disabled)])], 11379862f5301Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 113807a3b38f7Smrg 11381862f5301Smrgif test "x$make_lint_lib" = x"yes" ; then 11382862f5301Smrg LINTLIB=llib-l$1.ln 11383862f5301Smrg if test "x$LINT" = "x"; then 11384862f5301Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11385862f5301Smrg fi 11386862f5301Smrgelif test "x$make_lint_lib" != x"no" ; then 11387862f5301Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11388862f5301Smrgfi 1138944dda7b2Smrg 11390862f5301SmrgAC_SUBST(LINTLIB) 11391862f5301SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1139244dda7b2Smrg 11393862f5301Smrg]) # XORG_LINT_LIBRARY 11394862f5301Smrg 11395862f5301Smrg# XORG_COMPILER_BRAND 11396862f5301Smrg# ------------------- 11397862f5301Smrg# Minimum version: 1.14.0 11398862f5301Smrg# 11399862f5301Smrg# Checks for various brands of compilers and sets flags as appropriate: 11400862f5301Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11401862f5301Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11402862f5301Smrg# clang compiler - sets CLANGCC to "yes" 11403862f5301Smrg# Intel compiler - sets INTELCC to "yes" 11404862f5301Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11405862f5301Smrg# 11406862f5301SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 11407862f5301SmrgAC_LANG_CASE( 11408862f5301Smrg [C], [ 11409862f5301Smrg AC_REQUIRE([AC_PROG_CC_C99]) 11410862f5301Smrg ], 11411862f5301Smrg [C++], [ 11412862f5301Smrg AC_REQUIRE([AC_PROG_CXX]) 11413862f5301Smrg ] 11414862f5301Smrg) 11415862f5301SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11416862f5301SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11417862f5301SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11418862f5301Smrg]) # XORG_COMPILER_BRAND 1141944dda7b2Smrg 11420862f5301Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11421862f5301Smrg# --------------- 11422862f5301Smrg# Minimum version: 1.16.0 11423862f5301Smrg# 11424862f5301Smrg# Test if the compiler works when passed the given flag as a command line argument. 11425862f5301Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 11426862f5301Smrg# next flag in the list until there are no more options. 11427862f5301Smrg# 11428862f5301Smrg# Note that this does not guarantee that the compiler supports the flag as some 11429862f5301Smrg# compilers will simply ignore arguments that they do not understand, but we do 11430862f5301Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 11431862f5301Smrg# -Werror=unused-command-line-argument 11432862f5301Smrg# 11433862f5301SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 11434862f5301Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11435862f5301Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11436862f5301Smrg 11437862f5301SmrgAC_LANG_COMPILER_REQUIRE 11438862f5301Smrg 11439862f5301SmrgAC_LANG_CASE( 11440862f5301Smrg [C], [ 11441862f5301Smrg AC_REQUIRE([AC_PROG_CC_C99]) 11442862f5301Smrg define([PREFIX], [C]) 11443fc544a13Smrg define([CACHE_PREFIX], [cc]) 11444fc544a13Smrg define([COMPILER], [$CC]) 11445862f5301Smrg ], 11446862f5301Smrg [C++], [ 11447862f5301Smrg define([PREFIX], [CXX]) 11448fc544a13Smrg define([CACHE_PREFIX], [cxx]) 11449fc544a13Smrg define([COMPILER], [$CXX]) 11450862f5301Smrg ] 11451862f5301Smrg) 114527a3b38f7Smrg 11453862f5301Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 11454862f5301Smrg 11455fc544a13Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11456862f5301Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11457fc544a13Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11458fc544a13Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 11459862f5301Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11460fc544a13Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11461fc544a13Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11462fc544a13Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11463862f5301Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11464862f5301Smrgfi 114657a3b38f7Smrg 11466fc544a13Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11467fc544a13Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11468862f5301Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11469862f5301Smrg fi 11470862f5301Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11471fc544a13Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11472fc544a13Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 11473862f5301Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11474fc544a13Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11475fc544a13Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11476fc544a13Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11477862f5301Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11478862f5301Smrgfi 114797a3b38f7Smrg 11480862f5301Smrgfound="no" 11481862f5301Smrgm4_foreach([flag], m4_cdr($@), [ 11482862f5301Smrg if test $found = "no" ; then 11483fc544a13Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11484862f5301Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11485862f5301Smrg fi 11486862f5301Smrg 11487fc544a13Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11488862f5301Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11489862f5301Smrg fi 11490862f5301Smrg 11491862f5301Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 11492862f5301Smrg 11493862f5301Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11494fc544a13Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11495fc544a13Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11496fc544a13Smrg AC_CACHE_VAL($cacheid, 11497862f5301Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11498fc544a13Smrg [eval $cacheid=yes], 11499fc544a13Smrg [eval $cacheid=no])]) 11500862f5301Smrg 11501862f5301Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11502862f5301Smrg 11503fc544a13Smrg eval supported=\$$cacheid 11504862f5301Smrg AC_MSG_RESULT([$supported]) 11505862f5301Smrg if test "$supported" = "yes" ; then 11506862f5301Smrg $1="$$1 ]flag[" 11507862f5301Smrg found="yes" 11508862f5301Smrg fi 11509862f5301Smrg fi 11510862f5301Smrg]) 11511862f5301Smrg]) # XORG_TESTSET_CFLAG 11512ff559fabSmrg 11513862f5301Smrg# XORG_COMPILER_FLAGS 11514862f5301Smrg# --------------- 11515862f5301Smrg# Minimum version: 1.16.0 11516862f5301Smrg# 11517862f5301Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11518862f5301Smrg# arguments supported by the selected compiler which do NOT alter the generated 11519862f5301Smrg# code. These arguments will cause the compiler to print various warnings 11520862f5301Smrg# during compilation AND turn a conservative set of warnings into errors. 11521862f5301Smrg# 11522862f5301Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11523862f5301Smrg# future versions of util-macros as options are added to new compilers. 11524862f5301Smrg# 11525862f5301SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 11526862f5301SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11527862f5301Smrg 11528862f5301SmrgAC_ARG_ENABLE(selective-werror, 11529862f5301Smrg AS_HELP_STRING([--disable-selective-werror], 11530862f5301Smrg [Turn off selective compiler errors. (default: enabled)]), 11531862f5301Smrg [SELECTIVE_WERROR=$enableval], 11532862f5301Smrg [SELECTIVE_WERROR=yes]) 11533862f5301Smrg 11534862f5301SmrgAC_LANG_CASE( 11535862f5301Smrg [C], [ 11536862f5301Smrg define([PREFIX], [C]) 11537862f5301Smrg ], 11538862f5301Smrg [C++], [ 11539862f5301Smrg define([PREFIX], [CXX]) 11540862f5301Smrg ] 11541862f5301Smrg) 11542862f5301Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 11543862f5301Smrgif test "x$SUNCC" = "xyes"; then 11544862f5301Smrg [BASE_]PREFIX[FLAGS]="-v" 11545862f5301Smrgelse 11546862f5301Smrg [BASE_]PREFIX[FLAGS]="" 11547862f5301Smrgfi 11548ff559fabSmrg 11549862f5301Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11550862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11551862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11552862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11553862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11554862f5301Smrg 11555862f5301SmrgAC_LANG_CASE( 11556862f5301Smrg [C], [ 11557862f5301Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11558862f5301Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11559862f5301Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11560862f5301Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11561fc544a13Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11562862f5301Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11563862f5301Smrg ] 11564862f5301Smrg) 11565ff559fabSmrg 11566862f5301Smrg# This chunk adds additional warnings that could catch undesired effects. 11567862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11568862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11569862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11570862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11571862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11572862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11573fc544a13SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11574862f5301Smrg 11575862f5301Smrg# These are currently disabled because they are noisy. They will be enabled 11576862f5301Smrg# in the future once the codebase is sufficiently modernized to silence 11577862f5301Smrg# them. For now, I don't want them to drown out the other warnings. 11578862f5301Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11579862f5301Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11580fc544a13Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11581862f5301Smrg 11582862f5301Smrg# Turn some warnings into errors, so we don't accidently get successful builds 11583862f5301Smrg# when there are problems that should be fixed. 11584862f5301Smrg 11585862f5301Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 11586862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11587862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11588862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11589862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11590862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11591862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11592862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11593862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11594862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11595862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11596862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11597862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11598862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11599862f5301Smrgelse 11600862f5301SmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 11601862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11602862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11603862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11604862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11605862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11606862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11607862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11608862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11609862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11610862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11611862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11612862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11613862f5301SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11614862f5301Smrgfi 1161544dda7b2Smrg 11616862f5301SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11617862f5301Smrg]) # XORG_COMPILER_FLAGS 1161844dda7b2Smrg 11619862f5301Smrg# XORG_CWARNFLAGS 11620862f5301Smrg# --------------- 11621862f5301Smrg# Minimum version: 1.2.0 11622862f5301Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 116237a3b38f7Smrg# 11624862f5301Smrg# Defines CWARNFLAGS to enable C compiler warnings. 116257a3b38f7Smrg# 11626862f5301Smrg# This function is deprecated because it defines -fno-strict-aliasing 11627862f5301Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 11628862f5301Smrg# is needed, then it should be added explicitly in the module when 11629862f5301Smrg# it is updated to use BASE_CFLAGS. 11630862f5301Smrg# 11631862f5301SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 11632862f5301SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11633862f5301SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11634862f5301SmrgAC_LANG_CASE( 11635862f5301Smrg [C], [ 11636862f5301Smrg CWARNFLAGS="$BASE_CFLAGS" 11637862f5301Smrg if test "x$GCC" = xyes ; then 11638862f5301Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11639862f5301Smrg fi 11640862f5301Smrg AC_SUBST(CWARNFLAGS) 11641862f5301Smrg ] 11642862f5301Smrg) 11643862f5301Smrg]) # XORG_CWARNFLAGS 11644ff559fabSmrg 11645862f5301Smrg# XORG_STRICT_OPTION 11646862f5301Smrg# ----------------------- 11647862f5301Smrg# Minimum version: 1.3.0 11648862f5301Smrg# 11649862f5301Smrg# Add configure option to enable strict compilation flags, such as treating 11650862f5301Smrg# warnings as fatal errors. 11651862f5301Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11652862f5301Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11653862f5301Smrg# 11654862f5301Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11655862f5301Smrg# when strict compilation is unconditionally desired. 11656862f5301SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11657862f5301SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 11658862f5301SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 116597a3b38f7Smrg 11660862f5301SmrgAC_ARG_ENABLE(strict-compilation, 11661862f5301Smrg AS_HELP_STRING([--enable-strict-compilation], 11662862f5301Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11663862f5301Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11664ff559fabSmrg 11665862f5301SmrgAC_LANG_CASE( 11666862f5301Smrg [C], [ 11667862f5301Smrg define([PREFIX], [C]) 11668862f5301Smrg ], 11669862f5301Smrg [C++], [ 11670862f5301Smrg define([PREFIX], [CXX]) 11671862f5301Smrg ] 11672862f5301Smrg) 1167344dda7b2Smrg 11674862f5301Smrg[STRICT_]PREFIX[FLAGS]="" 11675862f5301SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11676862f5301SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1167744dda7b2Smrg 11678862f5301Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11679862f5301Smrg# activate it with -Werror, so we add it here explicitly. 11680862f5301SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11681ff559fabSmrg 11682862f5301Smrgif test "x$STRICT_COMPILE" = "xyes"; then 11683862f5301Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11684862f5301Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11685862f5301Smrgfi 11686862f5301SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11687862f5301SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11688862f5301SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11689862f5301Smrg]) # XORG_STRICT_OPTION 11690ff559fabSmrg 11691862f5301Smrg# XORG_DEFAULT_OPTIONS 11692862f5301Smrg# -------------------- 11693862f5301Smrg# Minimum version: 1.3.0 116947a3b38f7Smrg# 11695862f5301Smrg# Defines default options for X.Org modules. 116967a3b38f7Smrg# 11697862f5301SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11698862f5301SmrgAC_REQUIRE([AC_PROG_INSTALL]) 11699862f5301SmrgXORG_COMPILER_FLAGS 11700862f5301SmrgXORG_CWARNFLAGS 11701862f5301SmrgXORG_STRICT_OPTION 11702862f5301SmrgXORG_RELEASE_VERSION 11703862f5301SmrgXORG_CHANGELOG 11704862f5301SmrgXORG_INSTALL 11705862f5301SmrgXORG_MANPAGE_SECTIONS 11706862f5301Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11707862f5301Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11708862f5301Smrg]) # XORG_DEFAULT_OPTIONS 11709862f5301Smrg 11710862f5301Smrg# XORG_INSTALL() 11711862f5301Smrg# ---------------- 11712862f5301Smrg# Minimum version: 1.4.0 117137a3b38f7Smrg# 11714862f5301Smrg# Defines the variable INSTALL_CMD as the command to copy 11715862f5301Smrg# INSTALL from $prefix/share/util-macros. 1171644dda7b2Smrg# 11717862f5301SmrgAC_DEFUN([XORG_INSTALL], [ 11718862f5301SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11719862f5301Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11720862f5301SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11721862f5301Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11722862f5301Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11723862f5301Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11724862f5301SmrgAC_SUBST([INSTALL_CMD]) 11725862f5301Smrg]) # XORG_INSTALL 11726862f5301Smrgdnl Copyright 2005 Red Hat, Inc 11727862f5301Smrgdnl 11728862f5301Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11729862f5301Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11730862f5301Smrgdnl the above copyright notice appear in all copies and that both that 11731862f5301Smrgdnl copyright notice and this permission notice appear in supporting 11732862f5301Smrgdnl documentation. 11733862f5301Smrgdnl 11734862f5301Smrgdnl The above copyright notice and this permission notice shall be included 11735862f5301Smrgdnl in all copies or substantial portions of the Software. 11736862f5301Smrgdnl 11737862f5301Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11738862f5301Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11739862f5301Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11740862f5301Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11741862f5301Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11742862f5301Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11743862f5301Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11744862f5301Smrgdnl 11745862f5301Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11746862f5301Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11747862f5301Smrgdnl other dealings in this Software without prior written authorization 11748862f5301Smrgdnl from the copyright holders. 11749862f5301Smrgdnl 1175044dda7b2Smrg 11751862f5301Smrg# XORG_RELEASE_VERSION 11752862f5301Smrg# -------------------- 11753862f5301Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11754fc544a13Smrg 11755862f5301SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11756862f5301Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11757862f5301Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11758862f5301Smrg [Major version of this package]) 11759862f5301Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11760862f5301Smrg if test "x$PVM" = "x"; then 11761862f5301Smrg PVM="0" 11762862f5301Smrg fi 11763862f5301Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11764862f5301Smrg [$PVM], 11765862f5301Smrg [Minor version of this package]) 11766862f5301Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11767862f5301Smrg if test "x$PVP" = "x"; then 11768862f5301Smrg PVP="0" 11769862f5301Smrg fi 11770862f5301Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11771862f5301Smrg [$PVP], 11772862f5301Smrg [Patch version of this package]) 11773862f5301Smrg]) 1177444dda7b2Smrg 11775862f5301Smrg# XORG_CHANGELOG() 11776862f5301Smrg# ---------------- 11777862f5301Smrg# Minimum version: 1.2.0 11778862f5301Smrg# 11779862f5301Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11780862f5301Smrg# ChangeLog from git. 11781862f5301Smrg# 11782862f5301Smrg# 11783862f5301SmrgAC_DEFUN([XORG_CHANGELOG], [ 11784862f5301SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11785862f5301Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11786862f5301Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11787862f5301Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11788862f5301SmrgAC_SUBST([CHANGELOG_CMD]) 11789862f5301Smrg]) # XORG_CHANGELOG 11790ff559fabSmrg 11791