aclocal.m4 revision 42941e3b
1356f6debSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 26f03b1f6Smrg 36f03b1f6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 498af18c5Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 56f03b1f6Smrg# This file is free software; the Free Software Foundation 66f03b1f6Smrg# gives unlimited permission to copy and/or distribute it, 76f03b1f6Smrg# with or without modifications, as long as this notice is preserved. 86f03b1f6Smrg 96f03b1f6Smrg# This program is distributed in the hope that it will be useful, 106f03b1f6Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 116f03b1f6Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 126f03b1f6Smrg# PARTICULAR PURPOSE. 136f03b1f6Smrg 1498af18c5Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1598af18c5Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1642941e3bSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 1742941e3bSmrg[m4_warning([this file was generated for autoconf 2.68. 1898af18c5SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1998af18c5SmrgIf you have problems, you may need to regenerate the build system entirely. 2098af18c5SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 216f03b1f6Smrg 2298af18c5Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2398af18c5Smrg# 2498af18c5Smrg# This file is free software; the Free Software Foundation 2598af18c5Smrg# gives unlimited permission to copy and/or distribute it, 2698af18c5Smrg# with or without modifications, as long as this notice is preserved. 276f03b1f6Smrg 2898af18c5Smrg# AM_AUTOMAKE_VERSION(VERSION) 2998af18c5Smrg# ---------------------------- 3098af18c5Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3198af18c5Smrg# generated from the m4 files accompanying Automake X.Y. 3298af18c5Smrg# (This private macro should not be called outside this file.) 3398af18c5SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3498af18c5Smrg[am__api_version='1.11' 3598af18c5Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3698af18c5Smrgdnl require some minimum version. Point them to the right macro. 37356f6debSmrgm4_if([$1], [1.11.1], [], 3898af18c5Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 3998af18c5Smrg]) 406f03b1f6Smrg 4198af18c5Smrg# _AM_AUTOCONF_VERSION(VERSION) 4298af18c5Smrg# ----------------------------- 4398af18c5Smrg# aclocal traces this macro to find the Autoconf version. 4498af18c5Smrg# This is a private macro too. Using m4_define simplifies 4598af18c5Smrg# the logic in aclocal, which can simply ignore this definition. 4698af18c5Smrgm4_define([_AM_AUTOCONF_VERSION], []) 476f03b1f6Smrg 4898af18c5Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 4998af18c5Smrg# ------------------------------- 5098af18c5Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5198af18c5Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5298af18c5SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53356f6debSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 5498af18c5Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5598af18c5Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5698af18c5Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 576f03b1f6Smrg 5898af18c5Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 596f03b1f6Smrg 6098af18c5Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6198af18c5Smrg# 6298af18c5Smrg# This file is free software; the Free Software Foundation 6398af18c5Smrg# gives unlimited permission to copy and/or distribute it, 6498af18c5Smrg# with or without modifications, as long as this notice is preserved. 656f03b1f6Smrg 6698af18c5Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6798af18c5Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6898af18c5Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6998af18c5Smrg# 7098af18c5Smrg# Of course, Automake must honor this variable whenever it calls a 7198af18c5Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7298af18c5Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7398af18c5Smrg# depending on how configure is run. This is pretty annoying, since 7498af18c5Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7598af18c5Smrg# source directory, any form will work fine, but in subdirectories a 7698af18c5Smrg# relative path needs to be adjusted first. 7798af18c5Smrg# 7898af18c5Smrg# $ac_aux_dir/missing 7998af18c5Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8098af18c5Smrg# $top_srcdir/$ac_aux_dir/missing 8198af18c5Smrg# fails if $ac_aux_dir is absolute, 8298af18c5Smrg# fails when called from a subdirectory in a VPATH build with 8398af18c5Smrg# a relative $ac_aux_dir 8498af18c5Smrg# 8598af18c5Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8698af18c5Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8798af18c5Smrg# harmless because $srcdir is `.', but things will broke when you 8898af18c5Smrg# start a VPATH build or use an absolute $srcdir. 8998af18c5Smrg# 9098af18c5Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9198af18c5Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9298af18c5Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9398af18c5Smrg# and then we would define $MISSING as 9498af18c5Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9598af18c5Smrg# This will work as long as MISSING is not called from configure, because 9698af18c5Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9798af18c5Smrg# However there are other variables, like CC, which are often used in 9898af18c5Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 9998af18c5Smrg# 10098af18c5Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10198af18c5Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10298af18c5Smrg# configured tree to be moved without reconfiguration. 1036f03b1f6Smrg 10498af18c5SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10598af18c5Smrg[dnl Rely on autoconf to set up CDPATH properly. 10698af18c5SmrgAC_PREREQ([2.50])dnl 10798af18c5Smrg# expand $ac_aux_dir to an absolute path 10898af18c5Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 10998af18c5Smrg]) 1106f03b1f6Smrg 11198af18c5Smrg# AM_CONDITIONAL -*- Autoconf -*- 1126f03b1f6Smrg 11398af18c5Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 11498af18c5Smrg# Free Software Foundation, Inc. 11598af18c5Smrg# 11698af18c5Smrg# This file is free software; the Free Software Foundation 11798af18c5Smrg# gives unlimited permission to copy and/or distribute it, 11898af18c5Smrg# with or without modifications, as long as this notice is preserved. 1196f03b1f6Smrg 12098af18c5Smrg# serial 9 1216f03b1f6Smrg 12298af18c5Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12398af18c5Smrg# ------------------------------------- 12498af18c5Smrg# Define a conditional. 12598af18c5SmrgAC_DEFUN([AM_CONDITIONAL], 12698af18c5Smrg[AC_PREREQ(2.52)dnl 12798af18c5Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12898af18c5Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12998af18c5SmrgAC_SUBST([$1_TRUE])dnl 13098af18c5SmrgAC_SUBST([$1_FALSE])dnl 13198af18c5Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13298af18c5Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13398af18c5Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13498af18c5Smrgif $2; then 13598af18c5Smrg $1_TRUE= 13698af18c5Smrg $1_FALSE='#' 13798af18c5Smrgelse 13898af18c5Smrg $1_TRUE='#' 13998af18c5Smrg $1_FALSE= 14098af18c5Smrgfi 14198af18c5SmrgAC_CONFIG_COMMANDS_PRE( 14298af18c5Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14398af18c5Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14498af18c5SmrgUsually this means the macro was only invoked conditionally.]]) 14598af18c5Smrgfi])]) 1466f03b1f6Smrg 14798af18c5Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 14898af18c5Smrg# Free Software Foundation, Inc. 14998af18c5Smrg# 15098af18c5Smrg# This file is free software; the Free Software Foundation 15198af18c5Smrg# gives unlimited permission to copy and/or distribute it, 15298af18c5Smrg# with or without modifications, as long as this notice is preserved. 1536f03b1f6Smrg 15498af18c5Smrg# serial 10 1556f03b1f6Smrg 15698af18c5Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 15798af18c5Smrg# written in clear, in which case automake, when reading aclocal.m4, 15898af18c5Smrg# will think it sees a *use*, and therefore will trigger all it's 15998af18c5Smrg# C support machinery. Also note that it means that autoscan, seeing 16098af18c5Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1616f03b1f6Smrg 1626f03b1f6Smrg 16398af18c5Smrg# _AM_DEPENDENCIES(NAME) 16498af18c5Smrg# ---------------------- 16598af18c5Smrg# See how the compiler implements dependency checking. 16698af18c5Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 16798af18c5Smrg# We try a few techniques and use that to set a single cache variable. 16898af18c5Smrg# 16998af18c5Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 17098af18c5Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 17198af18c5Smrg# dependency, and given that the user is not expected to run this macro, 17298af18c5Smrg# just rely on AC_PROG_CC. 17398af18c5SmrgAC_DEFUN([_AM_DEPENDENCIES], 17498af18c5Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17598af18c5SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17698af18c5SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17798af18c5SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1786f03b1f6Smrg 17998af18c5Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 18098af18c5Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 18198af18c5Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18298af18c5Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 18398af18c5Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18498af18c5Smrg [depcc="$$1" am_compiler_list=]) 1856f03b1f6Smrg 18698af18c5SmrgAC_CACHE_CHECK([dependency style of $depcc], 18798af18c5Smrg [am_cv_$1_dependencies_compiler_type], 18898af18c5Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18998af18c5Smrg # We make a subdir and do the tests there. Otherwise we can end up 19098af18c5Smrg # making bogus files that we don't know about and never remove. For 19198af18c5Smrg # instance it was reported that on HP-UX the gcc test will end up 19298af18c5Smrg # making a dummy file named `D' -- because `-MD' means `put the output 19398af18c5Smrg # in D'. 19498af18c5Smrg mkdir conftest.dir 19598af18c5Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19698af18c5Smrg # using a relative directory. 19798af18c5Smrg cp "$am_depcomp" conftest.dir 19898af18c5Smrg cd conftest.dir 19998af18c5Smrg # We will build objects and dependencies in a subdirectory because 20098af18c5Smrg # it helps to detect inapplicable dependency modes. For instance 20198af18c5Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20298af18c5Smrg # side effect of compilation, but ICC will put the dependencies in 20398af18c5Smrg # the current directory while Tru64 will put them in the object 20498af18c5Smrg # directory. 20598af18c5Smrg mkdir sub 2066f03b1f6Smrg 20798af18c5Smrg am_cv_$1_dependencies_compiler_type=none 20898af18c5Smrg if test "$am_compiler_list" = ""; then 20998af18c5Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 21098af18c5Smrg fi 21198af18c5Smrg am__universal=false 21298af18c5Smrg m4_case([$1], [CC], 21398af18c5Smrg [case " $depcc " in #( 21498af18c5Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21598af18c5Smrg esac], 21698af18c5Smrg [CXX], 21798af18c5Smrg [case " $depcc " in #( 21898af18c5Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21998af18c5Smrg esac]) 2206f03b1f6Smrg 22198af18c5Smrg for depmode in $am_compiler_list; do 22298af18c5Smrg # Setup a source with many dependencies, because some compilers 22398af18c5Smrg # like to wrap large dependency lists on column 80 (with \), and 22498af18c5Smrg # we should not choose a depcomp mode which is confused by this. 22598af18c5Smrg # 22698af18c5Smrg # We need to recreate these files for each test, as the compiler may 22798af18c5Smrg # overwrite some of them when testing with obscure command lines. 22898af18c5Smrg # This happens at least with the AIX C compiler. 22998af18c5Smrg : > sub/conftest.c 23098af18c5Smrg for i in 1 2 3 4 5 6; do 23198af18c5Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23298af18c5Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 23398af18c5Smrg # Solaris 8's {/usr,}/bin/sh. 23498af18c5Smrg touch sub/conftst$i.h 23598af18c5Smrg done 23698af18c5Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2376f03b1f6Smrg 23898af18c5Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23998af18c5Smrg # mode. It turns out that the SunPro C++ compiler does not properly 24098af18c5Smrg # handle `-M -o', and we need to detect this. Also, some Intel 24198af18c5Smrg # versions had trouble with output in subdirs 24298af18c5Smrg am__obj=sub/conftest.${OBJEXT-o} 24398af18c5Smrg am__minus_obj="-o $am__obj" 24498af18c5Smrg case $depmode in 24598af18c5Smrg gcc) 24698af18c5Smrg # This depmode causes a compiler race in universal mode. 24798af18c5Smrg test "$am__universal" = false || continue 24898af18c5Smrg ;; 24998af18c5Smrg nosideeffect) 25098af18c5Smrg # after this tag, mechanisms are not by side-effect, so they'll 25198af18c5Smrg # only be used when explicitly requested 25298af18c5Smrg if test "x$enable_dependency_tracking" = xyes; then 25398af18c5Smrg continue 25498af18c5Smrg else 25598af18c5Smrg break 25698af18c5Smrg fi 25798af18c5Smrg ;; 25898af18c5Smrg msvisualcpp | msvcmsys) 25998af18c5Smrg # This compiler won't grok `-c -o', but also, the minuso test has 26098af18c5Smrg # not run yet. These depmodes are late enough in the game, and 26198af18c5Smrg # so weak that their functioning should not be impacted. 26298af18c5Smrg am__obj=conftest.${OBJEXT-o} 26398af18c5Smrg am__minus_obj= 26498af18c5Smrg ;; 26598af18c5Smrg none) break ;; 26698af18c5Smrg esac 26798af18c5Smrg if depmode=$depmode \ 26898af18c5Smrg source=sub/conftest.c object=$am__obj \ 26998af18c5Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27098af18c5Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 27198af18c5Smrg >/dev/null 2>conftest.err && 27298af18c5Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27398af18c5Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27498af18c5Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27598af18c5Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27698af18c5Smrg # icc doesn't choke on unknown options, it will just issue warnings 27798af18c5Smrg # or remarks (even with -Werror). So we grep stderr for any message 27898af18c5Smrg # that says an option was ignored or not supported. 27998af18c5Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28098af18c5Smrg # icc: Command line warning: ignoring option '-M'; no argument required 28198af18c5Smrg # The diagnosis changed in icc 8.0: 28298af18c5Smrg # icc: Command line remark: option '-MP' not supported 28398af18c5Smrg if (grep 'ignoring option' conftest.err || 28498af18c5Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28598af18c5Smrg am_cv_$1_dependencies_compiler_type=$depmode 28698af18c5Smrg break 28798af18c5Smrg fi 28898af18c5Smrg fi 28998af18c5Smrg done 2906f03b1f6Smrg 29198af18c5Smrg cd .. 29298af18c5Smrg rm -rf conftest.dir 29398af18c5Smrgelse 29498af18c5Smrg am_cv_$1_dependencies_compiler_type=none 2956f03b1f6Smrgfi 29698af18c5Smrg]) 29798af18c5SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29898af18c5SmrgAM_CONDITIONAL([am__fastdep$1], [ 29998af18c5Smrg test "x$enable_dependency_tracking" != xno \ 30098af18c5Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 30198af18c5Smrg]) 3026f03b1f6Smrg 3036f03b1f6Smrg 30498af18c5Smrg# AM_SET_DEPDIR 30598af18c5Smrg# ------------- 30698af18c5Smrg# Choose a directory name for dependency files. 30798af18c5Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 30898af18c5SmrgAC_DEFUN([AM_SET_DEPDIR], 30998af18c5Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 31098af18c5SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 31198af18c5Smrg]) 3126f03b1f6Smrg 3136f03b1f6Smrg 31498af18c5Smrg# AM_DEP_TRACK 31598af18c5Smrg# ------------ 31698af18c5SmrgAC_DEFUN([AM_DEP_TRACK], 31798af18c5Smrg[AC_ARG_ENABLE(dependency-tracking, 31898af18c5Smrg[ --disable-dependency-tracking speeds up one-time build 31998af18c5Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 32098af18c5Smrgif test "x$enable_dependency_tracking" != xno; then 32198af18c5Smrg am_depcomp="$ac_aux_dir/depcomp" 32298af18c5Smrg AMDEPBACKSLASH='\' 32398af18c5Smrgfi 32498af18c5SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32598af18c5SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32698af18c5Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32798af18c5Smrg]) 3286f03b1f6Smrg 32998af18c5Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3306f03b1f6Smrg 33198af18c5Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 33298af18c5Smrg# Free Software Foundation, Inc. 33398af18c5Smrg# 33498af18c5Smrg# This file is free software; the Free Software Foundation 33598af18c5Smrg# gives unlimited permission to copy and/or distribute it, 33698af18c5Smrg# with or without modifications, as long as this notice is preserved. 3376f03b1f6Smrg 33898af18c5Smrg#serial 5 3396f03b1f6Smrg 34098af18c5Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 34198af18c5Smrg# ------------------------------ 34298af18c5SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34398af18c5Smrg[{ 34498af18c5Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34598af18c5Smrg # are listed without --file. Let's play safe and only enable the eval 34698af18c5Smrg # if we detect the quoting. 34798af18c5Smrg case $CONFIG_FILES in 34898af18c5Smrg *\'*) eval set x "$CONFIG_FILES" ;; 34998af18c5Smrg *) set x $CONFIG_FILES ;; 35098af18c5Smrg esac 35198af18c5Smrg shift 35298af18c5Smrg for mf 35398af18c5Smrg do 35498af18c5Smrg # Strip MF so we end up with the name of the file. 35598af18c5Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35698af18c5Smrg # Check whether this is an Automake generated Makefile or not. 35798af18c5Smrg # We used to match only the files named `Makefile.in', but 35898af18c5Smrg # some people rename them; so instead we look at the file content. 35998af18c5Smrg # Grep'ing the first line is not enough: some people post-process 36098af18c5Smrg # each Makefile.in and add a new line on top of each file to say so. 36198af18c5Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36298af18c5Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36398af18c5Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36498af18c5Smrg dirpart=`AS_DIRNAME("$mf")` 36598af18c5Smrg else 36698af18c5Smrg continue 36798af18c5Smrg fi 36898af18c5Smrg # Extract the definition of DEPDIR, am__include, and am__quote 36998af18c5Smrg # from the Makefile without running `make'. 37098af18c5Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37198af18c5Smrg test -z "$DEPDIR" && continue 37298af18c5Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37398af18c5Smrg test -z "am__include" && continue 37498af18c5Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37598af18c5Smrg # When using ansi2knr, U may be empty or an underscore; expand it 37698af18c5Smrg U=`sed -n 's/^U = //p' < "$mf"` 37798af18c5Smrg # Find all dependency output files, they are included files with 37898af18c5Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37998af18c5Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38098af18c5Smrg # expansion. 38198af18c5Smrg for file in `sed -n " 38298af18c5Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38398af18c5Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38498af18c5Smrg # Make sure the directory exists. 38598af18c5Smrg test -f "$dirpart/$file" && continue 38698af18c5Smrg fdir=`AS_DIRNAME(["$file"])` 38798af18c5Smrg AS_MKDIR_P([$dirpart/$fdir]) 38898af18c5Smrg # echo "creating $dirpart/$file" 38998af18c5Smrg echo '# dummy' > "$dirpart/$file" 39098af18c5Smrg done 39198af18c5Smrg done 39298af18c5Smrg} 39398af18c5Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3946f03b1f6Smrg 3956f03b1f6Smrg 39698af18c5Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39798af18c5Smrg# ----------------------------- 39898af18c5Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 39998af18c5Smrg# 40098af18c5Smrg# This code is only required when automatic dependency tracking 40198af18c5Smrg# is enabled. FIXME. This creates each `.P' file that we will 40298af18c5Smrg# need in order to bootstrap the dependency handling code. 40398af18c5SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40498af18c5Smrg[AC_CONFIG_COMMANDS([depfiles], 40598af18c5Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40698af18c5Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4076f03b1f6Smrg]) 4086f03b1f6Smrg 40998af18c5Smrg# Do all the work for Automake. -*- Autoconf -*- 4106f03b1f6Smrg 41198af18c5Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 41298af18c5Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 41398af18c5Smrg# 41498af18c5Smrg# This file is free software; the Free Software Foundation 41598af18c5Smrg# gives unlimited permission to copy and/or distribute it, 41698af18c5Smrg# with or without modifications, as long as this notice is preserved. 4176f03b1f6Smrg 41898af18c5Smrg# serial 16 4196f03b1f6Smrg 42098af18c5Smrg# This macro actually does too much. Some checks are only needed if 42198af18c5Smrg# your package does certain things. But this isn't really a big deal. 4226f03b1f6Smrg 42398af18c5Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 42498af18c5Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 42598af18c5Smrg# ----------------------------------------------- 42698af18c5Smrg# The call with PACKAGE and VERSION arguments is the old style 42798af18c5Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 42898af18c5Smrg# and VERSION should now be passed to AC_INIT and removed from 42998af18c5Smrg# the call to AM_INIT_AUTOMAKE. 43098af18c5Smrg# We support both call styles for the transition. After 43198af18c5Smrg# the next Automake release, Autoconf can make the AC_INIT 43298af18c5Smrg# arguments mandatory, and then we can depend on a new Autoconf 43398af18c5Smrg# release and drop the old call support. 43498af18c5SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 43598af18c5Smrg[AC_PREREQ([2.62])dnl 43698af18c5Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 43798af18c5Smrgdnl the ones we care about. 43898af18c5Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 43998af18c5SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 44098af18c5SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 44198af18c5Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 44298af18c5Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 44398af18c5Smrg # is not polluted with repeated "-I." 44498af18c5Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 44598af18c5Smrg # test to see if srcdir already configured 44698af18c5Smrg if test -f $srcdir/config.status; then 44798af18c5Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 44898af18c5Smrg fi 44998af18c5Smrgfi 4506f03b1f6Smrg 45198af18c5Smrg# test whether we have cygpath 45298af18c5Smrgif test -z "$CYGPATH_W"; then 45398af18c5Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 45498af18c5Smrg CYGPATH_W='cygpath -w' 45598af18c5Smrg else 45698af18c5Smrg CYGPATH_W=echo 45798af18c5Smrg fi 45898af18c5Smrgfi 45998af18c5SmrgAC_SUBST([CYGPATH_W]) 4606f03b1f6Smrg 46198af18c5Smrg# Define the identity of the package. 46298af18c5Smrgdnl Distinguish between old-style and new-style calls. 46398af18c5Smrgm4_ifval([$2], 46498af18c5Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 46598af18c5Smrg AC_SUBST([PACKAGE], [$1])dnl 46698af18c5Smrg AC_SUBST([VERSION], [$2])], 46798af18c5Smrg[_AM_SET_OPTIONS([$1])dnl 46898af18c5Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 46998af18c5Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 47098af18c5Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 47198af18c5Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 47298af18c5Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4736f03b1f6Smrg 47498af18c5Smrg_AM_IF_OPTION([no-define],, 47598af18c5Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 47698af18c5Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4776f03b1f6Smrg 47898af18c5Smrg# Some tools Automake needs. 47998af18c5SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 48098af18c5SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 48198af18c5SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 48298af18c5SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 48398af18c5SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 48498af18c5SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 48598af18c5SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 48698af18c5SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 48798af18c5SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 48898af18c5SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 48998af18c5Smrg# We need awk for the "check" target. The system "awk" is bad on 49098af18c5Smrg# some platforms. 49198af18c5SmrgAC_REQUIRE([AC_PROG_AWK])dnl 49298af18c5SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 49398af18c5SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 49498af18c5Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 49598af18c5Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 49698af18c5Smrg [_AM_PROG_TAR([v7])])]) 49798af18c5Smrg_AM_IF_OPTION([no-dependencies],, 49898af18c5Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 49998af18c5Smrg [_AM_DEPENDENCIES(CC)], 50098af18c5Smrg [define([AC_PROG_CC], 50198af18c5Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 50298af18c5SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 50398af18c5Smrg [_AM_DEPENDENCIES(CXX)], 50498af18c5Smrg [define([AC_PROG_CXX], 50598af18c5Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 50698af18c5SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 50798af18c5Smrg [_AM_DEPENDENCIES(OBJC)], 50898af18c5Smrg [define([AC_PROG_OBJC], 50998af18c5Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 51098af18c5Smrg]) 51198af18c5Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 51298af18c5Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 51398af18c5Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 51498af18c5Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 51598af18c5SmrgAC_CONFIG_COMMANDS_PRE(dnl 51698af18c5Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 51798af18c5Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 51898af18c5Smrg]) 5196f03b1f6Smrg 52098af18c5Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 52198af18c5Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 52298af18c5Smrgdnl mangled by Autoconf and run in a shell conditional statement. 52398af18c5Smrgm4_define([_AC_COMPILER_EXEEXT], 52498af18c5Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5256f03b1f6Smrg 5266f03b1f6Smrg 52798af18c5Smrg# When config.status generates a header, we must update the stamp-h file. 52898af18c5Smrg# This file resides in the same directory as the config header 52998af18c5Smrg# that is generated. The stamp files are numbered to have different names. 5306f03b1f6Smrg 53198af18c5Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 53298af18c5Smrg# loop where config.status creates the headers, so we can generate 53398af18c5Smrg# our stamp files there. 53498af18c5SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 53598af18c5Smrg[# Compute $1's index in $config_headers. 53698af18c5Smrg_am_arg=$1 53798af18c5Smrg_am_stamp_count=1 53898af18c5Smrgfor _am_header in $config_headers :; do 53998af18c5Smrg case $_am_header in 54098af18c5Smrg $_am_arg | $_am_arg:* ) 54198af18c5Smrg break ;; 54298af18c5Smrg * ) 54398af18c5Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 54498af18c5Smrg esac 54598af18c5Smrgdone 54698af18c5Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5476f03b1f6Smrg 54898af18c5Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 54998af18c5Smrg# 55098af18c5Smrg# This file is free software; the Free Software Foundation 55198af18c5Smrg# gives unlimited permission to copy and/or distribute it, 55298af18c5Smrg# with or without modifications, as long as this notice is preserved. 5536f03b1f6Smrg 55498af18c5Smrg# AM_PROG_INSTALL_SH 55598af18c5Smrg# ------------------ 55698af18c5Smrg# Define $install_sh. 55798af18c5SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 55898af18c5Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 55998af18c5Smrgif test x"${install_sh}" != xset; then 56098af18c5Smrg case $am_aux_dir in 56198af18c5Smrg *\ * | *\ *) 56298af18c5Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 56398af18c5Smrg *) 56498af18c5Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 56598af18c5Smrg esac 56698af18c5Smrgfi 56798af18c5SmrgAC_SUBST(install_sh)]) 5686f03b1f6Smrg 56998af18c5Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 57098af18c5Smrg# 57198af18c5Smrg# This file is free software; the Free Software Foundation 57298af18c5Smrg# gives unlimited permission to copy and/or distribute it, 57398af18c5Smrg# with or without modifications, as long as this notice is preserved. 5746f03b1f6Smrg 57598af18c5Smrg# serial 2 5766f03b1f6Smrg 57798af18c5Smrg# Check whether the underlying file-system supports filenames 57898af18c5Smrg# with a leading dot. For instance MS-DOS doesn't. 57998af18c5SmrgAC_DEFUN([AM_SET_LEADING_DOT], 58098af18c5Smrg[rm -rf .tst 2>/dev/null 58198af18c5Smrgmkdir .tst 2>/dev/null 58298af18c5Smrgif test -d .tst; then 58398af18c5Smrg am__leading_dot=. 58498af18c5Smrgelse 58598af18c5Smrg am__leading_dot=_ 5866f03b1f6Smrgfi 58798af18c5Smrgrmdir .tst 2>/dev/null 58898af18c5SmrgAC_SUBST([am__leading_dot])]) 5896f03b1f6Smrg 59098af18c5Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 59198af18c5Smrg# From Jim Meyering 5926f03b1f6Smrg 59398af18c5Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 59498af18c5Smrg# Free Software Foundation, Inc. 59598af18c5Smrg# 59698af18c5Smrg# This file is free software; the Free Software Foundation 59798af18c5Smrg# gives unlimited permission to copy and/or distribute it, 59898af18c5Smrg# with or without modifications, as long as this notice is preserved. 5996f03b1f6Smrg 60098af18c5Smrg# serial 5 6016f03b1f6Smrg 60298af18c5Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 60398af18c5Smrg# ---------------------------------- 60498af18c5Smrg# Control maintainer-specific portions of Makefiles. 60598af18c5Smrg# Default is to disable them, unless `enable' is passed literally. 60698af18c5Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 60798af18c5Smrg# can override the default with the --enable/--disable switch. 60898af18c5SmrgAC_DEFUN([AM_MAINTAINER_MODE], 60998af18c5Smrg[m4_case(m4_default([$1], [disable]), 61098af18c5Smrg [enable], [m4_define([am_maintainer_other], [disable])], 61198af18c5Smrg [disable], [m4_define([am_maintainer_other], [enable])], 61298af18c5Smrg [m4_define([am_maintainer_other], [enable]) 61398af18c5Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 61498af18c5SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 61598af18c5Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 61698af18c5Smrg AC_ARG_ENABLE([maintainer-mode], 61798af18c5Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 61898af18c5Smrg (and sometimes confusing) to the casual installer], 61998af18c5Smrg [USE_MAINTAINER_MODE=$enableval], 62098af18c5Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 62198af18c5Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 62298af18c5Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 62398af18c5Smrg MAINT=$MAINTAINER_MODE_TRUE 62498af18c5Smrg AC_SUBST([MAINT])dnl 62598af18c5Smrg] 62698af18c5Smrg) 6276f03b1f6Smrg 62898af18c5SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6296f03b1f6Smrg 63098af18c5Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 63198af18c5Smrg 63298af18c5Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 63398af18c5Smrg# 63498af18c5Smrg# This file is free software; the Free Software Foundation 63598af18c5Smrg# gives unlimited permission to copy and/or distribute it, 63698af18c5Smrg# with or without modifications, as long as this notice is preserved. 63798af18c5Smrg 63898af18c5Smrg# serial 4 63998af18c5Smrg 64098af18c5Smrg# AM_MAKE_INCLUDE() 64198af18c5Smrg# ----------------- 64298af18c5Smrg# Check to see how make treats includes. 64398af18c5SmrgAC_DEFUN([AM_MAKE_INCLUDE], 64498af18c5Smrg[am_make=${MAKE-make} 64598af18c5Smrgcat > confinc << 'END' 64698af18c5Smrgam__doit: 64798af18c5Smrg @echo this is the am__doit target 64898af18c5Smrg.PHONY: am__doit 64998af18c5SmrgEND 65098af18c5Smrg# If we don't find an include directive, just comment out the code. 65198af18c5SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 65298af18c5Smrgam__include="#" 65398af18c5Smrgam__quote= 65498af18c5Smrg_am_result=none 65598af18c5Smrg# First try GNU make style include. 65698af18c5Smrgecho "include confinc" > confmf 65798af18c5Smrg# Ignore all kinds of additional output from `make'. 65898af18c5Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 65998af18c5Smrg*the\ am__doit\ target*) 66098af18c5Smrg am__include=include 66198af18c5Smrg am__quote= 66298af18c5Smrg _am_result=GNU 6636f03b1f6Smrg ;; 6646f03b1f6Smrgesac 66598af18c5Smrg# Now try BSD make style include. 66698af18c5Smrgif test "$am__include" = "#"; then 66798af18c5Smrg echo '.include "confinc"' > confmf 66898af18c5Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 66998af18c5Smrg *the\ am__doit\ target*) 67098af18c5Smrg am__include=.include 67198af18c5Smrg am__quote="\"" 67298af18c5Smrg _am_result=BSD 67398af18c5Smrg ;; 67498af18c5Smrg esac 67598af18c5Smrgfi 67698af18c5SmrgAC_SUBST([am__include]) 67798af18c5SmrgAC_SUBST([am__quote]) 67898af18c5SmrgAC_MSG_RESULT([$_am_result]) 67998af18c5Smrgrm -f confinc confmf 68098af18c5Smrg]) 6816f03b1f6Smrg 68298af18c5Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6836f03b1f6Smrg 68498af18c5Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 68598af18c5Smrg# Free Software Foundation, Inc. 68698af18c5Smrg# 68798af18c5Smrg# This file is free software; the Free Software Foundation 68898af18c5Smrg# gives unlimited permission to copy and/or distribute it, 68998af18c5Smrg# with or without modifications, as long as this notice is preserved. 6906f03b1f6Smrg 69198af18c5Smrg# serial 6 6926f03b1f6Smrg 69398af18c5Smrg# AM_MISSING_PROG(NAME, PROGRAM) 69498af18c5Smrg# ------------------------------ 69598af18c5SmrgAC_DEFUN([AM_MISSING_PROG], 69698af18c5Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 69798af18c5Smrg$1=${$1-"${am_missing_run}$2"} 69898af18c5SmrgAC_SUBST($1)]) 6996f03b1f6Smrg 70098af18c5Smrg 70198af18c5Smrg# AM_MISSING_HAS_RUN 70298af18c5Smrg# ------------------ 70398af18c5Smrg# Define MISSING if not defined so far and test if it supports --run. 70498af18c5Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 70598af18c5SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 70698af18c5Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 70798af18c5SmrgAC_REQUIRE_AUX_FILE([missing])dnl 70898af18c5Smrgif test x"${MISSING+set}" != xset; then 70998af18c5Smrg case $am_aux_dir in 71098af18c5Smrg *\ * | *\ *) 71198af18c5Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 71298af18c5Smrg *) 71398af18c5Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 71498af18c5Smrg esac 71598af18c5Smrgfi 71698af18c5Smrg# Use eval to expand $SHELL 71798af18c5Smrgif eval "$MISSING --run true"; then 71898af18c5Smrg am_missing_run="$MISSING --run " 7196f03b1f6Smrgelse 72098af18c5Smrg am_missing_run= 72198af18c5Smrg AC_MSG_WARN([`missing' script is too old or missing]) 7226f03b1f6Smrgfi 72398af18c5Smrg]) 7246f03b1f6Smrg 72598af18c5Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 72698af18c5Smrg# 72798af18c5Smrg# This file is free software; the Free Software Foundation 72898af18c5Smrg# gives unlimited permission to copy and/or distribute it, 72998af18c5Smrg# with or without modifications, as long as this notice is preserved. 7306f03b1f6Smrg 73198af18c5Smrg# AM_PROG_MKDIR_P 73298af18c5Smrg# --------------- 73398af18c5Smrg# Check for `mkdir -p'. 73498af18c5SmrgAC_DEFUN([AM_PROG_MKDIR_P], 73598af18c5Smrg[AC_PREREQ([2.60])dnl 73698af18c5SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 73798af18c5Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 73898af18c5Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 73998af18c5Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 74098af18c5Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 74198af18c5Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 74298af18c5Smrgdnl adjustment using top_builddir (which is defined more often than 74398af18c5Smrgdnl MKDIR_P). 74498af18c5SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 74598af18c5Smrgcase $mkdir_p in 74698af18c5Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 74798af18c5Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 74898af18c5Smrgesac 7496f03b1f6Smrg]) 7506f03b1f6Smrg 75198af18c5Smrg# Helper functions for option handling. -*- Autoconf -*- 7526f03b1f6Smrg 75398af18c5Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 75498af18c5Smrg# 75598af18c5Smrg# This file is free software; the Free Software Foundation 75698af18c5Smrg# gives unlimited permission to copy and/or distribute it, 75798af18c5Smrg# with or without modifications, as long as this notice is preserved. 7586f03b1f6Smrg 75998af18c5Smrg# serial 4 7606f03b1f6Smrg 76198af18c5Smrg# _AM_MANGLE_OPTION(NAME) 76298af18c5Smrg# ----------------------- 76398af18c5SmrgAC_DEFUN([_AM_MANGLE_OPTION], 76498af18c5Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7656f03b1f6Smrg 76698af18c5Smrg# _AM_SET_OPTION(NAME) 76798af18c5Smrg# ------------------------------ 76898af18c5Smrg# Set option NAME. Presently that only means defining a flag for this option. 76998af18c5SmrgAC_DEFUN([_AM_SET_OPTION], 77098af18c5Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7716f03b1f6Smrg 77298af18c5Smrg# _AM_SET_OPTIONS(OPTIONS) 77398af18c5Smrg# ---------------------------------- 77498af18c5Smrg# OPTIONS is a space-separated list of Automake options. 77598af18c5SmrgAC_DEFUN([_AM_SET_OPTIONS], 77698af18c5Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7776f03b1f6Smrg 77898af18c5Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 77998af18c5Smrg# ------------------------------------------- 78098af18c5Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 78198af18c5SmrgAC_DEFUN([_AM_IF_OPTION], 78298af18c5Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7836f03b1f6Smrg 78498af18c5Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7856f03b1f6Smrg 78698af18c5Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 78798af18c5Smrg# Free Software Foundation, Inc. 78898af18c5Smrg# 78998af18c5Smrg# This file is free software; the Free Software Foundation 79098af18c5Smrg# gives unlimited permission to copy and/or distribute it, 79198af18c5Smrg# with or without modifications, as long as this notice is preserved. 7926f03b1f6Smrg 79398af18c5Smrg# serial 5 7946f03b1f6Smrg 79598af18c5Smrg# AM_SANITY_CHECK 79698af18c5Smrg# --------------- 79798af18c5SmrgAC_DEFUN([AM_SANITY_CHECK], 79898af18c5Smrg[AC_MSG_CHECKING([whether build environment is sane]) 79998af18c5Smrg# Just in case 80098af18c5Smrgsleep 1 80198af18c5Smrgecho timestamp > conftest.file 80298af18c5Smrg# Reject unsafe characters in $srcdir or the absolute working directory 80398af18c5Smrg# name. Accept space and tab only in the latter. 80498af18c5Smrgam_lf=' 80598af18c5Smrg' 80698af18c5Smrgcase `pwd` in 80798af18c5Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 80898af18c5Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 80998af18c5Smrgesac 81098af18c5Smrgcase $srcdir in 81198af18c5Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 81298af18c5Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 81398af18c5Smrgesac 8146f03b1f6Smrg 81598af18c5Smrg# Do `set' in a subshell so we don't clobber the current shell's 81698af18c5Smrg# arguments. Must try -L first in case configure is actually a 81798af18c5Smrg# symlink; some systems play weird games with the mod time of symlinks 81898af18c5Smrg# (eg FreeBSD returns the mod time of the symlink's containing 81998af18c5Smrg# directory). 82098af18c5Smrgif ( 82198af18c5Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 82298af18c5Smrg if test "$[*]" = "X"; then 82398af18c5Smrg # -L didn't work. 82498af18c5Smrg set X `ls -t "$srcdir/configure" conftest.file` 82598af18c5Smrg fi 82698af18c5Smrg rm -f conftest.file 82798af18c5Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 82898af18c5Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8296f03b1f6Smrg 83098af18c5Smrg # If neither matched, then we have a broken ls. This can happen 83198af18c5Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 83298af18c5Smrg # broken ls alias from the environment. This has actually 83398af18c5Smrg # happened. Such a system could not be considered "sane". 83498af18c5Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 83598af18c5Smrgalias in your environment]) 83698af18c5Smrg fi 8376f03b1f6Smrg 83898af18c5Smrg test "$[2]" = conftest.file 83998af18c5Smrg ) 84098af18c5Smrgthen 84198af18c5Smrg # Ok. 84298af18c5Smrg : 8436f03b1f6Smrgelse 84498af18c5Smrg AC_MSG_ERROR([newly created file is older than distributed files! 84598af18c5SmrgCheck your system clock]) 84698af18c5Smrgfi 84798af18c5SmrgAC_MSG_RESULT(yes)]) 8486f03b1f6Smrg 84998af18c5Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 85098af18c5Smrg# 85198af18c5Smrg# This file is free software; the Free Software Foundation 85298af18c5Smrg# gives unlimited permission to copy and/or distribute it, 85398af18c5Smrg# with or without modifications, as long as this notice is preserved. 8546f03b1f6Smrg 85598af18c5Smrg# serial 1 8566f03b1f6Smrg 85798af18c5Smrg# AM_SILENT_RULES([DEFAULT]) 85898af18c5Smrg# -------------------------- 85998af18c5Smrg# Enable less verbose build rules; with the default set to DEFAULT 86098af18c5Smrg# (`yes' being less verbose, `no' or empty being verbose). 86198af18c5SmrgAC_DEFUN([AM_SILENT_RULES], 86298af18c5Smrg[AC_ARG_ENABLE([silent-rules], 86398af18c5Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 86498af18c5Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 86598af18c5Smrgcase $enable_silent_rules in 86698af18c5Smrgyes) AM_DEFAULT_VERBOSITY=0;; 86798af18c5Smrgno) AM_DEFAULT_VERBOSITY=1;; 86898af18c5Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 86998af18c5Smrgesac 87098af18c5SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 87198af18c5SmrgAM_BACKSLASH='\' 87298af18c5SmrgAC_SUBST([AM_BACKSLASH])dnl 87398af18c5Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 87498af18c5Smrg]) 8756f03b1f6Smrg 87698af18c5Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 87798af18c5Smrg# 87898af18c5Smrg# This file is free software; the Free Software Foundation 87998af18c5Smrg# gives unlimited permission to copy and/or distribute it, 88098af18c5Smrg# with or without modifications, as long as this notice is preserved. 8816f03b1f6Smrg 88298af18c5Smrg# AM_PROG_INSTALL_STRIP 88398af18c5Smrg# --------------------- 88498af18c5Smrg# One issue with vendor `install' (even GNU) is that you can't 88598af18c5Smrg# specify the program used to strip binaries. This is especially 88698af18c5Smrg# annoying in cross-compiling environments, where the build's strip 88798af18c5Smrg# is unlikely to handle the host's binaries. 88898af18c5Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 88998af18c5Smrg# always use install-sh in `make install-strip', and initialize 89098af18c5Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 89198af18c5SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 89298af18c5Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 89398af18c5Smrg# Installed binaries are usually stripped using `strip' when the user 89498af18c5Smrg# run `make install-strip'. However `strip' might not be the right 89598af18c5Smrg# tool to use in cross-compilation environments, therefore Automake 89698af18c5Smrg# will honor the `STRIP' environment variable to overrule this program. 89798af18c5Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 89898af18c5Smrgif test "$cross_compiling" != no; then 89998af18c5Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9006f03b1f6Smrgfi 90198af18c5SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 90298af18c5SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9036f03b1f6Smrg 90498af18c5Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 90598af18c5Smrg# 90698af18c5Smrg# This file is free software; the Free Software Foundation 90798af18c5Smrg# gives unlimited permission to copy and/or distribute it, 90898af18c5Smrg# with or without modifications, as long as this notice is preserved. 9096f03b1f6Smrg 91098af18c5Smrg# serial 2 9116f03b1f6Smrg 91298af18c5Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 91398af18c5Smrg# --------------------------- 91498af18c5Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 91598af18c5Smrg# This macro is traced by Automake. 91698af18c5SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9176f03b1f6Smrg 91898af18c5Smrg# AM_SUBST_NOTMAKE(VARIABLE) 91998af18c5Smrg# --------------------------- 92098af18c5Smrg# Public sister of _AM_SUBST_NOTMAKE. 92198af18c5SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9226f03b1f6Smrg 92398af18c5Smrg# Check how to create a tarball. -*- Autoconf -*- 9246f03b1f6Smrg 92598af18c5Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 92698af18c5Smrg# 92798af18c5Smrg# This file is free software; the Free Software Foundation 92898af18c5Smrg# gives unlimited permission to copy and/or distribute it, 92998af18c5Smrg# with or without modifications, as long as this notice is preserved. 9306f03b1f6Smrg 93198af18c5Smrg# serial 2 93298af18c5Smrg 93398af18c5Smrg# _AM_PROG_TAR(FORMAT) 93498af18c5Smrg# -------------------- 93598af18c5Smrg# Check how to create a tarball in format FORMAT. 93698af18c5Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 93798af18c5Smrg# 93898af18c5Smrg# Substitute a variable $(am__tar) that is a command 93998af18c5Smrg# writing to stdout a FORMAT-tarball containing the directory 94098af18c5Smrg# $tardir. 94198af18c5Smrg# tardir=directory && $(am__tar) > result.tar 94298af18c5Smrg# 94398af18c5Smrg# Substitute a variable $(am__untar) that extract such 94498af18c5Smrg# a tarball read from stdin. 94598af18c5Smrg# $(am__untar) < result.tar 94698af18c5SmrgAC_DEFUN([_AM_PROG_TAR], 94798af18c5Smrg[# Always define AMTAR for backward compatibility. 94898af18c5SmrgAM_MISSING_PROG([AMTAR], [tar]) 94998af18c5Smrgm4_if([$1], [v7], 95098af18c5Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 95198af18c5Smrg [m4_case([$1], [ustar],, [pax],, 95298af18c5Smrg [m4_fatal([Unknown tar format])]) 95398af18c5SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 95498af18c5Smrg# Loop over all known methods to create a tar archive until one works. 95598af18c5Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 95698af18c5Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 95798af18c5Smrg# Do not fold the above two line into one, because Tru64 sh and 95898af18c5Smrg# Solaris sh will not grok spaces in the rhs of `-'. 95998af18c5Smrgfor _am_tool in $_am_tools 96098af18c5Smrgdo 96198af18c5Smrg case $_am_tool in 96298af18c5Smrg gnutar) 96398af18c5Smrg for _am_tar in tar gnutar gtar; 96498af18c5Smrg do 96598af18c5Smrg AM_RUN_LOG([$_am_tar --version]) && break 96698af18c5Smrg done 96798af18c5Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 96898af18c5Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 96998af18c5Smrg am__untar="$_am_tar -xf -" 97098af18c5Smrg ;; 97198af18c5Smrg plaintar) 97298af18c5Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 97398af18c5Smrg # ustar tarball either. 97498af18c5Smrg (tar --version) >/dev/null 2>&1 && continue 97598af18c5Smrg am__tar='tar chf - "$$tardir"' 97698af18c5Smrg am__tar_='tar chf - "$tardir"' 97798af18c5Smrg am__untar='tar xf -' 97898af18c5Smrg ;; 97998af18c5Smrg pax) 98098af18c5Smrg am__tar='pax -L -x $1 -w "$$tardir"' 98198af18c5Smrg am__tar_='pax -L -x $1 -w "$tardir"' 98298af18c5Smrg am__untar='pax -r' 98398af18c5Smrg ;; 98498af18c5Smrg cpio) 98598af18c5Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 98698af18c5Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 98798af18c5Smrg am__untar='cpio -i -H $1 -d' 98898af18c5Smrg ;; 98998af18c5Smrg none) 99098af18c5Smrg am__tar=false 99198af18c5Smrg am__tar_=false 99298af18c5Smrg am__untar=false 9936f03b1f6Smrg ;; 9946f03b1f6Smrg esac 9956f03b1f6Smrg 99698af18c5Smrg # If the value was cached, stop now. We just wanted to have am__tar 99798af18c5Smrg # and am__untar set. 99898af18c5Smrg test -n "${am_cv_prog_tar_$1}" && break 9996f03b1f6Smrg 100098af18c5Smrg # tar/untar a dummy directory, and stop if the command works 100198af18c5Smrg rm -rf conftest.dir 100298af18c5Smrg mkdir conftest.dir 100398af18c5Smrg echo GrepMe > conftest.dir/file 100498af18c5Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 100598af18c5Smrg rm -rf conftest.dir 100698af18c5Smrg if test -s conftest.tar; then 100798af18c5Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 100898af18c5Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 100998af18c5Smrg fi 101098af18c5Smrgdone 101198af18c5Smrgrm -rf conftest.dir 10126f03b1f6Smrg 101398af18c5SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 101498af18c5SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 101598af18c5SmrgAC_SUBST([am__tar]) 101698af18c5SmrgAC_SUBST([am__untar]) 101798af18c5Smrg]) # _AM_PROG_TAR 10186f03b1f6Smrg 101942941e3bSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 102042941e3bSmrg# 102142941e3bSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 102298af18c5Smrg# 102342941e3bSmrg# This program is free software; you can redistribute it and/or modify 102442941e3bSmrg# it under the terms of the GNU General Public License as published by 102542941e3bSmrg# the Free Software Foundation; either version 2 of the License, or 102642941e3bSmrg# (at your option) any later version. 102798af18c5Smrg# 102842941e3bSmrg# This program is distributed in the hope that it will be useful, but 102942941e3bSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 103042941e3bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 103142941e3bSmrg# General Public License for more details. 103298af18c5Smrg# 103342941e3bSmrg# You should have received a copy of the GNU General Public License 103442941e3bSmrg# along with this program; if not, write to the Free Software 103542941e3bSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 103698af18c5Smrg# 103742941e3bSmrg# As a special exception to the GNU General Public License, if you 103842941e3bSmrg# distribute this file as part of a program that contains a 103942941e3bSmrg# configuration script generated by Autoconf, you may include it under 104042941e3bSmrg# the same distribution terms that you use for the rest of that program. 10416f03b1f6Smrg 104242941e3bSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 104342941e3bSmrg# ---------------------------------- 104442941e3bSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 104542941e3bSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 104642941e3bSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 104742941e3bSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 104842941e3bSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 104942941e3bSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 105098af18c5Smrgfi 105142941e3bSmrgif test -n "$PKG_CONFIG"; then 105242941e3bSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 105342941e3bSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 105442941e3bSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 105598af18c5Smrg AC_MSG_RESULT([yes]) 105698af18c5Smrg else 105742941e3bSmrg AC_MSG_RESULT([no]) 105842941e3bSmrg PKG_CONFIG="" 105998af18c5Smrg fi 106042941e3bSmrg 106142941e3bSmrgfi[]dnl 106242941e3bSmrg])# PKG_PROG_PKG_CONFIG 10636f03b1f6Smrg 106442941e3bSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 106598af18c5Smrg# 106642941e3bSmrg# Check to see whether a particular set of modules exists. Similar 106742941e3bSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 106842941e3bSmrg# 106942941e3bSmrg# 107042941e3bSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 107142941e3bSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 107242941e3bSmrg# PKG_CHECK_EXISTS manually 107342941e3bSmrg# -------------------------------------------------------------- 107442941e3bSmrgAC_DEFUN([PKG_CHECK_EXISTS], 107542941e3bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 107642941e3bSmrgif test -n "$PKG_CONFIG" && \ 107742941e3bSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 107842941e3bSmrg m4_ifval([$2], [$2], [:]) 107942941e3bSmrgm4_ifvaln([$3], [else 108042941e3bSmrg $3])dnl 108142941e3bSmrgfi]) 10826f03b1f6Smrg 10836f03b1f6Smrg 108442941e3bSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 108542941e3bSmrg# --------------------------------------------- 108642941e3bSmrgm4_define([_PKG_CONFIG], 108742941e3bSmrg[if test -n "$$1"; then 108842941e3bSmrg pkg_cv_[]$1="$$1" 108942941e3bSmrg elif test -n "$PKG_CONFIG"; then 109042941e3bSmrg PKG_CHECK_EXISTS([$3], 109142941e3bSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 109242941e3bSmrg [pkg_failed=yes]) 109342941e3bSmrg else 109442941e3bSmrg pkg_failed=untried 109542941e3bSmrgfi[]dnl 109642941e3bSmrg])# _PKG_CONFIG 10976f03b1f6Smrg 109842941e3bSmrg# _PKG_SHORT_ERRORS_SUPPORTED 109942941e3bSmrg# ----------------------------- 110042941e3bSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 110142941e3bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110242941e3bSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 110342941e3bSmrg _pkg_short_errors_supported=yes 110442941e3bSmrgelse 110542941e3bSmrg _pkg_short_errors_supported=no 110642941e3bSmrgfi[]dnl 110742941e3bSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 11086f03b1f6Smrg 11096f03b1f6Smrg 111042941e3bSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 111142941e3bSmrg# [ACTION-IF-NOT-FOUND]) 111242941e3bSmrg# 111342941e3bSmrg# 111442941e3bSmrg# Note that if there is a possibility the first call to 111542941e3bSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 111642941e3bSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 111742941e3bSmrg# 111842941e3bSmrg# 111942941e3bSmrg# -------------------------------------------------------------- 112042941e3bSmrgAC_DEFUN([PKG_CHECK_MODULES], 112142941e3bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 112242941e3bSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 112342941e3bSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 11246f03b1f6Smrg 112542941e3bSmrgpkg_failed=no 112642941e3bSmrgAC_MSG_CHECKING([for $1]) 11276f03b1f6Smrg 112842941e3bSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 112942941e3bSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 11306f03b1f6Smrg 113142941e3bSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 113242941e3bSmrgand $1[]_LIBS to avoid the need to call pkg-config. 113342941e3bSmrgSee the pkg-config man page for more details.]) 11346f03b1f6Smrg 113542941e3bSmrgif test $pkg_failed = yes; then 113642941e3bSmrg _PKG_SHORT_ERRORS_SUPPORTED 113742941e3bSmrg if test $_pkg_short_errors_supported = yes; then 113842941e3bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 113942941e3bSmrg else 114042941e3bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 114142941e3bSmrg fi 114242941e3bSmrg # Put the nasty error message in config.log where it belongs 114342941e3bSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1144356f6debSmrg 114542941e3bSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 114642941e3bSmrg[Package requirements ($2) were not met: 1147356f6debSmrg 114842941e3bSmrg$$1_PKG_ERRORS 11496f03b1f6Smrg 115042941e3bSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 115142941e3bSmrginstalled software in a non-standard prefix. 1152356f6debSmrg 115342941e3bSmrg_PKG_TEXT 115442941e3bSmrg])], 115542941e3bSmrg [AC_MSG_RESULT([no]) 115642941e3bSmrg $4]) 115742941e3bSmrgelif test $pkg_failed = untried; then 115842941e3bSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 115942941e3bSmrg[The pkg-config script could not be found or is too old. Make sure it 116042941e3bSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 116142941e3bSmrgpath to pkg-config. 1162356f6debSmrg 116342941e3bSmrg_PKG_TEXT 1164356f6debSmrg 116542941e3bSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 116642941e3bSmrg [$4]) 116742941e3bSmrgelse 116842941e3bSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 116942941e3bSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 117042941e3bSmrg AC_MSG_RESULT([yes]) 117142941e3bSmrg ifelse([$3], , :, [$3]) 117242941e3bSmrgfi[]dnl 117342941e3bSmrg])# PKG_CHECK_MODULES 11746f03b1f6Smrg 117542941e3bSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 117642941e3bSmrg# 117742941e3bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 117842941e3bSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 117942941e3bSmrg# Inc. 118042941e3bSmrg# Written by Gordon Matzigkeit, 1996 118142941e3bSmrg# 118242941e3bSmrg# This file is free software; the Free Software Foundation gives 118342941e3bSmrg# unlimited permission to copy and/or distribute it, with or without 118442941e3bSmrg# modifications, as long as this notice is preserved. 11856f03b1f6Smrg 118642941e3bSmrgm4_define([_LT_COPYING], [dnl 118742941e3bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 118842941e3bSmrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 118942941e3bSmrg# Inc. 119042941e3bSmrg# Written by Gordon Matzigkeit, 1996 119142941e3bSmrg# 119242941e3bSmrg# This file is part of GNU Libtool. 119342941e3bSmrg# 119442941e3bSmrg# GNU Libtool is free software; you can redistribute it and/or 119542941e3bSmrg# modify it under the terms of the GNU General Public License as 119642941e3bSmrg# published by the Free Software Foundation; either version 2 of 119742941e3bSmrg# the License, or (at your option) any later version. 119842941e3bSmrg# 119942941e3bSmrg# As a special exception to the GNU General Public License, 120042941e3bSmrg# if you distribute this file as part of a program or library that 120142941e3bSmrg# is built using GNU Libtool, you may include this file under the 120242941e3bSmrg# same distribution terms that you use for the rest of that program. 120342941e3bSmrg# 120442941e3bSmrg# GNU Libtool is distributed in the hope that it will be useful, 120542941e3bSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 120642941e3bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 120742941e3bSmrg# GNU General Public License for more details. 120842941e3bSmrg# 120942941e3bSmrg# You should have received a copy of the GNU General Public License 121042941e3bSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 121142941e3bSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 121242941e3bSmrg# obtained by writing to the Free Software Foundation, Inc., 121342941e3bSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 121442941e3bSmrg]) 12156f03b1f6Smrg 121642941e3bSmrg# serial 57 LT_INIT 12176f03b1f6Smrg 12186f03b1f6Smrg 121942941e3bSmrg# LT_PREREQ(VERSION) 122042941e3bSmrg# ------------------ 122142941e3bSmrg# Complain and exit if this libtool version is less that VERSION. 122242941e3bSmrgm4_defun([LT_PREREQ], 122342941e3bSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 122442941e3bSmrg [m4_default([$3], 122542941e3bSmrg [m4_fatal([Libtool version $1 or higher is required], 122642941e3bSmrg 63)])], 122742941e3bSmrg [$2])]) 122898af18c5Smrg 122998af18c5Smrg 123042941e3bSmrg# _LT_CHECK_BUILDDIR 123142941e3bSmrg# ------------------ 123242941e3bSmrg# Complain if the absolute build directory name contains unusual characters 123342941e3bSmrgm4_defun([_LT_CHECK_BUILDDIR], 123442941e3bSmrg[case `pwd` in 123542941e3bSmrg *\ * | *\ *) 123642941e3bSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 123742941e3bSmrgesac 123842941e3bSmrg]) 12396f03b1f6Smrg 12406f03b1f6Smrg 124142941e3bSmrg# LT_INIT([OPTIONS]) 124242941e3bSmrg# ------------------ 124342941e3bSmrgAC_DEFUN([LT_INIT], 124442941e3bSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 124542941e3bSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 124642941e3bSmrgAC_BEFORE([$0], [LT_LANG])dnl 124742941e3bSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 124842941e3bSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 124942941e3bSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 12506f03b1f6Smrg 125142941e3bSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 125242941e3bSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 125342941e3bSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 125442941e3bSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 125542941e3bSmrgdnl unless we require an AC_DEFUNed macro: 125642941e3bSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 125742941e3bSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 125842941e3bSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 125942941e3bSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 126042941e3bSmrgm4_require([_LT_PROG_LTMAIN])dnl 12616f03b1f6Smrg 126242941e3bSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 12636f03b1f6Smrg 126442941e3bSmrgdnl Parse OPTIONS 126542941e3bSmrg_LT_SET_OPTIONS([$0], [$1]) 1266356f6debSmrg 126742941e3bSmrg# This can be used to rebuild libtool when needed 126842941e3bSmrgLIBTOOL_DEPS="$ltmain" 12696f03b1f6Smrg 127042941e3bSmrg# Always use our own libtool. 127142941e3bSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 127242941e3bSmrgAC_SUBST(LIBTOOL)dnl 12736f03b1f6Smrg 127442941e3bSmrg_LT_SETUP 12756f03b1f6Smrg 127642941e3bSmrg# Only expand once: 127742941e3bSmrgm4_define([LT_INIT]) 127842941e3bSmrg])# LT_INIT 12796f03b1f6Smrg 128042941e3bSmrg# Old names: 128142941e3bSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 128242941e3bSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 128342941e3bSmrgdnl aclocal-1.4 backwards compatibility: 128442941e3bSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 128542941e3bSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 12866f03b1f6Smrg 12876f03b1f6Smrg 128842941e3bSmrg# _LT_CC_BASENAME(CC) 128942941e3bSmrg# ------------------- 129042941e3bSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 129142941e3bSmrgm4_defun([_LT_CC_BASENAME], 129242941e3bSmrg[for cc_temp in $1""; do 129342941e3bSmrg case $cc_temp in 129442941e3bSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 129542941e3bSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 129642941e3bSmrg \-*) ;; 129742941e3bSmrg *) break;; 129842941e3bSmrg esac 129942941e3bSmrgdone 130042941e3bSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 130142941e3bSmrg]) 13026f03b1f6Smrg 13036f03b1f6Smrg 130442941e3bSmrg# _LT_FILEUTILS_DEFAULTS 130542941e3bSmrg# ---------------------- 130642941e3bSmrg# It is okay to use these file commands and assume they have been set 130742941e3bSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 130842941e3bSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 130942941e3bSmrg[: ${CP="cp -f"} 131042941e3bSmrg: ${MV="mv -f"} 131142941e3bSmrg: ${RM="rm -f"} 131242941e3bSmrg])# _LT_FILEUTILS_DEFAULTS 1313356f6debSmrg 131442941e3bSmrg 131542941e3bSmrg# _LT_SETUP 131642941e3bSmrg# --------- 131742941e3bSmrgm4_defun([_LT_SETUP], 131842941e3bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 131942941e3bSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 132042941e3bSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 132142941e3bSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 132242941e3bSmrg 132342941e3bSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 132442941e3bSmrg_LT_DECL([], [host], [0])dnl 132542941e3bSmrg_LT_DECL([], [host_os], [0])dnl 132642941e3bSmrgdnl 132742941e3bSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 132842941e3bSmrg_LT_DECL([], [build], [0])dnl 132942941e3bSmrg_LT_DECL([], [build_os], [0])dnl 133042941e3bSmrgdnl 133142941e3bSmrgAC_REQUIRE([AC_PROG_CC])dnl 133242941e3bSmrgAC_REQUIRE([LT_PATH_LD])dnl 133342941e3bSmrgAC_REQUIRE([LT_PATH_NM])dnl 133442941e3bSmrgdnl 133542941e3bSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 133642941e3bSmrgtest -z "$LN_S" && LN_S="ln -s" 133742941e3bSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 133842941e3bSmrgdnl 133942941e3bSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 134042941e3bSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 134142941e3bSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 134242941e3bSmrgdnl 134342941e3bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 134442941e3bSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 134542941e3bSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 134642941e3bSmrgm4_require([_LT_CMD_RELOAD])dnl 134742941e3bSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 134842941e3bSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 134942941e3bSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 135042941e3bSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 135142941e3bSmrgm4_require([_LT_WITH_SYSROOT])dnl 135242941e3bSmrg 135342941e3bSmrg_LT_CONFIG_LIBTOOL_INIT([ 135442941e3bSmrg# See if we are running on zsh, and set the options which allow our 135542941e3bSmrg# commands through without removal of \ escapes INIT. 135642941e3bSmrgif test -n "\${ZSH_VERSION+set}" ; then 135742941e3bSmrg setopt NO_GLOB_SUBST 135842941e3bSmrgfi 135942941e3bSmrg]) 136042941e3bSmrgif test -n "${ZSH_VERSION+set}" ; then 136142941e3bSmrg setopt NO_GLOB_SUBST 1362356f6debSmrgfi 1363356f6debSmrg 136442941e3bSmrg_LT_CHECK_OBJDIR 1365356f6debSmrg 136642941e3bSmrgm4_require([_LT_TAG_COMPILER])dnl 1367356f6debSmrg 136842941e3bSmrgcase $host_os in 136942941e3bSmrgaix3*) 137042941e3bSmrg # AIX sometimes has problems with the GCC collect2 program. For some 137142941e3bSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 137242941e3bSmrg # vanish in a puff of smoke. 137342941e3bSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 137442941e3bSmrg COLLECT_NAMES= 137542941e3bSmrg export COLLECT_NAMES 137642941e3bSmrg fi 137742941e3bSmrg ;; 137842941e3bSmrgesac 1379356f6debSmrg 138042941e3bSmrg# Global variables: 138142941e3bSmrgofile=libtool 138242941e3bSmrgcan_build_shared=yes 1383356f6debSmrg 138442941e3bSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 138542941e3bSmrg# which needs '.lib'). 138642941e3bSmrglibext=a 1387356f6debSmrg 138842941e3bSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1389356f6debSmrg 139042941e3bSmrgold_CC="$CC" 139142941e3bSmrgold_CFLAGS="$CFLAGS" 1392356f6debSmrg 139342941e3bSmrg# Set sane defaults for various variables 139442941e3bSmrgtest -z "$CC" && CC=cc 139542941e3bSmrgtest -z "$LTCC" && LTCC=$CC 139642941e3bSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 139742941e3bSmrgtest -z "$LD" && LD=ld 139842941e3bSmrgtest -z "$ac_objext" && ac_objext=o 1399356f6debSmrg 140042941e3bSmrg_LT_CC_BASENAME([$compiler]) 1401356f6debSmrg 140242941e3bSmrg# Only perform the check for file, if the check method requires it 140342941e3bSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 140442941e3bSmrgcase $deplibs_check_method in 140542941e3bSmrgfile_magic*) 140642941e3bSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 140742941e3bSmrg _LT_PATH_MAGIC 140842941e3bSmrg fi 140942941e3bSmrg ;; 141042941e3bSmrgesac 1411356f6debSmrg 141242941e3bSmrg# Use C for the default configuration in the libtool script 141342941e3bSmrgLT_SUPPORTED_TAG([CC]) 141442941e3bSmrg_LT_LANG_C_CONFIG 141542941e3bSmrg_LT_LANG_DEFAULT_CONFIG 141642941e3bSmrg_LT_CONFIG_COMMANDS 141742941e3bSmrg])# _LT_SETUP 1418356f6debSmrg 1419356f6debSmrg 142042941e3bSmrg# _LT_PREPARE_SED_QUOTE_VARS 142142941e3bSmrg# -------------------------- 142242941e3bSmrg# Define a few sed substitution that help us do robust quoting. 142342941e3bSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 142442941e3bSmrg[# Backslashify metacharacters that are still active within 142542941e3bSmrg# double-quoted strings. 142642941e3bSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1427356f6debSmrg 142842941e3bSmrg# Same as above, but do not quote variable references. 142942941e3bSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1430356f6debSmrg 143142941e3bSmrg# Sed substitution to delay expansion of an escaped shell variable in a 143242941e3bSmrg# double_quote_subst'ed string. 143342941e3bSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1434356f6debSmrg 143542941e3bSmrg# Sed substitution to delay expansion of an escaped single quote. 143642941e3bSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1437356f6debSmrg 143842941e3bSmrg# Sed substitution to avoid accidental globbing in evaled expressions 143942941e3bSmrgno_glob_subst='s/\*/\\\*/g' 144042941e3bSmrg]) 1441356f6debSmrg 144242941e3bSmrg# _LT_PROG_LTMAIN 144342941e3bSmrg# --------------- 144442941e3bSmrg# Note that this code is called both from `configure', and `config.status' 144542941e3bSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 144642941e3bSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 144742941e3bSmrg# so we pass a copy along to make sure it has a sensible value anyway. 144842941e3bSmrgm4_defun([_LT_PROG_LTMAIN], 144942941e3bSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 145042941e3bSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 145142941e3bSmrgltmain="$ac_aux_dir/ltmain.sh" 145242941e3bSmrg])# _LT_PROG_LTMAIN 1453356f6debSmrg 14546f03b1f6Smrg 14556f03b1f6Smrg 145642941e3bSmrg# So that we can recreate a full libtool script including additional 145742941e3bSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 145842941e3bSmrg# in macros and then make a single call at the end using the `libtool' 145942941e3bSmrg# label. 14606f03b1f6Smrg 14616f03b1f6Smrg 146242941e3bSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 146342941e3bSmrg# ---------------------------------------- 146442941e3bSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 146542941e3bSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 146642941e3bSmrg[m4_ifval([$1], 146742941e3bSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 146842941e3bSmrg [$1 146942941e3bSmrg])])]) 147098af18c5Smrg 147142941e3bSmrg# Initialize. 147242941e3bSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1473356f6debSmrg 1474356f6debSmrg 147542941e3bSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 147642941e3bSmrg# ------------------------------ 147742941e3bSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 147842941e3bSmrgm4_define([_LT_CONFIG_LIBTOOL], 147942941e3bSmrg[m4_ifval([$1], 148042941e3bSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 148142941e3bSmrg [$1 148242941e3bSmrg])])]) 1483356f6debSmrg 148442941e3bSmrg# Initialize. 148542941e3bSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 14866f03b1f6Smrg 14876f03b1f6Smrg 148842941e3bSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 148942941e3bSmrg# ----------------------------------------------------- 149042941e3bSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 149142941e3bSmrg[_LT_CONFIG_LIBTOOL([$1]) 149242941e3bSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 149342941e3bSmrg]) 14946f03b1f6Smrg 14956f03b1f6Smrg 149642941e3bSmrg# _LT_FORMAT_COMMENT([COMMENT]) 149742941e3bSmrg# ----------------------------- 149842941e3bSmrg# Add leading comment marks to the start of each line, and a trailing 149942941e3bSmrg# full-stop to the whole comment if one is not present already. 150042941e3bSmrgm4_define([_LT_FORMAT_COMMENT], 150142941e3bSmrg[m4_ifval([$1], [ 150242941e3bSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 150342941e3bSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 150442941e3bSmrg)]) 1505356f6debSmrg 15066f03b1f6Smrg 15076f03b1f6Smrg 15086f03b1f6Smrg 150998af18c5Smrg 151042941e3bSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 151142941e3bSmrg# ------------------------------------------------------------------- 151242941e3bSmrg# CONFIGNAME is the name given to the value in the libtool script. 151342941e3bSmrg# VARNAME is the (base) name used in the configure script. 151442941e3bSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 151542941e3bSmrg# VARNAME. Any other value will be used directly. 151642941e3bSmrgm4_define([_LT_DECL], 151742941e3bSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 151842941e3bSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 151942941e3bSmrg [m4_ifval([$1], [$1], [$2])]) 152042941e3bSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 152142941e3bSmrg m4_ifval([$4], 152242941e3bSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 152342941e3bSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 152442941e3bSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 152542941e3bSmrg]) 15266f03b1f6Smrg 1527356f6debSmrg 152842941e3bSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 152942941e3bSmrg# -------------------------------------------------------- 153042941e3bSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 15316f03b1f6Smrg 15326f03b1f6Smrg 153342941e3bSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 153442941e3bSmrg# ------------------------------------------------ 153542941e3bSmrgm4_define([lt_decl_tag_varnames], 153642941e3bSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 15376f03b1f6Smrg 15386f03b1f6Smrg 153942941e3bSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 154042941e3bSmrg# --------------------------------------------------------- 154142941e3bSmrgm4_define([_lt_decl_filter], 154242941e3bSmrg[m4_case([$#], 154342941e3bSmrg [0], [m4_fatal([$0: too few arguments: $#])], 154442941e3bSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 154542941e3bSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 154642941e3bSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 154742941e3bSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 154842941e3bSmrg]) 15496f03b1f6Smrg 15506f03b1f6Smrg 155142941e3bSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 155242941e3bSmrg# -------------------------------------------------- 155342941e3bSmrgm4_define([lt_decl_quote_varnames], 155442941e3bSmrg[_lt_decl_filter([value], [1], $@)]) 15556f03b1f6Smrg 15566f03b1f6Smrg 155742941e3bSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 155842941e3bSmrg# --------------------------------------------------- 155942941e3bSmrgm4_define([lt_decl_dquote_varnames], 156042941e3bSmrg[_lt_decl_filter([value], [2], $@)]) 15616f03b1f6Smrg 15626f03b1f6Smrg 156342941e3bSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 156442941e3bSmrg# --------------------------------------------------- 156542941e3bSmrgm4_define([lt_decl_varnames_tagged], 156642941e3bSmrg[m4_assert([$# <= 2])dnl 156742941e3bSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 156842941e3bSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 156942941e3bSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 157042941e3bSmrgm4_define([_lt_decl_varnames_tagged], 157142941e3bSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1572356f6debSmrg 1573356f6debSmrg 157442941e3bSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 157542941e3bSmrg# ------------------------------------------------ 157642941e3bSmrgm4_define([lt_decl_all_varnames], 157742941e3bSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 157842941e3bSmrg m4_if([$2], [], 157942941e3bSmrg m4_quote(lt_decl_varnames), 158042941e3bSmrg m4_quote(m4_shift($@))))[]dnl 158142941e3bSmrg]) 158242941e3bSmrgm4_define([_lt_decl_all_varnames], 158342941e3bSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 158442941e3bSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 158542941e3bSmrg]) 1586356f6debSmrg 1587356f6debSmrg 158842941e3bSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 158942941e3bSmrg# ------------------------------------ 159042941e3bSmrg# Quote a variable value, and forward it to `config.status' so that its 159142941e3bSmrg# declaration there will have the same value as in `configure'. VARNAME 159242941e3bSmrg# must have a single quote delimited value for this to work. 159342941e3bSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 159442941e3bSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1595356f6debSmrg 1596356f6debSmrg 159742941e3bSmrg# _LT_CONFIG_STATUS_DECLARATIONS 159842941e3bSmrg# ------------------------------ 159942941e3bSmrg# We delimit libtool config variables with single quotes, so when 160042941e3bSmrg# we write them to config.status, we have to be sure to quote all 160142941e3bSmrg# embedded single quotes properly. In configure, this macro expands 160242941e3bSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 160342941e3bSmrg# 160442941e3bSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 160542941e3bSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 160642941e3bSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 160742941e3bSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1608356f6debSmrg 1609356f6debSmrg 161042941e3bSmrg# _LT_LIBTOOL_TAGS 161142941e3bSmrg# ---------------- 161242941e3bSmrg# Output comment and list of tags supported by the script 161342941e3bSmrgm4_defun([_LT_LIBTOOL_TAGS], 161442941e3bSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 161542941e3bSmrgavailable_tags="_LT_TAGS"dnl 161642941e3bSmrg]) 1617356f6debSmrg 1618356f6debSmrg 161942941e3bSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 162042941e3bSmrg# ----------------------------------- 162142941e3bSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 162242941e3bSmrg# expand to a commented shell variable setting: 1623356f6debSmrg# 162442941e3bSmrg# # Some comment about what VAR is for. 162542941e3bSmrg# visible_name=$lt_internal_name 162642941e3bSmrgm4_define([_LT_LIBTOOL_DECLARE], 162742941e3bSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 162842941e3bSmrg [description])))[]dnl 162942941e3bSmrgm4_pushdef([_libtool_name], 163042941e3bSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 163142941e3bSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 163242941e3bSmrg [0], [_libtool_name=[$]$1], 163342941e3bSmrg [1], [_libtool_name=$lt_[]$1], 163442941e3bSmrg [2], [_libtool_name=$lt_[]$1], 163542941e3bSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 163642941e3bSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 1637356f6debSmrg]) 1638356f6debSmrg 1639356f6debSmrg 164042941e3bSmrg# _LT_LIBTOOL_CONFIG_VARS 164142941e3bSmrg# ----------------------- 164242941e3bSmrg# Produce commented declarations of non-tagged libtool config variables 164342941e3bSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 164442941e3bSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 164542941e3bSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 164642941e3bSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 164742941e3bSmrg[m4_foreach([_lt_var], 164842941e3bSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 164942941e3bSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1650356f6debSmrg 1651356f6debSmrg 165242941e3bSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 165342941e3bSmrg# ------------------------- 165442941e3bSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 165542941e3bSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 165642941e3bSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1657356f6debSmrg 1658356f6debSmrg 165942941e3bSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 166042941e3bSmrg# ------------------------------ 166142941e3bSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1662356f6debSmrg 1663356f6debSmrg 166442941e3bSmrg# _LT_CONFIG_COMMANDS 166542941e3bSmrg# ------------------- 166642941e3bSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 166742941e3bSmrg# variables for single and double quote escaping we saved from calls 166842941e3bSmrg# to _LT_DECL, we can put quote escaped variables declarations 166942941e3bSmrg# into `config.status', and then the shell code to quote escape them in 167042941e3bSmrg# for loops in `config.status'. Finally, any additional code accumulated 167142941e3bSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 167242941e3bSmrgm4_defun([_LT_CONFIG_COMMANDS], 167342941e3bSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 167442941e3bSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 167542941e3bSmrg dnl instead of duplicating it all over again into config.status, 167642941e3bSmrg dnl then we will have config.status run $CONFIG_LT later, so it 167742941e3bSmrg dnl needs to know what name is stored there: 167842941e3bSmrg [AC_CONFIG_COMMANDS([libtool], 167942941e3bSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 168042941e3bSmrg dnl If the libtool generation code is destined for config.status, 168142941e3bSmrg dnl expand the accumulated commands and init code now: 168242941e3bSmrg [AC_CONFIG_COMMANDS([libtool], 168342941e3bSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 168442941e3bSmrg])#_LT_CONFIG_COMMANDS 1685356f6debSmrg 1686356f6debSmrg 168742941e3bSmrg# Initialize. 168842941e3bSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 168942941e3bSmrg[ 16906f03b1f6Smrg 169142941e3bSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 169242941e3bSmrg# if CDPATH is set. 169342941e3bSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1694356f6debSmrg 169542941e3bSmrgsed_quote_subst='$sed_quote_subst' 169642941e3bSmrgdouble_quote_subst='$double_quote_subst' 169742941e3bSmrgdelay_variable_subst='$delay_variable_subst' 169842941e3bSmrg_LT_CONFIG_STATUS_DECLARATIONS 169942941e3bSmrgLTCC='$LTCC' 170042941e3bSmrgLTCFLAGS='$LTCFLAGS' 170142941e3bSmrgcompiler='$compiler_DEFAULT' 1702356f6debSmrg 170342941e3bSmrg# A function that is used when there is no print builtin or printf. 170442941e3bSmrgfunc_fallback_echo () 170542941e3bSmrg{ 170642941e3bSmrg eval 'cat <<_LTECHO_EOF 170742941e3bSmrg\$[]1 170842941e3bSmrg_LTECHO_EOF' 170942941e3bSmrg} 1710356f6debSmrg 171142941e3bSmrg# Quote evaled strings. 171242941e3bSmrgfor var in lt_decl_all_varnames([[ \ 171342941e3bSmrg]], lt_decl_quote_varnames); do 171442941e3bSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 171542941e3bSmrg *[[\\\\\\\`\\"\\\$]]*) 171642941e3bSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 171742941e3bSmrg ;; 171842941e3bSmrg *) 171942941e3bSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 172042941e3bSmrg ;; 172142941e3bSmrg esac 1722356f6debSmrgdone 1723356f6debSmrg 172442941e3bSmrg# Double-quote double-evaled strings. 172542941e3bSmrgfor var in lt_decl_all_varnames([[ \ 172642941e3bSmrg]], lt_decl_dquote_varnames); do 172742941e3bSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 172842941e3bSmrg *[[\\\\\\\`\\"\\\$]]*) 172942941e3bSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 173042941e3bSmrg ;; 173142941e3bSmrg *) 173242941e3bSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 173342941e3bSmrg ;; 173442941e3bSmrg esac 173542941e3bSmrgdone 1736356f6debSmrg 173742941e3bSmrg_LT_OUTPUT_LIBTOOL_INIT 173842941e3bSmrg]) 1739356f6debSmrg 174042941e3bSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 174142941e3bSmrg# ------------------------------------ 174242941e3bSmrg# Generate a child script FILE with all initialization necessary to 174342941e3bSmrg# reuse the environment learned by the parent script, and make the 174442941e3bSmrg# file executable. If COMMENT is supplied, it is inserted after the 174542941e3bSmrg# `#!' sequence but before initialization text begins. After this 174642941e3bSmrg# macro, additional text can be appended to FILE to form the body of 174742941e3bSmrg# the child script. The macro ends with non-zero status if the 174842941e3bSmrg# file could not be fully written (such as if the disk is full). 174942941e3bSmrgm4_ifdef([AS_INIT_GENERATED], 175042941e3bSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 175142941e3bSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 175242941e3bSmrg[m4_require([AS_PREPARE])]dnl 175342941e3bSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 175442941e3bSmrg[lt_write_fail=0 175542941e3bSmrgcat >$1 <<_ASEOF || lt_write_fail=1 175642941e3bSmrg#! $SHELL 175742941e3bSmrg# Generated by $as_me. 175842941e3bSmrg$2 175942941e3bSmrgSHELL=\${CONFIG_SHELL-$SHELL} 176042941e3bSmrgexport SHELL 176142941e3bSmrg_ASEOF 176242941e3bSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 176342941e3bSmrgAS_SHELL_SANITIZE 176442941e3bSmrg_AS_PREPARE 176542941e3bSmrgexec AS_MESSAGE_FD>&1 176642941e3bSmrg_ASEOF 176742941e3bSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 176842941e3bSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1769356f6debSmrg 177042941e3bSmrg# LT_OUTPUT 1771356f6debSmrg# --------- 177242941e3bSmrg# This macro allows early generation of the libtool script (before 177342941e3bSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 177442941e3bSmrg# tests. 177542941e3bSmrgAC_DEFUN([LT_OUTPUT], 177642941e3bSmrg[: ${CONFIG_LT=./config.lt} 177742941e3bSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 177842941e3bSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 177942941e3bSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 1780356f6debSmrg 178142941e3bSmrgcat >>"$CONFIG_LT" <<\_LTEOF 178242941e3bSmrglt_cl_silent=false 178342941e3bSmrgexec AS_MESSAGE_LOG_FD>>config.log 178442941e3bSmrg{ 178542941e3bSmrg echo 178642941e3bSmrg AS_BOX([Running $as_me.]) 178742941e3bSmrg} >&AS_MESSAGE_LOG_FD 1788356f6debSmrg 178942941e3bSmrglt_cl_help="\ 179042941e3bSmrg\`$as_me' creates a local libtool stub from the current configuration, 179142941e3bSmrgfor use in further configure time tests before the real libtool is 179242941e3bSmrggenerated. 17936f03b1f6Smrg 179442941e3bSmrgUsage: $[0] [[OPTIONS]] 17956f03b1f6Smrg 179642941e3bSmrg -h, --help print this help, then exit 179742941e3bSmrg -V, --version print version number, then exit 179842941e3bSmrg -q, --quiet do not print progress messages 179942941e3bSmrg -d, --debug don't remove temporary files 18006f03b1f6Smrg 180142941e3bSmrgReport bugs to <bug-libtool@gnu.org>." 18026f03b1f6Smrg 180342941e3bSmrglt_cl_version="\ 180442941e3bSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 180542941e3bSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 180642941e3bSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 18076f03b1f6Smrg 180842941e3bSmrgCopyright (C) 2010 Free Software Foundation, Inc. 180942941e3bSmrgThis config.lt script is free software; the Free Software Foundation 181042941e3bSmrggives unlimited permision to copy, distribute and modify it." 18116f03b1f6Smrg 181242941e3bSmrgwhile test $[#] != 0 181342941e3bSmrgdo 181442941e3bSmrg case $[1] in 181542941e3bSmrg --version | --v* | -V ) 181642941e3bSmrg echo "$lt_cl_version"; exit 0 ;; 181742941e3bSmrg --help | --h* | -h ) 181842941e3bSmrg echo "$lt_cl_help"; exit 0 ;; 181942941e3bSmrg --debug | --d* | -d ) 182042941e3bSmrg debug=: ;; 182142941e3bSmrg --quiet | --q* | --silent | --s* | -q ) 182242941e3bSmrg lt_cl_silent=: ;; 1823356f6debSmrg 182442941e3bSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 182542941e3bSmrgTry \`$[0] --help' for more information.]) ;; 18266f03b1f6Smrg 182742941e3bSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 182842941e3bSmrgTry \`$[0] --help' for more information.]) ;; 182942941e3bSmrg esac 183042941e3bSmrg shift 183142941e3bSmrgdone 18326f03b1f6Smrg 183342941e3bSmrgif $lt_cl_silent; then 183442941e3bSmrg exec AS_MESSAGE_FD>/dev/null 183542941e3bSmrgfi 183642941e3bSmrg_LTEOF 18376f03b1f6Smrg 183842941e3bSmrgcat >>"$CONFIG_LT" <<_LTEOF 183942941e3bSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 184042941e3bSmrg_LTEOF 18416f03b1f6Smrg 184242941e3bSmrgcat >>"$CONFIG_LT" <<\_LTEOF 184342941e3bSmrgAC_MSG_NOTICE([creating $ofile]) 184442941e3bSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 184542941e3bSmrgAS_EXIT(0) 184642941e3bSmrg_LTEOF 184742941e3bSmrgchmod +x "$CONFIG_LT" 18486f03b1f6Smrg 184942941e3bSmrg# configure is writing to config.log, but config.lt does its own redirection, 185042941e3bSmrg# appending to config.log, which fails on DOS, as config.log is still kept 185142941e3bSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 185242941e3bSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 185342941e3bSmrglt_cl_success=: 185442941e3bSmrgtest "$silent" = yes && 185542941e3bSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 185642941e3bSmrgexec AS_MESSAGE_LOG_FD>/dev/null 185742941e3bSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 185842941e3bSmrgexec AS_MESSAGE_LOG_FD>>config.log 185942941e3bSmrg$lt_cl_success || AS_EXIT(1) 186042941e3bSmrg])# LT_OUTPUT 18616f03b1f6Smrg 18626f03b1f6Smrg 186342941e3bSmrg# _LT_CONFIG(TAG) 186442941e3bSmrg# --------------- 186542941e3bSmrg# If TAG is the built-in tag, create an initial libtool script with a 186642941e3bSmrg# default configuration from the untagged config vars. Otherwise add code 186742941e3bSmrg# to config.status for appending the configuration named by TAG from the 186842941e3bSmrg# matching tagged config vars. 186942941e3bSmrgm4_defun([_LT_CONFIG], 187042941e3bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 187142941e3bSmrg_LT_CONFIG_SAVE_COMMANDS([ 187242941e3bSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 187342941e3bSmrg m4_if(_LT_TAG, [C], [ 187442941e3bSmrg # See if we are running on zsh, and set the options which allow our 187542941e3bSmrg # commands through without removal of \ escapes. 187642941e3bSmrg if test -n "${ZSH_VERSION+set}" ; then 187742941e3bSmrg setopt NO_GLOB_SUBST 187842941e3bSmrg fi 18796f03b1f6Smrg 188042941e3bSmrg cfgfile="${ofile}T" 188142941e3bSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 188242941e3bSmrg $RM "$cfgfile" 18836f03b1f6Smrg 188442941e3bSmrg cat <<_LT_EOF >> "$cfgfile" 188542941e3bSmrg#! $SHELL 18866f03b1f6Smrg 188742941e3bSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 188842941e3bSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 188942941e3bSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 189042941e3bSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 189142941e3bSmrg# 189242941e3bSmrg_LT_COPYING 189342941e3bSmrg_LT_LIBTOOL_TAGS 18946f03b1f6Smrg 189542941e3bSmrg# ### BEGIN LIBTOOL CONFIG 189642941e3bSmrg_LT_LIBTOOL_CONFIG_VARS 189742941e3bSmrg_LT_LIBTOOL_TAG_VARS 189842941e3bSmrg# ### END LIBTOOL CONFIG 18996f03b1f6Smrg 190042941e3bSmrg_LT_EOF 19016f03b1f6Smrg 190242941e3bSmrg case $host_os in 190342941e3bSmrg aix3*) 190442941e3bSmrg cat <<\_LT_EOF >> "$cfgfile" 190542941e3bSmrg# AIX sometimes has problems with the GCC collect2 program. For some 190642941e3bSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 190742941e3bSmrg# vanish in a puff of smoke. 190842941e3bSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 190942941e3bSmrg COLLECT_NAMES= 191042941e3bSmrg export COLLECT_NAMES 191142941e3bSmrgfi 191242941e3bSmrg_LT_EOF 191342941e3bSmrg ;; 191442941e3bSmrg esac 19156f03b1f6Smrg 191642941e3bSmrg _LT_PROG_LTMAIN 19176f03b1f6Smrg 191842941e3bSmrg # We use sed instead of cat because bash on DJGPP gets confused if 191942941e3bSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 192042941e3bSmrg # text mode, it properly converts lines to CR/LF. This bash problem 192142941e3bSmrg # is reportedly fixed, but why not run on old versions too? 192242941e3bSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 192342941e3bSmrg || (rm -f "$cfgfile"; exit 1) 19246f03b1f6Smrg 192542941e3bSmrg _LT_PROG_REPLACE_SHELLFNS 19266f03b1f6Smrg 192742941e3bSmrg mv -f "$cfgfile" "$ofile" || 192842941e3bSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 192942941e3bSmrg chmod +x "$ofile" 193042941e3bSmrg], 193142941e3bSmrg[cat <<_LT_EOF >> "$ofile" 19326f03b1f6Smrg 193342941e3bSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 193442941e3bSmrgdnl in a comment (ie after a #). 193542941e3bSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 193642941e3bSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 193742941e3bSmrg# ### END LIBTOOL TAG CONFIG: $1 193842941e3bSmrg_LT_EOF 193942941e3bSmrg])dnl /m4_if 194042941e3bSmrg], 194142941e3bSmrg[m4_if([$1], [], [ 194242941e3bSmrg PACKAGE='$PACKAGE' 194342941e3bSmrg VERSION='$VERSION' 194442941e3bSmrg TIMESTAMP='$TIMESTAMP' 194542941e3bSmrg RM='$RM' 194642941e3bSmrg ofile='$ofile'], []) 194742941e3bSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 194842941e3bSmrg])# _LT_CONFIG 1949356f6debSmrg 1950356f6debSmrg 195142941e3bSmrg# LT_SUPPORTED_TAG(TAG) 195242941e3bSmrg# --------------------- 195342941e3bSmrg# Trace this macro to discover what tags are supported by the libtool 195442941e3bSmrg# --tag option, using: 195542941e3bSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 195642941e3bSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1957356f6debSmrg 19586f03b1f6Smrg 195942941e3bSmrg# C support is built-in for now 196042941e3bSmrgm4_define([_LT_LANG_C_enabled], []) 196142941e3bSmrgm4_define([_LT_TAGS], []) 1962356f6debSmrg 1963356f6debSmrg 196442941e3bSmrg# LT_LANG(LANG) 196542941e3bSmrg# ------------- 196642941e3bSmrg# Enable libtool support for the given language if not already enabled. 196742941e3bSmrgAC_DEFUN([LT_LANG], 196842941e3bSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 196942941e3bSmrgm4_case([$1], 197042941e3bSmrg [C], [_LT_LANG(C)], 197142941e3bSmrg [C++], [_LT_LANG(CXX)], 197242941e3bSmrg [Java], [_LT_LANG(GCJ)], 197342941e3bSmrg [Fortran 77], [_LT_LANG(F77)], 197442941e3bSmrg [Fortran], [_LT_LANG(FC)], 197542941e3bSmrg [Windows Resource], [_LT_LANG(RC)], 197642941e3bSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 197742941e3bSmrg [_LT_LANG($1)], 197842941e3bSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 197942941e3bSmrg])# LT_LANG 1980356f6debSmrg 1981356f6debSmrg 198242941e3bSmrg# _LT_LANG(LANGNAME) 198342941e3bSmrg# ------------------ 198442941e3bSmrgm4_defun([_LT_LANG], 198542941e3bSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 198642941e3bSmrg [LT_SUPPORTED_TAG([$1])dnl 198742941e3bSmrg m4_append([_LT_TAGS], [$1 ])dnl 198842941e3bSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 198942941e3bSmrg _LT_LANG_$1_CONFIG($1)])dnl 199042941e3bSmrg])# _LT_LANG 1991356f6debSmrg 1992356f6debSmrg 199342941e3bSmrg# _LT_LANG_DEFAULT_CONFIG 199442941e3bSmrg# ----------------------- 199542941e3bSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 199642941e3bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 199742941e3bSmrg [LT_LANG(CXX)], 199842941e3bSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 19996f03b1f6Smrg 200042941e3bSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 200142941e3bSmrg [LT_LANG(F77)], 200242941e3bSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 20036f03b1f6Smrg 200442941e3bSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 200542941e3bSmrg [LT_LANG(FC)], 200642941e3bSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 20076f03b1f6Smrg 200842941e3bSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 200942941e3bSmrgdnl pulling things in needlessly. 201042941e3bSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 201142941e3bSmrg [LT_LANG(GCJ)], 201242941e3bSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 201342941e3bSmrg [LT_LANG(GCJ)], 201442941e3bSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 201542941e3bSmrg [LT_LANG(GCJ)], 201642941e3bSmrg [m4_ifdef([AC_PROG_GCJ], 201742941e3bSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 201842941e3bSmrg m4_ifdef([A][M_PROG_GCJ], 201942941e3bSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 202042941e3bSmrg m4_ifdef([LT_PROG_GCJ], 202142941e3bSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 20226f03b1f6Smrg 202342941e3bSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 202442941e3bSmrg [LT_LANG(RC)], 202542941e3bSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 202642941e3bSmrg])# _LT_LANG_DEFAULT_CONFIG 20276f03b1f6Smrg 202842941e3bSmrg# Obsolete macros: 202942941e3bSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 203042941e3bSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 203142941e3bSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 203242941e3bSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 203342941e3bSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 203442941e3bSmrgdnl aclocal-1.4 backwards compatibility: 203542941e3bSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 203642941e3bSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 203742941e3bSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 203842941e3bSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 203942941e3bSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 204098af18c5Smrg 20416f03b1f6Smrg 204242941e3bSmrg# _LT_TAG_COMPILER 204342941e3bSmrg# ---------------- 204442941e3bSmrgm4_defun([_LT_TAG_COMPILER], 204542941e3bSmrg[AC_REQUIRE([AC_PROG_CC])dnl 2046356f6debSmrg 204742941e3bSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 204842941e3bSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 204942941e3bSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 205042941e3bSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2051356f6debSmrg 205242941e3bSmrg# If no C compiler was specified, use CC. 205342941e3bSmrgLTCC=${LTCC-"$CC"} 2054356f6debSmrg 205542941e3bSmrg# If no C compiler flags were specified, use CFLAGS. 205642941e3bSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2057356f6debSmrg 205842941e3bSmrg# Allow CC to be a program name with arguments. 205942941e3bSmrgcompiler=$CC 206042941e3bSmrg])# _LT_TAG_COMPILER 2061356f6debSmrg 2062356f6debSmrg 206342941e3bSmrg# _LT_COMPILER_BOILERPLATE 206442941e3bSmrg# ------------------------ 206542941e3bSmrg# Check for compiler boilerplate output or warnings with 206642941e3bSmrg# the simple compiler test code. 206742941e3bSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 206842941e3bSmrg[m4_require([_LT_DECL_SED])dnl 206942941e3bSmrgac_outfile=conftest.$ac_objext 207042941e3bSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 207142941e3bSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 207242941e3bSmrg_lt_compiler_boilerplate=`cat conftest.err` 207342941e3bSmrg$RM conftest* 207442941e3bSmrg])# _LT_COMPILER_BOILERPLATE 2075356f6debSmrg 2076356f6debSmrg 207742941e3bSmrg# _LT_LINKER_BOILERPLATE 207842941e3bSmrg# ---------------------- 207942941e3bSmrg# Check for linker boilerplate output or warnings with 208042941e3bSmrg# the simple link test code. 208142941e3bSmrgm4_defun([_LT_LINKER_BOILERPLATE], 208242941e3bSmrg[m4_require([_LT_DECL_SED])dnl 208342941e3bSmrgac_outfile=conftest.$ac_objext 208442941e3bSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 208542941e3bSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 208642941e3bSmrg_lt_linker_boilerplate=`cat conftest.err` 208742941e3bSmrg$RM -r conftest* 208842941e3bSmrg])# _LT_LINKER_BOILERPLATE 2089356f6debSmrg 209042941e3bSmrg# _LT_REQUIRED_DARWIN_CHECKS 209142941e3bSmrg# ------------------------- 209242941e3bSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 209342941e3bSmrg case $host_os in 209442941e3bSmrg rhapsody* | darwin*) 209542941e3bSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 209642941e3bSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 209742941e3bSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 209842941e3bSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 209942941e3bSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 210042941e3bSmrg _LT_DECL([], [DSYMUTIL], [1], 210142941e3bSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 210242941e3bSmrg _LT_DECL([], [NMEDIT], [1], 210342941e3bSmrg [Tool to change global to local symbols on Mac OS X]) 210442941e3bSmrg _LT_DECL([], [LIPO], [1], 210542941e3bSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 210642941e3bSmrg _LT_DECL([], [OTOOL], [1], 210742941e3bSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 210842941e3bSmrg _LT_DECL([], [OTOOL64], [1], 210942941e3bSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2110356f6debSmrg 211142941e3bSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 211242941e3bSmrg [lt_cv_apple_cc_single_mod=no 211342941e3bSmrg if test -z "${LT_MULTI_MODULE}"; then 211442941e3bSmrg # By default we will add the -single_module flag. You can override 211542941e3bSmrg # by either setting the environment variable LT_MULTI_MODULE 211642941e3bSmrg # non-empty at configure time, or by adding -multi_module to the 211742941e3bSmrg # link flags. 211842941e3bSmrg rm -rf libconftest.dylib* 211942941e3bSmrg echo "int foo(void){return 1;}" > conftest.c 212042941e3bSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 212142941e3bSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 212242941e3bSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 212342941e3bSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 212442941e3bSmrg _lt_result=$? 212542941e3bSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 212642941e3bSmrg lt_cv_apple_cc_single_mod=yes 212742941e3bSmrg else 212842941e3bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 212942941e3bSmrg fi 213042941e3bSmrg rm -rf libconftest.dylib* 213142941e3bSmrg rm -f conftest.* 213242941e3bSmrg fi]) 213342941e3bSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 213442941e3bSmrg [lt_cv_ld_exported_symbols_list], 213542941e3bSmrg [lt_cv_ld_exported_symbols_list=no 213642941e3bSmrg save_LDFLAGS=$LDFLAGS 213742941e3bSmrg echo "_main" > conftest.sym 213842941e3bSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 213942941e3bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 214042941e3bSmrg [lt_cv_ld_exported_symbols_list=yes], 214142941e3bSmrg [lt_cv_ld_exported_symbols_list=no]) 214242941e3bSmrg LDFLAGS="$save_LDFLAGS" 214342941e3bSmrg ]) 214442941e3bSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 214542941e3bSmrg [lt_cv_ld_force_load=no 214642941e3bSmrg cat > conftest.c << _LT_EOF 214742941e3bSmrgint forced_loaded() { return 2;} 214842941e3bSmrg_LT_EOF 214942941e3bSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 215042941e3bSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 215142941e3bSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 215242941e3bSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 215342941e3bSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 215442941e3bSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 215542941e3bSmrg cat > conftest.c << _LT_EOF 215642941e3bSmrgint main() { return 0;} 215742941e3bSmrg_LT_EOF 215842941e3bSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 215942941e3bSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 216042941e3bSmrg _lt_result=$? 216142941e3bSmrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 216242941e3bSmrg lt_cv_ld_force_load=yes 216342941e3bSmrg else 216442941e3bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 216542941e3bSmrg fi 216642941e3bSmrg rm -f conftest.err libconftest.a conftest conftest.c 216742941e3bSmrg rm -rf conftest.dSYM 216842941e3bSmrg ]) 216942941e3bSmrg case $host_os in 217042941e3bSmrg rhapsody* | darwin1.[[012]]) 217142941e3bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 217242941e3bSmrg darwin1.*) 217342941e3bSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 217442941e3bSmrg darwin*) # darwin 5.x on 217542941e3bSmrg # if running on 10.5 or later, the deployment target defaults 217642941e3bSmrg # to the OS version, if on x86, and 10.4, the deployment 217742941e3bSmrg # target defaults to 10.4. Don't you love it? 217842941e3bSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 217942941e3bSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 218042941e3bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 218142941e3bSmrg 10.[[012]]*) 218242941e3bSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 218342941e3bSmrg 10.*) 218442941e3bSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 218542941e3bSmrg esac 218642941e3bSmrg ;; 218742941e3bSmrg esac 218842941e3bSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 218942941e3bSmrg _lt_dar_single_mod='$single_module' 219042941e3bSmrg fi 219142941e3bSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 219242941e3bSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 219342941e3bSmrg else 219442941e3bSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 219542941e3bSmrg fi 219642941e3bSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 219742941e3bSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 219842941e3bSmrg else 219942941e3bSmrg _lt_dsymutil= 220042941e3bSmrg fi 220142941e3bSmrg ;; 220242941e3bSmrg esac 2203356f6debSmrg]) 2204356f6debSmrg 2205356f6debSmrg 220642941e3bSmrg# _LT_DARWIN_LINKER_FEATURES 220742941e3bSmrg# -------------------------- 220842941e3bSmrg# Checks for linker and compiler features on darwin 220942941e3bSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 221042941e3bSmrg[ 221142941e3bSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 221242941e3bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 221342941e3bSmrg _LT_TAGVAR(hardcode_direct, $1)=no 221442941e3bSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 221542941e3bSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 221642941e3bSmrg if test "$lt_cv_ld_force_load" = "yes"; then 221742941e3bSmrg _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\"`' 221842941e3bSmrg else 221942941e3bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 222042941e3bSmrg fi 222142941e3bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 222242941e3bSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 222342941e3bSmrg case $cc_basename in 222442941e3bSmrg ifort*) _lt_dar_can_shared=yes ;; 222542941e3bSmrg *) _lt_dar_can_shared=$GCC ;; 222642941e3bSmrg esac 222742941e3bSmrg if test "$_lt_dar_can_shared" = "yes"; then 222842941e3bSmrg output_verbose_link_cmd=func_echo_all 222942941e3bSmrg _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}" 223042941e3bSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 223142941e3bSmrg _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}" 223242941e3bSmrg _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}" 223342941e3bSmrg m4_if([$1], [CXX], 223442941e3bSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 223542941e3bSmrg _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}" 223642941e3bSmrg _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}" 223742941e3bSmrg fi 223842941e3bSmrg],[]) 223942941e3bSmrg else 224042941e3bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 224142941e3bSmrg fi 2242356f6debSmrg]) 2243356f6debSmrg 224442941e3bSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 224542941e3bSmrg# ---------------------------------- 224642941e3bSmrg# Links a minimal program and checks the executable 224742941e3bSmrg# for the system default hardcoded library path. In most cases, 224842941e3bSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 224942941e3bSmrg# the location of the communication and MPI libs are included too. 225042941e3bSmrg# If we don't find anything, use the default library path according 225142941e3bSmrg# to the aix ld manual. 225242941e3bSmrg# Store the results from the different compilers for each TAGNAME. 225342941e3bSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 225442941e3bSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 225542941e3bSmrg[m4_require([_LT_DECL_SED])dnl 225642941e3bSmrgif test "${lt_cv_aix_libpath+set}" = set; then 225742941e3bSmrg aix_libpath=$lt_cv_aix_libpath 225842941e3bSmrgelse 225942941e3bSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 226042941e3bSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 226142941e3bSmrg lt_aix_libpath_sed='[ 226242941e3bSmrg /Import File Strings/,/^$/ { 226342941e3bSmrg /^0/ { 226442941e3bSmrg s/^0 *\([^ ]*\) *$/\1/ 226542941e3bSmrg p 226642941e3bSmrg } 226742941e3bSmrg }]' 226842941e3bSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 226942941e3bSmrg # Check for a 64-bit object if we didn't find anything. 227042941e3bSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 227142941e3bSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 227242941e3bSmrg fi],[]) 227342941e3bSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 227442941e3bSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 227542941e3bSmrg fi 227642941e3bSmrg ]) 227742941e3bSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 227842941e3bSmrgfi 227942941e3bSmrg])# _LT_SYS_MODULE_PATH_AIX 2280356f6debSmrg 2281356f6debSmrg 228242941e3bSmrg# _LT_SHELL_INIT(ARG) 228342941e3bSmrg# ------------------- 228442941e3bSmrgm4_define([_LT_SHELL_INIT], 228542941e3bSmrg[m4_divert_text([M4SH-INIT], [$1 228642941e3bSmrg])])# _LT_SHELL_INIT 2287356f6debSmrg 2288356f6debSmrg 2289356f6debSmrg 229042941e3bSmrg# _LT_PROG_ECHO_BACKSLASH 229142941e3bSmrg# ----------------------- 229242941e3bSmrg# Find how we can fake an echo command that does not interpret backslash. 229342941e3bSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 229442941e3bSmrg# of the generated configure script which will find a shell with a builtin 229542941e3bSmrg# printf (which we can use as an echo command). 229642941e3bSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 229742941e3bSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 229842941e3bSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 229942941e3bSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 230042941e3bSmrg 230142941e3bSmrgAC_MSG_CHECKING([how to print strings]) 230242941e3bSmrg# Test print first, because it will be a builtin if present. 230342941e3bSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 230442941e3bSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 230542941e3bSmrg ECHO='print -r --' 230642941e3bSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 230742941e3bSmrg ECHO='printf %s\n' 230842941e3bSmrgelse 230942941e3bSmrg # Use this function as a fallback that always works. 231042941e3bSmrg func_fallback_echo () 231142941e3bSmrg { 231242941e3bSmrg eval 'cat <<_LTECHO_EOF 231342941e3bSmrg$[]1 231442941e3bSmrg_LTECHO_EOF' 231542941e3bSmrg } 231642941e3bSmrg ECHO='func_fallback_echo' 231742941e3bSmrgfi 2318356f6debSmrg 231942941e3bSmrg# func_echo_all arg... 232042941e3bSmrg# Invoke $ECHO with all args, space-separated. 232142941e3bSmrgfunc_echo_all () 232242941e3bSmrg{ 232342941e3bSmrg $ECHO "$*" 232442941e3bSmrg} 2325356f6debSmrg 232642941e3bSmrgcase "$ECHO" in 232742941e3bSmrg printf*) AC_MSG_RESULT([printf]) ;; 232842941e3bSmrg print*) AC_MSG_RESULT([print -r]) ;; 232942941e3bSmrg *) AC_MSG_RESULT([cat]) ;; 233042941e3bSmrgesac 2331356f6debSmrg 233242941e3bSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 233342941e3bSmrg[_AS_DETECT_SUGGESTED([ 233442941e3bSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 233542941e3bSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 233642941e3bSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 233742941e3bSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 233842941e3bSmrg PATH=/empty FPATH=/empty; export PATH FPATH 233942941e3bSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 234042941e3bSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2341356f6debSmrg 234242941e3bSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 234342941e3bSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 234442941e3bSmrg])# _LT_PROG_ECHO_BACKSLASH 2345356f6debSmrg 2346356f6debSmrg 234742941e3bSmrg# _LT_WITH_SYSROOT 234842941e3bSmrg# ---------------- 234942941e3bSmrgAC_DEFUN([_LT_WITH_SYSROOT], 235042941e3bSmrg[AC_MSG_CHECKING([for sysroot]) 235142941e3bSmrgAC_ARG_WITH([sysroot], 235242941e3bSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 235342941e3bSmrg (or the compiler's sysroot if not specified).], 235442941e3bSmrg[], [with_sysroot=no]) 235542941e3bSmrg 235642941e3bSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 235742941e3bSmrgdnl in case the user passed a directory name. 235842941e3bSmrglt_sysroot= 235942941e3bSmrgcase ${with_sysroot} in #( 236042941e3bSmrg yes) 236142941e3bSmrg if test "$GCC" = yes; then 236242941e3bSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 236342941e3bSmrg fi 236442941e3bSmrg ;; #( 236542941e3bSmrg /*) 236642941e3bSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 236742941e3bSmrg ;; #( 236842941e3bSmrg no|'') 236942941e3bSmrg ;; #( 237042941e3bSmrg *) 237142941e3bSmrg AC_MSG_RESULT([${with_sysroot}]) 237242941e3bSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 237342941e3bSmrg ;; 237442941e3bSmrgesac 2375356f6debSmrg 237642941e3bSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 237742941e3bSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 237842941e3bSmrg[dependent libraries, and in which our libraries should be installed.])]) 2379356f6debSmrg 238042941e3bSmrg# _LT_ENABLE_LOCK 238142941e3bSmrg# --------------- 238242941e3bSmrgm4_defun([_LT_ENABLE_LOCK], 238342941e3bSmrg[AC_ARG_ENABLE([libtool-lock], 238442941e3bSmrg [AS_HELP_STRING([--disable-libtool-lock], 238542941e3bSmrg [avoid locking (might break parallel builds)])]) 238642941e3bSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2387356f6debSmrg 238842941e3bSmrg# Some flags need to be propagated to the compiler or linker for good 238942941e3bSmrg# libtool support. 239042941e3bSmrgcase $host in 239142941e3bSmrgia64-*-hpux*) 239242941e3bSmrg # Find out which ABI we are using. 239342941e3bSmrg echo 'int i;' > conftest.$ac_ext 239442941e3bSmrg if AC_TRY_EVAL(ac_compile); then 239542941e3bSmrg case `/usr/bin/file conftest.$ac_objext` in 239642941e3bSmrg *ELF-32*) 239742941e3bSmrg HPUX_IA64_MODE="32" 239842941e3bSmrg ;; 239942941e3bSmrg *ELF-64*) 240042941e3bSmrg HPUX_IA64_MODE="64" 240142941e3bSmrg ;; 240242941e3bSmrg esac 240342941e3bSmrg fi 240442941e3bSmrg rm -rf conftest* 240542941e3bSmrg ;; 240642941e3bSmrg*-*-irix6*) 240742941e3bSmrg # Find out which ABI we are using. 240842941e3bSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 240942941e3bSmrg if AC_TRY_EVAL(ac_compile); then 241042941e3bSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 241142941e3bSmrg case `/usr/bin/file conftest.$ac_objext` in 241242941e3bSmrg *32-bit*) 241342941e3bSmrg LD="${LD-ld} -melf32bsmip" 241442941e3bSmrg ;; 241542941e3bSmrg *N32*) 241642941e3bSmrg LD="${LD-ld} -melf32bmipn32" 241742941e3bSmrg ;; 241842941e3bSmrg *64-bit*) 241942941e3bSmrg LD="${LD-ld} -melf64bmip" 242042941e3bSmrg ;; 242142941e3bSmrg esac 242242941e3bSmrg else 242342941e3bSmrg case `/usr/bin/file conftest.$ac_objext` in 242442941e3bSmrg *32-bit*) 242542941e3bSmrg LD="${LD-ld} -32" 242642941e3bSmrg ;; 242742941e3bSmrg *N32*) 242842941e3bSmrg LD="${LD-ld} -n32" 242942941e3bSmrg ;; 243042941e3bSmrg *64-bit*) 243142941e3bSmrg LD="${LD-ld} -64" 243242941e3bSmrg ;; 243342941e3bSmrg esac 243442941e3bSmrg fi 243542941e3bSmrg fi 243642941e3bSmrg rm -rf conftest* 2437356f6debSmrg ;; 2438356f6debSmrg 243942941e3bSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 244042941e3bSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 244142941e3bSmrg # Find out which ABI we are using. 244242941e3bSmrg echo 'int i;' > conftest.$ac_ext 244342941e3bSmrg if AC_TRY_EVAL(ac_compile); then 244442941e3bSmrg case `/usr/bin/file conftest.o` in 244542941e3bSmrg *32-bit*) 244642941e3bSmrg case $host in 244742941e3bSmrg x86_64-*kfreebsd*-gnu) 244842941e3bSmrg LD="${LD-ld} -m elf_i386_fbsd" 244942941e3bSmrg ;; 245042941e3bSmrg x86_64-*linux*) 245142941e3bSmrg LD="${LD-ld} -m elf_i386" 245242941e3bSmrg ;; 245342941e3bSmrg ppc64-*linux*|powerpc64-*linux*) 245442941e3bSmrg LD="${LD-ld} -m elf32ppclinux" 245542941e3bSmrg ;; 245642941e3bSmrg s390x-*linux*) 245742941e3bSmrg LD="${LD-ld} -m elf_s390" 245842941e3bSmrg ;; 245942941e3bSmrg sparc64-*linux*) 246042941e3bSmrg LD="${LD-ld} -m elf32_sparc" 246142941e3bSmrg ;; 246242941e3bSmrg esac 246342941e3bSmrg ;; 246442941e3bSmrg *64-bit*) 246542941e3bSmrg case $host in 246642941e3bSmrg x86_64-*kfreebsd*-gnu) 246742941e3bSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 246842941e3bSmrg ;; 246942941e3bSmrg x86_64-*linux*) 247042941e3bSmrg LD="${LD-ld} -m elf_x86_64" 247142941e3bSmrg ;; 247242941e3bSmrg ppc*-*linux*|powerpc*-*linux*) 247342941e3bSmrg LD="${LD-ld} -m elf64ppc" 247442941e3bSmrg ;; 247542941e3bSmrg s390*-*linux*|s390*-*tpf*) 247642941e3bSmrg LD="${LD-ld} -m elf64_s390" 247742941e3bSmrg ;; 247842941e3bSmrg sparc*-*linux*) 247942941e3bSmrg LD="${LD-ld} -m elf64_sparc" 248042941e3bSmrg ;; 248142941e3bSmrg esac 248242941e3bSmrg ;; 248342941e3bSmrg esac 248442941e3bSmrg fi 248542941e3bSmrg rm -rf conftest* 248642941e3bSmrg ;; 2487356f6debSmrg 248842941e3bSmrg*-*-sco3.2v5*) 248942941e3bSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 249042941e3bSmrg SAVE_CFLAGS="$CFLAGS" 249142941e3bSmrg CFLAGS="$CFLAGS -belf" 249242941e3bSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 249342941e3bSmrg [AC_LANG_PUSH(C) 249442941e3bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 249542941e3bSmrg AC_LANG_POP]) 249642941e3bSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 249742941e3bSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 249842941e3bSmrg CFLAGS="$SAVE_CFLAGS" 249942941e3bSmrg fi 250042941e3bSmrg ;; 250142941e3bSmrgsparc*-*solaris*) 250242941e3bSmrg # Find out which ABI we are using. 250342941e3bSmrg echo 'int i;' > conftest.$ac_ext 250442941e3bSmrg if AC_TRY_EVAL(ac_compile); then 250542941e3bSmrg case `/usr/bin/file conftest.o` in 250642941e3bSmrg *64-bit*) 250742941e3bSmrg case $lt_cv_prog_gnu_ld in 250842941e3bSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 250942941e3bSmrg *) 251042941e3bSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 251142941e3bSmrg LD="${LD-ld} -64" 251242941e3bSmrg fi 251342941e3bSmrg ;; 251442941e3bSmrg esac 251542941e3bSmrg ;; 251642941e3bSmrg esac 251742941e3bSmrg fi 251842941e3bSmrg rm -rf conftest* 251942941e3bSmrg ;; 252042941e3bSmrgesac 2521356f6debSmrg 252242941e3bSmrgneed_locks="$enable_libtool_lock" 252342941e3bSmrg])# _LT_ENABLE_LOCK 2524356f6debSmrg 2525356f6debSmrg 252642941e3bSmrg# _LT_PROG_AR 252742941e3bSmrg# ----------- 252842941e3bSmrgm4_defun([_LT_PROG_AR], 252942941e3bSmrg[AC_CHECK_TOOLS(AR, [ar], false) 253042941e3bSmrg: ${AR=ar} 253142941e3bSmrg: ${AR_FLAGS=cru} 253242941e3bSmrg_LT_DECL([], [AR], [1], [The archiver]) 253342941e3bSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 253442941e3bSmrg 253542941e3bSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 253642941e3bSmrg [lt_cv_ar_at_file=no 253742941e3bSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 253842941e3bSmrg [echo conftest.$ac_objext > conftest.lst 253942941e3bSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 254042941e3bSmrg AC_TRY_EVAL([lt_ar_try]) 254142941e3bSmrg if test "$ac_status" -eq 0; then 254242941e3bSmrg # Ensure the archiver fails upon bogus file names. 254342941e3bSmrg rm -f conftest.$ac_objext libconftest.a 254442941e3bSmrg AC_TRY_EVAL([lt_ar_try]) 254542941e3bSmrg if test "$ac_status" -ne 0; then 254642941e3bSmrg lt_cv_ar_at_file=@ 254742941e3bSmrg fi 254842941e3bSmrg fi 254942941e3bSmrg rm -f conftest.* libconftest.a 255042941e3bSmrg ]) 255142941e3bSmrg ]) 2552356f6debSmrg 255342941e3bSmrgif test "x$lt_cv_ar_at_file" = xno; then 255442941e3bSmrg archiver_list_spec= 255542941e3bSmrgelse 255642941e3bSmrg archiver_list_spec=$lt_cv_ar_at_file 255742941e3bSmrgfi 255842941e3bSmrg_LT_DECL([], [archiver_list_spec], [1], 255942941e3bSmrg [How to feed a file listing to the archiver]) 256042941e3bSmrg])# _LT_PROG_AR 2561356f6debSmrg 2562356f6debSmrg 256342941e3bSmrg# _LT_CMD_OLD_ARCHIVE 256442941e3bSmrg# ------------------- 256542941e3bSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 256642941e3bSmrg[_LT_PROG_AR 2567356f6debSmrg 256842941e3bSmrgAC_CHECK_TOOL(STRIP, strip, :) 256942941e3bSmrgtest -z "$STRIP" && STRIP=: 257042941e3bSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2571356f6debSmrg 257242941e3bSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 257342941e3bSmrgtest -z "$RANLIB" && RANLIB=: 257442941e3bSmrg_LT_DECL([], [RANLIB], [1], 257542941e3bSmrg [Commands used to install an old-style archive]) 2576356f6debSmrg 257742941e3bSmrg# Determine commands to create old-style static archives. 257842941e3bSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 257942941e3bSmrgold_postinstall_cmds='chmod 644 $oldlib' 258042941e3bSmrgold_postuninstall_cmds= 2581356f6debSmrg 258242941e3bSmrgif test -n "$RANLIB"; then 258342941e3bSmrg case $host_os in 258442941e3bSmrg openbsd*) 258542941e3bSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 258642941e3bSmrg ;; 258742941e3bSmrg *) 258842941e3bSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 258942941e3bSmrg ;; 2590356f6debSmrg esac 259142941e3bSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 2592356f6debSmrgfi 2593356f6debSmrg 259442941e3bSmrgcase $host_os in 259542941e3bSmrg darwin*) 259642941e3bSmrg lock_old_archive_extraction=yes ;; 259742941e3bSmrg *) 259842941e3bSmrg lock_old_archive_extraction=no ;; 259942941e3bSmrgesac 260042941e3bSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 260142941e3bSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 260242941e3bSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 260342941e3bSmrg [Commands used to build an old-style archive]) 260442941e3bSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 260542941e3bSmrg [Whether to use a lock for old archive extraction]) 260642941e3bSmrg])# _LT_CMD_OLD_ARCHIVE 2607356f6debSmrg 2608356f6debSmrg 260942941e3bSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 261042941e3bSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 261142941e3bSmrg# ---------------------------------------------------------------- 261242941e3bSmrg# Check whether the given compiler option works 261342941e3bSmrgAC_DEFUN([_LT_COMPILER_OPTION], 2614356f6debSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 261542941e3bSmrgm4_require([_LT_DECL_SED])dnl 261642941e3bSmrgAC_CACHE_CHECK([$1], [$2], 261742941e3bSmrg [$2=no 261842941e3bSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 261942941e3bSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 262042941e3bSmrg lt_compiler_flag="$3" 262142941e3bSmrg # Insert the option either (1) after the last *FLAGS variable, or 262242941e3bSmrg # (2) before a word containing "conftest.", or (3) at the end. 262342941e3bSmrg # Note that $ac_compile itself does not contain backslashes and begins 262442941e3bSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 262542941e3bSmrg # The option is referenced via a variable to avoid confusing sed. 262642941e3bSmrg lt_compile=`echo "$ac_compile" | $SED \ 262742941e3bSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 262842941e3bSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 262942941e3bSmrg -e 's:$: $lt_compiler_flag:'` 263042941e3bSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 263142941e3bSmrg (eval "$lt_compile" 2>conftest.err) 263242941e3bSmrg ac_status=$? 263342941e3bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 263442941e3bSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 263542941e3bSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 263642941e3bSmrg # The compiler can only warn and ignore the option if not recognized 263742941e3bSmrg # So say no if there are warnings other than the usual output. 263842941e3bSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 263942941e3bSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 264042941e3bSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 264142941e3bSmrg $2=yes 264242941e3bSmrg fi 264342941e3bSmrg fi 264442941e3bSmrg $RM conftest* 264542941e3bSmrg]) 2646356f6debSmrg 264742941e3bSmrgif test x"[$]$2" = xyes; then 264842941e3bSmrg m4_if([$5], , :, [$5]) 264942941e3bSmrgelse 265042941e3bSmrg m4_if([$6], , :, [$6]) 2651356f6debSmrgfi 265242941e3bSmrg])# _LT_COMPILER_OPTION 2653356f6debSmrg 265442941e3bSmrg# Old name: 265542941e3bSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 265642941e3bSmrgdnl aclocal-1.4 backwards compatibility: 265742941e3bSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2658356f6debSmrg 2659356f6debSmrg 266042941e3bSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 266142941e3bSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 266242941e3bSmrg# ---------------------------------------------------- 266342941e3bSmrg# Check whether the given linker option works 266442941e3bSmrgAC_DEFUN([_LT_LINKER_OPTION], 266542941e3bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 266642941e3bSmrgm4_require([_LT_DECL_SED])dnl 266742941e3bSmrgAC_CACHE_CHECK([$1], [$2], 266842941e3bSmrg [$2=no 266942941e3bSmrg save_LDFLAGS="$LDFLAGS" 267042941e3bSmrg LDFLAGS="$LDFLAGS $3" 267142941e3bSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 267242941e3bSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 267342941e3bSmrg # The linker can only warn and ignore the option if not recognized 267442941e3bSmrg # So say no if there are warnings 267542941e3bSmrg if test -s conftest.err; then 267642941e3bSmrg # Append any errors to the config.log. 267742941e3bSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 267842941e3bSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 267942941e3bSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 268042941e3bSmrg if diff conftest.exp conftest.er2 >/dev/null; then 268142941e3bSmrg $2=yes 268242941e3bSmrg fi 268342941e3bSmrg else 268442941e3bSmrg $2=yes 268542941e3bSmrg fi 268642941e3bSmrg fi 268742941e3bSmrg $RM -r conftest* 268842941e3bSmrg LDFLAGS="$save_LDFLAGS" 268942941e3bSmrg]) 2690356f6debSmrg 269142941e3bSmrgif test x"[$]$2" = xyes; then 269242941e3bSmrg m4_if([$4], , :, [$4]) 269342941e3bSmrgelse 269442941e3bSmrg m4_if([$5], , :, [$5]) 269542941e3bSmrgfi 269642941e3bSmrg])# _LT_LINKER_OPTION 2697356f6debSmrg 269842941e3bSmrg# Old name: 269942941e3bSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 270042941e3bSmrgdnl aclocal-1.4 backwards compatibility: 270142941e3bSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2702356f6debSmrg 2703356f6debSmrg 270442941e3bSmrg# LT_CMD_MAX_LEN 270542941e3bSmrg#--------------- 270642941e3bSmrgAC_DEFUN([LT_CMD_MAX_LEN], 270742941e3bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 270842941e3bSmrg# find the maximum length of command line arguments 270942941e3bSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 271042941e3bSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 271142941e3bSmrg i=0 271242941e3bSmrg teststring="ABCD" 2713356f6debSmrg 271442941e3bSmrg case $build_os in 271542941e3bSmrg msdosdjgpp*) 271642941e3bSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 271742941e3bSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 271842941e3bSmrg # during glob expansion). Even if it were fixed, the result of this 271942941e3bSmrg # check would be larger than it should be. 272042941e3bSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 272142941e3bSmrg ;; 2722356f6debSmrg 272342941e3bSmrg gnu*) 272442941e3bSmrg # Under GNU Hurd, this test is not required because there is 272542941e3bSmrg # no limit to the length of command line arguments. 272642941e3bSmrg # Libtool will interpret -1 as no limit whatsoever 272742941e3bSmrg lt_cv_sys_max_cmd_len=-1; 272842941e3bSmrg ;; 2729356f6debSmrg 273042941e3bSmrg cygwin* | mingw* | cegcc*) 273142941e3bSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 273242941e3bSmrg # about 5 minutes as the teststring grows exponentially. 273342941e3bSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 273442941e3bSmrg # you end up with a "frozen" computer, even though with patience 273542941e3bSmrg # the test eventually succeeds (with a max line length of 256k). 273642941e3bSmrg # Instead, let's just punt: use the minimum linelength reported by 273742941e3bSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 273842941e3bSmrg lt_cv_sys_max_cmd_len=8192; 273942941e3bSmrg ;; 2740356f6debSmrg 274142941e3bSmrg mint*) 274242941e3bSmrg # On MiNT this can take a long time and run out of memory. 274342941e3bSmrg lt_cv_sys_max_cmd_len=8192; 274442941e3bSmrg ;; 2745356f6debSmrg 274642941e3bSmrg amigaos*) 274742941e3bSmrg # On AmigaOS with pdksh, this test takes hours, literally. 274842941e3bSmrg # So we just punt and use a minimum line length of 8192. 274942941e3bSmrg lt_cv_sys_max_cmd_len=8192; 275042941e3bSmrg ;; 2751356f6debSmrg 275242941e3bSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 275342941e3bSmrg # This has been around since 386BSD, at least. Likely further. 275442941e3bSmrg if test -x /sbin/sysctl; then 275542941e3bSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 275642941e3bSmrg elif test -x /usr/sbin/sysctl; then 275742941e3bSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 275842941e3bSmrg else 275942941e3bSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 276042941e3bSmrg fi 276142941e3bSmrg # And add a safety zone 276242941e3bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 276342941e3bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 276442941e3bSmrg ;; 2765356f6debSmrg 276642941e3bSmrg interix*) 276742941e3bSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 276842941e3bSmrg lt_cv_sys_max_cmd_len=196608 276942941e3bSmrg ;; 2770356f6debSmrg 277142941e3bSmrg osf*) 277242941e3bSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 277342941e3bSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 277442941e3bSmrg # nice to cause kernel panics so lets avoid the loop below. 277542941e3bSmrg # First set a reasonable default. 277642941e3bSmrg lt_cv_sys_max_cmd_len=16384 277742941e3bSmrg # 277842941e3bSmrg if test -x /sbin/sysconfig; then 277942941e3bSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 278042941e3bSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 278142941e3bSmrg esac 278242941e3bSmrg fi 278342941e3bSmrg ;; 278442941e3bSmrg sco3.2v5*) 278542941e3bSmrg lt_cv_sys_max_cmd_len=102400 278642941e3bSmrg ;; 278742941e3bSmrg sysv5* | sco5v6* | sysv4.2uw2*) 278842941e3bSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 278942941e3bSmrg if test -n "$kargmax"; then 279042941e3bSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 279142941e3bSmrg else 279242941e3bSmrg lt_cv_sys_max_cmd_len=32768 279342941e3bSmrg fi 279442941e3bSmrg ;; 279542941e3bSmrg *) 279642941e3bSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 279742941e3bSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 279842941e3bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 279942941e3bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 280042941e3bSmrg else 280142941e3bSmrg # Make teststring a little bigger before we do anything with it. 280242941e3bSmrg # a 1K string should be a reasonable start. 280342941e3bSmrg for i in 1 2 3 4 5 6 7 8 ; do 280442941e3bSmrg teststring=$teststring$teststring 280542941e3bSmrg done 280642941e3bSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 280742941e3bSmrg # If test is not a shell built-in, we'll probably end up computing a 280842941e3bSmrg # maximum length that is only half of the actual maximum length, but 280942941e3bSmrg # we can't tell. 281042941e3bSmrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 281142941e3bSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 281242941e3bSmrg test $i != 17 # 1/2 MB should be enough 281342941e3bSmrg do 281442941e3bSmrg i=`expr $i + 1` 281542941e3bSmrg teststring=$teststring$teststring 281642941e3bSmrg done 281742941e3bSmrg # Only check the string length outside the loop. 281842941e3bSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 281942941e3bSmrg teststring= 282042941e3bSmrg # Add a significant safety factor because C++ compilers can tack on 282142941e3bSmrg # massive amounts of additional arguments before passing them to the 282242941e3bSmrg # linker. It appears as though 1/2 is a usable value. 282342941e3bSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 282442941e3bSmrg fi 282542941e3bSmrg ;; 282642941e3bSmrg esac 282742941e3bSmrg]) 282842941e3bSmrgif test -n $lt_cv_sys_max_cmd_len ; then 282942941e3bSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 283042941e3bSmrgelse 283142941e3bSmrg AC_MSG_RESULT(none) 283242941e3bSmrgfi 283342941e3bSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 283442941e3bSmrg_LT_DECL([], [max_cmd_len], [0], 283542941e3bSmrg [What is the maximum length of a command?]) 283642941e3bSmrg])# LT_CMD_MAX_LEN 2837356f6debSmrg 283842941e3bSmrg# Old name: 283942941e3bSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 284042941e3bSmrgdnl aclocal-1.4 backwards compatibility: 284142941e3bSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2842356f6debSmrg 2843356f6debSmrg 284442941e3bSmrg# _LT_HEADER_DLFCN 284542941e3bSmrg# ---------------- 284642941e3bSmrgm4_defun([_LT_HEADER_DLFCN], 284742941e3bSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 284842941e3bSmrg])# _LT_HEADER_DLFCN 2849356f6debSmrg 2850356f6debSmrg 285142941e3bSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 285242941e3bSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 285342941e3bSmrg# ---------------------------------------------------------------- 285442941e3bSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 285542941e3bSmrg[m4_require([_LT_HEADER_DLFCN])dnl 285642941e3bSmrgif test "$cross_compiling" = yes; then : 285742941e3bSmrg [$4] 285842941e3bSmrgelse 285942941e3bSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 286042941e3bSmrg lt_status=$lt_dlunknown 286142941e3bSmrg cat > conftest.$ac_ext <<_LT_EOF 286242941e3bSmrg[#line $LINENO "configure" 286342941e3bSmrg#include "confdefs.h" 2864356f6debSmrg 286542941e3bSmrg#if HAVE_DLFCN_H 286642941e3bSmrg#include <dlfcn.h> 286742941e3bSmrg#endif 2868356f6debSmrg 286942941e3bSmrg#include <stdio.h> 2870356f6debSmrg 287142941e3bSmrg#ifdef RTLD_GLOBAL 287242941e3bSmrg# define LT_DLGLOBAL RTLD_GLOBAL 287342941e3bSmrg#else 287442941e3bSmrg# ifdef DL_GLOBAL 287542941e3bSmrg# define LT_DLGLOBAL DL_GLOBAL 287642941e3bSmrg# else 287742941e3bSmrg# define LT_DLGLOBAL 0 287842941e3bSmrg# endif 287942941e3bSmrg#endif 2880356f6debSmrg 288142941e3bSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 288242941e3bSmrg find out it does not work in some platform. */ 288342941e3bSmrg#ifndef LT_DLLAZY_OR_NOW 288442941e3bSmrg# ifdef RTLD_LAZY 288542941e3bSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 288642941e3bSmrg# else 288742941e3bSmrg# ifdef DL_LAZY 288842941e3bSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 288942941e3bSmrg# else 289042941e3bSmrg# ifdef RTLD_NOW 289142941e3bSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 289242941e3bSmrg# else 289342941e3bSmrg# ifdef DL_NOW 289442941e3bSmrg# define LT_DLLAZY_OR_NOW DL_NOW 289542941e3bSmrg# else 289642941e3bSmrg# define LT_DLLAZY_OR_NOW 0 289742941e3bSmrg# endif 289842941e3bSmrg# endif 289942941e3bSmrg# endif 290042941e3bSmrg# endif 290142941e3bSmrg#endif 2902356f6debSmrg 290342941e3bSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 290442941e3bSmrg correspondingly for the symbols needed. */ 290542941e3bSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 290642941e3bSmrgint fnord () __attribute__((visibility("default"))); 290742941e3bSmrg#endif 2908356f6debSmrg 290942941e3bSmrgint fnord () { return 42; } 291042941e3bSmrgint main () 291142941e3bSmrg{ 291242941e3bSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 291342941e3bSmrg int status = $lt_dlunknown; 2914356f6debSmrg 291542941e3bSmrg if (self) 291642941e3bSmrg { 291742941e3bSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 291842941e3bSmrg else 291942941e3bSmrg { 292042941e3bSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 292142941e3bSmrg else puts (dlerror ()); 292242941e3bSmrg } 292342941e3bSmrg /* dlclose (self); */ 292442941e3bSmrg } 292542941e3bSmrg else 292642941e3bSmrg puts (dlerror ()); 2927356f6debSmrg 292842941e3bSmrg return status; 292942941e3bSmrg}] 293042941e3bSmrg_LT_EOF 293142941e3bSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 293242941e3bSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 293342941e3bSmrg lt_status=$? 293442941e3bSmrg case x$lt_status in 293542941e3bSmrg x$lt_dlno_uscore) $1 ;; 293642941e3bSmrg x$lt_dlneed_uscore) $2 ;; 293742941e3bSmrg x$lt_dlunknown|x*) $3 ;; 293842941e3bSmrg esac 293942941e3bSmrg else : 294042941e3bSmrg # compilation failed 294142941e3bSmrg $3 294242941e3bSmrg fi 294342941e3bSmrgfi 294442941e3bSmrgrm -fr conftest* 294542941e3bSmrg])# _LT_TRY_DLOPEN_SELF 2946356f6debSmrg 2947356f6debSmrg 294842941e3bSmrg# LT_SYS_DLOPEN_SELF 294942941e3bSmrg# ------------------ 295042941e3bSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 295142941e3bSmrg[m4_require([_LT_HEADER_DLFCN])dnl 295242941e3bSmrgif test "x$enable_dlopen" != xyes; then 295342941e3bSmrg enable_dlopen=unknown 295442941e3bSmrg enable_dlopen_self=unknown 295542941e3bSmrg enable_dlopen_self_static=unknown 295642941e3bSmrgelse 295742941e3bSmrg lt_cv_dlopen=no 295842941e3bSmrg lt_cv_dlopen_libs= 2959356f6debSmrg 2960356f6debSmrg case $host_os in 296142941e3bSmrg beos*) 296242941e3bSmrg lt_cv_dlopen="load_add_on" 296342941e3bSmrg lt_cv_dlopen_libs= 296442941e3bSmrg lt_cv_dlopen_self=yes 296542941e3bSmrg ;; 2966356f6debSmrg 296742941e3bSmrg mingw* | pw32* | cegcc*) 296842941e3bSmrg lt_cv_dlopen="LoadLibrary" 296942941e3bSmrg lt_cv_dlopen_libs= 2970356f6debSmrg ;; 297142941e3bSmrg 297242941e3bSmrg cygwin*) 297342941e3bSmrg lt_cv_dlopen="dlopen" 297442941e3bSmrg lt_cv_dlopen_libs= 2975356f6debSmrg ;; 2976356f6debSmrg 297742941e3bSmrg darwin*) 297842941e3bSmrg # if libdl is installed we need to link against it 297942941e3bSmrg AC_CHECK_LIB([dl], [dlopen], 298042941e3bSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 298142941e3bSmrg lt_cv_dlopen="dyld" 298242941e3bSmrg lt_cv_dlopen_libs= 298342941e3bSmrg lt_cv_dlopen_self=yes 298442941e3bSmrg ]) 298542941e3bSmrg ;; 2986356f6debSmrg 298742941e3bSmrg *) 298842941e3bSmrg AC_CHECK_FUNC([shl_load], 298942941e3bSmrg [lt_cv_dlopen="shl_load"], 299042941e3bSmrg [AC_CHECK_LIB([dld], [shl_load], 299142941e3bSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 299242941e3bSmrg [AC_CHECK_FUNC([dlopen], 299342941e3bSmrg [lt_cv_dlopen="dlopen"], 299442941e3bSmrg [AC_CHECK_LIB([dl], [dlopen], 299542941e3bSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 299642941e3bSmrg [AC_CHECK_LIB([svld], [dlopen], 299742941e3bSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 299842941e3bSmrg [AC_CHECK_LIB([dld], [dld_link], 299942941e3bSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 300042941e3bSmrg ]) 300142941e3bSmrg ]) 300242941e3bSmrg ]) 300342941e3bSmrg ]) 300442941e3bSmrg ]) 300542941e3bSmrg ;; 3006356f6debSmrg esac 300742941e3bSmrg 300842941e3bSmrg if test "x$lt_cv_dlopen" != xno; then 300942941e3bSmrg enable_dlopen=yes 3010356f6debSmrg else 301142941e3bSmrg enable_dlopen=no 3012356f6debSmrg fi 30136f03b1f6Smrg 301442941e3bSmrg case $lt_cv_dlopen in 301542941e3bSmrg dlopen) 301642941e3bSmrg save_CPPFLAGS="$CPPFLAGS" 301742941e3bSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 30186f03b1f6Smrg 301942941e3bSmrg save_LDFLAGS="$LDFLAGS" 302042941e3bSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 30216f03b1f6Smrg 302242941e3bSmrg save_LIBS="$LIBS" 302342941e3bSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 30246f03b1f6Smrg 302542941e3bSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 302642941e3bSmrg lt_cv_dlopen_self, [dnl 302742941e3bSmrg _LT_TRY_DLOPEN_SELF( 302842941e3bSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 302942941e3bSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 303042941e3bSmrg ]) 30316f03b1f6Smrg 303242941e3bSmrg if test "x$lt_cv_dlopen_self" = xyes; then 303342941e3bSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 303442941e3bSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 303542941e3bSmrg lt_cv_dlopen_self_static, [dnl 303642941e3bSmrg _LT_TRY_DLOPEN_SELF( 303742941e3bSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 303842941e3bSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 303942941e3bSmrg ]) 304042941e3bSmrg fi 30416f03b1f6Smrg 304242941e3bSmrg CPPFLAGS="$save_CPPFLAGS" 304342941e3bSmrg LDFLAGS="$save_LDFLAGS" 304442941e3bSmrg LIBS="$save_LIBS" 304542941e3bSmrg ;; 304642941e3bSmrg esac 3047356f6debSmrg 304842941e3bSmrg case $lt_cv_dlopen_self in 304942941e3bSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 305042941e3bSmrg *) enable_dlopen_self=unknown ;; 305142941e3bSmrg esac 30526f03b1f6Smrg 305342941e3bSmrg case $lt_cv_dlopen_self_static in 305442941e3bSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 305542941e3bSmrg *) enable_dlopen_self_static=unknown ;; 305642941e3bSmrg esac 305798af18c5Smrgfi 305842941e3bSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 305942941e3bSmrg [Whether dlopen is supported]) 306042941e3bSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 306142941e3bSmrg [Whether dlopen of programs is supported]) 306242941e3bSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 306342941e3bSmrg [Whether dlopen of statically linked programs is supported]) 306442941e3bSmrg])# LT_SYS_DLOPEN_SELF 30656f03b1f6Smrg 306642941e3bSmrg# Old name: 306742941e3bSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 306842941e3bSmrgdnl aclocal-1.4 backwards compatibility: 306942941e3bSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 30706f03b1f6Smrg 30716f03b1f6Smrg 307242941e3bSmrg# _LT_COMPILER_C_O([TAGNAME]) 307342941e3bSmrg# --------------------------- 307442941e3bSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 307542941e3bSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 307642941e3bSmrgm4_defun([_LT_COMPILER_C_O], 307742941e3bSmrg[m4_require([_LT_DECL_SED])dnl 307842941e3bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 307942941e3bSmrgm4_require([_LT_TAG_COMPILER])dnl 308042941e3bSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 308142941e3bSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 308242941e3bSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 308342941e3bSmrg $RM -r conftest 2>/dev/null 308442941e3bSmrg mkdir conftest 308542941e3bSmrg cd conftest 308642941e3bSmrg mkdir out 308798af18c5Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 308842941e3bSmrg 308942941e3bSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 309098af18c5Smrg # Insert the option either (1) after the last *FLAGS variable, or 309198af18c5Smrg # (2) before a word containing "conftest.", or (3) at the end. 309298af18c5Smrg # Note that $ac_compile itself does not contain backslashes and begins 309398af18c5Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 309498af18c5Smrg lt_compile=`echo "$ac_compile" | $SED \ 309598af18c5Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 309698af18c5Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 309798af18c5Smrg -e 's:$: $lt_compiler_flag:'` 309842941e3bSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 309942941e3bSmrg (eval "$lt_compile" 2>out/conftest.err) 310098af18c5Smrg ac_status=$? 310142941e3bSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 310242941e3bSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 310342941e3bSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 310442941e3bSmrg then 310598af18c5Smrg # The compiler can only warn and ignore the option if not recognized 310642941e3bSmrg # So say no if there are warnings 310742941e3bSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 310842941e3bSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 310942941e3bSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 311042941e3bSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 311198af18c5Smrg fi 311298af18c5Smrg fi 311342941e3bSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 311442941e3bSmrg $RM conftest* 311542941e3bSmrg # SGI C++ compiler will create directory out/ii_files/ for 311642941e3bSmrg # template instantiation 311742941e3bSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 311842941e3bSmrg $RM out/* && rmdir out 311942941e3bSmrg cd .. 312042941e3bSmrg $RM -r conftest 3121356f6debSmrg $RM conftest* 312298af18c5Smrg]) 312342941e3bSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 312442941e3bSmrg [Does compiler simultaneously support -c and -o options?]) 312542941e3bSmrg])# _LT_COMPILER_C_O 31266f03b1f6Smrg 31276f03b1f6Smrg 312842941e3bSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 312942941e3bSmrg# ---------------------------------- 313042941e3bSmrg# Check to see if we can do hard links to lock some files if needed 313142941e3bSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 313242941e3bSmrg[m4_require([_LT_ENABLE_LOCK])dnl 313342941e3bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 313442941e3bSmrg_LT_COMPILER_C_O([$1]) 3135356f6debSmrg 313642941e3bSmrghard_links="nottested" 313742941e3bSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 313842941e3bSmrg # do not overwrite the value of need_locks provided by the user 313942941e3bSmrg AC_MSG_CHECKING([if we can lock with hard links]) 314042941e3bSmrg hard_links=yes 314142941e3bSmrg $RM conftest* 314242941e3bSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 314342941e3bSmrg touch conftest.a 314442941e3bSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 314542941e3bSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 314642941e3bSmrg AC_MSG_RESULT([$hard_links]) 314742941e3bSmrg if test "$hard_links" = no; then 314842941e3bSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 314942941e3bSmrg need_locks=warn 315042941e3bSmrg fi 315198af18c5Smrgelse 315242941e3bSmrg need_locks=no 31536f03b1f6Smrgfi 315442941e3bSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 315542941e3bSmrg])# _LT_COMPILER_FILE_LOCKS 3156356f6debSmrg 31576f03b1f6Smrg 315842941e3bSmrg# _LT_CHECK_OBJDIR 315942941e3bSmrg# ---------------- 316042941e3bSmrgm4_defun([_LT_CHECK_OBJDIR], 316142941e3bSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 316242941e3bSmrg[rm -f .libs 2>/dev/null 316342941e3bSmrgmkdir .libs 2>/dev/null 316442941e3bSmrgif test -d .libs; then 316542941e3bSmrg lt_cv_objdir=.libs 316642941e3bSmrgelse 316742941e3bSmrg # MS-DOS does not allow filenames that begin with a dot. 316842941e3bSmrg lt_cv_objdir=_libs 316942941e3bSmrgfi 317042941e3bSmrgrmdir .libs 2>/dev/null]) 317142941e3bSmrgobjdir=$lt_cv_objdir 317242941e3bSmrg_LT_DECL([], [objdir], [0], 317342941e3bSmrg [The name of the directory that contains temporary libtool files])dnl 317442941e3bSmrgm4_pattern_allow([LT_OBJDIR])dnl 317542941e3bSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 317642941e3bSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 317742941e3bSmrg])# _LT_CHECK_OBJDIR 31786f03b1f6Smrg 31796f03b1f6Smrg 318042941e3bSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 318142941e3bSmrg# -------------------------------------- 318242941e3bSmrg# Check hardcoding attributes. 318342941e3bSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 318442941e3bSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 318542941e3bSmrg_LT_TAGVAR(hardcode_action, $1)= 318642941e3bSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 318742941e3bSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 318842941e3bSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 31896f03b1f6Smrg 319042941e3bSmrg # We can hardcode non-existent directories. 319142941e3bSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 319242941e3bSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 319342941e3bSmrg # have to relink, otherwise we might link with an installed library 319442941e3bSmrg # when we should be linking with a yet-to-be-installed one 319542941e3bSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 319642941e3bSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 319742941e3bSmrg # Linking always hardcodes the temporary library directory. 319842941e3bSmrg _LT_TAGVAR(hardcode_action, $1)=relink 319942941e3bSmrg else 320042941e3bSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 320142941e3bSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 320242941e3bSmrg fi 320342941e3bSmrgelse 320442941e3bSmrg # We cannot hardcode anything, or else we can only hardcode existing 320542941e3bSmrg # directories. 320642941e3bSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 320742941e3bSmrgfi 320842941e3bSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 32096f03b1f6Smrg 321042941e3bSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 321142941e3bSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 321242941e3bSmrg # Fast installation is not supported 321342941e3bSmrg enable_fast_install=no 321442941e3bSmrgelif test "$shlibpath_overrides_runpath" = yes || 321542941e3bSmrg test "$enable_shared" = no; then 321642941e3bSmrg # Fast installation is not necessary 321742941e3bSmrg enable_fast_install=needless 321842941e3bSmrgfi 321942941e3bSmrg_LT_TAGDECL([], [hardcode_action], [0], 322042941e3bSmrg [How to hardcode a shared library path into an executable]) 322142941e3bSmrg])# _LT_LINKER_HARDCODE_LIBPATH 32226f03b1f6Smrg 32236f03b1f6Smrg 322442941e3bSmrg# _LT_CMD_STRIPLIB 322542941e3bSmrg# ---------------- 322642941e3bSmrgm4_defun([_LT_CMD_STRIPLIB], 322742941e3bSmrg[m4_require([_LT_DECL_EGREP]) 322842941e3bSmrgstriplib= 322942941e3bSmrgold_striplib= 323042941e3bSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 323142941e3bSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 323242941e3bSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 323342941e3bSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 323442941e3bSmrg AC_MSG_RESULT([yes]) 323542941e3bSmrgelse 323642941e3bSmrg# FIXME - insert some real tests, host_os isn't really good enough 323742941e3bSmrg case $host_os in 323842941e3bSmrg darwin*) 323942941e3bSmrg if test -n "$STRIP" ; then 324042941e3bSmrg striplib="$STRIP -x" 324142941e3bSmrg old_striplib="$STRIP -S" 324242941e3bSmrg AC_MSG_RESULT([yes]) 324398af18c5Smrg else 324442941e3bSmrg AC_MSG_RESULT([no]) 324598af18c5Smrg fi 324698af18c5Smrg ;; 324798af18c5Smrg *) 324842941e3bSmrg AC_MSG_RESULT([no]) 324998af18c5Smrg ;; 325098af18c5Smrg esac 325198af18c5Smrgfi 325242941e3bSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 325342941e3bSmrg_LT_DECL([], [striplib], [1]) 325442941e3bSmrg])# _LT_CMD_STRIPLIB 32556f03b1f6Smrg 3256356f6debSmrg 325742941e3bSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 325842941e3bSmrg# ----------------------------- 325942941e3bSmrg# PORTME Fill in your ld.so characteristics 326042941e3bSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 326142941e3bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 326242941e3bSmrgm4_require([_LT_DECL_EGREP])dnl 326342941e3bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 326442941e3bSmrgm4_require([_LT_DECL_OBJDUMP])dnl 326542941e3bSmrgm4_require([_LT_DECL_SED])dnl 326642941e3bSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 326742941e3bSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 326842941e3bSmrgm4_if([$1], 326942941e3bSmrg [], [ 327042941e3bSmrgif test "$GCC" = yes; then 327142941e3bSmrg case $host_os in 327242941e3bSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 327342941e3bSmrg *) lt_awk_arg="/^libraries:/" ;; 327442941e3bSmrg esac 327542941e3bSmrg case $host_os in 327642941e3bSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 327742941e3bSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 327842941e3bSmrg esac 327942941e3bSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 328042941e3bSmrg case $lt_search_path_spec in 328142941e3bSmrg *\;*) 328242941e3bSmrg # if the path contains ";" then we assume it to be the separator 328342941e3bSmrg # otherwise default to the standard path separator (i.e. ":") - it is 328442941e3bSmrg # assumed that no part of a normal pathname contains ";" but that should 328542941e3bSmrg # okay in the real world where ";" in dirpaths is itself problematic. 328642941e3bSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 328742941e3bSmrg ;; 328842941e3bSmrg *) 328942941e3bSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 329042941e3bSmrg ;; 329142941e3bSmrg esac 329242941e3bSmrg # Ok, now we have the path, separated by spaces, we can step through it 329342941e3bSmrg # and add multilib dir if necessary. 329442941e3bSmrg lt_tmp_lt_search_path_spec= 329542941e3bSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 329642941e3bSmrg for lt_sys_path in $lt_search_path_spec; do 329742941e3bSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 329842941e3bSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 329942941e3bSmrg else 330042941e3bSmrg test -d "$lt_sys_path" && \ 330142941e3bSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 330242941e3bSmrg fi 330342941e3bSmrg done 330442941e3bSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 330542941e3bSmrgBEGIN {RS=" "; FS="/|\n";} { 330642941e3bSmrg lt_foo=""; 330742941e3bSmrg lt_count=0; 330842941e3bSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 330942941e3bSmrg if ($lt_i != "" && $lt_i != ".") { 331042941e3bSmrg if ($lt_i == "..") { 331142941e3bSmrg lt_count++; 331242941e3bSmrg } else { 331342941e3bSmrg if (lt_count == 0) { 331442941e3bSmrg lt_foo="/" $lt_i lt_foo; 331542941e3bSmrg } else { 331642941e3bSmrg lt_count--; 331742941e3bSmrg } 331842941e3bSmrg } 331942941e3bSmrg } 332042941e3bSmrg } 332142941e3bSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 332242941e3bSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 332342941e3bSmrg}'` 332442941e3bSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 332542941e3bSmrg # for these hosts. 332642941e3bSmrg case $host_os in 332742941e3bSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 332842941e3bSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 332942941e3bSmrg esac 333042941e3bSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 333198af18c5Smrgelse 333242941e3bSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 333342941e3bSmrgfi]) 333442941e3bSmrglibrary_names_spec= 333542941e3bSmrglibname_spec='lib$name' 333642941e3bSmrgsoname_spec= 333742941e3bSmrgshrext_cmds=".so" 333842941e3bSmrgpostinstall_cmds= 333942941e3bSmrgpostuninstall_cmds= 334042941e3bSmrgfinish_cmds= 334142941e3bSmrgfinish_eval= 334242941e3bSmrgshlibpath_var= 334342941e3bSmrgshlibpath_overrides_runpath=unknown 334442941e3bSmrgversion_type=none 334542941e3bSmrgdynamic_linker="$host_os ld.so" 334642941e3bSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 334742941e3bSmrgneed_lib_prefix=unknown 334842941e3bSmrghardcode_into_libs=no 33496f03b1f6Smrg 335042941e3bSmrg# when you set need_version to no, make sure it does not cause -set_version 335142941e3bSmrg# flags to be left without arguments 335242941e3bSmrgneed_version=unknown 33536f03b1f6Smrg 335442941e3bSmrgcase $host_os in 335542941e3bSmrgaix3*) 335642941e3bSmrg version_type=linux 335742941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 335842941e3bSmrg shlibpath_var=LIBPATH 33596f03b1f6Smrg 336042941e3bSmrg # AIX 3 has no versioning support, so we append a major version to the name. 336142941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 336242941e3bSmrg ;; 33636f03b1f6Smrg 336442941e3bSmrgaix[[4-9]]*) 336542941e3bSmrg version_type=linux 336642941e3bSmrg need_lib_prefix=no 336742941e3bSmrg need_version=no 336842941e3bSmrg hardcode_into_libs=yes 336942941e3bSmrg if test "$host_cpu" = ia64; then 337042941e3bSmrg # AIX 5 supports IA64 337142941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 337242941e3bSmrg shlibpath_var=LD_LIBRARY_PATH 337398af18c5Smrg else 337442941e3bSmrg # With GCC up to 2.95.x, collect2 would create an import file 337542941e3bSmrg # for dependence libraries. The import file would start with 337642941e3bSmrg # the line `#! .'. This would cause the generated library to 337742941e3bSmrg # depend on `.', always an invalid library. This was fixed in 337842941e3bSmrg # development snapshots of GCC prior to 3.0. 337942941e3bSmrg case $host_os in 338042941e3bSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 338142941e3bSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 338242941e3bSmrg echo ' yes ' 338342941e3bSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 338442941e3bSmrg : 338542941e3bSmrg else 338642941e3bSmrg can_build_shared=no 338742941e3bSmrg fi 338842941e3bSmrg ;; 338998af18c5Smrg esac 339042941e3bSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 339142941e3bSmrg # soname into executable. Probably we can add versioning support to 339242941e3bSmrg # collect2, so additional links can be useful in future. 339342941e3bSmrg if test "$aix_use_runtimelinking" = yes; then 339442941e3bSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 339542941e3bSmrg # instead of lib<name>.a to let people know that these are not 339642941e3bSmrg # typical AIX shared libraries. 339742941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 339842941e3bSmrg else 339942941e3bSmrg # We preserve .a as extension for shared libraries through AIX4.2 340042941e3bSmrg # and later when we are not doing run time linking. 340142941e3bSmrg library_names_spec='${libname}${release}.a $libname.a' 340242941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 340342941e3bSmrg fi 340442941e3bSmrg shlibpath_var=LIBPATH 34056f03b1f6Smrg fi 340642941e3bSmrg ;; 34076f03b1f6Smrg 340842941e3bSmrgamigaos*) 340942941e3bSmrg case $host_cpu in 341042941e3bSmrg powerpc) 341142941e3bSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 341242941e3bSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 341342941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 341498af18c5Smrg ;; 341542941e3bSmrg m68k) 341642941e3bSmrg library_names_spec='$libname.ixlibrary $libname.a' 341742941e3bSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 341842941e3bSmrg 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' 3419356f6debSmrg ;; 342042941e3bSmrg esac 342142941e3bSmrg ;; 342298af18c5Smrg 342342941e3bSmrgbeos*) 342442941e3bSmrg library_names_spec='${libname}${shared_ext}' 342542941e3bSmrg dynamic_linker="$host_os ld.so" 342642941e3bSmrg shlibpath_var=LIBRARY_PATH 342742941e3bSmrg ;; 34286f03b1f6Smrg 342942941e3bSmrgbsdi[[45]]*) 343042941e3bSmrg version_type=linux 343142941e3bSmrg need_version=no 343242941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 343342941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 343442941e3bSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 343542941e3bSmrg shlibpath_var=LD_LIBRARY_PATH 343642941e3bSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 343742941e3bSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 343842941e3bSmrg # the default ld.so.conf also contains /usr/contrib/lib and 343942941e3bSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 344042941e3bSmrg # libtool to hard-code these into programs 344142941e3bSmrg ;; 34426f03b1f6Smrg 344342941e3bSmrgcygwin* | mingw* | pw32* | cegcc*) 344442941e3bSmrg version_type=windows 344542941e3bSmrg shrext_cmds=".dll" 344642941e3bSmrg need_version=no 344742941e3bSmrg need_lib_prefix=no 34486f03b1f6Smrg 344942941e3bSmrg case $GCC,$cc_basename in 345042941e3bSmrg yes,*) 345142941e3bSmrg # gcc 345242941e3bSmrg library_names_spec='$libname.dll.a' 345342941e3bSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 345442941e3bSmrg postinstall_cmds='base_file=`basename \${file}`~ 345542941e3bSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 345642941e3bSmrg dldir=$destdir/`dirname \$dlpath`~ 345742941e3bSmrg test -d \$dldir || mkdir -p \$dldir~ 345842941e3bSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 345942941e3bSmrg chmod a+x \$dldir/$dlname~ 346042941e3bSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 346142941e3bSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 346242941e3bSmrg fi' 346342941e3bSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 346442941e3bSmrg dlpath=$dir/\$dldll~ 346542941e3bSmrg $RM \$dlpath' 346642941e3bSmrg shlibpath_overrides_runpath=yes 34676f03b1f6Smrg 346842941e3bSmrg case $host_os in 346942941e3bSmrg cygwin*) 347042941e3bSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 347142941e3bSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 347242941e3bSmrgm4_if([$1], [],[ 347342941e3bSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 347442941e3bSmrg ;; 347542941e3bSmrg mingw* | cegcc*) 347642941e3bSmrg # MinGW DLLs use traditional 'lib' prefix 347742941e3bSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 347842941e3bSmrg ;; 347942941e3bSmrg pw32*) 348042941e3bSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 348142941e3bSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 348242941e3bSmrg ;; 348342941e3bSmrg esac 348442941e3bSmrg dynamic_linker='Win32 ld.exe' 348542941e3bSmrg ;; 34866f03b1f6Smrg 348742941e3bSmrg *,cl*) 348842941e3bSmrg # Native MSVC 348942941e3bSmrg libname_spec='$name' 349042941e3bSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 349142941e3bSmrg library_names_spec='${libname}.dll.lib' 349242941e3bSmrg 349342941e3bSmrg case $build_os in 349442941e3bSmrg mingw*) 349542941e3bSmrg sys_lib_search_path_spec= 349642941e3bSmrg lt_save_ifs=$IFS 349742941e3bSmrg IFS=';' 349842941e3bSmrg for lt_path in $LIB 349942941e3bSmrg do 350042941e3bSmrg IFS=$lt_save_ifs 350142941e3bSmrg # Let DOS variable expansion print the short 8.3 style file name. 350242941e3bSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 350342941e3bSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 350442941e3bSmrg done 350542941e3bSmrg IFS=$lt_save_ifs 350642941e3bSmrg # Convert to MSYS style. 350742941e3bSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 350842941e3bSmrg ;; 350942941e3bSmrg cygwin*) 351042941e3bSmrg # Convert to unix form, then to dos form, then back to unix form 351142941e3bSmrg # but this time dos style (no spaces!) so that the unix form looks 351242941e3bSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 351342941e3bSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 351442941e3bSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 351542941e3bSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 351642941e3bSmrg ;; 351742941e3bSmrg *) 351842941e3bSmrg sys_lib_search_path_spec="$LIB" 351942941e3bSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 352042941e3bSmrg # It is most probably a Windows format PATH. 352142941e3bSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 352242941e3bSmrg else 352342941e3bSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 352442941e3bSmrg fi 352542941e3bSmrg # FIXME: find the short name or the path components, as spaces are 352642941e3bSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 352742941e3bSmrg ;; 352842941e3bSmrg esac 35296f03b1f6Smrg 353042941e3bSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 353142941e3bSmrg postinstall_cmds='base_file=`basename \${file}`~ 353242941e3bSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 353342941e3bSmrg dldir=$destdir/`dirname \$dlpath`~ 353442941e3bSmrg test -d \$dldir || mkdir -p \$dldir~ 353542941e3bSmrg $install_prog $dir/$dlname \$dldir/$dlname' 353642941e3bSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 353742941e3bSmrg dlpath=$dir/\$dldll~ 353842941e3bSmrg $RM \$dlpath' 353942941e3bSmrg shlibpath_overrides_runpath=yes 354042941e3bSmrg dynamic_linker='Win32 link.exe' 354142941e3bSmrg ;; 35426f03b1f6Smrg 354342941e3bSmrg *) 354442941e3bSmrg # Assume MSVC wrapper 354542941e3bSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 354642941e3bSmrg dynamic_linker='Win32 ld.exe' 354798af18c5Smrg ;; 354898af18c5Smrg esac 354942941e3bSmrg # FIXME: first we should search . and the directory the executable is in 355042941e3bSmrg shlibpath_var=PATH 355142941e3bSmrg ;; 35526f03b1f6Smrg 355342941e3bSmrgdarwin* | rhapsody*) 355442941e3bSmrg dynamic_linker="$host_os dyld" 355542941e3bSmrg version_type=darwin 355642941e3bSmrg need_lib_prefix=no 355742941e3bSmrg need_version=no 355842941e3bSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 355942941e3bSmrg soname_spec='${libname}${release}${major}$shared_ext' 356042941e3bSmrg shlibpath_overrides_runpath=yes 356142941e3bSmrg shlibpath_var=DYLD_LIBRARY_PATH 356242941e3bSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 356342941e3bSmrgm4_if([$1], [],[ 356442941e3bSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 356542941e3bSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 356642941e3bSmrg ;; 35676f03b1f6Smrg 356842941e3bSmrgdgux*) 356942941e3bSmrg version_type=linux 357042941e3bSmrg need_lib_prefix=no 357142941e3bSmrg need_version=no 357242941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 357342941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 357442941e3bSmrg shlibpath_var=LD_LIBRARY_PATH 357542941e3bSmrg ;; 35766f03b1f6Smrg 357742941e3bSmrgfreebsd1*) 357842941e3bSmrg dynamic_linker=no 357942941e3bSmrg ;; 35806f03b1f6Smrg 358142941e3bSmrgfreebsd* | dragonfly*) 358242941e3bSmrg # DragonFly does not have aout. When/if they implement a new 358342941e3bSmrg # versioning mechanism, adjust this. 358442941e3bSmrg if test -x /usr/bin/objformat; then 358542941e3bSmrg objformat=`/usr/bin/objformat` 358642941e3bSmrg else 358742941e3bSmrg case $host_os in 358842941e3bSmrg freebsd[[123]]*) objformat=aout ;; 358942941e3bSmrg *) objformat=elf ;; 359042941e3bSmrg esac 359142941e3bSmrg fi 359242941e3bSmrg version_type=freebsd-$objformat 359342941e3bSmrg case $version_type in 359442941e3bSmrg freebsd-elf*) 359542941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 359642941e3bSmrg need_version=no 359742941e3bSmrg need_lib_prefix=no 359842941e3bSmrg ;; 359942941e3bSmrg freebsd-*) 360042941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 360142941e3bSmrg need_version=yes 360242941e3bSmrg ;; 360342941e3bSmrg esac 360442941e3bSmrg shlibpath_var=LD_LIBRARY_PATH 360542941e3bSmrg case $host_os in 360642941e3bSmrg freebsd2*) 360742941e3bSmrg shlibpath_overrides_runpath=yes 360842941e3bSmrg ;; 360942941e3bSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 361042941e3bSmrg shlibpath_overrides_runpath=yes 361142941e3bSmrg hardcode_into_libs=yes 361242941e3bSmrg ;; 361342941e3bSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 361442941e3bSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 361542941e3bSmrg shlibpath_overrides_runpath=no 361642941e3bSmrg hardcode_into_libs=yes 361742941e3bSmrg ;; 361842941e3bSmrg *) # from 4.6 on, and DragonFly 361942941e3bSmrg shlibpath_overrides_runpath=yes 362042941e3bSmrg hardcode_into_libs=yes 362142941e3bSmrg ;; 362242941e3bSmrg esac 362342941e3bSmrg ;; 3624356f6debSmrg 362542941e3bSmrggnu*) 362642941e3bSmrg version_type=linux 362742941e3bSmrg need_lib_prefix=no 362842941e3bSmrg need_version=no 362942941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 363042941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 363142941e3bSmrg shlibpath_var=LD_LIBRARY_PATH 363242941e3bSmrg hardcode_into_libs=yes 363342941e3bSmrg ;; 36346f03b1f6Smrg 363542941e3bSmrghaiku*) 363642941e3bSmrg version_type=linux 363742941e3bSmrg need_lib_prefix=no 363842941e3bSmrg need_version=no 363942941e3bSmrg dynamic_linker="$host_os runtime_loader" 364042941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 364142941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 364242941e3bSmrg shlibpath_var=LIBRARY_PATH 364342941e3bSmrg shlibpath_overrides_runpath=yes 364442941e3bSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 364542941e3bSmrg hardcode_into_libs=yes 364642941e3bSmrg ;; 36476f03b1f6Smrg 364842941e3bSmrghpux9* | hpux10* | hpux11*) 364942941e3bSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 365042941e3bSmrg # link against other versions. 365142941e3bSmrg version_type=sunos 365242941e3bSmrg need_lib_prefix=no 365342941e3bSmrg need_version=no 365442941e3bSmrg case $host_cpu in 365542941e3bSmrg ia64*) 365642941e3bSmrg shrext_cmds='.so' 365742941e3bSmrg hardcode_into_libs=yes 365842941e3bSmrg dynamic_linker="$host_os dld.so" 365942941e3bSmrg shlibpath_var=LD_LIBRARY_PATH 366042941e3bSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 366142941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 366242941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 366342941e3bSmrg if test "X$HPUX_IA64_MODE" = X32; then 366442941e3bSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 3665356f6debSmrg else 366642941e3bSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3667356f6debSmrg fi 366842941e3bSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 366942941e3bSmrg ;; 367042941e3bSmrg hppa*64*) 367142941e3bSmrg shrext_cmds='.sl' 367242941e3bSmrg hardcode_into_libs=yes 367342941e3bSmrg dynamic_linker="$host_os dld.sl" 367442941e3bSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 367542941e3bSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 367642941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 367742941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 367842941e3bSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 367942941e3bSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3680356f6debSmrg ;; 3681356f6debSmrg *) 368242941e3bSmrg shrext_cmds='.sl' 368342941e3bSmrg dynamic_linker="$host_os dld.sl" 368442941e3bSmrg shlibpath_var=SHLIB_PATH 368542941e3bSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 368642941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 368742941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 36886f03b1f6Smrg ;; 368998af18c5Smrg esac 369042941e3bSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 369142941e3bSmrg postinstall_cmds='chmod 555 $lib' 369242941e3bSmrg # or fails outright, so override atomically: 369342941e3bSmrg install_override_mode=555 369442941e3bSmrg ;; 36956f03b1f6Smrg 369642941e3bSmrginterix[[3-9]]*) 369742941e3bSmrg version_type=linux 369842941e3bSmrg need_lib_prefix=no 369942941e3bSmrg need_version=no 370042941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 370142941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 370242941e3bSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 370342941e3bSmrg shlibpath_var=LD_LIBRARY_PATH 370442941e3bSmrg shlibpath_overrides_runpath=no 370542941e3bSmrg hardcode_into_libs=yes 370642941e3bSmrg ;; 370798af18c5Smrg 370842941e3bSmrgirix5* | irix6* | nonstopux*) 370998af18c5Smrg case $host_os in 371042941e3bSmrg nonstopux*) version_type=nonstopux ;; 371142941e3bSmrg *) 371242941e3bSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 371342941e3bSmrg version_type=linux 371442941e3bSmrg else 371542941e3bSmrg version_type=irix 371642941e3bSmrg fi ;; 371798af18c5Smrg esac 371898af18c5Smrg need_lib_prefix=no 371998af18c5Smrg need_version=no 372042941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 372142941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 372242941e3bSmrg case $host_os in 372342941e3bSmrg irix5* | nonstopux*) 372442941e3bSmrg libsuff= shlibsuff= 3725356f6debSmrg ;; 372642941e3bSmrg *) 372742941e3bSmrg case $LD in # libtool.m4 will add one of these switches to LD 372842941e3bSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 372942941e3bSmrg libsuff= shlibsuff= libmagic=32-bit;; 373042941e3bSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 373142941e3bSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 373242941e3bSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 373342941e3bSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 373442941e3bSmrg *) libsuff= shlibsuff= libmagic=never-match;; 373542941e3bSmrg esac 3736356f6debSmrg ;; 3737356f6debSmrg esac 373842941e3bSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 373942941e3bSmrg shlibpath_overrides_runpath=no 374042941e3bSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 374142941e3bSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 374242941e3bSmrg hardcode_into_libs=yes 374398af18c5Smrg ;; 37446f03b1f6Smrg 374542941e3bSmrg# No shared lib support for Linux oldld, aout, or coff. 374642941e3bSmrglinux*oldld* | linux*aout* | linux*coff*) 374742941e3bSmrg dynamic_linker=no 374898af18c5Smrg ;; 37496f03b1f6Smrg 375042941e3bSmrg# This must be Linux ELF. 375142941e3bSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 375298af18c5Smrg version_type=linux 375342941e3bSmrg need_lib_prefix=no 375498af18c5Smrg need_version=no 375598af18c5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 375698af18c5Smrg soname_spec='${libname}${release}${shared_ext}$major' 375742941e3bSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 375898af18c5Smrg shlibpath_var=LD_LIBRARY_PATH 375942941e3bSmrg shlibpath_overrides_runpath=no 376098af18c5Smrg 376142941e3bSmrg # Some binutils ld are patched to set DT_RUNPATH 376242941e3bSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 376342941e3bSmrg [lt_cv_shlibpath_overrides_runpath=no 376442941e3bSmrg save_LDFLAGS=$LDFLAGS 376542941e3bSmrg save_libdir=$libdir 376642941e3bSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 376742941e3bSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 376842941e3bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 376942941e3bSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 377042941e3bSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 377142941e3bSmrg LDFLAGS=$save_LDFLAGS 377242941e3bSmrg libdir=$save_libdir 377342941e3bSmrg ]) 377442941e3bSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 377598af18c5Smrg 377642941e3bSmrg # This implies no fast_install, which is unacceptable. 377742941e3bSmrg # Some rework will be needed to allow for fast_install 377842941e3bSmrg # before this can be enabled. 377942941e3bSmrg hardcode_into_libs=yes 378098af18c5Smrg 378142941e3bSmrg # Append ld.so.conf contents to the search path 378242941e3bSmrg if test -f /etc/ld.so.conf; then 378342941e3bSmrg 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' ' '` 378442941e3bSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 378542941e3bSmrg fi 37866f03b1f6Smrg 378742941e3bSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 378842941e3bSmrg # powerpc, because MkLinux only supported shared libraries with the 378942941e3bSmrg # GNU dynamic linker. Since this was broken with cross compilers, 379042941e3bSmrg # most powerpc-linux boxes support dynamic linking these days and 379142941e3bSmrg # people can always --disable-shared, the test was removed, and we 379242941e3bSmrg # assume the GNU/Linux dynamic linker is in use. 379342941e3bSmrg dynamic_linker='GNU/Linux ld.so' 379498af18c5Smrg ;; 37956f03b1f6Smrg 379642941e3bSmrgnetbsd*) 379742941e3bSmrg version_type=sunos 379898af18c5Smrg need_lib_prefix=no 379998af18c5Smrg need_version=no 380042941e3bSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 380142941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 380242941e3bSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 380342941e3bSmrg dynamic_linker='NetBSD (a.out) ld.so' 380442941e3bSmrg else 380542941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 380642941e3bSmrg soname_spec='${libname}${release}${shared_ext}$major' 380742941e3bSmrg dynamic_linker='NetBSD ld.elf_so' 380842941e3bSmrg fi 380942941e3bSmrg shlibpath_var=LD_LIBRARY_PATH 381098af18c5Smrg shlibpath_overrides_runpath=yes 381142941e3bSmrg hardcode_into_libs=yes 381298af18c5Smrg ;; 38136f03b1f6Smrg 381442941e3bSmrgnewsos6) 381598af18c5Smrg version_type=linux 381642941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 381742941e3bSmrg shlibpath_var=LD_LIBRARY_PATH 381842941e3bSmrg shlibpath_overrides_runpath=yes 381942941e3bSmrg ;; 382042941e3bSmrg 382142941e3bSmrg*nto* | *qnx*) 382242941e3bSmrg version_type=qnx 382398af18c5Smrg need_lib_prefix=no 382498af18c5Smrg need_version=no 382542941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 382698af18c5Smrg soname_spec='${libname}${release}${shared_ext}$major' 382798af18c5Smrg shlibpath_var=LD_LIBRARY_PATH 382842941e3bSmrg shlibpath_overrides_runpath=no 382942941e3bSmrg hardcode_into_libs=yes 383042941e3bSmrg dynamic_linker='ldqnx.so' 383198af18c5Smrg ;; 38326f03b1f6Smrg 383342941e3bSmrgopenbsd*) 383442941e3bSmrg version_type=sunos 383542941e3bSmrg sys_lib_dlsearch_path_spec="/usr/lib" 383642941e3bSmrg need_lib_prefix=no 383742941e3bSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 383842941e3bSmrg case $host_os in 383942941e3bSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 384042941e3bSmrg *) need_version=no ;; 384142941e3bSmrg esac 384242941e3bSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 384342941e3bSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 384442941e3bSmrg shlibpath_var=LD_LIBRARY_PATH 384542941e3bSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 384698af18c5Smrg case $host_os in 384798af18c5Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 384898af18c5Smrg shlibpath_overrides_runpath=no 38496f03b1f6Smrg ;; 385098af18c5Smrg *) 385198af18c5Smrg shlibpath_overrides_runpath=yes 38526f03b1f6Smrg ;; 385398af18c5Smrg esac 385498af18c5Smrg else 385598af18c5Smrg shlibpath_overrides_runpath=yes 385698af18c5Smrg fi 385798af18c5Smrg ;; 38586f03b1f6Smrg 385998af18c5Smrgos2*) 386098af18c5Smrg libname_spec='$name' 386198af18c5Smrg shrext_cmds=".dll" 386298af18c5Smrg need_lib_prefix=no 386398af18c5Smrg library_names_spec='$libname${shared_ext} $libname.a' 386498af18c5Smrg dynamic_linker='OS/2 ld.exe' 386598af18c5Smrg shlibpath_var=LIBPATH 386698af18c5Smrg ;; 38676f03b1f6Smrg 386898af18c5Smrgosf3* | osf4* | osf5*) 386998af18c5Smrg version_type=osf 387098af18c5Smrg need_lib_prefix=no 387198af18c5Smrg need_version=no 387298af18c5Smrg soname_spec='${libname}${release}${shared_ext}$major' 387398af18c5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 387498af18c5Smrg shlibpath_var=LD_LIBRARY_PATH 387598af18c5Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 387698af18c5Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 387798af18c5Smrg ;; 38786f03b1f6Smrg 387998af18c5Smrgrdos*) 388098af18c5Smrg dynamic_linker=no 388198af18c5Smrg ;; 38826f03b1f6Smrg 388398af18c5Smrgsolaris*) 388498af18c5Smrg version_type=linux 388598af18c5Smrg need_lib_prefix=no 388698af18c5Smrg need_version=no 388798af18c5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 388898af18c5Smrg soname_spec='${libname}${release}${shared_ext}$major' 388998af18c5Smrg shlibpath_var=LD_LIBRARY_PATH 389098af18c5Smrg shlibpath_overrides_runpath=yes 389198af18c5Smrg hardcode_into_libs=yes 389298af18c5Smrg # ldd complains unless libraries are executable 389398af18c5Smrg postinstall_cmds='chmod +x $lib' 389498af18c5Smrg ;; 38956f03b1f6Smrg 389698af18c5Smrgsunos4*) 389798af18c5Smrg version_type=sunos 389898af18c5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 389998af18c5Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 390098af18c5Smrg shlibpath_var=LD_LIBRARY_PATH 390198af18c5Smrg shlibpath_overrides_runpath=yes 390298af18c5Smrg if test "$with_gnu_ld" = yes; then 390398af18c5Smrg need_lib_prefix=no 390498af18c5Smrg fi 390598af18c5Smrg need_version=yes 390698af18c5Smrg ;; 390798af18c5Smrg 390898af18c5Smrgsysv4 | sysv4.3*) 390998af18c5Smrg version_type=linux 391098af18c5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 391198af18c5Smrg soname_spec='${libname}${release}${shared_ext}$major' 391298af18c5Smrg shlibpath_var=LD_LIBRARY_PATH 391398af18c5Smrg case $host_vendor in 391498af18c5Smrg sni) 391598af18c5Smrg shlibpath_overrides_runpath=no 391698af18c5Smrg need_lib_prefix=no 391798af18c5Smrg runpath_var=LD_RUN_PATH 391898af18c5Smrg ;; 391998af18c5Smrg siemens) 392098af18c5Smrg need_lib_prefix=no 392198af18c5Smrg ;; 392298af18c5Smrg motorola) 392398af18c5Smrg need_lib_prefix=no 392498af18c5Smrg need_version=no 392598af18c5Smrg shlibpath_overrides_runpath=no 392698af18c5Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 392798af18c5Smrg ;; 392898af18c5Smrg esac 392998af18c5Smrg ;; 393098af18c5Smrg 393198af18c5Smrgsysv4*MP*) 393298af18c5Smrg if test -d /usr/nec ;then 393398af18c5Smrg version_type=linux 393498af18c5Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 393598af18c5Smrg soname_spec='$libname${shared_ext}.$major' 393698af18c5Smrg shlibpath_var=LD_LIBRARY_PATH 393798af18c5Smrg fi 393898af18c5Smrg ;; 393998af18c5Smrg 394098af18c5Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 394198af18c5Smrg version_type=freebsd-elf 394298af18c5Smrg need_lib_prefix=no 394398af18c5Smrg need_version=no 394498af18c5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 394598af18c5Smrg soname_spec='${libname}${release}${shared_ext}$major' 394698af18c5Smrg shlibpath_var=LD_LIBRARY_PATH 3947356f6debSmrg shlibpath_overrides_runpath=yes 394898af18c5Smrg hardcode_into_libs=yes 394998af18c5Smrg if test "$with_gnu_ld" = yes; then 395098af18c5Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 395198af18c5Smrg else 395298af18c5Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 395398af18c5Smrg case $host_os in 395498af18c5Smrg sco3.2v5*) 395598af18c5Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 39566f03b1f6Smrg ;; 39576f03b1f6Smrg esac 395898af18c5Smrg fi 395998af18c5Smrg sys_lib_dlsearch_path_spec='/usr/lib' 396098af18c5Smrg ;; 39616f03b1f6Smrg 3962356f6debSmrgtpf*) 3963356f6debSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3964356f6debSmrg version_type=linux 3965356f6debSmrg need_lib_prefix=no 3966356f6debSmrg need_version=no 3967356f6debSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 3968356f6debSmrg shlibpath_var=LD_LIBRARY_PATH 3969356f6debSmrg shlibpath_overrides_runpath=no 3970356f6debSmrg hardcode_into_libs=yes 3971356f6debSmrg ;; 3972356f6debSmrg 397398af18c5Smrguts4*) 397498af18c5Smrg version_type=linux 397598af18c5Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 397698af18c5Smrg soname_spec='${libname}${release}${shared_ext}$major' 397798af18c5Smrg shlibpath_var=LD_LIBRARY_PATH 397898af18c5Smrg ;; 39796f03b1f6Smrg 398098af18c5Smrg*) 398198af18c5Smrg dynamic_linker=no 398298af18c5Smrg ;; 398398af18c5Smrgesac 398498af18c5SmrgAC_MSG_RESULT([$dynamic_linker]) 398598af18c5Smrgtest "$dynamic_linker" = no && can_build_shared=no 39866f03b1f6Smrg 398798af18c5Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 398898af18c5Smrgif test "$GCC" = yes; then 398998af18c5Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 399098af18c5Smrgfi 399198af18c5Smrg 3992356f6debSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 3993356f6debSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 3994356f6debSmrgfi 3995356f6debSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 3996356f6debSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 3997356f6debSmrgfi 399898af18c5Smrg 3999356f6debSmrg_LT_DECL([], [variables_saved_for_relink], [1], 4000356f6debSmrg [Variables whose values should be saved in libtool wrapper scripts and 4001356f6debSmrg restored at link time]) 4002356f6debSmrg_LT_DECL([], [need_lib_prefix], [0], 4003356f6debSmrg [Do we need the "lib" prefix for modules?]) 4004356f6debSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 4005356f6debSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 4006356f6debSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 4007356f6debSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 4008356f6debSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 4009356f6debSmrg [Is shlibpath searched before the hard-coded library search path?]) 4010356f6debSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 4011356f6debSmrg_LT_DECL([], [library_names_spec], [1], 4012356f6debSmrg [[List of archive names. First name is the real one, the rest are links. 4013356f6debSmrg The last name is the one that the linker finds with -lNAME]]) 4014356f6debSmrg_LT_DECL([], [soname_spec], [1], 4015356f6debSmrg [[The coded name of the library, if different from the real name]]) 401642941e3bSmrg_LT_DECL([], [install_override_mode], [1], 401742941e3bSmrg [Permission mode override for installation of shared libraries]) 4018356f6debSmrg_LT_DECL([], [postinstall_cmds], [2], 4019356f6debSmrg [Command to use after installation of a shared archive]) 4020356f6debSmrg_LT_DECL([], [postuninstall_cmds], [2], 4021356f6debSmrg [Command to use after uninstallation of a shared archive]) 4022356f6debSmrg_LT_DECL([], [finish_cmds], [2], 4023356f6debSmrg [Commands used to finish a libtool library installation in a directory]) 4024356f6debSmrg_LT_DECL([], [finish_eval], [1], 4025356f6debSmrg [[As "finish_cmds", except a single script fragment to be evaled but 4026356f6debSmrg not shown]]) 4027356f6debSmrg_LT_DECL([], [hardcode_into_libs], [0], 4028356f6debSmrg [Whether we should hardcode library paths into libraries]) 4029356f6debSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 4030356f6debSmrg [Compile-time system search path for libraries]) 4031356f6debSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 4032356f6debSmrg [Run-time system search path for libraries]) 4033356f6debSmrg])# _LT_SYS_DYNAMIC_LINKER 4034356f6debSmrg 4035356f6debSmrg 4036356f6debSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 4037356f6debSmrg# -------------------------- 4038356f6debSmrg# find a file program which can recognize shared library 4039356f6debSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 4040356f6debSmrg[m4_require([_LT_DECL_EGREP])dnl 4041356f6debSmrgAC_MSG_CHECKING([for $1]) 4042356f6debSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 4043356f6debSmrg[case $MAGIC_CMD in 4044356f6debSmrg[[\\/*] | ?:[\\/]*]) 4045356f6debSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 4046356f6debSmrg ;; 4047356f6debSmrg*) 4048356f6debSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 4049356f6debSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 4050356f6debSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 4051356f6debSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 4052356f6debSmrgdnl not every word. This closes a longstanding sh security hole. 4053356f6debSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 4054356f6debSmrg for ac_dir in $ac_dummy; do 405598af18c5Smrg IFS="$lt_save_ifs" 4056356f6debSmrg test -z "$ac_dir" && ac_dir=. 4057356f6debSmrg if test -f $ac_dir/$1; then 4058356f6debSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 4059356f6debSmrg if test -n "$file_magic_test_file"; then 4060356f6debSmrg case $deplibs_check_method in 4061356f6debSmrg "file_magic "*) 4062356f6debSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 4063356f6debSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 4064356f6debSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 4065356f6debSmrg $EGREP "$file_magic_regex" > /dev/null; then 4066356f6debSmrg : 4067356f6debSmrg else 4068356f6debSmrg cat <<_LT_EOF 1>&2 406998af18c5Smrg 4070356f6debSmrg*** Warning: the command libtool uses to detect shared libraries, 4071356f6debSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 4072356f6debSmrg*** The result is that libtool may fail to recognize shared libraries 4073356f6debSmrg*** as such. This will affect the creation of libtool libraries that 4074356f6debSmrg*** depend on shared libraries, but programs linked with such libtool 4075356f6debSmrg*** libraries will work regardless of this problem. Nevertheless, you 4076356f6debSmrg*** may want to report the problem to your system manager and/or to 4077356f6debSmrg*** bug-libtool@gnu.org 40786f03b1f6Smrg 4079356f6debSmrg_LT_EOF 408098af18c5Smrg fi ;; 408198af18c5Smrg esac 408298af18c5Smrg fi 408398af18c5Smrg break 408498af18c5Smrg fi 408598af18c5Smrg done 408698af18c5Smrg IFS="$lt_save_ifs" 408798af18c5Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 408898af18c5Smrg ;; 408998af18c5Smrgesac]) 409098af18c5SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 409198af18c5Smrgif test -n "$MAGIC_CMD"; then 409298af18c5Smrg AC_MSG_RESULT($MAGIC_CMD) 409398af18c5Smrgelse 409498af18c5Smrg AC_MSG_RESULT(no) 409598af18c5Smrgfi 4096356f6debSmrg_LT_DECL([], [MAGIC_CMD], [0], 4097356f6debSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 4098356f6debSmrg])# _LT_PATH_TOOL_PREFIX 40996f03b1f6Smrg 4100356f6debSmrg# Old name: 4101356f6debSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 4102356f6debSmrgdnl aclocal-1.4 backwards compatibility: 4103356f6debSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 41046f03b1f6Smrg 4105356f6debSmrg 4106356f6debSmrg# _LT_PATH_MAGIC 4107356f6debSmrg# -------------- 410898af18c5Smrg# find a file program which can recognize a shared library 4109356f6debSmrgm4_defun([_LT_PATH_MAGIC], 4110356f6debSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 411198af18c5Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 411298af18c5Smrg if test -n "$ac_tool_prefix"; then 4113356f6debSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 411498af18c5Smrg else 411598af18c5Smrg MAGIC_CMD=: 411698af18c5Smrg fi 411798af18c5Smrgfi 4118356f6debSmrg])# _LT_PATH_MAGIC 41196f03b1f6Smrg 41206f03b1f6Smrg 4121356f6debSmrg# LT_PATH_LD 412298af18c5Smrg# ---------- 412398af18c5Smrg# find the pathname to the GNU or non-GNU linker 4124356f6debSmrgAC_DEFUN([LT_PATH_LD], 4125356f6debSmrg[AC_REQUIRE([AC_PROG_CC])dnl 412698af18c5SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 412798af18c5SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 4128356f6debSmrgm4_require([_LT_DECL_SED])dnl 4129356f6debSmrgm4_require([_LT_DECL_EGREP])dnl 413042941e3bSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4131356f6debSmrg 4132356f6debSmrgAC_ARG_WITH([gnu-ld], 4133356f6debSmrg [AS_HELP_STRING([--with-gnu-ld], 4134356f6debSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 4135356f6debSmrg [test "$withval" = no || with_gnu_ld=yes], 4136356f6debSmrg [with_gnu_ld=no])dnl 4137356f6debSmrg 413898af18c5Smrgac_prog=ld 413998af18c5Smrgif test "$GCC" = yes; then 414098af18c5Smrg # Check if gcc -print-prog-name=ld gives a path. 414198af18c5Smrg AC_MSG_CHECKING([for ld used by $CC]) 414298af18c5Smrg case $host in 414398af18c5Smrg *-*-mingw*) 414498af18c5Smrg # gcc leaves a trailing carriage return which upsets mingw 414598af18c5Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 414698af18c5Smrg *) 414798af18c5Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 414898af18c5Smrg esac 414998af18c5Smrg case $ac_prog in 415098af18c5Smrg # Accept absolute paths. 415198af18c5Smrg [[\\/]]* | ?:[[\\/]]*) 415298af18c5Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 415398af18c5Smrg # Canonicalize the pathname of ld 4154356f6debSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 4155356f6debSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 4156356f6debSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 415798af18c5Smrg done 415898af18c5Smrg test -z "$LD" && LD="$ac_prog" 415998af18c5Smrg ;; 416098af18c5Smrg "") 416198af18c5Smrg # If it fails, then pretend we aren't using GCC. 416298af18c5Smrg ac_prog=ld 416398af18c5Smrg ;; 416498af18c5Smrg *) 416598af18c5Smrg # If it is relative, then search for the first ld in PATH. 416698af18c5Smrg with_gnu_ld=unknown 416798af18c5Smrg ;; 416898af18c5Smrg esac 416998af18c5Smrgelif test "$with_gnu_ld" = yes; then 417098af18c5Smrg AC_MSG_CHECKING([for GNU ld]) 417198af18c5Smrgelse 417298af18c5Smrg AC_MSG_CHECKING([for non-GNU ld]) 417398af18c5Smrgfi 417498af18c5SmrgAC_CACHE_VAL(lt_cv_path_LD, 417598af18c5Smrg[if test -z "$LD"; then 417698af18c5Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 417798af18c5Smrg for ac_dir in $PATH; do 417898af18c5Smrg IFS="$lt_save_ifs" 417998af18c5Smrg test -z "$ac_dir" && ac_dir=. 418098af18c5Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 418198af18c5Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 418298af18c5Smrg # Check to see if the program is GNU ld. I'd rather use --version, 418398af18c5Smrg # but apparently some variants of GNU ld only accept -v. 418498af18c5Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 418598af18c5Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 418698af18c5Smrg *GNU* | *'with BFD'*) 418798af18c5Smrg test "$with_gnu_ld" != no && break 418898af18c5Smrg ;; 418998af18c5Smrg *) 419098af18c5Smrg test "$with_gnu_ld" != yes && break 419198af18c5Smrg ;; 419298af18c5Smrg esac 419398af18c5Smrg fi 419498af18c5Smrg done 419598af18c5Smrg IFS="$lt_save_ifs" 419698af18c5Smrgelse 419798af18c5Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 419898af18c5Smrgfi]) 419998af18c5SmrgLD="$lt_cv_path_LD" 420098af18c5Smrgif test -n "$LD"; then 420198af18c5Smrg AC_MSG_RESULT($LD) 420298af18c5Smrgelse 420398af18c5Smrg AC_MSG_RESULT(no) 420498af18c5Smrgfi 420598af18c5Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 4206356f6debSmrg_LT_PATH_LD_GNU 4207356f6debSmrgAC_SUBST([LD]) 42086f03b1f6Smrg 4209356f6debSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 4210356f6debSmrg])# LT_PATH_LD 42116f03b1f6Smrg 4212356f6debSmrg# Old names: 4213356f6debSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 4214356f6debSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 4215356f6debSmrgdnl aclocal-1.4 backwards compatibility: 4216356f6debSmrgdnl AC_DEFUN([AM_PROG_LD], []) 4217356f6debSmrgdnl AC_DEFUN([AC_PROG_LD], []) 4218356f6debSmrg 4219356f6debSmrg 4220356f6debSmrg# _LT_PATH_LD_GNU 4221356f6debSmrg#- -------------- 4222356f6debSmrgm4_defun([_LT_PATH_LD_GNU], 4223356f6debSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 422498af18c5Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 422598af18c5Smrgcase `$LD -v 2>&1 </dev/null` in 422698af18c5Smrg*GNU* | *'with BFD'*) 422798af18c5Smrg lt_cv_prog_gnu_ld=yes 422898af18c5Smrg ;; 422998af18c5Smrg*) 423098af18c5Smrg lt_cv_prog_gnu_ld=no 423198af18c5Smrg ;; 423298af18c5Smrgesac]) 423398af18c5Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 4234356f6debSmrg])# _LT_PATH_LD_GNU 42356f03b1f6Smrg 42366f03b1f6Smrg 4237356f6debSmrg# _LT_CMD_RELOAD 4238356f6debSmrg# -------------- 423998af18c5Smrg# find reload flag for linker 424098af18c5Smrg# -- PORTME Some linkers may need a different reload flag. 4241356f6debSmrgm4_defun([_LT_CMD_RELOAD], 424298af18c5Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 424398af18c5Smrg lt_cv_ld_reload_flag, 424498af18c5Smrg [lt_cv_ld_reload_flag='-r']) 424598af18c5Smrgreload_flag=$lt_cv_ld_reload_flag 424698af18c5Smrgcase $reload_flag in 424798af18c5Smrg"" | " "*) ;; 424898af18c5Smrg*) reload_flag=" $reload_flag" ;; 424998af18c5Smrgesac 425098af18c5Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 425198af18c5Smrgcase $host_os in 425242941e3bSmrg cygwin* | mingw* | pw32* | cegcc*) 425342941e3bSmrg if test "$GCC" != yes; then 425442941e3bSmrg reload_cmds=false 425542941e3bSmrg fi 425642941e3bSmrg ;; 425798af18c5Smrg darwin*) 425898af18c5Smrg if test "$GCC" = yes; then 425998af18c5Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 426098af18c5Smrg else 426198af18c5Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 426298af18c5Smrg fi 426398af18c5Smrg ;; 426498af18c5Smrgesac 426542941e3bSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 426642941e3bSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 4267356f6debSmrg])# _LT_CMD_RELOAD 42686f03b1f6Smrg 42696f03b1f6Smrg 4270356f6debSmrg# _LT_CHECK_MAGIC_METHOD 4271356f6debSmrg# ---------------------- 427298af18c5Smrg# how to check for library dependencies 427398af18c5Smrg# -- PORTME fill in with the dynamic library characteristics 4274356f6debSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 4275356f6debSmrg[m4_require([_LT_DECL_EGREP]) 4276356f6debSmrgm4_require([_LT_DECL_OBJDUMP]) 4277356f6debSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 427898af18c5Smrglt_cv_deplibs_check_method, 427998af18c5Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 428098af18c5Smrglt_cv_file_magic_test_file= 428198af18c5Smrglt_cv_deplibs_check_method='unknown' 428298af18c5Smrg# Need to set the preceding variable on all platforms that support 428398af18c5Smrg# interlibrary dependencies. 428498af18c5Smrg# 'none' -- dependencies not supported. 428598af18c5Smrg# `unknown' -- same as none, but documents that we really don't know. 428698af18c5Smrg# 'pass_all' -- all dependencies passed with no checks. 428798af18c5Smrg# 'test_compile' -- check by making test program. 428898af18c5Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 428998af18c5Smrg# which responds to the $file_magic_cmd with a given extended regex. 429098af18c5Smrg# If you have `file' or equivalent on your system and you're not sure 429198af18c5Smrg# whether `pass_all' will *always* work, you probably want this one. 42926f03b1f6Smrg 429398af18c5Smrgcase $host_os in 429498af18c5Smrgaix[[4-9]]*) 429598af18c5Smrg lt_cv_deplibs_check_method=pass_all 429698af18c5Smrg ;; 42976f03b1f6Smrg 429898af18c5Smrgbeos*) 429998af18c5Smrg lt_cv_deplibs_check_method=pass_all 430098af18c5Smrg ;; 43016f03b1f6Smrg 430298af18c5Smrgbsdi[[45]]*) 430398af18c5Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 430498af18c5Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 430598af18c5Smrg lt_cv_file_magic_test_file=/shlib/libc.so 430698af18c5Smrg ;; 43076f03b1f6Smrg 430898af18c5Smrgcygwin*) 430998af18c5Smrg # func_win32_libid is a shell function defined in ltmain.sh 431098af18c5Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 431198af18c5Smrg lt_cv_file_magic_cmd='func_win32_libid' 431298af18c5Smrg ;; 43136f03b1f6Smrg 431498af18c5Smrgmingw* | pw32*) 431598af18c5Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 431698af18c5Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 431798af18c5Smrg # unless we find 'file', for example because we are cross-compiling. 431842941e3bSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 431942941e3bSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 432098af18c5Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 432198af18c5Smrg lt_cv_file_magic_cmd='func_win32_libid' 432298af18c5Smrg else 432342941e3bSmrg # Keep this pattern in sync with the one in func_win32_libid. 432442941e3bSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 432598af18c5Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43266f03b1f6Smrg fi 432798af18c5Smrg ;; 43286f03b1f6Smrg 432942941e3bSmrgcegcc*) 4330356f6debSmrg # use the weaker test based on 'objdump'. See mingw*. 4331356f6debSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 4332356f6debSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 4333356f6debSmrg ;; 4334356f6debSmrg 433598af18c5Smrgdarwin* | rhapsody*) 433698af18c5Smrg lt_cv_deplibs_check_method=pass_all 433798af18c5Smrg ;; 433898af18c5Smrg 433998af18c5Smrgfreebsd* | dragonfly*) 4340356f6debSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 434198af18c5Smrg case $host_cpu in 434298af18c5Smrg i*86 ) 434398af18c5Smrg # Not sure whether the presence of OpenBSD here was a mistake. 434498af18c5Smrg # Let's accept both of them until this is cleared up. 434598af18c5Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 434698af18c5Smrg lt_cv_file_magic_cmd=/usr/bin/file 434798af18c5Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 43486f03b1f6Smrg ;; 43496f03b1f6Smrg esac 435098af18c5Smrg else 435198af18c5Smrg lt_cv_deplibs_check_method=pass_all 435298af18c5Smrg fi 435398af18c5Smrg ;; 43546f03b1f6Smrg 435598af18c5Smrggnu*) 435698af18c5Smrg lt_cv_deplibs_check_method=pass_all 435798af18c5Smrg ;; 435898af18c5Smrg 435942941e3bSmrghaiku*) 436042941e3bSmrg lt_cv_deplibs_check_method=pass_all 436142941e3bSmrg ;; 436242941e3bSmrg 436398af18c5Smrghpux10.20* | hpux11*) 436498af18c5Smrg lt_cv_file_magic_cmd=/usr/bin/file 436598af18c5Smrg case $host_cpu in 436698af18c5Smrg ia64*) 436798af18c5Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 436898af18c5Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 436998af18c5Smrg ;; 437098af18c5Smrg hppa*64*) 437142941e3bSmrg [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]'] 437298af18c5Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 437398af18c5Smrg ;; 437498af18c5Smrg *) 437542941e3bSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 437698af18c5Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 43776f03b1f6Smrg ;; 43786f03b1f6Smrg esac 437998af18c5Smrg ;; 43806f03b1f6Smrg 438198af18c5Smrginterix[[3-9]]*) 438298af18c5Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 438398af18c5Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 438498af18c5Smrg ;; 43856f03b1f6Smrg 438698af18c5Smrgirix5* | irix6* | nonstopux*) 438798af18c5Smrg case $LD in 438898af18c5Smrg *-32|*"-32 ") libmagic=32-bit;; 438998af18c5Smrg *-n32|*"-n32 ") libmagic=N32;; 439098af18c5Smrg *-64|*"-64 ") libmagic=64-bit;; 439198af18c5Smrg *) libmagic=never-match;; 439298af18c5Smrg esac 439398af18c5Smrg lt_cv_deplibs_check_method=pass_all 439498af18c5Smrg ;; 43956f03b1f6Smrg 439698af18c5Smrg# This must be Linux ELF. 439742941e3bSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 439898af18c5Smrg lt_cv_deplibs_check_method=pass_all 439998af18c5Smrg ;; 44006f03b1f6Smrg 440198af18c5Smrgnetbsd*) 4402356f6debSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 440398af18c5Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 440498af18c5Smrg else 440598af18c5Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 440698af18c5Smrg fi 440798af18c5Smrg ;; 44086f03b1f6Smrg 440998af18c5Smrgnewos6*) 441098af18c5Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 441198af18c5Smrg lt_cv_file_magic_cmd=/usr/bin/file 441298af18c5Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 441398af18c5Smrg ;; 44146f03b1f6Smrg 4415356f6debSmrg*nto* | *qnx*) 4416356f6debSmrg lt_cv_deplibs_check_method=pass_all 441798af18c5Smrg ;; 44186f03b1f6Smrg 441998af18c5Smrgopenbsd*) 4420356f6debSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 442198af18c5Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 442298af18c5Smrg else 442398af18c5Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 442498af18c5Smrg fi 442598af18c5Smrg ;; 44266f03b1f6Smrg 442798af18c5Smrgosf3* | osf4* | osf5*) 442898af18c5Smrg lt_cv_deplibs_check_method=pass_all 442998af18c5Smrg ;; 44306f03b1f6Smrg 443198af18c5Smrgrdos*) 443298af18c5Smrg lt_cv_deplibs_check_method=pass_all 443398af18c5Smrg ;; 44346f03b1f6Smrg 443598af18c5Smrgsolaris*) 443698af18c5Smrg lt_cv_deplibs_check_method=pass_all 443798af18c5Smrg ;; 44386f03b1f6Smrg 4439356f6debSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 4440356f6debSmrg lt_cv_deplibs_check_method=pass_all 4441356f6debSmrg ;; 4442356f6debSmrg 444398af18c5Smrgsysv4 | sysv4.3*) 444498af18c5Smrg case $host_vendor in 444598af18c5Smrg motorola) 444698af18c5Smrg 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]]' 444798af18c5Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 444898af18c5Smrg ;; 444998af18c5Smrg ncr) 445098af18c5Smrg lt_cv_deplibs_check_method=pass_all 445198af18c5Smrg ;; 445298af18c5Smrg sequent) 445398af18c5Smrg lt_cv_file_magic_cmd='/bin/file' 445498af18c5Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 445598af18c5Smrg ;; 445698af18c5Smrg sni) 445798af18c5Smrg lt_cv_file_magic_cmd='/bin/file' 445898af18c5Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 445998af18c5Smrg lt_cv_file_magic_test_file=/lib/libc.so 446098af18c5Smrg ;; 446198af18c5Smrg siemens) 446298af18c5Smrg lt_cv_deplibs_check_method=pass_all 446398af18c5Smrg ;; 446498af18c5Smrg pc) 446598af18c5Smrg lt_cv_deplibs_check_method=pass_all 446698af18c5Smrg ;; 446798af18c5Smrg esac 446898af18c5Smrg ;; 44696f03b1f6Smrg 4470356f6debSmrgtpf*) 447198af18c5Smrg lt_cv_deplibs_check_method=pass_all 447298af18c5Smrg ;; 447398af18c5Smrgesac 447498af18c5Smrg]) 447542941e3bSmrg 447642941e3bSmrgfile_magic_glob= 447742941e3bSmrgwant_nocaseglob=no 447842941e3bSmrgif test "$build" = "$host"; then 447942941e3bSmrg case $host_os in 448042941e3bSmrg mingw* | pw32*) 448142941e3bSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 448242941e3bSmrg want_nocaseglob=yes 448342941e3bSmrg else 448442941e3bSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 448542941e3bSmrg fi 448642941e3bSmrg ;; 448742941e3bSmrg esac 448842941e3bSmrgfi 448942941e3bSmrg 449098af18c5Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 449198af18c5Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 449298af18c5Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4493356f6debSmrg 4494356f6debSmrg_LT_DECL([], [deplibs_check_method], [1], 4495356f6debSmrg [Method to check whether dependent libraries are shared objects]) 4496356f6debSmrg_LT_DECL([], [file_magic_cmd], [1], 449742941e3bSmrg [Command to use when deplibs_check_method = "file_magic"]) 449842941e3bSmrg_LT_DECL([], [file_magic_glob], [1], 449942941e3bSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 450042941e3bSmrg_LT_DECL([], [want_nocaseglob], [1], 450142941e3bSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 4502356f6debSmrg])# _LT_CHECK_MAGIC_METHOD 45036f03b1f6Smrg 45046f03b1f6Smrg 4505356f6debSmrg# LT_PATH_NM 450698af18c5Smrg# ---------- 4507356f6debSmrg# find the pathname to a BSD- or MS-compatible name lister 4508356f6debSmrgAC_DEFUN([LT_PATH_NM], 4509356f6debSmrg[AC_REQUIRE([AC_PROG_CC])dnl 4510356f6debSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 451198af18c5Smrg[if test -n "$NM"; then 451298af18c5Smrg # Let the user override the test. 451398af18c5Smrg lt_cv_path_NM="$NM" 451498af18c5Smrgelse 451598af18c5Smrg lt_nm_to_check="${ac_tool_prefix}nm" 451698af18c5Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 451798af18c5Smrg lt_nm_to_check="$lt_nm_to_check nm" 451898af18c5Smrg fi 451998af18c5Smrg for lt_tmp_nm in $lt_nm_to_check; do 452098af18c5Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 452198af18c5Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 452298af18c5Smrg IFS="$lt_save_ifs" 452398af18c5Smrg test -z "$ac_dir" && ac_dir=. 452498af18c5Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 452598af18c5Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 452698af18c5Smrg # Check to see if the nm accepts a BSD-compat flag. 452798af18c5Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 452898af18c5Smrg # nm: unknown option "B" ignored 452998af18c5Smrg # Tru64's nm complains that /dev/null is an invalid object file 453098af18c5Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 453198af18c5Smrg */dev/null* | *'Invalid file or object type'*) 453298af18c5Smrg lt_cv_path_NM="$tmp_nm -B" 453398af18c5Smrg break 453498af18c5Smrg ;; 453598af18c5Smrg *) 453698af18c5Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 453798af18c5Smrg */dev/null*) 453898af18c5Smrg lt_cv_path_NM="$tmp_nm -p" 453998af18c5Smrg break 454098af18c5Smrg ;; 454198af18c5Smrg *) 454298af18c5Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 454398af18c5Smrg continue # so that we can try to find one that supports BSD flags 454498af18c5Smrg ;; 454598af18c5Smrg esac 454698af18c5Smrg ;; 454798af18c5Smrg esac 454898af18c5Smrg fi 454998af18c5Smrg done 455098af18c5Smrg IFS="$lt_save_ifs" 455198af18c5Smrg done 4552356f6debSmrg : ${lt_cv_path_NM=no} 455398af18c5Smrgfi]) 4554356f6debSmrgif test "$lt_cv_path_NM" != "no"; then 4555356f6debSmrg NM="$lt_cv_path_NM" 4556356f6debSmrgelse 4557356f6debSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 455842941e3bSmrg if test -n "$DUMPBIN"; then : 455942941e3bSmrg # Let the user override the test. 456042941e3bSmrg else 456142941e3bSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 456242941e3bSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 456342941e3bSmrg *COFF*) 456442941e3bSmrg DUMPBIN="$DUMPBIN -symbols" 456542941e3bSmrg ;; 456642941e3bSmrg *) 456742941e3bSmrg DUMPBIN=: 456842941e3bSmrg ;; 456942941e3bSmrg esac 457042941e3bSmrg fi 4571356f6debSmrg AC_SUBST([DUMPBIN]) 4572356f6debSmrg if test "$DUMPBIN" != ":"; then 4573356f6debSmrg NM="$DUMPBIN" 4574356f6debSmrg fi 4575356f6debSmrgfi 4576356f6debSmrgtest -z "$NM" && NM=nm 4577356f6debSmrgAC_SUBST([NM]) 4578356f6debSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4579356f6debSmrg 4580356f6debSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 4581356f6debSmrg [lt_cv_nm_interface="BSD nm" 4582356f6debSmrg echo "int some_variable = 0;" > conftest.$ac_ext 458342941e3bSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 4584356f6debSmrg (eval "$ac_compile" 2>conftest.err) 4585356f6debSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 458642941e3bSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 4587356f6debSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 4588356f6debSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 458942941e3bSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 4590356f6debSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 4591356f6debSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 4592356f6debSmrg lt_cv_nm_interface="MS dumpbin" 4593356f6debSmrg fi 4594356f6debSmrg rm -f conftest*]) 4595356f6debSmrg])# LT_PATH_NM 45966f03b1f6Smrg 4597356f6debSmrg# Old names: 4598356f6debSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 4599356f6debSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4600356f6debSmrgdnl aclocal-1.4 backwards compatibility: 4601356f6debSmrgdnl AC_DEFUN([AM_PROG_NM], []) 4602356f6debSmrgdnl AC_DEFUN([AC_PROG_NM], []) 46036f03b1f6Smrg 460442941e3bSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 460542941e3bSmrg# -------------------------------- 460642941e3bSmrg# how to determine the name of the shared library 460742941e3bSmrg# associated with a specific link library. 460842941e3bSmrg# -- PORTME fill in with the dynamic library characteristics 460942941e3bSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 461042941e3bSmrg[m4_require([_LT_DECL_EGREP]) 461142941e3bSmrgm4_require([_LT_DECL_OBJDUMP]) 461242941e3bSmrgm4_require([_LT_DECL_DLLTOOL]) 461342941e3bSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 461442941e3bSmrglt_cv_sharedlib_from_linklib_cmd, 461542941e3bSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4616356f6debSmrg 461742941e3bSmrgcase $host_os in 461842941e3bSmrgcygwin* | mingw* | pw32* | cegcc*) 461942941e3bSmrg # two different shell functions defined in ltmain.sh 462042941e3bSmrg # decide which to use based on capabilities of $DLLTOOL 462142941e3bSmrg case `$DLLTOOL --help 2>&1` in 462242941e3bSmrg *--identify-strict*) 462342941e3bSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 462442941e3bSmrg ;; 462542941e3bSmrg *) 462642941e3bSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 462742941e3bSmrg ;; 462842941e3bSmrg esac 462942941e3bSmrg ;; 463042941e3bSmrg*) 463142941e3bSmrg # fallback: assume linklib IS sharedlib 463242941e3bSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 463342941e3bSmrg ;; 463442941e3bSmrgesac 463542941e3bSmrg]) 463642941e3bSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 463742941e3bSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 463842941e3bSmrg 463942941e3bSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 464042941e3bSmrg [Command to associate shared and link libraries]) 464142941e3bSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 464242941e3bSmrg 464342941e3bSmrg 464442941e3bSmrg# _LT_PATH_MANIFEST_TOOL 464542941e3bSmrg# ---------------------- 464642941e3bSmrg# locate the manifest tool 464742941e3bSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 464842941e3bSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 464942941e3bSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 465042941e3bSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 465142941e3bSmrg [lt_cv_path_mainfest_tool=no 465242941e3bSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 465342941e3bSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 465442941e3bSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 465542941e3bSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 465642941e3bSmrg lt_cv_path_mainfest_tool=yes 465742941e3bSmrg fi 465842941e3bSmrg rm -f conftest*]) 465942941e3bSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 466042941e3bSmrg MANIFEST_TOOL=: 466142941e3bSmrgfi 466242941e3bSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 466342941e3bSmrg])# _LT_PATH_MANIFEST_TOOL 466442941e3bSmrg 466542941e3bSmrg 466642941e3bSmrg# LT_LIB_M 466742941e3bSmrg# -------- 466842941e3bSmrg# check for math library 466942941e3bSmrgAC_DEFUN([LT_LIB_M], 467042941e3bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 467142941e3bSmrgLIBM= 467298af18c5Smrgcase $host in 467342941e3bSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 467498af18c5Smrg # These system don't have libm, or don't need it 467598af18c5Smrg ;; 467698af18c5Smrg*-ncr-sysv4.3*) 467798af18c5Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 467898af18c5Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 467998af18c5Smrg ;; 468098af18c5Smrg*) 468198af18c5Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 468298af18c5Smrg ;; 468398af18c5Smrgesac 4684356f6debSmrgAC_SUBST([LIBM]) 4685356f6debSmrg])# LT_LIB_M 46866f03b1f6Smrg 4687356f6debSmrg# Old name: 4688356f6debSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 4689356f6debSmrgdnl aclocal-1.4 backwards compatibility: 4690356f6debSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 46916f03b1f6Smrg 46926f03b1f6Smrg 4693356f6debSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 4694356f6debSmrg# ------------------------------- 4695356f6debSmrgm4_defun([_LT_COMPILER_NO_RTTI], 4696356f6debSmrg[m4_require([_LT_TAG_COMPILER])dnl 46976f03b1f6Smrg 4698356f6debSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 46996f03b1f6Smrg 4700356f6debSmrgif test "$GCC" = yes; then 470142941e3bSmrg case $cc_basename in 470242941e3bSmrg nvcc*) 470342941e3bSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 470442941e3bSmrg *) 470542941e3bSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 470642941e3bSmrg esac 47076f03b1f6Smrg 4708356f6debSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4709356f6debSmrg lt_cv_prog_compiler_rtti_exceptions, 4710356f6debSmrg [-fno-rtti -fno-exceptions], [], 4711356f6debSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 471298af18c5Smrgfi 4713356f6debSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4714356f6debSmrg [Compiler flag to turn off builtin functions]) 4715356f6debSmrg])# _LT_COMPILER_NO_RTTI 47166f03b1f6Smrg 47176f03b1f6Smrg 4718356f6debSmrg# _LT_CMD_GLOBAL_SYMBOLS 4719356f6debSmrg# ---------------------- 4720356f6debSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4721356f6debSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4722356f6debSmrgAC_REQUIRE([AC_PROG_CC])dnl 472342941e3bSmrgAC_REQUIRE([AC_PROG_AWK])dnl 4724356f6debSmrgAC_REQUIRE([LT_PATH_NM])dnl 4725356f6debSmrgAC_REQUIRE([LT_PATH_LD])dnl 4726356f6debSmrgm4_require([_LT_DECL_SED])dnl 4727356f6debSmrgm4_require([_LT_DECL_EGREP])dnl 4728356f6debSmrgm4_require([_LT_TAG_COMPILER])dnl 47296f03b1f6Smrg 4730356f6debSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4731356f6debSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4732356f6debSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4733356f6debSmrg[ 4734356f6debSmrg# These are sane defaults that work on at least a few old systems. 4735356f6debSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 47366f03b1f6Smrg 4737356f6debSmrg# Character class describing NM global symbol codes. 4738356f6debSmrgsymcode='[[BCDEGRST]]' 47396f03b1f6Smrg 4740356f6debSmrg# Regexp to match symbols that can be accessed directly from C. 4741356f6debSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 47426f03b1f6Smrg 4743356f6debSmrg# Define system-specific variables. 474498af18c5Smrgcase $host_os in 4745356f6debSmrgaix*) 4746356f6debSmrg symcode='[[BCDT]]' 474798af18c5Smrg ;; 4748356f6debSmrgcygwin* | mingw* | pw32* | cegcc*) 4749356f6debSmrg symcode='[[ABCDGISTW]]' 4750356f6debSmrg ;; 4751356f6debSmrghpux*) 4752356f6debSmrg if test "$host_cpu" = ia64; then 4753356f6debSmrg symcode='[[ABCDEGRST]]' 475498af18c5Smrg fi 4755356f6debSmrg ;; 4756356f6debSmrgirix* | nonstopux*) 4757356f6debSmrg symcode='[[BCDEGRST]]' 4758356f6debSmrg ;; 4759356f6debSmrgosf*) 4760356f6debSmrg symcode='[[BCDEGQRST]]' 4761356f6debSmrg ;; 4762356f6debSmrgsolaris*) 4763356f6debSmrg symcode='[[BDRT]]' 4764356f6debSmrg ;; 4765356f6debSmrgsco3.2v5*) 4766356f6debSmrg symcode='[[DT]]' 4767356f6debSmrg ;; 4768356f6debSmrgsysv4.2uw2*) 4769356f6debSmrg symcode='[[DT]]' 4770356f6debSmrg ;; 4771356f6debSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4772356f6debSmrg symcode='[[ABDT]]' 4773356f6debSmrg ;; 4774356f6debSmrgsysv4) 4775356f6debSmrg symcode='[[DFNSTU]]' 4776356f6debSmrg ;; 477798af18c5Smrgesac 47786f03b1f6Smrg 4779356f6debSmrg# If we're using GNU nm, then use its standard symbol codes. 4780356f6debSmrgcase `$NM -V 2>&1` in 4781356f6debSmrg*GNU* | *'with BFD'*) 4782356f6debSmrg symcode='[[ABCDGIRSTW]]' ;; 4783356f6debSmrgesac 47846f03b1f6Smrg 4785356f6debSmrg# Transform an extracted symbol line into a proper C declaration. 4786356f6debSmrg# Some systems (esp. on ia64) link data and code symbols differently, 4787356f6debSmrg# so use this general approach. 4788356f6debSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 47896f03b1f6Smrg 4790356f6debSmrg# Transform an extracted symbol line into symbol name and symbol address 479142941e3bSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 479242941e3bSmrglt_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'" 47936f03b1f6Smrg 4794356f6debSmrg# Handle CRLF in mingw tool chain 4795356f6debSmrgopt_cr= 4796356f6debSmrgcase $build_os in 4797356f6debSmrgmingw*) 4798356f6debSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4799356f6debSmrg ;; 4800356f6debSmrgesac 48016f03b1f6Smrg 4802356f6debSmrg# Try without a prefix underscore, then with it. 4803356f6debSmrgfor ac_symprfx in "" "_"; do 48046f03b1f6Smrg 4805356f6debSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4806356f6debSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 48076f03b1f6Smrg 4808356f6debSmrg # Write the raw and C identifiers. 4809356f6debSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4810356f6debSmrg # Fake it for dumpbin and say T for any non-static function 4811356f6debSmrg # and D for any global variable. 4812356f6debSmrg # Also find C++ and __fastcall symbols from MSVC++, 4813356f6debSmrg # which start with @ or ?. 4814356f6debSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4815356f6debSmrg" {last_section=section; section=\$ 3};"\ 4816356f6debSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4817356f6debSmrg" \$ 0!~/External *\|/{next};"\ 4818356f6debSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4819356f6debSmrg" {if(hide[section]) next};"\ 4820356f6debSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 4821356f6debSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 4822356f6debSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 4823356f6debSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 4824356f6debSmrg" ' prfx=^$ac_symprfx]" 4825356f6debSmrg else 4826356f6debSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4827356f6debSmrg fi 482842941e3bSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 48296f03b1f6Smrg 4830356f6debSmrg # Check to see that the pipe works correctly. 4831356f6debSmrg pipe_works=no 48326f03b1f6Smrg 4833356f6debSmrg rm -f conftest* 4834356f6debSmrg cat > conftest.$ac_ext <<_LT_EOF 4835356f6debSmrg#ifdef __cplusplus 4836356f6debSmrgextern "C" { 4837356f6debSmrg#endif 4838356f6debSmrgchar nm_test_var; 4839356f6debSmrgvoid nm_test_func(void); 4840356f6debSmrgvoid nm_test_func(void){} 4841356f6debSmrg#ifdef __cplusplus 4842356f6debSmrg} 4843356f6debSmrg#endif 4844356f6debSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4845356f6debSmrg_LT_EOF 48466f03b1f6Smrg 4847356f6debSmrg if AC_TRY_EVAL(ac_compile); then 4848356f6debSmrg # Now try to grab the symbols. 4849356f6debSmrg nlist=conftest.nm 485042941e3bSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4851356f6debSmrg # Try sorting and uniquifying the output. 4852356f6debSmrg if sort "$nlist" | uniq > "$nlist"T; then 4853356f6debSmrg mv -f "$nlist"T "$nlist" 4854356f6debSmrg else 4855356f6debSmrg rm -f "$nlist"T 4856356f6debSmrg fi 48576f03b1f6Smrg 4858356f6debSmrg # Make sure that we snagged all the symbols we need. 4859356f6debSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4860356f6debSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4861356f6debSmrg cat <<_LT_EOF > conftest.$ac_ext 486242941e3bSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 486342941e3bSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 486442941e3bSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 486542941e3bSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 486642941e3bSmrg# define LT@&t@_DLSYM_CONST 486742941e3bSmrg#elif defined(__osf__) 486842941e3bSmrg/* This system does not cope well with relocations in const data. */ 486942941e3bSmrg# define LT@&t@_DLSYM_CONST 487042941e3bSmrg#else 487142941e3bSmrg# define LT@&t@_DLSYM_CONST const 487242941e3bSmrg#endif 487342941e3bSmrg 4874356f6debSmrg#ifdef __cplusplus 4875356f6debSmrgextern "C" { 4876356f6debSmrg#endif 48776f03b1f6Smrg 4878356f6debSmrg_LT_EOF 4879356f6debSmrg # Now generate the symbol file. 4880356f6debSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 48816f03b1f6Smrg 4882356f6debSmrg cat <<_LT_EOF >> conftest.$ac_ext 48836f03b1f6Smrg 4884356f6debSmrg/* The mapping between symbol names and symbols. */ 488542941e3bSmrgLT@&t@_DLSYM_CONST struct { 4886356f6debSmrg const char *name; 4887356f6debSmrg void *address; 4888356f6debSmrg} 4889356f6debSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4890356f6debSmrg{ 4891356f6debSmrg { "@PROGRAM@", (void *) 0 }, 4892356f6debSmrg_LT_EOF 4893356f6debSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4894356f6debSmrg cat <<\_LT_EOF >> conftest.$ac_ext 4895356f6debSmrg {0, (void *) 0} 4896356f6debSmrg}; 48976f03b1f6Smrg 4898356f6debSmrg/* This works around a problem in FreeBSD linker */ 4899356f6debSmrg#ifdef FREEBSD_WORKAROUND 4900356f6debSmrgstatic const void *lt_preloaded_setup() { 4901356f6debSmrg return lt__PROGRAM__LTX_preloaded_symbols; 4902356f6debSmrg} 4903356f6debSmrg#endif 49046f03b1f6Smrg 4905356f6debSmrg#ifdef __cplusplus 4906356f6debSmrg} 4907356f6debSmrg#endif 4908356f6debSmrg_LT_EOF 4909356f6debSmrg # Now try linking the two files. 4910356f6debSmrg mv conftest.$ac_objext conftstm.$ac_objext 491142941e3bSmrg lt_globsym_save_LIBS=$LIBS 491242941e3bSmrg lt_globsym_save_CFLAGS=$CFLAGS 4913356f6debSmrg LIBS="conftstm.$ac_objext" 4914356f6debSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4915356f6debSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 4916356f6debSmrg pipe_works=yes 4917356f6debSmrg fi 491842941e3bSmrg LIBS=$lt_globsym_save_LIBS 491942941e3bSmrg CFLAGS=$lt_globsym_save_CFLAGS 4920356f6debSmrg else 4921356f6debSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4922356f6debSmrg fi 4923356f6debSmrg else 4924356f6debSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4925356f6debSmrg fi 492698af18c5Smrg else 4927356f6debSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 492898af18c5Smrg fi 492998af18c5Smrg else 4930356f6debSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4931356f6debSmrg cat conftest.$ac_ext >&5 493298af18c5Smrg fi 4933356f6debSmrg rm -rf conftest* conftst* 49346f03b1f6Smrg 4935356f6debSmrg # Do not use the global_symbol_pipe unless it works. 4936356f6debSmrg if test "$pipe_works" = yes; then 4937356f6debSmrg break 4938356f6debSmrg else 4939356f6debSmrg lt_cv_sys_global_symbol_pipe= 4940356f6debSmrg fi 4941356f6debSmrgdone 4942356f6debSmrg]) 4943356f6debSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4944356f6debSmrg lt_cv_sys_global_symbol_to_cdecl= 4945356f6debSmrgfi 4946356f6debSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4947356f6debSmrg AC_MSG_RESULT(failed) 494898af18c5Smrgelse 4949356f6debSmrg AC_MSG_RESULT(ok) 495098af18c5Smrgfi 49516f03b1f6Smrg 495242941e3bSmrg# Response file support. 495342941e3bSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 495442941e3bSmrg nm_file_list_spec='@' 495542941e3bSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 495642941e3bSmrg nm_file_list_spec='@' 495742941e3bSmrgfi 495842941e3bSmrg 4959356f6debSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4960356f6debSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 4961356f6debSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4962356f6debSmrg [Transform the output of nm in a proper C declaration]) 4963356f6debSmrg_LT_DECL([global_symbol_to_c_name_address], 4964356f6debSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4965356f6debSmrg [Transform the output of nm in a C name address pair]) 4966356f6debSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4967356f6debSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4968356f6debSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 496942941e3bSmrg_LT_DECL([], [nm_file_list_spec], [1], 497042941e3bSmrg [Specify filename containing input files for $NM]) 4971356f6debSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 49726f03b1f6Smrg 49736f03b1f6Smrg 4974356f6debSmrg# _LT_COMPILER_PIC([TAGNAME]) 4975356f6debSmrg# --------------------------- 4976356f6debSmrgm4_defun([_LT_COMPILER_PIC], 4977356f6debSmrg[m4_require([_LT_TAG_COMPILER])dnl 4978356f6debSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4979356f6debSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4980356f6debSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 49816f03b1f6Smrg 4982356f6debSmrgm4_if([$1], [CXX], [ 4983356f6debSmrg # C++ specific cases for pic, static, wl, etc. 4984356f6debSmrg if test "$GXX" = yes; then 4985356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4986356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 49876f03b1f6Smrg 4988356f6debSmrg case $host_os in 4989356f6debSmrg aix*) 4990356f6debSmrg # All AIX code is PIC. 499198af18c5Smrg if test "$host_cpu" = ia64; then 4992356f6debSmrg # AIX 5 now supports IA64 processor 4993356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 499498af18c5Smrg fi 4995356f6debSmrg ;; 49966f03b1f6Smrg 4997356f6debSmrg amigaos*) 4998356f6debSmrg case $host_cpu in 4999356f6debSmrg powerpc) 5000356f6debSmrg # see comment about AmigaOS4 .so support 5001356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5002356f6debSmrg ;; 5003356f6debSmrg m68k) 5004356f6debSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5005356f6debSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5006356f6debSmrg # like `-m68040'. 5007356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5008356f6debSmrg ;; 5009356f6debSmrg esac 5010356f6debSmrg ;; 50116f03b1f6Smrg 5012356f6debSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5013356f6debSmrg # PIC is the default for these OSes. 5014356f6debSmrg ;; 5015356f6debSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 5016356f6debSmrg # This hack is so that the source file can tell whether it is being 5017356f6debSmrg # built for inclusion in a dll (and should export symbols for example). 5018356f6debSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5019356f6debSmrg # (--disable-auto-import) libraries 5020356f6debSmrg m4_if([$1], [GCJ], [], 5021356f6debSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5022356f6debSmrg ;; 5023356f6debSmrg darwin* | rhapsody*) 5024356f6debSmrg # PIC is the default on this platform 5025356f6debSmrg # Common symbols not allowed in MH_DYLIB files 5026356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5027356f6debSmrg ;; 5028356f6debSmrg *djgpp*) 5029356f6debSmrg # DJGPP does not support shared libraries at all 5030356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5031356f6debSmrg ;; 503242941e3bSmrg haiku*) 503342941e3bSmrg # PIC is the default for Haiku. 503442941e3bSmrg # The "-static" flag exists, but is broken. 503542941e3bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 503642941e3bSmrg ;; 5037356f6debSmrg interix[[3-9]]*) 5038356f6debSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5039356f6debSmrg # Instead, we relocate shared libraries at runtime. 5040356f6debSmrg ;; 5041356f6debSmrg sysv4*MP*) 5042356f6debSmrg if test -d /usr/nec; then 5043356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5044356f6debSmrg fi 5045356f6debSmrg ;; 5046356f6debSmrg hpux*) 5047356f6debSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5048356f6debSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5049356f6debSmrg # sets the default TLS model and affects inlining. 5050356f6debSmrg case $host_cpu in 5051356f6debSmrg hppa*64*) 5052356f6debSmrg ;; 505398af18c5Smrg *) 5054356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 505598af18c5Smrg ;; 5056356f6debSmrg esac 5057356f6debSmrg ;; 5058356f6debSmrg *qnx* | *nto*) 5059356f6debSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5060356f6debSmrg # it will coredump. 5061356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5062356f6debSmrg ;; 5063356f6debSmrg *) 5064356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5065356f6debSmrg ;; 506698af18c5Smrg esac 5067356f6debSmrg else 5068356f6debSmrg case $host_os in 5069356f6debSmrg aix[[4-9]]*) 5070356f6debSmrg # All AIX code is PIC. 5071356f6debSmrg if test "$host_cpu" = ia64; then 5072356f6debSmrg # AIX 5 now supports IA64 processor 5073356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5074356f6debSmrg else 5075356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5076356f6debSmrg fi 507798af18c5Smrg ;; 5078356f6debSmrg chorus*) 5079356f6debSmrg case $cc_basename in 5080356f6debSmrg cxch68*) 5081356f6debSmrg # Green Hills C++ Compiler 5082356f6debSmrg # _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" 508398af18c5Smrg ;; 508498af18c5Smrg esac 508598af18c5Smrg ;; 508642941e3bSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 508742941e3bSmrg # This hack is so that the source file can tell whether it is being 508842941e3bSmrg # built for inclusion in a dll (and should export symbols for example). 508942941e3bSmrg m4_if([$1], [GCJ], [], 509042941e3bSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 509142941e3bSmrg ;; 5092356f6debSmrg dgux*) 5093356f6debSmrg case $cc_basename in 5094356f6debSmrg ec++*) 5095356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5096356f6debSmrg ;; 5097356f6debSmrg ghcx*) 5098356f6debSmrg # Green Hills C++ Compiler 5099356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5100356f6debSmrg ;; 5101356f6debSmrg *) 5102356f6debSmrg ;; 5103356f6debSmrg esac 5104356f6debSmrg ;; 5105356f6debSmrg freebsd* | dragonfly*) 5106356f6debSmrg # FreeBSD uses GNU C++ 5107356f6debSmrg ;; 5108356f6debSmrg hpux9* | hpux10* | hpux11*) 5109356f6debSmrg case $cc_basename in 5110356f6debSmrg CC*) 5111356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5112356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5113356f6debSmrg if test "$host_cpu" != ia64; then 5114356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5115356f6debSmrg fi 5116356f6debSmrg ;; 5117356f6debSmrg aCC*) 5118356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5119356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 512098af18c5Smrg case $host_cpu in 5121356f6debSmrg hppa*64*|ia64*) 5122356f6debSmrg # +Z the default 512398af18c5Smrg ;; 512498af18c5Smrg *) 5125356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 512698af18c5Smrg ;; 512798af18c5Smrg esac 5128356f6debSmrg ;; 5129356f6debSmrg *) 5130356f6debSmrg ;; 513198af18c5Smrg esac 513298af18c5Smrg ;; 5133356f6debSmrg interix*) 5134356f6debSmrg # This is c89, which is MS Visual C++ (no shared libs) 5135356f6debSmrg # Anyone wants to do a port? 513698af18c5Smrg ;; 5137356f6debSmrg irix5* | irix6* | nonstopux*) 5138356f6debSmrg case $cc_basename in 5139356f6debSmrg CC*) 5140356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5141356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5142356f6debSmrg # CC pic flag -KPIC is the default. 5143356f6debSmrg ;; 5144356f6debSmrg *) 5145356f6debSmrg ;; 514698af18c5Smrg esac 514798af18c5Smrg ;; 514842941e3bSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5149356f6debSmrg case $cc_basename in 5150356f6debSmrg KCC*) 5151356f6debSmrg # KAI C++ Compiler 5152356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5153356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5154356f6debSmrg ;; 5155356f6debSmrg ecpc* ) 5156356f6debSmrg # old Intel C++ for x86_64 which still supported -KPIC. 5157356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5158356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5159356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5160356f6debSmrg ;; 5161356f6debSmrg icpc* ) 5162356f6debSmrg # Intel C++, used to be incompatible with GCC. 5163356f6debSmrg # ICC 10 doesn't accept -KPIC any more. 5164356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5165356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5166356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5167356f6debSmrg ;; 5168356f6debSmrg pgCC* | pgcpp*) 5169356f6debSmrg # Portland Group C++ compiler 5170356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5171356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5172356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5173356f6debSmrg ;; 5174356f6debSmrg cxx*) 5175356f6debSmrg # Compaq C++ 5176356f6debSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5177356f6debSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5178356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5179356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5180356f6debSmrg ;; 518142941e3bSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 518242941e3bSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 5183356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5184356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5185356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5186356f6debSmrg ;; 5187356f6debSmrg *) 5188356f6debSmrg case `$CC -V 2>&1 | sed 5q` in 5189356f6debSmrg *Sun\ C*) 5190356f6debSmrg # Sun C++ 5.9 5191356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5192356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5193356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5194356f6debSmrg ;; 5195356f6debSmrg esac 5196356f6debSmrg ;; 5197356f6debSmrg esac 519898af18c5Smrg ;; 5199356f6debSmrg lynxos*) 520098af18c5Smrg ;; 5201356f6debSmrg m88k*) 520298af18c5Smrg ;; 5203356f6debSmrg mvs*) 5204356f6debSmrg case $cc_basename in 5205356f6debSmrg cxx*) 5206356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 5207356f6debSmrg ;; 5208356f6debSmrg *) 5209356f6debSmrg ;; 5210356f6debSmrg esac 521198af18c5Smrg ;; 5212356f6debSmrg netbsd*) 521398af18c5Smrg ;; 5214356f6debSmrg *qnx* | *nto*) 5215356f6debSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5216356f6debSmrg # it will coredump. 5217356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5218356f6debSmrg ;; 5219356f6debSmrg osf3* | osf4* | osf5*) 5220356f6debSmrg case $cc_basename in 5221356f6debSmrg KCC*) 5222356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 5223356f6debSmrg ;; 5224356f6debSmrg RCC*) 5225356f6debSmrg # Rational C++ 2.4.1 5226356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5227356f6debSmrg ;; 5228356f6debSmrg cxx*) 5229356f6debSmrg # Digital/Compaq C++ 5230356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5231356f6debSmrg # Make sure the PIC flag is empty. It appears that all Alpha 5232356f6debSmrg # Linux and Compaq Tru64 Unix objects are PIC. 5233356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5234356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5235356f6debSmrg ;; 5236356f6debSmrg *) 5237356f6debSmrg ;; 5238356f6debSmrg esac 523998af18c5Smrg ;; 5240356f6debSmrg psos*) 524198af18c5Smrg ;; 5242356f6debSmrg solaris*) 5243356f6debSmrg case $cc_basename in 524442941e3bSmrg CC* | sunCC*) 5245356f6debSmrg # Sun C++ 4.2, 5.x and Centerline C++ 5246356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5247356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5248356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5249356f6debSmrg ;; 5250356f6debSmrg gcx*) 5251356f6debSmrg # Green Hills C++ Compiler 5252356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5253356f6debSmrg ;; 5254356f6debSmrg *) 5255356f6debSmrg ;; 5256356f6debSmrg esac 525798af18c5Smrg ;; 5258356f6debSmrg sunos4*) 5259356f6debSmrg case $cc_basename in 5260356f6debSmrg CC*) 5261356f6debSmrg # Sun C++ 4.x 5262356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5263356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5264356f6debSmrg ;; 5265356f6debSmrg lcc*) 5266356f6debSmrg # Lucid 5267356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5268356f6debSmrg ;; 5269356f6debSmrg *) 5270356f6debSmrg ;; 5271356f6debSmrg esac 527298af18c5Smrg ;; 5273356f6debSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5274356f6debSmrg case $cc_basename in 5275356f6debSmrg CC*) 5276356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5277356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5278356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5279356f6debSmrg ;; 5280356f6debSmrg esac 52816f03b1f6Smrg ;; 5282356f6debSmrg tandem*) 5283356f6debSmrg case $cc_basename in 5284356f6debSmrg NCC*) 5285356f6debSmrg # NonStop-UX NCC 3.20 5286356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5287356f6debSmrg ;; 5288356f6debSmrg *) 5289356f6debSmrg ;; 5290356f6debSmrg esac 52916f03b1f6Smrg ;; 5292356f6debSmrg vxworks*) 529398af18c5Smrg ;; 529498af18c5Smrg *) 5295356f6debSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 529698af18c5Smrg ;; 529798af18c5Smrg esac 5298356f6debSmrg fi 5299356f6debSmrg], 5300356f6debSmrg[ 5301356f6debSmrg if test "$GCC" = yes; then 5302356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5303356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 530498af18c5Smrg 5305356f6debSmrg case $host_os in 5306356f6debSmrg aix*) 5307356f6debSmrg # All AIX code is PIC. 5308356f6debSmrg if test "$host_cpu" = ia64; then 5309356f6debSmrg # AIX 5 now supports IA64 processor 5310356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5311356f6debSmrg fi 5312356f6debSmrg ;; 531398af18c5Smrg 5314356f6debSmrg amigaos*) 5315356f6debSmrg case $host_cpu in 5316356f6debSmrg powerpc) 5317356f6debSmrg # see comment about AmigaOS4 .so support 5318356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5319356f6debSmrg ;; 5320356f6debSmrg m68k) 5321356f6debSmrg # FIXME: we need at least 68020 code to build shared libraries, but 5322356f6debSmrg # adding the `-m68020' flag to GCC prevents building anything better, 5323356f6debSmrg # like `-m68040'. 5324356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5325356f6debSmrg ;; 5326356f6debSmrg esac 5327356f6debSmrg ;; 532898af18c5Smrg 5329356f6debSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 5330356f6debSmrg # PIC is the default for these OSes. 5331356f6debSmrg ;; 533298af18c5Smrg 5333356f6debSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 5334356f6debSmrg # This hack is so that the source file can tell whether it is being 5335356f6debSmrg # built for inclusion in a dll (and should export symbols for example). 5336356f6debSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5337356f6debSmrg # (--disable-auto-import) libraries 5338356f6debSmrg m4_if([$1], [GCJ], [], 5339356f6debSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5340356f6debSmrg ;; 534198af18c5Smrg 5342356f6debSmrg darwin* | rhapsody*) 5343356f6debSmrg # PIC is the default on this platform 5344356f6debSmrg # Common symbols not allowed in MH_DYLIB files 5345356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5346356f6debSmrg ;; 534798af18c5Smrg 534842941e3bSmrg haiku*) 534942941e3bSmrg # PIC is the default for Haiku. 535042941e3bSmrg # The "-static" flag exists, but is broken. 535142941e3bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 535242941e3bSmrg ;; 535342941e3bSmrg 5354356f6debSmrg hpux*) 5355356f6debSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5356356f6debSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5357356f6debSmrg # sets the default TLS model and affects inlining. 5358356f6debSmrg case $host_cpu in 5359356f6debSmrg hppa*64*) 5360356f6debSmrg # +Z the default 53616f03b1f6Smrg ;; 536298af18c5Smrg *) 5363356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53646f03b1f6Smrg ;; 5365356f6debSmrg esac 5366356f6debSmrg ;; 5367356f6debSmrg 5368356f6debSmrg interix[[3-9]]*) 5369356f6debSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 5370356f6debSmrg # Instead, we relocate shared libraries at runtime. 5371356f6debSmrg ;; 5372356f6debSmrg 5373356f6debSmrg msdosdjgpp*) 5374356f6debSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 5375356f6debSmrg # on systems that don't support them. 5376356f6debSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5377356f6debSmrg enable_shared=no 5378356f6debSmrg ;; 5379356f6debSmrg 5380356f6debSmrg *nto* | *qnx*) 5381356f6debSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5382356f6debSmrg # it will coredump. 5383356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5384356f6debSmrg ;; 5385356f6debSmrg 5386356f6debSmrg sysv4*MP*) 5387356f6debSmrg if test -d /usr/nec; then 5388356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5389356f6debSmrg fi 5390356f6debSmrg ;; 5391356f6debSmrg 5392356f6debSmrg *) 5393356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5394356f6debSmrg ;; 539598af18c5Smrg esac 539642941e3bSmrg 539742941e3bSmrg case $cc_basename in 539842941e3bSmrg nvcc*) # Cuda Compiler Driver 2.2 539942941e3bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 540042941e3bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 540142941e3bSmrg ;; 540242941e3bSmrg esac 5403356f6debSmrg else 5404356f6debSmrg # PORTME Check for flag to pass linker flags through the system compiler. 5405356f6debSmrg case $host_os in 5406356f6debSmrg aix*) 5407356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5408356f6debSmrg if test "$host_cpu" = ia64; then 5409356f6debSmrg # AIX 5 now supports IA64 processor 5410356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5411356f6debSmrg else 5412356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5413356f6debSmrg fi 5414356f6debSmrg ;; 5415356f6debSmrg 5416356f6debSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 5417356f6debSmrg # This hack is so that the source file can tell whether it is being 5418356f6debSmrg # built for inclusion in a dll (and should export symbols for example). 5419356f6debSmrg m4_if([$1], [GCJ], [], 5420356f6debSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 5421356f6debSmrg ;; 5422356f6debSmrg 5423356f6debSmrg hpux9* | hpux10* | hpux11*) 5424356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5425356f6debSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 5426356f6debSmrg # not for PA HP-UX. 5427356f6debSmrg case $host_cpu in 5428356f6debSmrg hppa*64*|ia64*) 5429356f6debSmrg # +Z the default 54306f03b1f6Smrg ;; 543198af18c5Smrg *) 5432356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 54336f03b1f6Smrg ;; 5434356f6debSmrg esac 5435356f6debSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 5436356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 5437356f6debSmrg ;; 5438356f6debSmrg 5439356f6debSmrg irix5* | irix6* | nonstopux*) 5440356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5441356f6debSmrg # PIC (with -KPIC) is the default. 5442356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5443356f6debSmrg ;; 5444356f6debSmrg 544542941e3bSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5446356f6debSmrg case $cc_basename in 5447356f6debSmrg # old Intel for x86_64 which still supported -KPIC. 5448356f6debSmrg ecc*) 5449356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5450356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5451356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5452356f6debSmrg ;; 5453356f6debSmrg # icc used to be incompatible with GCC. 5454356f6debSmrg # ICC 10 doesn't accept -KPIC any more. 5455356f6debSmrg icc* | ifort*) 5456356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5457356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5458356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5459356f6debSmrg ;; 5460356f6debSmrg # Lahey Fortran 8.1. 5461356f6debSmrg lf95*) 5462356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5463356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 5464356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 5465356f6debSmrg ;; 546642941e3bSmrg nagfor*) 546742941e3bSmrg # NAG Fortran compiler 546842941e3bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 546942941e3bSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 547042941e3bSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 547142941e3bSmrg ;; 547242941e3bSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 5473356f6debSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 5474356f6debSmrg # which looks to be a dead project) 5475356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5476356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5477356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5478356f6debSmrg ;; 5479356f6debSmrg ccc*) 5480356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5481356f6debSmrg # All Alpha code is PIC. 5482356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5483356f6debSmrg ;; 548442941e3bSmrg xl* | bgxl* | bgf* | mpixl*) 548542941e3bSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 5486356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5487356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 5488356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 54896f03b1f6Smrg ;; 54906f03b1f6Smrg *) 5491356f6debSmrg case `$CC -V 2>&1 | sed 5q` in 549242941e3bSmrg *Sun\ F* | *Sun*Fortran*) 549342941e3bSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 5494356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5495356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549642941e3bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 5497356f6debSmrg ;; 549842941e3bSmrg *Sun\ C*) 549942941e3bSmrg # Sun C 5.9 5500356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5501356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 550242941e3bSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5503356f6debSmrg ;; 5504356f6debSmrg esac 55056f03b1f6Smrg ;; 5506356f6debSmrg esac 5507356f6debSmrg ;; 55086f03b1f6Smrg 5509356f6debSmrg newsos6) 5510356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5511356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5512356f6debSmrg ;; 55136f03b1f6Smrg 5514356f6debSmrg *nto* | *qnx*) 5515356f6debSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5516356f6debSmrg # it will coredump. 5517356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5518356f6debSmrg ;; 55196f03b1f6Smrg 5520356f6debSmrg osf3* | osf4* | osf5*) 5521356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5522356f6debSmrg # All OSF/1 code is PIC. 5523356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5524356f6debSmrg ;; 55256f03b1f6Smrg 5526356f6debSmrg rdos*) 5527356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5528356f6debSmrg ;; 55296f03b1f6Smrg 5530356f6debSmrg solaris*) 5531356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5532356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5533356f6debSmrg case $cc_basename in 553442941e3bSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 5535356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 5536356f6debSmrg *) 5537356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 5538356f6debSmrg esac 5539356f6debSmrg ;; 55406f03b1f6Smrg 5541356f6debSmrg sunos4*) 5542356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5543356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 5544356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5545356f6debSmrg ;; 554698af18c5Smrg 5547356f6debSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 5548356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5549356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5550356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5551356f6debSmrg ;; 555298af18c5Smrg 5553356f6debSmrg sysv4*MP*) 5554356f6debSmrg if test -d /usr/nec ;then 5555356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 5556356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5557356f6debSmrg fi 5558356f6debSmrg ;; 55596f03b1f6Smrg 5560356f6debSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 5561356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5562356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5563356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5564356f6debSmrg ;; 55656f03b1f6Smrg 5566356f6debSmrg unicos*) 5567356f6debSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5568356f6debSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5569356f6debSmrg ;; 55706f03b1f6Smrg 5571356f6debSmrg uts4*) 5572356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5573356f6debSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5574356f6debSmrg ;; 55756f03b1f6Smrg 5576356f6debSmrg *) 5577356f6debSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 5578356f6debSmrg ;; 557998af18c5Smrg esac 5580356f6debSmrg fi 5581356f6debSmrg]) 5582356f6debSmrgcase $host_os in 5583356f6debSmrg # For platforms which do not support PIC, -DPIC is meaningless: 5584356f6debSmrg *djgpp*) 5585356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5586356f6debSmrg ;; 5587356f6debSmrg *) 5588356f6debSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5589356f6debSmrg ;; 5590356f6debSmrgesac 559142941e3bSmrg 559242941e3bSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 559342941e3bSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 559442941e3bSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 559542941e3bSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 55966f03b1f6Smrg 5597356f6debSmrg# 5598356f6debSmrg# Check to make sure the PIC flag actually works. 5599356f6debSmrg# 5600356f6debSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5601356f6debSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5602356f6debSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5603356f6debSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5604356f6debSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5605356f6debSmrg "" | " "*) ;; 5606356f6debSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5607356f6debSmrg esac], 5608356f6debSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5609356f6debSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 561098af18c5Smrgfi 5611356f6debSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5612356f6debSmrg [Additional compiler flags for building library objects]) 56136f03b1f6Smrg 561442941e3bSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 561542941e3bSmrg [How to pass a linker flag through the compiler]) 5616356f6debSmrg# 5617356f6debSmrg# Check to make sure the static flag actually works. 5618356f6debSmrg# 5619356f6debSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5620356f6debSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5621356f6debSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5622356f6debSmrg $lt_tmp_static_flag, 5623356f6debSmrg [], 5624356f6debSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5625356f6debSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5626356f6debSmrg [Compiler flag to prevent dynamic linking]) 5627356f6debSmrg])# _LT_COMPILER_PIC 56286f03b1f6Smrg 562998af18c5Smrg 5630356f6debSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 5631356f6debSmrg# ---------------------------- 5632356f6debSmrg# See if the linker supports building shared libraries. 5633356f6debSmrgm4_defun([_LT_LINKER_SHLIBS], 5634356f6debSmrg[AC_REQUIRE([LT_PATH_LD])dnl 5635356f6debSmrgAC_REQUIRE([LT_PATH_NM])dnl 563642941e3bSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5637356f6debSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5638356f6debSmrgm4_require([_LT_DECL_EGREP])dnl 5639356f6debSmrgm4_require([_LT_DECL_SED])dnl 5640356f6debSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5641356f6debSmrgm4_require([_LT_TAG_COMPILER])dnl 5642356f6debSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5643356f6debSmrgm4_if([$1], [CXX], [ 5644356f6debSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 564542941e3bSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5646356f6debSmrg case $host_os in 5647356f6debSmrg aix[[4-9]]*) 5648356f6debSmrg # If we're using GNU nm, then we don't want the "-C" option. 5649356f6debSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 565042941e3bSmrg # Also, AIX nm treats weak defined symbols like other global defined 565142941e3bSmrg # symbols, whereas GNU nm marks them as "W". 5652356f6debSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 565342941e3bSmrg _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' 5654356f6debSmrg else 5655356f6debSmrg _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' 565698af18c5Smrg fi 565798af18c5Smrg ;; 5658356f6debSmrg pw32*) 5659356f6debSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 566042941e3bSmrg ;; 5661356f6debSmrg cygwin* | mingw* | cegcc*) 566242941e3bSmrg case $cc_basename in 566342941e3bSmrg cl*) ;; 566442941e3bSmrg *) 566542941e3bSmrg _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' 566642941e3bSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 566742941e3bSmrg ;; 566842941e3bSmrg esac 566942941e3bSmrg ;; 5670356f6debSmrg *) 5671356f6debSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 567242941e3bSmrg ;; 5673356f6debSmrg esac 5674356f6debSmrg], [ 5675356f6debSmrg runpath_var= 5676356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5677356f6debSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5678356f6debSmrg _LT_TAGVAR(archive_cmds, $1)= 5679356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 5680356f6debSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 5681356f6debSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5682356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5683356f6debSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5684356f6debSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 5685356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5686356f6debSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5687356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5688356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5689356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5690356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 5691356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5692356f6debSmrg _LT_TAGVAR(inherit_rpath, $1)=no 5693356f6debSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 5694356f6debSmrg _LT_TAGVAR(module_cmds, $1)= 5695356f6debSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 5696356f6debSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5697356f6debSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5698356f6debSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 5699356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5700356f6debSmrg # include_expsyms should be a list of space-separated symbols to be *always* 5701356f6debSmrg # included in the symbol list 5702356f6debSmrg _LT_TAGVAR(include_expsyms, $1)= 5703356f6debSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5704356f6debSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 5705356f6debSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 5706356f6debSmrg # as well as any symbol that contains `d'. 5707356f6debSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5708356f6debSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5709356f6debSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 5710356f6debSmrg # the symbol is explicitly referenced. Since portable code cannot 5711356f6debSmrg # rely on this symbol name, it's probably fine to never include it in 5712356f6debSmrg # preloaded symbol tables. 5713356f6debSmrg # Exclude shared library initialization/finalization symbols. 5714356f6debSmrgdnl Note also adjust exclude_expsyms for C++ above. 5715356f6debSmrg extract_expsyms_cmds= 57166f03b1f6Smrg 5717356f6debSmrg case $host_os in 5718356f6debSmrg cygwin* | mingw* | pw32* | cegcc*) 5719356f6debSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5720356f6debSmrg # When not using gcc, we currently assume that we are using 5721356f6debSmrg # Microsoft Visual C++. 5722356f6debSmrg if test "$GCC" != yes; then 5723356f6debSmrg with_gnu_ld=no 572498af18c5Smrg fi 57256f03b1f6Smrg ;; 5726356f6debSmrg interix*) 5727356f6debSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5728356f6debSmrg with_gnu_ld=yes 5729356f6debSmrg ;; 5730356f6debSmrg openbsd*) 5731356f6debSmrg with_gnu_ld=no 5732356f6debSmrg ;; 573398af18c5Smrg esac 57346f03b1f6Smrg 5735356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 573642941e3bSmrg 573742941e3bSmrg # On some targets, GNU ld is compatible enough with the native linker 573842941e3bSmrg # that we're better off using the native interface for both. 573942941e3bSmrg lt_use_gnu_ld_interface=no 5740356f6debSmrg if test "$with_gnu_ld" = yes; then 574142941e3bSmrg case $host_os in 574242941e3bSmrg aix*) 574342941e3bSmrg # The AIX port of GNU ld has always aspired to compatibility 574442941e3bSmrg # with the native linker. However, as the warning in the GNU ld 574542941e3bSmrg # block says, versions before 2.19.5* couldn't really create working 574642941e3bSmrg # shared libraries, regardless of the interface used. 574742941e3bSmrg case `$LD -v 2>&1` in 574842941e3bSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 574942941e3bSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 575042941e3bSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 575142941e3bSmrg *) 575242941e3bSmrg lt_use_gnu_ld_interface=yes 575342941e3bSmrg ;; 575442941e3bSmrg esac 575542941e3bSmrg ;; 575642941e3bSmrg *) 575742941e3bSmrg lt_use_gnu_ld_interface=yes 575842941e3bSmrg ;; 575942941e3bSmrg esac 576042941e3bSmrg fi 576142941e3bSmrg 576242941e3bSmrg if test "$lt_use_gnu_ld_interface" = yes; then 5763356f6debSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5764356f6debSmrg wlarc='${wl}' 57656f03b1f6Smrg 5766356f6debSmrg # Set some defaults for GNU ld with shared library support. These 5767356f6debSmrg # are reset later if shared libraries are not supported. Putting them 5768356f6debSmrg # here allows them to be overridden if necessary. 5769356f6debSmrg runpath_var=LD_RUN_PATH 5770356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5771356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5772356f6debSmrg # ancient GNU ld didn't support --whole-archive et. al. 5773356f6debSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5774356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5775356f6debSmrg else 5776356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5777356f6debSmrg fi 5778356f6debSmrg supports_anon_versioning=no 5779356f6debSmrg case `$LD -v 2>&1` in 578042941e3bSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 5781356f6debSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5782356f6debSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5783356f6debSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5784356f6debSmrg *\ 2.11.*) ;; # other 2.11 versions 5785356f6debSmrg *) supports_anon_versioning=yes ;; 5786356f6debSmrg esac 57876f03b1f6Smrg 5788356f6debSmrg # See if GNU ld supports shared libraries. 5789356f6debSmrg case $host_os in 5790356f6debSmrg aix[[3-9]]*) 5791356f6debSmrg # On AIX/PPC, the GNU linker is very broken 5792356f6debSmrg if test "$host_cpu" != ia64; then 5793356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5794356f6debSmrg cat <<_LT_EOF 1>&2 57956f03b1f6Smrg 579642941e3bSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5797356f6debSmrg*** to be unable to reliably create shared libraries on AIX. 5798356f6debSmrg*** Therefore, libtool is disabling shared libraries support. If you 579942941e3bSmrg*** really care for shared libraries, you may want to install binutils 580042941e3bSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 580142941e3bSmrg*** You will then need to restart the configuration process. 58026f03b1f6Smrg 5803356f6debSmrg_LT_EOF 5804356f6debSmrg fi 5805356f6debSmrg ;; 58066f03b1f6Smrg 5807356f6debSmrg amigaos*) 5808356f6debSmrg case $host_cpu in 5809356f6debSmrg powerpc) 5810356f6debSmrg # see comment about AmigaOS4 .so support 5811356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5812356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5813356f6debSmrg ;; 5814356f6debSmrg m68k) 5815356f6debSmrg _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)' 5816356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5817356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5818356f6debSmrg ;; 5819356f6debSmrg esac 5820356f6debSmrg ;; 58216f03b1f6Smrg 5822356f6debSmrg beos*) 5823356f6debSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5824356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5825356f6debSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5826356f6debSmrg # support --undefined. This deserves some investigation. FIXME 5827356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5828356f6debSmrg else 5829356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5830356f6debSmrg fi 5831356f6debSmrg ;; 58326f03b1f6Smrg 5833356f6debSmrg cygwin* | mingw* | pw32* | cegcc*) 5834356f6debSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5835356f6debSmrg # as there is no search path for DLLs. 5836356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 583742941e3bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5838356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5839356f6debSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5840356f6debSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 584142941e3bSmrg _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' 584242941e3bSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5843356f6debSmrg 5844356f6debSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5845356f6debSmrg _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' 5846356f6debSmrg # If the export-symbols file already is a .def file (1st line 5847356f6debSmrg # is EXPORTS), use it as is; otherwise, prepend... 5848356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5849356f6debSmrg cp $export_symbols $output_objdir/$soname.def; 5850356f6debSmrg else 5851356f6debSmrg echo EXPORTS > $output_objdir/$soname.def; 5852356f6debSmrg cat $export_symbols >> $output_objdir/$soname.def; 5853356f6debSmrg fi~ 5854356f6debSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5855356f6debSmrg else 5856356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5857356f6debSmrg fi 5858356f6debSmrg ;; 58596f03b1f6Smrg 586042941e3bSmrg haiku*) 586142941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 586242941e3bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 586342941e3bSmrg ;; 586442941e3bSmrg 5865356f6debSmrg interix[[3-9]]*) 5866356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5867356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5868356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5869356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5870356f6debSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5871356f6debSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5872356f6debSmrg # default) and relocated if they conflict, which is a slow very memory 5873356f6debSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5874356f6debSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5875356f6debSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5876356f6debSmrg _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' 5877356f6debSmrg _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' 5878356f6debSmrg ;; 58796f03b1f6Smrg 588042941e3bSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5881356f6debSmrg tmp_diet=no 5882356f6debSmrg if test "$host_os" = linux-dietlibc; then 5883356f6debSmrg case $cc_basename in 5884356f6debSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5885356f6debSmrg esac 5886356f6debSmrg fi 5887356f6debSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5888356f6debSmrg && test "$tmp_diet" = no 5889356f6debSmrg then 589042941e3bSmrg tmp_addflag=' $pic_flag' 5891356f6debSmrg tmp_sharedflag='-shared' 5892356f6debSmrg case $cc_basename,$host_cpu in 5893356f6debSmrg pgcc*) # Portland Group C compiler 589442941e3bSmrg _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' 5895356f6debSmrg tmp_addflag=' $pic_flag' 5896356f6debSmrg ;; 589742941e3bSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 589842941e3bSmrg # Portland Group f77 and f90 compilers 589942941e3bSmrg _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' 5900356f6debSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5901356f6debSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5902356f6debSmrg tmp_addflag=' -i_dynamic' ;; 5903356f6debSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5904356f6debSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5905356f6debSmrg ifc* | ifort*) # Intel Fortran compiler 5906356f6debSmrg tmp_addflag=' -nofor_main' ;; 5907356f6debSmrg lf95*) # Lahey Fortran 8.1 5908356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5909356f6debSmrg tmp_sharedflag='--shared' ;; 591042941e3bSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5911356f6debSmrg tmp_sharedflag='-qmkshrobj' 5912356f6debSmrg tmp_addflag= ;; 591342941e3bSmrg nvcc*) # Cuda Compiler Driver 2.2 591442941e3bSmrg _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' 591542941e3bSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 591642941e3bSmrg ;; 5917356f6debSmrg esac 5918356f6debSmrg case `$CC -V 2>&1 | sed 5q` in 5919356f6debSmrg *Sun\ C*) # Sun C 5.9 592042941e3bSmrg _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' 5921356f6debSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5922356f6debSmrg tmp_sharedflag='-G' ;; 5923356f6debSmrg *Sun\ F*) # Sun Fortran 8.3 5924356f6debSmrg tmp_sharedflag='-G' ;; 5925356f6debSmrg esac 5926356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59276f03b1f6Smrg 5928356f6debSmrg if test "x$supports_anon_versioning" = xyes; then 5929356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5930356f6debSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5931356f6debSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5932356f6debSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5933356f6debSmrg fi 59346f03b1f6Smrg 5935356f6debSmrg case $cc_basename in 593642941e3bSmrg xlf* | bgf* | bgxlf* | mpixlf*) 5937356f6debSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5938356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5939356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5940356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 594142941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5942356f6debSmrg if test "x$supports_anon_versioning" = xyes; then 5943356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5944356f6debSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5945356f6debSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 594642941e3bSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5947356f6debSmrg fi 5948356f6debSmrg ;; 5949356f6debSmrg esac 5950356f6debSmrg else 5951356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5952356f6debSmrg fi 5953356f6debSmrg ;; 59546f03b1f6Smrg 5955356f6debSmrg netbsd*) 5956356f6debSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5957356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5958356f6debSmrg wlarc= 5959356f6debSmrg else 596042941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 596142941e3bSmrg _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' 5962356f6debSmrg fi 5963356f6debSmrg ;; 59646f03b1f6Smrg 5965356f6debSmrg solaris*) 5966356f6debSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5967356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5968356f6debSmrg cat <<_LT_EOF 1>&2 59696f03b1f6Smrg 5970356f6debSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5971356f6debSmrg*** create shared libraries on Solaris systems. Therefore, libtool 5972356f6debSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5973356f6debSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 5974356f6debSmrg*** your PATH or compiler configuration so that the native linker is 5975356f6debSmrg*** used, and then restart. 59766f03b1f6Smrg 5977356f6debSmrg_LT_EOF 5978356f6debSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 597942941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 598042941e3bSmrg _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' 5981356f6debSmrg else 5982356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5983356f6debSmrg fi 5984356f6debSmrg ;; 59856f03b1f6Smrg 5986356f6debSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5987356f6debSmrg case `$LD -v 2>&1` in 5988356f6debSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5989356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5990356f6debSmrg cat <<_LT_EOF 1>&2 59916f03b1f6Smrg 5992356f6debSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 5993356f6debSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5994356f6debSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5995356f6debSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5996356f6debSmrg*** your PATH or compiler configuration so that the native linker is 5997356f6debSmrg*** used, and then restart. 59986f03b1f6Smrg 5999356f6debSmrg_LT_EOF 6000356f6debSmrg ;; 6001356f6debSmrg *) 6002356f6debSmrg # For security reasons, it is highly recommended that you always 6003356f6debSmrg # use absolute paths for naming shared libraries, and exclude the 6004356f6debSmrg # DT_RUNPATH tag from executables and libraries. But doing so 6005356f6debSmrg # requires that you compile everything twice, which is a pain. 6006356f6debSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6007356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6008356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6009356f6debSmrg _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' 6010356f6debSmrg else 6011356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6012356f6debSmrg fi 6013356f6debSmrg ;; 6014356f6debSmrg esac 6015356f6debSmrg ;; 60166f03b1f6Smrg 6017356f6debSmrg sunos4*) 6018356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6019356f6debSmrg wlarc= 6020356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6021356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6022356f6debSmrg ;; 60236f03b1f6Smrg 6024356f6debSmrg *) 6025356f6debSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 602642941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 602742941e3bSmrg _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' 6028356f6debSmrg else 6029356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6030356f6debSmrg fi 6031356f6debSmrg ;; 6032356f6debSmrg esac 60336f03b1f6Smrg 6034356f6debSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 6035356f6debSmrg runpath_var= 6036356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6037356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6038356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6039356f6debSmrg fi 6040356f6debSmrg else 6041356f6debSmrg # PORTME fill in a description of your system's linker (not GNU ld) 6042356f6debSmrg case $host_os in 6043356f6debSmrg aix3*) 6044356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6045356f6debSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6046356f6debSmrg _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' 6047356f6debSmrg # Note: this linker hardcodes the directories in LIBPATH if there 6048356f6debSmrg # are no directories specified by -L. 6049356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6050356f6debSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 6051356f6debSmrg # Neither direct hardcoding nor static linking is supported with a 6052356f6debSmrg # broken collect2. 6053356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6054356f6debSmrg fi 6055356f6debSmrg ;; 60566f03b1f6Smrg 6057356f6debSmrg aix[[4-9]]*) 6058356f6debSmrg if test "$host_cpu" = ia64; then 6059356f6debSmrg # On IA64, the linker does run time linking by default, so we don't 6060356f6debSmrg # have to do anything special. 6061356f6debSmrg aix_use_runtimelinking=no 6062356f6debSmrg exp_sym_flag='-Bexport' 6063356f6debSmrg no_entry_flag="" 6064356f6debSmrg else 6065356f6debSmrg # If we're using GNU nm, then we don't want the "-C" option. 6066356f6debSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 606742941e3bSmrg # Also, AIX nm treats weak defined symbols like other global 606842941e3bSmrg # defined symbols, whereas GNU nm marks them as "W". 6069356f6debSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 607042941e3bSmrg _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' 6071356f6debSmrg else 6072356f6debSmrg _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' 6073356f6debSmrg fi 6074356f6debSmrg aix_use_runtimelinking=no 60756f03b1f6Smrg 6076356f6debSmrg # Test if we are trying to use run time linking or normal 6077356f6debSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6078356f6debSmrg # need to do runtime linking. 6079356f6debSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6080356f6debSmrg for ld_flag in $LDFLAGS; do 6081356f6debSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 6082356f6debSmrg aix_use_runtimelinking=yes 6083356f6debSmrg break 6084356f6debSmrg fi 6085356f6debSmrg done 6086356f6debSmrg ;; 6087356f6debSmrg esac 60886f03b1f6Smrg 6089356f6debSmrg exp_sym_flag='-bexport' 6090356f6debSmrg no_entry_flag='-bnoentry' 6091356f6debSmrg fi 60926f03b1f6Smrg 6093356f6debSmrg # When large executables or shared objects are built, AIX ld can 6094356f6debSmrg # have problems creating the table of contents. If linking a library 6095356f6debSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6096356f6debSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6097356f6debSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60986f03b1f6Smrg 6099356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='' 6100356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6101356f6debSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6102356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6103356f6debSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6104356f6debSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 61056f03b1f6Smrg 6106356f6debSmrg if test "$GCC" = yes; then 6107356f6debSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6108356f6debSmrg # We only want to do this on AIX 4.2 and lower, the check 6109356f6debSmrg # below for broken collect2 doesn't work under 4.3+ 6110356f6debSmrg collect2name=`${CC} -print-prog-name=collect2` 6111356f6debSmrg if test -f "$collect2name" && 6112356f6debSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6113356f6debSmrg then 6114356f6debSmrg # We have reworked collect2 6115356f6debSmrg : 6116356f6debSmrg else 6117356f6debSmrg # We have old collect2 6118356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6119356f6debSmrg # It fails to find uninstalled libraries when the uninstalled 6120356f6debSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6121356f6debSmrg # to unsupported forces relinking 6122356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6123356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6124356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6125356f6debSmrg fi 6126356f6debSmrg ;; 6127356f6debSmrg esac 6128356f6debSmrg shared_flag='-shared' 6129356f6debSmrg if test "$aix_use_runtimelinking" = yes; then 6130356f6debSmrg shared_flag="$shared_flag "'${wl}-G' 6131356f6debSmrg fi 6132356f6debSmrg else 6133356f6debSmrg # not using gcc 6134356f6debSmrg if test "$host_cpu" = ia64; then 6135356f6debSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6136356f6debSmrg # chokes on -Wl,-G. The following line is correct: 6137356f6debSmrg shared_flag='-G' 6138356f6debSmrg else 6139356f6debSmrg if test "$aix_use_runtimelinking" = yes; then 6140356f6debSmrg shared_flag='${wl}-G' 6141356f6debSmrg else 6142356f6debSmrg shared_flag='${wl}-bM:SRE' 6143356f6debSmrg fi 6144356f6debSmrg fi 6145356f6debSmrg fi 61466f03b1f6Smrg 6147356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6148356f6debSmrg # It seems that -bexpall does not export symbols beginning with 6149356f6debSmrg # underscore (_), so it is better to generate a list of symbols to export. 6150356f6debSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6151356f6debSmrg if test "$aix_use_runtimelinking" = yes; then 6152356f6debSmrg # Warning - without using the other runtime loading flags (-brtl), 6153356f6debSmrg # -berok will link without error, but may produce a broken library. 6154356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6155356f6debSmrg # Determine the default libpath from the value encoded in an 6156356f6debSmrg # empty executable. 615742941e3bSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6158356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 615942941e3bSmrg _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" 6160356f6debSmrg else 6161356f6debSmrg if test "$host_cpu" = ia64; then 6162356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6163356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6164356f6debSmrg _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" 6165356f6debSmrg else 6166356f6debSmrg # Determine the default libpath from the value encoded in an 6167356f6debSmrg # empty executable. 616842941e3bSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6169356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6170356f6debSmrg # Warning - without using the other run time loading flags, 6171356f6debSmrg # -berok will link without error, but may produce a broken library. 6172356f6debSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6173356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 617442941e3bSmrg if test "$with_gnu_ld" = yes; then 617542941e3bSmrg # We only use this code for GNU lds that support --whole-archive. 617642941e3bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 617742941e3bSmrg else 617842941e3bSmrg # Exported symbols can be pulled into shared objects from archives 617942941e3bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 618042941e3bSmrg fi 6181356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6182356f6debSmrg # This is similar to how AIX traditionally builds its shared libraries. 6183356f6debSmrg _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' 6184356f6debSmrg fi 6185356f6debSmrg fi 6186356f6debSmrg ;; 61876f03b1f6Smrg 6188356f6debSmrg amigaos*) 6189356f6debSmrg case $host_cpu in 6190356f6debSmrg powerpc) 6191356f6debSmrg # see comment about AmigaOS4 .so support 6192356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6193356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6194356f6debSmrg ;; 6195356f6debSmrg m68k) 6196356f6debSmrg _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)' 6197356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6198356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6199356f6debSmrg ;; 6200356f6debSmrg esac 6201356f6debSmrg ;; 62026f03b1f6Smrg 6203356f6debSmrg bsdi[[45]]*) 6204356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 6205356f6debSmrg ;; 62066f03b1f6Smrg 6207356f6debSmrg cygwin* | mingw* | pw32* | cegcc*) 6208356f6debSmrg # When not using gcc, we currently assume that we are using 6209356f6debSmrg # Microsoft Visual C++. 6210356f6debSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6211356f6debSmrg # no search path for DLLs. 621242941e3bSmrg case $cc_basename in 621342941e3bSmrg cl*) 621442941e3bSmrg # Native MSVC 621542941e3bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 621642941e3bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 621742941e3bSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 621842941e3bSmrg _LT_TAGVAR(file_list_spec, $1)='@' 621942941e3bSmrg # Tell ltmain to make .lib files, not .a files. 622042941e3bSmrg libext=lib 622142941e3bSmrg # Tell ltmain to make .dll files, not .so files. 622242941e3bSmrg shrext_cmds=".dll" 622342941e3bSmrg # FIXME: Setting linknames here is a bad hack. 622442941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 622542941e3bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 622642941e3bSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 622742941e3bSmrg else 622842941e3bSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 622942941e3bSmrg fi~ 623042941e3bSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 623142941e3bSmrg linknames=' 623242941e3bSmrg # The linker will not automatically build a static lib if we build a DLL. 623342941e3bSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 623442941e3bSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 623542941e3bSmrg _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' 623642941e3bSmrg # Don't use ranlib 623742941e3bSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 623842941e3bSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 623942941e3bSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 624042941e3bSmrg case $lt_outputfile in 624142941e3bSmrg *.exe|*.EXE) ;; 624242941e3bSmrg *) 624342941e3bSmrg lt_outputfile="$lt_outputfile.exe" 624442941e3bSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 624542941e3bSmrg ;; 624642941e3bSmrg esac~ 624742941e3bSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 624842941e3bSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 624942941e3bSmrg $RM "$lt_outputfile.manifest"; 625042941e3bSmrg fi' 625142941e3bSmrg ;; 625242941e3bSmrg *) 625342941e3bSmrg # Assume MSVC wrapper 625442941e3bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 625542941e3bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 625642941e3bSmrg # Tell ltmain to make .lib files, not .a files. 625742941e3bSmrg libext=lib 625842941e3bSmrg # Tell ltmain to make .dll files, not .so files. 625942941e3bSmrg shrext_cmds=".dll" 626042941e3bSmrg # FIXME: Setting linknames here is a bad hack. 626142941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 626242941e3bSmrg # The linker will automatically build a .lib file if we build a DLL. 626342941e3bSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 626442941e3bSmrg # FIXME: Should let the user specify the lib program. 626542941e3bSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 626642941e3bSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 626742941e3bSmrg ;; 626842941e3bSmrg esac 6269356f6debSmrg ;; 62706f03b1f6Smrg 6271356f6debSmrg darwin* | rhapsody*) 6272356f6debSmrg _LT_DARWIN_LINKER_FEATURES($1) 6273356f6debSmrg ;; 62746f03b1f6Smrg 6275356f6debSmrg dgux*) 6276356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6277356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6278356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6279356f6debSmrg ;; 62806f03b1f6Smrg 6281356f6debSmrg freebsd1*) 6282356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6283356f6debSmrg ;; 62846f03b1f6Smrg 6285356f6debSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 6286356f6debSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 6287356f6debSmrg # does not break anything, and helps significantly (at the cost of a little 6288356f6debSmrg # extra space). 6289356f6debSmrg freebsd2.2*) 6290356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 6291356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6292356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6293356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6294356f6debSmrg ;; 62956f03b1f6Smrg 6296356f6debSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6297356f6debSmrg freebsd2*) 6298356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6299356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6300356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6301356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6302356f6debSmrg ;; 63036f03b1f6Smrg 6304356f6debSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 6305356f6debSmrg freebsd* | dragonfly*) 630642941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6307356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6308356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6309356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6310356f6debSmrg ;; 63116f03b1f6Smrg 6312356f6debSmrg hpux9*) 6313356f6debSmrg if test "$GCC" = yes; then 631442941e3bSmrg _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' 6315356f6debSmrg else 6316356f6debSmrg _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' 6317356f6debSmrg fi 6318356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6319356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6320356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63216f03b1f6Smrg 6322356f6debSmrg # hardcode_minus_L: Not really in the search PATH, 6323356f6debSmrg # but as the default location of the library. 6324356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6325356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63266f03b1f6Smrg ;; 6327356f6debSmrg 6328356f6debSmrg hpux10*) 632942941e3bSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 633042941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6331356f6debSmrg else 6332356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 6333356f6debSmrg fi 6334356f6debSmrg if test "$with_gnu_ld" = no; then 6335356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6336356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 6337356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6338356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6339356f6debSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6340356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6341356f6debSmrg # hardcode_minus_L: Not really in the search PATH, 6342356f6debSmrg # but as the default location of the library. 6343356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6344356f6debSmrg fi 63456f03b1f6Smrg ;; 63466f03b1f6Smrg 6347356f6debSmrg hpux11*) 634842941e3bSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 6349356f6debSmrg case $host_cpu in 6350356f6debSmrg hppa*64*) 6351356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6352356f6debSmrg ;; 6353356f6debSmrg ia64*) 635442941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6355356f6debSmrg ;; 6356356f6debSmrg *) 635742941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6358356f6debSmrg ;; 6359356f6debSmrg esac 6360356f6debSmrg else 6361356f6debSmrg case $host_cpu in 6362356f6debSmrg hppa*64*) 6363356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6364356f6debSmrg ;; 6365356f6debSmrg ia64*) 6366356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6367356f6debSmrg ;; 6368356f6debSmrg *) 636942941e3bSmrg m4_if($1, [], [ 637042941e3bSmrg # Older versions of the 11.00 compiler do not understand -b yet 637142941e3bSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 637242941e3bSmrg _LT_LINKER_OPTION([if $CC understands -b], 637342941e3bSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 637442941e3bSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 637542941e3bSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 637642941e3bSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 6377356f6debSmrg ;; 6378356f6debSmrg esac 6379356f6debSmrg fi 6380356f6debSmrg if test "$with_gnu_ld" = no; then 6381356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6382356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63836f03b1f6Smrg 6384356f6debSmrg case $host_cpu in 6385356f6debSmrg hppa*64*|ia64*) 6386356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6387356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6388356f6debSmrg ;; 6389356f6debSmrg *) 6390356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6391356f6debSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6392356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63936f03b1f6Smrg 6394356f6debSmrg # hardcode_minus_L: Not really in the search PATH, 6395356f6debSmrg # but as the default location of the library. 6396356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6397356f6debSmrg ;; 6398356f6debSmrg esac 6399356f6debSmrg fi 6400356f6debSmrg ;; 64016f03b1f6Smrg 6402356f6debSmrg irix5* | irix6* | nonstopux*) 6403356f6debSmrg if test "$GCC" = yes; then 640442941e3bSmrg _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' 6405356f6debSmrg # Try to use the -exported_symbol ld option, if it does not 6406356f6debSmrg # work, assume that -exports_file does not work either and 6407356f6debSmrg # implicitly export all symbols. 640842941e3bSmrg # This should be the same for all languages, so no per-tag cache variable. 640942941e3bSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 641042941e3bSmrg [lt_cv_irix_exported_symbol], 641142941e3bSmrg [save_LDFLAGS="$LDFLAGS" 641242941e3bSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 641342941e3bSmrg AC_LINK_IFELSE( 641442941e3bSmrg [AC_LANG_SOURCE( 641542941e3bSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 641642941e3bSmrg [C++], [[int foo (void) { return 0; }]], 641742941e3bSmrg [Fortran 77], [[ 641842941e3bSmrg subroutine foo 641942941e3bSmrg end]], 642042941e3bSmrg [Fortran], [[ 642142941e3bSmrg subroutine foo 642242941e3bSmrg end]])])], 642342941e3bSmrg [lt_cv_irix_exported_symbol=yes], 642442941e3bSmrg [lt_cv_irix_exported_symbol=no]) 642542941e3bSmrg LDFLAGS="$save_LDFLAGS"]) 642642941e3bSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 642742941e3bSmrg _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' 642842941e3bSmrg fi 6429356f6debSmrg else 643042941e3bSmrg _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' 643142941e3bSmrg _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' 6432356f6debSmrg fi 6433356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6434356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6435356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6436356f6debSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 6437356f6debSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6438356f6debSmrg ;; 64396f03b1f6Smrg 6440356f6debSmrg netbsd*) 6441356f6debSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6442356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 6443356f6debSmrg else 6444356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 6445356f6debSmrg fi 6446356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6447356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6448356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6449356f6debSmrg ;; 64506f03b1f6Smrg 6451356f6debSmrg newsos6) 6452356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6453356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6454356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6455356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6456356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6457356f6debSmrg ;; 64586f03b1f6Smrg 6459356f6debSmrg *nto* | *qnx*) 6460356f6debSmrg ;; 64616f03b1f6Smrg 6462356f6debSmrg openbsd*) 6463356f6debSmrg if test -f /usr/libexec/ld.so; then 6464356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6465356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6466356f6debSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6467356f6debSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6468356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6469356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 6470356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6471356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6472356f6debSmrg else 6473356f6debSmrg case $host_os in 6474356f6debSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 6475356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 6476356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6477356f6debSmrg ;; 6478356f6debSmrg *) 6479356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 6480356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6481356f6debSmrg ;; 6482356f6debSmrg esac 6483356f6debSmrg fi 6484356f6debSmrg else 6485356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6486356f6debSmrg fi 6487356f6debSmrg ;; 64886f03b1f6Smrg 6489356f6debSmrg os2*) 6490356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6491356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6492356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 649342941e3bSmrg _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' 6494356f6debSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 6495356f6debSmrg ;; 64966f03b1f6Smrg 6497356f6debSmrg osf3*) 6498356f6debSmrg if test "$GCC" = yes; then 6499356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 650042941e3bSmrg _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' 6501356f6debSmrg else 6502356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 650342941e3bSmrg _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' 6504356f6debSmrg fi 6505356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6506356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6507356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6508356f6debSmrg ;; 65096f03b1f6Smrg 6510356f6debSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6511356f6debSmrg if test "$GCC" = yes; then 6512356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 651342941e3bSmrg _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' 6514356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6515356f6debSmrg else 6516356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 651742941e3bSmrg _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' 6518356f6debSmrg _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~ 651942941e3bSmrg $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' 65206f03b1f6Smrg 6521356f6debSmrg # Both c and cxx compiler support -rpath directly 6522356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6523356f6debSmrg fi 6524356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6525356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6526356f6debSmrg ;; 65276f03b1f6Smrg 6528356f6debSmrg solaris*) 6529356f6debSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6530356f6debSmrg if test "$GCC" = yes; then 6531356f6debSmrg wlarc='${wl}' 653242941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 6533356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 653442941e3bSmrg $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' 6535356f6debSmrg else 6536356f6debSmrg case `$CC -V 2>&1` in 6537356f6debSmrg *"Compilers 5.0"*) 6538356f6debSmrg wlarc='' 6539356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 6540356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6541356f6debSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6542356f6debSmrg ;; 6543356f6debSmrg *) 6544356f6debSmrg wlarc='${wl}' 6545356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6546356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6547356f6debSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6548356f6debSmrg ;; 6549356f6debSmrg esac 6550356f6debSmrg fi 6551356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6552356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6553356f6debSmrg case $host_os in 6554356f6debSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6555356f6debSmrg *) 6556356f6debSmrg # The compiler driver will combine and reorder linker options, 6557356f6debSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 6558356f6debSmrg # but is careful enough not to reorder. 6559356f6debSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6560356f6debSmrg if test "$GCC" = yes; then 6561356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6562356f6debSmrg else 6563356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6564356f6debSmrg fi 6565356f6debSmrg ;; 6566356f6debSmrg esac 6567356f6debSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6568356f6debSmrg ;; 65696f03b1f6Smrg 6570356f6debSmrg sunos4*) 6571356f6debSmrg if test "x$host_vendor" = xsequent; then 6572356f6debSmrg # Use $CC to link under sequent, because it throws in some extra .o 6573356f6debSmrg # files that make .init and .fini sections work. 6574356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6575356f6debSmrg else 6576356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6577356f6debSmrg fi 6578356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6579356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6580356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6581356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6582356f6debSmrg ;; 65836f03b1f6Smrg 6584356f6debSmrg sysv4) 6585356f6debSmrg case $host_vendor in 6586356f6debSmrg sni) 6587356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6588356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6589356f6debSmrg ;; 6590356f6debSmrg siemens) 6591356f6debSmrg ## LD is ld it makes a PLAMLIB 6592356f6debSmrg ## CC just makes a GrossModule. 6593356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6594356f6debSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6595356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6596356f6debSmrg ;; 6597356f6debSmrg motorola) 6598356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6599356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6600356f6debSmrg ;; 6601356f6debSmrg esac 6602356f6debSmrg runpath_var='LD_RUN_PATH' 6603356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6604356f6debSmrg ;; 66056f03b1f6Smrg 6606356f6debSmrg sysv4.3*) 6607356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6608356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6609356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6610356f6debSmrg ;; 66116f03b1f6Smrg 6612356f6debSmrg sysv4*MP*) 6613356f6debSmrg if test -d /usr/nec; then 6614356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6615356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6616356f6debSmrg runpath_var=LD_RUN_PATH 6617356f6debSmrg hardcode_runpath_var=yes 6618356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6619356f6debSmrg fi 6620356f6debSmrg ;; 66216f03b1f6Smrg 6622356f6debSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6623356f6debSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6624356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6625356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6626356f6debSmrg runpath_var='LD_RUN_PATH' 66276f03b1f6Smrg 6628356f6debSmrg if test "$GCC" = yes; then 6629356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6630356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6631356f6debSmrg else 6632356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6633356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6634356f6debSmrg fi 6635356f6debSmrg ;; 66366f03b1f6Smrg 6637356f6debSmrg sysv5* | sco3.2v5* | sco5v6*) 6638356f6debSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6639356f6debSmrg # link with -lc, and that would cause any symbols used from libc to 6640356f6debSmrg # always be unresolved, which means just about no library would 6641356f6debSmrg # ever link correctly. If we're not using GNU ld we use -z text 6642356f6debSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6643356f6debSmrg # as -z defs. 6644356f6debSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6645356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6646356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6647356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6648356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6649356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6650356f6debSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6651356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6652356f6debSmrg runpath_var='LD_RUN_PATH' 66536f03b1f6Smrg 6654356f6debSmrg if test "$GCC" = yes; then 6655356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6656356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6657356f6debSmrg else 6658356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6659356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6660356f6debSmrg fi 6661356f6debSmrg ;; 66626f03b1f6Smrg 6663356f6debSmrg uts4*) 6664356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6665356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6666356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6667356f6debSmrg ;; 66686f03b1f6Smrg 6669356f6debSmrg *) 6670356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6671356f6debSmrg ;; 6672356f6debSmrg esac 66736f03b1f6Smrg 6674356f6debSmrg if test x$host_vendor = xsni; then 6675356f6debSmrg case $host in 6676356f6debSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6677356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 6678356f6debSmrg ;; 6679356f6debSmrg esac 6680356f6debSmrg fi 6681356f6debSmrg fi 6682356f6debSmrg]) 6683356f6debSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6684356f6debSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 66856f03b1f6Smrg 6686356f6debSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 66876f03b1f6Smrg 6688356f6debSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6689356f6debSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6690356f6debSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 6691356f6debSmrg [The commands to extract the exported symbol list from a shared archive]) 66926f03b1f6Smrg 6693356f6debSmrg# 6694356f6debSmrg# Do we need to explicitly link libc? 6695356f6debSmrg# 6696356f6debSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6697356f6debSmrgx|xyes) 6698356f6debSmrg # Assume -lc should be added 6699356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67006f03b1f6Smrg 6701356f6debSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 6702356f6debSmrg case $_LT_TAGVAR(archive_cmds, $1) in 6703356f6debSmrg *'~'*) 6704356f6debSmrg # FIXME: we may have to deal with multi-command sequences. 6705356f6debSmrg ;; 6706356f6debSmrg '$CC '*) 6707356f6debSmrg # Test whether the compiler implicitly links with -lc since on some 6708356f6debSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6709356f6debSmrg # to ld, don't add -lc before -lgcc. 671042941e3bSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 671142941e3bSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 671242941e3bSmrg [$RM conftest* 671342941e3bSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 671442941e3bSmrg 671542941e3bSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 671642941e3bSmrg soname=conftest 671742941e3bSmrg lib=conftest 671842941e3bSmrg libobjs=conftest.$ac_objext 671942941e3bSmrg deplibs= 672042941e3bSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 672142941e3bSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 672242941e3bSmrg compiler_flags=-v 672342941e3bSmrg linker_flags=-v 672442941e3bSmrg verstring= 672542941e3bSmrg output_objdir=. 672642941e3bSmrg libname=conftest 672742941e3bSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 672842941e3bSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 672942941e3bSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 673042941e3bSmrg then 673142941e3bSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 673242941e3bSmrg else 673342941e3bSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 673442941e3bSmrg fi 673542941e3bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 673642941e3bSmrg else 673742941e3bSmrg cat conftest.err 1>&5 673842941e3bSmrg fi 673942941e3bSmrg $RM conftest* 674042941e3bSmrg ]) 674142941e3bSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6742356f6debSmrg ;; 6743356f6debSmrg esac 6744356f6debSmrg fi 6745356f6debSmrg ;; 6746356f6debSmrgesac 67476f03b1f6Smrg 6748356f6debSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6749356f6debSmrg [Whether or not to add -lc for building shared libraries]) 6750356f6debSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6751356f6debSmrg [enable_shared_with_static_runtimes], [0], 6752356f6debSmrg [Whether or not to disallow shared libs when runtime libs are static]) 6753356f6debSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6754356f6debSmrg [Compiler flag to allow reflexive dlopens]) 6755356f6debSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6756356f6debSmrg [Compiler flag to generate shared objects directly from archives]) 6757356f6debSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 6758356f6debSmrg [Whether the compiler copes with passing no objects directly]) 6759356f6debSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6760356f6debSmrg [Create an old-style archive from a shared archive]) 6761356f6debSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6762356f6debSmrg [Create a temporary old-style archive to link instead of a shared archive]) 6763356f6debSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6764356f6debSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6765356f6debSmrg_LT_TAGDECL([], [module_cmds], [2], 6766356f6debSmrg [Commands used to build a loadable module if different from building 6767356f6debSmrg a shared archive.]) 6768356f6debSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6769356f6debSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 6770356f6debSmrg [Whether we are building with GNU ld or not]) 6771356f6debSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6772356f6debSmrg [Flag that allows shared libraries with undefined symbols to be built]) 6773356f6debSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 6774356f6debSmrg [Flag that enforces no undefined symbols]) 6775356f6debSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6776356f6debSmrg [Flag to hardcode $libdir into a binary during linking. 6777356f6debSmrg This must work even if $libdir does not exist]) 6778356f6debSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 6779356f6debSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 6780356f6debSmrg during linking. This must work even if $libdir does not exist]]) 6781356f6debSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6782356f6debSmrg [Whether we need a single "-rpath" flag with a separated argument]) 6783356f6debSmrg_LT_TAGDECL([], [hardcode_direct], [0], 6784356f6debSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6785356f6debSmrg DIR into the resulting binary]) 6786356f6debSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6787356f6debSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 6788356f6debSmrg DIR into the resulting binary and the resulting library dependency is 6789356f6debSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 6790356f6debSmrg library is relocated]) 6791356f6debSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6792356f6debSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6793356f6debSmrg into the resulting binary]) 6794356f6debSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6795356f6debSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6796356f6debSmrg into the resulting binary]) 6797356f6debSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 6798356f6debSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 6799356f6debSmrg into the library and all subsequent libraries and executables linked 6800356f6debSmrg against it]) 6801356f6debSmrg_LT_TAGDECL([], [inherit_rpath], [0], 6802356f6debSmrg [Set to yes if linker adds runtime paths of dependent libraries 6803356f6debSmrg to runtime path list]) 6804356f6debSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 6805356f6debSmrg [Whether libtool must link a program against all its dependency libraries]) 6806356f6debSmrg_LT_TAGDECL([], [always_export_symbols], [0], 6807356f6debSmrg [Set to "yes" if exported symbols are required]) 6808356f6debSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6809356f6debSmrg [The commands to list exported symbols]) 6810356f6debSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 6811356f6debSmrg [Symbols that should not be listed in the preloaded symbols]) 6812356f6debSmrg_LT_TAGDECL([], [include_expsyms], [1], 6813356f6debSmrg [Symbols that must always be exported]) 6814356f6debSmrg_LT_TAGDECL([], [prelink_cmds], [2], 6815356f6debSmrg [Commands necessary for linking programs (against libraries) with templates]) 681642941e3bSmrg_LT_TAGDECL([], [postlink_cmds], [2], 681742941e3bSmrg [Commands necessary for finishing linking programs]) 6818356f6debSmrg_LT_TAGDECL([], [file_list_spec], [1], 6819356f6debSmrg [Specify filename containing input files]) 6820356f6debSmrgdnl FIXME: Not yet implemented 6821356f6debSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6822356f6debSmrgdnl [Compiler flag to generate thread safe objects]) 6823356f6debSmrg])# _LT_LINKER_SHLIBS 6824356f6debSmrg 6825356f6debSmrg 6826356f6debSmrg# _LT_LANG_C_CONFIG([TAG]) 6827356f6debSmrg# ------------------------ 6828356f6debSmrg# Ensure that the configuration variables for a C compiler are suitably 6829356f6debSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6830356f6debSmrg# the compiler configuration to `libtool'. 6831356f6debSmrgm4_defun([_LT_LANG_C_CONFIG], 6832356f6debSmrg[m4_require([_LT_DECL_EGREP])dnl 6833356f6debSmrglt_save_CC="$CC" 6834356f6debSmrgAC_LANG_PUSH(C) 68356f03b1f6Smrg 6836356f6debSmrg# Source file extension for C test sources. 6837356f6debSmrgac_ext=c 68386f03b1f6Smrg 6839356f6debSmrg# Object file extension for compiled C test sources. 6840356f6debSmrgobjext=o 6841356f6debSmrg_LT_TAGVAR(objext, $1)=$objext 68426f03b1f6Smrg 6843356f6debSmrg# Code to be used in simple compile tests 6844356f6debSmrglt_simple_compile_test_code="int some_variable = 0;" 68456f03b1f6Smrg 6846356f6debSmrg# Code to be used in simple link tests 6847356f6debSmrglt_simple_link_test_code='int main(){return(0);}' 68486f03b1f6Smrg 6849356f6debSmrg_LT_TAG_COMPILER 6850356f6debSmrg# Save the default compiler, since it gets overwritten when the other 6851356f6debSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6852356f6debSmrgcompiler_DEFAULT=$CC 68536f03b1f6Smrg 6854356f6debSmrg# save warnings/boilerplate of simple test code 6855356f6debSmrg_LT_COMPILER_BOILERPLATE 6856356f6debSmrg_LT_LINKER_BOILERPLATE 68576f03b1f6Smrg 6858356f6debSmrgif test -n "$compiler"; then 6859356f6debSmrg _LT_COMPILER_NO_RTTI($1) 6860356f6debSmrg _LT_COMPILER_PIC($1) 6861356f6debSmrg _LT_COMPILER_C_O($1) 6862356f6debSmrg _LT_COMPILER_FILE_LOCKS($1) 6863356f6debSmrg _LT_LINKER_SHLIBS($1) 6864356f6debSmrg _LT_SYS_DYNAMIC_LINKER($1) 6865356f6debSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6866356f6debSmrg LT_SYS_DLOPEN_SELF 6867356f6debSmrg _LT_CMD_STRIPLIB 6868356f6debSmrg 6869356f6debSmrg # Report which library types will actually be built 6870356f6debSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6871356f6debSmrg AC_MSG_RESULT([$can_build_shared]) 6872356f6debSmrg 6873356f6debSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6874356f6debSmrg test "$can_build_shared" = "no" && enable_shared=no 6875356f6debSmrg 6876356f6debSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6877356f6debSmrg # are all built from PIC. 6878356f6debSmrg case $host_os in 6879356f6debSmrg aix3*) 6880356f6debSmrg test "$enable_shared" = yes && enable_static=no 6881356f6debSmrg if test -n "$RANLIB"; then 6882356f6debSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6883356f6debSmrg postinstall_cmds='$RANLIB $lib' 6884356f6debSmrg fi 6885356f6debSmrg ;; 68866f03b1f6Smrg 6887356f6debSmrg aix[[4-9]]*) 6888356f6debSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6889356f6debSmrg test "$enable_shared" = yes && enable_static=no 6890356f6debSmrg fi 6891356f6debSmrg ;; 6892356f6debSmrg esac 6893356f6debSmrg AC_MSG_RESULT([$enable_shared]) 68946f03b1f6Smrg 6895356f6debSmrg AC_MSG_CHECKING([whether to build static libraries]) 6896356f6debSmrg # Make sure either enable_shared or enable_static is yes. 6897356f6debSmrg test "$enable_shared" = yes || enable_static=yes 6898356f6debSmrg AC_MSG_RESULT([$enable_static]) 68996f03b1f6Smrg 6900356f6debSmrg _LT_CONFIG($1) 6901356f6debSmrgfi 6902356f6debSmrgAC_LANG_POP 6903356f6debSmrgCC="$lt_save_CC" 6904356f6debSmrg])# _LT_LANG_C_CONFIG 690598af18c5Smrg 690698af18c5Smrg 6907356f6debSmrg# _LT_LANG_CXX_CONFIG([TAG]) 6908356f6debSmrg# -------------------------- 6909356f6debSmrg# Ensure that the configuration variables for a C++ compiler are suitably 6910356f6debSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6911356f6debSmrg# the compiler configuration to `libtool'. 6912356f6debSmrgm4_defun([_LT_LANG_CXX_CONFIG], 691342941e3bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6914356f6debSmrgm4_require([_LT_DECL_EGREP])dnl 691542941e3bSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 691642941e3bSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 691742941e3bSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 691842941e3bSmrg (test "X$CXX" != "Xg++"))) ; then 691942941e3bSmrg AC_PROG_CXXCPP 692042941e3bSmrgelse 692142941e3bSmrg _lt_caught_CXX_error=yes 692242941e3bSmrgfi 6923356f6debSmrg 6924356f6debSmrgAC_LANG_PUSH(C++) 6925356f6debSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6926356f6debSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6927356f6debSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6928356f6debSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6929356f6debSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 6930356f6debSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6931356f6debSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6932356f6debSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6933356f6debSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6934356f6debSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6935356f6debSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6936356f6debSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6937356f6debSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6938356f6debSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6939356f6debSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6940356f6debSmrg_LT_TAGVAR(module_cmds, $1)= 6941356f6debSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6942356f6debSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6943356f6debSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 694442941e3bSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 694542941e3bSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6946356f6debSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6947356f6debSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6948356f6debSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 694998af18c5Smrg 6950356f6debSmrg# Source file extension for C++ test sources. 6951356f6debSmrgac_ext=cpp 695298af18c5Smrg 6953356f6debSmrg# Object file extension for compiled C++ test sources. 6954356f6debSmrgobjext=o 6955356f6debSmrg_LT_TAGVAR(objext, $1)=$objext 6956356f6debSmrg 6957356f6debSmrg# No sense in running all these tests if we already determined that 6958356f6debSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 6959356f6debSmrg# are currently assumed to apply to all compilers on this platform, 6960356f6debSmrg# and will be corrupted by setting them based on a non-working compiler. 6961356f6debSmrgif test "$_lt_caught_CXX_error" != yes; then 6962356f6debSmrg # Code to be used in simple compile tests 6963356f6debSmrg lt_simple_compile_test_code="int some_variable = 0;" 6964356f6debSmrg 6965356f6debSmrg # Code to be used in simple link tests 6966356f6debSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6967356f6debSmrg 6968356f6debSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6969356f6debSmrg _LT_TAG_COMPILER 6970356f6debSmrg 6971356f6debSmrg # save warnings/boilerplate of simple test code 6972356f6debSmrg _LT_COMPILER_BOILERPLATE 6973356f6debSmrg _LT_LINKER_BOILERPLATE 6974356f6debSmrg 6975356f6debSmrg # Allow CC to be a program name with arguments. 6976356f6debSmrg lt_save_CC=$CC 697742941e3bSmrg lt_save_CFLAGS=$CFLAGS 6978356f6debSmrg lt_save_LD=$LD 6979356f6debSmrg lt_save_GCC=$GCC 6980356f6debSmrg GCC=$GXX 6981356f6debSmrg lt_save_with_gnu_ld=$with_gnu_ld 6982356f6debSmrg lt_save_path_LD=$lt_cv_path_LD 6983356f6debSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6984356f6debSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6985356f6debSmrg else 6986356f6debSmrg $as_unset lt_cv_prog_gnu_ld 6987356f6debSmrg fi 6988356f6debSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 6989356f6debSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 6990356f6debSmrg else 6991356f6debSmrg $as_unset lt_cv_path_LD 6992356f6debSmrg fi 6993356f6debSmrg test -z "${LDCXX+set}" || LD=$LDCXX 6994356f6debSmrg CC=${CXX-"c++"} 699542941e3bSmrg CFLAGS=$CXXFLAGS 6996356f6debSmrg compiler=$CC 6997356f6debSmrg _LT_TAGVAR(compiler, $1)=$CC 6998356f6debSmrg _LT_CC_BASENAME([$compiler]) 699998af18c5Smrg 7000356f6debSmrg if test -n "$compiler"; then 7001356f6debSmrg # We don't want -fno-exception when compiling C++ code, so set the 7002356f6debSmrg # no_builtin_flag separately 7003356f6debSmrg if test "$GXX" = yes; then 7004356f6debSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7005356f6debSmrg else 7006356f6debSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7007356f6debSmrg fi 700898af18c5Smrg 7009356f6debSmrg if test "$GXX" = yes; then 7010356f6debSmrg # Set up default GNU C++ configuration 701198af18c5Smrg 7012356f6debSmrg LT_PATH_LD 701398af18c5Smrg 7014356f6debSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 7015356f6debSmrg # archiving commands below assume that GNU ld is being used. 7016356f6debSmrg if test "$with_gnu_ld" = yes; then 701742941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 701842941e3bSmrg _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' 701998af18c5Smrg 7020356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7021356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 702298af18c5Smrg 7023356f6debSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 7024356f6debSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7025356f6debSmrg # investigate it a little bit more. (MM) 7026356f6debSmrg wlarc='${wl}' 702798af18c5Smrg 7028356f6debSmrg # ancient GNU ld didn't support --whole-archive et. al. 7029356f6debSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 7030356f6debSmrg $GREP 'no-whole-archive' > /dev/null; then 7031356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7032356f6debSmrg else 7033356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7034356f6debSmrg fi 7035356f6debSmrg else 7036356f6debSmrg with_gnu_ld=no 7037356f6debSmrg wlarc= 7038356f6debSmrg 7039356f6debSmrg # A generic and very simple default shared library creation 7040356f6debSmrg # command for GNU C++ for the case where it uses the native 7041356f6debSmrg # linker, instead of GNU ld. If possible, this setting should 7042356f6debSmrg # overridden to take advantage of the native linker features on 7043356f6debSmrg # the platform it is being used on. 7044356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7045356f6debSmrg fi 704698af18c5Smrg 7047356f6debSmrg # Commands to make compiler produce verbose output that lists 7048356f6debSmrg # what "hidden" libraries, object files and flags are used when 7049356f6debSmrg # linking a shared library. 705042941e3bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 705198af18c5Smrg 7052356f6debSmrg else 7053356f6debSmrg GXX=no 7054356f6debSmrg with_gnu_ld=no 7055356f6debSmrg wlarc= 7056356f6debSmrg fi 705798af18c5Smrg 7058356f6debSmrg # PORTME: fill in a description of your system's C++ link characteristics 7059356f6debSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7060356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7061356f6debSmrg case $host_os in 7062356f6debSmrg aix3*) 7063356f6debSmrg # FIXME: insert proper C++ library support 7064356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7065356f6debSmrg ;; 7066356f6debSmrg aix[[4-9]]*) 7067356f6debSmrg if test "$host_cpu" = ia64; then 7068356f6debSmrg # On IA64, the linker does run time linking by default, so we don't 7069356f6debSmrg # have to do anything special. 7070356f6debSmrg aix_use_runtimelinking=no 7071356f6debSmrg exp_sym_flag='-Bexport' 7072356f6debSmrg no_entry_flag="" 7073356f6debSmrg else 7074356f6debSmrg aix_use_runtimelinking=no 7075356f6debSmrg 7076356f6debSmrg # Test if we are trying to use run time linking or normal 7077356f6debSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7078356f6debSmrg # need to do runtime linking. 7079356f6debSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7080356f6debSmrg for ld_flag in $LDFLAGS; do 7081356f6debSmrg case $ld_flag in 7082356f6debSmrg *-brtl*) 7083356f6debSmrg aix_use_runtimelinking=yes 7084356f6debSmrg break 7085356f6debSmrg ;; 7086356f6debSmrg esac 7087356f6debSmrg done 7088356f6debSmrg ;; 7089356f6debSmrg esac 709098af18c5Smrg 7091356f6debSmrg exp_sym_flag='-bexport' 7092356f6debSmrg no_entry_flag='-bnoentry' 7093356f6debSmrg fi 709498af18c5Smrg 7095356f6debSmrg # When large executables or shared objects are built, AIX ld can 7096356f6debSmrg # have problems creating the table of contents. If linking a library 7097356f6debSmrg # or program results in "error TOC overflow" add -mminimal-toc to 7098356f6debSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7099356f6debSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7100356f6debSmrg 7101356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='' 7102356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7103356f6debSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7104356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7105356f6debSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7106356f6debSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7107356f6debSmrg 7108356f6debSmrg if test "$GXX" = yes; then 7109356f6debSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7110356f6debSmrg # We only want to do this on AIX 4.2 and lower, the check 7111356f6debSmrg # below for broken collect2 doesn't work under 4.3+ 7112356f6debSmrg collect2name=`${CC} -print-prog-name=collect2` 7113356f6debSmrg if test -f "$collect2name" && 7114356f6debSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7115356f6debSmrg then 7116356f6debSmrg # We have reworked collect2 7117356f6debSmrg : 7118356f6debSmrg else 7119356f6debSmrg # We have old collect2 7120356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7121356f6debSmrg # It fails to find uninstalled libraries when the uninstalled 7122356f6debSmrg # path is not listed in the libpath. Setting hardcode_minus_L 7123356f6debSmrg # to unsupported forces relinking 7124356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7125356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7126356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7127356f6debSmrg fi 7128356f6debSmrg esac 7129356f6debSmrg shared_flag='-shared' 7130356f6debSmrg if test "$aix_use_runtimelinking" = yes; then 7131356f6debSmrg shared_flag="$shared_flag "'${wl}-G' 7132356f6debSmrg fi 7133356f6debSmrg else 7134356f6debSmrg # not using gcc 7135356f6debSmrg if test "$host_cpu" = ia64; then 7136356f6debSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7137356f6debSmrg # chokes on -Wl,-G. The following line is correct: 7138356f6debSmrg shared_flag='-G' 7139356f6debSmrg else 7140356f6debSmrg if test "$aix_use_runtimelinking" = yes; then 7141356f6debSmrg shared_flag='${wl}-G' 7142356f6debSmrg else 7143356f6debSmrg shared_flag='${wl}-bM:SRE' 7144356f6debSmrg fi 7145356f6debSmrg fi 7146356f6debSmrg fi 714798af18c5Smrg 7148356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7149356f6debSmrg # It seems that -bexpall does not export symbols beginning with 7150356f6debSmrg # underscore (_), so it is better to generate a list of symbols to 7151356f6debSmrg # export. 7152356f6debSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 7153356f6debSmrg if test "$aix_use_runtimelinking" = yes; then 7154356f6debSmrg # Warning - without using the other runtime loading flags (-brtl), 7155356f6debSmrg # -berok will link without error, but may produce a broken library. 7156356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7157356f6debSmrg # Determine the default libpath from the value encoded in an empty 7158356f6debSmrg # executable. 715942941e3bSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 7160356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7161356f6debSmrg 716242941e3bSmrg _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" 7163356f6debSmrg else 7164356f6debSmrg if test "$host_cpu" = ia64; then 7165356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7166356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7167356f6debSmrg _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" 7168356f6debSmrg else 7169356f6debSmrg # Determine the default libpath from the value encoded in an 7170356f6debSmrg # empty executable. 717142941e3bSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 7172356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7173356f6debSmrg # Warning - without using the other run time loading flags, 7174356f6debSmrg # -berok will link without error, but may produce a broken library. 7175356f6debSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7176356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 717742941e3bSmrg if test "$with_gnu_ld" = yes; then 717842941e3bSmrg # We only use this code for GNU lds that support --whole-archive. 717942941e3bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 718042941e3bSmrg else 718142941e3bSmrg # Exported symbols can be pulled into shared objects from archives 718242941e3bSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 718342941e3bSmrg fi 7184356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7185356f6debSmrg # This is similar to how AIX traditionally builds its shared 7186356f6debSmrg # libraries. 7187356f6debSmrg _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' 7188356f6debSmrg fi 7189356f6debSmrg fi 7190356f6debSmrg ;; 719198af18c5Smrg 7192356f6debSmrg beos*) 7193356f6debSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7194356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7195356f6debSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7196356f6debSmrg # support --undefined. This deserves some investigation. FIXME 7197356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7198356f6debSmrg else 7199356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7200356f6debSmrg fi 7201356f6debSmrg ;; 720298af18c5Smrg 7203356f6debSmrg chorus*) 7204356f6debSmrg case $cc_basename in 7205356f6debSmrg *) 7206356f6debSmrg # FIXME: insert proper C++ library support 7207356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7208356f6debSmrg ;; 7209356f6debSmrg esac 7210356f6debSmrg ;; 721198af18c5Smrg 7212356f6debSmrg cygwin* | mingw* | pw32* | cegcc*) 721342941e3bSmrg case $GXX,$cc_basename in 721442941e3bSmrg ,cl* | no,cl*) 721542941e3bSmrg # Native MSVC 721642941e3bSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 721742941e3bSmrg # no search path for DLLs. 721842941e3bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 721942941e3bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 722042941e3bSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 722142941e3bSmrg _LT_TAGVAR(file_list_spec, $1)='@' 722242941e3bSmrg # Tell ltmain to make .lib files, not .a files. 722342941e3bSmrg libext=lib 722442941e3bSmrg # Tell ltmain to make .dll files, not .so files. 722542941e3bSmrg shrext_cmds=".dll" 722642941e3bSmrg # FIXME: Setting linknames here is a bad hack. 722742941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 722842941e3bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 722942941e3bSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 723042941e3bSmrg else 723142941e3bSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 723242941e3bSmrg fi~ 723342941e3bSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 723442941e3bSmrg linknames=' 723542941e3bSmrg # The linker will not automatically build a static lib if we build a DLL. 723642941e3bSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 723742941e3bSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 723842941e3bSmrg # Don't use ranlib 723942941e3bSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 724042941e3bSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 724142941e3bSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 724242941e3bSmrg case $lt_outputfile in 724342941e3bSmrg *.exe|*.EXE) ;; 724442941e3bSmrg *) 724542941e3bSmrg lt_outputfile="$lt_outputfile.exe" 724642941e3bSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 724742941e3bSmrg ;; 724842941e3bSmrg esac~ 724942941e3bSmrg func_to_tool_file "$lt_outputfile"~ 725042941e3bSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 725142941e3bSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 725242941e3bSmrg $RM "$lt_outputfile.manifest"; 725342941e3bSmrg fi' 725442941e3bSmrg ;; 725542941e3bSmrg *) 725642941e3bSmrg # g++ 725742941e3bSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 725842941e3bSmrg # as there is no search path for DLLs. 725942941e3bSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 726042941e3bSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 726142941e3bSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 726242941e3bSmrg _LT_TAGVAR(always_export_symbols, $1)=no 726342941e3bSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 726442941e3bSmrg 726542941e3bSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 726642941e3bSmrg _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' 726742941e3bSmrg # If the export-symbols file already is a .def file (1st line 726842941e3bSmrg # is EXPORTS), use it as is; otherwise, prepend... 726942941e3bSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 727042941e3bSmrg cp $export_symbols $output_objdir/$soname.def; 727142941e3bSmrg else 727242941e3bSmrg echo EXPORTS > $output_objdir/$soname.def; 727342941e3bSmrg cat $export_symbols >> $output_objdir/$soname.def; 727442941e3bSmrg fi~ 727542941e3bSmrg $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' 727642941e3bSmrg else 727742941e3bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 727842941e3bSmrg fi 727942941e3bSmrg ;; 728042941e3bSmrg esac 728142941e3bSmrg ;; 7282356f6debSmrg darwin* | rhapsody*) 7283356f6debSmrg _LT_DARWIN_LINKER_FEATURES($1) 7284356f6debSmrg ;; 728598af18c5Smrg 7286356f6debSmrg dgux*) 7287356f6debSmrg case $cc_basename in 7288356f6debSmrg ec++*) 7289356f6debSmrg # FIXME: insert proper C++ library support 7290356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7291356f6debSmrg ;; 7292356f6debSmrg ghcx*) 7293356f6debSmrg # Green Hills C++ Compiler 7294356f6debSmrg # FIXME: insert proper C++ library support 7295356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7296356f6debSmrg ;; 7297356f6debSmrg *) 7298356f6debSmrg # FIXME: insert proper C++ library support 7299356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7300356f6debSmrg ;; 7301356f6debSmrg esac 7302356f6debSmrg ;; 730398af18c5Smrg 7304356f6debSmrg freebsd[[12]]*) 7305356f6debSmrg # C++ shared libraries reported to be fairly broken before 7306356f6debSmrg # switch to ELF 7307356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7308356f6debSmrg ;; 730998af18c5Smrg 7310356f6debSmrg freebsd-elf*) 7311356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7312356f6debSmrg ;; 731398af18c5Smrg 7314356f6debSmrg freebsd* | dragonfly*) 7315356f6debSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 7316356f6debSmrg # conventions 7317356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7318356f6debSmrg ;; 731998af18c5Smrg 7320356f6debSmrg gnu*) 7321356f6debSmrg ;; 732298af18c5Smrg 732342941e3bSmrg haiku*) 732442941e3bSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 732542941e3bSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 732642941e3bSmrg ;; 732742941e3bSmrg 7328356f6debSmrg hpux9*) 7329356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7330356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7331356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7332356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7333356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7334356f6debSmrg # but as the default 7335356f6debSmrg # location of the library. 7336356f6debSmrg 7337356f6debSmrg case $cc_basename in 7338356f6debSmrg CC*) 7339356f6debSmrg # FIXME: insert proper C++ library support 7340356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7341356f6debSmrg ;; 7342356f6debSmrg aCC*) 7343356f6debSmrg _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' 7344356f6debSmrg # Commands to make compiler produce verbose output that lists 7345356f6debSmrg # what "hidden" libraries, object files and flags are used when 7346356f6debSmrg # linking a shared library. 7347356f6debSmrg # 7348356f6debSmrg # There doesn't appear to be a way to prevent this compiler from 7349356f6debSmrg # explicitly linking system object files so we need to strip them 7350356f6debSmrg # from the output so that they don't get included in the library 7351356f6debSmrg # dependencies. 735242941e3bSmrg 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"' 7353356f6debSmrg ;; 7354356f6debSmrg *) 7355356f6debSmrg if test "$GXX" = yes; then 735642941e3bSmrg _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' 7357356f6debSmrg else 7358356f6debSmrg # FIXME: insert proper C++ library support 7359356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7360356f6debSmrg fi 7361356f6debSmrg ;; 7362356f6debSmrg esac 7363356f6debSmrg ;; 736498af18c5Smrg 7365356f6debSmrg hpux10*|hpux11*) 7366356f6debSmrg if test $with_gnu_ld = no; then 7367356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7368356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7369356f6debSmrg 7370356f6debSmrg case $host_cpu in 7371356f6debSmrg hppa*64*|ia64*) 7372356f6debSmrg ;; 7373356f6debSmrg *) 7374356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7375356f6debSmrg ;; 7376356f6debSmrg esac 7377356f6debSmrg fi 7378356f6debSmrg case $host_cpu in 7379356f6debSmrg hppa*64*|ia64*) 7380356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=no 7381356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7382356f6debSmrg ;; 7383356f6debSmrg *) 7384356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7385356f6debSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7386356f6debSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7387356f6debSmrg # but as the default 7388356f6debSmrg # location of the library. 7389356f6debSmrg ;; 7390356f6debSmrg esac 7391356f6debSmrg 7392356f6debSmrg case $cc_basename in 7393356f6debSmrg CC*) 7394356f6debSmrg # FIXME: insert proper C++ library support 7395356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7396356f6debSmrg ;; 7397356f6debSmrg aCC*) 7398356f6debSmrg case $host_cpu in 7399356f6debSmrg hppa*64*) 7400356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7401356f6debSmrg ;; 7402356f6debSmrg ia64*) 7403356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7404356f6debSmrg ;; 7405356f6debSmrg *) 7406356f6debSmrg _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' 7407356f6debSmrg ;; 7408356f6debSmrg esac 7409356f6debSmrg # Commands to make compiler produce verbose output that lists 7410356f6debSmrg # what "hidden" libraries, object files and flags are used when 7411356f6debSmrg # linking a shared library. 7412356f6debSmrg # 7413356f6debSmrg # There doesn't appear to be a way to prevent this compiler from 7414356f6debSmrg # explicitly linking system object files so we need to strip them 7415356f6debSmrg # from the output so that they don't get included in the library 7416356f6debSmrg # dependencies. 741742941e3bSmrg 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"' 7418356f6debSmrg ;; 7419356f6debSmrg *) 7420356f6debSmrg if test "$GXX" = yes; then 7421356f6debSmrg if test $with_gnu_ld = no; then 7422356f6debSmrg case $host_cpu in 7423356f6debSmrg hppa*64*) 7424356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7425356f6debSmrg ;; 7426356f6debSmrg ia64*) 742742941e3bSmrg _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' 7428356f6debSmrg ;; 7429356f6debSmrg *) 743042941e3bSmrg _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' 7431356f6debSmrg ;; 7432356f6debSmrg esac 7433356f6debSmrg fi 7434356f6debSmrg else 7435356f6debSmrg # FIXME: insert proper C++ library support 7436356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7437356f6debSmrg fi 7438356f6debSmrg ;; 7439356f6debSmrg esac 7440356f6debSmrg ;; 744198af18c5Smrg 7442356f6debSmrg interix[[3-9]]*) 7443356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=no 7444356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7445356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7446356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7447356f6debSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7448356f6debSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 7449356f6debSmrg # default) and relocated if they conflict, which is a slow very memory 7450356f6debSmrg # consuming and fragmenting process. To avoid this, we pick a random, 7451356f6debSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7452356f6debSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7453356f6debSmrg _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' 7454356f6debSmrg _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' 7455356f6debSmrg ;; 7456356f6debSmrg irix5* | irix6*) 7457356f6debSmrg case $cc_basename in 7458356f6debSmrg CC*) 7459356f6debSmrg # SGI C++ 746042941e3bSmrg _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' 7461356f6debSmrg 7462356f6debSmrg # Archives containing C++ object files must be created using 7463356f6debSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7464356f6debSmrg # necessary to make sure instantiated templates are included 7465356f6debSmrg # in the archive. 7466356f6debSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7467356f6debSmrg ;; 7468356f6debSmrg *) 7469356f6debSmrg if test "$GXX" = yes; then 7470356f6debSmrg if test "$with_gnu_ld" = no; then 747142941e3bSmrg _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' 7472356f6debSmrg else 747342941e3bSmrg _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' 7474356f6debSmrg fi 7475356f6debSmrg fi 7476356f6debSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7477356f6debSmrg ;; 7478356f6debSmrg esac 7479356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7480356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7481356f6debSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 7482356f6debSmrg ;; 748398af18c5Smrg 748442941e3bSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 7485356f6debSmrg case $cc_basename in 7486356f6debSmrg KCC*) 7487356f6debSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7488356f6debSmrg 7489356f6debSmrg # KCC will only create a shared library if the output file 7490356f6debSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7491356f6debSmrg # to its proper name (with version) after linking. 7492356f6debSmrg _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' 7493356f6debSmrg _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' 7494356f6debSmrg # Commands to make compiler produce verbose output that lists 7495356f6debSmrg # what "hidden" libraries, object files and flags are used when 7496356f6debSmrg # linking a shared library. 7497356f6debSmrg # 7498356f6debSmrg # There doesn't appear to be a way to prevent this compiler from 7499356f6debSmrg # explicitly linking system object files so we need to strip them 7500356f6debSmrg # from the output so that they don't get included in the library 7501356f6debSmrg # dependencies. 750242941e3bSmrg 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"' 7503356f6debSmrg 7504356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7505356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7506356f6debSmrg 7507356f6debSmrg # Archives containing C++ object files must be created using 7508356f6debSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7509356f6debSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7510356f6debSmrg ;; 7511356f6debSmrg icpc* | ecpc* ) 7512356f6debSmrg # Intel C++ 7513356f6debSmrg with_gnu_ld=yes 7514356f6debSmrg # version 8.0 and above of icpc choke on multiply defined symbols 7515356f6debSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 7516356f6debSmrg # earlier do not add the objects themselves. 7517356f6debSmrg case `$CC -V 2>&1` in 7518356f6debSmrg *"Version 7."*) 7519356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7520356f6debSmrg _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' 7521356f6debSmrg ;; 7522356f6debSmrg *) # Version 8.0 or newer 7523356f6debSmrg tmp_idyn= 7524356f6debSmrg case $host_cpu in 7525356f6debSmrg ia64*) tmp_idyn=' -i_dynamic';; 7526356f6debSmrg esac 7527356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7528356f6debSmrg _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' 7529356f6debSmrg ;; 7530356f6debSmrg esac 7531356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7532356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7533356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7534356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7535356f6debSmrg ;; 7536356f6debSmrg pgCC* | pgcpp*) 7537356f6debSmrg # Portland Group C++ compiler 7538356f6debSmrg case `$CC -V` in 753942941e3bSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7540356f6debSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7541356f6debSmrg rm -rf $tpldir~ 7542356f6debSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 754342941e3bSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7544356f6debSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7545356f6debSmrg rm -rf $tpldir~ 7546356f6debSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 754742941e3bSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7548356f6debSmrg $RANLIB $oldlib' 7549356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7550356f6debSmrg rm -rf $tpldir~ 7551356f6debSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 755242941e3bSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7553356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7554356f6debSmrg rm -rf $tpldir~ 7555356f6debSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 755642941e3bSmrg $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' 7557356f6debSmrg ;; 755842941e3bSmrg *) # Version 6 and above use weak symbols 7559356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 7560356f6debSmrg _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' 7561356f6debSmrg ;; 7562356f6debSmrg esac 756398af18c5Smrg 7564356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7565356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 756642941e3bSmrg _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' 7567356f6debSmrg ;; 7568356f6debSmrg cxx*) 7569356f6debSmrg # Compaq C++ 7570356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7571356f6debSmrg _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' 757298af18c5Smrg 7573356f6debSmrg runpath_var=LD_RUN_PATH 7574356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7575356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 757698af18c5Smrg 7577356f6debSmrg # Commands to make compiler produce verbose output that lists 7578356f6debSmrg # what "hidden" libraries, object files and flags are used when 7579356f6debSmrg # linking a shared library. 7580356f6debSmrg # 7581356f6debSmrg # There doesn't appear to be a way to prevent this compiler from 7582356f6debSmrg # explicitly linking system object files so we need to strip them 7583356f6debSmrg # from the output so that they don't get included in the library 7584356f6debSmrg # dependencies. 758542941e3bSmrg 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' 7586356f6debSmrg ;; 758742941e3bSmrg xl* | mpixl* | bgxl*) 7588356f6debSmrg # IBM XL 8.0 on PPC, with GNU ld 7589356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7590356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7591356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7592356f6debSmrg if test "x$supports_anon_versioning" = xyes; then 7593356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7594356f6debSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7595356f6debSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7596356f6debSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7597356f6debSmrg fi 7598356f6debSmrg ;; 7599356f6debSmrg *) 7600356f6debSmrg case `$CC -V 2>&1 | sed 5q` in 7601356f6debSmrg *Sun\ C*) 7602356f6debSmrg # Sun C++ 5.9 7603356f6debSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7604356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7605356f6debSmrg _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' 7606356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 760742941e3bSmrg _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' 7608356f6debSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7609356f6debSmrg 7610356f6debSmrg # Not sure whether something based on 7611356f6debSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7612356f6debSmrg # would be better. 761342941e3bSmrg output_verbose_link_cmd='func_echo_all' 7614356f6debSmrg 7615356f6debSmrg # Archives containing C++ object files must be created using 7616356f6debSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7617356f6debSmrg # necessary to make sure instantiated templates are included 7618356f6debSmrg # in the archive. 7619356f6debSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7620356f6debSmrg ;; 7621356f6debSmrg esac 7622356f6debSmrg ;; 7623356f6debSmrg esac 7624356f6debSmrg ;; 762598af18c5Smrg 7626356f6debSmrg lynxos*) 7627356f6debSmrg # FIXME: insert proper C++ library support 7628356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7629356f6debSmrg ;; 763098af18c5Smrg 7631356f6debSmrg m88k*) 7632356f6debSmrg # FIXME: insert proper C++ library support 7633356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7634356f6debSmrg ;; 763598af18c5Smrg 7636356f6debSmrg mvs*) 7637356f6debSmrg case $cc_basename in 7638356f6debSmrg cxx*) 7639356f6debSmrg # FIXME: insert proper C++ library support 7640356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7641356f6debSmrg ;; 7642356f6debSmrg *) 7643356f6debSmrg # FIXME: insert proper C++ library support 7644356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7645356f6debSmrg ;; 7646356f6debSmrg esac 7647356f6debSmrg ;; 764898af18c5Smrg 7649356f6debSmrg netbsd*) 7650356f6debSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7651356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7652356f6debSmrg wlarc= 7653356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7654356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7655356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7656356f6debSmrg fi 7657356f6debSmrg # Workaround some broken pre-1.5 toolchains 7658356f6debSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7659356f6debSmrg ;; 766098af18c5Smrg 7661356f6debSmrg *nto* | *qnx*) 7662356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7663356f6debSmrg ;; 766498af18c5Smrg 7665356f6debSmrg openbsd2*) 7666356f6debSmrg # C++ shared libraries are fairly broken 7667356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7668356f6debSmrg ;; 766998af18c5Smrg 7670356f6debSmrg openbsd*) 7671356f6debSmrg if test -f /usr/libexec/ld.so; then 7672356f6debSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7673356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7674356f6debSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7675356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7676356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7677356f6debSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7678356f6debSmrg _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' 7679356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7680356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7681356f6debSmrg fi 768242941e3bSmrg output_verbose_link_cmd=func_echo_all 7683356f6debSmrg else 7684356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7685356f6debSmrg fi 7686356f6debSmrg ;; 768798af18c5Smrg 7688356f6debSmrg osf3* | osf4* | osf5*) 7689356f6debSmrg case $cc_basename in 7690356f6debSmrg KCC*) 7691356f6debSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7692356f6debSmrg 7693356f6debSmrg # KCC will only create a shared library if the output file 7694356f6debSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7695356f6debSmrg # to its proper name (with version) after linking. 7696356f6debSmrg _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' 7697356f6debSmrg 7698356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7699356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7700356f6debSmrg 7701356f6debSmrg # Archives containing C++ object files must be created using 7702356f6debSmrg # the KAI C++ compiler. 7703356f6debSmrg case $host in 7704356f6debSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7705356f6debSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7706356f6debSmrg esac 7707356f6debSmrg ;; 7708356f6debSmrg RCC*) 7709356f6debSmrg # Rational C++ 2.4.1 7710356f6debSmrg # FIXME: insert proper C++ library support 7711356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7712356f6debSmrg ;; 7713356f6debSmrg cxx*) 7714356f6debSmrg case $host in 7715356f6debSmrg osf3*) 7716356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 771742941e3bSmrg _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' 7718356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7719356f6debSmrg ;; 7720356f6debSmrg *) 7721356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 772242941e3bSmrg _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' 7723356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7724356f6debSmrg echo "-hidden">> $lib.exp~ 772542941e3bSmrg $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~ 7726356f6debSmrg $RM $lib.exp' 7727356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7728356f6debSmrg ;; 7729356f6debSmrg esac 773098af18c5Smrg 7731356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 773298af18c5Smrg 7733356f6debSmrg # Commands to make compiler produce verbose output that lists 7734356f6debSmrg # what "hidden" libraries, object files and flags are used when 7735356f6debSmrg # linking a shared library. 7736356f6debSmrg # 7737356f6debSmrg # There doesn't appear to be a way to prevent this compiler from 7738356f6debSmrg # explicitly linking system object files so we need to strip them 7739356f6debSmrg # from the output so that they don't get included in the library 7740356f6debSmrg # dependencies. 774142941e3bSmrg 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"' 7742356f6debSmrg ;; 7743356f6debSmrg *) 7744356f6debSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7745356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7746356f6debSmrg case $host in 7747356f6debSmrg osf3*) 774842941e3bSmrg _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' 7749356f6debSmrg ;; 7750356f6debSmrg *) 775142941e3bSmrg _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' 7752356f6debSmrg ;; 7753356f6debSmrg esac 7754356f6debSmrg 7755356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7756356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7757356f6debSmrg 7758356f6debSmrg # Commands to make compiler produce verbose output that lists 7759356f6debSmrg # what "hidden" libraries, object files and flags are used when 7760356f6debSmrg # linking a shared library. 776142941e3bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7762356f6debSmrg 7763356f6debSmrg else 7764356f6debSmrg # FIXME: insert proper C++ library support 7765356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7766356f6debSmrg fi 7767356f6debSmrg ;; 7768356f6debSmrg esac 7769356f6debSmrg ;; 777098af18c5Smrg 7771356f6debSmrg psos*) 7772356f6debSmrg # FIXME: insert proper C++ library support 7773356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7774356f6debSmrg ;; 777598af18c5Smrg 7776356f6debSmrg sunos4*) 7777356f6debSmrg case $cc_basename in 7778356f6debSmrg CC*) 7779356f6debSmrg # Sun C++ 4.x 7780356f6debSmrg # FIXME: insert proper C++ library support 7781356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7782356f6debSmrg ;; 7783356f6debSmrg lcc*) 7784356f6debSmrg # Lucid 7785356f6debSmrg # FIXME: insert proper C++ library support 7786356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7787356f6debSmrg ;; 7788356f6debSmrg *) 7789356f6debSmrg # FIXME: insert proper C++ library support 7790356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7791356f6debSmrg ;; 7792356f6debSmrg esac 7793356f6debSmrg ;; 779498af18c5Smrg 7795356f6debSmrg solaris*) 7796356f6debSmrg case $cc_basename in 779742941e3bSmrg CC* | sunCC*) 7798356f6debSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7799356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7800356f6debSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7801356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7802356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7803356f6debSmrg $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' 7804356f6debSmrg 7805356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7806356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7807356f6debSmrg case $host_os in 7808356f6debSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7809356f6debSmrg *) 7810356f6debSmrg # The compiler driver will combine and reorder linker options, 7811356f6debSmrg # but understands `-z linker_flag'. 7812356f6debSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7813356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7814356f6debSmrg ;; 7815356f6debSmrg esac 7816356f6debSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 781798af18c5Smrg 781842941e3bSmrg output_verbose_link_cmd='func_echo_all' 781998af18c5Smrg 7820356f6debSmrg # Archives containing C++ object files must be created using 7821356f6debSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7822356f6debSmrg # necessary to make sure instantiated templates are included 7823356f6debSmrg # in the archive. 7824356f6debSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7825356f6debSmrg ;; 7826356f6debSmrg gcx*) 7827356f6debSmrg # Green Hills C++ Compiler 7828356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 782998af18c5Smrg 7830356f6debSmrg # The C++ compiler must be used to create the archive. 7831356f6debSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7832356f6debSmrg ;; 7833356f6debSmrg *) 7834356f6debSmrg # GNU C++ compiler with Solaris linker 7835356f6debSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 7836356f6debSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 7837356f6debSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 783842941e3bSmrg _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' 7839356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 784042941e3bSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7841356f6debSmrg 7842356f6debSmrg # Commands to make compiler produce verbose output that lists 7843356f6debSmrg # what "hidden" libraries, object files and flags are used when 7844356f6debSmrg # linking a shared library. 784542941e3bSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7846356f6debSmrg else 7847356f6debSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 7848356f6debSmrg # platform. 7849356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7850356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7851356f6debSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7852356f6debSmrg 7853356f6debSmrg # Commands to make compiler produce verbose output that lists 7854356f6debSmrg # what "hidden" libraries, object files and flags are used when 7855356f6debSmrg # linking a shared library. 785642941e3bSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7857356f6debSmrg fi 7858356f6debSmrg 7859356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 7860356f6debSmrg case $host_os in 7861356f6debSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7862356f6debSmrg *) 7863356f6debSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7864356f6debSmrg ;; 7865356f6debSmrg esac 7866356f6debSmrg fi 7867356f6debSmrg ;; 7868356f6debSmrg esac 7869356f6debSmrg ;; 787098af18c5Smrg 7871356f6debSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7872356f6debSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7873356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7874356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7875356f6debSmrg runpath_var='LD_RUN_PATH' 787698af18c5Smrg 7877356f6debSmrg case $cc_basename in 7878356f6debSmrg CC*) 7879356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7880356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7881356f6debSmrg ;; 7882356f6debSmrg *) 7883356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7884356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7885356f6debSmrg ;; 7886356f6debSmrg esac 7887356f6debSmrg ;; 788898af18c5Smrg 7889356f6debSmrg sysv5* | sco3.2v5* | sco5v6*) 7890356f6debSmrg # Note: We can NOT use -z defs as we might desire, because we do not 7891356f6debSmrg # link with -lc, and that would cause any symbols used from libc to 7892356f6debSmrg # always be unresolved, which means just about no library would 7893356f6debSmrg # ever link correctly. If we're not using GNU ld we use -z text 7894356f6debSmrg # though, which does catch some bad symbols but isn't as heavy-handed 7895356f6debSmrg # as -z defs. 7896356f6debSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7897356f6debSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7898356f6debSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7899356f6debSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7900356f6debSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7901356f6debSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7902356f6debSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7903356f6debSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7904356f6debSmrg runpath_var='LD_RUN_PATH' 790598af18c5Smrg 7906356f6debSmrg case $cc_basename in 7907356f6debSmrg CC*) 7908356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7909356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 791042941e3bSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 791142941e3bSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 791242941e3bSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 791342941e3bSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 7914356f6debSmrg ;; 7915356f6debSmrg *) 7916356f6debSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7917356f6debSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7918356f6debSmrg ;; 7919356f6debSmrg esac 7920356f6debSmrg ;; 792198af18c5Smrg 7922356f6debSmrg tandem*) 7923356f6debSmrg case $cc_basename in 7924356f6debSmrg NCC*) 7925356f6debSmrg # NonStop-UX NCC 3.20 7926356f6debSmrg # FIXME: insert proper C++ library support 7927356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7928356f6debSmrg ;; 7929356f6debSmrg *) 7930356f6debSmrg # FIXME: insert proper C++ library support 7931356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7932356f6debSmrg ;; 7933356f6debSmrg esac 7934356f6debSmrg ;; 793598af18c5Smrg 7936356f6debSmrg vxworks*) 7937356f6debSmrg # FIXME: insert proper C++ library support 7938356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7939356f6debSmrg ;; 794098af18c5Smrg 7941356f6debSmrg *) 7942356f6debSmrg # FIXME: insert proper C++ library support 7943356f6debSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7944356f6debSmrg ;; 7945356f6debSmrg esac 794698af18c5Smrg 7947356f6debSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7948356f6debSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7949356f6debSmrg 7950356f6debSmrg _LT_TAGVAR(GCC, $1)="$GXX" 7951356f6debSmrg _LT_TAGVAR(LD, $1)="$LD" 7952356f6debSmrg 7953356f6debSmrg ## CAVEAT EMPTOR: 7954356f6debSmrg ## There is no encapsulation within the following macros, do not change 7955356f6debSmrg ## the running order or otherwise move them around unless you know exactly 7956356f6debSmrg ## what you are doing... 7957356f6debSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7958356f6debSmrg _LT_COMPILER_PIC($1) 7959356f6debSmrg _LT_COMPILER_C_O($1) 7960356f6debSmrg _LT_COMPILER_FILE_LOCKS($1) 7961356f6debSmrg _LT_LINKER_SHLIBS($1) 7962356f6debSmrg _LT_SYS_DYNAMIC_LINKER($1) 7963356f6debSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7964356f6debSmrg 7965356f6debSmrg _LT_CONFIG($1) 7966356f6debSmrg fi # test -n "$compiler" 7967356f6debSmrg 7968356f6debSmrg CC=$lt_save_CC 796942941e3bSmrg CFLAGS=$lt_save_CFLAGS 7970356f6debSmrg LDCXX=$LD 7971356f6debSmrg LD=$lt_save_LD 7972356f6debSmrg GCC=$lt_save_GCC 7973356f6debSmrg with_gnu_ld=$lt_save_with_gnu_ld 7974356f6debSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 7975356f6debSmrg lt_cv_path_LD=$lt_save_path_LD 7976356f6debSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7977356f6debSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7978356f6debSmrgfi # test "$_lt_caught_CXX_error" != yes 797998af18c5Smrg 7980356f6debSmrgAC_LANG_POP 7981356f6debSmrg])# _LT_LANG_CXX_CONFIG 798298af18c5Smrg 798398af18c5Smrg 798442941e3bSmrg# _LT_FUNC_STRIPNAME_CNF 798542941e3bSmrg# ---------------------- 798642941e3bSmrg# func_stripname_cnf prefix suffix name 798742941e3bSmrg# strip PREFIX and SUFFIX off of NAME. 798842941e3bSmrg# PREFIX and SUFFIX must not contain globbing or regex special 798942941e3bSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 799042941e3bSmrg# dot (in which case that matches only a dot). 799142941e3bSmrg# 799242941e3bSmrg# This function is identical to the (non-XSI) version of func_stripname, 799342941e3bSmrg# except this one can be used by m4 code that may be executed by configure, 799442941e3bSmrg# rather than the libtool script. 799542941e3bSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 799642941e3bSmrgAC_REQUIRE([_LT_DECL_SED]) 799742941e3bSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 799842941e3bSmrgfunc_stripname_cnf () 799942941e3bSmrg{ 800042941e3bSmrg case ${2} in 800142941e3bSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 800242941e3bSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 800342941e3bSmrg esac 800442941e3bSmrg} # func_stripname_cnf 800542941e3bSmrg])# _LT_FUNC_STRIPNAME_CNF 800642941e3bSmrg 8007356f6debSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 800898af18c5Smrg# --------------------------------- 8009356f6debSmrg# Figure out "hidden" library dependencies from verbose 8010356f6debSmrg# compiler output when linking a shared library. 8011356f6debSmrg# Parse the compiler output and extract the necessary 8012356f6debSmrg# objects, libraries and library flags. 8013356f6debSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8014356f6debSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 801542941e3bSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 8016356f6debSmrg# Dependencies to place before and after the object being linked: 8017356f6debSmrg_LT_TAGVAR(predep_objects, $1)= 8018356f6debSmrg_LT_TAGVAR(postdep_objects, $1)= 8019356f6debSmrg_LT_TAGVAR(predeps, $1)= 8020356f6debSmrg_LT_TAGVAR(postdeps, $1)= 8021356f6debSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 802298af18c5Smrg 8023356f6debSmrgdnl we can't use the lt_simple_compile_test_code here, 8024356f6debSmrgdnl because it contains code intended for an executable, 8025356f6debSmrgdnl not a library. It's possible we should let each 8026356f6debSmrgdnl tag define a new lt_????_link_test_code variable, 8027356f6debSmrgdnl but it's only used here... 8028356f6debSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8029356f6debSmrgint a; 8030356f6debSmrgvoid foo (void) { a = 0; } 8031356f6debSmrg_LT_EOF 8032356f6debSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8033356f6debSmrgclass Foo 8034356f6debSmrg{ 8035356f6debSmrgpublic: 8036356f6debSmrg Foo (void) { a = 0; } 8037356f6debSmrgprivate: 8038356f6debSmrg int a; 8039356f6debSmrg}; 8040356f6debSmrg_LT_EOF 8041356f6debSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8042356f6debSmrg subroutine foo 8043356f6debSmrg implicit none 8044356f6debSmrg integer*4 a 8045356f6debSmrg a=0 8046356f6debSmrg return 8047356f6debSmrg end 8048356f6debSmrg_LT_EOF 8049356f6debSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8050356f6debSmrg subroutine foo 8051356f6debSmrg implicit none 8052356f6debSmrg integer a 8053356f6debSmrg a=0 8054356f6debSmrg return 8055356f6debSmrg end 8056356f6debSmrg_LT_EOF 8057356f6debSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 8058356f6debSmrgpublic class foo { 8059356f6debSmrg private int a; 8060356f6debSmrg public void bar (void) { 8061356f6debSmrg a = 0; 8062356f6debSmrg } 8063356f6debSmrg}; 8064356f6debSmrg_LT_EOF 8065356f6debSmrg]) 806642941e3bSmrg 806742941e3bSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 806842941e3bSmrgcase "$CC $CFLAGS " in #( 806942941e3bSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 807042941e3bSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 807142941e3bSmrgesac 807242941e3bSmrg 8073356f6debSmrgdnl Parse the compiler output and extract the necessary 8074356f6debSmrgdnl objects, libraries and library flags. 8075356f6debSmrgif AC_TRY_EVAL(ac_compile); then 8076356f6debSmrg # Parse the compiler output and extract the necessary 8077356f6debSmrg # objects, libraries and library flags. 807898af18c5Smrg 8079356f6debSmrg # Sentinel used to keep track of whether or not we are before 8080356f6debSmrg # the conftest object file. 8081356f6debSmrg pre_test_object_deps_done=no 808298af18c5Smrg 8083356f6debSmrg for p in `eval "$output_verbose_link_cmd"`; do 808442941e3bSmrg case ${prev}${p} in 808598af18c5Smrg 8086356f6debSmrg -L* | -R* | -l*) 8087356f6debSmrg # Some compilers place space between "-{L,R}" and the path. 8088356f6debSmrg # Remove the space. 8089356f6debSmrg if test $p = "-L" || 8090356f6debSmrg test $p = "-R"; then 8091356f6debSmrg prev=$p 8092356f6debSmrg continue 8093356f6debSmrg fi 8094356f6debSmrg 809542941e3bSmrg # Expand the sysroot to ease extracting the directories later. 809642941e3bSmrg if test -z "$prev"; then 809742941e3bSmrg case $p in 809842941e3bSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 809942941e3bSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 810042941e3bSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 810142941e3bSmrg esac 810242941e3bSmrg fi 810342941e3bSmrg case $p in 810442941e3bSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 810542941e3bSmrg esac 8106356f6debSmrg if test "$pre_test_object_deps_done" = no; then 810742941e3bSmrg case ${prev} in 810842941e3bSmrg -L | -R) 8109356f6debSmrg # Internal compiler library paths should come after those 8110356f6debSmrg # provided the user. The postdeps already come after the 8111356f6debSmrg # user supplied libs so there is no need to process them. 8112356f6debSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 8113356f6debSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8114356f6debSmrg else 8115356f6debSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8116356f6debSmrg fi 8117356f6debSmrg ;; 8118356f6debSmrg # The "-l" case would never come before the object being 8119356f6debSmrg # linked, so don't bother handling this case. 8120356f6debSmrg esac 8121356f6debSmrg else 8122356f6debSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 8123356f6debSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 8124356f6debSmrg else 8125356f6debSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 8126356f6debSmrg fi 8127356f6debSmrg fi 812842941e3bSmrg prev= 8129356f6debSmrg ;; 8130356f6debSmrg 813142941e3bSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 8132356f6debSmrg *.$objext) 8133356f6debSmrg # This assumes that the test object file only shows up 8134356f6debSmrg # once in the compiler output. 8135356f6debSmrg if test "$p" = "conftest.$objext"; then 8136356f6debSmrg pre_test_object_deps_done=yes 8137356f6debSmrg continue 8138356f6debSmrg fi 8139356f6debSmrg 8140356f6debSmrg if test "$pre_test_object_deps_done" = no; then 8141356f6debSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 8142356f6debSmrg _LT_TAGVAR(predep_objects, $1)="$p" 8143356f6debSmrg else 8144356f6debSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 8145356f6debSmrg fi 8146356f6debSmrg else 8147356f6debSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 8148356f6debSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 8149356f6debSmrg else 8150356f6debSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 8151356f6debSmrg fi 8152356f6debSmrg fi 8153356f6debSmrg ;; 8154356f6debSmrg 8155356f6debSmrg *) ;; # Ignore the rest. 8156356f6debSmrg 8157356f6debSmrg esac 8158356f6debSmrg done 8159356f6debSmrg 8160356f6debSmrg # Clean up. 8161356f6debSmrg rm -f a.out a.exe 8162356f6debSmrgelse 8163356f6debSmrg echo "libtool.m4: error: problem compiling $1 test program" 8164356f6debSmrgfi 8165356f6debSmrg 8166356f6debSmrg$RM -f confest.$objext 816742941e3bSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 8168356f6debSmrg 8169356f6debSmrg# PORTME: override above test on systems where it is broken 8170356f6debSmrgm4_if([$1], [CXX], 8171356f6debSmrg[case $host_os in 8172356f6debSmrginterix[[3-9]]*) 8173356f6debSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 8174356f6debSmrg # hack all around it, let's just trust "g++" to DTRT. 8175356f6debSmrg _LT_TAGVAR(predep_objects,$1)= 8176356f6debSmrg _LT_TAGVAR(postdep_objects,$1)= 8177356f6debSmrg _LT_TAGVAR(postdeps,$1)= 817898af18c5Smrg ;; 8179356f6debSmrg 8180356f6debSmrglinux*) 8181356f6debSmrg case `$CC -V 2>&1 | sed 5q` in 8182356f6debSmrg *Sun\ C*) 8183356f6debSmrg # Sun C++ 5.9 8184356f6debSmrg 8185356f6debSmrg # The more standards-conforming stlport4 library is 8186356f6debSmrg # incompatible with the Cstd library. Avoid specifying 8187356f6debSmrg # it if it's in CXXFLAGS. Ignore libCrun as 8188356f6debSmrg # -library=stlport4 depends on it. 8189356f6debSmrg case " $CXX $CXXFLAGS " in 8190356f6debSmrg *" -library=stlport4 "*) 8191356f6debSmrg solaris_use_stlport4=yes 8192356f6debSmrg ;; 8193356f6debSmrg esac 8194356f6debSmrg 8195356f6debSmrg if test "$solaris_use_stlport4" != yes; then 8196356f6debSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8197356f6debSmrg fi 8198356f6debSmrg ;; 8199356f6debSmrg esac 820098af18c5Smrg ;; 8201356f6debSmrg 820298af18c5Smrgsolaris*) 8203356f6debSmrg case $cc_basename in 820442941e3bSmrg CC* | sunCC*) 8205356f6debSmrg # The more standards-conforming stlport4 library is 8206356f6debSmrg # incompatible with the Cstd library. Avoid specifying 8207356f6debSmrg # it if it's in CXXFLAGS. Ignore libCrun as 8208356f6debSmrg # -library=stlport4 depends on it. 8209356f6debSmrg case " $CXX $CXXFLAGS " in 8210356f6debSmrg *" -library=stlport4 "*) 8211356f6debSmrg solaris_use_stlport4=yes 8212356f6debSmrg ;; 8213356f6debSmrg esac 821498af18c5Smrg 8215356f6debSmrg # Adding this requires a known-good setup of shared libraries for 8216356f6debSmrg # Sun compiler versions before 5.6, else PIC objects from an old 8217356f6debSmrg # archive will be linked into the output, leading to subtle bugs. 8218356f6debSmrg if test "$solaris_use_stlport4" != yes; then 8219356f6debSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8220356f6debSmrg fi 8221356f6debSmrg ;; 8222356f6debSmrg esac 822398af18c5Smrg ;; 822498af18c5Smrgesac 8225356f6debSmrg]) 822698af18c5Smrg 8227356f6debSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 8228356f6debSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 822998af18c5Smrgesac 8230356f6debSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 8231356f6debSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 8232356f6debSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8233356f6debSmrgfi 8234356f6debSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 8235356f6debSmrg [The directories searched by this compiler when creating a shared library]) 8236356f6debSmrg_LT_TAGDECL([], [predep_objects], [1], 8237356f6debSmrg [Dependencies to place before and after the objects being linked to 8238356f6debSmrg create a shared library]) 8239356f6debSmrg_LT_TAGDECL([], [postdep_objects], [1]) 8240356f6debSmrg_LT_TAGDECL([], [predeps], [1]) 8241356f6debSmrg_LT_TAGDECL([], [postdeps], [1]) 8242356f6debSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 8243356f6debSmrg [The library search path used internally by the compiler when linking 8244356f6debSmrg a shared library]) 8245356f6debSmrg])# _LT_SYS_HIDDEN_LIBDEPS 8246356f6debSmrg 8247356f6debSmrg 8248356f6debSmrg# _LT_LANG_F77_CONFIG([TAG]) 8249356f6debSmrg# -------------------------- 8250356f6debSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 8251356f6debSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8252356f6debSmrg# to write the compiler configuration to `libtool'. 8253356f6debSmrgm4_defun([_LT_LANG_F77_CONFIG], 825442941e3bSmrg[AC_LANG_PUSH(Fortran 77) 825542941e3bSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 825642941e3bSmrg _lt_disable_F77=yes 825742941e3bSmrgfi 825898af18c5Smrg 8259356f6debSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8260356f6debSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 8261356f6debSmrg_LT_TAGVAR(always_export_symbols, $1)=no 8262356f6debSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8263356f6debSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8264356f6debSmrg_LT_TAGVAR(hardcode_direct, $1)=no 8265356f6debSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8266356f6debSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8267356f6debSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 8268356f6debSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8269356f6debSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8270356f6debSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 8271356f6debSmrg_LT_TAGVAR(inherit_rpath, $1)=no 8272356f6debSmrg_LT_TAGVAR(module_cmds, $1)= 8273356f6debSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 8274356f6debSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8275356f6debSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 827642941e3bSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 827742941e3bSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8278356f6debSmrg_LT_TAGVAR(no_undefined_flag, $1)= 8279356f6debSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8280356f6debSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 828198af18c5Smrg 8282356f6debSmrg# Source file extension for f77 test sources. 8283356f6debSmrgac_ext=f 828498af18c5Smrg 8285356f6debSmrg# Object file extension for compiled f77 test sources. 8286356f6debSmrgobjext=o 8287356f6debSmrg_LT_TAGVAR(objext, $1)=$objext 8288356f6debSmrg 8289356f6debSmrg# No sense in running all these tests if we already determined that 8290356f6debSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 8291356f6debSmrg# are currently assumed to apply to all compilers on this platform, 8292356f6debSmrg# and will be corrupted by setting them based on a non-working compiler. 8293356f6debSmrgif test "$_lt_disable_F77" != yes; then 8294356f6debSmrg # Code to be used in simple compile tests 8295356f6debSmrg lt_simple_compile_test_code="\ 8296356f6debSmrg subroutine t 8297356f6debSmrg return 8298356f6debSmrg end 8299356f6debSmrg" 830098af18c5Smrg 8301356f6debSmrg # Code to be used in simple link tests 8302356f6debSmrg lt_simple_link_test_code="\ 8303356f6debSmrg program t 8304356f6debSmrg end 8305356f6debSmrg" 830698af18c5Smrg 8307356f6debSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8308356f6debSmrg _LT_TAG_COMPILER 830998af18c5Smrg 8310356f6debSmrg # save warnings/boilerplate of simple test code 8311356f6debSmrg _LT_COMPILER_BOILERPLATE 8312356f6debSmrg _LT_LINKER_BOILERPLATE 831398af18c5Smrg 8314356f6debSmrg # Allow CC to be a program name with arguments. 8315356f6debSmrg lt_save_CC="$CC" 8316356f6debSmrg lt_save_GCC=$GCC 831742941e3bSmrg lt_save_CFLAGS=$CFLAGS 8318356f6debSmrg CC=${F77-"f77"} 831942941e3bSmrg CFLAGS=$FFLAGS 8320356f6debSmrg compiler=$CC 8321356f6debSmrg _LT_TAGVAR(compiler, $1)=$CC 8322356f6debSmrg _LT_CC_BASENAME([$compiler]) 8323356f6debSmrg GCC=$G77 8324356f6debSmrg if test -n "$compiler"; then 8325356f6debSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8326356f6debSmrg AC_MSG_RESULT([$can_build_shared]) 832798af18c5Smrg 8328356f6debSmrg AC_MSG_CHECKING([whether to build shared libraries]) 8329356f6debSmrg test "$can_build_shared" = "no" && enable_shared=no 8330356f6debSmrg 8331356f6debSmrg # On AIX, shared libraries and static libraries use the same namespace, and 8332356f6debSmrg # are all built from PIC. 8333356f6debSmrg case $host_os in 8334356f6debSmrg aix3*) 8335356f6debSmrg test "$enable_shared" = yes && enable_static=no 8336356f6debSmrg if test -n "$RANLIB"; then 8337356f6debSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8338356f6debSmrg postinstall_cmds='$RANLIB $lib' 8339356f6debSmrg fi 8340356f6debSmrg ;; 8341356f6debSmrg aix[[4-9]]*) 8342356f6debSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8343356f6debSmrg test "$enable_shared" = yes && enable_static=no 834498af18c5Smrg fi 8345356f6debSmrg ;; 8346356f6debSmrg esac 8347356f6debSmrg AC_MSG_RESULT([$enable_shared]) 8348356f6debSmrg 8349356f6debSmrg AC_MSG_CHECKING([whether to build static libraries]) 8350356f6debSmrg # Make sure either enable_shared or enable_static is yes. 8351356f6debSmrg test "$enable_shared" = yes || enable_static=yes 8352356f6debSmrg AC_MSG_RESULT([$enable_static]) 8353356f6debSmrg 8354356f6debSmrg _LT_TAGVAR(GCC, $1)="$G77" 8355356f6debSmrg _LT_TAGVAR(LD, $1)="$LD" 8356356f6debSmrg 8357356f6debSmrg ## CAVEAT EMPTOR: 8358356f6debSmrg ## There is no encapsulation within the following macros, do not change 8359356f6debSmrg ## the running order or otherwise move them around unless you know exactly 8360356f6debSmrg ## what you are doing... 8361356f6debSmrg _LT_COMPILER_PIC($1) 8362356f6debSmrg _LT_COMPILER_C_O($1) 8363356f6debSmrg _LT_COMPILER_FILE_LOCKS($1) 8364356f6debSmrg _LT_LINKER_SHLIBS($1) 8365356f6debSmrg _LT_SYS_DYNAMIC_LINKER($1) 8366356f6debSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8367356f6debSmrg 8368356f6debSmrg _LT_CONFIG($1) 8369356f6debSmrg fi # test -n "$compiler" 8370356f6debSmrg 8371356f6debSmrg GCC=$lt_save_GCC 8372356f6debSmrg CC="$lt_save_CC" 837342941e3bSmrg CFLAGS="$lt_save_CFLAGS" 8374356f6debSmrgfi # test "$_lt_disable_F77" != yes 837598af18c5Smrg 8376356f6debSmrgAC_LANG_POP 8377356f6debSmrg])# _LT_LANG_F77_CONFIG 8378356f6debSmrg 8379356f6debSmrg 8380356f6debSmrg# _LT_LANG_FC_CONFIG([TAG]) 8381356f6debSmrg# ------------------------- 8382356f6debSmrg# Ensure that the configuration variables for a Fortran compiler are 8383356f6debSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 8384356f6debSmrg# to write the compiler configuration to `libtool'. 8385356f6debSmrgm4_defun([_LT_LANG_FC_CONFIG], 838642941e3bSmrg[AC_LANG_PUSH(Fortran) 838742941e3bSmrg 838842941e3bSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 838942941e3bSmrg _lt_disable_FC=yes 839042941e3bSmrgfi 8391356f6debSmrg 8392356f6debSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8393356f6debSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 8394356f6debSmrg_LT_TAGVAR(always_export_symbols, $1)=no 8395356f6debSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8396356f6debSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8397356f6debSmrg_LT_TAGVAR(hardcode_direct, $1)=no 8398356f6debSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8399356f6debSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8400356f6debSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 8401356f6debSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8402356f6debSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8403356f6debSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 8404356f6debSmrg_LT_TAGVAR(inherit_rpath, $1)=no 8405356f6debSmrg_LT_TAGVAR(module_cmds, $1)= 8406356f6debSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 8407356f6debSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8408356f6debSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 840942941e3bSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 841042941e3bSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8411356f6debSmrg_LT_TAGVAR(no_undefined_flag, $1)= 8412356f6debSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8413356f6debSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8414356f6debSmrg 8415356f6debSmrg# Source file extension for fc test sources. 8416356f6debSmrgac_ext=${ac_fc_srcext-f} 8417356f6debSmrg 8418356f6debSmrg# Object file extension for compiled fc test sources. 8419356f6debSmrgobjext=o 8420356f6debSmrg_LT_TAGVAR(objext, $1)=$objext 8421356f6debSmrg 8422356f6debSmrg# No sense in running all these tests if we already determined that 8423356f6debSmrg# the FC compiler isn't working. Some variables (like enable_shared) 8424356f6debSmrg# are currently assumed to apply to all compilers on this platform, 8425356f6debSmrg# and will be corrupted by setting them based on a non-working compiler. 8426356f6debSmrgif test "$_lt_disable_FC" != yes; then 8427356f6debSmrg # Code to be used in simple compile tests 8428356f6debSmrg lt_simple_compile_test_code="\ 8429356f6debSmrg subroutine t 8430356f6debSmrg return 8431356f6debSmrg end 8432356f6debSmrg" 843398af18c5Smrg 8434356f6debSmrg # Code to be used in simple link tests 8435356f6debSmrg lt_simple_link_test_code="\ 8436356f6debSmrg program t 8437356f6debSmrg end 8438356f6debSmrg" 84396f03b1f6Smrg 8440356f6debSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8441356f6debSmrg _LT_TAG_COMPILER 84426f03b1f6Smrg 8443356f6debSmrg # save warnings/boilerplate of simple test code 8444356f6debSmrg _LT_COMPILER_BOILERPLATE 8445356f6debSmrg _LT_LINKER_BOILERPLATE 84466f03b1f6Smrg 8447356f6debSmrg # Allow CC to be a program name with arguments. 8448356f6debSmrg lt_save_CC="$CC" 8449356f6debSmrg lt_save_GCC=$GCC 845042941e3bSmrg lt_save_CFLAGS=$CFLAGS 8451356f6debSmrg CC=${FC-"f95"} 845242941e3bSmrg CFLAGS=$FCFLAGS 8453356f6debSmrg compiler=$CC 8454356f6debSmrg GCC=$ac_cv_fc_compiler_gnu 84556f03b1f6Smrg 8456356f6debSmrg _LT_TAGVAR(compiler, $1)=$CC 8457356f6debSmrg _LT_CC_BASENAME([$compiler]) 84586f03b1f6Smrg 8459356f6debSmrg if test -n "$compiler"; then 8460356f6debSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8461356f6debSmrg AC_MSG_RESULT([$can_build_shared]) 84626f03b1f6Smrg 8463356f6debSmrg AC_MSG_CHECKING([whether to build shared libraries]) 8464356f6debSmrg test "$can_build_shared" = "no" && enable_shared=no 84656f03b1f6Smrg 8466356f6debSmrg # On AIX, shared libraries and static libraries use the same namespace, and 8467356f6debSmrg # are all built from PIC. 8468356f6debSmrg case $host_os in 8469356f6debSmrg aix3*) 8470356f6debSmrg test "$enable_shared" = yes && enable_static=no 8471356f6debSmrg if test -n "$RANLIB"; then 8472356f6debSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8473356f6debSmrg postinstall_cmds='$RANLIB $lib' 8474356f6debSmrg fi 8475356f6debSmrg ;; 8476356f6debSmrg aix[[4-9]]*) 8477356f6debSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8478356f6debSmrg test "$enable_shared" = yes && enable_static=no 8479356f6debSmrg fi 8480356f6debSmrg ;; 8481356f6debSmrg esac 8482356f6debSmrg AC_MSG_RESULT([$enable_shared]) 8483356f6debSmrg 8484356f6debSmrg AC_MSG_CHECKING([whether to build static libraries]) 8485356f6debSmrg # Make sure either enable_shared or enable_static is yes. 8486356f6debSmrg test "$enable_shared" = yes || enable_static=yes 8487356f6debSmrg AC_MSG_RESULT([$enable_static]) 8488356f6debSmrg 8489356f6debSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 8490356f6debSmrg _LT_TAGVAR(LD, $1)="$LD" 8491356f6debSmrg 8492356f6debSmrg ## CAVEAT EMPTOR: 8493356f6debSmrg ## There is no encapsulation within the following macros, do not change 8494356f6debSmrg ## the running order or otherwise move them around unless you know exactly 8495356f6debSmrg ## what you are doing... 8496356f6debSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 8497356f6debSmrg _LT_COMPILER_PIC($1) 8498356f6debSmrg _LT_COMPILER_C_O($1) 8499356f6debSmrg _LT_COMPILER_FILE_LOCKS($1) 8500356f6debSmrg _LT_LINKER_SHLIBS($1) 8501356f6debSmrg _LT_SYS_DYNAMIC_LINKER($1) 8502356f6debSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8503356f6debSmrg 8504356f6debSmrg _LT_CONFIG($1) 8505356f6debSmrg fi # test -n "$compiler" 8506356f6debSmrg 8507356f6debSmrg GCC=$lt_save_GCC 850842941e3bSmrg CC=$lt_save_CC 850942941e3bSmrg CFLAGS=$lt_save_CFLAGS 8510356f6debSmrgfi # test "$_lt_disable_FC" != yes 85116f03b1f6Smrg 8512356f6debSmrgAC_LANG_POP 8513356f6debSmrg])# _LT_LANG_FC_CONFIG 85146f03b1f6Smrg 85156f03b1f6Smrg 8516356f6debSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 8517356f6debSmrg# -------------------------- 8518356f6debSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 8519356f6debSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8520356f6debSmrg# to write the compiler configuration to `libtool'. 8521356f6debSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 8522356f6debSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 8523356f6debSmrgAC_LANG_SAVE 85246f03b1f6Smrg 8525356f6debSmrg# Source file extension for Java test sources. 8526356f6debSmrgac_ext=java 85276f03b1f6Smrg 8528356f6debSmrg# Object file extension for compiled Java test sources. 8529356f6debSmrgobjext=o 8530356f6debSmrg_LT_TAGVAR(objext, $1)=$objext 85316f03b1f6Smrg 8532356f6debSmrg# Code to be used in simple compile tests 8533356f6debSmrglt_simple_compile_test_code="class foo {}" 85346f03b1f6Smrg 8535356f6debSmrg# Code to be used in simple link tests 8536356f6debSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 85376f03b1f6Smrg 8538356f6debSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8539356f6debSmrg_LT_TAG_COMPILER 8540356f6debSmrg 8541356f6debSmrg# save warnings/boilerplate of simple test code 8542356f6debSmrg_LT_COMPILER_BOILERPLATE 8543356f6debSmrg_LT_LINKER_BOILERPLATE 8544356f6debSmrg 8545356f6debSmrg# Allow CC to be a program name with arguments. 854642941e3bSmrglt_save_CC=$CC 854742941e3bSmrglt_save_CFLAGS=$CFLAGS 8548356f6debSmrglt_save_GCC=$GCC 8549356f6debSmrgGCC=yes 8550356f6debSmrgCC=${GCJ-"gcj"} 855142941e3bSmrgCFLAGS=$GCJFLAGS 8552356f6debSmrgcompiler=$CC 8553356f6debSmrg_LT_TAGVAR(compiler, $1)=$CC 8554356f6debSmrg_LT_TAGVAR(LD, $1)="$LD" 8555356f6debSmrg_LT_CC_BASENAME([$compiler]) 8556356f6debSmrg 8557356f6debSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 8558356f6debSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 85596f03b1f6Smrg 8560356f6debSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 856142941e3bSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 856242941e3bSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 85636f03b1f6Smrg 8564356f6debSmrgif test -n "$compiler"; then 8565356f6debSmrg _LT_COMPILER_NO_RTTI($1) 8566356f6debSmrg _LT_COMPILER_PIC($1) 8567356f6debSmrg _LT_COMPILER_C_O($1) 8568356f6debSmrg _LT_COMPILER_FILE_LOCKS($1) 8569356f6debSmrg _LT_LINKER_SHLIBS($1) 8570356f6debSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 85716f03b1f6Smrg 8572356f6debSmrg _LT_CONFIG($1) 8573356f6debSmrgfi 85746f03b1f6Smrg 8575356f6debSmrgAC_LANG_RESTORE 85766f03b1f6Smrg 8577356f6debSmrgGCC=$lt_save_GCC 857842941e3bSmrgCC=$lt_save_CC 857942941e3bSmrgCFLAGS=$lt_save_CFLAGS 8580356f6debSmrg])# _LT_LANG_GCJ_CONFIG 85816f03b1f6Smrg 85826f03b1f6Smrg 8583356f6debSmrg# _LT_LANG_RC_CONFIG([TAG]) 8584356f6debSmrg# ------------------------- 8585356f6debSmrg# Ensure that the configuration variables for the Windows resource compiler 8586356f6debSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8587356f6debSmrg# to write the compiler configuration to `libtool'. 8588356f6debSmrgm4_defun([_LT_LANG_RC_CONFIG], 8589356f6debSmrg[AC_REQUIRE([LT_PROG_RC])dnl 8590356f6debSmrgAC_LANG_SAVE 85916f03b1f6Smrg 8592356f6debSmrg# Source file extension for RC test sources. 8593356f6debSmrgac_ext=rc 85946f03b1f6Smrg 8595356f6debSmrg# Object file extension for compiled RC test sources. 8596356f6debSmrgobjext=o 8597356f6debSmrg_LT_TAGVAR(objext, $1)=$objext 85986f03b1f6Smrg 8599356f6debSmrg# Code to be used in simple compile tests 8600356f6debSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 86016f03b1f6Smrg 8602356f6debSmrg# Code to be used in simple link tests 8603356f6debSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 8604356f6debSmrg 8605356f6debSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8606356f6debSmrg_LT_TAG_COMPILER 8607356f6debSmrg 8608356f6debSmrg# save warnings/boilerplate of simple test code 8609356f6debSmrg_LT_COMPILER_BOILERPLATE 8610356f6debSmrg_LT_LINKER_BOILERPLATE 8611356f6debSmrg 8612356f6debSmrg# Allow CC to be a program name with arguments. 8613356f6debSmrglt_save_CC="$CC" 861442941e3bSmrglt_save_CFLAGS=$CFLAGS 8615356f6debSmrglt_save_GCC=$GCC 8616356f6debSmrgGCC= 8617356f6debSmrgCC=${RC-"windres"} 861842941e3bSmrgCFLAGS= 8619356f6debSmrgcompiler=$CC 8620356f6debSmrg_LT_TAGVAR(compiler, $1)=$CC 8621356f6debSmrg_LT_CC_BASENAME([$compiler]) 8622356f6debSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8623356f6debSmrg 8624356f6debSmrgif test -n "$compiler"; then 8625356f6debSmrg : 8626356f6debSmrg _LT_CONFIG($1) 862798af18c5Smrgfi 86286f03b1f6Smrg 8629356f6debSmrgGCC=$lt_save_GCC 8630356f6debSmrgAC_LANG_RESTORE 863142941e3bSmrgCC=$lt_save_CC 863242941e3bSmrgCFLAGS=$lt_save_CFLAGS 8633356f6debSmrg])# _LT_LANG_RC_CONFIG 8634356f6debSmrg 8635356f6debSmrg 8636356f6debSmrg# LT_PROG_GCJ 8637356f6debSmrg# ----------- 8638356f6debSmrgAC_DEFUN([LT_PROG_GCJ], 8639356f6debSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8640356f6debSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8641356f6debSmrg [AC_CHECK_TOOL(GCJ, gcj,) 8642356f6debSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 8643356f6debSmrg AC_SUBST(GCJFLAGS)])])[]dnl 864498af18c5Smrg]) 86456f03b1f6Smrg 8646356f6debSmrg# Old name: 8647356f6debSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8648356f6debSmrgdnl aclocal-1.4 backwards compatibility: 8649356f6debSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 86506f03b1f6Smrg 86516f03b1f6Smrg 8652356f6debSmrg# LT_PROG_RC 8653356f6debSmrg# ---------- 8654356f6debSmrgAC_DEFUN([LT_PROG_RC], 8655356f6debSmrg[AC_CHECK_TOOL(RC, windres,) 8656356f6debSmrg]) 86576f03b1f6Smrg 8658356f6debSmrg# Old name: 8659356f6debSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8660356f6debSmrgdnl aclocal-1.4 backwards compatibility: 8661356f6debSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 86626f03b1f6Smrg 86636f03b1f6Smrg 8664356f6debSmrg# _LT_DECL_EGREP 8665356f6debSmrg# -------------- 8666356f6debSmrg# If we don't have a new enough Autoconf to choose the best grep 8667356f6debSmrg# available, choose the one first in the user's PATH. 8668356f6debSmrgm4_defun([_LT_DECL_EGREP], 8669356f6debSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8670356f6debSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8671356f6debSmrgtest -z "$GREP" && GREP=grep 8672356f6debSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8673356f6debSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8674356f6debSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8675356f6debSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8676356f6debSmrgAC_SUBST([GREP]) 8677356f6debSmrg]) 86786f03b1f6Smrg 86796f03b1f6Smrg 8680356f6debSmrg# _LT_DECL_OBJDUMP 8681356f6debSmrg# -------------- 8682356f6debSmrg# If we don't have a new enough Autoconf to choose the best objdump 8683356f6debSmrg# available, choose the one first in the user's PATH. 8684356f6debSmrgm4_defun([_LT_DECL_OBJDUMP], 8685356f6debSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8686356f6debSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8687356f6debSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8688356f6debSmrgAC_SUBST([OBJDUMP]) 8689356f6debSmrg]) 86906f03b1f6Smrg 869142941e3bSmrg# _LT_DECL_DLLTOOL 869242941e3bSmrg# ---------------- 869342941e3bSmrg# Ensure DLLTOOL variable is set. 869442941e3bSmrgm4_defun([_LT_DECL_DLLTOOL], 869542941e3bSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 869642941e3bSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 869742941e3bSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 869842941e3bSmrgAC_SUBST([DLLTOOL]) 869942941e3bSmrg]) 87006f03b1f6Smrg 8701356f6debSmrg# _LT_DECL_SED 8702356f6debSmrg# ------------ 8703356f6debSmrg# Check for a fully-functional sed program, that truncates 8704356f6debSmrg# as few characters as possible. Prefer GNU sed if found. 8705356f6debSmrgm4_defun([_LT_DECL_SED], 8706356f6debSmrg[AC_PROG_SED 8707356f6debSmrgtest -z "$SED" && SED=sed 8708356f6debSmrgXsed="$SED -e 1s/^X//" 8709356f6debSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8710356f6debSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8711356f6debSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8712356f6debSmrg])# _LT_DECL_SED 8713356f6debSmrg 8714356f6debSmrgm4_ifndef([AC_PROG_SED], [ 8715356f6debSmrg# NOTE: This macro has been submitted for inclusion into # 8716356f6debSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8717356f6debSmrg# a released version of Autoconf we should remove this # 8718356f6debSmrg# macro and use it instead. # 8719356f6debSmrg 8720356f6debSmrgm4_defun([AC_PROG_SED], 8721356f6debSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8722356f6debSmrgAC_CACHE_VAL(lt_cv_path_SED, 8723356f6debSmrg[# Loop through the user's path and test for sed and gsed. 8724356f6debSmrg# Then use that list of sed's as ones to test for truncation. 8725356f6debSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8726356f6debSmrgfor as_dir in $PATH 8727356f6debSmrgdo 8728356f6debSmrg IFS=$as_save_IFS 8729356f6debSmrg test -z "$as_dir" && as_dir=. 8730356f6debSmrg for lt_ac_prog in sed gsed; do 8731356f6debSmrg for ac_exec_ext in '' $ac_executable_extensions; do 8732356f6debSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8733356f6debSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 873498af18c5Smrg fi 8735356f6debSmrg done 8736356f6debSmrg done 8737356f6debSmrgdone 8738356f6debSmrgIFS=$as_save_IFS 8739356f6debSmrglt_ac_max=0 8740356f6debSmrglt_ac_count=0 8741356f6debSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8742356f6debSmrg# along with /bin/sed that truncates output. 8743356f6debSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8744356f6debSmrg test ! -f $lt_ac_sed && continue 8745356f6debSmrg cat /dev/null > conftest.in 8746356f6debSmrg lt_ac_count=0 8747356f6debSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8748356f6debSmrg # Check for GNU sed and select it if it is found. 8749356f6debSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8750356f6debSmrg lt_cv_path_SED=$lt_ac_sed 8751356f6debSmrg break 8752356f6debSmrg fi 8753356f6debSmrg while true; do 8754356f6debSmrg cat conftest.in conftest.in >conftest.tmp 8755356f6debSmrg mv conftest.tmp conftest.in 8756356f6debSmrg cp conftest.in conftest.nl 8757356f6debSmrg echo >>conftest.nl 8758356f6debSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8759356f6debSmrg cmp -s conftest.out conftest.nl || break 8760356f6debSmrg # 10000 chars as input seems more than enough 8761356f6debSmrg test $lt_ac_count -gt 10 && break 8762356f6debSmrg lt_ac_count=`expr $lt_ac_count + 1` 8763356f6debSmrg if test $lt_ac_count -gt $lt_ac_max; then 8764356f6debSmrg lt_ac_max=$lt_ac_count 8765356f6debSmrg lt_cv_path_SED=$lt_ac_sed 8766356f6debSmrg fi 8767356f6debSmrg done 8768356f6debSmrgdone 8769356f6debSmrg]) 8770356f6debSmrgSED=$lt_cv_path_SED 8771356f6debSmrgAC_SUBST([SED]) 8772356f6debSmrgAC_MSG_RESULT([$SED]) 8773356f6debSmrg])#AC_PROG_SED 8774356f6debSmrg])#m4_ifndef 8775356f6debSmrg 8776356f6debSmrg# Old name: 8777356f6debSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8778356f6debSmrgdnl aclocal-1.4 backwards compatibility: 8779356f6debSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8780356f6debSmrg 8781356f6debSmrg 8782356f6debSmrg# _LT_CHECK_SHELL_FEATURES 8783356f6debSmrg# ------------------------ 8784356f6debSmrg# Find out whether the shell is Bourne or XSI compatible, 8785356f6debSmrg# or has some other useful features. 8786356f6debSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8787356f6debSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 8788356f6debSmrg# Try some XSI features 8789356f6debSmrgxsi_shell=no 8790356f6debSmrg( _lt_dummy="a/b/c" 879142941e3bSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 879242941e3bSmrg = c,a/b,b/c, \ 8793356f6debSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 8794356f6debSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 8795356f6debSmrg && xsi_shell=yes 8796356f6debSmrgAC_MSG_RESULT([$xsi_shell]) 8797356f6debSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8798356f6debSmrg 8799356f6debSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 8800356f6debSmrglt_shell_append=no 8801356f6debSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 8802356f6debSmrg >/dev/null 2>&1 \ 8803356f6debSmrg && lt_shell_append=yes 8804356f6debSmrgAC_MSG_RESULT([$lt_shell_append]) 8805356f6debSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8806356f6debSmrg 8807356f6debSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8808356f6debSmrg lt_unset=unset 8809356f6debSmrgelse 8810356f6debSmrg lt_unset=false 8811356f6debSmrgfi 8812356f6debSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8813356f6debSmrg 8814356f6debSmrg# test EBCDIC or ASCII 8815356f6debSmrgcase `echo X|tr X '\101'` in 8816356f6debSmrg A) # ASCII based system 8817356f6debSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8818356f6debSmrg lt_SP2NL='tr \040 \012' 8819356f6debSmrg lt_NL2SP='tr \015\012 \040\040' 8820356f6debSmrg ;; 8821356f6debSmrg *) # EBCDIC based system 8822356f6debSmrg lt_SP2NL='tr \100 \n' 8823356f6debSmrg lt_NL2SP='tr \r\n \100\100' 8824356f6debSmrg ;; 8825356f6debSmrgesac 8826356f6debSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8827356f6debSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8828356f6debSmrg])# _LT_CHECK_SHELL_FEATURES 88296f03b1f6Smrg 88306f03b1f6Smrg 883142941e3bSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 883242941e3bSmrg# ------------------------------------------------------ 883342941e3bSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 883442941e3bSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 883542941e3bSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 883642941e3bSmrg[dnl { 883742941e3bSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 883842941e3bSmrg$1 ()\ 883942941e3bSmrg{\ 884042941e3bSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 884142941e3bSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 884242941e3bSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 884342941e3bSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 884442941e3bSmrgtest 0 -eq $? || _lt_function_replace_fail=: 884542941e3bSmrg]) 88466f03b1f6Smrg 88476f03b1f6Smrg 884842941e3bSmrg# _LT_PROG_REPLACE_SHELLFNS 884942941e3bSmrg# ------------------------- 885042941e3bSmrg# Replace existing portable implementations of several shell functions with 885142941e3bSmrg# equivalent extended shell implementations where those features are available.. 885242941e3bSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 885342941e3bSmrg[if test x"$xsi_shell" = xyes; then 885442941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 885542941e3bSmrg case ${1} in 885642941e3bSmrg */*) func_dirname_result="${1%/*}${2}" ;; 885742941e3bSmrg * ) func_dirname_result="${3}" ;; 885842941e3bSmrg esac]) 885942941e3bSmrg 886042941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 886142941e3bSmrg func_basename_result="${1##*/}"]) 886242941e3bSmrg 886342941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 886442941e3bSmrg case ${1} in 886542941e3bSmrg */*) func_dirname_result="${1%/*}${2}" ;; 886642941e3bSmrg * ) func_dirname_result="${3}" ;; 886742941e3bSmrg esac 886842941e3bSmrg func_basename_result="${1##*/}"]) 88696f03b1f6Smrg 887042941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 887142941e3bSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 887242941e3bSmrg # positional parameters, so assign one to ordinary parameter first. 887342941e3bSmrg func_stripname_result=${3} 887442941e3bSmrg func_stripname_result=${func_stripname_result#"${1}"} 887542941e3bSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 88766f03b1f6Smrg 887742941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 887842941e3bSmrg func_split_long_opt_name=${1%%=*} 887942941e3bSmrg func_split_long_opt_arg=${1#*=}]) 88806f03b1f6Smrg 888142941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 888242941e3bSmrg func_split_short_opt_arg=${1#??} 888342941e3bSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 88846f03b1f6Smrg 888542941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 888642941e3bSmrg case ${1} in 888742941e3bSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 888842941e3bSmrg *) func_lo2o_result=${1} ;; 888942941e3bSmrg esac]) 88906f03b1f6Smrg 889142941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 8892356f6debSmrg 889342941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 88946f03b1f6Smrg 889542941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 889642941e3bSmrgfi 88976f03b1f6Smrg 889842941e3bSmrgif test x"$lt_shell_append" = xyes; then 889942941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 89006f03b1f6Smrg 890142941e3bSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 890242941e3bSmrg func_quote_for_eval "${2}" 890342941e3bSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 890442941e3bSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 89056f03b1f6Smrg 890642941e3bSmrg # Save a `func_append' function call where possible by direct use of '+=' 890742941e3bSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 890842941e3bSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 890942941e3bSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 891042941e3bSmrg test 0 -eq $? || _lt_function_replace_fail=: 891142941e3bSmrgelse 891242941e3bSmrg # Save a `func_append' function call even when '+=' is not available 891342941e3bSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 891442941e3bSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 891542941e3bSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 891642941e3bSmrg test 0 -eq $? || _lt_function_replace_fail=: 891742941e3bSmrgfi 89186f03b1f6Smrg 891942941e3bSmrgif test x"$_lt_function_replace_fail" = x":"; then 892042941e3bSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 892142941e3bSmrgfi 892242941e3bSmrg]) 89236f03b1f6Smrg 892442941e3bSmrg# _LT_PATH_CONVERSION_FUNCTIONS 892542941e3bSmrg# ----------------------------- 892642941e3bSmrg# Determine which file name conversion functions should be used by 892742941e3bSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 892842941e3bSmrg# for certain cross-compile configurations and native mingw. 892942941e3bSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 893042941e3bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 893142941e3bSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 893242941e3bSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 893342941e3bSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 893442941e3bSmrg[case $host in 893542941e3bSmrg *-*-mingw* ) 893642941e3bSmrg case $build in 893742941e3bSmrg *-*-mingw* ) # actually msys 893842941e3bSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 893942941e3bSmrg ;; 894042941e3bSmrg *-*-cygwin* ) 894142941e3bSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 894242941e3bSmrg ;; 894342941e3bSmrg * ) # otherwise, assume *nix 894442941e3bSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 894542941e3bSmrg ;; 894642941e3bSmrg esac 8947356f6debSmrg ;; 894842941e3bSmrg *-*-cygwin* ) 894942941e3bSmrg case $build in 895042941e3bSmrg *-*-mingw* ) # actually msys 895142941e3bSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 895242941e3bSmrg ;; 895342941e3bSmrg *-*-cygwin* ) 895442941e3bSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 895542941e3bSmrg ;; 895642941e3bSmrg * ) # otherwise, assume *nix 895742941e3bSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 895842941e3bSmrg ;; 895942941e3bSmrg esac 8960356f6debSmrg ;; 896142941e3bSmrg * ) # unhandled hosts (and "normal" native builds) 896242941e3bSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 896342941e3bSmrg ;; 896442941e3bSmrgesac 896542941e3bSmrg]) 896642941e3bSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 896742941e3bSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 896842941e3bSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 896942941e3bSmrg [0], [convert $build file names to $host format])dnl 897042941e3bSmrg 897142941e3bSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 897242941e3bSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 897342941e3bSmrg[#assume ordinary cross tools, or native build. 897442941e3bSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 897542941e3bSmrgcase $host in 897642941e3bSmrg *-*-mingw* ) 897742941e3bSmrg case $build in 897842941e3bSmrg *-*-mingw* ) # actually msys 897942941e3bSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 898042941e3bSmrg ;; 898142941e3bSmrg esac 898242941e3bSmrg ;; 898342941e3bSmrgesac 8984356f6debSmrg]) 898542941e3bSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 898642941e3bSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 898742941e3bSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 898842941e3bSmrg [0], [convert $build files to toolchain format])dnl 898942941e3bSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 89906f03b1f6Smrg 8991356f6debSmrg# Helper functions for option handling. -*- Autoconf -*- 8992356f6debSmrg# 899342941e3bSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 899442941e3bSmrg# Inc. 8995356f6debSmrg# Written by Gary V. Vaughan, 2004 8996356f6debSmrg# 8997356f6debSmrg# This file is free software; the Free Software Foundation gives 8998356f6debSmrg# unlimited permission to copy and/or distribute it, with or without 8999356f6debSmrg# modifications, as long as this notice is preserved. 90006f03b1f6Smrg 900142941e3bSmrg# serial 7 ltoptions.m4 90026f03b1f6Smrg 9003356f6debSmrg# This is to help aclocal find these macros, as it can't see m4_define. 9004356f6debSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9005356f6debSmrg 9006356f6debSmrg 9007356f6debSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9008356f6debSmrg# ------------------------------------------ 9009356f6debSmrgm4_define([_LT_MANGLE_OPTION], 9010356f6debSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9011356f6debSmrg 9012356f6debSmrg 9013356f6debSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9014356f6debSmrg# --------------------------------------- 9015356f6debSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9016356f6debSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9017356f6debSmrg# saved as a flag. 9018356f6debSmrgm4_define([_LT_SET_OPTION], 9019356f6debSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9020356f6debSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9021356f6debSmrg _LT_MANGLE_DEFUN([$1], [$2]), 9022356f6debSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9023356f6debSmrg]) 9024356f6debSmrg 9025356f6debSmrg 9026356f6debSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9027356f6debSmrg# ------------------------------------------------------------ 9028356f6debSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9029356f6debSmrgm4_define([_LT_IF_OPTION], 9030356f6debSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9031356f6debSmrg 9032356f6debSmrg 9033356f6debSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9034356f6debSmrg# ------------------------------------------------------- 9035356f6debSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9036356f6debSmrg# are set. 9037356f6debSmrgm4_define([_LT_UNLESS_OPTIONS], 9038356f6debSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9039356f6debSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9040356f6debSmrg [m4_define([$0_found])])])[]dnl 9041356f6debSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9042356f6debSmrg])[]dnl 9043356f6debSmrg]) 90446f03b1f6Smrg 90456f03b1f6Smrg 9046356f6debSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9047356f6debSmrg# ---------------------------------------- 9048356f6debSmrg# OPTION-LIST is a space-separated list of Libtool options associated 9049356f6debSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 9050356f6debSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9051356f6debSmrg# the unknown option and exit. 9052356f6debSmrgm4_defun([_LT_SET_OPTIONS], 9053356f6debSmrg[# Set options 9054356f6debSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9055356f6debSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 9056356f6debSmrg 9057356f6debSmrgm4_if([$1],[LT_INIT],[ 9058356f6debSmrg dnl 9059356f6debSmrg dnl Simply set some default values (i.e off) if boolean options were not 9060356f6debSmrg dnl specified: 9061356f6debSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 9062356f6debSmrg ]) 9063356f6debSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 9064356f6debSmrg ]) 9065356f6debSmrg dnl 9066356f6debSmrg dnl If no reference was made to various pairs of opposing options, then 9067356f6debSmrg dnl we run the default mode handler for the pair. For example, if neither 9068356f6debSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 9069356f6debSmrg dnl archives by default: 9070356f6debSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 9071356f6debSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 9072356f6debSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 9073356f6debSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 9074356f6debSmrg [_LT_ENABLE_FAST_INSTALL]) 9075356f6debSmrg ]) 9076356f6debSmrg])# _LT_SET_OPTIONS 90776f03b1f6Smrg 907898af18c5Smrg 907998af18c5Smrg 9080356f6debSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 9081356f6debSmrg# ----------------------------------------- 9082356f6debSmrgm4_define([_LT_MANGLE_DEFUN], 9083356f6debSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 90846f03b1f6Smrg 90856f03b1f6Smrg 9086356f6debSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 9087356f6debSmrg# ----------------------------------------------- 9088356f6debSmrgm4_define([LT_OPTION_DEFINE], 9089356f6debSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 9090356f6debSmrg])# LT_OPTION_DEFINE 90916f03b1f6Smrg 90926f03b1f6Smrg 9093356f6debSmrg# dlopen 9094356f6debSmrg# ------ 9095356f6debSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 9096356f6debSmrg]) 90976f03b1f6Smrg 9098356f6debSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 9099356f6debSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 9100356f6debSmrgAC_DIAGNOSE([obsolete], 9101356f6debSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9102356f6debSmrgput the `dlopen' option into LT_INIT's first parameter.]) 9103356f6debSmrg]) 91046f03b1f6Smrg 9105356f6debSmrgdnl aclocal-1.4 backwards compatibility: 9106356f6debSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 91076f03b1f6Smrg 91086f03b1f6Smrg 9109356f6debSmrg# win32-dll 9110356f6debSmrg# --------- 9111356f6debSmrg# Declare package support for building win32 dll's. 9112356f6debSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 9113356f6debSmrg[enable_win32_dll=yes 91146f03b1f6Smrg 9115356f6debSmrgcase $host in 911642941e3bSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 9117356f6debSmrg AC_CHECK_TOOL(AS, as, false) 9118356f6debSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 9119356f6debSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 9120356f6debSmrg ;; 9121356f6debSmrgesac 91226f03b1f6Smrg 9123356f6debSmrgtest -z "$AS" && AS=as 912442941e3bSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 91256f03b1f6Smrg 9126356f6debSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 912742941e3bSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 91286f03b1f6Smrg 9129356f6debSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 913042941e3bSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 9131356f6debSmrg])# win32-dll 91326f03b1f6Smrg 9133356f6debSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 9134356f6debSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 9135356f6debSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 9136356f6debSmrgAC_DIAGNOSE([obsolete], 9137356f6debSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 9138356f6debSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 9139356f6debSmrg]) 91406f03b1f6Smrg 9141356f6debSmrgdnl aclocal-1.4 backwards compatibility: 9142356f6debSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 914398af18c5Smrg 91446f03b1f6Smrg 9145356f6debSmrg# _LT_ENABLE_SHARED([DEFAULT]) 9146356f6debSmrg# ---------------------------- 9147356f6debSmrg# implement the --enable-shared flag, and supports the `shared' and 9148356f6debSmrg# `disable-shared' LT_INIT options. 9149356f6debSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9150356f6debSmrgm4_define([_LT_ENABLE_SHARED], 9151356f6debSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 9152356f6debSmrgAC_ARG_ENABLE([shared], 9153356f6debSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 9154356f6debSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 9155356f6debSmrg [p=${PACKAGE-default} 9156356f6debSmrg case $enableval in 9157356f6debSmrg yes) enable_shared=yes ;; 9158356f6debSmrg no) enable_shared=no ;; 9159356f6debSmrg *) 9160356f6debSmrg enable_shared=no 9161356f6debSmrg # Look at the argument we got. We use all the common list separators. 9162356f6debSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9163356f6debSmrg for pkg in $enableval; do 9164356f6debSmrg IFS="$lt_save_ifs" 9165356f6debSmrg if test "X$pkg" = "X$p"; then 9166356f6debSmrg enable_shared=yes 9167356f6debSmrg fi 9168356f6debSmrg done 9169356f6debSmrg IFS="$lt_save_ifs" 917098af18c5Smrg ;; 9171356f6debSmrg esac], 9172356f6debSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 91736f03b1f6Smrg 9174356f6debSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 9175356f6debSmrg [Whether or not to build shared libraries]) 9176356f6debSmrg])# _LT_ENABLE_SHARED 91776f03b1f6Smrg 9178356f6debSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 9179356f6debSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 91806f03b1f6Smrg 9181356f6debSmrg# Old names: 9182356f6debSmrgAC_DEFUN([AC_ENABLE_SHARED], 9183356f6debSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9184356f6debSmrg]) 91856f03b1f6Smrg 9186356f6debSmrgAC_DEFUN([AC_DISABLE_SHARED], 9187356f6debSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9188356f6debSmrg]) 91896f03b1f6Smrg 9190356f6debSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 9191356f6debSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9192356f6debSmrg 9193356f6debSmrgdnl aclocal-1.4 backwards compatibility: 9194356f6debSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 9195356f6debSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 91966f03b1f6Smrg 91976f03b1f6Smrg 91986f03b1f6Smrg 9199356f6debSmrg# _LT_ENABLE_STATIC([DEFAULT]) 9200356f6debSmrg# ---------------------------- 9201356f6debSmrg# implement the --enable-static flag, and support the `static' and 9202356f6debSmrg# `disable-static' LT_INIT options. 9203356f6debSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9204356f6debSmrgm4_define([_LT_ENABLE_STATIC], 9205356f6debSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 9206356f6debSmrgAC_ARG_ENABLE([static], 9207356f6debSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 9208356f6debSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 9209356f6debSmrg [p=${PACKAGE-default} 9210356f6debSmrg case $enableval in 9211356f6debSmrg yes) enable_static=yes ;; 9212356f6debSmrg no) enable_static=no ;; 921398af18c5Smrg *) 9214356f6debSmrg enable_static=no 9215356f6debSmrg # Look at the argument we got. We use all the common list separators. 9216356f6debSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9217356f6debSmrg for pkg in $enableval; do 9218356f6debSmrg IFS="$lt_save_ifs" 9219356f6debSmrg if test "X$pkg" = "X$p"; then 9220356f6debSmrg enable_static=yes 9221356f6debSmrg fi 9222356f6debSmrg done 9223356f6debSmrg IFS="$lt_save_ifs" 922498af18c5Smrg ;; 9225356f6debSmrg esac], 9226356f6debSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 92276f03b1f6Smrg 9228356f6debSmrg _LT_DECL([build_old_libs], [enable_static], [0], 9229356f6debSmrg [Whether or not to build static libraries]) 9230356f6debSmrg])# _LT_ENABLE_STATIC 92316f03b1f6Smrg 9232356f6debSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 9233356f6debSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 92346f03b1f6Smrg 9235356f6debSmrg# Old names: 9236356f6debSmrgAC_DEFUN([AC_ENABLE_STATIC], 9237356f6debSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 9238356f6debSmrg]) 92396f03b1f6Smrg 9240356f6debSmrgAC_DEFUN([AC_DISABLE_STATIC], 9241356f6debSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 9242356f6debSmrg]) 9243356f6debSmrg 9244356f6debSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 9245356f6debSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9246356f6debSmrg 9247356f6debSmrgdnl aclocal-1.4 backwards compatibility: 9248356f6debSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 9249356f6debSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 92506f03b1f6Smrg 92516f03b1f6Smrg 92526f03b1f6Smrg 9253356f6debSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9254356f6debSmrg# ---------------------------------- 9255356f6debSmrg# implement the --enable-fast-install flag, and support the `fast-install' 9256356f6debSmrg# and `disable-fast-install' LT_INIT options. 9257356f6debSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 9258356f6debSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 9259356f6debSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 9260356f6debSmrgAC_ARG_ENABLE([fast-install], 9261356f6debSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 9262356f6debSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 9263356f6debSmrg [p=${PACKAGE-default} 9264356f6debSmrg case $enableval in 9265356f6debSmrg yes) enable_fast_install=yes ;; 9266356f6debSmrg no) enable_fast_install=no ;; 9267356f6debSmrg *) 9268356f6debSmrg enable_fast_install=no 9269356f6debSmrg # Look at the argument we got. We use all the common list separators. 9270356f6debSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9271356f6debSmrg for pkg in $enableval; do 9272356f6debSmrg IFS="$lt_save_ifs" 9273356f6debSmrg if test "X$pkg" = "X$p"; then 9274356f6debSmrg enable_fast_install=yes 9275356f6debSmrg fi 9276356f6debSmrg done 9277356f6debSmrg IFS="$lt_save_ifs" 9278356f6debSmrg ;; 9279356f6debSmrg esac], 9280356f6debSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9281356f6debSmrg 9282356f6debSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 9283356f6debSmrg [Whether or not to optimize for fast installation])dnl 9284356f6debSmrg])# _LT_ENABLE_FAST_INSTALL 9285356f6debSmrg 9286356f6debSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 9287356f6debSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 92886f03b1f6Smrg 9289356f6debSmrg# Old names: 9290356f6debSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 9291356f6debSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 9292356f6debSmrgAC_DIAGNOSE([obsolete], 9293356f6debSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9294356f6debSmrgthe `fast-install' option into LT_INIT's first parameter.]) 92956f03b1f6Smrg]) 92966f03b1f6Smrg 9297356f6debSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 9298356f6debSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 9299356f6debSmrgAC_DIAGNOSE([obsolete], 9300356f6debSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 9301356f6debSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 930298af18c5Smrg]) 93036f03b1f6Smrg 9304356f6debSmrgdnl aclocal-1.4 backwards compatibility: 9305356f6debSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 9306356f6debSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 93076f03b1f6Smrg 93086f03b1f6Smrg 9309356f6debSmrg# _LT_WITH_PIC([MODE]) 9310356f6debSmrg# -------------------- 9311356f6debSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 9312356f6debSmrg# LT_INIT options. 9313356f6debSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 9314356f6debSmrgm4_define([_LT_WITH_PIC], 9315356f6debSmrg[AC_ARG_WITH([pic], 9316356f6debSmrg [AS_HELP_STRING([--with-pic], 9317356f6debSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9318356f6debSmrg [pic_mode="$withval"], 9319356f6debSmrg [pic_mode=default]) 93206f03b1f6Smrg 9321356f6debSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 932298af18c5Smrg 9323356f6debSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 9324356f6debSmrg])# _LT_WITH_PIC 9325356f6debSmrg 932642941e3bSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 932742941e3bSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 932842941e3bSmrg 932942941e3bSmrg# Old name: 933042941e3bSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 933142941e3bSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 933242941e3bSmrgAC_DIAGNOSE([obsolete], 933342941e3bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 933442941e3bSmrgput the `pic-only' option into LT_INIT's first parameter.]) 933542941e3bSmrg]) 933642941e3bSmrg 933742941e3bSmrgdnl aclocal-1.4 backwards compatibility: 933842941e3bSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 933942941e3bSmrg 934042941e3bSmrg 934142941e3bSmrgm4_define([_LTDL_MODE], []) 934242941e3bSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 934342941e3bSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 934442941e3bSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 934542941e3bSmrg [m4_define([_LTDL_MODE], [recursive])]) 934642941e3bSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 934742941e3bSmrg [m4_define([_LTDL_MODE], [subproject])]) 934842941e3bSmrg 934942941e3bSmrgm4_define([_LTDL_TYPE], []) 935042941e3bSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 935142941e3bSmrg [m4_define([_LTDL_TYPE], [installable])]) 935242941e3bSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 935342941e3bSmrg [m4_define([_LTDL_TYPE], [convenience])]) 935442941e3bSmrg 935542941e3bSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 935642941e3bSmrg# 935742941e3bSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 935842941e3bSmrg# Written by Gary V. Vaughan, 2004 935942941e3bSmrg# 936042941e3bSmrg# This file is free software; the Free Software Foundation gives 936142941e3bSmrg# unlimited permission to copy and/or distribute it, with or without 936242941e3bSmrg# modifications, as long as this notice is preserved. 936342941e3bSmrg 936442941e3bSmrg# serial 6 ltsugar.m4 936542941e3bSmrg 936642941e3bSmrg# This is to help aclocal find these macros, as it can't see m4_define. 936742941e3bSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 936842941e3bSmrg 936942941e3bSmrg 937042941e3bSmrg# lt_join(SEP, ARG1, [ARG2...]) 937142941e3bSmrg# ----------------------------- 937242941e3bSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 937342941e3bSmrg# associated separator. 937442941e3bSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 937542941e3bSmrg# versions in m4sugar had bugs. 937642941e3bSmrgm4_define([lt_join], 937742941e3bSmrg[m4_if([$#], [1], [], 937842941e3bSmrg [$#], [2], [[$2]], 937942941e3bSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 938042941e3bSmrgm4_define([_lt_join], 938142941e3bSmrg[m4_if([$#$2], [2], [], 938242941e3bSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 938342941e3bSmrg 938442941e3bSmrg 938542941e3bSmrg# lt_car(LIST) 938642941e3bSmrg# lt_cdr(LIST) 938742941e3bSmrg# ------------ 938842941e3bSmrg# Manipulate m4 lists. 938942941e3bSmrg# These macros are necessary as long as will still need to support 939042941e3bSmrg# Autoconf-2.59 which quotes differently. 939142941e3bSmrgm4_define([lt_car], [[$1]]) 939242941e3bSmrgm4_define([lt_cdr], 939342941e3bSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 939442941e3bSmrg [$#], 1, [], 939542941e3bSmrg [m4_dquote(m4_shift($@))])]) 939642941e3bSmrgm4_define([lt_unquote], $1) 939742941e3bSmrg 939842941e3bSmrg 939942941e3bSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 940042941e3bSmrg# ------------------------------------------ 940142941e3bSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 940242941e3bSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 940342941e3bSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 940442941e3bSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 940542941e3bSmrg# than defined and empty). 940642941e3bSmrg# 940742941e3bSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 940842941e3bSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 940942941e3bSmrgm4_define([lt_append], 941042941e3bSmrg[m4_define([$1], 941142941e3bSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 941242941e3bSmrg 941342941e3bSmrg 941442941e3bSmrg 941542941e3bSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 941642941e3bSmrg# ---------------------------------------------------------- 941742941e3bSmrg# Produce a SEP delimited list of all paired combinations of elements of 941842941e3bSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 941942941e3bSmrg# has the form PREFIXmINFIXSUFFIXn. 942042941e3bSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 942142941e3bSmrgm4_define([lt_combine], 942242941e3bSmrg[m4_if(m4_eval([$# > 3]), [1], 942342941e3bSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 942442941e3bSmrg[[m4_foreach([_Lt_prefix], [$2], 942542941e3bSmrg [m4_foreach([_Lt_suffix], 942642941e3bSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 942742941e3bSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 942842941e3bSmrg 942942941e3bSmrg 943042941e3bSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 943142941e3bSmrg# ----------------------------------------------------------------------- 943242941e3bSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 943342941e3bSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 943442941e3bSmrgm4_define([lt_if_append_uniq], 943542941e3bSmrg[m4_ifdef([$1], 943642941e3bSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 943742941e3bSmrg [lt_append([$1], [$2], [$3])$4], 943842941e3bSmrg [$5])], 943942941e3bSmrg [lt_append([$1], [$2], [$3])$4])]) 944042941e3bSmrg 944142941e3bSmrg 944242941e3bSmrg# lt_dict_add(DICT, KEY, VALUE) 944342941e3bSmrg# ----------------------------- 944442941e3bSmrgm4_define([lt_dict_add], 944542941e3bSmrg[m4_define([$1($2)], [$3])]) 944642941e3bSmrg 944742941e3bSmrg 944842941e3bSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 944942941e3bSmrg# -------------------------------------------- 945042941e3bSmrgm4_define([lt_dict_add_subkey], 945142941e3bSmrg[m4_define([$1($2:$3)], [$4])]) 945242941e3bSmrg 945342941e3bSmrg 945442941e3bSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 945542941e3bSmrg# ---------------------------------- 945642941e3bSmrgm4_define([lt_dict_fetch], 945742941e3bSmrg[m4_ifval([$3], 945842941e3bSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 945942941e3bSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 946042941e3bSmrg 946142941e3bSmrg 946242941e3bSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 946342941e3bSmrg# ----------------------------------------------------------------- 946442941e3bSmrgm4_define([lt_if_dict_fetch], 946542941e3bSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 946642941e3bSmrg [$5], 946742941e3bSmrg [$6])]) 946842941e3bSmrg 946942941e3bSmrg 947042941e3bSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 947142941e3bSmrg# -------------------------------------------------------------- 947242941e3bSmrgm4_define([lt_dict_filter], 947342941e3bSmrg[m4_if([$5], [], [], 947442941e3bSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 947542941e3bSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 947642941e3bSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 947742941e3bSmrg]) 947842941e3bSmrg 947942941e3bSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 948042941e3bSmrg# 948142941e3bSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 948242941e3bSmrg# Written by Scott James Remnant, 2004 948342941e3bSmrg# 948442941e3bSmrg# This file is free software; the Free Software Foundation gives 948542941e3bSmrg# unlimited permission to copy and/or distribute it, with or without 948642941e3bSmrg# modifications, as long as this notice is preserved. 948742941e3bSmrg 948842941e3bSmrg# @configure_input@ 948942941e3bSmrg 949042941e3bSmrg# serial 3293 ltversion.m4 949142941e3bSmrg# This file is part of GNU Libtool 949242941e3bSmrg 949342941e3bSmrgm4_define([LT_PACKAGE_VERSION], [2.4]) 949442941e3bSmrgm4_define([LT_PACKAGE_REVISION], [1.3293]) 949542941e3bSmrg 949642941e3bSmrgAC_DEFUN([LTVERSION_VERSION], 949742941e3bSmrg[macro_version='2.4' 949842941e3bSmrgmacro_revision='1.3293' 949942941e3bSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 950042941e3bSmrg_LT_DECL(, macro_revision, 0) 950142941e3bSmrg]) 950242941e3bSmrg 950342941e3bSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 950442941e3bSmrg# 950542941e3bSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 950642941e3bSmrg# Written by Scott James Remnant, 2004. 950742941e3bSmrg# 950842941e3bSmrg# This file is free software; the Free Software Foundation gives 950942941e3bSmrg# unlimited permission to copy and/or distribute it, with or without 951042941e3bSmrg# modifications, as long as this notice is preserved. 951142941e3bSmrg 951242941e3bSmrg# serial 5 lt~obsolete.m4 951342941e3bSmrg 951442941e3bSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 951542941e3bSmrg# 951642941e3bSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 951742941e3bSmrg# which have later been changed to m4_define as they aren't part of the 951842941e3bSmrg# exported API, or moved to Autoconf or Automake where they belong. 951942941e3bSmrg# 952042941e3bSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 952142941e3bSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 952242941e3bSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 952342941e3bSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 952442941e3bSmrg# and doesn't know about Autoconf macros at all.) 952542941e3bSmrg# 952642941e3bSmrg# So we provide this file, which has a silly filename so it's always 952742941e3bSmrg# included after everything else. This provides aclocal with the 952842941e3bSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 952942941e3bSmrg# because those macros already exist, or will be overwritten later. 953042941e3bSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 953142941e3bSmrg# 953242941e3bSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 953342941e3bSmrg# Yes, that means every name once taken will need to remain here until 953442941e3bSmrg# we give up compatibility with versions before 1.7, at which point 953542941e3bSmrg# we need to keep only those names which we still refer to. 953642941e3bSmrg 953742941e3bSmrg# This is to help aclocal find these macros, as it can't see m4_define. 953842941e3bSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 953942941e3bSmrg 954042941e3bSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 954142941e3bSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 954242941e3bSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 954342941e3bSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 954442941e3bSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 954542941e3bSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 954642941e3bSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 954742941e3bSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 954842941e3bSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 954942941e3bSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 955042941e3bSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 955142941e3bSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 955242941e3bSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 955342941e3bSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 955442941e3bSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 955542941e3bSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 955642941e3bSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 955742941e3bSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 955842941e3bSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 955942941e3bSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 956042941e3bSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 956142941e3bSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 956242941e3bSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 956342941e3bSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 956442941e3bSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 956542941e3bSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 956642941e3bSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 956742941e3bSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 956842941e3bSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 956942941e3bSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 957042941e3bSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 957142941e3bSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 957242941e3bSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 957342941e3bSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 957442941e3bSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 957542941e3bSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 957642941e3bSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 957742941e3bSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 957842941e3bSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 957942941e3bSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 958042941e3bSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 958142941e3bSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 958242941e3bSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 958342941e3bSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 958442941e3bSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 958542941e3bSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 958642941e3bSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 958742941e3bSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 958842941e3bSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 958942941e3bSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 959042941e3bSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 959142941e3bSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 959242941e3bSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 959342941e3bSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 959442941e3bSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 959542941e3bSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 959642941e3bSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 959742941e3bSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 959842941e3bSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 959942941e3bSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 960042941e3bSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 960142941e3bSmrg 960242941e3bSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 960342941e3bSmrgdnl 960442941e3bSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 960542941e3bSmrgdnl 960642941e3bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 960742941e3bSmrgdnl copy of this software and associated documentation files (the "Software"), 960842941e3bSmrgdnl to deal in the Software without restriction, including without limitation 960942941e3bSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 961042941e3bSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 961142941e3bSmrgdnl Software is furnished to do so, subject to the following conditions: 961242941e3bSmrgdnl 961342941e3bSmrgdnl The above copyright notice and this permission notice (including the next 961442941e3bSmrgdnl paragraph) shall be included in all copies or substantial portions of the 961542941e3bSmrgdnl Software. 961642941e3bSmrgdnl 961742941e3bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 961842941e3bSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 961942941e3bSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 962042941e3bSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 962142941e3bSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 962242941e3bSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 962342941e3bSmrgdnl DEALINGS IN THE SOFTWARE. 962442941e3bSmrg 962542941e3bSmrg# XORG_MACROS_VERSION(required-version) 962642941e3bSmrg# ------------------------------------- 962742941e3bSmrg# Minimum version: 1.1.0 962842941e3bSmrg# 962942941e3bSmrg# If you're using a macro added in Version 1.1 or newer, include this in 963042941e3bSmrg# your configure.ac with the minimum required version, such as: 963142941e3bSmrg# XORG_MACROS_VERSION(1.1) 963242941e3bSmrg# 963342941e3bSmrg# To ensure that this macro is defined, also add: 963442941e3bSmrg# m4_ifndef([XORG_MACROS_VERSION], 963542941e3bSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 963642941e3bSmrg# 963742941e3bSmrg# 963842941e3bSmrg# See the "minimum version" comment for each macro you use to see what 963942941e3bSmrg# version you require. 964042941e3bSmrgm4_defun([XORG_MACROS_VERSION],[ 964142941e3bSmrgm4_define([vers_have], [1.16.2]) 964242941e3bSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 964342941e3bSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 964442941e3bSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 964542941e3bSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 964642941e3bSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 964742941e3bSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 964842941e3bSmrgm4_undefine([vers_have]) 964942941e3bSmrgm4_undefine([maj_have]) 965042941e3bSmrgm4_undefine([maj_needed]) 965142941e3bSmrg]) # XORG_MACROS_VERSION 965242941e3bSmrg 965342941e3bSmrg# XORG_PROG_RAWCPP() 965442941e3bSmrg# ------------------ 965542941e3bSmrg# Minimum version: 1.0.0 965642941e3bSmrg# 965742941e3bSmrg# Find cpp program and necessary flags for use in pre-processing text files 965842941e3bSmrg# such as man pages and config files 965942941e3bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 966042941e3bSmrgAC_REQUIRE([AC_PROG_CPP]) 966142941e3bSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 966242941e3bSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 966342941e3bSmrg 966442941e3bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 966542941e3bSmrg# which is not the best choice for supporting other OS'es, but covers most 966642941e3bSmrg# of the ones we need for now. 966742941e3bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 966842941e3bSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 966942941e3bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 967042941e3bSmrg AC_MSG_RESULT([no]) 967142941e3bSmrgelse 967242941e3bSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 967342941e3bSmrg RAWCPPFLAGS=-undef 967442941e3bSmrg AC_MSG_RESULT([yes]) 967542941e3bSmrg # under Cygwin unix is still defined even with -undef 967642941e3bSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 967742941e3bSmrg RAWCPPFLAGS="-undef -ansi" 967842941e3bSmrg AC_MSG_RESULT([yes, with -ansi]) 967942941e3bSmrg else 968042941e3bSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 968142941e3bSmrg fi 968242941e3bSmrgfi 968342941e3bSmrgrm -f conftest.$ac_ext 968442941e3bSmrg 968542941e3bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 968642941e3bSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 968742941e3bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 968842941e3bSmrg AC_MSG_RESULT([no]) 968942941e3bSmrgelse 969042941e3bSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 969142941e3bSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 969242941e3bSmrg AC_MSG_RESULT([yes]) 969342941e3bSmrg else 969442941e3bSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 969542941e3bSmrg fi 969642941e3bSmrgfi 969742941e3bSmrgrm -f conftest.$ac_ext 969842941e3bSmrgAC_SUBST(RAWCPPFLAGS) 969942941e3bSmrg]) # XORG_PROG_RAWCPP 970042941e3bSmrg 970142941e3bSmrg# XORG_MANPAGE_SECTIONS() 970242941e3bSmrg# ----------------------- 970342941e3bSmrg# Minimum version: 1.0.0 970442941e3bSmrg# 970542941e3bSmrg# Determine which sections man pages go in for the different man page types 970642941e3bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 970742941e3bSmrg# Not sure if there's any better way than just hardcoding by OS name. 970842941e3bSmrg# Override default settings by setting environment variables 970942941e3bSmrg# Added MAN_SUBSTS in version 1.8 971042941e3bSmrg# Added AC_PROG_SED in version 1.8 971142941e3bSmrg 971242941e3bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 971342941e3bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 971442941e3bSmrgAC_REQUIRE([AC_PROG_SED]) 971542941e3bSmrg 971642941e3bSmrgif test x$APP_MAN_SUFFIX = x ; then 971742941e3bSmrg APP_MAN_SUFFIX=1 971842941e3bSmrgfi 971942941e3bSmrgif test x$APP_MAN_DIR = x ; then 972042941e3bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 972142941e3bSmrgfi 972242941e3bSmrg 972342941e3bSmrgif test x$LIB_MAN_SUFFIX = x ; then 972442941e3bSmrg LIB_MAN_SUFFIX=3 972542941e3bSmrgfi 972642941e3bSmrgif test x$LIB_MAN_DIR = x ; then 972742941e3bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 972842941e3bSmrgfi 972942941e3bSmrg 973042941e3bSmrgif test x$FILE_MAN_SUFFIX = x ; then 973142941e3bSmrg case $host_os in 973242941e3bSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 973342941e3bSmrg *) FILE_MAN_SUFFIX=5 ;; 973442941e3bSmrg esac 973542941e3bSmrgfi 973642941e3bSmrgif test x$FILE_MAN_DIR = x ; then 973742941e3bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 973842941e3bSmrgfi 973942941e3bSmrg 974042941e3bSmrgif test x$MISC_MAN_SUFFIX = x ; then 974142941e3bSmrg case $host_os in 974242941e3bSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 974342941e3bSmrg *) MISC_MAN_SUFFIX=7 ;; 974442941e3bSmrg esac 974542941e3bSmrgfi 974642941e3bSmrgif test x$MISC_MAN_DIR = x ; then 974742941e3bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 974842941e3bSmrgfi 974942941e3bSmrg 975042941e3bSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 975142941e3bSmrg case $host_os in 975242941e3bSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 975342941e3bSmrg *) DRIVER_MAN_SUFFIX=4 ;; 975442941e3bSmrg esac 975542941e3bSmrgfi 975642941e3bSmrgif test x$DRIVER_MAN_DIR = x ; then 975742941e3bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 975842941e3bSmrgfi 975942941e3bSmrg 976042941e3bSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 976142941e3bSmrg case $host_os in 976242941e3bSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 976342941e3bSmrg *) ADMIN_MAN_SUFFIX=8 ;; 976442941e3bSmrg esac 976542941e3bSmrgfi 976642941e3bSmrgif test x$ADMIN_MAN_DIR = x ; then 976742941e3bSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 976842941e3bSmrgfi 976942941e3bSmrg 977042941e3bSmrg 977142941e3bSmrgAC_SUBST([APP_MAN_SUFFIX]) 977242941e3bSmrgAC_SUBST([LIB_MAN_SUFFIX]) 977342941e3bSmrgAC_SUBST([FILE_MAN_SUFFIX]) 977442941e3bSmrgAC_SUBST([MISC_MAN_SUFFIX]) 977542941e3bSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 977642941e3bSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 977742941e3bSmrgAC_SUBST([APP_MAN_DIR]) 977842941e3bSmrgAC_SUBST([LIB_MAN_DIR]) 977942941e3bSmrgAC_SUBST([FILE_MAN_DIR]) 978042941e3bSmrgAC_SUBST([MISC_MAN_DIR]) 978142941e3bSmrgAC_SUBST([DRIVER_MAN_DIR]) 978242941e3bSmrgAC_SUBST([ADMIN_MAN_DIR]) 978342941e3bSmrg 978442941e3bSmrgXORG_MAN_PAGE="X Version 11" 978542941e3bSmrgAC_SUBST([XORG_MAN_PAGE]) 978642941e3bSmrgMAN_SUBSTS="\ 978742941e3bSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 978842941e3bSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 978942941e3bSmrg -e 's|__xservername__|Xorg|g' \ 979042941e3bSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 979142941e3bSmrg -e 's|__projectroot__|\$(prefix)|g' \ 979242941e3bSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 979342941e3bSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 979442941e3bSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 979542941e3bSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 979642941e3bSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 979742941e3bSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 979842941e3bSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 979942941e3bSmrgAC_SUBST([MAN_SUBSTS]) 980042941e3bSmrg 980142941e3bSmrg]) # XORG_MANPAGE_SECTIONS 980242941e3bSmrg 980342941e3bSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 980442941e3bSmrg# ------------------------ 980542941e3bSmrg# Minimum version: 1.7.0 980642941e3bSmrg# 980742941e3bSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 980842941e3bSmrg# provided by xorg-sgml-doctools, if installed. 980942941e3bSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 981042941e3bSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 981142941e3bSmrgXORG_SGML_PATH= 981242941e3bSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 981342941e3bSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 981442941e3bSmrg [m4_ifval([$1],[:], 981542941e3bSmrg [if test x"$cross_compiling" != x"yes" ; then 981642941e3bSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 981742941e3bSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 981842941e3bSmrg fi]) 981942941e3bSmrg ]) 982042941e3bSmrg 982142941e3bSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 982242941e3bSmrg# the path and the name of the doc stylesheet 982342941e3bSmrgif test "x$XORG_SGML_PATH" != "x" ; then 982442941e3bSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 982542941e3bSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 982642941e3bSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 982742941e3bSmrgelse 982842941e3bSmrg AC_MSG_RESULT([no]) 982942941e3bSmrgfi 983042941e3bSmrg 983142941e3bSmrgAC_SUBST(XORG_SGML_PATH) 983242941e3bSmrgAC_SUBST(STYLESHEET_SRCDIR) 983342941e3bSmrgAC_SUBST(XSL_STYLESHEET) 983442941e3bSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 983542941e3bSmrg]) # XORG_CHECK_SGML_DOCTOOLS 983642941e3bSmrg 983742941e3bSmrg# XORG_CHECK_LINUXDOC 983842941e3bSmrg# ------------------- 983942941e3bSmrg# Minimum version: 1.0.0 984042941e3bSmrg# 984142941e3bSmrg# Defines the variable MAKE_TEXT if the necessary tools and 984242941e3bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 984342941e3bSmrg# Whether or not the necessary tools and files are found can be checked 984442941e3bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 984542941e3bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 984642941e3bSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 984742941e3bSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 984842941e3bSmrg 984942941e3bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 985042941e3bSmrg 985142941e3bSmrgAC_MSG_CHECKING([whether to build documentation]) 985242941e3bSmrg 985342941e3bSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 985442941e3bSmrg BUILDDOC=yes 985542941e3bSmrgelse 985642941e3bSmrg BUILDDOC=no 985742941e3bSmrgfi 985842941e3bSmrg 985942941e3bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 986042941e3bSmrg 986142941e3bSmrgAC_MSG_RESULT([$BUILDDOC]) 986242941e3bSmrg 986342941e3bSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 986442941e3bSmrg 986542941e3bSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 986642941e3bSmrg BUILDPDFDOC=yes 986742941e3bSmrgelse 986842941e3bSmrg BUILDPDFDOC=no 986942941e3bSmrgfi 987042941e3bSmrg 987142941e3bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 987242941e3bSmrg 987342941e3bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 987442941e3bSmrg 987542941e3bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 987642941e3bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 987742941e3bSmrgMAKE_PDF="$PS2PDF" 987842941e3bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 987942941e3bSmrg 988042941e3bSmrgAC_SUBST(MAKE_TEXT) 988142941e3bSmrgAC_SUBST(MAKE_PS) 988242941e3bSmrgAC_SUBST(MAKE_PDF) 988342941e3bSmrgAC_SUBST(MAKE_HTML) 988442941e3bSmrg]) # XORG_CHECK_LINUXDOC 988542941e3bSmrg 988642941e3bSmrg# XORG_CHECK_DOCBOOK 988742941e3bSmrg# ------------------- 988842941e3bSmrg# Minimum version: 1.0.0 988942941e3bSmrg# 989042941e3bSmrg# Checks for the ability to build output formats from SGML DocBook source. 989142941e3bSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 989242941e3bSmrg# indicates whether the necessary tools and files are found and, if set, 989342941e3bSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 989442941e3bSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 989542941e3bSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 989642941e3bSmrg 989742941e3bSmrgBUILDTXTDOC=no 989842941e3bSmrgBUILDPDFDOC=no 989942941e3bSmrgBUILDPSDOC=no 990042941e3bSmrgBUILDHTMLDOC=no 990142941e3bSmrg 990242941e3bSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 990342941e3bSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 990442941e3bSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 990542941e3bSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 990642941e3bSmrg 990742941e3bSmrgAC_MSG_CHECKING([whether to build text documentation]) 990842941e3bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 990942941e3bSmrg test x$BUILD_TXTDOC != xno; then 991042941e3bSmrg BUILDTXTDOC=yes 991142941e3bSmrgfi 991242941e3bSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 991342941e3bSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 991442941e3bSmrg 991542941e3bSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 991642941e3bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 991742941e3bSmrg test x$BUILD_PDFDOC != xno; then 991842941e3bSmrg BUILDPDFDOC=yes 991942941e3bSmrgfi 992042941e3bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 992142941e3bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 992242941e3bSmrg 992342941e3bSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 992442941e3bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 992542941e3bSmrg test x$BUILD_PSDOC != xno; then 992642941e3bSmrg BUILDPSDOC=yes 992742941e3bSmrgfi 992842941e3bSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 992942941e3bSmrgAC_MSG_RESULT([$BUILDPSDOC]) 993042941e3bSmrg 993142941e3bSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 993242941e3bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 993342941e3bSmrg test x$BUILD_HTMLDOC != xno; then 993442941e3bSmrg BUILDHTMLDOC=yes 993542941e3bSmrgfi 993642941e3bSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 993742941e3bSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 993842941e3bSmrg 993942941e3bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 994042941e3bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 994142941e3bSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 994242941e3bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 994342941e3bSmrg 994442941e3bSmrgAC_SUBST(MAKE_TEXT) 994542941e3bSmrgAC_SUBST(MAKE_PS) 994642941e3bSmrgAC_SUBST(MAKE_PDF) 994742941e3bSmrgAC_SUBST(MAKE_HTML) 994842941e3bSmrg]) # XORG_CHECK_DOCBOOK 994942941e3bSmrg 995042941e3bSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 995142941e3bSmrg# ---------------- 995242941e3bSmrg# Minimum version: 1.5.0 995342941e3bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 995442941e3bSmrg# 995542941e3bSmrg# Documentation tools are not always available on all platforms and sometimes 995642941e3bSmrg# not at the appropriate level. This macro enables a module to test for the 995742941e3bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 995842941e3bSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 995942941e3bSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 996042941e3bSmrg# --with-xmlto assumes 'auto'. 996142941e3bSmrg# 996242941e3bSmrg# Interface to module: 996342941e3bSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 996442941e3bSmrg# XMLTO: returns the path of the xmlto program found 996542941e3bSmrg# returns the path set by the user in the environment 996642941e3bSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 996742941e3bSmrg# 'no' user instructs the module not to use xmlto 996842941e3bSmrg# 996942941e3bSmrg# Added in version 1.10.0 997042941e3bSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 997142941e3bSmrg# xmlto for text output requires either lynx, links, or w3m browsers 997242941e3bSmrg# 997342941e3bSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 997442941e3bSmrg# 997542941e3bSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 997642941e3bSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 997742941e3bSmrgm4_define([_defopt], m4_default([$2], [auto])) 997842941e3bSmrgAC_ARG_WITH(xmlto, 997942941e3bSmrg AS_HELP_STRING([--with-xmlto], 998042941e3bSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 998142941e3bSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 998242941e3bSmrgm4_undefine([_defopt]) 998342941e3bSmrg 998442941e3bSmrgif test "x$use_xmlto" = x"auto"; then 998542941e3bSmrg AC_PATH_PROG([XMLTO], [xmlto]) 998642941e3bSmrg if test "x$XMLTO" = "x"; then 998742941e3bSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 998842941e3bSmrg have_xmlto=no 998942941e3bSmrg else 999042941e3bSmrg have_xmlto=yes 999142941e3bSmrg fi 999242941e3bSmrgelif test "x$use_xmlto" = x"yes" ; then 999342941e3bSmrg AC_PATH_PROG([XMLTO], [xmlto]) 999442941e3bSmrg if test "x$XMLTO" = "x"; then 999542941e3bSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 999642941e3bSmrg fi 999742941e3bSmrg have_xmlto=yes 999842941e3bSmrgelif test "x$use_xmlto" = x"no" ; then 999942941e3bSmrg if test "x$XMLTO" != "x"; then 1000042941e3bSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1000142941e3bSmrg fi 1000242941e3bSmrg have_xmlto=no 1000342941e3bSmrgelse 1000442941e3bSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1000542941e3bSmrgfi 1000642941e3bSmrg 1000742941e3bSmrg# Test for a minimum version of xmlto, if provided. 1000842941e3bSmrgm4_ifval([$1], 1000942941e3bSmrg[if test "$have_xmlto" = yes; then 1001042941e3bSmrg # scrape the xmlto version 1001142941e3bSmrg AC_MSG_CHECKING([the xmlto version]) 1001242941e3bSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1001342941e3bSmrg AC_MSG_RESULT([$xmlto_version]) 1001442941e3bSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1001542941e3bSmrg [if test "x$use_xmlto" = xauto; then 1001642941e3bSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1001742941e3bSmrg have_xmlto=no 1001842941e3bSmrg else 1001942941e3bSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1002042941e3bSmrg fi]) 1002142941e3bSmrgfi]) 1002242941e3bSmrg 1002342941e3bSmrg# Test for the ability of xmlto to generate a text target 1002442941e3bSmrghave_xmlto_text=no 1002542941e3bSmrgcat > conftest.xml << "EOF" 1002642941e3bSmrgEOF 1002742941e3bSmrgAS_IF([test "$have_xmlto" = yes], 1002842941e3bSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1002942941e3bSmrg [have_xmlto_text=yes], 1003042941e3bSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1003142941e3bSmrgrm -f conftest.xml 1003242941e3bSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1003342941e3bSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1003442941e3bSmrg]) # XORG_WITH_XMLTO 1003542941e3bSmrg 1003642941e3bSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1003742941e3bSmrg# -------------------------------------------- 1003842941e3bSmrg# Minimum version: 1.12.0 1003942941e3bSmrg# Minimum version for optional DEFAULT argument: 1.12.0 1004042941e3bSmrg# 1004142941e3bSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1004242941e3bSmrg# XML-based language used for the transformation of XML documents. 1004342941e3bSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1004442941e3bSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1004542941e3bSmrg# The XSLT processor is often used as a standalone tool for transformations. 1004642941e3bSmrg# It should not be assumed that this tool is used only to work with documnetation. 1004742941e3bSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1004842941e3bSmrg# 1004942941e3bSmrg# Interface to module: 1005042941e3bSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1005142941e3bSmrg# XSLTPROC: returns the path of the xsltproc program found 1005242941e3bSmrg# returns the path set by the user in the environment 1005342941e3bSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1005442941e3bSmrg# 'no' user instructs the module not to use xsltproc 1005542941e3bSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1005642941e3bSmrg# 1005742941e3bSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1005842941e3bSmrg# 1005942941e3bSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1006042941e3bSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1006142941e3bSmrg# Preserves the interface, should it be implemented later 1006242941e3bSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1006342941e3bSmrgm4_define([_defopt], m4_default([$2], [auto])) 1006442941e3bSmrgAC_ARG_WITH(xsltproc, 1006542941e3bSmrg AS_HELP_STRING([--with-xsltproc], 1006642941e3bSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1006742941e3bSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1006842941e3bSmrgm4_undefine([_defopt]) 1006942941e3bSmrg 1007042941e3bSmrgif test "x$use_xsltproc" = x"auto"; then 1007142941e3bSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1007242941e3bSmrg if test "x$XSLTPROC" = "x"; then 1007342941e3bSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1007442941e3bSmrg have_xsltproc=no 1007542941e3bSmrg else 1007642941e3bSmrg have_xsltproc=yes 1007742941e3bSmrg fi 1007842941e3bSmrgelif test "x$use_xsltproc" = x"yes" ; then 1007942941e3bSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1008042941e3bSmrg if test "x$XSLTPROC" = "x"; then 1008142941e3bSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1008242941e3bSmrg fi 1008342941e3bSmrg have_xsltproc=yes 1008442941e3bSmrgelif test "x$use_xsltproc" = x"no" ; then 1008542941e3bSmrg if test "x$XSLTPROC" != "x"; then 1008642941e3bSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1008742941e3bSmrg fi 1008842941e3bSmrg have_xsltproc=no 1008942941e3bSmrgelse 1009042941e3bSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1009142941e3bSmrgfi 1009242941e3bSmrg 1009342941e3bSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1009442941e3bSmrg]) # XORG_WITH_XSLTPROC 1009542941e3bSmrg 1009642941e3bSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1009742941e3bSmrg# ---------------------------------------- 1009842941e3bSmrg# Minimum version: 1.15.0 1009942941e3bSmrg# 1010042941e3bSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 1010142941e3bSmrg# scanning arbitrary text files, extracting information from those text files, 1010242941e3bSmrg# and printing reports based on that information. 1010342941e3bSmrg# 1010442941e3bSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1010542941e3bSmrg# 1010642941e3bSmrg# Interface to module: 1010742941e3bSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 1010842941e3bSmrg# PERL: returns the path of the perl program found 1010942941e3bSmrg# returns the path set by the user in the environment 1011042941e3bSmrg# --with-perl: 'yes' user instructs the module to use perl 1011142941e3bSmrg# 'no' user instructs the module not to use perl 1011242941e3bSmrg# have_perl: returns yes if perl found in PATH or no 1011342941e3bSmrg# 1011442941e3bSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1011542941e3bSmrg# 1011642941e3bSmrgAC_DEFUN([XORG_WITH_PERL],[ 1011742941e3bSmrgAC_ARG_VAR([PERL], [Path to perl command]) 1011842941e3bSmrg# Preserves the interface, should it be implemented later 1011942941e3bSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1012042941e3bSmrgm4_define([_defopt], m4_default([$2], [auto])) 1012142941e3bSmrgAC_ARG_WITH(perl, 1012242941e3bSmrg AS_HELP_STRING([--with-perl], 1012342941e3bSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 1012442941e3bSmrg [use_perl=$withval], [use_perl=]_defopt) 1012542941e3bSmrgm4_undefine([_defopt]) 1012642941e3bSmrg 1012742941e3bSmrgif test "x$use_perl" = x"auto"; then 1012842941e3bSmrg AC_PATH_PROG([PERL], [perl]) 1012942941e3bSmrg if test "x$PERL" = "x"; then 1013042941e3bSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1013142941e3bSmrg have_perl=no 1013242941e3bSmrg else 1013342941e3bSmrg have_perl=yes 1013442941e3bSmrg fi 1013542941e3bSmrgelif test "x$use_perl" = x"yes" ; then 1013642941e3bSmrg AC_PATH_PROG([PERL], [perl]) 1013742941e3bSmrg if test "x$PERL" = "x"; then 1013842941e3bSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1013942941e3bSmrg fi 1014042941e3bSmrg have_perl=yes 1014142941e3bSmrgelif test "x$use_perl" = x"no" ; then 1014242941e3bSmrg if test "x$PERL" != "x"; then 1014342941e3bSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1014442941e3bSmrg fi 1014542941e3bSmrg have_perl=no 1014642941e3bSmrgelse 1014742941e3bSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1014842941e3bSmrgfi 1014942941e3bSmrg 1015042941e3bSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1015142941e3bSmrg]) # XORG_WITH_PERL 1015242941e3bSmrg 1015342941e3bSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1015442941e3bSmrg# ---------------- 1015542941e3bSmrg# Minimum version: 1.5.0 1015642941e3bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1015742941e3bSmrg# 1015842941e3bSmrg# Documentation tools are not always available on all platforms and sometimes 1015942941e3bSmrg# not at the appropriate level. This macro enables a module to test for the 1016042941e3bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1016142941e3bSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1016242941e3bSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1016342941e3bSmrg# --with-asciidoc assumes 'auto'. 1016442941e3bSmrg# 1016542941e3bSmrg# Interface to module: 1016642941e3bSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1016742941e3bSmrg# ASCIIDOC: returns the path of the asciidoc program found 1016842941e3bSmrg# returns the path set by the user in the environment 1016942941e3bSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1017042941e3bSmrg# 'no' user instructs the module not to use asciidoc 1017142941e3bSmrg# 1017242941e3bSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1017342941e3bSmrg# 1017442941e3bSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1017542941e3bSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1017642941e3bSmrgm4_define([_defopt], m4_default([$2], [auto])) 1017742941e3bSmrgAC_ARG_WITH(asciidoc, 1017842941e3bSmrg AS_HELP_STRING([--with-asciidoc], 1017942941e3bSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1018042941e3bSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1018142941e3bSmrgm4_undefine([_defopt]) 1018242941e3bSmrg 1018342941e3bSmrgif test "x$use_asciidoc" = x"auto"; then 1018442941e3bSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1018542941e3bSmrg if test "x$ASCIIDOC" = "x"; then 1018642941e3bSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1018742941e3bSmrg have_asciidoc=no 1018842941e3bSmrg else 1018942941e3bSmrg have_asciidoc=yes 1019042941e3bSmrg fi 1019142941e3bSmrgelif test "x$use_asciidoc" = x"yes" ; then 1019242941e3bSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1019342941e3bSmrg if test "x$ASCIIDOC" = "x"; then 1019442941e3bSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1019542941e3bSmrg fi 1019642941e3bSmrg have_asciidoc=yes 1019742941e3bSmrgelif test "x$use_asciidoc" = x"no" ; then 1019842941e3bSmrg if test "x$ASCIIDOC" != "x"; then 1019942941e3bSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1020042941e3bSmrg fi 1020142941e3bSmrg have_asciidoc=no 1020242941e3bSmrgelse 1020342941e3bSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1020442941e3bSmrgfi 1020542941e3bSmrgm4_ifval([$1], 1020642941e3bSmrg[if test "$have_asciidoc" = yes; then 1020742941e3bSmrg # scrape the asciidoc version 1020842941e3bSmrg AC_MSG_CHECKING([the asciidoc version]) 1020942941e3bSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1021042941e3bSmrg AC_MSG_RESULT([$asciidoc_version]) 1021142941e3bSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1021242941e3bSmrg [if test "x$use_asciidoc" = xauto; then 1021342941e3bSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1021442941e3bSmrg have_asciidoc=no 1021542941e3bSmrg else 1021642941e3bSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1021742941e3bSmrg fi]) 1021842941e3bSmrgfi]) 1021942941e3bSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1022042941e3bSmrg]) # XORG_WITH_ASCIIDOC 1022142941e3bSmrg 1022242941e3bSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1022342941e3bSmrg# -------------------------------- 1022442941e3bSmrg# Minimum version: 1.5.0 1022542941e3bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1022642941e3bSmrg# 1022742941e3bSmrg# Documentation tools are not always available on all platforms and sometimes 1022842941e3bSmrg# not at the appropriate level. This macro enables a module to test for the 1022942941e3bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1023042941e3bSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1023142941e3bSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1023242941e3bSmrg# --with-doxygen assumes 'auto'. 1023342941e3bSmrg# 1023442941e3bSmrg# Interface to module: 1023542941e3bSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1023642941e3bSmrg# DOXYGEN: returns the path of the doxygen program found 1023742941e3bSmrg# returns the path set by the user in the environment 1023842941e3bSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1023942941e3bSmrg# 'no' user instructs the module not to use doxygen 1024042941e3bSmrg# 1024142941e3bSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1024242941e3bSmrg# 1024342941e3bSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1024442941e3bSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1024542941e3bSmrgm4_define([_defopt], m4_default([$2], [auto])) 1024642941e3bSmrgAC_ARG_WITH(doxygen, 1024742941e3bSmrg AS_HELP_STRING([--with-doxygen], 1024842941e3bSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1024942941e3bSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1025042941e3bSmrgm4_undefine([_defopt]) 1025142941e3bSmrg 1025242941e3bSmrgif test "x$use_doxygen" = x"auto"; then 1025342941e3bSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1025442941e3bSmrg if test "x$DOXYGEN" = "x"; then 1025542941e3bSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1025642941e3bSmrg have_doxygen=no 1025742941e3bSmrg else 1025842941e3bSmrg have_doxygen=yes 1025942941e3bSmrg fi 1026042941e3bSmrgelif test "x$use_doxygen" = x"yes" ; then 1026142941e3bSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1026242941e3bSmrg if test "x$DOXYGEN" = "x"; then 1026342941e3bSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1026442941e3bSmrg fi 1026542941e3bSmrg have_doxygen=yes 1026642941e3bSmrgelif test "x$use_doxygen" = x"no" ; then 1026742941e3bSmrg if test "x$DOXYGEN" != "x"; then 1026842941e3bSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1026942941e3bSmrg fi 1027042941e3bSmrg have_doxygen=no 1027142941e3bSmrgelse 1027242941e3bSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1027342941e3bSmrgfi 1027442941e3bSmrgm4_ifval([$1], 1027542941e3bSmrg[if test "$have_doxygen" = yes; then 1027642941e3bSmrg # scrape the doxygen version 1027742941e3bSmrg AC_MSG_CHECKING([the doxygen version]) 1027842941e3bSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1027942941e3bSmrg AC_MSG_RESULT([$doxygen_version]) 1028042941e3bSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1028142941e3bSmrg [if test "x$use_doxygen" = xauto; then 1028242941e3bSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1028342941e3bSmrg have_doxygen=no 1028442941e3bSmrg else 1028542941e3bSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1028642941e3bSmrg fi]) 1028742941e3bSmrgfi]) 1028842941e3bSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1028942941e3bSmrg]) # XORG_WITH_DOXYGEN 1029042941e3bSmrg 1029142941e3bSmrg# XORG_WITH_GROFF([DEFAULT]) 1029242941e3bSmrg# ---------------- 1029342941e3bSmrg# Minimum version: 1.6.0 1029442941e3bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1029542941e3bSmrg# 1029642941e3bSmrg# Documentation tools are not always available on all platforms and sometimes 1029742941e3bSmrg# not at the appropriate level. This macro enables a module to test for the 1029842941e3bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1029942941e3bSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 1030042941e3bSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 1030142941e3bSmrg# --with-groff assumes 'auto'. 1030242941e3bSmrg# 1030342941e3bSmrg# Interface to module: 1030442941e3bSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1030542941e3bSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1030642941e3bSmrg# HAVE_GROFF_MS: the -ms macros package 1030742941e3bSmrg# GROFF: returns the path of the groff program found 1030842941e3bSmrg# returns the path set by the user in the environment 1030942941e3bSmrg# --with-groff: 'yes' user instructs the module to use groff 1031042941e3bSmrg# 'no' user instructs the module not to use groff 1031142941e3bSmrg# 1031242941e3bSmrg# Added in version 1.9.0: 1031342941e3bSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1031442941e3bSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1031542941e3bSmrg# psselect from the psutils package. 1031642941e3bSmrg# the ghostcript package. Refer to the grohtml man pages 1031742941e3bSmrg# 1031842941e3bSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1031942941e3bSmrg# 1032042941e3bSmrg# OS and distros often splits groff in a basic and full package, the former 1032142941e3bSmrg# having the groff program and the later having devices, fonts and macros 1032242941e3bSmrg# Checking for the groff executable is not enough. 1032342941e3bSmrg# 1032442941e3bSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 1032542941e3bSmrg# unset HAVE_GROFF or GROFF env variables. 1032642941e3bSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1032742941e3bSmrg# 1032842941e3bSmrgAC_DEFUN([XORG_WITH_GROFF],[ 1032942941e3bSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1033042941e3bSmrgm4_define([_defopt], m4_default([$1], [auto])) 1033142941e3bSmrgAC_ARG_WITH(groff, 1033242941e3bSmrg AS_HELP_STRING([--with-groff], 1033342941e3bSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1033442941e3bSmrg [use_groff=$withval], [use_groff=]_defopt) 1033542941e3bSmrgm4_undefine([_defopt]) 1033642941e3bSmrg 1033742941e3bSmrgif test "x$use_groff" = x"auto"; then 1033842941e3bSmrg AC_PATH_PROG([GROFF], [groff]) 1033942941e3bSmrg if test "x$GROFF" = "x"; then 1034042941e3bSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1034142941e3bSmrg have_groff=no 1034242941e3bSmrg else 1034342941e3bSmrg have_groff=yes 1034442941e3bSmrg fi 1034542941e3bSmrgelif test "x$use_groff" = x"yes" ; then 1034642941e3bSmrg AC_PATH_PROG([GROFF], [groff]) 1034742941e3bSmrg if test "x$GROFF" = "x"; then 1034842941e3bSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1034942941e3bSmrg fi 1035042941e3bSmrg have_groff=yes 1035142941e3bSmrgelif test "x$use_groff" = x"no" ; then 1035242941e3bSmrg if test "x$GROFF" != "x"; then 1035342941e3bSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1035442941e3bSmrg fi 1035542941e3bSmrg have_groff=no 1035642941e3bSmrgelse 1035742941e3bSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1035842941e3bSmrgfi 1035942941e3bSmrg 1036042941e3bSmrg# We have groff, test for the presence of the macro packages 1036142941e3bSmrgif test "x$have_groff" = x"yes"; then 1036242941e3bSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1036342941e3bSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1036442941e3bSmrg groff_ms_works=yes 1036542941e3bSmrg else 1036642941e3bSmrg groff_ms_works=no 1036742941e3bSmrg fi 1036842941e3bSmrg AC_MSG_RESULT([$groff_ms_works]) 1036942941e3bSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1037042941e3bSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1037142941e3bSmrg groff_mm_works=yes 1037242941e3bSmrg else 1037342941e3bSmrg groff_mm_works=no 1037442941e3bSmrg fi 1037542941e3bSmrg AC_MSG_RESULT([$groff_mm_works]) 1037642941e3bSmrgfi 1037742941e3bSmrg 1037842941e3bSmrg# We have groff, test for HTML dependencies, one command per package 1037942941e3bSmrgif test "x$have_groff" = x"yes"; then 1038042941e3bSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1038142941e3bSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1038242941e3bSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1038342941e3bSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1038442941e3bSmrg have_groff_html=yes 1038542941e3bSmrg else 1038642941e3bSmrg have_groff_html=no 1038742941e3bSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1038842941e3bSmrg fi 1038942941e3bSmrgfi 1039042941e3bSmrg 1039142941e3bSmrg# Set Automake conditionals for Makefiles 1039242941e3bSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1039342941e3bSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1039442941e3bSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1039542941e3bSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1039642941e3bSmrg]) # XORG_WITH_GROFF 1039742941e3bSmrg 1039842941e3bSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1039942941e3bSmrg# --------------------------------------- 1040042941e3bSmrg# Minimum version: 1.6.0 1040142941e3bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1040242941e3bSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1040342941e3bSmrg# 1040442941e3bSmrg# Documentation tools are not always available on all platforms and sometimes 1040542941e3bSmrg# not at the appropriate level. This macro enables a module to test for the 1040642941e3bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1040742941e3bSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 1040842941e3bSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 1040942941e3bSmrg# --with-fop assumes 'auto'. 1041042941e3bSmrg# 1041142941e3bSmrg# Interface to module: 1041242941e3bSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1041342941e3bSmrg# FOP: returns the path of the fop program found 1041442941e3bSmrg# returns the path set by the user in the environment 1041542941e3bSmrg# --with-fop: 'yes' user instructs the module to use fop 1041642941e3bSmrg# 'no' user instructs the module not to use fop 1041742941e3bSmrg# 1041842941e3bSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1041942941e3bSmrg# 1042042941e3bSmrgAC_DEFUN([XORG_WITH_FOP],[ 1042142941e3bSmrgAC_ARG_VAR([FOP], [Path to fop command]) 1042242941e3bSmrgm4_define([_defopt], m4_default([$2], [auto])) 1042342941e3bSmrgAC_ARG_WITH(fop, 1042442941e3bSmrg AS_HELP_STRING([--with-fop], 1042542941e3bSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1042642941e3bSmrg [use_fop=$withval], [use_fop=]_defopt) 1042742941e3bSmrgm4_undefine([_defopt]) 1042842941e3bSmrg 1042942941e3bSmrgif test "x$use_fop" = x"auto"; then 1043042941e3bSmrg AC_PATH_PROG([FOP], [fop]) 1043142941e3bSmrg if test "x$FOP" = "x"; then 1043242941e3bSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1043342941e3bSmrg have_fop=no 1043442941e3bSmrg else 1043542941e3bSmrg have_fop=yes 1043642941e3bSmrg fi 1043742941e3bSmrgelif test "x$use_fop" = x"yes" ; then 1043842941e3bSmrg AC_PATH_PROG([FOP], [fop]) 1043942941e3bSmrg if test "x$FOP" = "x"; then 1044042941e3bSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1044142941e3bSmrg fi 1044242941e3bSmrg have_fop=yes 1044342941e3bSmrgelif test "x$use_fop" = x"no" ; then 1044442941e3bSmrg if test "x$FOP" != "x"; then 1044542941e3bSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1044642941e3bSmrg fi 1044742941e3bSmrg have_fop=no 1044842941e3bSmrgelse 1044942941e3bSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1045042941e3bSmrgfi 1045142941e3bSmrg 1045242941e3bSmrg# Test for a minimum version of fop, if provided. 1045342941e3bSmrgm4_ifval([$1], 1045442941e3bSmrg[if test "$have_fop" = yes; then 1045542941e3bSmrg # scrape the fop version 1045642941e3bSmrg AC_MSG_CHECKING([for fop minimum version]) 1045742941e3bSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1045842941e3bSmrg AC_MSG_RESULT([$fop_version]) 1045942941e3bSmrg AS_VERSION_COMPARE([$fop_version], [$1], 1046042941e3bSmrg [if test "x$use_fop" = xauto; then 1046142941e3bSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1046242941e3bSmrg have_fop=no 1046342941e3bSmrg else 1046442941e3bSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1046542941e3bSmrg fi]) 1046642941e3bSmrgfi]) 1046742941e3bSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1046842941e3bSmrg]) # XORG_WITH_FOP 1046942941e3bSmrg 1047042941e3bSmrg# XORG_WITH_PS2PDF([DEFAULT]) 1047142941e3bSmrg# ---------------- 1047242941e3bSmrg# Minimum version: 1.6.0 1047342941e3bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1047442941e3bSmrg# 1047542941e3bSmrg# Documentation tools are not always available on all platforms and sometimes 1047642941e3bSmrg# not at the appropriate level. This macro enables a module to test for the 1047742941e3bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1047842941e3bSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1047942941e3bSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1048042941e3bSmrg# --with-ps2pdf assumes 'auto'. 1048142941e3bSmrg# 1048242941e3bSmrg# Interface to module: 1048342941e3bSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1048442941e3bSmrg# PS2PDF: returns the path of the ps2pdf program found 1048542941e3bSmrg# returns the path set by the user in the environment 1048642941e3bSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1048742941e3bSmrg# 'no' user instructs the module not to use ps2pdf 1048842941e3bSmrg# 1048942941e3bSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1049042941e3bSmrg# 1049142941e3bSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1049242941e3bSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1049342941e3bSmrgm4_define([_defopt], m4_default([$1], [auto])) 1049442941e3bSmrgAC_ARG_WITH(ps2pdf, 1049542941e3bSmrg AS_HELP_STRING([--with-ps2pdf], 1049642941e3bSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1049742941e3bSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1049842941e3bSmrgm4_undefine([_defopt]) 1049942941e3bSmrg 1050042941e3bSmrgif test "x$use_ps2pdf" = x"auto"; then 1050142941e3bSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1050242941e3bSmrg if test "x$PS2PDF" = "x"; then 1050342941e3bSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1050442941e3bSmrg have_ps2pdf=no 1050542941e3bSmrg else 1050642941e3bSmrg have_ps2pdf=yes 1050742941e3bSmrg fi 1050842941e3bSmrgelif test "x$use_ps2pdf" = x"yes" ; then 1050942941e3bSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1051042941e3bSmrg if test "x$PS2PDF" = "x"; then 1051142941e3bSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1051242941e3bSmrg fi 1051342941e3bSmrg have_ps2pdf=yes 1051442941e3bSmrgelif test "x$use_ps2pdf" = x"no" ; then 1051542941e3bSmrg if test "x$PS2PDF" != "x"; then 1051642941e3bSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1051742941e3bSmrg fi 1051842941e3bSmrg have_ps2pdf=no 1051942941e3bSmrgelse 1052042941e3bSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1052142941e3bSmrgfi 1052242941e3bSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1052342941e3bSmrg]) # XORG_WITH_PS2PDF 1052442941e3bSmrg 1052542941e3bSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 1052642941e3bSmrg# ---------------- 1052742941e3bSmrg# Minimum version: 1.6.0 1052842941e3bSmrg# 1052942941e3bSmrg# Documentation tools are not always available on all platforms and sometimes 1053042941e3bSmrg# not at the appropriate level. This macro enables a builder to skip all 1053142941e3bSmrg# documentation targets except traditional man pages. 1053242941e3bSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1053342941e3bSmrg# maximum flexibilty in controlling documentation building. 1053442941e3bSmrg# Refer to: 1053542941e3bSmrg# XORG_WITH_XMLTO --with-xmlto 1053642941e3bSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1053742941e3bSmrg# XORG_WITH_DOXYGEN --with-doxygen 1053842941e3bSmrg# XORG_WITH_FOP --with-fop 1053942941e3bSmrg# XORG_WITH_GROFF --with-groff 1054042941e3bSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1054142941e3bSmrg# 1054242941e3bSmrg# Interface to module: 1054342941e3bSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1054442941e3bSmrg# --enable-docs: 'yes' user instructs the module to generate docs 1054542941e3bSmrg# 'no' user instructs the module not to generate docs 1054642941e3bSmrg# parm1: specify the default value, yes or no. 1054742941e3bSmrg# 1054842941e3bSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1054942941e3bSmrgm4_define([docs_default], m4_default([$1], [yes])) 1055042941e3bSmrgAC_ARG_ENABLE(docs, 1055142941e3bSmrg AS_HELP_STRING([--enable-docs], 1055242941e3bSmrg [Enable building the documentation (default: ]docs_default[)]), 1055342941e3bSmrg [build_docs=$enableval], [build_docs=]docs_default) 1055442941e3bSmrgm4_undefine([docs_default]) 1055542941e3bSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1055642941e3bSmrgAC_MSG_CHECKING([whether to build documentation]) 1055742941e3bSmrgAC_MSG_RESULT([$build_docs]) 1055842941e3bSmrg]) # XORG_ENABLE_DOCS 1055942941e3bSmrg 1056042941e3bSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1056142941e3bSmrg# ---------------- 1056242941e3bSmrg# Minimum version: 1.6.0 1056342941e3bSmrg# 1056442941e3bSmrg# This macro enables a builder to skip all developer documentation. 1056542941e3bSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1056642941e3bSmrg# maximum flexibilty in controlling documentation building. 1056742941e3bSmrg# Refer to: 1056842941e3bSmrg# XORG_WITH_XMLTO --with-xmlto 1056942941e3bSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1057042941e3bSmrg# XORG_WITH_DOXYGEN --with-doxygen 1057142941e3bSmrg# XORG_WITH_FOP --with-fop 1057242941e3bSmrg# XORG_WITH_GROFF --with-groff 1057342941e3bSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1057442941e3bSmrg# 1057542941e3bSmrg# Interface to module: 1057642941e3bSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1057742941e3bSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1057842941e3bSmrg# 'no' user instructs the module not to generate developer docs 1057942941e3bSmrg# parm1: specify the default value, yes or no. 1058042941e3bSmrg# 1058142941e3bSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1058242941e3bSmrgm4_define([devel_default], m4_default([$1], [yes])) 1058342941e3bSmrgAC_ARG_ENABLE(devel-docs, 1058442941e3bSmrg AS_HELP_STRING([--enable-devel-docs], 1058542941e3bSmrg [Enable building the developer documentation (default: ]devel_default[)]), 1058642941e3bSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1058742941e3bSmrgm4_undefine([devel_default]) 1058842941e3bSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1058942941e3bSmrgAC_MSG_CHECKING([whether to build developer documentation]) 1059042941e3bSmrgAC_MSG_RESULT([$build_devel_docs]) 1059142941e3bSmrg]) # XORG_ENABLE_DEVEL_DOCS 1059242941e3bSmrg 1059342941e3bSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 1059442941e3bSmrg# ---------------- 1059542941e3bSmrg# Minimum version: 1.6.0 1059642941e3bSmrg# 1059742941e3bSmrg# This macro enables a builder to skip all functional specification targets. 1059842941e3bSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1059942941e3bSmrg# maximum flexibilty in controlling documentation building. 1060042941e3bSmrg# Refer to: 1060142941e3bSmrg# XORG_WITH_XMLTO --with-xmlto 1060242941e3bSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1060342941e3bSmrg# XORG_WITH_DOXYGEN --with-doxygen 1060442941e3bSmrg# XORG_WITH_FOP --with-fop 1060542941e3bSmrg# XORG_WITH_GROFF --with-groff 1060642941e3bSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1060742941e3bSmrg# 1060842941e3bSmrg# Interface to module: 1060942941e3bSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1061042941e3bSmrg# --enable-specs: 'yes' user instructs the module to generate specs 1061142941e3bSmrg# 'no' user instructs the module not to generate specs 1061242941e3bSmrg# parm1: specify the default value, yes or no. 1061342941e3bSmrg# 1061442941e3bSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1061542941e3bSmrgm4_define([spec_default], m4_default([$1], [yes])) 1061642941e3bSmrgAC_ARG_ENABLE(specs, 1061742941e3bSmrg AS_HELP_STRING([--enable-specs], 1061842941e3bSmrg [Enable building the specs (default: ]spec_default[)]), 1061942941e3bSmrg [build_specs=$enableval], [build_specs=]spec_default) 1062042941e3bSmrgm4_undefine([spec_default]) 1062142941e3bSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1062242941e3bSmrgAC_MSG_CHECKING([whether to build functional specifications]) 1062342941e3bSmrgAC_MSG_RESULT([$build_specs]) 1062442941e3bSmrg]) # XORG_ENABLE_SPECS 1062542941e3bSmrg 1062642941e3bSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1062742941e3bSmrg# ---------------------------------------------- 1062842941e3bSmrg# Minimum version: 1.13.0 1062942941e3bSmrg# 1063042941e3bSmrg# This macro enables a builder to enable/disable unit testing 1063142941e3bSmrg# It makes no assumption about the test cases implementation 1063242941e3bSmrg# Test cases may or may not use Automake "Support for test suites" 1063342941e3bSmrg# They may or may not use the software utility library GLib 1063442941e3bSmrg# 1063542941e3bSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1063642941e3bSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1063742941e3bSmrg# The variable enable_unit_tests is used by other macros in this file. 1063842941e3bSmrg# 1063942941e3bSmrg# Interface to module: 1064042941e3bSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1064142941e3bSmrg# enable_unit_tests: used in configure.ac for additional configuration 1064242941e3bSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1064342941e3bSmrg# 'no' user instructs the module not to build tests 1064442941e3bSmrg# parm1: specify the default value, yes or no. 1064542941e3bSmrg# 1064642941e3bSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1064742941e3bSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1064842941e3bSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1064942941e3bSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1065042941e3bSmrgm4_define([_defopt], m4_default([$1], [auto])) 1065142941e3bSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1065242941e3bSmrg [Enable building unit test cases (default: ]_defopt[)]), 1065342941e3bSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1065442941e3bSmrgm4_undefine([_defopt]) 1065542941e3bSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1065642941e3bSmrgAC_MSG_CHECKING([whether to build unit test cases]) 1065742941e3bSmrgAC_MSG_RESULT([$enable_unit_tests]) 1065842941e3bSmrg]) # XORG_ENABLE_UNIT_TESTS 1065942941e3bSmrg 1066042941e3bSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1066142941e3bSmrg# ---------------------------------------- 1066242941e3bSmrg# Minimum version: 1.13.0 1066342941e3bSmrg# 1066442941e3bSmrg# GLib is a library which provides advanced data structures and functions. 1066542941e3bSmrg# This macro enables a module to test for the presence of Glib. 1066642941e3bSmrg# 1066742941e3bSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1066842941e3bSmrg# Otherwise the value of $enable_unit_tests is blank. 1066942941e3bSmrg# 1067042941e3bSmrg# Interface to module: 1067142941e3bSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 1067242941e3bSmrg# with_glib: used in configure.ac to know if GLib has been found 1067342941e3bSmrg# --with-glib: 'yes' user instructs the module to use glib 1067442941e3bSmrg# 'no' user instructs the module not to use glib 1067542941e3bSmrg# 1067642941e3bSmrgAC_DEFUN([XORG_WITH_GLIB],[ 1067742941e3bSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1067842941e3bSmrgm4_define([_defopt], m4_default([$2], [auto])) 1067942941e3bSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1068042941e3bSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 1068142941e3bSmrg [with_glib=$withval], [with_glib=]_defopt) 1068242941e3bSmrgm4_undefine([_defopt]) 1068342941e3bSmrg 1068442941e3bSmrghave_glib=no 1068542941e3bSmrg# Do not probe GLib if user explicitly disabled unit testing 1068642941e3bSmrgif test "x$enable_unit_tests" != x"no"; then 1068742941e3bSmrg # Do not probe GLib if user explicitly disabled it 1068842941e3bSmrg if test "x$with_glib" != x"no"; then 1068942941e3bSmrg m4_ifval( 1069042941e3bSmrg [$1], 1069142941e3bSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1069242941e3bSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1069342941e3bSmrg ) 1069442941e3bSmrg fi 1069542941e3bSmrgfi 1069642941e3bSmrg 1069742941e3bSmrg# Not having GLib when unit testing has been explicitly requested is an error 1069842941e3bSmrgif test "x$enable_unit_tests" = x"yes"; then 1069942941e3bSmrg if test "x$have_glib" = x"no"; then 1070042941e3bSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1070142941e3bSmrg fi 1070242941e3bSmrgfi 10703356f6debSmrg 1070442941e3bSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 1070542941e3bSmrgif test "x$enable_unit_tests" = x"no"; then 1070642941e3bSmrg if test "x$with_glib" = x"yes"; then 1070742941e3bSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1070842941e3bSmrg fi 1070942941e3bSmrgfi 107106f03b1f6Smrg 1071142941e3bSmrg# Not having GLib when it has been explicitly requested is an error 1071242941e3bSmrgif test "x$with_glib" = x"yes"; then 1071342941e3bSmrg if test "x$have_glib" = x"no"; then 1071442941e3bSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1071542941e3bSmrg fi 1071642941e3bSmrgfi 107176f03b1f6Smrg 1071842941e3bSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1071942941e3bSmrg]) # XORG_WITH_GLIB 107206f03b1f6Smrg 1072142941e3bSmrg# XORG_LD_WRAP([required|optional]) 1072242941e3bSmrg# --------------------------------- 1072342941e3bSmrg# Minimum version: 1.13.0 1072442941e3bSmrg# 1072542941e3bSmrg# Check if linker supports -wrap, passed via compiler flags 1072642941e3bSmrg# 1072742941e3bSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1072842941e3bSmrg# Otherwise the value of $enable_unit_tests is blank. 1072942941e3bSmrg# 1073042941e3bSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1073142941e3bSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1073242941e3bSmrg# available, an argument of "optional" allows use when some unit tests require 1073342941e3bSmrg# ld -wrap and others do not. 1073442941e3bSmrg# 1073542941e3bSmrgAC_DEFUN([XORG_LD_WRAP],[ 1073642941e3bSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1073742941e3bSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 1073842941e3bSmrg void __wrap_exit(int status) { return; }], 1073942941e3bSmrg [exit(0);])]) 1074042941e3bSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 1074142941e3bSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1074242941e3bSmrg if test "x$have_ld_wrap" = x"no"; then 1074342941e3bSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1074442941e3bSmrg fi 1074542941e3bSmrgfi 1074642941e3bSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1074742941e3bSmrg# 1074842941e3bSmrg]) # XORG_LD_WRAP 10749356f6debSmrg 1075042941e3bSmrg# XORG_CHECK_LINKER_FLAGS 1075142941e3bSmrg# ----------------------- 1075242941e3bSmrg# SYNOPSIS 1075342941e3bSmrg# 1075442941e3bSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1075542941e3bSmrg# 1075642941e3bSmrg# DESCRIPTION 1075742941e3bSmrg# 1075842941e3bSmrg# Check whether the given linker FLAGS work with the current language's 1075942941e3bSmrg# linker, or whether they give an error. 1076042941e3bSmrg# 1076142941e3bSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1076242941e3bSmrg# success/failure. 1076342941e3bSmrg# 1076442941e3bSmrg# PROGRAM-SOURCE is the program source to link with, if needed 1076542941e3bSmrg# 1076642941e3bSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1076742941e3bSmrg# 1076842941e3bSmrg# LICENSE 1076942941e3bSmrg# 1077042941e3bSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1077142941e3bSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1077242941e3bSmrg# Copyright (c) 2009 Matteo Frigo 1077342941e3bSmrg# 1077442941e3bSmrg# This program is free software: you can redistribute it and/or modify it 1077542941e3bSmrg# under the terms of the GNU General Public License as published by the 1077642941e3bSmrg# Free Software Foundation, either version 3 of the License, or (at your 1077742941e3bSmrg# option) any later version. 1077842941e3bSmrg# 1077942941e3bSmrg# This program is distributed in the hope that it will be useful, but 1078042941e3bSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1078142941e3bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1078242941e3bSmrg# Public License for more details. 1078342941e3bSmrg# 1078442941e3bSmrg# You should have received a copy of the GNU General Public License along 1078542941e3bSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1078642941e3bSmrg# 1078742941e3bSmrg# As a special exception, the respective Autoconf Macro's copyright owner 1078842941e3bSmrg# gives unlimited permission to copy, distribute and modify the configure 1078942941e3bSmrg# scripts that are the output of Autoconf when processing the Macro. You 1079042941e3bSmrg# need not follow the terms of the GNU General Public License when using 1079142941e3bSmrg# or distributing such scripts, even though portions of the text of the 1079242941e3bSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 1079342941e3bSmrg# all other use of the material that constitutes the Autoconf Macro. 1079442941e3bSmrg# 1079542941e3bSmrg# This special exception to the GPL applies to versions of the Autoconf 1079642941e3bSmrg# Macro released by the Autoconf Archive. When you make and distribute a 1079742941e3bSmrg# modified version of the Autoconf Macro, you may extend this special 1079842941e3bSmrg# exception to the GPL to apply to your modified version as well.# 1079942941e3bSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1080042941e3bSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1080142941e3bSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1080242941e3bSmrgAS_LITERAL_IF([$1], 1080342941e3bSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1080442941e3bSmrg ax_save_FLAGS=$LDFLAGS 1080542941e3bSmrg LDFLAGS="$1" 1080642941e3bSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1080742941e3bSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1080842941e3bSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1080942941e3bSmrg LDFLAGS=$ax_save_FLAGS])], 1081042941e3bSmrg [ax_save_FLAGS=$LDFLAGS 1081142941e3bSmrg LDFLAGS="$1" 1081242941e3bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1081342941e3bSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1081442941e3bSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1081542941e3bSmrg LDFLAGS=$ax_save_FLAGS]) 1081642941e3bSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1081742941e3bSmrgAC_MSG_RESULT($xorg_check_linker_flags) 1081842941e3bSmrgif test "x$xorg_check_linker_flags" = xyes; then 1081942941e3bSmrg m4_default([$2], :) 1082042941e3bSmrgelse 1082142941e3bSmrg m4_default([$3], :) 1082242941e3bSmrgfi 1082342941e3bSmrg]) # XORG_CHECK_LINKER_FLAGS 10824356f6debSmrg 1082542941e3bSmrg# XORG_MEMORY_CHECK_FLAGS 1082642941e3bSmrg# ----------------------- 1082742941e3bSmrg# Minimum version: 1.16.0 1082898af18c5Smrg# 1082942941e3bSmrg# This macro attempts to find appropriate memory checking functionality 1083042941e3bSmrg# for various platforms which unit testing code may use to catch various 1083142941e3bSmrg# forms of memory allocation and access errors in testing. 1083298af18c5Smrg# 1083342941e3bSmrg# Interface to module: 1083442941e3bSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1083542941e3bSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1083642941e3bSmrg# 1083742941e3bSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1083842941e3bSmrg# 1083942941e3bSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 108406f03b1f6Smrg 1084142941e3bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1084242941e3bSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1084342941e3bSmrg [Environment variables to enable memory checking in tests]) 108446f03b1f6Smrg 1084542941e3bSmrg# Check for different types of support on different platforms 1084642941e3bSmrgcase $host_os in 1084742941e3bSmrg solaris*) 1084842941e3bSmrg AC_CHECK_LIB([umem], [umem_alloc], 1084942941e3bSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1085042941e3bSmrg ;; 1085142941e3bSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1085242941e3bSmrg # both directly and inverted, so should not be 0 or 255. 1085342941e3bSmrg malloc_debug_env='MALLOC_PERTURB_=15' 1085442941e3bSmrg ;; 1085542941e3bSmrg darwin*) 1085642941e3bSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1085742941e3bSmrg ;; 1085842941e3bSmrg *bsd*) 1085942941e3bSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1086042941e3bSmrg ;; 1086142941e3bSmrgesac 108626f03b1f6Smrg 1086342941e3bSmrg# User supplied flags override default flags 1086442941e3bSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1086542941e3bSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1086642941e3bSmrgfi 10867356f6debSmrg 1086842941e3bSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1086942941e3bSmrg]) # XORG_WITH_LINT 10870356f6debSmrg 1087142941e3bSmrg# XORG_CHECK_MALLOC_ZERO 1087242941e3bSmrg# ---------------------- 1087342941e3bSmrg# Minimum version: 1.0.0 1087442941e3bSmrg# 1087542941e3bSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1087642941e3bSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1087742941e3bSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1087842941e3bSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1087942941e3bSmrgAC_ARG_ENABLE(malloc0returnsnull, 1088042941e3bSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 1088142941e3bSmrg [malloc(0) returns NULL (default: auto)]), 1088242941e3bSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1088342941e3bSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10884356f6debSmrg 1088542941e3bSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1088642941e3bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1088742941e3bSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1088842941e3bSmrg#include <stdlib.h> 1088942941e3bSmrg],[ 1089042941e3bSmrg char *m0, *r0, *c0, *p; 1089142941e3bSmrg m0 = malloc(0); 1089242941e3bSmrg p = malloc(10); 1089342941e3bSmrg r0 = realloc(p,0); 1089442941e3bSmrg c0 = calloc(0,10); 1089542941e3bSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1089642941e3bSmrg])], 1089742941e3bSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 1089842941e3bSmrg [MALLOC_ZERO_RETURNS_NULL=no], 1089942941e3bSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1090042941e3bSmrgfi 1090142941e3bSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10902356f6debSmrg 1090342941e3bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1090442941e3bSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1090542941e3bSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1090642941e3bSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1090742941e3bSmrgelse 1090842941e3bSmrg MALLOC_ZERO_CFLAGS="" 1090942941e3bSmrg XMALLOC_ZERO_CFLAGS="" 1091042941e3bSmrg XTMALLOC_ZERO_CFLAGS="" 1091142941e3bSmrgfi 10912356f6debSmrg 1091342941e3bSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1091442941e3bSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1091542941e3bSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1091642941e3bSmrg]) # XORG_CHECK_MALLOC_ZERO 1091742941e3bSmrg 1091842941e3bSmrg# XORG_WITH_LINT() 1091942941e3bSmrg# ---------------- 1092042941e3bSmrg# Minimum version: 1.1.0 10921356f6debSmrg# 1092242941e3bSmrg# This macro enables the use of a tool that flags some suspicious and 1092342941e3bSmrg# non-portable constructs (likely to be bugs) in C language source code. 1092442941e3bSmrg# It will attempt to locate the tool and use appropriate options. 1092542941e3bSmrg# There are various lint type tools on different platforms. 1092642941e3bSmrg# 1092742941e3bSmrg# Interface to module: 1092842941e3bSmrg# LINT: returns the path to the tool found on the platform 1092942941e3bSmrg# or the value set to LINT on the configure cmd line 1093042941e3bSmrg# also an Automake conditional 1093142941e3bSmrg# LINT_FLAGS: an Automake variable with appropriate flags 1093242941e3bSmrg# 1093342941e3bSmrg# --with-lint: 'yes' user instructs the module to use lint 1093442941e3bSmrg# 'no' user instructs the module not to use lint (default) 1093542941e3bSmrg# 1093642941e3bSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1093742941e3bSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1093842941e3bSmrg# 1093942941e3bSmrgAC_DEFUN([XORG_WITH_LINT],[ 10940356f6debSmrg 1094142941e3bSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1094242941e3bSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1094342941e3bSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1094442941e3bSmrg [Use a lint-style source code checker (default: disabled)])], 1094542941e3bSmrg [use_lint=$withval], [use_lint=no]) 10946356f6debSmrg 1094742941e3bSmrg# Obtain platform specific info like program name and options 1094842941e3bSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1094942941e3bSmrgcase $host_os in 1095042941e3bSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1095142941e3bSmrg lint_name=splint 1095242941e3bSmrg lint_options="-badflag" 1095342941e3bSmrg ;; 1095442941e3bSmrg *freebsd* | *netbsd*) 1095542941e3bSmrg lint_name=lint 1095642941e3bSmrg lint_options="-u -b" 1095742941e3bSmrg ;; 1095842941e3bSmrg *solaris*) 1095942941e3bSmrg lint_name=lint 1096042941e3bSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1096142941e3bSmrg ;; 1096242941e3bSmrgesac 10963356f6debSmrg 1096442941e3bSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1096542941e3bSmrgif test "x$use_lint" = x"yes" ; then 1096642941e3bSmrg AC_PATH_PROG([LINT], [$lint_name]) 1096742941e3bSmrg if test "x$LINT" = "x"; then 1096842941e3bSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1096942941e3bSmrg fi 1097042941e3bSmrgelif test "x$use_lint" = x"no" ; then 1097142941e3bSmrg if test "x$LINT" != "x"; then 1097242941e3bSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1097342941e3bSmrg fi 1097442941e3bSmrgelse 1097542941e3bSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1097642941e3bSmrgfi 10977356f6debSmrg 1097842941e3bSmrg# User supplied flags override default flags 1097942941e3bSmrgif test "x$LINT_FLAGS" != "x"; then 1098042941e3bSmrg lint_options=$LINT_FLAGS 1098142941e3bSmrgfi 10982356f6debSmrg 1098342941e3bSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1098442941e3bSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1098542941e3bSmrg 1098642941e3bSmrg]) # XORG_WITH_LINT 1098742941e3bSmrg 1098842941e3bSmrg# XORG_LINT_LIBRARY(LIBNAME) 1098942941e3bSmrg# -------------------------- 1099042941e3bSmrg# Minimum version: 1.1.0 1099142941e3bSmrg# 1099242941e3bSmrg# Sets up flags for building lint libraries for checking programs that call 1099342941e3bSmrg# functions in the library. 1099442941e3bSmrg# 1099542941e3bSmrg# Interface to module: 1099642941e3bSmrg# LINTLIB - Automake variable with the name of lint library file to make 1099742941e3bSmrg# MAKE_LINT_LIB - Automake conditional 1099842941e3bSmrg# 1099942941e3bSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1100042941e3bSmrg# - 'no' user instructs the module not to create a lint library (default) 1100142941e3bSmrg 1100242941e3bSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1100342941e3bSmrgAC_REQUIRE([XORG_WITH_LINT]) 1100442941e3bSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1100542941e3bSmrg [Create lint library (default: disabled)])], 1100642941e3bSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1100742941e3bSmrg 1100842941e3bSmrgif test "x$make_lint_lib" = x"yes" ; then 1100942941e3bSmrg LINTLIB=llib-l$1.ln 1101042941e3bSmrg if test "x$LINT" = "x"; then 1101142941e3bSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1101242941e3bSmrg fi 1101342941e3bSmrgelif test "x$make_lint_lib" != x"no" ; then 1101442941e3bSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1101542941e3bSmrgfi 11016356f6debSmrg 1101742941e3bSmrgAC_SUBST(LINTLIB) 1101842941e3bSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11019356f6debSmrg 1102042941e3bSmrg]) # XORG_LINT_LIBRARY 110216f03b1f6Smrg 1102242941e3bSmrg# XORG_COMPILER_BRAND 1102342941e3bSmrg# ------------------- 1102442941e3bSmrg# Minimum version: 1.14.0 1102542941e3bSmrg# 1102642941e3bSmrg# Checks for various brands of compilers and sets flags as appropriate: 1102742941e3bSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1102842941e3bSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1102942941e3bSmrg# clang compiler - sets CLANGCC to "yes" 1103042941e3bSmrg# Intel compiler - sets INTELCC to "yes" 1103142941e3bSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1103242941e3bSmrg# 1103342941e3bSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1103442941e3bSmrgAC_LANG_CASE( 1103542941e3bSmrg [C], [ 1103642941e3bSmrg AC_REQUIRE([AC_PROG_CC_C99]) 1103742941e3bSmrg ], 1103842941e3bSmrg [C++], [ 1103942941e3bSmrg AC_REQUIRE([AC_PROG_CXX]) 1104042941e3bSmrg ] 1104142941e3bSmrg) 1104242941e3bSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1104342941e3bSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1104442941e3bSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1104542941e3bSmrg]) # XORG_COMPILER_BRAND 110466f03b1f6Smrg 1104742941e3bSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1104842941e3bSmrg# --------------- 1104942941e3bSmrg# Minimum version: 1.16.0 1105042941e3bSmrg# 1105142941e3bSmrg# Test if the compiler works when passed the given flag as a command line argument. 1105242941e3bSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1105342941e3bSmrg# next flag in the list until there are no more options. 1105442941e3bSmrg# 1105542941e3bSmrg# Note that this does not guarantee that the compiler supports the flag as some 1105642941e3bSmrg# compilers will simply ignore arguments that they do not understand, but we do 1105742941e3bSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1105842941e3bSmrg# -Werror=unused-command-line-argument 1105942941e3bSmrg# 1106042941e3bSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1106142941e3bSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1106242941e3bSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1106342941e3bSmrg 1106442941e3bSmrgAC_LANG_COMPILER_REQUIRE 1106542941e3bSmrg 1106642941e3bSmrgAC_LANG_CASE( 1106742941e3bSmrg [C], [ 1106842941e3bSmrg AC_REQUIRE([AC_PROG_CC_C99]) 1106942941e3bSmrg define([PREFIX], [C]) 1107042941e3bSmrg ], 1107142941e3bSmrg [C++], [ 1107242941e3bSmrg define([PREFIX], [CXX]) 1107342941e3bSmrg ] 1107442941e3bSmrg) 110756f03b1f6Smrg 1107642941e3bSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1107742941e3bSmrg 1107842941e3bSmrgif test "x$xorg_testset_unknown_warning_option" = "x" ; then 1107942941e3bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1108042941e3bSmrg AC_CACHE_CHECK([if compiler supports -Werror=unknown-warning-option], 1108142941e3bSmrg xorg_cv_compiler_flag_unknown_warning_option, 1108242941e3bSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1108342941e3bSmrg [xorg_cv_compiler_flag_unknown_warning_option=yes], 1108442941e3bSmrg [xorg_cv_compiler_flag_unknown_warning_option=no])) 1108542941e3bSmrg xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option 1108642941e3bSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1108742941e3bSmrgfi 110886f03b1f6Smrg 1108942941e3bSmrgif test "x$xorg_testset_unused_command_line_argument" = "x" ; then 1109042941e3bSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1109142941e3bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1109242941e3bSmrg fi 1109342941e3bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1109442941e3bSmrg AC_CACHE_CHECK([if compiler supports -Werror=unused-command-line-argument], 1109542941e3bSmrg xorg_cv_compiler_flag_unused_command_line_argument, 1109642941e3bSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1109742941e3bSmrg [xorg_cv_compiler_flag_unused_command_line_argument=yes], 1109842941e3bSmrg [xorg_cv_compiler_flag_unused_command_line_argument=no])) 1109942941e3bSmrg xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument 1110042941e3bSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1110142941e3bSmrgfi 111026f03b1f6Smrg 1110342941e3bSmrgfound="no" 1110442941e3bSmrgm4_foreach([flag], m4_cdr($@), [ 1110542941e3bSmrg if test $found = "no" ; then 1110642941e3bSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1110742941e3bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1110842941e3bSmrg fi 1110942941e3bSmrg 1111042941e3bSmrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 1111142941e3bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1111242941e3bSmrg fi 1111342941e3bSmrg 1111442941e3bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1111542941e3bSmrg 1111642941e3bSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1111742941e3bSmrg AC_MSG_CHECKING([if $CC supports ]flag[]) 1111842941e3bSmrg cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])` 1111942941e3bSmrg AC_CACHE_VAL(AS_TR_SH($cacheid), 1112042941e3bSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1112142941e3bSmrg [eval AS_TR_SH($cacheid)=yes], 1112242941e3bSmrg [eval AS_TR_SH($cacheid)=no])]) 1112342941e3bSmrg 1112442941e3bSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1112542941e3bSmrg 1112642941e3bSmrg eval supported=$AS_TR_SH($cacheid) 1112742941e3bSmrg AC_MSG_RESULT([$supported]) 1112842941e3bSmrg if test "$supported" = "yes" ; then 1112942941e3bSmrg $1="$$1 ]flag[" 1113042941e3bSmrg found="yes" 1113142941e3bSmrg fi 1113242941e3bSmrg fi 1113342941e3bSmrg]) 1113442941e3bSmrg]) # XORG_TESTSET_CFLAG 111356f03b1f6Smrg 1113642941e3bSmrg# XORG_COMPILER_FLAGS 1113742941e3bSmrg# --------------- 1113842941e3bSmrg# Minimum version: 1.16.0 1113942941e3bSmrg# 1114042941e3bSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1114142941e3bSmrg# arguments supported by the selected compiler which do NOT alter the generated 1114242941e3bSmrg# code. These arguments will cause the compiler to print various warnings 1114342941e3bSmrg# during compilation AND turn a conservative set of warnings into errors. 1114442941e3bSmrg# 1114542941e3bSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1114642941e3bSmrg# future versions of util-macros as options are added to new compilers. 1114742941e3bSmrg# 1114842941e3bSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1114942941e3bSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1115042941e3bSmrg 1115142941e3bSmrgAC_ARG_ENABLE(selective-werror, 1115242941e3bSmrg AS_HELP_STRING([--disable-selective-werror], 1115342941e3bSmrg [Turn off selective compiler errors. (default: enabled)]), 1115442941e3bSmrg [SELECTIVE_WERROR=$enableval], 1115542941e3bSmrg [SELECTIVE_WERROR=yes]) 1115642941e3bSmrg 1115742941e3bSmrgAC_LANG_CASE( 1115842941e3bSmrg [C], [ 1115942941e3bSmrg define([PREFIX], [C]) 1116042941e3bSmrg ], 1116142941e3bSmrg [C++], [ 1116242941e3bSmrg define([PREFIX], [CXX]) 1116342941e3bSmrg ] 1116442941e3bSmrg) 1116542941e3bSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1116642941e3bSmrgif test "x$SUNCC" = "xyes"; then 1116742941e3bSmrg [BASE_]PREFIX[FLAGS]="-v" 1116842941e3bSmrgelse 1116942941e3bSmrg [BASE_]PREFIX[FLAGS]="" 1117042941e3bSmrgfi 111716f03b1f6Smrg 1117242941e3bSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1117342941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1117442941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1117542941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1117642941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1117742941e3bSmrg 1117842941e3bSmrgAC_LANG_CASE( 1117942941e3bSmrg [C], [ 1118042941e3bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1118142941e3bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1118242941e3bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1118342941e3bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1118442941e3bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 1118542941e3bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1118642941e3bSmrg ] 1118742941e3bSmrg) 111886f03b1f6Smrg 1118942941e3bSmrg# This chunk adds additional warnings that could catch undesired effects. 1119042941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1119142941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1119242941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1119342941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1119442941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1119542941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1119642941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1119742941e3bSmrg 1119842941e3bSmrg# These are currently disabled because they are noisy. They will be enabled 1119942941e3bSmrg# in the future once the codebase is sufficiently modernized to silence 1120042941e3bSmrg# them. For now, I don't want them to drown out the other warnings. 1120142941e3bSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1120242941e3bSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1120342941e3bSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1120442941e3bSmrg 1120542941e3bSmrg# Turn some warnings into errors, so we don't accidently get successful builds 1120642941e3bSmrg# when there are problems that should be fixed. 1120742941e3bSmrg 1120842941e3bSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1120942941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1121042941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1121142941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1121242941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1121342941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1121442941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1121542941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1121642941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1121742941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1121842941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1121942941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1122042941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1122142941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1122242941e3bSmrgelse 1122342941e3bSmrgAC_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]) 1122442941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1122542941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1122642941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1122742941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1122842941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1122942941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1123042941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1123142941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1123242941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1123342941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1123442941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1123542941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1123642941e3bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1123742941e3bSmrgfi 112386f03b1f6Smrg 1123942941e3bSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1124042941e3bSmrg]) # XORG_COMPILER_FLAGS 1124142941e3bSmrg 1124242941e3bSmrg# XORG_CWARNFLAGS 1124342941e3bSmrg# --------------- 1124442941e3bSmrg# Minimum version: 1.2.0 1124542941e3bSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11246356f6debSmrg# 1124742941e3bSmrg# Defines CWARNFLAGS to enable C compiler warnings. 11248356f6debSmrg# 1124942941e3bSmrg# This function is deprecated because it defines -fno-strict-aliasing 1125042941e3bSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1125142941e3bSmrg# is needed, then it should be added explicitly in the module when 1125242941e3bSmrg# it is updated to use BASE_CFLAGS. 1125342941e3bSmrg# 1125442941e3bSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1125542941e3bSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1125642941e3bSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1125742941e3bSmrgAC_LANG_CASE( 1125842941e3bSmrg [C], [ 1125942941e3bSmrg CWARNFLAGS="$BASE_CFLAGS" 1126042941e3bSmrg if test "x$GCC" = xyes ; then 1126142941e3bSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1126242941e3bSmrg fi 1126342941e3bSmrg AC_SUBST(CWARNFLAGS) 1126442941e3bSmrg ] 1126542941e3bSmrg) 1126642941e3bSmrg]) # XORG_CWARNFLAGS 112676f03b1f6Smrg 1126842941e3bSmrg# XORG_STRICT_OPTION 1126942941e3bSmrg# ----------------------- 1127042941e3bSmrg# Minimum version: 1.3.0 1127142941e3bSmrg# 1127242941e3bSmrg# Add configure option to enable strict compilation flags, such as treating 1127342941e3bSmrg# warnings as fatal errors. 1127442941e3bSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1127542941e3bSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1127642941e3bSmrg# 1127742941e3bSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1127842941e3bSmrg# when strict compilation is unconditionally desired. 1127942941e3bSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1128042941e3bSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1128142941e3bSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 112826f03b1f6Smrg 1128342941e3bSmrgAC_ARG_ENABLE(strict-compilation, 1128442941e3bSmrg AS_HELP_STRING([--enable-strict-compilation], 1128542941e3bSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1128642941e3bSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 112876f03b1f6Smrg 1128842941e3bSmrgAC_LANG_CASE( 1128942941e3bSmrg [C], [ 1129042941e3bSmrg define([PREFIX], [C]) 1129142941e3bSmrg ], 1129242941e3bSmrg [C++], [ 1129342941e3bSmrg define([PREFIX], [CXX]) 1129442941e3bSmrg ] 1129542941e3bSmrg) 11296356f6debSmrg 1129742941e3bSmrg[STRICT_]PREFIX[FLAGS]="" 1129842941e3bSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1129942941e3bSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11300356f6debSmrg 1130142941e3bSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1130242941e3bSmrg# activate it with -Werror, so we add it here explicitly. 1130342941e3bSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11304356f6debSmrg 1130542941e3bSmrgif test "x$STRICT_COMPILE" = "xyes"; then 1130642941e3bSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1130742941e3bSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1130842941e3bSmrgfi 1130942941e3bSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1131042941e3bSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1131142941e3bSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1131242941e3bSmrg]) # XORG_STRICT_OPTION 11313356f6debSmrg 1131442941e3bSmrg# XORG_DEFAULT_OPTIONS 1131542941e3bSmrg# -------------------- 1131642941e3bSmrg# Minimum version: 1.3.0 11317356f6debSmrg# 1131842941e3bSmrg# Defines default options for X.Org modules. 11319356f6debSmrg# 1132042941e3bSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1132142941e3bSmrgAC_REQUIRE([AC_PROG_INSTALL]) 1132242941e3bSmrgXORG_COMPILER_FLAGS 1132342941e3bSmrgXORG_CWARNFLAGS 1132442941e3bSmrgXORG_STRICT_OPTION 1132542941e3bSmrgXORG_RELEASE_VERSION 1132642941e3bSmrgXORG_CHANGELOG 1132742941e3bSmrgXORG_INSTALL 1132842941e3bSmrgXORG_MANPAGE_SECTIONS 1132942941e3bSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1133042941e3bSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1133142941e3bSmrg]) # XORG_DEFAULT_OPTIONS 1133242941e3bSmrg 1133342941e3bSmrg# XORG_INSTALL() 1133442941e3bSmrg# ---------------- 1133542941e3bSmrg# Minimum version: 1.4.0 11336356f6debSmrg# 1133742941e3bSmrg# Defines the variable INSTALL_CMD as the command to copy 1133842941e3bSmrg# INSTALL from $prefix/share/util-macros. 11339356f6debSmrg# 1134042941e3bSmrgAC_DEFUN([XORG_INSTALL], [ 1134142941e3bSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1134242941e3bSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1134342941e3bSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1134442941e3bSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1134542941e3bSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1134642941e3bSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1134742941e3bSmrgAC_SUBST([INSTALL_CMD]) 1134842941e3bSmrg]) # XORG_INSTALL 1134942941e3bSmrgdnl Copyright 2005 Red Hat, Inc 1135042941e3bSmrgdnl 1135142941e3bSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1135242941e3bSmrgdnl documentation for any purpose is hereby granted without fee, provided that 1135342941e3bSmrgdnl the above copyright notice appear in all copies and that both that 1135442941e3bSmrgdnl copyright notice and this permission notice appear in supporting 1135542941e3bSmrgdnl documentation. 1135642941e3bSmrgdnl 1135742941e3bSmrgdnl The above copyright notice and this permission notice shall be included 1135842941e3bSmrgdnl in all copies or substantial portions of the Software. 1135942941e3bSmrgdnl 1136042941e3bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1136142941e3bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1136242941e3bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1136342941e3bSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1136442941e3bSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1136542941e3bSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1136642941e3bSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 1136742941e3bSmrgdnl 1136842941e3bSmrgdnl Except as contained in this notice, the name of the copyright holders shall 1136942941e3bSmrgdnl not be used in advertising or otherwise to promote the sale, use or 1137042941e3bSmrgdnl other dealings in this Software without prior written authorization 1137142941e3bSmrgdnl from the copyright holders. 1137242941e3bSmrgdnl 11373356f6debSmrg 1137442941e3bSmrg# XORG_RELEASE_VERSION 1137542941e3bSmrg# -------------------- 1137642941e3bSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1137742941e3bSmrg 1137842941e3bSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1137942941e3bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1138042941e3bSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1138142941e3bSmrg [Major version of this package]) 1138242941e3bSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1138342941e3bSmrg if test "x$PVM" = "x"; then 1138442941e3bSmrg PVM="0" 1138542941e3bSmrg fi 1138642941e3bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1138742941e3bSmrg [$PVM], 1138842941e3bSmrg [Minor version of this package]) 1138942941e3bSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1139042941e3bSmrg if test "x$PVP" = "x"; then 1139142941e3bSmrg PVP="0" 1139242941e3bSmrg fi 1139342941e3bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1139442941e3bSmrg [$PVP], 1139542941e3bSmrg [Patch version of this package]) 1139642941e3bSmrg]) 11397356f6debSmrg 1139842941e3bSmrg# XORG_CHANGELOG() 1139942941e3bSmrg# ---------------- 1140042941e3bSmrg# Minimum version: 1.2.0 1140142941e3bSmrg# 1140242941e3bSmrg# Defines the variable CHANGELOG_CMD as the command to generate 1140342941e3bSmrg# ChangeLog from git. 1140442941e3bSmrg# 1140542941e3bSmrg# 1140642941e3bSmrgAC_DEFUN([XORG_CHANGELOG], [ 1140742941e3bSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1140842941e3bSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1140942941e3bSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1141042941e3bSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1141142941e3bSmrgAC_SUBST([CHANGELOG_CMD]) 1141242941e3bSmrg]) # XORG_CHANGELOG 114136f03b1f6Smrg 11414