aclocal.m4 revision e494fffd
1e494fffdSmrg# generated automatically by aclocal 1.13.2 -*- Autoconf -*- 2e494fffdSmrg 3e494fffdSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4e0963edeSmrg 5e0963edeSmrg# This file is free software; the Free Software Foundation 6e0963edeSmrg# gives unlimited permission to copy and/or distribute it, 7e0963edeSmrg# with or without modifications, as long as this notice is preserved. 8e0963edeSmrg 9e0963edeSmrg# This program is distributed in the hope that it will be useful, 10e0963edeSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11e0963edeSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12e0963edeSmrg# PARTICULAR PURPOSE. 13e0963edeSmrg 14e494fffdSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15e0963edeSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16e0963edeSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1749e108a1Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 1849e108a1Smrg[m4_warning([this file was generated for autoconf 2.68. 19e0963edeSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20e0963edeSmrgIf you have problems, you may need to regenerate the build system entirely. 21e494fffdSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22e0963edeSmrg 23e494fffdSmrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 24f05b35a2Smrg# 2549e108a1Smrg# This file is free software; the Free Software Foundation 2649e108a1Smrg# gives unlimited permission to copy and/or distribute it, 2749e108a1Smrg# with or without modifications, as long as this notice is preserved. 2849e108a1Smrg 2949e108a1Smrg# AM_AUTOMAKE_VERSION(VERSION) 3049e108a1Smrg# ---------------------------- 3149e108a1Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3249e108a1Smrg# generated from the m4 files accompanying Automake X.Y. 3349e108a1Smrg# (This private macro should not be called outside this file.) 3449e108a1SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35e494fffdSmrg[am__api_version='1.13' 3649e108a1Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3749e108a1Smrgdnl require some minimum version. Point them to the right macro. 38e494fffdSmrgm4_if([$1], [1.13.2], [], 3949e108a1Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 4049e108a1Smrg]) 4149e108a1Smrg 4249e108a1Smrg# _AM_AUTOCONF_VERSION(VERSION) 4349e108a1Smrg# ----------------------------- 4449e108a1Smrg# aclocal traces this macro to find the Autoconf version. 4549e108a1Smrg# This is a private macro too. Using m4_define simplifies 4649e108a1Smrg# the logic in aclocal, which can simply ignore this definition. 4749e108a1Smrgm4_define([_AM_AUTOCONF_VERSION], []) 4849e108a1Smrg 4949e108a1Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 5049e108a1Smrg# ------------------------------- 5149e108a1Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5249e108a1Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5349e108a1SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54e494fffdSmrg[AM_AUTOMAKE_VERSION([1.13.2])dnl 5549e108a1Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5649e108a1Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5749e108a1Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 5849e108a1Smrg 5949e108a1Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 6049e108a1Smrg 61e494fffdSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 62f05b35a2Smrg# 6349e108a1Smrg# This file is free software; the Free Software Foundation 6449e108a1Smrg# gives unlimited permission to copy and/or distribute it, 6549e108a1Smrg# with or without modifications, as long as this notice is preserved. 66f05b35a2Smrg 6749e108a1Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68e494fffdSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69e494fffdSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70f05b35a2Smrg# 7149e108a1Smrg# Of course, Automake must honor this variable whenever it calls a 7249e108a1Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7349e108a1Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7449e108a1Smrg# depending on how configure is run. This is pretty annoying, since 7549e108a1Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7649e108a1Smrg# source directory, any form will work fine, but in subdirectories a 7749e108a1Smrg# relative path needs to be adjusted first. 78f05b35a2Smrg# 7949e108a1Smrg# $ac_aux_dir/missing 8049e108a1Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8149e108a1Smrg# $top_srcdir/$ac_aux_dir/missing 8249e108a1Smrg# fails if $ac_aux_dir is absolute, 8349e108a1Smrg# fails when called from a subdirectory in a VPATH build with 8449e108a1Smrg# a relative $ac_aux_dir 85f05b35a2Smrg# 8649e108a1Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8749e108a1Smrg# are both prefixed by $srcdir. In an in-source build this is usually 88e494fffdSmrg# harmless because $srcdir is '.', but things will broke when you 8949e108a1Smrg# start a VPATH build or use an absolute $srcdir. 90f05b35a2Smrg# 9149e108a1Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9249e108a1Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9349e108a1Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9449e108a1Smrg# and then we would define $MISSING as 9549e108a1Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9649e108a1Smrg# This will work as long as MISSING is not called from configure, because 9749e108a1Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9849e108a1Smrg# However there are other variables, like CC, which are often used in 9949e108a1Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100f05b35a2Smrg# 10149e108a1Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10249e108a1Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10349e108a1Smrg# configured tree to be moved without reconfiguration. 104e0963edeSmrg 10549e108a1SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10649e108a1Smrg[dnl Rely on autoconf to set up CDPATH properly. 10749e108a1SmrgAC_PREREQ([2.50])dnl 10849e108a1Smrg# expand $ac_aux_dir to an absolute path 10949e108a1Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 110f05b35a2Smrg]) 111f05b35a2Smrg 11249e108a1Smrg# AM_CONDITIONAL -*- Autoconf -*- 113f05b35a2Smrg 114e494fffdSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 11549e108a1Smrg# 11649e108a1Smrg# This file is free software; the Free Software Foundation 11749e108a1Smrg# gives unlimited permission to copy and/or distribute it, 11849e108a1Smrg# with or without modifications, as long as this notice is preserved. 119e0963edeSmrg 12049e108a1Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12149e108a1Smrg# ------------------------------------- 12249e108a1Smrg# Define a conditional. 12349e108a1SmrgAC_DEFUN([AM_CONDITIONAL], 124e494fffdSmrg[AC_PREREQ([2.52])dnl 125e494fffdSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 126e494fffdSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12749e108a1SmrgAC_SUBST([$1_TRUE])dnl 12849e108a1SmrgAC_SUBST([$1_FALSE])dnl 12949e108a1Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13049e108a1Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13149e108a1Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13249e108a1Smrgif $2; then 13349e108a1Smrg $1_TRUE= 13449e108a1Smrg $1_FALSE='#' 13549e108a1Smrgelse 13649e108a1Smrg $1_TRUE='#' 13749e108a1Smrg $1_FALSE= 13849e108a1Smrgfi 13949e108a1SmrgAC_CONFIG_COMMANDS_PRE( 14049e108a1Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14149e108a1Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14249e108a1SmrgUsually this means the macro was only invoked conditionally.]]) 14349e108a1Smrgfi])]) 144e0963edeSmrg 145e494fffdSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 14649e108a1Smrg# 14749e108a1Smrg# This file is free software; the Free Software Foundation 14849e108a1Smrg# gives unlimited permission to copy and/or distribute it, 14949e108a1Smrg# with or without modifications, as long as this notice is preserved. 150f05b35a2Smrg 151f05b35a2Smrg 152e494fffdSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 15349e108a1Smrg# written in clear, in which case automake, when reading aclocal.m4, 15449e108a1Smrg# will think it sees a *use*, and therefore will trigger all it's 15549e108a1Smrg# C support machinery. Also note that it means that autoscan, seeing 15649e108a1Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 157f05b35a2Smrg 158f05b35a2Smrg 15949e108a1Smrg# _AM_DEPENDENCIES(NAME) 160f05b35a2Smrg# ---------------------- 16149e108a1Smrg# See how the compiler implements dependency checking. 162e494fffdSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 16349e108a1Smrg# We try a few techniques and use that to set a single cache variable. 16449e108a1Smrg# 16549e108a1Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 16649e108a1Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 16749e108a1Smrg# dependency, and given that the user is not expected to run this macro, 16849e108a1Smrg# just rely on AC_PROG_CC. 16949e108a1SmrgAC_DEFUN([_AM_DEPENDENCIES], 17049e108a1Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17149e108a1SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17249e108a1SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17349e108a1SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 174f05b35a2Smrg 175e494fffdSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 176e494fffdSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 177e494fffdSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 178e494fffdSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 179e494fffdSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 180e494fffdSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 181e494fffdSmrg [depcc="$$1" am_compiler_list=]) 182f05b35a2Smrg 18349e108a1SmrgAC_CACHE_CHECK([dependency style of $depcc], 18449e108a1Smrg [am_cv_$1_dependencies_compiler_type], 18549e108a1Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18649e108a1Smrg # We make a subdir and do the tests there. Otherwise we can end up 18749e108a1Smrg # making bogus files that we don't know about and never remove. For 18849e108a1Smrg # instance it was reported that on HP-UX the gcc test will end up 189e494fffdSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 190e494fffdSmrg # in D". 191e494fffdSmrg rm -rf conftest.dir 19249e108a1Smrg mkdir conftest.dir 19349e108a1Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19449e108a1Smrg # using a relative directory. 19549e108a1Smrg cp "$am_depcomp" conftest.dir 19649e108a1Smrg cd conftest.dir 19749e108a1Smrg # We will build objects and dependencies in a subdirectory because 19849e108a1Smrg # it helps to detect inapplicable dependency modes. For instance 19949e108a1Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20049e108a1Smrg # side effect of compilation, but ICC will put the dependencies in 20149e108a1Smrg # the current directory while Tru64 will put them in the object 20249e108a1Smrg # directory. 20349e108a1Smrg mkdir sub 204e0963edeSmrg 20549e108a1Smrg am_cv_$1_dependencies_compiler_type=none 20649e108a1Smrg if test "$am_compiler_list" = ""; then 20749e108a1Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 208e0963edeSmrg fi 20949e108a1Smrg am__universal=false 21049e108a1Smrg m4_case([$1], [CC], 21149e108a1Smrg [case " $depcc " in #( 21249e108a1Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21349e108a1Smrg esac], 21449e108a1Smrg [CXX], 21549e108a1Smrg [case " $depcc " in #( 21649e108a1Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21749e108a1Smrg esac]) 218e0963edeSmrg 21949e108a1Smrg for depmode in $am_compiler_list; do 22049e108a1Smrg # Setup a source with many dependencies, because some compilers 22149e108a1Smrg # like to wrap large dependency lists on column 80 (with \), and 22249e108a1Smrg # we should not choose a depcomp mode which is confused by this. 22349e108a1Smrg # 22449e108a1Smrg # We need to recreate these files for each test, as the compiler may 22549e108a1Smrg # overwrite some of them when testing with obscure command lines. 22649e108a1Smrg # This happens at least with the AIX C compiler. 22749e108a1Smrg : > sub/conftest.c 22849e108a1Smrg for i in 1 2 3 4 5 6; do 22949e108a1Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 230e494fffdSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 231e494fffdSmrg # Solaris 10 /bin/sh. 232e494fffdSmrg echo '/* dummy */' > sub/conftst$i.h 23349e108a1Smrg done 23449e108a1Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 235e0963edeSmrg 236e494fffdSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 23749e108a1Smrg # mode. It turns out that the SunPro C++ compiler does not properly 238e494fffdSmrg # handle '-M -o', and we need to detect this. Also, some Intel 239e494fffdSmrg # versions had trouble with output in subdirs. 24049e108a1Smrg am__obj=sub/conftest.${OBJEXT-o} 24149e108a1Smrg am__minus_obj="-o $am__obj" 24249e108a1Smrg case $depmode in 24349e108a1Smrg gcc) 24449e108a1Smrg # This depmode causes a compiler race in universal mode. 24549e108a1Smrg test "$am__universal" = false || continue 24649e108a1Smrg ;; 24749e108a1Smrg nosideeffect) 248e494fffdSmrg # After this tag, mechanisms are not by side-effect, so they'll 249e494fffdSmrg # only be used when explicitly requested. 25049e108a1Smrg if test "x$enable_dependency_tracking" = xyes; then 25149e108a1Smrg continue 25249e108a1Smrg else 25349e108a1Smrg break 25449e108a1Smrg fi 25549e108a1Smrg ;; 256e494fffdSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 257e494fffdSmrg # This compiler won't grok '-c -o', but also, the minuso test has 25849e108a1Smrg # not run yet. These depmodes are late enough in the game, and 25949e108a1Smrg # so weak that their functioning should not be impacted. 26049e108a1Smrg am__obj=conftest.${OBJEXT-o} 26149e108a1Smrg am__minus_obj= 26249e108a1Smrg ;; 26349e108a1Smrg none) break ;; 26449e108a1Smrg esac 26549e108a1Smrg if depmode=$depmode \ 26649e108a1Smrg source=sub/conftest.c object=$am__obj \ 26749e108a1Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 26849e108a1Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 26949e108a1Smrg >/dev/null 2>conftest.err && 27049e108a1Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27149e108a1Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27249e108a1Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27349e108a1Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27449e108a1Smrg # icc doesn't choke on unknown options, it will just issue warnings 27549e108a1Smrg # or remarks (even with -Werror). So we grep stderr for any message 27649e108a1Smrg # that says an option was ignored or not supported. 27749e108a1Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 27849e108a1Smrg # icc: Command line warning: ignoring option '-M'; no argument required 27949e108a1Smrg # The diagnosis changed in icc 8.0: 28049e108a1Smrg # icc: Command line remark: option '-MP' not supported 28149e108a1Smrg if (grep 'ignoring option' conftest.err || 28249e108a1Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28349e108a1Smrg am_cv_$1_dependencies_compiler_type=$depmode 28449e108a1Smrg break 28549e108a1Smrg fi 28649e108a1Smrg fi 28749e108a1Smrg done 288e0963edeSmrg 28949e108a1Smrg cd .. 29049e108a1Smrg rm -rf conftest.dir 29149e108a1Smrgelse 29249e108a1Smrg am_cv_$1_dependencies_compiler_type=none 29349e108a1Smrgfi 29449e108a1Smrg]) 29549e108a1SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29649e108a1SmrgAM_CONDITIONAL([am__fastdep$1], [ 29749e108a1Smrg test "x$enable_dependency_tracking" != xno \ 29849e108a1Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 29949e108a1Smrg]) 300e0963edeSmrg 301e0963edeSmrg 30249e108a1Smrg# AM_SET_DEPDIR 30349e108a1Smrg# ------------- 30449e108a1Smrg# Choose a directory name for dependency files. 305e494fffdSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 30649e108a1SmrgAC_DEFUN([AM_SET_DEPDIR], 30749e108a1Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 30849e108a1SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 30949e108a1Smrg]) 310e0963edeSmrg 311e0963edeSmrg 31249e108a1Smrg# AM_DEP_TRACK 31349e108a1Smrg# ------------ 31449e108a1SmrgAC_DEFUN([AM_DEP_TRACK], 315e494fffdSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 316e494fffdSmrgAS_HELP_STRING( 317e494fffdSmrg [--enable-dependency-tracking], 318e494fffdSmrg [do not reject slow dependency extractors]) 319e494fffdSmrgAS_HELP_STRING( 320e494fffdSmrg [--disable-dependency-tracking], 321e494fffdSmrg [speeds up one-time build])]) 32249e108a1Smrgif test "x$enable_dependency_tracking" != xno; then 32349e108a1Smrg am_depcomp="$ac_aux_dir/depcomp" 32449e108a1Smrg AMDEPBACKSLASH='\' 325e494fffdSmrg am__nodep='_no' 32649e108a1Smrgfi 32749e108a1SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32849e108a1SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32949e108a1Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 330e494fffdSmrgAC_SUBST([am__nodep])dnl 331e494fffdSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 33249e108a1Smrg]) 333e0963edeSmrg 33449e108a1Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 335e0963edeSmrg 336e494fffdSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 33749e108a1Smrg# 33849e108a1Smrg# This file is free software; the Free Software Foundation 33949e108a1Smrg# gives unlimited permission to copy and/or distribute it, 34049e108a1Smrg# with or without modifications, as long as this notice is preserved. 341f05b35a2Smrg 342f05b35a2Smrg 34349e108a1Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 344f05b35a2Smrg# ------------------------------ 34549e108a1SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34649e108a1Smrg[{ 347e494fffdSmrg # Older Autoconf quotes --file arguments for eval, but not when files 34849e108a1Smrg # are listed without --file. Let's play safe and only enable the eval 34949e108a1Smrg # if we detect the quoting. 35049e108a1Smrg case $CONFIG_FILES in 35149e108a1Smrg *\'*) eval set x "$CONFIG_FILES" ;; 35249e108a1Smrg *) set x $CONFIG_FILES ;; 35349e108a1Smrg esac 35449e108a1Smrg shift 35549e108a1Smrg for mf 35649e108a1Smrg do 35749e108a1Smrg # Strip MF so we end up with the name of the file. 35849e108a1Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35949e108a1Smrg # Check whether this is an Automake generated Makefile or not. 360e494fffdSmrg # We used to match only the files named 'Makefile.in', but 36149e108a1Smrg # some people rename them; so instead we look at the file content. 36249e108a1Smrg # Grep'ing the first line is not enough: some people post-process 36349e108a1Smrg # each Makefile.in and add a new line on top of each file to say so. 36449e108a1Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36549e108a1Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36649e108a1Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36749e108a1Smrg dirpart=`AS_DIRNAME("$mf")` 36849e108a1Smrg else 36949e108a1Smrg continue 37049e108a1Smrg fi 37149e108a1Smrg # Extract the definition of DEPDIR, am__include, and am__quote 372e494fffdSmrg # from the Makefile without running 'make'. 37349e108a1Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37449e108a1Smrg test -z "$DEPDIR" && continue 37549e108a1Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 376e494fffdSmrg test -z "$am__include" && continue 37749e108a1Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37849e108a1Smrg # Find all dependency output files, they are included files with 37949e108a1Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 38049e108a1Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38149e108a1Smrg # expansion. 38249e108a1Smrg for file in `sed -n " 38349e108a1Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 384e494fffdSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 38549e108a1Smrg # Make sure the directory exists. 38649e108a1Smrg test -f "$dirpart/$file" && continue 38749e108a1Smrg fdir=`AS_DIRNAME(["$file"])` 38849e108a1Smrg AS_MKDIR_P([$dirpart/$fdir]) 38949e108a1Smrg # echo "creating $dirpart/$file" 39049e108a1Smrg echo '# dummy' > "$dirpart/$file" 39149e108a1Smrg done 39249e108a1Smrg done 39349e108a1Smrg} 39449e108a1Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 395f05b35a2Smrg 396f05b35a2Smrg 39749e108a1Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39849e108a1Smrg# ----------------------------- 39949e108a1Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 40049e108a1Smrg# 40149e108a1Smrg# This code is only required when automatic dependency tracking 402e494fffdSmrg# is enabled. FIXME. This creates each '.P' file that we will 40349e108a1Smrg# need in order to bootstrap the dependency handling code. 40449e108a1SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40549e108a1Smrg[AC_CONFIG_COMMANDS([depfiles], 40649e108a1Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40749e108a1Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 408f05b35a2Smrg]) 409f05b35a2Smrg 41049e108a1Smrg# Do all the work for Automake. -*- Autoconf -*- 411f05b35a2Smrg 412e494fffdSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 41349e108a1Smrg# 41449e108a1Smrg# This file is free software; the Free Software Foundation 41549e108a1Smrg# gives unlimited permission to copy and/or distribute it, 41649e108a1Smrg# with or without modifications, as long as this notice is preserved. 417f05b35a2Smrg 41849e108a1Smrg# This macro actually does too much. Some checks are only needed if 41949e108a1Smrg# your package does certain things. But this isn't really a big deal. 420f05b35a2Smrg 42149e108a1Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 42249e108a1Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 42349e108a1Smrg# ----------------------------------------------- 42449e108a1Smrg# The call with PACKAGE and VERSION arguments is the old style 42549e108a1Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 42649e108a1Smrg# and VERSION should now be passed to AC_INIT and removed from 42749e108a1Smrg# the call to AM_INIT_AUTOMAKE. 42849e108a1Smrg# We support both call styles for the transition. After 42949e108a1Smrg# the next Automake release, Autoconf can make the AC_INIT 43049e108a1Smrg# arguments mandatory, and then we can depend on a new Autoconf 43149e108a1Smrg# release and drop the old call support. 43249e108a1SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 433e494fffdSmrg[AC_PREREQ([2.65])dnl 43449e108a1Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 43549e108a1Smrgdnl the ones we care about. 43649e108a1Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 43749e108a1SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 43849e108a1SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 43949e108a1Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 44049e108a1Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 44149e108a1Smrg # is not polluted with repeated "-I." 44249e108a1Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 44349e108a1Smrg # test to see if srcdir already configured 44449e108a1Smrg if test -f $srcdir/config.status; then 44549e108a1Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 44649e108a1Smrg fi 44749e108a1Smrgfi 448f05b35a2Smrg 44949e108a1Smrg# test whether we have cygpath 45049e108a1Smrgif test -z "$CYGPATH_W"; then 45149e108a1Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 45249e108a1Smrg CYGPATH_W='cygpath -w' 45349e108a1Smrg else 45449e108a1Smrg CYGPATH_W=echo 45549e108a1Smrg fi 45649e108a1Smrgfi 45749e108a1SmrgAC_SUBST([CYGPATH_W]) 458f05b35a2Smrg 45949e108a1Smrg# Define the identity of the package. 46049e108a1Smrgdnl Distinguish between old-style and new-style calls. 46149e108a1Smrgm4_ifval([$2], 462e494fffdSmrg[AC_DIAGNOSE([obsolete], 463e494fffdSmrg [$0: two- and three-arguments forms are deprecated.]) 464e494fffdSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 46549e108a1Smrg AC_SUBST([PACKAGE], [$1])dnl 46649e108a1Smrg AC_SUBST([VERSION], [$2])], 46749e108a1Smrg[_AM_SET_OPTIONS([$1])dnl 46849e108a1Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 469e494fffdSmrgm4_if( 470e494fffdSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 471e494fffdSmrg [ok:ok],, 47249e108a1Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 47349e108a1Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 47449e108a1Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 475f05b35a2Smrg 47649e108a1Smrg_AM_IF_OPTION([no-define],, 477e494fffdSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 478e494fffdSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 479f05b35a2Smrg 48049e108a1Smrg# Some tools Automake needs. 48149e108a1SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 48249e108a1SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 483e494fffdSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 484e494fffdSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 485e494fffdSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 486e494fffdSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 487e494fffdSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 48849e108a1SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 48949e108a1SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 490e494fffdSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 491e494fffdSmrg# For better backward compatibility. To be removed once Automake 1.9.x 492e494fffdSmrg# dies out for good. For more background, see: 493e494fffdSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 494e494fffdSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 495e494fffdSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 49649e108a1Smrg# We need awk for the "check" target. The system "awk" is bad on 49749e108a1Smrg# some platforms. 49849e108a1SmrgAC_REQUIRE([AC_PROG_AWK])dnl 49949e108a1SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50049e108a1SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50149e108a1Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50249e108a1Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50349e108a1Smrg [_AM_PROG_TAR([v7])])]) 50449e108a1Smrg_AM_IF_OPTION([no-dependencies],, 50549e108a1Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 506e494fffdSmrg [_AM_DEPENDENCIES([CC])], 507e494fffdSmrg [m4_define([AC_PROG_CC], 508e494fffdSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 50949e108a1SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 510e494fffdSmrg [_AM_DEPENDENCIES([CXX])], 511e494fffdSmrg [m4_define([AC_PROG_CXX], 512e494fffdSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 51349e108a1SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 514e494fffdSmrg [_AM_DEPENDENCIES([OBJC])], 515e494fffdSmrg [m4_define([AC_PROG_OBJC], 516e494fffdSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 517e494fffdSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 518e494fffdSmrg [_AM_DEPENDENCIES([OBJCXX])], 519e494fffdSmrg [m4_define([AC_PROG_OBJCXX], 520e494fffdSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 52149e108a1Smrg]) 522e494fffdSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 523e494fffdSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 524e494fffdSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 525e494fffdSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 52649e108a1SmrgAC_CONFIG_COMMANDS_PRE(dnl 52749e108a1Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52849e108a1Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 529f05b35a2Smrg]) 530f05b35a2Smrg 531e494fffdSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53249e108a1Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53349e108a1Smrgdnl mangled by Autoconf and run in a shell conditional statement. 53449e108a1Smrgm4_define([_AC_COMPILER_EXEEXT], 53549e108a1Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 536f05b35a2Smrg 537f05b35a2Smrg 53849e108a1Smrg# When config.status generates a header, we must update the stamp-h file. 53949e108a1Smrg# This file resides in the same directory as the config header 54049e108a1Smrg# that is generated. The stamp files are numbered to have different names. 541f05b35a2Smrg 54249e108a1Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 54349e108a1Smrg# loop where config.status creates the headers, so we can generate 54449e108a1Smrg# our stamp files there. 54549e108a1SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 54649e108a1Smrg[# Compute $1's index in $config_headers. 54749e108a1Smrg_am_arg=$1 54849e108a1Smrg_am_stamp_count=1 54949e108a1Smrgfor _am_header in $config_headers :; do 55049e108a1Smrg case $_am_header in 55149e108a1Smrg $_am_arg | $_am_arg:* ) 55249e108a1Smrg break ;; 55349e108a1Smrg * ) 55449e108a1Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 55549e108a1Smrg esac 55649e108a1Smrgdone 55749e108a1Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 558f05b35a2Smrg 559e494fffdSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 56049e108a1Smrg# 56149e108a1Smrg# This file is free software; the Free Software Foundation 56249e108a1Smrg# gives unlimited permission to copy and/or distribute it, 56349e108a1Smrg# with or without modifications, as long as this notice is preserved. 564f05b35a2Smrg 56549e108a1Smrg# AM_PROG_INSTALL_SH 56649e108a1Smrg# ------------------ 56749e108a1Smrg# Define $install_sh. 56849e108a1SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 56949e108a1Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57049e108a1Smrgif test x"${install_sh}" != xset; then 57149e108a1Smrg case $am_aux_dir in 57249e108a1Smrg *\ * | *\ *) 57349e108a1Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57449e108a1Smrg *) 57549e108a1Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57649e108a1Smrg esac 57749e108a1Smrgfi 578e494fffdSmrgAC_SUBST([install_sh])]) 579f05b35a2Smrg 580e494fffdSmrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 58149e108a1Smrg# 58249e108a1Smrg# This file is free software; the Free Software Foundation 58349e108a1Smrg# gives unlimited permission to copy and/or distribute it, 58449e108a1Smrg# with or without modifications, as long as this notice is preserved. 585f05b35a2Smrg 58649e108a1Smrg# Check whether the underlying file-system supports filenames 58749e108a1Smrg# with a leading dot. For instance MS-DOS doesn't. 58849e108a1SmrgAC_DEFUN([AM_SET_LEADING_DOT], 58949e108a1Smrg[rm -rf .tst 2>/dev/null 59049e108a1Smrgmkdir .tst 2>/dev/null 59149e108a1Smrgif test -d .tst; then 59249e108a1Smrg am__leading_dot=. 59349e108a1Smrgelse 59449e108a1Smrg am__leading_dot=_ 59549e108a1Smrgfi 59649e108a1Smrgrmdir .tst 2>/dev/null 59749e108a1SmrgAC_SUBST([am__leading_dot])]) 598f05b35a2Smrg 59949e108a1Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 60049e108a1Smrg 601e494fffdSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 602f05b35a2Smrg# 60349e108a1Smrg# This file is free software; the Free Software Foundation 60449e108a1Smrg# gives unlimited permission to copy and/or distribute it, 60549e108a1Smrg# with or without modifications, as long as this notice is preserved. 606f05b35a2Smrg 60749e108a1Smrg# AM_MAKE_INCLUDE() 60849e108a1Smrg# ----------------- 60949e108a1Smrg# Check to see how make treats includes. 61049e108a1SmrgAC_DEFUN([AM_MAKE_INCLUDE], 61149e108a1Smrg[am_make=${MAKE-make} 61249e108a1Smrgcat > confinc << 'END' 61349e108a1Smrgam__doit: 61449e108a1Smrg @echo this is the am__doit target 61549e108a1Smrg.PHONY: am__doit 61649e108a1SmrgEND 61749e108a1Smrg# If we don't find an include directive, just comment out the code. 61849e108a1SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 61949e108a1Smrgam__include="#" 62049e108a1Smrgam__quote= 62149e108a1Smrg_am_result=none 62249e108a1Smrg# First try GNU make style include. 62349e108a1Smrgecho "include confinc" > confmf 624e494fffdSmrg# Ignore all kinds of additional output from 'make'. 62549e108a1Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 62649e108a1Smrg*the\ am__doit\ target*) 62749e108a1Smrg am__include=include 62849e108a1Smrg am__quote= 62949e108a1Smrg _am_result=GNU 63049e108a1Smrg ;; 63149e108a1Smrgesac 63249e108a1Smrg# Now try BSD make style include. 63349e108a1Smrgif test "$am__include" = "#"; then 63449e108a1Smrg echo '.include "confinc"' > confmf 63549e108a1Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 63649e108a1Smrg *the\ am__doit\ target*) 63749e108a1Smrg am__include=.include 63849e108a1Smrg am__quote="\"" 63949e108a1Smrg _am_result=BSD 64049e108a1Smrg ;; 64149e108a1Smrg esac 64249e108a1Smrgfi 64349e108a1SmrgAC_SUBST([am__include]) 64449e108a1SmrgAC_SUBST([am__quote]) 64549e108a1SmrgAC_MSG_RESULT([$_am_result]) 64649e108a1Smrgrm -f confinc confmf 64749e108a1Smrg]) 648f05b35a2Smrg 64949e108a1Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 650f05b35a2Smrg 651e494fffdSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 65249e108a1Smrg# 65349e108a1Smrg# This file is free software; the Free Software Foundation 65449e108a1Smrg# gives unlimited permission to copy and/or distribute it, 65549e108a1Smrg# with or without modifications, as long as this notice is preserved. 656f05b35a2Smrg 65749e108a1Smrg# AM_MISSING_PROG(NAME, PROGRAM) 658f05b35a2Smrg# ------------------------------ 65949e108a1SmrgAC_DEFUN([AM_MISSING_PROG], 66049e108a1Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 66149e108a1Smrg$1=${$1-"${am_missing_run}$2"} 66249e108a1SmrgAC_SUBST($1)]) 663f05b35a2Smrg 66449e108a1Smrg# AM_MISSING_HAS_RUN 66549e108a1Smrg# ------------------ 666e494fffdSmrg# Define MISSING if not defined so far and test if it is modern enough. 667e494fffdSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 66849e108a1SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 66949e108a1Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 67049e108a1SmrgAC_REQUIRE_AUX_FILE([missing])dnl 67149e108a1Smrgif test x"${MISSING+set}" != xset; then 67249e108a1Smrg case $am_aux_dir in 67349e108a1Smrg *\ * | *\ *) 67449e108a1Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 67549e108a1Smrg *) 67649e108a1Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 67749e108a1Smrg esac 67849e108a1Smrgfi 67949e108a1Smrg# Use eval to expand $SHELL 680e494fffdSmrgif eval "$MISSING --is-lightweight"; then 681e494fffdSmrg am_missing_run="$MISSING " 68249e108a1Smrgelse 68349e108a1Smrg am_missing_run= 684e494fffdSmrg AC_MSG_WARN(['missing' script is too old or missing]) 68549e108a1Smrgfi 68649e108a1Smrg]) 687f05b35a2Smrg 68849e108a1Smrg# Helper functions for option handling. -*- Autoconf -*- 689f05b35a2Smrg 690e494fffdSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 69149e108a1Smrg# 69249e108a1Smrg# This file is free software; the Free Software Foundation 69349e108a1Smrg# gives unlimited permission to copy and/or distribute it, 69449e108a1Smrg# with or without modifications, as long as this notice is preserved. 695f05b35a2Smrg 69649e108a1Smrg# _AM_MANGLE_OPTION(NAME) 69749e108a1Smrg# ----------------------- 69849e108a1SmrgAC_DEFUN([_AM_MANGLE_OPTION], 69949e108a1Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 700f05b35a2Smrg 70149e108a1Smrg# _AM_SET_OPTION(NAME) 702e494fffdSmrg# -------------------- 70349e108a1Smrg# Set option NAME. Presently that only means defining a flag for this option. 70449e108a1SmrgAC_DEFUN([_AM_SET_OPTION], 705e494fffdSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 706f05b35a2Smrg 70749e108a1Smrg# _AM_SET_OPTIONS(OPTIONS) 708e494fffdSmrg# ------------------------ 70949e108a1Smrg# OPTIONS is a space-separated list of Automake options. 71049e108a1SmrgAC_DEFUN([_AM_SET_OPTIONS], 71149e108a1Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 712f05b35a2Smrg 71349e108a1Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 71449e108a1Smrg# ------------------------------------------- 71549e108a1Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 71649e108a1SmrgAC_DEFUN([_AM_IF_OPTION], 71749e108a1Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 718f05b35a2Smrg 71949e108a1Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 720f05b35a2Smrg 721e494fffdSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 72249e108a1Smrg# 72349e108a1Smrg# This file is free software; the Free Software Foundation 72449e108a1Smrg# gives unlimited permission to copy and/or distribute it, 72549e108a1Smrg# with or without modifications, as long as this notice is preserved. 726f05b35a2Smrg 72749e108a1Smrg# AM_SANITY_CHECK 72849e108a1Smrg# --------------- 72949e108a1SmrgAC_DEFUN([AM_SANITY_CHECK], 73049e108a1Smrg[AC_MSG_CHECKING([whether build environment is sane]) 73149e108a1Smrg# Reject unsafe characters in $srcdir or the absolute working directory 73249e108a1Smrg# name. Accept space and tab only in the latter. 73349e108a1Smrgam_lf=' 73449e108a1Smrg' 73549e108a1Smrgcase `pwd` in 73649e108a1Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 73749e108a1Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 73849e108a1Smrgesac 73949e108a1Smrgcase $srcdir in 74049e108a1Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 741e494fffdSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 74249e108a1Smrgesac 743f05b35a2Smrg 744e494fffdSmrg# Do 'set' in a subshell so we don't clobber the current shell's 74549e108a1Smrg# arguments. Must try -L first in case configure is actually a 74649e108a1Smrg# symlink; some systems play weird games with the mod time of symlinks 74749e108a1Smrg# (eg FreeBSD returns the mod time of the symlink's containing 74849e108a1Smrg# directory). 74949e108a1Smrgif ( 750e494fffdSmrg am_has_slept=no 751e494fffdSmrg for am_try in 1 2; do 752e494fffdSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 753e494fffdSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 754e494fffdSmrg if test "$[*]" = "X"; then 755e494fffdSmrg # -L didn't work. 756e494fffdSmrg set X `ls -t "$srcdir/configure" conftest.file` 757e494fffdSmrg fi 758e494fffdSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 759e494fffdSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 760e494fffdSmrg 761e494fffdSmrg # If neither matched, then we have a broken ls. This can happen 762e494fffdSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 763e494fffdSmrg # broken ls alias from the environment. This has actually 764e494fffdSmrg # happened. Such a system could not be considered "sane". 765e494fffdSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 766e494fffdSmrg alias in your environment]) 767e494fffdSmrg fi 768e494fffdSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 769e494fffdSmrg break 770e494fffdSmrg fi 771e494fffdSmrg # Just in case. 772e494fffdSmrg sleep 1 773e494fffdSmrg am_has_slept=yes 774e494fffdSmrg done 77549e108a1Smrg test "$[2]" = conftest.file 77649e108a1Smrg ) 77749e108a1Smrgthen 77849e108a1Smrg # Ok. 77949e108a1Smrg : 78049e108a1Smrgelse 78149e108a1Smrg AC_MSG_ERROR([newly created file is older than distributed files! 78249e108a1SmrgCheck your system clock]) 783f05b35a2Smrgfi 784e494fffdSmrgAC_MSG_RESULT([yes]) 785e494fffdSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 786e494fffdSmrg# generated files are strictly newer. 787e494fffdSmrgam_sleep_pid= 788e494fffdSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 789e494fffdSmrg ( sleep 1 ) & 790e494fffdSmrg am_sleep_pid=$! 791e494fffdSmrgfi 792e494fffdSmrgAC_CONFIG_COMMANDS_PRE( 793e494fffdSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 794e494fffdSmrg if test -n "$am_sleep_pid"; then 795e494fffdSmrg # Hide warnings about reused PIDs. 796e494fffdSmrg wait $am_sleep_pid 2>/dev/null 797e494fffdSmrg fi 798e494fffdSmrg AC_MSG_RESULT([done])]) 799e494fffdSmrgrm -f conftest.file 800e494fffdSmrg]) 801f05b35a2Smrg 802e494fffdSmrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 80349e108a1Smrg# 80449e108a1Smrg# This file is free software; the Free Software Foundation 80549e108a1Smrg# gives unlimited permission to copy and/or distribute it, 80649e108a1Smrg# with or without modifications, as long as this notice is preserved. 807f05b35a2Smrg 80849e108a1Smrg# AM_SILENT_RULES([DEFAULT]) 80949e108a1Smrg# -------------------------- 81049e108a1Smrg# Enable less verbose build rules; with the default set to DEFAULT 811e494fffdSmrg# ("yes" being less verbose, "no" or empty being verbose). 81249e108a1SmrgAC_DEFUN([AM_SILENT_RULES], 813e494fffdSmrg[AC_ARG_ENABLE([silent-rules], [dnl 814e494fffdSmrgAS_HELP_STRING( 815e494fffdSmrg [--enable-silent-rules], 816e494fffdSmrg [less verbose build output (undo: "make V=1")]) 817e494fffdSmrgAS_HELP_STRING( 818e494fffdSmrg [--disable-silent-rules], 819e494fffdSmrg [verbose build output (undo: "make V=0")])dnl 820e494fffdSmrg]) 821e494fffdSmrgcase $enable_silent_rules in @%:@ ((( 822e494fffdSmrg yes) AM_DEFAULT_VERBOSITY=0;; 823e494fffdSmrg no) AM_DEFAULT_VERBOSITY=1;; 824e494fffdSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 82549e108a1Smrgesac 826e494fffdSmrgdnl 827e494fffdSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 828e494fffdSmrgdnl do not support nested variable expansions. 829e494fffdSmrgdnl See automake bug#9928 and bug#10237. 830e494fffdSmrgam_make=${MAKE-make} 831e494fffdSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 832e494fffdSmrg [am_cv_make_support_nested_variables], 833e494fffdSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 834e494fffdSmrgBAR0=false 835e494fffdSmrgBAR1=true 836e494fffdSmrgV=1 837e494fffdSmrgam__doit: 838e494fffdSmrg @$(TRUE) 839e494fffdSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 840e494fffdSmrg am_cv_make_support_nested_variables=yes 841e494fffdSmrgelse 842e494fffdSmrg am_cv_make_support_nested_variables=no 843e494fffdSmrgfi]) 844e494fffdSmrgif test $am_cv_make_support_nested_variables = yes; then 845e494fffdSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 846e494fffdSmrg AM_V='$(V)' 847e494fffdSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 848e494fffdSmrgelse 849e494fffdSmrg AM_V=$AM_DEFAULT_VERBOSITY 850e494fffdSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 851e494fffdSmrgfi 852e494fffdSmrgAC_SUBST([AM_V])dnl 853e494fffdSmrgAM_SUBST_NOTMAKE([AM_V])dnl 854e494fffdSmrgAC_SUBST([AM_DEFAULT_V])dnl 855e494fffdSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 85649e108a1SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 85749e108a1SmrgAM_BACKSLASH='\' 85849e108a1SmrgAC_SUBST([AM_BACKSLASH])dnl 85949e108a1Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 86049e108a1Smrg]) 861f05b35a2Smrg 862e494fffdSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 863f05b35a2Smrg# 86449e108a1Smrg# This file is free software; the Free Software Foundation 86549e108a1Smrg# gives unlimited permission to copy and/or distribute it, 86649e108a1Smrg# with or without modifications, as long as this notice is preserved. 867f05b35a2Smrg 86849e108a1Smrg# AM_PROG_INSTALL_STRIP 86949e108a1Smrg# --------------------- 870e494fffdSmrg# One issue with vendor 'install' (even GNU) is that you can't 87149e108a1Smrg# specify the program used to strip binaries. This is especially 87249e108a1Smrg# annoying in cross-compiling environments, where the build's strip 87349e108a1Smrg# is unlikely to handle the host's binaries. 87449e108a1Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 875e494fffdSmrg# always use install-sh in "make install-strip", and initialize 87649e108a1Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 87749e108a1SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 87849e108a1Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 879e494fffdSmrg# Installed binaries are usually stripped using 'strip' when the user 880e494fffdSmrg# run "make install-strip". However 'strip' might not be the right 88149e108a1Smrg# tool to use in cross-compilation environments, therefore Automake 882e494fffdSmrg# will honor the 'STRIP' environment variable to overrule this program. 883e494fffdSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 88449e108a1Smrgif test "$cross_compiling" != no; then 88549e108a1Smrg AC_CHECK_TOOL([STRIP], [strip], :) 886f05b35a2Smrgfi 88749e108a1SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 88849e108a1SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 889f05b35a2Smrg 890e494fffdSmrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 89149e108a1Smrg# 89249e108a1Smrg# This file is free software; the Free Software Foundation 89349e108a1Smrg# gives unlimited permission to copy and/or distribute it, 89449e108a1Smrg# with or without modifications, as long as this notice is preserved. 895f05b35a2Smrg 89649e108a1Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 89749e108a1Smrg# --------------------------- 89849e108a1Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 89949e108a1Smrg# This macro is traced by Automake. 90049e108a1SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 901f05b35a2Smrg 90249e108a1Smrg# AM_SUBST_NOTMAKE(VARIABLE) 903e494fffdSmrg# -------------------------- 90449e108a1Smrg# Public sister of _AM_SUBST_NOTMAKE. 90549e108a1SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 906f05b35a2Smrg 90749e108a1Smrg# Check how to create a tarball. -*- Autoconf -*- 908f05b35a2Smrg 909e494fffdSmrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 91049e108a1Smrg# 91149e108a1Smrg# This file is free software; the Free Software Foundation 91249e108a1Smrg# gives unlimited permission to copy and/or distribute it, 91349e108a1Smrg# with or without modifications, as long as this notice is preserved. 914f05b35a2Smrg 91549e108a1Smrg# _AM_PROG_TAR(FORMAT) 91649e108a1Smrg# -------------------- 91749e108a1Smrg# Check how to create a tarball in format FORMAT. 918e494fffdSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 91949e108a1Smrg# 92049e108a1Smrg# Substitute a variable $(am__tar) that is a command 92149e108a1Smrg# writing to stdout a FORMAT-tarball containing the directory 92249e108a1Smrg# $tardir. 92349e108a1Smrg# tardir=directory && $(am__tar) > result.tar 92449e108a1Smrg# 92549e108a1Smrg# Substitute a variable $(am__untar) that extract such 92649e108a1Smrg# a tarball read from stdin. 92749e108a1Smrg# $(am__untar) < result.tar 92867ab2ff2Smrg# 929e494fffdSmrgAC_DEFUN([_AM_PROG_TAR], 930e494fffdSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 931e494fffdSmrg# in the wild :-( We should find a proper way to deprecate it ... 932e494fffdSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 933e0963edeSmrg 934e494fffdSmrg# We'll loop over all known methods to create a tar archive until one works. 935e494fffdSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 936f05b35a2Smrg 937e494fffdSmrgm4_if([$1], [v7], 938e494fffdSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 939e494fffdSmrg 940e494fffdSmrg [m4_case([$1], 941e494fffdSmrg [ustar], 942e494fffdSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 943e494fffdSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 944e494fffdSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 945e494fffdSmrg # and bug#13588). 946e494fffdSmrg am_max_uid=2097151 # 2^21 - 1 947e494fffdSmrg am_max_gid=$am_max_uid 948e494fffdSmrg # The $UID and $GID variables are not portable, so we need to resort 949e494fffdSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 950e494fffdSmrg # below are definitely unexpected, so allow the users to see them 951e494fffdSmrg # (that is, avoid stderr redirection). 952e494fffdSmrg am_uid=`id -u || echo unknown` 953e494fffdSmrg am_gid=`id -g || echo unknown` 954e494fffdSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 955e494fffdSmrg if test $am_uid -le $am_max_uid; then 956e494fffdSmrg AC_MSG_RESULT([yes]) 957e494fffdSmrg else 958e494fffdSmrg AC_MSG_RESULT([no]) 959e494fffdSmrg _am_tools=none 960e494fffdSmrg fi 961e494fffdSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 962e494fffdSmrg if test $am_gid -le $am_max_gid; then 963e494fffdSmrg AC_MSG_RESULT([yes]) 964e494fffdSmrg else 965e494fffdSmrg AC_MSG_RESULT([no]) 966e494fffdSmrg _am_tools=none 967e494fffdSmrg fi], 968e0963edeSmrg 969e494fffdSmrg [pax], 970e494fffdSmrg [], 971e0963edeSmrg 972e494fffdSmrg [m4_fatal([Unknown tar format])]) 973e0963edeSmrg 974e494fffdSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 975e0963edeSmrg 976e494fffdSmrg # Go ahead even if we have the value already cached. We do so because we 977e494fffdSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 978e494fffdSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 97949e108a1Smrg 980e494fffdSmrg for _am_tool in $_am_tools; do 981e494fffdSmrg case $_am_tool in 982e494fffdSmrg gnutar) 983e494fffdSmrg for _am_tar in tar gnutar gtar; do 984e494fffdSmrg AM_RUN_LOG([$_am_tar --version]) && break 985e494fffdSmrg done 986e494fffdSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 987e494fffdSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 988e494fffdSmrg am__untar="$_am_tar -xf -" 989e494fffdSmrg ;; 990e494fffdSmrg plaintar) 991e494fffdSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 992e494fffdSmrg # ustar tarball either. 993e494fffdSmrg (tar --version) >/dev/null 2>&1 && continue 994e494fffdSmrg am__tar='tar chf - "$$tardir"' 995e494fffdSmrg am__tar_='tar chf - "$tardir"' 996e494fffdSmrg am__untar='tar xf -' 997e494fffdSmrg ;; 998e494fffdSmrg pax) 999e494fffdSmrg am__tar='pax -L -x $1 -w "$$tardir"' 1000e494fffdSmrg am__tar_='pax -L -x $1 -w "$tardir"' 1001e494fffdSmrg am__untar='pax -r' 1002e494fffdSmrg ;; 1003e494fffdSmrg cpio) 1004e494fffdSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1005e494fffdSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1006e494fffdSmrg am__untar='cpio -i -H $1 -d' 1007e494fffdSmrg ;; 1008e494fffdSmrg none) 1009e494fffdSmrg am__tar=false 1010e494fffdSmrg am__tar_=false 1011e494fffdSmrg am__untar=false 1012e494fffdSmrg ;; 1013e494fffdSmrg esac 1014e0963edeSmrg 1015e494fffdSmrg # If the value was cached, stop now. We just wanted to have am__tar 1016e494fffdSmrg # and am__untar set. 1017e494fffdSmrg test -n "${am_cv_prog_tar_$1}" && break 1018e494fffdSmrg 1019e494fffdSmrg # tar/untar a dummy directory, and stop if the command works. 1020e494fffdSmrg rm -rf conftest.dir 1021e494fffdSmrg mkdir conftest.dir 1022e494fffdSmrg echo GrepMe > conftest.dir/file 1023e494fffdSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1024e494fffdSmrg rm -rf conftest.dir 1025e494fffdSmrg if test -s conftest.tar; then 1026e494fffdSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1027e494fffdSmrg AM_RUN_LOG([cat conftest.dir/file]) 1028e494fffdSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1029e494fffdSmrg fi 1030e494fffdSmrg done 1031e494fffdSmrg rm -rf conftest.dir 103267ab2ff2Smrg 1033e494fffdSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1034e494fffdSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 103567ab2ff2Smrg 1036e494fffdSmrgAC_SUBST([am__tar]) 1037e494fffdSmrgAC_SUBST([am__untar]) 1038e494fffdSmrg]) # _AM_PROG_TAR 1039e0963edeSmrg 104067ab2ff2Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 104167ab2ff2Smrg# 104267ab2ff2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1043e494fffdSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1044e494fffdSmrg# Foundation, Inc. 104567ab2ff2Smrg# Written by Gordon Matzigkeit, 1996 104667ab2ff2Smrg# 104767ab2ff2Smrg# This file is free software; the Free Software Foundation gives 104867ab2ff2Smrg# unlimited permission to copy and/or distribute it, with or without 104967ab2ff2Smrg# modifications, as long as this notice is preserved. 1050e0963edeSmrg 105167ab2ff2Smrgm4_define([_LT_COPYING], [dnl 105267ab2ff2Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1053e494fffdSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1054e494fffdSmrg# Foundation, Inc. 105567ab2ff2Smrg# Written by Gordon Matzigkeit, 1996 105649e108a1Smrg# 105767ab2ff2Smrg# This file is part of GNU Libtool. 105867ab2ff2Smrg# 105967ab2ff2Smrg# GNU Libtool is free software; you can redistribute it and/or 106067ab2ff2Smrg# modify it under the terms of the GNU General Public License as 106167ab2ff2Smrg# published by the Free Software Foundation; either version 2 of 106267ab2ff2Smrg# the License, or (at your option) any later version. 106367ab2ff2Smrg# 106467ab2ff2Smrg# As a special exception to the GNU General Public License, 106567ab2ff2Smrg# if you distribute this file as part of a program or library that 106667ab2ff2Smrg# is built using GNU Libtool, you may include this file under the 106767ab2ff2Smrg# same distribution terms that you use for the rest of that program. 106867ab2ff2Smrg# 106967ab2ff2Smrg# GNU Libtool is distributed in the hope that it will be useful, 107067ab2ff2Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 107167ab2ff2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 107267ab2ff2Smrg# GNU General Public License for more details. 107367ab2ff2Smrg# 107467ab2ff2Smrg# You should have received a copy of the GNU General Public License 107567ab2ff2Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 107667ab2ff2Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 107767ab2ff2Smrg# obtained by writing to the Free Software Foundation, Inc., 107867ab2ff2Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 107967ab2ff2Smrg]) 1080f05b35a2Smrg 108167ab2ff2Smrg# serial 57 LT_INIT 1082f05b35a2Smrg 1083e0963edeSmrg 108467ab2ff2Smrg# LT_PREREQ(VERSION) 108567ab2ff2Smrg# ------------------ 108667ab2ff2Smrg# Complain and exit if this libtool version is less that VERSION. 108767ab2ff2Smrgm4_defun([LT_PREREQ], 108867ab2ff2Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 108967ab2ff2Smrg [m4_default([$3], 109067ab2ff2Smrg [m4_fatal([Libtool version $1 or higher is required], 109167ab2ff2Smrg 63)])], 109267ab2ff2Smrg [$2])]) 1093e0963edeSmrg 1094e0963edeSmrg 109567ab2ff2Smrg# _LT_CHECK_BUILDDIR 109667ab2ff2Smrg# ------------------ 109767ab2ff2Smrg# Complain if the absolute build directory name contains unusual characters 109867ab2ff2Smrgm4_defun([_LT_CHECK_BUILDDIR], 109967ab2ff2Smrg[case `pwd` in 110067ab2ff2Smrg *\ * | *\ *) 110167ab2ff2Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 110267ab2ff2Smrgesac 110367ab2ff2Smrg]) 1104e0963edeSmrg 1105e0963edeSmrg 110667ab2ff2Smrg# LT_INIT([OPTIONS]) 110767ab2ff2Smrg# ------------------ 110867ab2ff2SmrgAC_DEFUN([LT_INIT], 110967ab2ff2Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 111067ab2ff2SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 111167ab2ff2SmrgAC_BEFORE([$0], [LT_LANG])dnl 111267ab2ff2SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 111367ab2ff2SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 111467ab2ff2Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 1115e0963edeSmrg 111667ab2ff2Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 111767ab2ff2Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 111867ab2ff2Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 111967ab2ff2Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 112067ab2ff2Smrgdnl unless we require an AC_DEFUNed macro: 112167ab2ff2SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 112267ab2ff2SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 112367ab2ff2SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 112467ab2ff2SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 112567ab2ff2Smrgm4_require([_LT_PROG_LTMAIN])dnl 1126e0963edeSmrg 112767ab2ff2Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1128e0963edeSmrg 112967ab2ff2Smrgdnl Parse OPTIONS 113067ab2ff2Smrg_LT_SET_OPTIONS([$0], [$1]) 1131e0963edeSmrg 113267ab2ff2Smrg# This can be used to rebuild libtool when needed 113367ab2ff2SmrgLIBTOOL_DEPS="$ltmain" 1134e0963edeSmrg 113567ab2ff2Smrg# Always use our own libtool. 113667ab2ff2SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 113767ab2ff2SmrgAC_SUBST(LIBTOOL)dnl 1138e0963edeSmrg 113967ab2ff2Smrg_LT_SETUP 1140e0963edeSmrg 114167ab2ff2Smrg# Only expand once: 114267ab2ff2Smrgm4_define([LT_INIT]) 114367ab2ff2Smrg])# LT_INIT 1144e0963edeSmrg 114567ab2ff2Smrg# Old names: 114667ab2ff2SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 114767ab2ff2SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 114867ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 114967ab2ff2Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 115067ab2ff2Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1151e0963edeSmrg 1152e0963edeSmrg 115367ab2ff2Smrg# _LT_CC_BASENAME(CC) 115467ab2ff2Smrg# ------------------- 115567ab2ff2Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 115667ab2ff2Smrgm4_defun([_LT_CC_BASENAME], 115767ab2ff2Smrg[for cc_temp in $1""; do 115867ab2ff2Smrg case $cc_temp in 115967ab2ff2Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 116067ab2ff2Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 116167ab2ff2Smrg \-*) ;; 116267ab2ff2Smrg *) break;; 116367ab2ff2Smrg esac 116467ab2ff2Smrgdone 116567ab2ff2Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 116667ab2ff2Smrg]) 1167e0963edeSmrg 1168e0963edeSmrg 116967ab2ff2Smrg# _LT_FILEUTILS_DEFAULTS 117067ab2ff2Smrg# ---------------------- 117167ab2ff2Smrg# It is okay to use these file commands and assume they have been set 117267ab2ff2Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 117367ab2ff2Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 117467ab2ff2Smrg[: ${CP="cp -f"} 117567ab2ff2Smrg: ${MV="mv -f"} 117667ab2ff2Smrg: ${RM="rm -f"} 117767ab2ff2Smrg])# _LT_FILEUTILS_DEFAULTS 1178e0963edeSmrg 1179e0963edeSmrg 118067ab2ff2Smrg# _LT_SETUP 118167ab2ff2Smrg# --------- 118267ab2ff2Smrgm4_defun([_LT_SETUP], 118367ab2ff2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 118467ab2ff2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 118567ab2ff2SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 118667ab2ff2SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 118749e108a1Smrg 1188e494fffdSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1189e494fffdSmrgdnl 119067ab2ff2Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 119167ab2ff2Smrg_LT_DECL([], [host], [0])dnl 119267ab2ff2Smrg_LT_DECL([], [host_os], [0])dnl 119367ab2ff2Smrgdnl 119467ab2ff2Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 119567ab2ff2Smrg_LT_DECL([], [build], [0])dnl 119667ab2ff2Smrg_LT_DECL([], [build_os], [0])dnl 119767ab2ff2Smrgdnl 119867ab2ff2SmrgAC_REQUIRE([AC_PROG_CC])dnl 119967ab2ff2SmrgAC_REQUIRE([LT_PATH_LD])dnl 120067ab2ff2SmrgAC_REQUIRE([LT_PATH_NM])dnl 120167ab2ff2Smrgdnl 120267ab2ff2SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 120367ab2ff2Smrgtest -z "$LN_S" && LN_S="ln -s" 120467ab2ff2Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 120567ab2ff2Smrgdnl 120667ab2ff2SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 120767ab2ff2Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 120867ab2ff2Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 120967ab2ff2Smrgdnl 121067ab2ff2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 121167ab2ff2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 121267ab2ff2Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 121367ab2ff2Smrgm4_require([_LT_CMD_RELOAD])dnl 121467ab2ff2Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 121567ab2ff2Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 121667ab2ff2Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 121767ab2ff2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 121867ab2ff2Smrgm4_require([_LT_WITH_SYSROOT])dnl 121967ab2ff2Smrg 122067ab2ff2Smrg_LT_CONFIG_LIBTOOL_INIT([ 122167ab2ff2Smrg# See if we are running on zsh, and set the options which allow our 122267ab2ff2Smrg# commands through without removal of \ escapes INIT. 122367ab2ff2Smrgif test -n "\${ZSH_VERSION+set}" ; then 122467ab2ff2Smrg setopt NO_GLOB_SUBST 122567ab2ff2Smrgfi 122667ab2ff2Smrg]) 122767ab2ff2Smrgif test -n "${ZSH_VERSION+set}" ; then 122867ab2ff2Smrg setopt NO_GLOB_SUBST 122949e108a1Smrgfi 1230f05b35a2Smrg 123167ab2ff2Smrg_LT_CHECK_OBJDIR 1232f05b35a2Smrg 123367ab2ff2Smrgm4_require([_LT_TAG_COMPILER])dnl 123449e108a1Smrg 123567ab2ff2Smrgcase $host_os in 123667ab2ff2Smrgaix3*) 123767ab2ff2Smrg # AIX sometimes has problems with the GCC collect2 program. For some 123867ab2ff2Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 123967ab2ff2Smrg # vanish in a puff of smoke. 124067ab2ff2Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 124167ab2ff2Smrg COLLECT_NAMES= 124267ab2ff2Smrg export COLLECT_NAMES 124367ab2ff2Smrg fi 124467ab2ff2Smrg ;; 124567ab2ff2Smrgesac 124649e108a1Smrg 124767ab2ff2Smrg# Global variables: 124867ab2ff2Smrgofile=libtool 124967ab2ff2Smrgcan_build_shared=yes 1250f05b35a2Smrg 125167ab2ff2Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 125267ab2ff2Smrg# which needs '.lib'). 125367ab2ff2Smrglibext=a 125449e108a1Smrg 125567ab2ff2Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 125649e108a1Smrg 125767ab2ff2Smrgold_CC="$CC" 125867ab2ff2Smrgold_CFLAGS="$CFLAGS" 1259f05b35a2Smrg 126067ab2ff2Smrg# Set sane defaults for various variables 126167ab2ff2Smrgtest -z "$CC" && CC=cc 126267ab2ff2Smrgtest -z "$LTCC" && LTCC=$CC 126367ab2ff2Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 126467ab2ff2Smrgtest -z "$LD" && LD=ld 126567ab2ff2Smrgtest -z "$ac_objext" && ac_objext=o 1266e0963edeSmrg 126767ab2ff2Smrg_LT_CC_BASENAME([$compiler]) 1268e0963edeSmrg 126967ab2ff2Smrg# Only perform the check for file, if the check method requires it 127067ab2ff2Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 127167ab2ff2Smrgcase $deplibs_check_method in 127267ab2ff2Smrgfile_magic*) 127367ab2ff2Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 127467ab2ff2Smrg _LT_PATH_MAGIC 127567ab2ff2Smrg fi 127667ab2ff2Smrg ;; 127767ab2ff2Smrgesac 1278e0963edeSmrg 127967ab2ff2Smrg# Use C for the default configuration in the libtool script 128067ab2ff2SmrgLT_SUPPORTED_TAG([CC]) 128167ab2ff2Smrg_LT_LANG_C_CONFIG 128267ab2ff2Smrg_LT_LANG_DEFAULT_CONFIG 128367ab2ff2Smrg_LT_CONFIG_COMMANDS 128467ab2ff2Smrg])# _LT_SETUP 128549e108a1Smrg 1286f05b35a2Smrg 128767ab2ff2Smrg# _LT_PREPARE_SED_QUOTE_VARS 128867ab2ff2Smrg# -------------------------- 128967ab2ff2Smrg# Define a few sed substitution that help us do robust quoting. 129067ab2ff2Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 129167ab2ff2Smrg[# Backslashify metacharacters that are still active within 129267ab2ff2Smrg# double-quoted strings. 129367ab2ff2Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 129449e108a1Smrg 129567ab2ff2Smrg# Same as above, but do not quote variable references. 129667ab2ff2Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1297e0963edeSmrg 129867ab2ff2Smrg# Sed substitution to delay expansion of an escaped shell variable in a 129967ab2ff2Smrg# double_quote_subst'ed string. 130067ab2ff2Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 130149e108a1Smrg 130267ab2ff2Smrg# Sed substitution to delay expansion of an escaped single quote. 130367ab2ff2Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 130449e108a1Smrg 130567ab2ff2Smrg# Sed substitution to avoid accidental globbing in evaled expressions 130667ab2ff2Smrgno_glob_subst='s/\*/\\\*/g' 130767ab2ff2Smrg]) 1308f05b35a2Smrg 130967ab2ff2Smrg# _LT_PROG_LTMAIN 131067ab2ff2Smrg# --------------- 131167ab2ff2Smrg# Note that this code is called both from `configure', and `config.status' 131267ab2ff2Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 131367ab2ff2Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 131467ab2ff2Smrg# so we pass a copy along to make sure it has a sensible value anyway. 131567ab2ff2Smrgm4_defun([_LT_PROG_LTMAIN], 131667ab2ff2Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 131767ab2ff2Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 131867ab2ff2Smrgltmain="$ac_aux_dir/ltmain.sh" 131967ab2ff2Smrg])# _LT_PROG_LTMAIN 1320e0963edeSmrg 1321e0963edeSmrg 1322e0963edeSmrg 132367ab2ff2Smrg# So that we can recreate a full libtool script including additional 132467ab2ff2Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 132567ab2ff2Smrg# in macros and then make a single call at the end using the `libtool' 132667ab2ff2Smrg# label. 1327e0963edeSmrg 1328e0963edeSmrg 132967ab2ff2Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 133067ab2ff2Smrg# ---------------------------------------- 133167ab2ff2Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 133267ab2ff2Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 133367ab2ff2Smrg[m4_ifval([$1], 133467ab2ff2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 133567ab2ff2Smrg [$1 133667ab2ff2Smrg])])]) 1337e0963edeSmrg 133867ab2ff2Smrg# Initialize. 133967ab2ff2Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1340e0963edeSmrg 1341e0963edeSmrg 134267ab2ff2Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 134367ab2ff2Smrg# ------------------------------ 134467ab2ff2Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 134567ab2ff2Smrgm4_define([_LT_CONFIG_LIBTOOL], 134667ab2ff2Smrg[m4_ifval([$1], 134767ab2ff2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 134867ab2ff2Smrg [$1 134967ab2ff2Smrg])])]) 1350f05b35a2Smrg 135167ab2ff2Smrg# Initialize. 135267ab2ff2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1353e0963edeSmrg 1354e0963edeSmrg 135567ab2ff2Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 135667ab2ff2Smrg# ----------------------------------------------------- 135767ab2ff2Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 135867ab2ff2Smrg[_LT_CONFIG_LIBTOOL([$1]) 135967ab2ff2Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 136067ab2ff2Smrg]) 1361e0963edeSmrg 1362e0963edeSmrg 136367ab2ff2Smrg# _LT_FORMAT_COMMENT([COMMENT]) 136467ab2ff2Smrg# ----------------------------- 136567ab2ff2Smrg# Add leading comment marks to the start of each line, and a trailing 136667ab2ff2Smrg# full-stop to the whole comment if one is not present already. 136767ab2ff2Smrgm4_define([_LT_FORMAT_COMMENT], 136867ab2ff2Smrg[m4_ifval([$1], [ 136967ab2ff2Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 137067ab2ff2Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 137167ab2ff2Smrg)]) 1372e0963edeSmrg 1373e0963edeSmrg 1374e0963edeSmrg 1375e0963edeSmrg 1376e0963edeSmrg 137767ab2ff2Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 137867ab2ff2Smrg# ------------------------------------------------------------------- 137967ab2ff2Smrg# CONFIGNAME is the name given to the value in the libtool script. 138067ab2ff2Smrg# VARNAME is the (base) name used in the configure script. 138167ab2ff2Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 138267ab2ff2Smrg# VARNAME. Any other value will be used directly. 138367ab2ff2Smrgm4_define([_LT_DECL], 138467ab2ff2Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 138567ab2ff2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 138667ab2ff2Smrg [m4_ifval([$1], [$1], [$2])]) 138767ab2ff2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 138867ab2ff2Smrg m4_ifval([$4], 138967ab2ff2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 139067ab2ff2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 139167ab2ff2Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 139267ab2ff2Smrg]) 1393e0963edeSmrg 1394e0963edeSmrg 139567ab2ff2Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 139667ab2ff2Smrg# -------------------------------------------------------- 139767ab2ff2Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1398e0963edeSmrg 1399e0963edeSmrg 140067ab2ff2Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 140167ab2ff2Smrg# ------------------------------------------------ 140267ab2ff2Smrgm4_define([lt_decl_tag_varnames], 140367ab2ff2Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 1404e0963edeSmrg 1405e0963edeSmrg 140667ab2ff2Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 140767ab2ff2Smrg# --------------------------------------------------------- 140867ab2ff2Smrgm4_define([_lt_decl_filter], 140967ab2ff2Smrg[m4_case([$#], 141067ab2ff2Smrg [0], [m4_fatal([$0: too few arguments: $#])], 141167ab2ff2Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 141267ab2ff2Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 141367ab2ff2Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 141467ab2ff2Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 141567ab2ff2Smrg]) 1416e0963edeSmrg 1417e0963edeSmrg 141867ab2ff2Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 141967ab2ff2Smrg# -------------------------------------------------- 142067ab2ff2Smrgm4_define([lt_decl_quote_varnames], 142167ab2ff2Smrg[_lt_decl_filter([value], [1], $@)]) 1422e0963edeSmrg 1423e0963edeSmrg 142467ab2ff2Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 142567ab2ff2Smrg# --------------------------------------------------- 142667ab2ff2Smrgm4_define([lt_decl_dquote_varnames], 142767ab2ff2Smrg[_lt_decl_filter([value], [2], $@)]) 1428e0963edeSmrg 1429e0963edeSmrg 143067ab2ff2Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 143167ab2ff2Smrg# --------------------------------------------------- 143267ab2ff2Smrgm4_define([lt_decl_varnames_tagged], 143367ab2ff2Smrg[m4_assert([$# <= 2])dnl 143467ab2ff2Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 143567ab2ff2Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 143667ab2ff2Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 143767ab2ff2Smrgm4_define([_lt_decl_varnames_tagged], 143867ab2ff2Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1439e0963edeSmrg 1440e0963edeSmrg 144167ab2ff2Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 144267ab2ff2Smrg# ------------------------------------------------ 144367ab2ff2Smrgm4_define([lt_decl_all_varnames], 144467ab2ff2Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 144567ab2ff2Smrg m4_if([$2], [], 144667ab2ff2Smrg m4_quote(lt_decl_varnames), 144767ab2ff2Smrg m4_quote(m4_shift($@))))[]dnl 144867ab2ff2Smrg]) 144967ab2ff2Smrgm4_define([_lt_decl_all_varnames], 145067ab2ff2Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 145167ab2ff2Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 145267ab2ff2Smrg]) 1453f05b35a2Smrg 1454e0963edeSmrg 145567ab2ff2Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 145667ab2ff2Smrg# ------------------------------------ 145767ab2ff2Smrg# Quote a variable value, and forward it to `config.status' so that its 145867ab2ff2Smrg# declaration there will have the same value as in `configure'. VARNAME 145967ab2ff2Smrg# must have a single quote delimited value for this to work. 146067ab2ff2Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 146167ab2ff2Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1462e0963edeSmrg 1463e0963edeSmrg 146467ab2ff2Smrg# _LT_CONFIG_STATUS_DECLARATIONS 146567ab2ff2Smrg# ------------------------------ 146667ab2ff2Smrg# We delimit libtool config variables with single quotes, so when 146767ab2ff2Smrg# we write them to config.status, we have to be sure to quote all 146867ab2ff2Smrg# embedded single quotes properly. In configure, this macro expands 146967ab2ff2Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 147067ab2ff2Smrg# 147167ab2ff2Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 147267ab2ff2Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 147367ab2ff2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 147467ab2ff2Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1475e0963edeSmrg 147649e108a1Smrg 147767ab2ff2Smrg# _LT_LIBTOOL_TAGS 147867ab2ff2Smrg# ---------------- 147967ab2ff2Smrg# Output comment and list of tags supported by the script 148067ab2ff2Smrgm4_defun([_LT_LIBTOOL_TAGS], 148167ab2ff2Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 148267ab2ff2Smrgavailable_tags="_LT_TAGS"dnl 148367ab2ff2Smrg]) 1484e0963edeSmrg 1485e0963edeSmrg 148667ab2ff2Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 148767ab2ff2Smrg# ----------------------------------- 148867ab2ff2Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 148967ab2ff2Smrg# expand to a commented shell variable setting: 149049e108a1Smrg# 149167ab2ff2Smrg# # Some comment about what VAR is for. 149267ab2ff2Smrg# visible_name=$lt_internal_name 149367ab2ff2Smrgm4_define([_LT_LIBTOOL_DECLARE], 149467ab2ff2Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 149567ab2ff2Smrg [description])))[]dnl 149667ab2ff2Smrgm4_pushdef([_libtool_name], 149767ab2ff2Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 149867ab2ff2Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 149967ab2ff2Smrg [0], [_libtool_name=[$]$1], 150067ab2ff2Smrg [1], [_libtool_name=$lt_[]$1], 150167ab2ff2Smrg [2], [_libtool_name=$lt_[]$1], 150267ab2ff2Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 150367ab2ff2Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 150449e108a1Smrg]) 1505e0963edeSmrg 1506e0963edeSmrg 150767ab2ff2Smrg# _LT_LIBTOOL_CONFIG_VARS 150867ab2ff2Smrg# ----------------------- 150967ab2ff2Smrg# Produce commented declarations of non-tagged libtool config variables 151067ab2ff2Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 151167ab2ff2Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 151267ab2ff2Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 151367ab2ff2Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 151467ab2ff2Smrg[m4_foreach([_lt_var], 151567ab2ff2Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 151667ab2ff2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1517e0963edeSmrg 1518e0963edeSmrg 151967ab2ff2Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 152067ab2ff2Smrg# ------------------------- 152167ab2ff2Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 152267ab2ff2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 152367ab2ff2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1524e0963edeSmrg 1525e0963edeSmrg 152667ab2ff2Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 152767ab2ff2Smrg# ------------------------------ 152867ab2ff2Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1529e0963edeSmrg 1530e0963edeSmrg 153167ab2ff2Smrg# _LT_CONFIG_COMMANDS 153267ab2ff2Smrg# ------------------- 153367ab2ff2Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 153467ab2ff2Smrg# variables for single and double quote escaping we saved from calls 153567ab2ff2Smrg# to _LT_DECL, we can put quote escaped variables declarations 153667ab2ff2Smrg# into `config.status', and then the shell code to quote escape them in 153767ab2ff2Smrg# for loops in `config.status'. Finally, any additional code accumulated 153867ab2ff2Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 153967ab2ff2Smrgm4_defun([_LT_CONFIG_COMMANDS], 154067ab2ff2Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 154167ab2ff2Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 154267ab2ff2Smrg dnl instead of duplicating it all over again into config.status, 154367ab2ff2Smrg dnl then we will have config.status run $CONFIG_LT later, so it 154467ab2ff2Smrg dnl needs to know what name is stored there: 154567ab2ff2Smrg [AC_CONFIG_COMMANDS([libtool], 154667ab2ff2Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 154767ab2ff2Smrg dnl If the libtool generation code is destined for config.status, 154867ab2ff2Smrg dnl expand the accumulated commands and init code now: 154967ab2ff2Smrg [AC_CONFIG_COMMANDS([libtool], 155067ab2ff2Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 155167ab2ff2Smrg])#_LT_CONFIG_COMMANDS 1552e0963edeSmrg 1553e0963edeSmrg 155467ab2ff2Smrg# Initialize. 155567ab2ff2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 155667ab2ff2Smrg[ 1557e0963edeSmrg 155867ab2ff2Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 155967ab2ff2Smrg# if CDPATH is set. 156067ab2ff2Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1561e0963edeSmrg 156267ab2ff2Smrgsed_quote_subst='$sed_quote_subst' 156367ab2ff2Smrgdouble_quote_subst='$double_quote_subst' 156467ab2ff2Smrgdelay_variable_subst='$delay_variable_subst' 156567ab2ff2Smrg_LT_CONFIG_STATUS_DECLARATIONS 156667ab2ff2SmrgLTCC='$LTCC' 156767ab2ff2SmrgLTCFLAGS='$LTCFLAGS' 156867ab2ff2Smrgcompiler='$compiler_DEFAULT' 156949e108a1Smrg 157067ab2ff2Smrg# A function that is used when there is no print builtin or printf. 157167ab2ff2Smrgfunc_fallback_echo () 157267ab2ff2Smrg{ 157367ab2ff2Smrg eval 'cat <<_LTECHO_EOF 157467ab2ff2Smrg\$[]1 157567ab2ff2Smrg_LTECHO_EOF' 157667ab2ff2Smrg} 157749e108a1Smrg 157867ab2ff2Smrg# Quote evaled strings. 157967ab2ff2Smrgfor var in lt_decl_all_varnames([[ \ 158067ab2ff2Smrg]], lt_decl_quote_varnames); do 158167ab2ff2Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 158267ab2ff2Smrg *[[\\\\\\\`\\"\\\$]]*) 158367ab2ff2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 158467ab2ff2Smrg ;; 158567ab2ff2Smrg *) 158667ab2ff2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 158767ab2ff2Smrg ;; 158867ab2ff2Smrg esac 158949e108a1Smrgdone 1590e0963edeSmrg 159167ab2ff2Smrg# Double-quote double-evaled strings. 159267ab2ff2Smrgfor var in lt_decl_all_varnames([[ \ 159367ab2ff2Smrg]], lt_decl_dquote_varnames); do 159467ab2ff2Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 159567ab2ff2Smrg *[[\\\\\\\`\\"\\\$]]*) 159667ab2ff2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 159767ab2ff2Smrg ;; 159867ab2ff2Smrg *) 159967ab2ff2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 160067ab2ff2Smrg ;; 160167ab2ff2Smrg esac 160267ab2ff2Smrgdone 1603e0963edeSmrg 160467ab2ff2Smrg_LT_OUTPUT_LIBTOOL_INIT 160567ab2ff2Smrg]) 1606e0963edeSmrg 160767ab2ff2Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 160867ab2ff2Smrg# ------------------------------------ 160967ab2ff2Smrg# Generate a child script FILE with all initialization necessary to 161067ab2ff2Smrg# reuse the environment learned by the parent script, and make the 161167ab2ff2Smrg# file executable. If COMMENT is supplied, it is inserted after the 161267ab2ff2Smrg# `#!' sequence but before initialization text begins. After this 161367ab2ff2Smrg# macro, additional text can be appended to FILE to form the body of 161467ab2ff2Smrg# the child script. The macro ends with non-zero status if the 161567ab2ff2Smrg# file could not be fully written (such as if the disk is full). 161667ab2ff2Smrgm4_ifdef([AS_INIT_GENERATED], 161767ab2ff2Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 161867ab2ff2Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 161967ab2ff2Smrg[m4_require([AS_PREPARE])]dnl 162067ab2ff2Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 162167ab2ff2Smrg[lt_write_fail=0 162267ab2ff2Smrgcat >$1 <<_ASEOF || lt_write_fail=1 162367ab2ff2Smrg#! $SHELL 162467ab2ff2Smrg# Generated by $as_me. 162567ab2ff2Smrg$2 162667ab2ff2SmrgSHELL=\${CONFIG_SHELL-$SHELL} 162767ab2ff2Smrgexport SHELL 162867ab2ff2Smrg_ASEOF 162967ab2ff2Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 163067ab2ff2SmrgAS_SHELL_SANITIZE 163167ab2ff2Smrg_AS_PREPARE 163267ab2ff2Smrgexec AS_MESSAGE_FD>&1 163367ab2ff2Smrg_ASEOF 163467ab2ff2Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 163567ab2ff2Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1636e0963edeSmrg 163767ab2ff2Smrg# LT_OUTPUT 163849e108a1Smrg# --------- 163967ab2ff2Smrg# This macro allows early generation of the libtool script (before 164067ab2ff2Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 164167ab2ff2Smrg# tests. 164267ab2ff2SmrgAC_DEFUN([LT_OUTPUT], 164367ab2ff2Smrg[: ${CONFIG_LT=./config.lt} 164467ab2ff2SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 164567ab2ff2Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 164667ab2ff2Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 1647e0963edeSmrg 164867ab2ff2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 164967ab2ff2Smrglt_cl_silent=false 165067ab2ff2Smrgexec AS_MESSAGE_LOG_FD>>config.log 165167ab2ff2Smrg{ 165267ab2ff2Smrg echo 165367ab2ff2Smrg AS_BOX([Running $as_me.]) 165467ab2ff2Smrg} >&AS_MESSAGE_LOG_FD 1655e0963edeSmrg 165667ab2ff2Smrglt_cl_help="\ 165767ab2ff2Smrg\`$as_me' creates a local libtool stub from the current configuration, 165867ab2ff2Smrgfor use in further configure time tests before the real libtool is 165967ab2ff2Smrggenerated. 1660e0963edeSmrg 166167ab2ff2SmrgUsage: $[0] [[OPTIONS]] 1662e0963edeSmrg 166367ab2ff2Smrg -h, --help print this help, then exit 166467ab2ff2Smrg -V, --version print version number, then exit 166567ab2ff2Smrg -q, --quiet do not print progress messages 166667ab2ff2Smrg -d, --debug don't remove temporary files 1667e0963edeSmrg 166867ab2ff2SmrgReport bugs to <bug-libtool@gnu.org>." 1669e0963edeSmrg 167067ab2ff2Smrglt_cl_version="\ 167167ab2ff2Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 167267ab2ff2Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 167367ab2ff2Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1674e0963edeSmrg 1675e494fffdSmrgCopyright (C) 2011 Free Software Foundation, Inc. 167667ab2ff2SmrgThis config.lt script is free software; the Free Software Foundation 167767ab2ff2Smrggives unlimited permision to copy, distribute and modify it." 1678e0963edeSmrg 167967ab2ff2Smrgwhile test $[#] != 0 168067ab2ff2Smrgdo 168167ab2ff2Smrg case $[1] in 168267ab2ff2Smrg --version | --v* | -V ) 168367ab2ff2Smrg echo "$lt_cl_version"; exit 0 ;; 168467ab2ff2Smrg --help | --h* | -h ) 168567ab2ff2Smrg echo "$lt_cl_help"; exit 0 ;; 168667ab2ff2Smrg --debug | --d* | -d ) 168767ab2ff2Smrg debug=: ;; 168867ab2ff2Smrg --quiet | --q* | --silent | --s* | -q ) 168967ab2ff2Smrg lt_cl_silent=: ;; 1690e0963edeSmrg 169167ab2ff2Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 169267ab2ff2SmrgTry \`$[0] --help' for more information.]) ;; 1693e0963edeSmrg 169467ab2ff2Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 169567ab2ff2SmrgTry \`$[0] --help' for more information.]) ;; 169667ab2ff2Smrg esac 169767ab2ff2Smrg shift 169867ab2ff2Smrgdone 169949e108a1Smrg 170067ab2ff2Smrgif $lt_cl_silent; then 170167ab2ff2Smrg exec AS_MESSAGE_FD>/dev/null 170267ab2ff2Smrgfi 170367ab2ff2Smrg_LTEOF 1704e0963edeSmrg 170567ab2ff2Smrgcat >>"$CONFIG_LT" <<_LTEOF 170667ab2ff2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 170767ab2ff2Smrg_LTEOF 1708f05b35a2Smrg 170967ab2ff2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 171067ab2ff2SmrgAC_MSG_NOTICE([creating $ofile]) 171167ab2ff2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 171267ab2ff2SmrgAS_EXIT(0) 171367ab2ff2Smrg_LTEOF 171467ab2ff2Smrgchmod +x "$CONFIG_LT" 1715f05b35a2Smrg 171667ab2ff2Smrg# configure is writing to config.log, but config.lt does its own redirection, 171767ab2ff2Smrg# appending to config.log, which fails on DOS, as config.log is still kept 171867ab2ff2Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 171967ab2ff2Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 172067ab2ff2Smrglt_cl_success=: 172167ab2ff2Smrgtest "$silent" = yes && 172267ab2ff2Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 172367ab2ff2Smrgexec AS_MESSAGE_LOG_FD>/dev/null 172467ab2ff2Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 172567ab2ff2Smrgexec AS_MESSAGE_LOG_FD>>config.log 172667ab2ff2Smrg$lt_cl_success || AS_EXIT(1) 172767ab2ff2Smrg])# LT_OUTPUT 1728e0963edeSmrg 1729e0963edeSmrg 173067ab2ff2Smrg# _LT_CONFIG(TAG) 173149e108a1Smrg# --------------- 173267ab2ff2Smrg# If TAG is the built-in tag, create an initial libtool script with a 173367ab2ff2Smrg# default configuration from the untagged config vars. Otherwise add code 173467ab2ff2Smrg# to config.status for appending the configuration named by TAG from the 173567ab2ff2Smrg# matching tagged config vars. 173667ab2ff2Smrgm4_defun([_LT_CONFIG], 173767ab2ff2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 173867ab2ff2Smrg_LT_CONFIG_SAVE_COMMANDS([ 173967ab2ff2Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 174067ab2ff2Smrg m4_if(_LT_TAG, [C], [ 174167ab2ff2Smrg # See if we are running on zsh, and set the options which allow our 174267ab2ff2Smrg # commands through without removal of \ escapes. 174367ab2ff2Smrg if test -n "${ZSH_VERSION+set}" ; then 174467ab2ff2Smrg setopt NO_GLOB_SUBST 174567ab2ff2Smrg fi 1746e0963edeSmrg 174767ab2ff2Smrg cfgfile="${ofile}T" 174867ab2ff2Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 174967ab2ff2Smrg $RM "$cfgfile" 1750e0963edeSmrg 175167ab2ff2Smrg cat <<_LT_EOF >> "$cfgfile" 175267ab2ff2Smrg#! $SHELL 1753e0963edeSmrg 175467ab2ff2Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 175567ab2ff2Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 175667ab2ff2Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 175767ab2ff2Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 175867ab2ff2Smrg# 175967ab2ff2Smrg_LT_COPYING 176067ab2ff2Smrg_LT_LIBTOOL_TAGS 1761e0963edeSmrg 176267ab2ff2Smrg# ### BEGIN LIBTOOL CONFIG 176367ab2ff2Smrg_LT_LIBTOOL_CONFIG_VARS 176467ab2ff2Smrg_LT_LIBTOOL_TAG_VARS 176567ab2ff2Smrg# ### END LIBTOOL CONFIG 1766e0963edeSmrg 176767ab2ff2Smrg_LT_EOF 1768e0963edeSmrg 176967ab2ff2Smrg case $host_os in 177067ab2ff2Smrg aix3*) 177167ab2ff2Smrg cat <<\_LT_EOF >> "$cfgfile" 177267ab2ff2Smrg# AIX sometimes has problems with the GCC collect2 program. For some 177367ab2ff2Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 177467ab2ff2Smrg# vanish in a puff of smoke. 177567ab2ff2Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 177667ab2ff2Smrg COLLECT_NAMES= 177767ab2ff2Smrg export COLLECT_NAMES 177867ab2ff2Smrgfi 177967ab2ff2Smrg_LT_EOF 178067ab2ff2Smrg ;; 178167ab2ff2Smrg esac 1782e0963edeSmrg 178367ab2ff2Smrg _LT_PROG_LTMAIN 1784e0963edeSmrg 178567ab2ff2Smrg # We use sed instead of cat because bash on DJGPP gets confused if 178667ab2ff2Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 178767ab2ff2Smrg # text mode, it properly converts lines to CR/LF. This bash problem 178867ab2ff2Smrg # is reportedly fixed, but why not run on old versions too? 178967ab2ff2Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 179067ab2ff2Smrg || (rm -f "$cfgfile"; exit 1) 1791f05b35a2Smrg 179267ab2ff2Smrg _LT_PROG_REPLACE_SHELLFNS 1793e0963edeSmrg 179467ab2ff2Smrg mv -f "$cfgfile" "$ofile" || 179567ab2ff2Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 179667ab2ff2Smrg chmod +x "$ofile" 179767ab2ff2Smrg], 179867ab2ff2Smrg[cat <<_LT_EOF >> "$ofile" 1799e0963edeSmrg 180067ab2ff2Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 180167ab2ff2Smrgdnl in a comment (ie after a #). 180267ab2ff2Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 180367ab2ff2Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 180467ab2ff2Smrg# ### END LIBTOOL TAG CONFIG: $1 180567ab2ff2Smrg_LT_EOF 180667ab2ff2Smrg])dnl /m4_if 180767ab2ff2Smrg], 180867ab2ff2Smrg[m4_if([$1], [], [ 180967ab2ff2Smrg PACKAGE='$PACKAGE' 181067ab2ff2Smrg VERSION='$VERSION' 181167ab2ff2Smrg TIMESTAMP='$TIMESTAMP' 181267ab2ff2Smrg RM='$RM' 181367ab2ff2Smrg ofile='$ofile'], []) 181467ab2ff2Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 181567ab2ff2Smrg])# _LT_CONFIG 1816e0963edeSmrg 1817e0963edeSmrg 181867ab2ff2Smrg# LT_SUPPORTED_TAG(TAG) 181967ab2ff2Smrg# --------------------- 182067ab2ff2Smrg# Trace this macro to discover what tags are supported by the libtool 182167ab2ff2Smrg# --tag option, using: 182267ab2ff2Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 182367ab2ff2SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1824f05b35a2Smrg 1825f05b35a2Smrg 182667ab2ff2Smrg# C support is built-in for now 182767ab2ff2Smrgm4_define([_LT_LANG_C_enabled], []) 182867ab2ff2Smrgm4_define([_LT_TAGS], []) 1829e0963edeSmrg 1830e0963edeSmrg 183167ab2ff2Smrg# LT_LANG(LANG) 183267ab2ff2Smrg# ------------- 183367ab2ff2Smrg# Enable libtool support for the given language if not already enabled. 183467ab2ff2SmrgAC_DEFUN([LT_LANG], 183567ab2ff2Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 183667ab2ff2Smrgm4_case([$1], 183767ab2ff2Smrg [C], [_LT_LANG(C)], 183867ab2ff2Smrg [C++], [_LT_LANG(CXX)], 1839e494fffdSmrg [Go], [_LT_LANG(GO)], 184067ab2ff2Smrg [Java], [_LT_LANG(GCJ)], 184167ab2ff2Smrg [Fortran 77], [_LT_LANG(F77)], 184267ab2ff2Smrg [Fortran], [_LT_LANG(FC)], 184367ab2ff2Smrg [Windows Resource], [_LT_LANG(RC)], 184467ab2ff2Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 184567ab2ff2Smrg [_LT_LANG($1)], 184667ab2ff2Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 184767ab2ff2Smrg])# LT_LANG 1848e0963edeSmrg 1849f05b35a2Smrg 185067ab2ff2Smrg# _LT_LANG(LANGNAME) 185167ab2ff2Smrg# ------------------ 185267ab2ff2Smrgm4_defun([_LT_LANG], 185367ab2ff2Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 185467ab2ff2Smrg [LT_SUPPORTED_TAG([$1])dnl 185567ab2ff2Smrg m4_append([_LT_TAGS], [$1 ])dnl 185667ab2ff2Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 185767ab2ff2Smrg _LT_LANG_$1_CONFIG($1)])dnl 185867ab2ff2Smrg])# _LT_LANG 1859e0963edeSmrg 1860e0963edeSmrg 1861e494fffdSmrgm4_ifndef([AC_PROG_GO], [ 1862e494fffdSmrg# NOTE: This macro has been submitted for inclusion into # 1863e494fffdSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 1864e494fffdSmrg# a released version of Autoconf we should remove this # 1865e494fffdSmrg# macro and use it instead. # 1866e494fffdSmrgm4_defun([AC_PROG_GO], 1867e494fffdSmrg[AC_LANG_PUSH(Go)dnl 1868e494fffdSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 1869e494fffdSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1870e494fffdSmrg_AC_ARG_VAR_LDFLAGS()dnl 1871e494fffdSmrgAC_CHECK_TOOL(GOC, gccgo) 1872e494fffdSmrgif test -z "$GOC"; then 1873e494fffdSmrg if test -n "$ac_tool_prefix"; then 1874e494fffdSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1875e494fffdSmrg fi 1876e494fffdSmrgfi 1877e494fffdSmrgif test -z "$GOC"; then 1878e494fffdSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1879e494fffdSmrgfi 1880e494fffdSmrg])#m4_defun 1881e494fffdSmrg])#m4_ifndef 1882e494fffdSmrg 1883e494fffdSmrg 188467ab2ff2Smrg# _LT_LANG_DEFAULT_CONFIG 188567ab2ff2Smrg# ----------------------- 188667ab2ff2Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 188767ab2ff2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 188867ab2ff2Smrg [LT_LANG(CXX)], 188967ab2ff2Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1890f05b35a2Smrg 189167ab2ff2SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 189267ab2ff2Smrg [LT_LANG(F77)], 189367ab2ff2Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1894f05b35a2Smrg 189567ab2ff2SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 189667ab2ff2Smrg [LT_LANG(FC)], 189767ab2ff2Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1898e0963edeSmrg 189967ab2ff2Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 190067ab2ff2Smrgdnl pulling things in needlessly. 190167ab2ff2SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 190267ab2ff2Smrg [LT_LANG(GCJ)], 190367ab2ff2Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 190467ab2ff2Smrg [LT_LANG(GCJ)], 190567ab2ff2Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 190667ab2ff2Smrg [LT_LANG(GCJ)], 190767ab2ff2Smrg [m4_ifdef([AC_PROG_GCJ], 190867ab2ff2Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 190967ab2ff2Smrg m4_ifdef([A][M_PROG_GCJ], 191067ab2ff2Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 191167ab2ff2Smrg m4_ifdef([LT_PROG_GCJ], 191267ab2ff2Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1913e0963edeSmrg 1914e494fffdSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 1915e494fffdSmrg [LT_LANG(GO)], 1916e494fffdSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 1917e494fffdSmrg 191867ab2ff2SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 191967ab2ff2Smrg [LT_LANG(RC)], 192067ab2ff2Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 192167ab2ff2Smrg])# _LT_LANG_DEFAULT_CONFIG 1922f05b35a2Smrg 192367ab2ff2Smrg# Obsolete macros: 192467ab2ff2SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 192567ab2ff2SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 192667ab2ff2SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 192767ab2ff2SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 192867ab2ff2SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 192967ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 193067ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 193167ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 193267ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 193367ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 193467ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 1935e0963edeSmrg 1936e0963edeSmrg 193767ab2ff2Smrg# _LT_TAG_COMPILER 193867ab2ff2Smrg# ---------------- 193967ab2ff2Smrgm4_defun([_LT_TAG_COMPILER], 194067ab2ff2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 1941e0963edeSmrg 194267ab2ff2Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 194367ab2ff2Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 194467ab2ff2Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 194567ab2ff2Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1946e0963edeSmrg 194767ab2ff2Smrg# If no C compiler was specified, use CC. 194867ab2ff2SmrgLTCC=${LTCC-"$CC"} 1949e0963edeSmrg 195067ab2ff2Smrg# If no C compiler flags were specified, use CFLAGS. 195167ab2ff2SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1952f05b35a2Smrg 195367ab2ff2Smrg# Allow CC to be a program name with arguments. 195467ab2ff2Smrgcompiler=$CC 195567ab2ff2Smrg])# _LT_TAG_COMPILER 1956e0963edeSmrg 1957e0963edeSmrg 195867ab2ff2Smrg# _LT_COMPILER_BOILERPLATE 195967ab2ff2Smrg# ------------------------ 196067ab2ff2Smrg# Check for compiler boilerplate output or warnings with 196167ab2ff2Smrg# the simple compiler test code. 196267ab2ff2Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 196367ab2ff2Smrg[m4_require([_LT_DECL_SED])dnl 196467ab2ff2Smrgac_outfile=conftest.$ac_objext 196567ab2ff2Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 196667ab2ff2Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 196767ab2ff2Smrg_lt_compiler_boilerplate=`cat conftest.err` 196867ab2ff2Smrg$RM conftest* 196967ab2ff2Smrg])# _LT_COMPILER_BOILERPLATE 1970e0963edeSmrg 1971e0963edeSmrg 197267ab2ff2Smrg# _LT_LINKER_BOILERPLATE 197367ab2ff2Smrg# ---------------------- 197467ab2ff2Smrg# Check for linker boilerplate output or warnings with 197567ab2ff2Smrg# the simple link test code. 197667ab2ff2Smrgm4_defun([_LT_LINKER_BOILERPLATE], 197767ab2ff2Smrg[m4_require([_LT_DECL_SED])dnl 197867ab2ff2Smrgac_outfile=conftest.$ac_objext 197967ab2ff2Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 198067ab2ff2Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 198167ab2ff2Smrg_lt_linker_boilerplate=`cat conftest.err` 198267ab2ff2Smrg$RM -r conftest* 198367ab2ff2Smrg])# _LT_LINKER_BOILERPLATE 1984e0963edeSmrg 198567ab2ff2Smrg# _LT_REQUIRED_DARWIN_CHECKS 198649e108a1Smrg# ------------------------- 198767ab2ff2Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 198867ab2ff2Smrg case $host_os in 198967ab2ff2Smrg rhapsody* | darwin*) 199067ab2ff2Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 199167ab2ff2Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 199267ab2ff2Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 199367ab2ff2Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 199467ab2ff2Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 199567ab2ff2Smrg _LT_DECL([], [DSYMUTIL], [1], 199667ab2ff2Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 199767ab2ff2Smrg _LT_DECL([], [NMEDIT], [1], 199867ab2ff2Smrg [Tool to change global to local symbols on Mac OS X]) 199967ab2ff2Smrg _LT_DECL([], [LIPO], [1], 200067ab2ff2Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 200167ab2ff2Smrg _LT_DECL([], [OTOOL], [1], 200267ab2ff2Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 200367ab2ff2Smrg _LT_DECL([], [OTOOL64], [1], 200467ab2ff2Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2005e0963edeSmrg 200667ab2ff2Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 200767ab2ff2Smrg [lt_cv_apple_cc_single_mod=no 200867ab2ff2Smrg if test -z "${LT_MULTI_MODULE}"; then 200967ab2ff2Smrg # By default we will add the -single_module flag. You can override 201067ab2ff2Smrg # by either setting the environment variable LT_MULTI_MODULE 201167ab2ff2Smrg # non-empty at configure time, or by adding -multi_module to the 201267ab2ff2Smrg # link flags. 201367ab2ff2Smrg rm -rf libconftest.dylib* 201467ab2ff2Smrg echo "int foo(void){return 1;}" > conftest.c 201567ab2ff2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 201667ab2ff2Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 201767ab2ff2Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 201867ab2ff2Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 201967ab2ff2Smrg _lt_result=$? 2020e494fffdSmrg # If there is a non-empty error log, and "single_module" 2021e494fffdSmrg # appears in it, assume the flag caused a linker warning 2022e494fffdSmrg if test -s conftest.err && $GREP single_module conftest.err; then 2023e494fffdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2024e494fffdSmrg # Otherwise, if the output was created with a 0 exit code from 2025e494fffdSmrg # the compiler, it worked. 2026e494fffdSmrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 202767ab2ff2Smrg lt_cv_apple_cc_single_mod=yes 202867ab2ff2Smrg else 202967ab2ff2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 203067ab2ff2Smrg fi 203167ab2ff2Smrg rm -rf libconftest.dylib* 203267ab2ff2Smrg rm -f conftest.* 203367ab2ff2Smrg fi]) 2034e494fffdSmrg 203567ab2ff2Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 203667ab2ff2Smrg [lt_cv_ld_exported_symbols_list], 203767ab2ff2Smrg [lt_cv_ld_exported_symbols_list=no 203867ab2ff2Smrg save_LDFLAGS=$LDFLAGS 203967ab2ff2Smrg echo "_main" > conftest.sym 204067ab2ff2Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 204167ab2ff2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 204267ab2ff2Smrg [lt_cv_ld_exported_symbols_list=yes], 204367ab2ff2Smrg [lt_cv_ld_exported_symbols_list=no]) 204467ab2ff2Smrg LDFLAGS="$save_LDFLAGS" 204567ab2ff2Smrg ]) 2046e494fffdSmrg 204767ab2ff2Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 204867ab2ff2Smrg [lt_cv_ld_force_load=no 204967ab2ff2Smrg cat > conftest.c << _LT_EOF 205067ab2ff2Smrgint forced_loaded() { return 2;} 205167ab2ff2Smrg_LT_EOF 205267ab2ff2Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 205367ab2ff2Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 205467ab2ff2Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 205567ab2ff2Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 205667ab2ff2Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 205767ab2ff2Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 205867ab2ff2Smrg cat > conftest.c << _LT_EOF 205967ab2ff2Smrgint main() { return 0;} 206067ab2ff2Smrg_LT_EOF 206167ab2ff2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 206267ab2ff2Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 206367ab2ff2Smrg _lt_result=$? 2064e494fffdSmrg if test -s conftest.err && $GREP force_load conftest.err; then 2065e494fffdSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 2066e494fffdSmrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 206767ab2ff2Smrg lt_cv_ld_force_load=yes 206867ab2ff2Smrg else 206967ab2ff2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 207067ab2ff2Smrg fi 207167ab2ff2Smrg rm -f conftest.err libconftest.a conftest conftest.c 207267ab2ff2Smrg rm -rf conftest.dSYM 207367ab2ff2Smrg ]) 207467ab2ff2Smrg case $host_os in 207567ab2ff2Smrg rhapsody* | darwin1.[[012]]) 207667ab2ff2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 207767ab2ff2Smrg darwin1.*) 207867ab2ff2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 207967ab2ff2Smrg darwin*) # darwin 5.x on 208067ab2ff2Smrg # if running on 10.5 or later, the deployment target defaults 208167ab2ff2Smrg # to the OS version, if on x86, and 10.4, the deployment 208267ab2ff2Smrg # target defaults to 10.4. Don't you love it? 208367ab2ff2Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 208467ab2ff2Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 208567ab2ff2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 208667ab2ff2Smrg 10.[[012]]*) 208767ab2ff2Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 208867ab2ff2Smrg 10.*) 208967ab2ff2Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 209067ab2ff2Smrg esac 209167ab2ff2Smrg ;; 209267ab2ff2Smrg esac 209367ab2ff2Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 209467ab2ff2Smrg _lt_dar_single_mod='$single_module' 209567ab2ff2Smrg fi 209667ab2ff2Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 209767ab2ff2Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 209867ab2ff2Smrg else 209967ab2ff2Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 210067ab2ff2Smrg fi 210167ab2ff2Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 210267ab2ff2Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 210367ab2ff2Smrg else 210467ab2ff2Smrg _lt_dsymutil= 210567ab2ff2Smrg fi 210667ab2ff2Smrg ;; 210767ab2ff2Smrg esac 210867ab2ff2Smrg]) 2109e0963edeSmrg 2110e0963edeSmrg 2111e494fffdSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 2112e494fffdSmrg# --------------------------------- 211367ab2ff2Smrg# Checks for linker and compiler features on darwin 211467ab2ff2Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 211549e108a1Smrg[ 211667ab2ff2Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 211767ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 211867ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 211967ab2ff2Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 212067ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 212167ab2ff2Smrg if test "$lt_cv_ld_force_load" = "yes"; then 212267ab2ff2Smrg _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\"`' 2123e494fffdSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2124e494fffdSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 212567ab2ff2Smrg else 212667ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 212767ab2ff2Smrg fi 212867ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 212967ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 213067ab2ff2Smrg case $cc_basename in 213167ab2ff2Smrg ifort*) _lt_dar_can_shared=yes ;; 213267ab2ff2Smrg *) _lt_dar_can_shared=$GCC ;; 213367ab2ff2Smrg esac 213467ab2ff2Smrg if test "$_lt_dar_can_shared" = "yes"; then 213567ab2ff2Smrg output_verbose_link_cmd=func_echo_all 213667ab2ff2Smrg _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}" 213767ab2ff2Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 213867ab2ff2Smrg _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}" 213967ab2ff2Smrg _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}" 214067ab2ff2Smrg m4_if([$1], [CXX], 214167ab2ff2Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 214267ab2ff2Smrg _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}" 214367ab2ff2Smrg _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}" 214467ab2ff2Smrg fi 214567ab2ff2Smrg],[]) 214667ab2ff2Smrg else 214767ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 214867ab2ff2Smrg fi 214967ab2ff2Smrg]) 2150e0963edeSmrg 215167ab2ff2Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 215267ab2ff2Smrg# ---------------------------------- 215367ab2ff2Smrg# Links a minimal program and checks the executable 215467ab2ff2Smrg# for the system default hardcoded library path. In most cases, 215567ab2ff2Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 215667ab2ff2Smrg# the location of the communication and MPI libs are included too. 215767ab2ff2Smrg# If we don't find anything, use the default library path according 215867ab2ff2Smrg# to the aix ld manual. 215967ab2ff2Smrg# Store the results from the different compilers for each TAGNAME. 216067ab2ff2Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 216167ab2ff2Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 216267ab2ff2Smrg[m4_require([_LT_DECL_SED])dnl 216367ab2ff2Smrgif test "${lt_cv_aix_libpath+set}" = set; then 216467ab2ff2Smrg aix_libpath=$lt_cv_aix_libpath 216567ab2ff2Smrgelse 216667ab2ff2Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 216767ab2ff2Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 216867ab2ff2Smrg lt_aix_libpath_sed='[ 216967ab2ff2Smrg /Import File Strings/,/^$/ { 217067ab2ff2Smrg /^0/ { 217167ab2ff2Smrg s/^0 *\([^ ]*\) *$/\1/ 217267ab2ff2Smrg p 217367ab2ff2Smrg } 217467ab2ff2Smrg }]' 217567ab2ff2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 217667ab2ff2Smrg # Check for a 64-bit object if we didn't find anything. 217767ab2ff2Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 217867ab2ff2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 217967ab2ff2Smrg fi],[]) 218067ab2ff2Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 218167ab2ff2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 218267ab2ff2Smrg fi 218367ab2ff2Smrg ]) 218467ab2ff2Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 218567ab2ff2Smrgfi 218667ab2ff2Smrg])# _LT_SYS_MODULE_PATH_AIX 2187e0963edeSmrg 2188f05b35a2Smrg 218967ab2ff2Smrg# _LT_SHELL_INIT(ARG) 219067ab2ff2Smrg# ------------------- 219167ab2ff2Smrgm4_define([_LT_SHELL_INIT], 219267ab2ff2Smrg[m4_divert_text([M4SH-INIT], [$1 219367ab2ff2Smrg])])# _LT_SHELL_INIT 2194e0963edeSmrg 2195e0963edeSmrg 2196e0963edeSmrg 219767ab2ff2Smrg# _LT_PROG_ECHO_BACKSLASH 219867ab2ff2Smrg# ----------------------- 219967ab2ff2Smrg# Find how we can fake an echo command that does not interpret backslash. 220067ab2ff2Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 220167ab2ff2Smrg# of the generated configure script which will find a shell with a builtin 220267ab2ff2Smrg# printf (which we can use as an echo command). 220367ab2ff2Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 220467ab2ff2Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 220567ab2ff2SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 220667ab2ff2SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2207f05b35a2Smrg 220867ab2ff2SmrgAC_MSG_CHECKING([how to print strings]) 220967ab2ff2Smrg# Test print first, because it will be a builtin if present. 221067ab2ff2Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 221167ab2ff2Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 221267ab2ff2Smrg ECHO='print -r --' 221367ab2ff2Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 221467ab2ff2Smrg ECHO='printf %s\n' 221567ab2ff2Smrgelse 221667ab2ff2Smrg # Use this function as a fallback that always works. 221767ab2ff2Smrg func_fallback_echo () 221867ab2ff2Smrg { 221967ab2ff2Smrg eval 'cat <<_LTECHO_EOF 222067ab2ff2Smrg$[]1 222167ab2ff2Smrg_LTECHO_EOF' 222267ab2ff2Smrg } 222367ab2ff2Smrg ECHO='func_fallback_echo' 222467ab2ff2Smrgfi 2225f05b35a2Smrg 222667ab2ff2Smrg# func_echo_all arg... 222767ab2ff2Smrg# Invoke $ECHO with all args, space-separated. 222867ab2ff2Smrgfunc_echo_all () 222949e108a1Smrg{ 223067ab2ff2Smrg $ECHO "$*" 223167ab2ff2Smrg} 2232e0963edeSmrg 223367ab2ff2Smrgcase "$ECHO" in 223467ab2ff2Smrg printf*) AC_MSG_RESULT([printf]) ;; 223567ab2ff2Smrg print*) AC_MSG_RESULT([print -r]) ;; 223667ab2ff2Smrg *) AC_MSG_RESULT([cat]) ;; 223767ab2ff2Smrgesac 2238f05b35a2Smrg 223967ab2ff2Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 224067ab2ff2Smrg[_AS_DETECT_SUGGESTED([ 224167ab2ff2Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 224267ab2ff2Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 224367ab2ff2Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 224467ab2ff2Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 224567ab2ff2Smrg PATH=/empty FPATH=/empty; export PATH FPATH 224667ab2ff2Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 224767ab2ff2Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2248e0963edeSmrg 224967ab2ff2Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 225067ab2ff2Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 225167ab2ff2Smrg])# _LT_PROG_ECHO_BACKSLASH 2252e0963edeSmrg 2253e0963edeSmrg 225467ab2ff2Smrg# _LT_WITH_SYSROOT 225567ab2ff2Smrg# ---------------- 225667ab2ff2SmrgAC_DEFUN([_LT_WITH_SYSROOT], 225767ab2ff2Smrg[AC_MSG_CHECKING([for sysroot]) 225867ab2ff2SmrgAC_ARG_WITH([sysroot], 225967ab2ff2Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 226067ab2ff2Smrg (or the compiler's sysroot if not specified).], 226167ab2ff2Smrg[], [with_sysroot=no]) 226267ab2ff2Smrg 226367ab2ff2Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 226467ab2ff2Smrgdnl in case the user passed a directory name. 226567ab2ff2Smrglt_sysroot= 226667ab2ff2Smrgcase ${with_sysroot} in #( 226767ab2ff2Smrg yes) 226867ab2ff2Smrg if test "$GCC" = yes; then 226967ab2ff2Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 227067ab2ff2Smrg fi 227167ab2ff2Smrg ;; #( 227267ab2ff2Smrg /*) 227367ab2ff2Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 227467ab2ff2Smrg ;; #( 227567ab2ff2Smrg no|'') 227667ab2ff2Smrg ;; #( 227767ab2ff2Smrg *) 227867ab2ff2Smrg AC_MSG_RESULT([${with_sysroot}]) 227967ab2ff2Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 228067ab2ff2Smrg ;; 228167ab2ff2Smrgesac 2282e0963edeSmrg 228367ab2ff2Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 228467ab2ff2Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 228567ab2ff2Smrg[dependent libraries, and in which our libraries should be installed.])]) 2286e0963edeSmrg 228767ab2ff2Smrg# _LT_ENABLE_LOCK 228867ab2ff2Smrg# --------------- 228967ab2ff2Smrgm4_defun([_LT_ENABLE_LOCK], 229067ab2ff2Smrg[AC_ARG_ENABLE([libtool-lock], 229167ab2ff2Smrg [AS_HELP_STRING([--disable-libtool-lock], 229267ab2ff2Smrg [avoid locking (might break parallel builds)])]) 229367ab2ff2Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2294e0963edeSmrg 229567ab2ff2Smrg# Some flags need to be propagated to the compiler or linker for good 229667ab2ff2Smrg# libtool support. 229767ab2ff2Smrgcase $host in 229867ab2ff2Smrgia64-*-hpux*) 229967ab2ff2Smrg # Find out which ABI we are using. 230067ab2ff2Smrg echo 'int i;' > conftest.$ac_ext 230167ab2ff2Smrg if AC_TRY_EVAL(ac_compile); then 230267ab2ff2Smrg case `/usr/bin/file conftest.$ac_objext` in 230367ab2ff2Smrg *ELF-32*) 230467ab2ff2Smrg HPUX_IA64_MODE="32" 230567ab2ff2Smrg ;; 230667ab2ff2Smrg *ELF-64*) 230767ab2ff2Smrg HPUX_IA64_MODE="64" 230867ab2ff2Smrg ;; 230967ab2ff2Smrg esac 231067ab2ff2Smrg fi 231167ab2ff2Smrg rm -rf conftest* 231267ab2ff2Smrg ;; 231367ab2ff2Smrg*-*-irix6*) 231467ab2ff2Smrg # Find out which ABI we are using. 231567ab2ff2Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 231667ab2ff2Smrg if AC_TRY_EVAL(ac_compile); then 231767ab2ff2Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 231867ab2ff2Smrg case `/usr/bin/file conftest.$ac_objext` in 231967ab2ff2Smrg *32-bit*) 232067ab2ff2Smrg LD="${LD-ld} -melf32bsmip" 232167ab2ff2Smrg ;; 232267ab2ff2Smrg *N32*) 232367ab2ff2Smrg LD="${LD-ld} -melf32bmipn32" 232467ab2ff2Smrg ;; 232567ab2ff2Smrg *64-bit*) 232667ab2ff2Smrg LD="${LD-ld} -melf64bmip" 232767ab2ff2Smrg ;; 232867ab2ff2Smrg esac 232967ab2ff2Smrg else 233067ab2ff2Smrg case `/usr/bin/file conftest.$ac_objext` in 233167ab2ff2Smrg *32-bit*) 233267ab2ff2Smrg LD="${LD-ld} -32" 233367ab2ff2Smrg ;; 233467ab2ff2Smrg *N32*) 233567ab2ff2Smrg LD="${LD-ld} -n32" 233667ab2ff2Smrg ;; 233767ab2ff2Smrg *64-bit*) 233867ab2ff2Smrg LD="${LD-ld} -64" 233967ab2ff2Smrg ;; 234067ab2ff2Smrg esac 234167ab2ff2Smrg fi 234267ab2ff2Smrg fi 234367ab2ff2Smrg rm -rf conftest* 234467ab2ff2Smrg ;; 234549e108a1Smrg 234667ab2ff2Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 234767ab2ff2Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 234867ab2ff2Smrg # Find out which ABI we are using. 234967ab2ff2Smrg echo 'int i;' > conftest.$ac_ext 235067ab2ff2Smrg if AC_TRY_EVAL(ac_compile); then 235167ab2ff2Smrg case `/usr/bin/file conftest.o` in 235267ab2ff2Smrg *32-bit*) 235367ab2ff2Smrg case $host in 235467ab2ff2Smrg x86_64-*kfreebsd*-gnu) 235567ab2ff2Smrg LD="${LD-ld} -m elf_i386_fbsd" 235667ab2ff2Smrg ;; 235767ab2ff2Smrg x86_64-*linux*) 235867ab2ff2Smrg LD="${LD-ld} -m elf_i386" 235967ab2ff2Smrg ;; 236067ab2ff2Smrg ppc64-*linux*|powerpc64-*linux*) 236167ab2ff2Smrg LD="${LD-ld} -m elf32ppclinux" 236267ab2ff2Smrg ;; 236367ab2ff2Smrg s390x-*linux*) 236467ab2ff2Smrg LD="${LD-ld} -m elf_s390" 236567ab2ff2Smrg ;; 236667ab2ff2Smrg sparc64-*linux*) 236767ab2ff2Smrg LD="${LD-ld} -m elf32_sparc" 236867ab2ff2Smrg ;; 236967ab2ff2Smrg esac 237067ab2ff2Smrg ;; 237167ab2ff2Smrg *64-bit*) 237267ab2ff2Smrg case $host in 237367ab2ff2Smrg x86_64-*kfreebsd*-gnu) 237467ab2ff2Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 237567ab2ff2Smrg ;; 237667ab2ff2Smrg x86_64-*linux*) 237767ab2ff2Smrg LD="${LD-ld} -m elf_x86_64" 237867ab2ff2Smrg ;; 237967ab2ff2Smrg ppc*-*linux*|powerpc*-*linux*) 238067ab2ff2Smrg LD="${LD-ld} -m elf64ppc" 238167ab2ff2Smrg ;; 238267ab2ff2Smrg s390*-*linux*|s390*-*tpf*) 238367ab2ff2Smrg LD="${LD-ld} -m elf64_s390" 238467ab2ff2Smrg ;; 238567ab2ff2Smrg sparc*-*linux*) 238667ab2ff2Smrg LD="${LD-ld} -m elf64_sparc" 238767ab2ff2Smrg ;; 238867ab2ff2Smrg esac 238967ab2ff2Smrg ;; 239067ab2ff2Smrg esac 239167ab2ff2Smrg fi 239267ab2ff2Smrg rm -rf conftest* 239367ab2ff2Smrg ;; 2394e0963edeSmrg 239567ab2ff2Smrg*-*-sco3.2v5*) 239667ab2ff2Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 239767ab2ff2Smrg SAVE_CFLAGS="$CFLAGS" 239867ab2ff2Smrg CFLAGS="$CFLAGS -belf" 239967ab2ff2Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 240067ab2ff2Smrg [AC_LANG_PUSH(C) 240167ab2ff2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 240267ab2ff2Smrg AC_LANG_POP]) 240367ab2ff2Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 240467ab2ff2Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 240567ab2ff2Smrg CFLAGS="$SAVE_CFLAGS" 240667ab2ff2Smrg fi 240767ab2ff2Smrg ;; 2408e494fffdSmrg*-*solaris*) 240967ab2ff2Smrg # Find out which ABI we are using. 241067ab2ff2Smrg echo 'int i;' > conftest.$ac_ext 241167ab2ff2Smrg if AC_TRY_EVAL(ac_compile); then 241267ab2ff2Smrg case `/usr/bin/file conftest.o` in 241367ab2ff2Smrg *64-bit*) 241467ab2ff2Smrg case $lt_cv_prog_gnu_ld in 2415e494fffdSmrg yes*) 2416e494fffdSmrg case $host in 2417e494fffdSmrg i?86-*-solaris*) 2418e494fffdSmrg LD="${LD-ld} -m elf_x86_64" 2419e494fffdSmrg ;; 2420e494fffdSmrg sparc*-*-solaris*) 2421e494fffdSmrg LD="${LD-ld} -m elf64_sparc" 2422e494fffdSmrg ;; 2423e494fffdSmrg esac 2424e494fffdSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2425e494fffdSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2426e494fffdSmrg LD="${LD-ld}_sol2" 2427e494fffdSmrg fi 2428e494fffdSmrg ;; 242967ab2ff2Smrg *) 243067ab2ff2Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 243167ab2ff2Smrg LD="${LD-ld} -64" 243267ab2ff2Smrg fi 243367ab2ff2Smrg ;; 243467ab2ff2Smrg esac 243567ab2ff2Smrg ;; 243667ab2ff2Smrg esac 243767ab2ff2Smrg fi 243867ab2ff2Smrg rm -rf conftest* 243967ab2ff2Smrg ;; 244067ab2ff2Smrgesac 2441e0963edeSmrg 244267ab2ff2Smrgneed_locks="$enable_libtool_lock" 244367ab2ff2Smrg])# _LT_ENABLE_LOCK 2444e0963edeSmrg 2445e0963edeSmrg 244667ab2ff2Smrg# _LT_PROG_AR 244767ab2ff2Smrg# ----------- 244867ab2ff2Smrgm4_defun([_LT_PROG_AR], 244967ab2ff2Smrg[AC_CHECK_TOOLS(AR, [ar], false) 245067ab2ff2Smrg: ${AR=ar} 245167ab2ff2Smrg: ${AR_FLAGS=cru} 245267ab2ff2Smrg_LT_DECL([], [AR], [1], [The archiver]) 245367ab2ff2Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 245467ab2ff2Smrg 245567ab2ff2SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 245667ab2ff2Smrg [lt_cv_ar_at_file=no 245767ab2ff2Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 245867ab2ff2Smrg [echo conftest.$ac_objext > conftest.lst 245967ab2ff2Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 246067ab2ff2Smrg AC_TRY_EVAL([lt_ar_try]) 246167ab2ff2Smrg if test "$ac_status" -eq 0; then 246267ab2ff2Smrg # Ensure the archiver fails upon bogus file names. 246367ab2ff2Smrg rm -f conftest.$ac_objext libconftest.a 246467ab2ff2Smrg AC_TRY_EVAL([lt_ar_try]) 246567ab2ff2Smrg if test "$ac_status" -ne 0; then 246667ab2ff2Smrg lt_cv_ar_at_file=@ 246767ab2ff2Smrg fi 246867ab2ff2Smrg fi 246967ab2ff2Smrg rm -f conftest.* libconftest.a 247067ab2ff2Smrg ]) 247167ab2ff2Smrg ]) 2472e0963edeSmrg 247367ab2ff2Smrgif test "x$lt_cv_ar_at_file" = xno; then 247467ab2ff2Smrg archiver_list_spec= 247567ab2ff2Smrgelse 247667ab2ff2Smrg archiver_list_spec=$lt_cv_ar_at_file 247767ab2ff2Smrgfi 247867ab2ff2Smrg_LT_DECL([], [archiver_list_spec], [1], 247967ab2ff2Smrg [How to feed a file listing to the archiver]) 248067ab2ff2Smrg])# _LT_PROG_AR 2481e0963edeSmrg 2482e0963edeSmrg 248367ab2ff2Smrg# _LT_CMD_OLD_ARCHIVE 248467ab2ff2Smrg# ------------------- 248567ab2ff2Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 248667ab2ff2Smrg[_LT_PROG_AR 2487e0963edeSmrg 248867ab2ff2SmrgAC_CHECK_TOOL(STRIP, strip, :) 248967ab2ff2Smrgtest -z "$STRIP" && STRIP=: 249067ab2ff2Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2491e0963edeSmrg 249267ab2ff2SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 249367ab2ff2Smrgtest -z "$RANLIB" && RANLIB=: 249467ab2ff2Smrg_LT_DECL([], [RANLIB], [1], 249567ab2ff2Smrg [Commands used to install an old-style archive]) 2496e0963edeSmrg 249767ab2ff2Smrg# Determine commands to create old-style static archives. 249867ab2ff2Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 249967ab2ff2Smrgold_postinstall_cmds='chmod 644 $oldlib' 250067ab2ff2Smrgold_postuninstall_cmds= 2501e0963edeSmrg 250267ab2ff2Smrgif test -n "$RANLIB"; then 250349e108a1Smrg case $host_os in 250467ab2ff2Smrg openbsd*) 2505e494fffdSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 250667ab2ff2Smrg ;; 250767ab2ff2Smrg *) 2508e494fffdSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 250949e108a1Smrg ;; 251049e108a1Smrg esac 2511e494fffdSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 251267ab2ff2Smrgfi 2513e0963edeSmrg 251467ab2ff2Smrgcase $host_os in 251567ab2ff2Smrg darwin*) 251667ab2ff2Smrg lock_old_archive_extraction=yes ;; 251767ab2ff2Smrg *) 251867ab2ff2Smrg lock_old_archive_extraction=no ;; 251967ab2ff2Smrgesac 252067ab2ff2Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 252167ab2ff2Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 252267ab2ff2Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 252367ab2ff2Smrg [Commands used to build an old-style archive]) 252467ab2ff2Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 252567ab2ff2Smrg [Whether to use a lock for old archive extraction]) 252667ab2ff2Smrg])# _LT_CMD_OLD_ARCHIVE 2527e0963edeSmrg 2528e0963edeSmrg 252967ab2ff2Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 253067ab2ff2Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 253167ab2ff2Smrg# ---------------------------------------------------------------- 253267ab2ff2Smrg# Check whether the given compiler option works 253367ab2ff2SmrgAC_DEFUN([_LT_COMPILER_OPTION], 253467ab2ff2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 253567ab2ff2Smrgm4_require([_LT_DECL_SED])dnl 253667ab2ff2SmrgAC_CACHE_CHECK([$1], [$2], 253767ab2ff2Smrg [$2=no 253867ab2ff2Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 253967ab2ff2Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 254067ab2ff2Smrg lt_compiler_flag="$3" 254167ab2ff2Smrg # Insert the option either (1) after the last *FLAGS variable, or 254267ab2ff2Smrg # (2) before a word containing "conftest.", or (3) at the end. 254367ab2ff2Smrg # Note that $ac_compile itself does not contain backslashes and begins 254467ab2ff2Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 254567ab2ff2Smrg # The option is referenced via a variable to avoid confusing sed. 254667ab2ff2Smrg lt_compile=`echo "$ac_compile" | $SED \ 254767ab2ff2Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 254867ab2ff2Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 254967ab2ff2Smrg -e 's:$: $lt_compiler_flag:'` 255067ab2ff2Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 255167ab2ff2Smrg (eval "$lt_compile" 2>conftest.err) 255267ab2ff2Smrg ac_status=$? 255367ab2ff2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 255467ab2ff2Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 255567ab2ff2Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 255667ab2ff2Smrg # The compiler can only warn and ignore the option if not recognized 255767ab2ff2Smrg # So say no if there are warnings other than the usual output. 255867ab2ff2Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 255967ab2ff2Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 256067ab2ff2Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 256167ab2ff2Smrg $2=yes 256267ab2ff2Smrg fi 256367ab2ff2Smrg fi 256467ab2ff2Smrg $RM conftest* 256567ab2ff2Smrg]) 2566e0963edeSmrg 256767ab2ff2Smrgif test x"[$]$2" = xyes; then 256867ab2ff2Smrg m4_if([$5], , :, [$5]) 256967ab2ff2Smrgelse 257067ab2ff2Smrg m4_if([$6], , :, [$6]) 257167ab2ff2Smrgfi 257267ab2ff2Smrg])# _LT_COMPILER_OPTION 2573e0963edeSmrg 257467ab2ff2Smrg# Old name: 257567ab2ff2SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 257667ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 257767ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2578e0963edeSmrg 2579f05b35a2Smrg 258067ab2ff2Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 258167ab2ff2Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 258267ab2ff2Smrg# ---------------------------------------------------- 258367ab2ff2Smrg# Check whether the given linker option works 258467ab2ff2SmrgAC_DEFUN([_LT_LINKER_OPTION], 258567ab2ff2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 258667ab2ff2Smrgm4_require([_LT_DECL_SED])dnl 258767ab2ff2SmrgAC_CACHE_CHECK([$1], [$2], 258867ab2ff2Smrg [$2=no 258967ab2ff2Smrg save_LDFLAGS="$LDFLAGS" 259067ab2ff2Smrg LDFLAGS="$LDFLAGS $3" 259167ab2ff2Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 259267ab2ff2Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 259367ab2ff2Smrg # The linker can only warn and ignore the option if not recognized 259467ab2ff2Smrg # So say no if there are warnings 259567ab2ff2Smrg if test -s conftest.err; then 259667ab2ff2Smrg # Append any errors to the config.log. 259767ab2ff2Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 259867ab2ff2Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 259967ab2ff2Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 260067ab2ff2Smrg if diff conftest.exp conftest.er2 >/dev/null; then 260167ab2ff2Smrg $2=yes 260267ab2ff2Smrg fi 260367ab2ff2Smrg else 260467ab2ff2Smrg $2=yes 260567ab2ff2Smrg fi 260667ab2ff2Smrg fi 260767ab2ff2Smrg $RM -r conftest* 260867ab2ff2Smrg LDFLAGS="$save_LDFLAGS" 260967ab2ff2Smrg]) 261049e108a1Smrg 261167ab2ff2Smrgif test x"[$]$2" = xyes; then 261267ab2ff2Smrg m4_if([$4], , :, [$4]) 261367ab2ff2Smrgelse 261467ab2ff2Smrg m4_if([$5], , :, [$5]) 261567ab2ff2Smrgfi 261667ab2ff2Smrg])# _LT_LINKER_OPTION 261749e108a1Smrg 261867ab2ff2Smrg# Old name: 261967ab2ff2SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 262067ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 262167ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 262249e108a1Smrg 262349e108a1Smrg 262467ab2ff2Smrg# LT_CMD_MAX_LEN 262567ab2ff2Smrg#--------------- 262667ab2ff2SmrgAC_DEFUN([LT_CMD_MAX_LEN], 262767ab2ff2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 262867ab2ff2Smrg# find the maximum length of command line arguments 262967ab2ff2SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 263067ab2ff2SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 263167ab2ff2Smrg i=0 263267ab2ff2Smrg teststring="ABCD" 263349e108a1Smrg 263467ab2ff2Smrg case $build_os in 263567ab2ff2Smrg msdosdjgpp*) 263667ab2ff2Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 263767ab2ff2Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 263867ab2ff2Smrg # during glob expansion). Even if it were fixed, the result of this 263967ab2ff2Smrg # check would be larger than it should be. 264067ab2ff2Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 264167ab2ff2Smrg ;; 264249e108a1Smrg 264367ab2ff2Smrg gnu*) 264467ab2ff2Smrg # Under GNU Hurd, this test is not required because there is 264567ab2ff2Smrg # no limit to the length of command line arguments. 264667ab2ff2Smrg # Libtool will interpret -1 as no limit whatsoever 264767ab2ff2Smrg lt_cv_sys_max_cmd_len=-1; 264867ab2ff2Smrg ;; 264949e108a1Smrg 265067ab2ff2Smrg cygwin* | mingw* | cegcc*) 265167ab2ff2Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 265267ab2ff2Smrg # about 5 minutes as the teststring grows exponentially. 265367ab2ff2Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 265467ab2ff2Smrg # you end up with a "frozen" computer, even though with patience 265567ab2ff2Smrg # the test eventually succeeds (with a max line length of 256k). 265667ab2ff2Smrg # Instead, let's just punt: use the minimum linelength reported by 265767ab2ff2Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 265867ab2ff2Smrg lt_cv_sys_max_cmd_len=8192; 265967ab2ff2Smrg ;; 266049e108a1Smrg 266167ab2ff2Smrg mint*) 266267ab2ff2Smrg # On MiNT this can take a long time and run out of memory. 266367ab2ff2Smrg lt_cv_sys_max_cmd_len=8192; 266467ab2ff2Smrg ;; 266549e108a1Smrg 266667ab2ff2Smrg amigaos*) 266767ab2ff2Smrg # On AmigaOS with pdksh, this test takes hours, literally. 266867ab2ff2Smrg # So we just punt and use a minimum line length of 8192. 266967ab2ff2Smrg lt_cv_sys_max_cmd_len=8192; 267067ab2ff2Smrg ;; 267149e108a1Smrg 267267ab2ff2Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 267367ab2ff2Smrg # This has been around since 386BSD, at least. Likely further. 267467ab2ff2Smrg if test -x /sbin/sysctl; then 267567ab2ff2Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 267667ab2ff2Smrg elif test -x /usr/sbin/sysctl; then 267767ab2ff2Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 267867ab2ff2Smrg else 267967ab2ff2Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 268067ab2ff2Smrg fi 268167ab2ff2Smrg # And add a safety zone 268267ab2ff2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 268367ab2ff2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 268467ab2ff2Smrg ;; 268549e108a1Smrg 268667ab2ff2Smrg interix*) 268767ab2ff2Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 268867ab2ff2Smrg lt_cv_sys_max_cmd_len=196608 268967ab2ff2Smrg ;; 269049e108a1Smrg 2691e494fffdSmrg os2*) 2692e494fffdSmrg # The test takes a long time on OS/2. 2693e494fffdSmrg lt_cv_sys_max_cmd_len=8192 2694e494fffdSmrg ;; 2695e494fffdSmrg 269667ab2ff2Smrg osf*) 269767ab2ff2Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 269867ab2ff2Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 269967ab2ff2Smrg # nice to cause kernel panics so lets avoid the loop below. 270067ab2ff2Smrg # First set a reasonable default. 270167ab2ff2Smrg lt_cv_sys_max_cmd_len=16384 270267ab2ff2Smrg # 270367ab2ff2Smrg if test -x /sbin/sysconfig; then 270467ab2ff2Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 270567ab2ff2Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 270649e108a1Smrg esac 270749e108a1Smrg fi 270867ab2ff2Smrg ;; 270967ab2ff2Smrg sco3.2v5*) 271067ab2ff2Smrg lt_cv_sys_max_cmd_len=102400 271167ab2ff2Smrg ;; 271267ab2ff2Smrg sysv5* | sco5v6* | sysv4.2uw2*) 271367ab2ff2Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 271467ab2ff2Smrg if test -n "$kargmax"; then 271567ab2ff2Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 271649e108a1Smrg else 271767ab2ff2Smrg lt_cv_sys_max_cmd_len=32768 271849e108a1Smrg fi 271967ab2ff2Smrg ;; 272067ab2ff2Smrg *) 272167ab2ff2Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 272267ab2ff2Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 272367ab2ff2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 272467ab2ff2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 272549e108a1Smrg else 272667ab2ff2Smrg # Make teststring a little bigger before we do anything with it. 272767ab2ff2Smrg # a 1K string should be a reasonable start. 272867ab2ff2Smrg for i in 1 2 3 4 5 6 7 8 ; do 272967ab2ff2Smrg teststring=$teststring$teststring 273067ab2ff2Smrg done 273167ab2ff2Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 273267ab2ff2Smrg # If test is not a shell built-in, we'll probably end up computing a 273367ab2ff2Smrg # maximum length that is only half of the actual maximum length, but 273467ab2ff2Smrg # we can't tell. 2735e494fffdSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 273667ab2ff2Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 273767ab2ff2Smrg test $i != 17 # 1/2 MB should be enough 273867ab2ff2Smrg do 273967ab2ff2Smrg i=`expr $i + 1` 274067ab2ff2Smrg teststring=$teststring$teststring 274167ab2ff2Smrg done 274267ab2ff2Smrg # Only check the string length outside the loop. 274367ab2ff2Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 274467ab2ff2Smrg teststring= 274567ab2ff2Smrg # Add a significant safety factor because C++ compilers can tack on 274667ab2ff2Smrg # massive amounts of additional arguments before passing them to the 274767ab2ff2Smrg # linker. It appears as though 1/2 is a usable value. 274867ab2ff2Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 274949e108a1Smrg fi 275049e108a1Smrg ;; 275149e108a1Smrg esac 275249e108a1Smrg]) 275367ab2ff2Smrgif test -n $lt_cv_sys_max_cmd_len ; then 275467ab2ff2Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 275567ab2ff2Smrgelse 275667ab2ff2Smrg AC_MSG_RESULT(none) 275767ab2ff2Smrgfi 275867ab2ff2Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 275967ab2ff2Smrg_LT_DECL([], [max_cmd_len], [0], 276067ab2ff2Smrg [What is the maximum length of a command?]) 276167ab2ff2Smrg])# LT_CMD_MAX_LEN 276249e108a1Smrg 276367ab2ff2Smrg# Old name: 276467ab2ff2SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 276567ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 276667ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 276749e108a1Smrg 276849e108a1Smrg 276967ab2ff2Smrg# _LT_HEADER_DLFCN 277067ab2ff2Smrg# ---------------- 277167ab2ff2Smrgm4_defun([_LT_HEADER_DLFCN], 277267ab2ff2Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 277367ab2ff2Smrg])# _LT_HEADER_DLFCN 277449e108a1Smrg 277549e108a1Smrg 277667ab2ff2Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 277767ab2ff2Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 277867ab2ff2Smrg# ---------------------------------------------------------------- 277967ab2ff2Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 278067ab2ff2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 278167ab2ff2Smrgif test "$cross_compiling" = yes; then : 278267ab2ff2Smrg [$4] 278367ab2ff2Smrgelse 278467ab2ff2Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 278567ab2ff2Smrg lt_status=$lt_dlunknown 278667ab2ff2Smrg cat > conftest.$ac_ext <<_LT_EOF 278767ab2ff2Smrg[#line $LINENO "configure" 278867ab2ff2Smrg#include "confdefs.h" 278949e108a1Smrg 279067ab2ff2Smrg#if HAVE_DLFCN_H 279167ab2ff2Smrg#include <dlfcn.h> 279267ab2ff2Smrg#endif 279349e108a1Smrg 279467ab2ff2Smrg#include <stdio.h> 279549e108a1Smrg 279667ab2ff2Smrg#ifdef RTLD_GLOBAL 279767ab2ff2Smrg# define LT_DLGLOBAL RTLD_GLOBAL 279867ab2ff2Smrg#else 279967ab2ff2Smrg# ifdef DL_GLOBAL 280067ab2ff2Smrg# define LT_DLGLOBAL DL_GLOBAL 280167ab2ff2Smrg# else 280267ab2ff2Smrg# define LT_DLGLOBAL 0 280367ab2ff2Smrg# endif 280467ab2ff2Smrg#endif 280549e108a1Smrg 280667ab2ff2Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 280767ab2ff2Smrg find out it does not work in some platform. */ 280867ab2ff2Smrg#ifndef LT_DLLAZY_OR_NOW 280967ab2ff2Smrg# ifdef RTLD_LAZY 281067ab2ff2Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 281167ab2ff2Smrg# else 281267ab2ff2Smrg# ifdef DL_LAZY 281367ab2ff2Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 281467ab2ff2Smrg# else 281567ab2ff2Smrg# ifdef RTLD_NOW 281667ab2ff2Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 281767ab2ff2Smrg# else 281867ab2ff2Smrg# ifdef DL_NOW 281967ab2ff2Smrg# define LT_DLLAZY_OR_NOW DL_NOW 282067ab2ff2Smrg# else 282167ab2ff2Smrg# define LT_DLLAZY_OR_NOW 0 282267ab2ff2Smrg# endif 282367ab2ff2Smrg# endif 282467ab2ff2Smrg# endif 282567ab2ff2Smrg# endif 282667ab2ff2Smrg#endif 282749e108a1Smrg 282867ab2ff2Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 282967ab2ff2Smrg correspondingly for the symbols needed. */ 283067ab2ff2Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 283167ab2ff2Smrgint fnord () __attribute__((visibility("default"))); 283267ab2ff2Smrg#endif 283367ab2ff2Smrg 283467ab2ff2Smrgint fnord () { return 42; } 283567ab2ff2Smrgint main () 283649e108a1Smrg{ 283767ab2ff2Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 283867ab2ff2Smrg int status = $lt_dlunknown; 283949e108a1Smrg 284067ab2ff2Smrg if (self) 284167ab2ff2Smrg { 284267ab2ff2Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 284367ab2ff2Smrg else 284467ab2ff2Smrg { 284567ab2ff2Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 284667ab2ff2Smrg else puts (dlerror ()); 284767ab2ff2Smrg } 284867ab2ff2Smrg /* dlclose (self); */ 284967ab2ff2Smrg } 285067ab2ff2Smrg else 285167ab2ff2Smrg puts (dlerror ()); 285249e108a1Smrg 285367ab2ff2Smrg return status; 285467ab2ff2Smrg}] 285567ab2ff2Smrg_LT_EOF 285667ab2ff2Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 285767ab2ff2Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 285867ab2ff2Smrg lt_status=$? 285967ab2ff2Smrg case x$lt_status in 286067ab2ff2Smrg x$lt_dlno_uscore) $1 ;; 286167ab2ff2Smrg x$lt_dlneed_uscore) $2 ;; 286267ab2ff2Smrg x$lt_dlunknown|x*) $3 ;; 286367ab2ff2Smrg esac 286467ab2ff2Smrg else : 286567ab2ff2Smrg # compilation failed 286667ab2ff2Smrg $3 286767ab2ff2Smrg fi 286867ab2ff2Smrgfi 286967ab2ff2Smrgrm -fr conftest* 287067ab2ff2Smrg])# _LT_TRY_DLOPEN_SELF 287149e108a1Smrg 287249e108a1Smrg 287367ab2ff2Smrg# LT_SYS_DLOPEN_SELF 287467ab2ff2Smrg# ------------------ 287567ab2ff2SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 287667ab2ff2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 287767ab2ff2Smrgif test "x$enable_dlopen" != xyes; then 287867ab2ff2Smrg enable_dlopen=unknown 287967ab2ff2Smrg enable_dlopen_self=unknown 288067ab2ff2Smrg enable_dlopen_self_static=unknown 288167ab2ff2Smrgelse 288267ab2ff2Smrg lt_cv_dlopen=no 288367ab2ff2Smrg lt_cv_dlopen_libs= 288449e108a1Smrg 288567ab2ff2Smrg case $host_os in 288667ab2ff2Smrg beos*) 288767ab2ff2Smrg lt_cv_dlopen="load_add_on" 288867ab2ff2Smrg lt_cv_dlopen_libs= 288967ab2ff2Smrg lt_cv_dlopen_self=yes 289067ab2ff2Smrg ;; 289149e108a1Smrg 289267ab2ff2Smrg mingw* | pw32* | cegcc*) 289367ab2ff2Smrg lt_cv_dlopen="LoadLibrary" 289467ab2ff2Smrg lt_cv_dlopen_libs= 289567ab2ff2Smrg ;; 289667ab2ff2Smrg 289767ab2ff2Smrg cygwin*) 289867ab2ff2Smrg lt_cv_dlopen="dlopen" 289967ab2ff2Smrg lt_cv_dlopen_libs= 290067ab2ff2Smrg ;; 290167ab2ff2Smrg 290267ab2ff2Smrg darwin*) 290367ab2ff2Smrg # if libdl is installed we need to link against it 290467ab2ff2Smrg AC_CHECK_LIB([dl], [dlopen], 290567ab2ff2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 290667ab2ff2Smrg lt_cv_dlopen="dyld" 290767ab2ff2Smrg lt_cv_dlopen_libs= 290867ab2ff2Smrg lt_cv_dlopen_self=yes 290967ab2ff2Smrg ]) 291067ab2ff2Smrg ;; 291167ab2ff2Smrg 291267ab2ff2Smrg *) 291367ab2ff2Smrg AC_CHECK_FUNC([shl_load], 291467ab2ff2Smrg [lt_cv_dlopen="shl_load"], 291567ab2ff2Smrg [AC_CHECK_LIB([dld], [shl_load], 291667ab2ff2Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 291767ab2ff2Smrg [AC_CHECK_FUNC([dlopen], 291867ab2ff2Smrg [lt_cv_dlopen="dlopen"], 291967ab2ff2Smrg [AC_CHECK_LIB([dl], [dlopen], 292067ab2ff2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 292167ab2ff2Smrg [AC_CHECK_LIB([svld], [dlopen], 292267ab2ff2Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 292367ab2ff2Smrg [AC_CHECK_LIB([dld], [dld_link], 292467ab2ff2Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 292567ab2ff2Smrg ]) 292667ab2ff2Smrg ]) 292767ab2ff2Smrg ]) 292867ab2ff2Smrg ]) 292967ab2ff2Smrg ]) 293067ab2ff2Smrg ;; 293167ab2ff2Smrg esac 293267ab2ff2Smrg 293367ab2ff2Smrg if test "x$lt_cv_dlopen" != xno; then 293467ab2ff2Smrg enable_dlopen=yes 293567ab2ff2Smrg else 293667ab2ff2Smrg enable_dlopen=no 293749e108a1Smrg fi 293849e108a1Smrg 293967ab2ff2Smrg case $lt_cv_dlopen in 294067ab2ff2Smrg dlopen) 294167ab2ff2Smrg save_CPPFLAGS="$CPPFLAGS" 294267ab2ff2Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 294349e108a1Smrg 294467ab2ff2Smrg save_LDFLAGS="$LDFLAGS" 294567ab2ff2Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 294649e108a1Smrg 294767ab2ff2Smrg save_LIBS="$LIBS" 294867ab2ff2Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 294949e108a1Smrg 295067ab2ff2Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 295167ab2ff2Smrg lt_cv_dlopen_self, [dnl 295267ab2ff2Smrg _LT_TRY_DLOPEN_SELF( 295367ab2ff2Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 295467ab2ff2Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 295567ab2ff2Smrg ]) 295649e108a1Smrg 295767ab2ff2Smrg if test "x$lt_cv_dlopen_self" = xyes; then 295867ab2ff2Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 295967ab2ff2Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 296067ab2ff2Smrg lt_cv_dlopen_self_static, [dnl 296167ab2ff2Smrg _LT_TRY_DLOPEN_SELF( 296267ab2ff2Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 296367ab2ff2Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 296467ab2ff2Smrg ]) 296567ab2ff2Smrg fi 296649e108a1Smrg 296767ab2ff2Smrg CPPFLAGS="$save_CPPFLAGS" 296867ab2ff2Smrg LDFLAGS="$save_LDFLAGS" 296967ab2ff2Smrg LIBS="$save_LIBS" 297067ab2ff2Smrg ;; 297167ab2ff2Smrg esac 297249e108a1Smrg 297367ab2ff2Smrg case $lt_cv_dlopen_self in 297467ab2ff2Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 297567ab2ff2Smrg *) enable_dlopen_self=unknown ;; 297667ab2ff2Smrg esac 297749e108a1Smrg 297867ab2ff2Smrg case $lt_cv_dlopen_self_static in 297967ab2ff2Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 298067ab2ff2Smrg *) enable_dlopen_self_static=unknown ;; 298149e108a1Smrg esac 298249e108a1Smrgfi 298367ab2ff2Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 298467ab2ff2Smrg [Whether dlopen is supported]) 298567ab2ff2Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 298667ab2ff2Smrg [Whether dlopen of programs is supported]) 298767ab2ff2Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 298867ab2ff2Smrg [Whether dlopen of statically linked programs is supported]) 298967ab2ff2Smrg])# LT_SYS_DLOPEN_SELF 299049e108a1Smrg 299167ab2ff2Smrg# Old name: 299267ab2ff2SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 299367ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 299467ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 299549e108a1Smrg 299649e108a1Smrg 299767ab2ff2Smrg# _LT_COMPILER_C_O([TAGNAME]) 299867ab2ff2Smrg# --------------------------- 299967ab2ff2Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 300067ab2ff2Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 300167ab2ff2Smrgm4_defun([_LT_COMPILER_C_O], 300267ab2ff2Smrg[m4_require([_LT_DECL_SED])dnl 300367ab2ff2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 300467ab2ff2Smrgm4_require([_LT_TAG_COMPILER])dnl 300567ab2ff2SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 300667ab2ff2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 300767ab2ff2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 300867ab2ff2Smrg $RM -r conftest 2>/dev/null 300967ab2ff2Smrg mkdir conftest 301067ab2ff2Smrg cd conftest 301167ab2ff2Smrg mkdir out 301249e108a1Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 301367ab2ff2Smrg 301467ab2ff2Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 301549e108a1Smrg # Insert the option either (1) after the last *FLAGS variable, or 301649e108a1Smrg # (2) before a word containing "conftest.", or (3) at the end. 301749e108a1Smrg # Note that $ac_compile itself does not contain backslashes and begins 301849e108a1Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 301949e108a1Smrg lt_compile=`echo "$ac_compile" | $SED \ 302049e108a1Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 302149e108a1Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 302249e108a1Smrg -e 's:$: $lt_compiler_flag:'` 302349e108a1Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 302467ab2ff2Smrg (eval "$lt_compile" 2>out/conftest.err) 302549e108a1Smrg ac_status=$? 302667ab2ff2Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 302749e108a1Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 302867ab2ff2Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 302967ab2ff2Smrg then 303049e108a1Smrg # The compiler can only warn and ignore the option if not recognized 303167ab2ff2Smrg # So say no if there are warnings 303267ab2ff2Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 303367ab2ff2Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 303467ab2ff2Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 303567ab2ff2Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 303649e108a1Smrg fi 303749e108a1Smrg fi 303867ab2ff2Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 303967ab2ff2Smrg $RM conftest* 304067ab2ff2Smrg # SGI C++ compiler will create directory out/ii_files/ for 304167ab2ff2Smrg # template instantiation 304267ab2ff2Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 304367ab2ff2Smrg $RM out/* && rmdir out 304467ab2ff2Smrg cd .. 304567ab2ff2Smrg $RM -r conftest 304649e108a1Smrg $RM conftest* 304749e108a1Smrg]) 304867ab2ff2Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 304967ab2ff2Smrg [Does compiler simultaneously support -c and -o options?]) 305067ab2ff2Smrg])# _LT_COMPILER_C_O 305149e108a1Smrg 305267ab2ff2Smrg 305367ab2ff2Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 305467ab2ff2Smrg# ---------------------------------- 305567ab2ff2Smrg# Check to see if we can do hard links to lock some files if needed 305667ab2ff2Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 305767ab2ff2Smrg[m4_require([_LT_ENABLE_LOCK])dnl 305867ab2ff2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 305967ab2ff2Smrg_LT_COMPILER_C_O([$1]) 306067ab2ff2Smrg 306167ab2ff2Smrghard_links="nottested" 306267ab2ff2Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 306367ab2ff2Smrg # do not overwrite the value of need_locks provided by the user 306467ab2ff2Smrg AC_MSG_CHECKING([if we can lock with hard links]) 306567ab2ff2Smrg hard_links=yes 306667ab2ff2Smrg $RM conftest* 306767ab2ff2Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 306867ab2ff2Smrg touch conftest.a 306967ab2ff2Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 307067ab2ff2Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 307167ab2ff2Smrg AC_MSG_RESULT([$hard_links]) 307267ab2ff2Smrg if test "$hard_links" = no; then 307367ab2ff2Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 307467ab2ff2Smrg need_locks=warn 307567ab2ff2Smrg fi 307649e108a1Smrgelse 307767ab2ff2Smrg need_locks=no 307849e108a1Smrgfi 307967ab2ff2Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 308067ab2ff2Smrg])# _LT_COMPILER_FILE_LOCKS 308149e108a1Smrg 308249e108a1Smrg 308367ab2ff2Smrg# _LT_CHECK_OBJDIR 308467ab2ff2Smrg# ---------------- 308567ab2ff2Smrgm4_defun([_LT_CHECK_OBJDIR], 308667ab2ff2Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 308767ab2ff2Smrg[rm -f .libs 2>/dev/null 308867ab2ff2Smrgmkdir .libs 2>/dev/null 308967ab2ff2Smrgif test -d .libs; then 309067ab2ff2Smrg lt_cv_objdir=.libs 309149e108a1Smrgelse 309267ab2ff2Smrg # MS-DOS does not allow filenames that begin with a dot. 309367ab2ff2Smrg lt_cv_objdir=_libs 309449e108a1Smrgfi 309567ab2ff2Smrgrmdir .libs 2>/dev/null]) 309667ab2ff2Smrgobjdir=$lt_cv_objdir 309767ab2ff2Smrg_LT_DECL([], [objdir], [0], 309867ab2ff2Smrg [The name of the directory that contains temporary libtool files])dnl 309967ab2ff2Smrgm4_pattern_allow([LT_OBJDIR])dnl 310067ab2ff2SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 310167ab2ff2Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 310267ab2ff2Smrg])# _LT_CHECK_OBJDIR 310349e108a1Smrg 310449e108a1Smrg 310567ab2ff2Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 310667ab2ff2Smrg# -------------------------------------- 310767ab2ff2Smrg# Check hardcoding attributes. 310867ab2ff2Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 310967ab2ff2Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 311067ab2ff2Smrg_LT_TAGVAR(hardcode_action, $1)= 311167ab2ff2Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 311267ab2ff2Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 311367ab2ff2Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 311449e108a1Smrg 311567ab2ff2Smrg # We can hardcode non-existent directories. 311667ab2ff2Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 311767ab2ff2Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 311867ab2ff2Smrg # have to relink, otherwise we might link with an installed library 311967ab2ff2Smrg # when we should be linking with a yet-to-be-installed one 312067ab2ff2Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 312167ab2ff2Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 312267ab2ff2Smrg # Linking always hardcodes the temporary library directory. 312367ab2ff2Smrg _LT_TAGVAR(hardcode_action, $1)=relink 312467ab2ff2Smrg else 312567ab2ff2Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 312667ab2ff2Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 312767ab2ff2Smrg fi 312867ab2ff2Smrgelse 312967ab2ff2Smrg # We cannot hardcode anything, or else we can only hardcode existing 313067ab2ff2Smrg # directories. 313167ab2ff2Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 313267ab2ff2Smrgfi 313367ab2ff2SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 313449e108a1Smrg 313567ab2ff2Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 313667ab2ff2Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 313767ab2ff2Smrg # Fast installation is not supported 313867ab2ff2Smrg enable_fast_install=no 313967ab2ff2Smrgelif test "$shlibpath_overrides_runpath" = yes || 314067ab2ff2Smrg test "$enable_shared" = no; then 314167ab2ff2Smrg # Fast installation is not necessary 314267ab2ff2Smrg enable_fast_install=needless 314367ab2ff2Smrgfi 314467ab2ff2Smrg_LT_TAGDECL([], [hardcode_action], [0], 314567ab2ff2Smrg [How to hardcode a shared library path into an executable]) 314667ab2ff2Smrg])# _LT_LINKER_HARDCODE_LIBPATH 314749e108a1Smrg 314849e108a1Smrg 314967ab2ff2Smrg# _LT_CMD_STRIPLIB 315067ab2ff2Smrg# ---------------- 315167ab2ff2Smrgm4_defun([_LT_CMD_STRIPLIB], 315267ab2ff2Smrg[m4_require([_LT_DECL_EGREP]) 315367ab2ff2Smrgstriplib= 315467ab2ff2Smrgold_striplib= 315567ab2ff2SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 315667ab2ff2Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 315767ab2ff2Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 315867ab2ff2Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 315967ab2ff2Smrg AC_MSG_RESULT([yes]) 316067ab2ff2Smrgelse 316167ab2ff2Smrg# FIXME - insert some real tests, host_os isn't really good enough 316267ab2ff2Smrg case $host_os in 316367ab2ff2Smrg darwin*) 316467ab2ff2Smrg if test -n "$STRIP" ; then 316567ab2ff2Smrg striplib="$STRIP -x" 316667ab2ff2Smrg old_striplib="$STRIP -S" 316767ab2ff2Smrg AC_MSG_RESULT([yes]) 316849e108a1Smrg else 316967ab2ff2Smrg AC_MSG_RESULT([no]) 317049e108a1Smrg fi 317149e108a1Smrg ;; 317249e108a1Smrg *) 317367ab2ff2Smrg AC_MSG_RESULT([no]) 317449e108a1Smrg ;; 317549e108a1Smrg esac 317649e108a1Smrgfi 317767ab2ff2Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 317867ab2ff2Smrg_LT_DECL([], [striplib], [1]) 317967ab2ff2Smrg])# _LT_CMD_STRIPLIB 318049e108a1Smrg 318149e108a1Smrg 318267ab2ff2Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 318367ab2ff2Smrg# ----------------------------- 318467ab2ff2Smrg# PORTME Fill in your ld.so characteristics 318567ab2ff2Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 318667ab2ff2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 318767ab2ff2Smrgm4_require([_LT_DECL_EGREP])dnl 318867ab2ff2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 318967ab2ff2Smrgm4_require([_LT_DECL_OBJDUMP])dnl 319067ab2ff2Smrgm4_require([_LT_DECL_SED])dnl 319167ab2ff2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 319267ab2ff2SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 319367ab2ff2Smrgm4_if([$1], 319467ab2ff2Smrg [], [ 319567ab2ff2Smrgif test "$GCC" = yes; then 319667ab2ff2Smrg case $host_os in 319767ab2ff2Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 319867ab2ff2Smrg *) lt_awk_arg="/^libraries:/" ;; 319967ab2ff2Smrg esac 320067ab2ff2Smrg case $host_os in 320167ab2ff2Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 320267ab2ff2Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 320367ab2ff2Smrg esac 320467ab2ff2Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 320567ab2ff2Smrg case $lt_search_path_spec in 320667ab2ff2Smrg *\;*) 320767ab2ff2Smrg # if the path contains ";" then we assume it to be the separator 320867ab2ff2Smrg # otherwise default to the standard path separator (i.e. ":") - it is 320967ab2ff2Smrg # assumed that no part of a normal pathname contains ";" but that should 321067ab2ff2Smrg # okay in the real world where ";" in dirpaths is itself problematic. 321167ab2ff2Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 321267ab2ff2Smrg ;; 321367ab2ff2Smrg *) 321467ab2ff2Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 321567ab2ff2Smrg ;; 321667ab2ff2Smrg esac 321767ab2ff2Smrg # Ok, now we have the path, separated by spaces, we can step through it 321867ab2ff2Smrg # and add multilib dir if necessary. 321967ab2ff2Smrg lt_tmp_lt_search_path_spec= 322067ab2ff2Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 322167ab2ff2Smrg for lt_sys_path in $lt_search_path_spec; do 322267ab2ff2Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 322367ab2ff2Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 322467ab2ff2Smrg else 322567ab2ff2Smrg test -d "$lt_sys_path" && \ 322667ab2ff2Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 322767ab2ff2Smrg fi 322867ab2ff2Smrg done 322967ab2ff2Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 323067ab2ff2SmrgBEGIN {RS=" "; FS="/|\n";} { 323167ab2ff2Smrg lt_foo=""; 323267ab2ff2Smrg lt_count=0; 323367ab2ff2Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 323467ab2ff2Smrg if ($lt_i != "" && $lt_i != ".") { 323567ab2ff2Smrg if ($lt_i == "..") { 323667ab2ff2Smrg lt_count++; 323767ab2ff2Smrg } else { 323867ab2ff2Smrg if (lt_count == 0) { 323967ab2ff2Smrg lt_foo="/" $lt_i lt_foo; 324067ab2ff2Smrg } else { 324167ab2ff2Smrg lt_count--; 324267ab2ff2Smrg } 324367ab2ff2Smrg } 324467ab2ff2Smrg } 324567ab2ff2Smrg } 324667ab2ff2Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 324767ab2ff2Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 324867ab2ff2Smrg}'` 324967ab2ff2Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 325067ab2ff2Smrg # for these hosts. 325167ab2ff2Smrg case $host_os in 325267ab2ff2Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 325367ab2ff2Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 325467ab2ff2Smrg esac 325567ab2ff2Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 325649e108a1Smrgelse 325767ab2ff2Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 325867ab2ff2Smrgfi]) 325967ab2ff2Smrglibrary_names_spec= 326067ab2ff2Smrglibname_spec='lib$name' 326167ab2ff2Smrgsoname_spec= 326267ab2ff2Smrgshrext_cmds=".so" 326367ab2ff2Smrgpostinstall_cmds= 326467ab2ff2Smrgpostuninstall_cmds= 326567ab2ff2Smrgfinish_cmds= 326667ab2ff2Smrgfinish_eval= 326767ab2ff2Smrgshlibpath_var= 326867ab2ff2Smrgshlibpath_overrides_runpath=unknown 326967ab2ff2Smrgversion_type=none 327067ab2ff2Smrgdynamic_linker="$host_os ld.so" 327167ab2ff2Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 327267ab2ff2Smrgneed_lib_prefix=unknown 327367ab2ff2Smrghardcode_into_libs=no 327449e108a1Smrg 327567ab2ff2Smrg# when you set need_version to no, make sure it does not cause -set_version 327667ab2ff2Smrg# flags to be left without arguments 327767ab2ff2Smrgneed_version=unknown 327849e108a1Smrg 327967ab2ff2Smrgcase $host_os in 328067ab2ff2Smrgaix3*) 3281e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 328267ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 328367ab2ff2Smrg shlibpath_var=LIBPATH 328449e108a1Smrg 328567ab2ff2Smrg # AIX 3 has no versioning support, so we append a major version to the name. 328667ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 328767ab2ff2Smrg ;; 328849e108a1Smrg 328967ab2ff2Smrgaix[[4-9]]*) 3290e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 329167ab2ff2Smrg need_lib_prefix=no 329267ab2ff2Smrg need_version=no 329367ab2ff2Smrg hardcode_into_libs=yes 329467ab2ff2Smrg if test "$host_cpu" = ia64; then 329567ab2ff2Smrg # AIX 5 supports IA64 329667ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 329767ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 329849e108a1Smrg else 329967ab2ff2Smrg # With GCC up to 2.95.x, collect2 would create an import file 330067ab2ff2Smrg # for dependence libraries. The import file would start with 330167ab2ff2Smrg # the line `#! .'. This would cause the generated library to 330267ab2ff2Smrg # depend on `.', always an invalid library. This was fixed in 330367ab2ff2Smrg # development snapshots of GCC prior to 3.0. 330467ab2ff2Smrg case $host_os in 330567ab2ff2Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 330667ab2ff2Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 330767ab2ff2Smrg echo ' yes ' 330867ab2ff2Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 330967ab2ff2Smrg : 331067ab2ff2Smrg else 331167ab2ff2Smrg can_build_shared=no 331267ab2ff2Smrg fi 331367ab2ff2Smrg ;; 3314f05b35a2Smrg esac 331567ab2ff2Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 331667ab2ff2Smrg # soname into executable. Probably we can add versioning support to 331767ab2ff2Smrg # collect2, so additional links can be useful in future. 331867ab2ff2Smrg if test "$aix_use_runtimelinking" = yes; then 331967ab2ff2Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 332067ab2ff2Smrg # instead of lib<name>.a to let people know that these are not 332167ab2ff2Smrg # typical AIX shared libraries. 332267ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 332367ab2ff2Smrg else 332467ab2ff2Smrg # We preserve .a as extension for shared libraries through AIX4.2 332567ab2ff2Smrg # and later when we are not doing run time linking. 332667ab2ff2Smrg library_names_spec='${libname}${release}.a $libname.a' 332767ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 332867ab2ff2Smrg fi 332967ab2ff2Smrg shlibpath_var=LIBPATH 3330f05b35a2Smrg fi 333167ab2ff2Smrg ;; 3332f05b35a2Smrg 333367ab2ff2Smrgamigaos*) 333467ab2ff2Smrg case $host_cpu in 333567ab2ff2Smrg powerpc) 333667ab2ff2Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 333767ab2ff2Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 333867ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 333949e108a1Smrg ;; 334067ab2ff2Smrg m68k) 334167ab2ff2Smrg library_names_spec='$libname.ixlibrary $libname.a' 334267ab2ff2Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 334367ab2ff2Smrg 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' 334449e108a1Smrg ;; 334549e108a1Smrg esac 334667ab2ff2Smrg ;; 3347f05b35a2Smrg 334867ab2ff2Smrgbeos*) 334967ab2ff2Smrg library_names_spec='${libname}${shared_ext}' 335067ab2ff2Smrg dynamic_linker="$host_os ld.so" 335167ab2ff2Smrg shlibpath_var=LIBRARY_PATH 335267ab2ff2Smrg ;; 3353f05b35a2Smrg 335467ab2ff2Smrgbsdi[[45]]*) 3355e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 335667ab2ff2Smrg need_version=no 335767ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 335867ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 335967ab2ff2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 336067ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 336167ab2ff2Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 336267ab2ff2Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 336367ab2ff2Smrg # the default ld.so.conf also contains /usr/contrib/lib and 336467ab2ff2Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 336567ab2ff2Smrg # libtool to hard-code these into programs 336667ab2ff2Smrg ;; 3367f05b35a2Smrg 336867ab2ff2Smrgcygwin* | mingw* | pw32* | cegcc*) 336967ab2ff2Smrg version_type=windows 337067ab2ff2Smrg shrext_cmds=".dll" 337167ab2ff2Smrg need_version=no 337267ab2ff2Smrg need_lib_prefix=no 3373f05b35a2Smrg 337467ab2ff2Smrg case $GCC,$cc_basename in 337567ab2ff2Smrg yes,*) 337667ab2ff2Smrg # gcc 337767ab2ff2Smrg library_names_spec='$libname.dll.a' 337867ab2ff2Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 337967ab2ff2Smrg postinstall_cmds='base_file=`basename \${file}`~ 338067ab2ff2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 338167ab2ff2Smrg dldir=$destdir/`dirname \$dlpath`~ 338267ab2ff2Smrg test -d \$dldir || mkdir -p \$dldir~ 338367ab2ff2Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 338467ab2ff2Smrg chmod a+x \$dldir/$dlname~ 338567ab2ff2Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 338667ab2ff2Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 338767ab2ff2Smrg fi' 338867ab2ff2Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 338967ab2ff2Smrg dlpath=$dir/\$dldll~ 339067ab2ff2Smrg $RM \$dlpath' 339167ab2ff2Smrg shlibpath_overrides_runpath=yes 3392f05b35a2Smrg 339367ab2ff2Smrg case $host_os in 339467ab2ff2Smrg cygwin*) 339567ab2ff2Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 339667ab2ff2Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 339767ab2ff2Smrgm4_if([$1], [],[ 339867ab2ff2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 339967ab2ff2Smrg ;; 340067ab2ff2Smrg mingw* | cegcc*) 340167ab2ff2Smrg # MinGW DLLs use traditional 'lib' prefix 340267ab2ff2Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 340367ab2ff2Smrg ;; 340467ab2ff2Smrg pw32*) 340567ab2ff2Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 340667ab2ff2Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 340767ab2ff2Smrg ;; 340867ab2ff2Smrg esac 340967ab2ff2Smrg dynamic_linker='Win32 ld.exe' 341067ab2ff2Smrg ;; 3411f05b35a2Smrg 341267ab2ff2Smrg *,cl*) 341367ab2ff2Smrg # Native MSVC 341467ab2ff2Smrg libname_spec='$name' 341567ab2ff2Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 341667ab2ff2Smrg library_names_spec='${libname}.dll.lib' 341767ab2ff2Smrg 341867ab2ff2Smrg case $build_os in 341967ab2ff2Smrg mingw*) 342067ab2ff2Smrg sys_lib_search_path_spec= 342167ab2ff2Smrg lt_save_ifs=$IFS 342267ab2ff2Smrg IFS=';' 342367ab2ff2Smrg for lt_path in $LIB 342467ab2ff2Smrg do 342567ab2ff2Smrg IFS=$lt_save_ifs 342667ab2ff2Smrg # Let DOS variable expansion print the short 8.3 style file name. 342767ab2ff2Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 342867ab2ff2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 342967ab2ff2Smrg done 343067ab2ff2Smrg IFS=$lt_save_ifs 343167ab2ff2Smrg # Convert to MSYS style. 343267ab2ff2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 343367ab2ff2Smrg ;; 343467ab2ff2Smrg cygwin*) 343567ab2ff2Smrg # Convert to unix form, then to dos form, then back to unix form 343667ab2ff2Smrg # but this time dos style (no spaces!) so that the unix form looks 343767ab2ff2Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 343867ab2ff2Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 343967ab2ff2Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 344067ab2ff2Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 344167ab2ff2Smrg ;; 344267ab2ff2Smrg *) 344367ab2ff2Smrg sys_lib_search_path_spec="$LIB" 344467ab2ff2Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 344567ab2ff2Smrg # It is most probably a Windows format PATH. 344667ab2ff2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 344767ab2ff2Smrg else 344867ab2ff2Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 344967ab2ff2Smrg fi 345067ab2ff2Smrg # FIXME: find the short name or the path components, as spaces are 345167ab2ff2Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 345267ab2ff2Smrg ;; 345367ab2ff2Smrg esac 3454f05b35a2Smrg 345567ab2ff2Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 345667ab2ff2Smrg postinstall_cmds='base_file=`basename \${file}`~ 345767ab2ff2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 345867ab2ff2Smrg dldir=$destdir/`dirname \$dlpath`~ 345967ab2ff2Smrg test -d \$dldir || mkdir -p \$dldir~ 346067ab2ff2Smrg $install_prog $dir/$dlname \$dldir/$dlname' 346167ab2ff2Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 346267ab2ff2Smrg dlpath=$dir/\$dldll~ 346367ab2ff2Smrg $RM \$dlpath' 346467ab2ff2Smrg shlibpath_overrides_runpath=yes 346567ab2ff2Smrg dynamic_linker='Win32 link.exe' 346649e108a1Smrg ;; 3467f05b35a2Smrg 346867ab2ff2Smrg *) 346967ab2ff2Smrg # Assume MSVC wrapper 347067ab2ff2Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 347167ab2ff2Smrg dynamic_linker='Win32 ld.exe' 347267ab2ff2Smrg ;; 347349e108a1Smrg esac 347467ab2ff2Smrg # FIXME: first we should search . and the directory the executable is in 347567ab2ff2Smrg shlibpath_var=PATH 347667ab2ff2Smrg ;; 3477e0963edeSmrg 347867ab2ff2Smrgdarwin* | rhapsody*) 347967ab2ff2Smrg dynamic_linker="$host_os dyld" 348067ab2ff2Smrg version_type=darwin 348167ab2ff2Smrg need_lib_prefix=no 348267ab2ff2Smrg need_version=no 348367ab2ff2Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 348467ab2ff2Smrg soname_spec='${libname}${release}${major}$shared_ext' 348567ab2ff2Smrg shlibpath_overrides_runpath=yes 348667ab2ff2Smrg shlibpath_var=DYLD_LIBRARY_PATH 348767ab2ff2Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 348867ab2ff2Smrgm4_if([$1], [],[ 348967ab2ff2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 349067ab2ff2Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 349167ab2ff2Smrg ;; 3492e0963edeSmrg 349367ab2ff2Smrgdgux*) 3494e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 349567ab2ff2Smrg need_lib_prefix=no 349667ab2ff2Smrg need_version=no 349767ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 3498e494fffdSmrg soname_spec='${libname}${release}${shared_ext}$major' 3499e494fffdSmrg shlibpath_var=LD_LIBRARY_PATH 350067ab2ff2Smrg ;; 3501e0963edeSmrg 350267ab2ff2Smrgfreebsd* | dragonfly*) 350367ab2ff2Smrg # DragonFly does not have aout. When/if they implement a new 350467ab2ff2Smrg # versioning mechanism, adjust this. 350567ab2ff2Smrg if test -x /usr/bin/objformat; then 350667ab2ff2Smrg objformat=`/usr/bin/objformat` 350767ab2ff2Smrg else 350867ab2ff2Smrg case $host_os in 3509e494fffdSmrg freebsd[[23]].*) objformat=aout ;; 351067ab2ff2Smrg *) objformat=elf ;; 351167ab2ff2Smrg esac 351267ab2ff2Smrg fi 351367ab2ff2Smrg version_type=freebsd-$objformat 351467ab2ff2Smrg case $version_type in 351567ab2ff2Smrg freebsd-elf*) 351667ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 351767ab2ff2Smrg need_version=no 351867ab2ff2Smrg need_lib_prefix=no 351967ab2ff2Smrg ;; 352067ab2ff2Smrg freebsd-*) 352167ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 352267ab2ff2Smrg need_version=yes 352367ab2ff2Smrg ;; 352467ab2ff2Smrg esac 352567ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 352667ab2ff2Smrg case $host_os in 3527e494fffdSmrg freebsd2.*) 352867ab2ff2Smrg shlibpath_overrides_runpath=yes 352967ab2ff2Smrg ;; 353067ab2ff2Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 353167ab2ff2Smrg shlibpath_overrides_runpath=yes 353267ab2ff2Smrg hardcode_into_libs=yes 353367ab2ff2Smrg ;; 353467ab2ff2Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 353567ab2ff2Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 353667ab2ff2Smrg shlibpath_overrides_runpath=no 353767ab2ff2Smrg hardcode_into_libs=yes 353867ab2ff2Smrg ;; 353967ab2ff2Smrg *) # from 4.6 on, and DragonFly 354067ab2ff2Smrg shlibpath_overrides_runpath=yes 354167ab2ff2Smrg hardcode_into_libs=yes 354267ab2ff2Smrg ;; 354367ab2ff2Smrg esac 354467ab2ff2Smrg ;; 3545e0963edeSmrg 354667ab2ff2Smrggnu*) 3547e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 354867ab2ff2Smrg need_lib_prefix=no 354967ab2ff2Smrg need_version=no 355067ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 355167ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 355267ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 3553e494fffdSmrg shlibpath_overrides_runpath=no 355467ab2ff2Smrg hardcode_into_libs=yes 355567ab2ff2Smrg ;; 3556e0963edeSmrg 355767ab2ff2Smrghaiku*) 3558e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 355967ab2ff2Smrg need_lib_prefix=no 356067ab2ff2Smrg need_version=no 356167ab2ff2Smrg dynamic_linker="$host_os runtime_loader" 356267ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 356367ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 356467ab2ff2Smrg shlibpath_var=LIBRARY_PATH 356567ab2ff2Smrg shlibpath_overrides_runpath=yes 356667ab2ff2Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 356767ab2ff2Smrg hardcode_into_libs=yes 356867ab2ff2Smrg ;; 3569e0963edeSmrg 357067ab2ff2Smrghpux9* | hpux10* | hpux11*) 357167ab2ff2Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 357267ab2ff2Smrg # link against other versions. 357367ab2ff2Smrg version_type=sunos 357467ab2ff2Smrg need_lib_prefix=no 357567ab2ff2Smrg need_version=no 357667ab2ff2Smrg case $host_cpu in 357767ab2ff2Smrg ia64*) 357867ab2ff2Smrg shrext_cmds='.so' 357967ab2ff2Smrg hardcode_into_libs=yes 358067ab2ff2Smrg dynamic_linker="$host_os dld.so" 358167ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 358267ab2ff2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 358367ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 358467ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 358567ab2ff2Smrg if test "X$HPUX_IA64_MODE" = X32; then 358667ab2ff2Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 358749e108a1Smrg else 358867ab2ff2Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 3589e0963edeSmrg fi 359067ab2ff2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 359167ab2ff2Smrg ;; 359267ab2ff2Smrg hppa*64*) 359367ab2ff2Smrg shrext_cmds='.sl' 359467ab2ff2Smrg hardcode_into_libs=yes 359567ab2ff2Smrg dynamic_linker="$host_os dld.sl" 359667ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 359767ab2ff2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 359867ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 359967ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 360067ab2ff2Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 360167ab2ff2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3602e0963edeSmrg ;; 360349e108a1Smrg *) 360467ab2ff2Smrg shrext_cmds='.sl' 360567ab2ff2Smrg dynamic_linker="$host_os dld.sl" 360667ab2ff2Smrg shlibpath_var=SHLIB_PATH 360767ab2ff2Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 360867ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 360967ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 3610f05b35a2Smrg ;; 3611e0963edeSmrg esac 361267ab2ff2Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 361367ab2ff2Smrg postinstall_cmds='chmod 555 $lib' 361467ab2ff2Smrg # or fails outright, so override atomically: 361567ab2ff2Smrg install_override_mode=555 361667ab2ff2Smrg ;; 3617e0963edeSmrg 361867ab2ff2Smrginterix[[3-9]]*) 3619e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 362067ab2ff2Smrg need_lib_prefix=no 362167ab2ff2Smrg need_version=no 362267ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 362367ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 362467ab2ff2Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 362567ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 362667ab2ff2Smrg shlibpath_overrides_runpath=no 362767ab2ff2Smrg hardcode_into_libs=yes 362867ab2ff2Smrg ;; 3629e0963edeSmrg 363067ab2ff2Smrgirix5* | irix6* | nonstopux*) 363149e108a1Smrg case $host_os in 363267ab2ff2Smrg nonstopux*) version_type=nonstopux ;; 363367ab2ff2Smrg *) 363467ab2ff2Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3635e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 363667ab2ff2Smrg else 363767ab2ff2Smrg version_type=irix 363867ab2ff2Smrg fi ;; 363949e108a1Smrg esac 364067ab2ff2Smrg need_lib_prefix=no 364167ab2ff2Smrg need_version=no 364267ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 364367ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 364467ab2ff2Smrg case $host_os in 364567ab2ff2Smrg irix5* | nonstopux*) 364667ab2ff2Smrg libsuff= shlibsuff= 364749e108a1Smrg ;; 364849e108a1Smrg *) 364967ab2ff2Smrg case $LD in # libtool.m4 will add one of these switches to LD 365067ab2ff2Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 365167ab2ff2Smrg libsuff= shlibsuff= libmagic=32-bit;; 365267ab2ff2Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 365367ab2ff2Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 365467ab2ff2Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 365567ab2ff2Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 365667ab2ff2Smrg *) libsuff= shlibsuff= libmagic=never-match;; 365767ab2ff2Smrg esac 365849e108a1Smrg ;; 365949e108a1Smrg esac 366067ab2ff2Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 366167ab2ff2Smrg shlibpath_overrides_runpath=no 366267ab2ff2Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 366367ab2ff2Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 366467ab2ff2Smrg hardcode_into_libs=yes 366567ab2ff2Smrg ;; 366649e108a1Smrg 366767ab2ff2Smrg# No shared lib support for Linux oldld, aout, or coff. 366867ab2ff2Smrglinux*oldld* | linux*aout* | linux*coff*) 366967ab2ff2Smrg dynamic_linker=no 367049e108a1Smrg ;; 367149e108a1Smrg 3672e494fffdSmrg# This must be glibc/ELF. 367367ab2ff2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3674e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 367549e108a1Smrg need_lib_prefix=no 367649e108a1Smrg need_version=no 367767ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 367867ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 367967ab2ff2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 368067ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 368167ab2ff2Smrg shlibpath_overrides_runpath=no 368267ab2ff2Smrg 368367ab2ff2Smrg # Some binutils ld are patched to set DT_RUNPATH 368467ab2ff2Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 368567ab2ff2Smrg [lt_cv_shlibpath_overrides_runpath=no 368667ab2ff2Smrg save_LDFLAGS=$LDFLAGS 368767ab2ff2Smrg save_libdir=$libdir 368867ab2ff2Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 368967ab2ff2Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 369067ab2ff2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 369167ab2ff2Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 369267ab2ff2Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 369367ab2ff2Smrg LDFLAGS=$save_LDFLAGS 369467ab2ff2Smrg libdir=$save_libdir 369567ab2ff2Smrg ]) 369667ab2ff2Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 369767ab2ff2Smrg 369867ab2ff2Smrg # This implies no fast_install, which is unacceptable. 369967ab2ff2Smrg # Some rework will be needed to allow for fast_install 370067ab2ff2Smrg # before this can be enabled. 370149e108a1Smrg hardcode_into_libs=yes 370267ab2ff2Smrg 370367ab2ff2Smrg # Append ld.so.conf contents to the search path 370467ab2ff2Smrg if test -f /etc/ld.so.conf; then 370567ab2ff2Smrg 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' ' '` 370667ab2ff2Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 370749e108a1Smrg fi 3708e0963edeSmrg 370967ab2ff2Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 371067ab2ff2Smrg # powerpc, because MkLinux only supported shared libraries with the 371167ab2ff2Smrg # GNU dynamic linker. Since this was broken with cross compilers, 371267ab2ff2Smrg # most powerpc-linux boxes support dynamic linking these days and 371367ab2ff2Smrg # people can always --disable-shared, the test was removed, and we 371467ab2ff2Smrg # assume the GNU/Linux dynamic linker is in use. 371567ab2ff2Smrg dynamic_linker='GNU/Linux ld.so' 371649e108a1Smrg ;; 3717e0963edeSmrg 371867ab2ff2Smrgnetbsd*) 371967ab2ff2Smrg version_type=sunos 372067ab2ff2Smrg need_lib_prefix=no 372167ab2ff2Smrg need_version=no 372267ab2ff2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 372367ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 372467ab2ff2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 372567ab2ff2Smrg dynamic_linker='NetBSD (a.out) ld.so' 372667ab2ff2Smrg else 372767ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 372867ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 372967ab2ff2Smrg dynamic_linker='NetBSD ld.elf_so' 373067ab2ff2Smrg fi 373167ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 373267ab2ff2Smrg shlibpath_overrides_runpath=yes 373367ab2ff2Smrg hardcode_into_libs=yes 373449e108a1Smrg ;; 3735e0963edeSmrg 373667ab2ff2Smrgnewsos6) 3737e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 373867ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 373967ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 374067ab2ff2Smrg shlibpath_overrides_runpath=yes 374167ab2ff2Smrg ;; 374267ab2ff2Smrg 374367ab2ff2Smrg*nto* | *qnx*) 374467ab2ff2Smrg version_type=qnx 374567ab2ff2Smrg need_lib_prefix=no 374649e108a1Smrg need_version=no 374749e108a1Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 374849e108a1Smrg soname_spec='${libname}${release}${shared_ext}$major' 374949e108a1Smrg shlibpath_var=LD_LIBRARY_PATH 375067ab2ff2Smrg shlibpath_overrides_runpath=no 375167ab2ff2Smrg hardcode_into_libs=yes 375267ab2ff2Smrg dynamic_linker='ldqnx.so' 375349e108a1Smrg ;; 375449e108a1Smrg 375567ab2ff2Smrgopenbsd*) 375667ab2ff2Smrg version_type=sunos 375767ab2ff2Smrg sys_lib_dlsearch_path_spec="/usr/lib" 375849e108a1Smrg need_lib_prefix=no 375967ab2ff2Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 376067ab2ff2Smrg case $host_os in 376167ab2ff2Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 376267ab2ff2Smrg *) need_version=no ;; 376367ab2ff2Smrg esac 376467ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 376567ab2ff2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 376667ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 376767ab2ff2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 376849e108a1Smrg case $host_os in 376967ab2ff2Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 377067ab2ff2Smrg shlibpath_overrides_runpath=no 377167ab2ff2Smrg ;; 377267ab2ff2Smrg *) 377367ab2ff2Smrg shlibpath_overrides_runpath=yes 377467ab2ff2Smrg ;; 377567ab2ff2Smrg esac 377667ab2ff2Smrg else 377767ab2ff2Smrg shlibpath_overrides_runpath=yes 377867ab2ff2Smrg fi 377967ab2ff2Smrg ;; 3780e0963edeSmrg 378167ab2ff2Smrgos2*) 378267ab2ff2Smrg libname_spec='$name' 378367ab2ff2Smrg shrext_cmds=".dll" 378467ab2ff2Smrg need_lib_prefix=no 378567ab2ff2Smrg library_names_spec='$libname${shared_ext} $libname.a' 378667ab2ff2Smrg dynamic_linker='OS/2 ld.exe' 378767ab2ff2Smrg shlibpath_var=LIBPATH 378849e108a1Smrg ;; 3789e0963edeSmrg 379067ab2ff2Smrgosf3* | osf4* | osf5*) 379167ab2ff2Smrg version_type=osf 379249e108a1Smrg need_lib_prefix=no 379349e108a1Smrg need_version=no 379467ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 379567ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 379667ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 379767ab2ff2Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 379867ab2ff2Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 379949e108a1Smrg ;; 3800e0963edeSmrg 380167ab2ff2Smrgrdos*) 380267ab2ff2Smrg dynamic_linker=no 380367ab2ff2Smrg ;; 380467ab2ff2Smrg 380567ab2ff2Smrgsolaris*) 3806e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 380749e108a1Smrg need_lib_prefix=no 380849e108a1Smrg need_version=no 380967ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 381049e108a1Smrg soname_spec='${libname}${release}${shared_ext}$major' 381149e108a1Smrg shlibpath_var=LD_LIBRARY_PATH 381267ab2ff2Smrg shlibpath_overrides_runpath=yes 381367ab2ff2Smrg hardcode_into_libs=yes 381467ab2ff2Smrg # ldd complains unless libraries are executable 381567ab2ff2Smrg postinstall_cmds='chmod +x $lib' 381649e108a1Smrg ;; 381749e108a1Smrg 381867ab2ff2Smrgsunos4*) 381967ab2ff2Smrg version_type=sunos 382067ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 382167ab2ff2Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 382267ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 382367ab2ff2Smrg shlibpath_overrides_runpath=yes 382467ab2ff2Smrg if test "$with_gnu_ld" = yes; then 382567ab2ff2Smrg need_lib_prefix=no 382667ab2ff2Smrg fi 382767ab2ff2Smrg need_version=yes 382849e108a1Smrg ;; 382949e108a1Smrg 383067ab2ff2Smrgsysv4 | sysv4.3*) 3831e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 383267ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 383367ab2ff2Smrg soname_spec='${libname}${release}${shared_ext}$major' 383467ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 383567ab2ff2Smrg case $host_vendor in 383667ab2ff2Smrg sni) 383767ab2ff2Smrg shlibpath_overrides_runpath=no 383849e108a1Smrg need_lib_prefix=no 383967ab2ff2Smrg runpath_var=LD_RUN_PATH 3840f05b35a2Smrg ;; 384167ab2ff2Smrg siemens) 384267ab2ff2Smrg need_lib_prefix=no 384367ab2ff2Smrg ;; 384467ab2ff2Smrg motorola) 384567ab2ff2Smrg need_lib_prefix=no 384667ab2ff2Smrg need_version=no 384767ab2ff2Smrg shlibpath_overrides_runpath=no 384867ab2ff2Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 384949e108a1Smrg ;; 385049e108a1Smrg esac 385149e108a1Smrg ;; 385249e108a1Smrg 385367ab2ff2Smrgsysv4*MP*) 385467ab2ff2Smrg if test -d /usr/nec ;then 3855e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 385667ab2ff2Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 385767ab2ff2Smrg soname_spec='$libname${shared_ext}.$major' 385867ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 385967ab2ff2Smrg fi 386049e108a1Smrg ;; 3861e0963edeSmrg 386267ab2ff2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 386367ab2ff2Smrg version_type=freebsd-elf 386449e108a1Smrg need_lib_prefix=no 386549e108a1Smrg need_version=no 386667ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 386749e108a1Smrg soname_spec='${libname}${release}${shared_ext}$major' 386867ab2ff2Smrg shlibpath_var=LD_LIBRARY_PATH 386949e108a1Smrg shlibpath_overrides_runpath=yes 387049e108a1Smrg hardcode_into_libs=yes 387167ab2ff2Smrg if test "$with_gnu_ld" = yes; then 387267ab2ff2Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 387367ab2ff2Smrg else 387467ab2ff2Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 387567ab2ff2Smrg case $host_os in 387667ab2ff2Smrg sco3.2v5*) 387767ab2ff2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 387867ab2ff2Smrg ;; 387967ab2ff2Smrg esac 388067ab2ff2Smrg fi 388167ab2ff2Smrg sys_lib_dlsearch_path_spec='/usr/lib' 388249e108a1Smrg ;; 388349e108a1Smrg 388467ab2ff2Smrgtpf*) 388567ab2ff2Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3886e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 388749e108a1Smrg need_lib_prefix=no 388849e108a1Smrg need_version=no 388967ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 389049e108a1Smrg shlibpath_var=LD_LIBRARY_PATH 389149e108a1Smrg shlibpath_overrides_runpath=no 389249e108a1Smrg hardcode_into_libs=yes 389349e108a1Smrg ;; 3894e0963edeSmrg 389567ab2ff2Smrguts4*) 3896e494fffdSmrg version_type=linux # correct to gnu/linux during the next big refactor 389767ab2ff2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 389849e108a1Smrg soname_spec='${libname}${release}${shared_ext}$major' 389949e108a1Smrg shlibpath_var=LD_LIBRARY_PATH 390049e108a1Smrg ;; 3901e0963edeSmrg 390249e108a1Smrg*) 390349e108a1Smrg dynamic_linker=no 390449e108a1Smrg ;; 390549e108a1Smrgesac 390649e108a1SmrgAC_MSG_RESULT([$dynamic_linker]) 390749e108a1Smrgtest "$dynamic_linker" = no && can_build_shared=no 3908e0963edeSmrg 390949e108a1Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 391049e108a1Smrgif test "$GCC" = yes; then 391149e108a1Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 391249e108a1Smrgfi 3913e0963edeSmrg 391449e108a1Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 391549e108a1Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 391649e108a1Smrgfi 391749e108a1Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 391849e108a1Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 391949e108a1Smrgfi 3920f05b35a2Smrg 392149e108a1Smrg_LT_DECL([], [variables_saved_for_relink], [1], 392249e108a1Smrg [Variables whose values should be saved in libtool wrapper scripts and 392349e108a1Smrg restored at link time]) 392449e108a1Smrg_LT_DECL([], [need_lib_prefix], [0], 392549e108a1Smrg [Do we need the "lib" prefix for modules?]) 392649e108a1Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 392749e108a1Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 392849e108a1Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 392949e108a1Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 393049e108a1Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 393149e108a1Smrg [Is shlibpath searched before the hard-coded library search path?]) 393249e108a1Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 393349e108a1Smrg_LT_DECL([], [library_names_spec], [1], 393449e108a1Smrg [[List of archive names. First name is the real one, the rest are links. 393549e108a1Smrg The last name is the one that the linker finds with -lNAME]]) 393649e108a1Smrg_LT_DECL([], [soname_spec], [1], 393749e108a1Smrg [[The coded name of the library, if different from the real name]]) 393849e108a1Smrg_LT_DECL([], [install_override_mode], [1], 393949e108a1Smrg [Permission mode override for installation of shared libraries]) 394049e108a1Smrg_LT_DECL([], [postinstall_cmds], [2], 394149e108a1Smrg [Command to use after installation of a shared archive]) 394249e108a1Smrg_LT_DECL([], [postuninstall_cmds], [2], 394349e108a1Smrg [Command to use after uninstallation of a shared archive]) 394449e108a1Smrg_LT_DECL([], [finish_cmds], [2], 394549e108a1Smrg [Commands used to finish a libtool library installation in a directory]) 394649e108a1Smrg_LT_DECL([], [finish_eval], [1], 394749e108a1Smrg [[As "finish_cmds", except a single script fragment to be evaled but 394849e108a1Smrg not shown]]) 394949e108a1Smrg_LT_DECL([], [hardcode_into_libs], [0], 395049e108a1Smrg [Whether we should hardcode library paths into libraries]) 395149e108a1Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 395249e108a1Smrg [Compile-time system search path for libraries]) 395349e108a1Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 395449e108a1Smrg [Run-time system search path for libraries]) 395549e108a1Smrg])# _LT_SYS_DYNAMIC_LINKER 3956e0963edeSmrg 3957e0963edeSmrg 395849e108a1Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 395949e108a1Smrg# -------------------------- 396049e108a1Smrg# find a file program which can recognize shared library 396149e108a1SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 396249e108a1Smrg[m4_require([_LT_DECL_EGREP])dnl 396349e108a1SmrgAC_MSG_CHECKING([for $1]) 396449e108a1SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 396549e108a1Smrg[case $MAGIC_CMD in 396649e108a1Smrg[[\\/*] | ?:[\\/]*]) 396749e108a1Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 396849e108a1Smrg ;; 396949e108a1Smrg*) 397049e108a1Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 397149e108a1Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 397249e108a1Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 397349e108a1Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 397449e108a1Smrgdnl not every word. This closes a longstanding sh security hole. 397549e108a1Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 397649e108a1Smrg for ac_dir in $ac_dummy; do 397749e108a1Smrg IFS="$lt_save_ifs" 397849e108a1Smrg test -z "$ac_dir" && ac_dir=. 397949e108a1Smrg if test -f $ac_dir/$1; then 398049e108a1Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 398149e108a1Smrg if test -n "$file_magic_test_file"; then 398249e108a1Smrg case $deplibs_check_method in 398349e108a1Smrg "file_magic "*) 398449e108a1Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 398549e108a1Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 398649e108a1Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 398749e108a1Smrg $EGREP "$file_magic_regex" > /dev/null; then 398849e108a1Smrg : 398949e108a1Smrg else 399049e108a1Smrg cat <<_LT_EOF 1>&2 3991e0963edeSmrg 399249e108a1Smrg*** Warning: the command libtool uses to detect shared libraries, 399349e108a1Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 399449e108a1Smrg*** The result is that libtool may fail to recognize shared libraries 399549e108a1Smrg*** as such. This will affect the creation of libtool libraries that 399649e108a1Smrg*** depend on shared libraries, but programs linked with such libtool 399749e108a1Smrg*** libraries will work regardless of this problem. Nevertheless, you 399849e108a1Smrg*** may want to report the problem to your system manager and/or to 399949e108a1Smrg*** bug-libtool@gnu.org 400049e108a1Smrg 400149e108a1Smrg_LT_EOF 400249e108a1Smrg fi ;; 400349e108a1Smrg esac 4004f05b35a2Smrg fi 400549e108a1Smrg break 400649e108a1Smrg fi 400749e108a1Smrg done 400849e108a1Smrg IFS="$lt_save_ifs" 400949e108a1Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 401049e108a1Smrg ;; 401149e108a1Smrgesac]) 401249e108a1SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 401349e108a1Smrgif test -n "$MAGIC_CMD"; then 401449e108a1Smrg AC_MSG_RESULT($MAGIC_CMD) 401549e108a1Smrgelse 401649e108a1Smrg AC_MSG_RESULT(no) 401749e108a1Smrgfi 401849e108a1Smrg_LT_DECL([], [MAGIC_CMD], [0], 401949e108a1Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 402049e108a1Smrg])# _LT_PATH_TOOL_PREFIX 402149e108a1Smrg 402249e108a1Smrg# Old name: 402349e108a1SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 402449e108a1Smrgdnl aclocal-1.4 backwards compatibility: 402549e108a1Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 4026e0963edeSmrg 4027e0963edeSmrg 402849e108a1Smrg# _LT_PATH_MAGIC 402949e108a1Smrg# -------------- 403049e108a1Smrg# find a file program which can recognize a shared library 403149e108a1Smrgm4_defun([_LT_PATH_MAGIC], 403249e108a1Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 403349e108a1Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 403449e108a1Smrg if test -n "$ac_tool_prefix"; then 403549e108a1Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 403649e108a1Smrg else 403749e108a1Smrg MAGIC_CMD=: 403849e108a1Smrg fi 403949e108a1Smrgfi 404049e108a1Smrg])# _LT_PATH_MAGIC 4041e0963edeSmrg 4042e0963edeSmrg 404349e108a1Smrg# LT_PATH_LD 404449e108a1Smrg# ---------- 404549e108a1Smrg# find the pathname to the GNU or non-GNU linker 404649e108a1SmrgAC_DEFUN([LT_PATH_LD], 404749e108a1Smrg[AC_REQUIRE([AC_PROG_CC])dnl 404849e108a1SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 404949e108a1SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 405049e108a1Smrgm4_require([_LT_DECL_SED])dnl 405149e108a1Smrgm4_require([_LT_DECL_EGREP])dnl 405249e108a1Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 4053e0963edeSmrg 405449e108a1SmrgAC_ARG_WITH([gnu-ld], 405549e108a1Smrg [AS_HELP_STRING([--with-gnu-ld], 405649e108a1Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 405749e108a1Smrg [test "$withval" = no || with_gnu_ld=yes], 405849e108a1Smrg [with_gnu_ld=no])dnl 4059e0963edeSmrg 406049e108a1Smrgac_prog=ld 406149e108a1Smrgif test "$GCC" = yes; then 406249e108a1Smrg # Check if gcc -print-prog-name=ld gives a path. 406349e108a1Smrg AC_MSG_CHECKING([for ld used by $CC]) 406449e108a1Smrg case $host in 406549e108a1Smrg *-*-mingw*) 406649e108a1Smrg # gcc leaves a trailing carriage return which upsets mingw 406749e108a1Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 406849e108a1Smrg *) 406949e108a1Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 407049e108a1Smrg esac 407149e108a1Smrg case $ac_prog in 407249e108a1Smrg # Accept absolute paths. 407349e108a1Smrg [[\\/]]* | ?:[[\\/]]*) 407449e108a1Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 407549e108a1Smrg # Canonicalize the pathname of ld 407649e108a1Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 407749e108a1Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 407849e108a1Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 407949e108a1Smrg done 408049e108a1Smrg test -z "$LD" && LD="$ac_prog" 4081f05b35a2Smrg ;; 408249e108a1Smrg "") 408349e108a1Smrg # If it fails, then pretend we aren't using GCC. 408449e108a1Smrg ac_prog=ld 408549e108a1Smrg ;; 408649e108a1Smrg *) 408749e108a1Smrg # If it is relative, then search for the first ld in PATH. 408849e108a1Smrg with_gnu_ld=unknown 408949e108a1Smrg ;; 409049e108a1Smrg esac 409149e108a1Smrgelif test "$with_gnu_ld" = yes; then 409249e108a1Smrg AC_MSG_CHECKING([for GNU ld]) 409349e108a1Smrgelse 409449e108a1Smrg AC_MSG_CHECKING([for non-GNU ld]) 409549e108a1Smrgfi 409649e108a1SmrgAC_CACHE_VAL(lt_cv_path_LD, 409749e108a1Smrg[if test -z "$LD"; then 409849e108a1Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 409949e108a1Smrg for ac_dir in $PATH; do 410049e108a1Smrg IFS="$lt_save_ifs" 410149e108a1Smrg test -z "$ac_dir" && ac_dir=. 410249e108a1Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 410349e108a1Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 410449e108a1Smrg # Check to see if the program is GNU ld. I'd rather use --version, 410549e108a1Smrg # but apparently some variants of GNU ld only accept -v. 410649e108a1Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 410749e108a1Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 410849e108a1Smrg *GNU* | *'with BFD'*) 410949e108a1Smrg test "$with_gnu_ld" != no && break 4110f05b35a2Smrg ;; 411149e108a1Smrg *) 411249e108a1Smrg test "$with_gnu_ld" != yes && break 4113f05b35a2Smrg ;; 4114f05b35a2Smrg esac 411549e108a1Smrg fi 411649e108a1Smrg done 411749e108a1Smrg IFS="$lt_save_ifs" 411849e108a1Smrgelse 411949e108a1Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 412049e108a1Smrgfi]) 412149e108a1SmrgLD="$lt_cv_path_LD" 412249e108a1Smrgif test -n "$LD"; then 412349e108a1Smrg AC_MSG_RESULT($LD) 412449e108a1Smrgelse 412549e108a1Smrg AC_MSG_RESULT(no) 412649e108a1Smrgfi 412749e108a1Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 412849e108a1Smrg_LT_PATH_LD_GNU 412949e108a1SmrgAC_SUBST([LD]) 4130e0963edeSmrg 413149e108a1Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 413249e108a1Smrg])# LT_PATH_LD 4133e0963edeSmrg 413449e108a1Smrg# Old names: 413549e108a1SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 413649e108a1SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 413749e108a1Smrgdnl aclocal-1.4 backwards compatibility: 413849e108a1Smrgdnl AC_DEFUN([AM_PROG_LD], []) 413949e108a1Smrgdnl AC_DEFUN([AC_PROG_LD], []) 414049e108a1Smrg 414149e108a1Smrg 414249e108a1Smrg# _LT_PATH_LD_GNU 414349e108a1Smrg#- -------------- 414449e108a1Smrgm4_defun([_LT_PATH_LD_GNU], 414549e108a1Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 414649e108a1Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 414749e108a1Smrgcase `$LD -v 2>&1 </dev/null` in 414849e108a1Smrg*GNU* | *'with BFD'*) 414949e108a1Smrg lt_cv_prog_gnu_ld=yes 415049e108a1Smrg ;; 415149e108a1Smrg*) 415249e108a1Smrg lt_cv_prog_gnu_ld=no 415349e108a1Smrg ;; 415449e108a1Smrgesac]) 415549e108a1Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 415649e108a1Smrg])# _LT_PATH_LD_GNU 415749e108a1Smrg 415849e108a1Smrg 415949e108a1Smrg# _LT_CMD_RELOAD 416049e108a1Smrg# -------------- 416149e108a1Smrg# find reload flag for linker 416249e108a1Smrg# -- PORTME Some linkers may need a different reload flag. 416349e108a1Smrgm4_defun([_LT_CMD_RELOAD], 416449e108a1Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 416549e108a1Smrg lt_cv_ld_reload_flag, 416649e108a1Smrg [lt_cv_ld_reload_flag='-r']) 416749e108a1Smrgreload_flag=$lt_cv_ld_reload_flag 416849e108a1Smrgcase $reload_flag in 416949e108a1Smrg"" | " "*) ;; 417049e108a1Smrg*) reload_flag=" $reload_flag" ;; 417149e108a1Smrgesac 417249e108a1Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 417349e108a1Smrgcase $host_os in 417467ab2ff2Smrg cygwin* | mingw* | pw32* | cegcc*) 417567ab2ff2Smrg if test "$GCC" != yes; then 417667ab2ff2Smrg reload_cmds=false 417767ab2ff2Smrg fi 417867ab2ff2Smrg ;; 417949e108a1Smrg darwin*) 418049e108a1Smrg if test "$GCC" = yes; then 418149e108a1Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 418249e108a1Smrg else 418349e108a1Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 418449e108a1Smrg fi 418549e108a1Smrg ;; 418649e108a1Smrgesac 418749e108a1Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 418849e108a1Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 418949e108a1Smrg])# _LT_CMD_RELOAD 4190e0963edeSmrg 4191e0963edeSmrg 419249e108a1Smrg# _LT_CHECK_MAGIC_METHOD 419349e108a1Smrg# ---------------------- 419449e108a1Smrg# how to check for library dependencies 419549e108a1Smrg# -- PORTME fill in with the dynamic library characteristics 419649e108a1Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 419749e108a1Smrg[m4_require([_LT_DECL_EGREP]) 419849e108a1Smrgm4_require([_LT_DECL_OBJDUMP]) 419949e108a1SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 420049e108a1Smrglt_cv_deplibs_check_method, 420149e108a1Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 420249e108a1Smrglt_cv_file_magic_test_file= 420349e108a1Smrglt_cv_deplibs_check_method='unknown' 420449e108a1Smrg# Need to set the preceding variable on all platforms that support 420549e108a1Smrg# interlibrary dependencies. 420649e108a1Smrg# 'none' -- dependencies not supported. 420749e108a1Smrg# `unknown' -- same as none, but documents that we really don't know. 420849e108a1Smrg# 'pass_all' -- all dependencies passed with no checks. 420949e108a1Smrg# 'test_compile' -- check by making test program. 421049e108a1Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 421149e108a1Smrg# which responds to the $file_magic_cmd with a given extended regex. 421249e108a1Smrg# If you have `file' or equivalent on your system and you're not sure 421349e108a1Smrg# whether `pass_all' will *always* work, you probably want this one. 4214e0963edeSmrg 421549e108a1Smrgcase $host_os in 421649e108a1Smrgaix[[4-9]]*) 421749e108a1Smrg lt_cv_deplibs_check_method=pass_all 421849e108a1Smrg ;; 4219e0963edeSmrg 422049e108a1Smrgbeos*) 422149e108a1Smrg lt_cv_deplibs_check_method=pass_all 422249e108a1Smrg ;; 4223e0963edeSmrg 422449e108a1Smrgbsdi[[45]]*) 422549e108a1Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 422649e108a1Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 422749e108a1Smrg lt_cv_file_magic_test_file=/shlib/libc.so 422849e108a1Smrg ;; 4229e0963edeSmrg 423049e108a1Smrgcygwin*) 423149e108a1Smrg # func_win32_libid is a shell function defined in ltmain.sh 423249e108a1Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 423349e108a1Smrg lt_cv_file_magic_cmd='func_win32_libid' 423449e108a1Smrg ;; 4235e0963edeSmrg 423649e108a1Smrgmingw* | pw32*) 423749e108a1Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 423849e108a1Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 423949e108a1Smrg # unless we find 'file', for example because we are cross-compiling. 424049e108a1Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 424149e108a1Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 424249e108a1Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 424349e108a1Smrg lt_cv_file_magic_cmd='func_win32_libid' 424449e108a1Smrg else 424549e108a1Smrg # Keep this pattern in sync with the one in func_win32_libid. 424649e108a1Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 424749e108a1Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 4248f05b35a2Smrg fi 424949e108a1Smrg ;; 4250e0963edeSmrg 425149e108a1Smrgcegcc*) 425249e108a1Smrg # use the weaker test based on 'objdump'. See mingw*. 425349e108a1Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 425449e108a1Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 425549e108a1Smrg ;; 4256e0963edeSmrg 425749e108a1Smrgdarwin* | rhapsody*) 425849e108a1Smrg lt_cv_deplibs_check_method=pass_all 425949e108a1Smrg ;; 4260e0963edeSmrg 426149e108a1Smrgfreebsd* | dragonfly*) 426249e108a1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 426349e108a1Smrg case $host_cpu in 426449e108a1Smrg i*86 ) 426549e108a1Smrg # Not sure whether the presence of OpenBSD here was a mistake. 426649e108a1Smrg # Let's accept both of them until this is cleared up. 426749e108a1Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 426849e108a1Smrg lt_cv_file_magic_cmd=/usr/bin/file 426949e108a1Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4270f05b35a2Smrg ;; 4271f05b35a2Smrg esac 427249e108a1Smrg else 427349e108a1Smrg lt_cv_deplibs_check_method=pass_all 4274f05b35a2Smrg fi 4275f05b35a2Smrg ;; 4276e0963edeSmrg 427749e108a1Smrggnu*) 427849e108a1Smrg lt_cv_deplibs_check_method=pass_all 427949e108a1Smrg ;; 4280f05b35a2Smrg 428149e108a1Smrghaiku*) 428249e108a1Smrg lt_cv_deplibs_check_method=pass_all 428349e108a1Smrg ;; 4284f05b35a2Smrg 428549e108a1Smrghpux10.20* | hpux11*) 428649e108a1Smrg lt_cv_file_magic_cmd=/usr/bin/file 428749e108a1Smrg case $host_cpu in 428849e108a1Smrg ia64*) 428949e108a1Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 429049e108a1Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 429149e108a1Smrg ;; 429249e108a1Smrg hppa*64*) 429349e108a1Smrg [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]'] 429449e108a1Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 429549e108a1Smrg ;; 429649e108a1Smrg *) 429749e108a1Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 429849e108a1Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 429949e108a1Smrg ;; 430049e108a1Smrg esac 430149e108a1Smrg ;; 4302e0963edeSmrg 430349e108a1Smrginterix[[3-9]]*) 430449e108a1Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 430549e108a1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 430649e108a1Smrg ;; 4307e0963edeSmrg 430849e108a1Smrgirix5* | irix6* | nonstopux*) 430949e108a1Smrg case $LD in 431049e108a1Smrg *-32|*"-32 ") libmagic=32-bit;; 431149e108a1Smrg *-n32|*"-n32 ") libmagic=N32;; 431249e108a1Smrg *-64|*"-64 ") libmagic=64-bit;; 431349e108a1Smrg *) libmagic=never-match;; 431449e108a1Smrg esac 431549e108a1Smrg lt_cv_deplibs_check_method=pass_all 431649e108a1Smrg ;; 4317e0963edeSmrg 4318e494fffdSmrg# This must be glibc/ELF. 431949e108a1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 432049e108a1Smrg lt_cv_deplibs_check_method=pass_all 432149e108a1Smrg ;; 4322e0963edeSmrg 432349e108a1Smrgnetbsd*) 432449e108a1Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 432549e108a1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 432649e108a1Smrg else 432749e108a1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 432849e108a1Smrg fi 432949e108a1Smrg ;; 4330e0963edeSmrg 433149e108a1Smrgnewos6*) 433249e108a1Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 433349e108a1Smrg lt_cv_file_magic_cmd=/usr/bin/file 433449e108a1Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 433549e108a1Smrg ;; 4336e0963edeSmrg 433749e108a1Smrg*nto* | *qnx*) 433849e108a1Smrg lt_cv_deplibs_check_method=pass_all 433949e108a1Smrg ;; 4340e0963edeSmrg 434149e108a1Smrgopenbsd*) 434249e108a1Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 434349e108a1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 434449e108a1Smrg else 434549e108a1Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 434649e108a1Smrg fi 434749e108a1Smrg ;; 4348f05b35a2Smrg 434949e108a1Smrgosf3* | osf4* | osf5*) 435049e108a1Smrg lt_cv_deplibs_check_method=pass_all 435149e108a1Smrg ;; 4352f05b35a2Smrg 435349e108a1Smrgrdos*) 435449e108a1Smrg lt_cv_deplibs_check_method=pass_all 435549e108a1Smrg ;; 4356f05b35a2Smrg 435749e108a1Smrgsolaris*) 435849e108a1Smrg lt_cv_deplibs_check_method=pass_all 435949e108a1Smrg ;; 4360e0963edeSmrg 436149e108a1Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 436249e108a1Smrg lt_cv_deplibs_check_method=pass_all 436349e108a1Smrg ;; 436449e108a1Smrg 436549e108a1Smrgsysv4 | sysv4.3*) 436649e108a1Smrg case $host_vendor in 436749e108a1Smrg motorola) 436849e108a1Smrg 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]]' 436949e108a1Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 437049e108a1Smrg ;; 437149e108a1Smrg ncr) 437249e108a1Smrg lt_cv_deplibs_check_method=pass_all 437349e108a1Smrg ;; 437449e108a1Smrg sequent) 437549e108a1Smrg lt_cv_file_magic_cmd='/bin/file' 437649e108a1Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 437749e108a1Smrg ;; 437849e108a1Smrg sni) 437949e108a1Smrg lt_cv_file_magic_cmd='/bin/file' 438049e108a1Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 438149e108a1Smrg lt_cv_file_magic_test_file=/lib/libc.so 438249e108a1Smrg ;; 438349e108a1Smrg siemens) 438449e108a1Smrg lt_cv_deplibs_check_method=pass_all 438549e108a1Smrg ;; 438649e108a1Smrg pc) 438749e108a1Smrg lt_cv_deplibs_check_method=pass_all 4388f05b35a2Smrg ;; 4389f05b35a2Smrg esac 439049e108a1Smrg ;; 4391e0963edeSmrg 439249e108a1Smrgtpf*) 439349e108a1Smrg lt_cv_deplibs_check_method=pass_all 439449e108a1Smrg ;; 439549e108a1Smrgesac 439649e108a1Smrg]) 439767ab2ff2Smrg 439867ab2ff2Smrgfile_magic_glob= 439967ab2ff2Smrgwant_nocaseglob=no 440067ab2ff2Smrgif test "$build" = "$host"; then 440167ab2ff2Smrg case $host_os in 440267ab2ff2Smrg mingw* | pw32*) 440367ab2ff2Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 440467ab2ff2Smrg want_nocaseglob=yes 440567ab2ff2Smrg else 440667ab2ff2Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 440767ab2ff2Smrg fi 440867ab2ff2Smrg ;; 440967ab2ff2Smrg esac 441067ab2ff2Smrgfi 441167ab2ff2Smrg 441249e108a1Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 441349e108a1Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 441449e108a1Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4415e0963edeSmrg 441649e108a1Smrg_LT_DECL([], [deplibs_check_method], [1], 441749e108a1Smrg [Method to check whether dependent libraries are shared objects]) 441849e108a1Smrg_LT_DECL([], [file_magic_cmd], [1], 441967ab2ff2Smrg [Command to use when deplibs_check_method = "file_magic"]) 442067ab2ff2Smrg_LT_DECL([], [file_magic_glob], [1], 442167ab2ff2Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 442267ab2ff2Smrg_LT_DECL([], [want_nocaseglob], [1], 442367ab2ff2Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 442449e108a1Smrg])# _LT_CHECK_MAGIC_METHOD 4425e0963edeSmrg 4426e0963edeSmrg 442749e108a1Smrg# LT_PATH_NM 442849e108a1Smrg# ---------- 442949e108a1Smrg# find the pathname to a BSD- or MS-compatible name lister 443049e108a1SmrgAC_DEFUN([LT_PATH_NM], 443149e108a1Smrg[AC_REQUIRE([AC_PROG_CC])dnl 443249e108a1SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 443349e108a1Smrg[if test -n "$NM"; then 443449e108a1Smrg # Let the user override the test. 443549e108a1Smrg lt_cv_path_NM="$NM" 4436f05b35a2Smrgelse 443749e108a1Smrg lt_nm_to_check="${ac_tool_prefix}nm" 443849e108a1Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 443949e108a1Smrg lt_nm_to_check="$lt_nm_to_check nm" 444049e108a1Smrg fi 444149e108a1Smrg for lt_tmp_nm in $lt_nm_to_check; do 444249e108a1Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 444349e108a1Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 444449e108a1Smrg IFS="$lt_save_ifs" 444549e108a1Smrg test -z "$ac_dir" && ac_dir=. 444649e108a1Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 444749e108a1Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 444849e108a1Smrg # Check to see if the nm accepts a BSD-compat flag. 444949e108a1Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 445049e108a1Smrg # nm: unknown option "B" ignored 445149e108a1Smrg # Tru64's nm complains that /dev/null is an invalid object file 445249e108a1Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 445349e108a1Smrg */dev/null* | *'Invalid file or object type'*) 445449e108a1Smrg lt_cv_path_NM="$tmp_nm -B" 445549e108a1Smrg break 445649e108a1Smrg ;; 445749e108a1Smrg *) 445849e108a1Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 445949e108a1Smrg */dev/null*) 446049e108a1Smrg lt_cv_path_NM="$tmp_nm -p" 446149e108a1Smrg break 446249e108a1Smrg ;; 446349e108a1Smrg *) 446449e108a1Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 446549e108a1Smrg continue # so that we can try to find one that supports BSD flags 446649e108a1Smrg ;; 446749e108a1Smrg esac 446849e108a1Smrg ;; 446949e108a1Smrg esac 447049e108a1Smrg fi 447149e108a1Smrg done 447249e108a1Smrg IFS="$lt_save_ifs" 447349e108a1Smrg done 447449e108a1Smrg : ${lt_cv_path_NM=no} 447549e108a1Smrgfi]) 447649e108a1Smrgif test "$lt_cv_path_NM" != "no"; then 447749e108a1Smrg NM="$lt_cv_path_NM" 447849e108a1Smrgelse 447949e108a1Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 448049e108a1Smrg if test -n "$DUMPBIN"; then : 448149e108a1Smrg # Let the user override the test. 448249e108a1Smrg else 448349e108a1Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 448449e108a1Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 448549e108a1Smrg *COFF*) 448649e108a1Smrg DUMPBIN="$DUMPBIN -symbols" 448749e108a1Smrg ;; 448849e108a1Smrg *) 448949e108a1Smrg DUMPBIN=: 449049e108a1Smrg ;; 449149e108a1Smrg esac 449249e108a1Smrg fi 449349e108a1Smrg AC_SUBST([DUMPBIN]) 449449e108a1Smrg if test "$DUMPBIN" != ":"; then 449549e108a1Smrg NM="$DUMPBIN" 449649e108a1Smrg fi 4497f05b35a2Smrgfi 449849e108a1Smrgtest -z "$NM" && NM=nm 449949e108a1SmrgAC_SUBST([NM]) 450049e108a1Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 450149e108a1Smrg 450249e108a1SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 450349e108a1Smrg [lt_cv_nm_interface="BSD nm" 450449e108a1Smrg echo "int some_variable = 0;" > conftest.$ac_ext 450549e108a1Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 450649e108a1Smrg (eval "$ac_compile" 2>conftest.err) 450749e108a1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 450849e108a1Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 450949e108a1Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 451049e108a1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 451149e108a1Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 451249e108a1Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 451349e108a1Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 451449e108a1Smrg lt_cv_nm_interface="MS dumpbin" 451549e108a1Smrg fi 451649e108a1Smrg rm -f conftest*]) 451749e108a1Smrg])# LT_PATH_NM 4518e0963edeSmrg 451949e108a1Smrg# Old names: 452049e108a1SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 452149e108a1SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 4522f05b35a2Smrgdnl aclocal-1.4 backwards compatibility: 452349e108a1Smrgdnl AC_DEFUN([AM_PROG_NM], []) 452449e108a1Smrgdnl AC_DEFUN([AC_PROG_NM], []) 4525e0963edeSmrg 452667ab2ff2Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 452767ab2ff2Smrg# -------------------------------- 452867ab2ff2Smrg# how to determine the name of the shared library 452967ab2ff2Smrg# associated with a specific link library. 453067ab2ff2Smrg# -- PORTME fill in with the dynamic library characteristics 453167ab2ff2Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 453267ab2ff2Smrg[m4_require([_LT_DECL_EGREP]) 453367ab2ff2Smrgm4_require([_LT_DECL_OBJDUMP]) 453467ab2ff2Smrgm4_require([_LT_DECL_DLLTOOL]) 453567ab2ff2SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 453667ab2ff2Smrglt_cv_sharedlib_from_linklib_cmd, 453767ab2ff2Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 453867ab2ff2Smrg 453967ab2ff2Smrgcase $host_os in 454067ab2ff2Smrgcygwin* | mingw* | pw32* | cegcc*) 454167ab2ff2Smrg # two different shell functions defined in ltmain.sh 454267ab2ff2Smrg # decide which to use based on capabilities of $DLLTOOL 454367ab2ff2Smrg case `$DLLTOOL --help 2>&1` in 454467ab2ff2Smrg *--identify-strict*) 454567ab2ff2Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 454667ab2ff2Smrg ;; 454767ab2ff2Smrg *) 454867ab2ff2Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 454967ab2ff2Smrg ;; 455067ab2ff2Smrg esac 455167ab2ff2Smrg ;; 455267ab2ff2Smrg*) 455367ab2ff2Smrg # fallback: assume linklib IS sharedlib 455467ab2ff2Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 455567ab2ff2Smrg ;; 455667ab2ff2Smrgesac 455767ab2ff2Smrg]) 455867ab2ff2Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 455967ab2ff2Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 456067ab2ff2Smrg 456167ab2ff2Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 456267ab2ff2Smrg [Command to associate shared and link libraries]) 456367ab2ff2Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 456467ab2ff2Smrg 456567ab2ff2Smrg 456667ab2ff2Smrg# _LT_PATH_MANIFEST_TOOL 456767ab2ff2Smrg# ---------------------- 456867ab2ff2Smrg# locate the manifest tool 456967ab2ff2Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 457067ab2ff2Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 457167ab2ff2Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 457267ab2ff2SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 457367ab2ff2Smrg [lt_cv_path_mainfest_tool=no 457467ab2ff2Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 457567ab2ff2Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 457667ab2ff2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 457767ab2ff2Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 457867ab2ff2Smrg lt_cv_path_mainfest_tool=yes 457967ab2ff2Smrg fi 458067ab2ff2Smrg rm -f conftest*]) 458167ab2ff2Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 458267ab2ff2Smrg MANIFEST_TOOL=: 458367ab2ff2Smrgfi 458467ab2ff2Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 458567ab2ff2Smrg])# _LT_PATH_MANIFEST_TOOL 458667ab2ff2Smrg 4587e0963edeSmrg 458849e108a1Smrg# LT_LIB_M 458949e108a1Smrg# -------- 459049e108a1Smrg# check for math library 459149e108a1SmrgAC_DEFUN([LT_LIB_M], 459249e108a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 459349e108a1SmrgLIBM= 459449e108a1Smrgcase $host in 459549e108a1Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 459649e108a1Smrg # These system don't have libm, or don't need it 459749e108a1Smrg ;; 459849e108a1Smrg*-ncr-sysv4.3*) 459949e108a1Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 460049e108a1Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 460149e108a1Smrg ;; 460249e108a1Smrg*) 460349e108a1Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 460449e108a1Smrg ;; 460549e108a1Smrgesac 460649e108a1SmrgAC_SUBST([LIBM]) 460749e108a1Smrg])# LT_LIB_M 460849e108a1Smrg 460949e108a1Smrg# Old name: 461049e108a1SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 461149e108a1Smrgdnl aclocal-1.4 backwards compatibility: 461249e108a1Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4613f05b35a2Smrg 4614e0963edeSmrg 461549e108a1Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 461649e108a1Smrg# ------------------------------- 461749e108a1Smrgm4_defun([_LT_COMPILER_NO_RTTI], 461849e108a1Smrg[m4_require([_LT_TAG_COMPILER])dnl 4619e0963edeSmrg 462049e108a1Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4621f05b35a2Smrg 462249e108a1Smrgif test "$GCC" = yes; then 462349e108a1Smrg case $cc_basename in 462449e108a1Smrg nvcc*) 462549e108a1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 462649e108a1Smrg *) 462749e108a1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 462849e108a1Smrg esac 4629f05b35a2Smrg 463049e108a1Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 463149e108a1Smrg lt_cv_prog_compiler_rtti_exceptions, 463249e108a1Smrg [-fno-rtti -fno-exceptions], [], 463349e108a1Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 463449e108a1Smrgfi 463549e108a1Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 463649e108a1Smrg [Compiler flag to turn off builtin functions]) 463749e108a1Smrg])# _LT_COMPILER_NO_RTTI 4638f05b35a2Smrg 4639f05b35a2Smrg 464049e108a1Smrg# _LT_CMD_GLOBAL_SYMBOLS 464149e108a1Smrg# ---------------------- 464249e108a1Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 464349e108a1Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 464449e108a1SmrgAC_REQUIRE([AC_PROG_CC])dnl 464549e108a1SmrgAC_REQUIRE([AC_PROG_AWK])dnl 464649e108a1SmrgAC_REQUIRE([LT_PATH_NM])dnl 464749e108a1SmrgAC_REQUIRE([LT_PATH_LD])dnl 464849e108a1Smrgm4_require([_LT_DECL_SED])dnl 464949e108a1Smrgm4_require([_LT_DECL_EGREP])dnl 465049e108a1Smrgm4_require([_LT_TAG_COMPILER])dnl 4651f05b35a2Smrg 465249e108a1Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 465349e108a1SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 465449e108a1SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 465549e108a1Smrg[ 465649e108a1Smrg# These are sane defaults that work on at least a few old systems. 465749e108a1Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4658e0963edeSmrg 465949e108a1Smrg# Character class describing NM global symbol codes. 466049e108a1Smrgsymcode='[[BCDEGRST]]' 4661e0963edeSmrg 466249e108a1Smrg# Regexp to match symbols that can be accessed directly from C. 466349e108a1Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4664e0963edeSmrg 466549e108a1Smrg# Define system-specific variables. 466649e108a1Smrgcase $host_os in 466749e108a1Smrgaix*) 466849e108a1Smrg symcode='[[BCDT]]' 466949e108a1Smrg ;; 467049e108a1Smrgcygwin* | mingw* | pw32* | cegcc*) 467149e108a1Smrg symcode='[[ABCDGISTW]]' 467249e108a1Smrg ;; 467349e108a1Smrghpux*) 467449e108a1Smrg if test "$host_cpu" = ia64; then 467549e108a1Smrg symcode='[[ABCDEGRST]]' 467649e108a1Smrg fi 467749e108a1Smrg ;; 467849e108a1Smrgirix* | nonstopux*) 467949e108a1Smrg symcode='[[BCDEGRST]]' 468049e108a1Smrg ;; 468149e108a1Smrgosf*) 468249e108a1Smrg symcode='[[BCDEGQRST]]' 468349e108a1Smrg ;; 468449e108a1Smrgsolaris*) 468549e108a1Smrg symcode='[[BDRT]]' 468649e108a1Smrg ;; 468749e108a1Smrgsco3.2v5*) 468849e108a1Smrg symcode='[[DT]]' 468949e108a1Smrg ;; 469049e108a1Smrgsysv4.2uw2*) 469149e108a1Smrg symcode='[[DT]]' 469249e108a1Smrg ;; 469349e108a1Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 469449e108a1Smrg symcode='[[ABDT]]' 469549e108a1Smrg ;; 469649e108a1Smrgsysv4) 469749e108a1Smrg symcode='[[DFNSTU]]' 469849e108a1Smrg ;; 469949e108a1Smrgesac 4700e0963edeSmrg 470149e108a1Smrg# If we're using GNU nm, then use its standard symbol codes. 470249e108a1Smrgcase `$NM -V 2>&1` in 470349e108a1Smrg*GNU* | *'with BFD'*) 470449e108a1Smrg symcode='[[ABCDGIRSTW]]' ;; 470549e108a1Smrgesac 4706e0963edeSmrg 470749e108a1Smrg# Transform an extracted symbol line into a proper C declaration. 470849e108a1Smrg# Some systems (esp. on ia64) link data and code symbols differently, 470949e108a1Smrg# so use this general approach. 471049e108a1Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4711e0963edeSmrg 471249e108a1Smrg# Transform an extracted symbol line into symbol name and symbol address 471367ab2ff2Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 471467ab2ff2Smrglt_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'" 4715e0963edeSmrg 471649e108a1Smrg# Handle CRLF in mingw tool chain 471749e108a1Smrgopt_cr= 471849e108a1Smrgcase $build_os in 471949e108a1Smrgmingw*) 472049e108a1Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 472149e108a1Smrg ;; 472249e108a1Smrgesac 4723f05b35a2Smrg 472449e108a1Smrg# Try without a prefix underscore, then with it. 472549e108a1Smrgfor ac_symprfx in "" "_"; do 4726e0963edeSmrg 472749e108a1Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 472849e108a1Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4729e0963edeSmrg 473049e108a1Smrg # Write the raw and C identifiers. 473149e108a1Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 473249e108a1Smrg # Fake it for dumpbin and say T for any non-static function 473349e108a1Smrg # and D for any global variable. 473449e108a1Smrg # Also find C++ and __fastcall symbols from MSVC++, 473549e108a1Smrg # which start with @ or ?. 473649e108a1Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 473749e108a1Smrg" {last_section=section; section=\$ 3};"\ 4738e494fffdSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 473949e108a1Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 474049e108a1Smrg" \$ 0!~/External *\|/{next};"\ 474149e108a1Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 474249e108a1Smrg" {if(hide[section]) next};"\ 474349e108a1Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 474449e108a1Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 474549e108a1Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 474649e108a1Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 474749e108a1Smrg" ' prfx=^$ac_symprfx]" 474849e108a1Smrg else 474949e108a1Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 475049e108a1Smrg fi 475167ab2ff2Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4752e0963edeSmrg 475349e108a1Smrg # Check to see that the pipe works correctly. 475449e108a1Smrg pipe_works=no 4755f05b35a2Smrg 475649e108a1Smrg rm -f conftest* 475749e108a1Smrg cat > conftest.$ac_ext <<_LT_EOF 475849e108a1Smrg#ifdef __cplusplus 475949e108a1Smrgextern "C" { 476049e108a1Smrg#endif 476149e108a1Smrgchar nm_test_var; 476249e108a1Smrgvoid nm_test_func(void); 476349e108a1Smrgvoid nm_test_func(void){} 476449e108a1Smrg#ifdef __cplusplus 476549e108a1Smrg} 476649e108a1Smrg#endif 476749e108a1Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 476849e108a1Smrg_LT_EOF 4769e0963edeSmrg 477049e108a1Smrg if AC_TRY_EVAL(ac_compile); then 477149e108a1Smrg # Now try to grab the symbols. 477249e108a1Smrg nlist=conftest.nm 477349e108a1Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 477449e108a1Smrg # Try sorting and uniquifying the output. 477549e108a1Smrg if sort "$nlist" | uniq > "$nlist"T; then 477649e108a1Smrg mv -f "$nlist"T "$nlist" 477749e108a1Smrg else 477849e108a1Smrg rm -f "$nlist"T 477949e108a1Smrg fi 4780e0963edeSmrg 478149e108a1Smrg # Make sure that we snagged all the symbols we need. 478249e108a1Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 478349e108a1Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 478449e108a1Smrg cat <<_LT_EOF > conftest.$ac_ext 478567ab2ff2Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 478667ab2ff2Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 478767ab2ff2Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 478867ab2ff2Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 478967ab2ff2Smrg# define LT@&t@_DLSYM_CONST 479067ab2ff2Smrg#elif defined(__osf__) 479167ab2ff2Smrg/* This system does not cope well with relocations in const data. */ 479267ab2ff2Smrg# define LT@&t@_DLSYM_CONST 479367ab2ff2Smrg#else 479467ab2ff2Smrg# define LT@&t@_DLSYM_CONST const 479567ab2ff2Smrg#endif 479667ab2ff2Smrg 479749e108a1Smrg#ifdef __cplusplus 479849e108a1Smrgextern "C" { 479949e108a1Smrg#endif 4800f05b35a2Smrg 480149e108a1Smrg_LT_EOF 480249e108a1Smrg # Now generate the symbol file. 480349e108a1Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4804f05b35a2Smrg 480549e108a1Smrg cat <<_LT_EOF >> conftest.$ac_ext 4806e0963edeSmrg 480749e108a1Smrg/* The mapping between symbol names and symbols. */ 480867ab2ff2SmrgLT@&t@_DLSYM_CONST struct { 480949e108a1Smrg const char *name; 481049e108a1Smrg void *address; 481149e108a1Smrg} 481249e108a1Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 481349e108a1Smrg{ 481449e108a1Smrg { "@PROGRAM@", (void *) 0 }, 481549e108a1Smrg_LT_EOF 481649e108a1Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 481749e108a1Smrg cat <<\_LT_EOF >> conftest.$ac_ext 481849e108a1Smrg {0, (void *) 0} 481949e108a1Smrg}; 4820f05b35a2Smrg 482149e108a1Smrg/* This works around a problem in FreeBSD linker */ 482249e108a1Smrg#ifdef FREEBSD_WORKAROUND 482349e108a1Smrgstatic const void *lt_preloaded_setup() { 482449e108a1Smrg return lt__PROGRAM__LTX_preloaded_symbols; 482549e108a1Smrg} 482649e108a1Smrg#endif 4827e0963edeSmrg 482849e108a1Smrg#ifdef __cplusplus 482949e108a1Smrg} 483049e108a1Smrg#endif 483149e108a1Smrg_LT_EOF 483249e108a1Smrg # Now try linking the two files. 483349e108a1Smrg mv conftest.$ac_objext conftstm.$ac_objext 483467ab2ff2Smrg lt_globsym_save_LIBS=$LIBS 483567ab2ff2Smrg lt_globsym_save_CFLAGS=$CFLAGS 483649e108a1Smrg LIBS="conftstm.$ac_objext" 483749e108a1Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 483849e108a1Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 483949e108a1Smrg pipe_works=yes 484049e108a1Smrg fi 484167ab2ff2Smrg LIBS=$lt_globsym_save_LIBS 484267ab2ff2Smrg CFLAGS=$lt_globsym_save_CFLAGS 4843f05b35a2Smrg else 484449e108a1Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4845f05b35a2Smrg fi 484649e108a1Smrg else 484749e108a1Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 484849e108a1Smrg fi 484949e108a1Smrg else 485049e108a1Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 485149e108a1Smrg fi 485249e108a1Smrg else 485349e108a1Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 485449e108a1Smrg cat conftest.$ac_ext >&5 485549e108a1Smrg fi 485649e108a1Smrg rm -rf conftest* conftst* 4857e0963edeSmrg 485849e108a1Smrg # Do not use the global_symbol_pipe unless it works. 485949e108a1Smrg if test "$pipe_works" = yes; then 486049e108a1Smrg break 486149e108a1Smrg else 486249e108a1Smrg lt_cv_sys_global_symbol_pipe= 486349e108a1Smrg fi 486449e108a1Smrgdone 486549e108a1Smrg]) 486649e108a1Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 486749e108a1Smrg lt_cv_sys_global_symbol_to_cdecl= 486849e108a1Smrgfi 486949e108a1Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 487049e108a1Smrg AC_MSG_RESULT(failed) 487149e108a1Smrgelse 487249e108a1Smrg AC_MSG_RESULT(ok) 487349e108a1Smrgfi 4874e0963edeSmrg 487567ab2ff2Smrg# Response file support. 487667ab2ff2Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 487767ab2ff2Smrg nm_file_list_spec='@' 487867ab2ff2Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 487967ab2ff2Smrg nm_file_list_spec='@' 488067ab2ff2Smrgfi 488167ab2ff2Smrg 488249e108a1Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 488349e108a1Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 488449e108a1Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 488549e108a1Smrg [Transform the output of nm in a proper C declaration]) 488649e108a1Smrg_LT_DECL([global_symbol_to_c_name_address], 488749e108a1Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 488849e108a1Smrg [Transform the output of nm in a C name address pair]) 488949e108a1Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 489049e108a1Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 489149e108a1Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 489267ab2ff2Smrg_LT_DECL([], [nm_file_list_spec], [1], 489367ab2ff2Smrg [Specify filename containing input files for $NM]) 489449e108a1Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4895e0963edeSmrg 4896e0963edeSmrg 489749e108a1Smrg# _LT_COMPILER_PIC([TAGNAME]) 489849e108a1Smrg# --------------------------- 489949e108a1Smrgm4_defun([_LT_COMPILER_PIC], 490049e108a1Smrg[m4_require([_LT_TAG_COMPILER])dnl 490149e108a1Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 490249e108a1Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 490349e108a1Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4904e0963edeSmrg 490549e108a1Smrgm4_if([$1], [CXX], [ 490649e108a1Smrg # C++ specific cases for pic, static, wl, etc. 490749e108a1Smrg if test "$GXX" = yes; then 490849e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 490949e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4910e0963edeSmrg 491149e108a1Smrg case $host_os in 491249e108a1Smrg aix*) 491349e108a1Smrg # All AIX code is PIC. 491449e108a1Smrg if test "$host_cpu" = ia64; then 491549e108a1Smrg # AIX 5 now supports IA64 processor 491649e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 491749e108a1Smrg fi 491849e108a1Smrg ;; 4919f05b35a2Smrg 492049e108a1Smrg amigaos*) 492149e108a1Smrg case $host_cpu in 492249e108a1Smrg powerpc) 492349e108a1Smrg # see comment about AmigaOS4 .so support 492449e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4925f05b35a2Smrg ;; 492649e108a1Smrg m68k) 492749e108a1Smrg # FIXME: we need at least 68020 code to build shared libraries, but 492849e108a1Smrg # adding the `-m68020' flag to GCC prevents building anything better, 492949e108a1Smrg # like `-m68040'. 493049e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4931f05b35a2Smrg ;; 493249e108a1Smrg esac 493349e108a1Smrg ;; 4934e0963edeSmrg 493549e108a1Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 493649e108a1Smrg # PIC is the default for these OSes. 493749e108a1Smrg ;; 493849e108a1Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 493949e108a1Smrg # This hack is so that the source file can tell whether it is being 494049e108a1Smrg # built for inclusion in a dll (and should export symbols for example). 494149e108a1Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 494249e108a1Smrg # (--disable-auto-import) libraries 494349e108a1Smrg m4_if([$1], [GCJ], [], 494449e108a1Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 494549e108a1Smrg ;; 494649e108a1Smrg darwin* | rhapsody*) 494749e108a1Smrg # PIC is the default on this platform 494849e108a1Smrg # Common symbols not allowed in MH_DYLIB files 494949e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 495049e108a1Smrg ;; 495149e108a1Smrg *djgpp*) 495249e108a1Smrg # DJGPP does not support shared libraries at all 495349e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 495449e108a1Smrg ;; 495549e108a1Smrg haiku*) 495649e108a1Smrg # PIC is the default for Haiku. 495749e108a1Smrg # The "-static" flag exists, but is broken. 495849e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 495949e108a1Smrg ;; 496049e108a1Smrg interix[[3-9]]*) 496149e108a1Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 496249e108a1Smrg # Instead, we relocate shared libraries at runtime. 496349e108a1Smrg ;; 496449e108a1Smrg sysv4*MP*) 496549e108a1Smrg if test -d /usr/nec; then 496649e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 496749e108a1Smrg fi 496849e108a1Smrg ;; 496949e108a1Smrg hpux*) 497049e108a1Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 497149e108a1Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 497249e108a1Smrg # sets the default TLS model and affects inlining. 497349e108a1Smrg case $host_cpu in 497449e108a1Smrg hppa*64*) 4975f05b35a2Smrg ;; 497649e108a1Smrg *) 497749e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 497849e108a1Smrg ;; 497949e108a1Smrg esac 498049e108a1Smrg ;; 498149e108a1Smrg *qnx* | *nto*) 498249e108a1Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 498349e108a1Smrg # it will coredump. 498449e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 498549e108a1Smrg ;; 498649e108a1Smrg *) 498749e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 498849e108a1Smrg ;; 498949e108a1Smrg esac 499049e108a1Smrg else 499149e108a1Smrg case $host_os in 499249e108a1Smrg aix[[4-9]]*) 499349e108a1Smrg # All AIX code is PIC. 499449e108a1Smrg if test "$host_cpu" = ia64; then 499549e108a1Smrg # AIX 5 now supports IA64 processor 499649e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 499749e108a1Smrg else 499849e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 499949e108a1Smrg fi 500049e108a1Smrg ;; 500149e108a1Smrg chorus*) 500249e108a1Smrg case $cc_basename in 500349e108a1Smrg cxch68*) 500449e108a1Smrg # Green Hills C++ Compiler 500549e108a1Smrg # _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" 500649e108a1Smrg ;; 500749e108a1Smrg esac 500849e108a1Smrg ;; 500967ab2ff2Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 501067ab2ff2Smrg # This hack is so that the source file can tell whether it is being 501167ab2ff2Smrg # built for inclusion in a dll (and should export symbols for example). 501267ab2ff2Smrg m4_if([$1], [GCJ], [], 501367ab2ff2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 501467ab2ff2Smrg ;; 501549e108a1Smrg dgux*) 501649e108a1Smrg case $cc_basename in 501749e108a1Smrg ec++*) 501849e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5019f05b35a2Smrg ;; 502049e108a1Smrg ghcx*) 502149e108a1Smrg # Green Hills C++ Compiler 502249e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 5023f05b35a2Smrg ;; 502449e108a1Smrg *) 5025f05b35a2Smrg ;; 502649e108a1Smrg esac 502749e108a1Smrg ;; 502849e108a1Smrg freebsd* | dragonfly*) 502949e108a1Smrg # FreeBSD uses GNU C++ 503049e108a1Smrg ;; 503149e108a1Smrg hpux9* | hpux10* | hpux11*) 503249e108a1Smrg case $cc_basename in 503349e108a1Smrg CC*) 503449e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 503549e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 503649e108a1Smrg if test "$host_cpu" != ia64; then 503749e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 503849e108a1Smrg fi 5039f05b35a2Smrg ;; 504049e108a1Smrg aCC*) 504149e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 504249e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 504349e108a1Smrg case $host_cpu in 504449e108a1Smrg hppa*64*|ia64*) 504549e108a1Smrg # +Z the default 5046f05b35a2Smrg ;; 504749e108a1Smrg *) 504849e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 5049f05b35a2Smrg ;; 5050f05b35a2Smrg esac 505149e108a1Smrg ;; 505249e108a1Smrg *) 505349e108a1Smrg ;; 505449e108a1Smrg esac 505549e108a1Smrg ;; 505649e108a1Smrg interix*) 505749e108a1Smrg # This is c89, which is MS Visual C++ (no shared libs) 505849e108a1Smrg # Anyone wants to do a port? 505949e108a1Smrg ;; 506049e108a1Smrg irix5* | irix6* | nonstopux*) 506149e108a1Smrg case $cc_basename in 506249e108a1Smrg CC*) 506349e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 506449e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 506549e108a1Smrg # CC pic flag -KPIC is the default. 506649e108a1Smrg ;; 506749e108a1Smrg *) 506849e108a1Smrg ;; 506949e108a1Smrg esac 507049e108a1Smrg ;; 507149e108a1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 507249e108a1Smrg case $cc_basename in 507349e108a1Smrg KCC*) 507449e108a1Smrg # KAI C++ Compiler 507549e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 507649e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 507749e108a1Smrg ;; 507849e108a1Smrg ecpc* ) 507949e108a1Smrg # old Intel C++ for x86_64 which still supported -KPIC. 508049e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 508149e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 508249e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 508349e108a1Smrg ;; 508449e108a1Smrg icpc* ) 508549e108a1Smrg # Intel C++, used to be incompatible with GCC. 508649e108a1Smrg # ICC 10 doesn't accept -KPIC any more. 508749e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 508849e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 508949e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 509049e108a1Smrg ;; 509149e108a1Smrg pgCC* | pgcpp*) 509249e108a1Smrg # Portland Group C++ compiler 509349e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 509449e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 509549e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 509649e108a1Smrg ;; 5097f05b35a2Smrg cxx*) 5098f05b35a2Smrg # Compaq C++ 509949e108a1Smrg # Make sure the PIC flag is empty. It appears that all Alpha 510049e108a1Smrg # Linux and Compaq Tru64 Unix objects are PIC. 510149e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 510249e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 5103f05b35a2Smrg ;; 510449e108a1Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 510549e108a1Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 510649e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 510749e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 510849e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 5109f05b35a2Smrg ;; 5110f05b35a2Smrg *) 5111f05b35a2Smrg case `$CC -V 2>&1 | sed 5q` in 5112f05b35a2Smrg *Sun\ C*) 5113f05b35a2Smrg # Sun C++ 5.9 511449e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 511549e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 511649e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5117f05b35a2Smrg ;; 5118f05b35a2Smrg esac 5119f05b35a2Smrg ;; 5120f05b35a2Smrg esac 5121f05b35a2Smrg ;; 512249e108a1Smrg lynxos*) 512349e108a1Smrg ;; 512449e108a1Smrg m88k*) 512549e108a1Smrg ;; 512649e108a1Smrg mvs*) 512749e108a1Smrg case $cc_basename in 512849e108a1Smrg cxx*) 512949e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 513049e108a1Smrg ;; 513149e108a1Smrg *) 513249e108a1Smrg ;; 513349e108a1Smrg esac 513449e108a1Smrg ;; 513549e108a1Smrg netbsd*) 513649e108a1Smrg ;; 513749e108a1Smrg *qnx* | *nto*) 513849e108a1Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 513949e108a1Smrg # it will coredump. 514049e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 514149e108a1Smrg ;; 514249e108a1Smrg osf3* | osf4* | osf5*) 514349e108a1Smrg case $cc_basename in 514449e108a1Smrg KCC*) 514549e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 514649e108a1Smrg ;; 514749e108a1Smrg RCC*) 514849e108a1Smrg # Rational C++ 2.4.1 514949e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 515049e108a1Smrg ;; 515149e108a1Smrg cxx*) 515249e108a1Smrg # Digital/Compaq C++ 515349e108a1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 515449e108a1Smrg # Make sure the PIC flag is empty. It appears that all Alpha 515549e108a1Smrg # Linux and Compaq Tru64 Unix objects are PIC. 515649e108a1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 515749e108a1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 515849e108a1Smrg ;; 515949e108a1Smrg *) 516049e108a1Smrg ;; 516149e108a1Smrg esac 516249e108a1Smrg ;; 516367ab2ff2Smrg psos*) 516467ab2ff2Smrg ;; 516567ab2ff2Smrg solaris*) 516667ab2ff2Smrg case $cc_basename in 516767ab2ff2Smrg CC* | sunCC*) 516867ab2ff2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 516967ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 517067ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 517167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 517267ab2ff2Smrg ;; 517367ab2ff2Smrg gcx*) 517467ab2ff2Smrg # Green Hills C++ Compiler 517567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 517667ab2ff2Smrg ;; 517767ab2ff2Smrg *) 517867ab2ff2Smrg ;; 517967ab2ff2Smrg esac 518067ab2ff2Smrg ;; 518167ab2ff2Smrg sunos4*) 518267ab2ff2Smrg case $cc_basename in 518367ab2ff2Smrg CC*) 518467ab2ff2Smrg # Sun C++ 4.x 518567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 518667ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 518767ab2ff2Smrg ;; 518867ab2ff2Smrg lcc*) 518967ab2ff2Smrg # Lucid 519067ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 519167ab2ff2Smrg ;; 519267ab2ff2Smrg *) 519367ab2ff2Smrg ;; 519467ab2ff2Smrg esac 519567ab2ff2Smrg ;; 519667ab2ff2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 519767ab2ff2Smrg case $cc_basename in 519867ab2ff2Smrg CC*) 519967ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 520067ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 520167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 520267ab2ff2Smrg ;; 520367ab2ff2Smrg esac 520467ab2ff2Smrg ;; 520567ab2ff2Smrg tandem*) 520667ab2ff2Smrg case $cc_basename in 520767ab2ff2Smrg NCC*) 520867ab2ff2Smrg # NonStop-UX NCC 3.20 520967ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 521067ab2ff2Smrg ;; 521167ab2ff2Smrg *) 521267ab2ff2Smrg ;; 521367ab2ff2Smrg esac 521467ab2ff2Smrg ;; 521567ab2ff2Smrg vxworks*) 521667ab2ff2Smrg ;; 521767ab2ff2Smrg *) 521867ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 521967ab2ff2Smrg ;; 522067ab2ff2Smrg esac 522167ab2ff2Smrg fi 522267ab2ff2Smrg], 522367ab2ff2Smrg[ 522467ab2ff2Smrg if test "$GCC" = yes; then 522567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 522667ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 522767ab2ff2Smrg 522867ab2ff2Smrg case $host_os in 522967ab2ff2Smrg aix*) 523067ab2ff2Smrg # All AIX code is PIC. 523167ab2ff2Smrg if test "$host_cpu" = ia64; then 523267ab2ff2Smrg # AIX 5 now supports IA64 processor 523367ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 523467ab2ff2Smrg fi 523567ab2ff2Smrg ;; 523667ab2ff2Smrg 523767ab2ff2Smrg amigaos*) 523867ab2ff2Smrg case $host_cpu in 523967ab2ff2Smrg powerpc) 524067ab2ff2Smrg # see comment about AmigaOS4 .so support 524167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 524267ab2ff2Smrg ;; 524367ab2ff2Smrg m68k) 524467ab2ff2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 524567ab2ff2Smrg # adding the `-m68020' flag to GCC prevents building anything better, 524667ab2ff2Smrg # like `-m68040'. 524767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 524867ab2ff2Smrg ;; 524967ab2ff2Smrg esac 525067ab2ff2Smrg ;; 525167ab2ff2Smrg 525267ab2ff2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 525367ab2ff2Smrg # PIC is the default for these OSes. 525467ab2ff2Smrg ;; 525567ab2ff2Smrg 525667ab2ff2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 525767ab2ff2Smrg # This hack is so that the source file can tell whether it is being 525867ab2ff2Smrg # built for inclusion in a dll (and should export symbols for example). 525967ab2ff2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 526067ab2ff2Smrg # (--disable-auto-import) libraries 526167ab2ff2Smrg m4_if([$1], [GCJ], [], 526267ab2ff2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 526367ab2ff2Smrg ;; 526467ab2ff2Smrg 526567ab2ff2Smrg darwin* | rhapsody*) 526667ab2ff2Smrg # PIC is the default on this platform 526767ab2ff2Smrg # Common symbols not allowed in MH_DYLIB files 526867ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 526967ab2ff2Smrg ;; 527067ab2ff2Smrg 527167ab2ff2Smrg haiku*) 527267ab2ff2Smrg # PIC is the default for Haiku. 527367ab2ff2Smrg # The "-static" flag exists, but is broken. 527467ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 527567ab2ff2Smrg ;; 527667ab2ff2Smrg 527767ab2ff2Smrg hpux*) 527867ab2ff2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 527967ab2ff2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 528067ab2ff2Smrg # sets the default TLS model and affects inlining. 528167ab2ff2Smrg case $host_cpu in 528267ab2ff2Smrg hppa*64*) 528367ab2ff2Smrg # +Z the default 528467ab2ff2Smrg ;; 528567ab2ff2Smrg *) 528667ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 528767ab2ff2Smrg ;; 528867ab2ff2Smrg esac 528967ab2ff2Smrg ;; 529067ab2ff2Smrg 529167ab2ff2Smrg interix[[3-9]]*) 529267ab2ff2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 529367ab2ff2Smrg # Instead, we relocate shared libraries at runtime. 529467ab2ff2Smrg ;; 529567ab2ff2Smrg 529667ab2ff2Smrg msdosdjgpp*) 529767ab2ff2Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 529867ab2ff2Smrg # on systems that don't support them. 529967ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 530067ab2ff2Smrg enable_shared=no 530167ab2ff2Smrg ;; 530267ab2ff2Smrg 530367ab2ff2Smrg *nto* | *qnx*) 530467ab2ff2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 530567ab2ff2Smrg # it will coredump. 530667ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 530767ab2ff2Smrg ;; 530867ab2ff2Smrg 530967ab2ff2Smrg sysv4*MP*) 531067ab2ff2Smrg if test -d /usr/nec; then 531167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 531267ab2ff2Smrg fi 531367ab2ff2Smrg ;; 531467ab2ff2Smrg 531567ab2ff2Smrg *) 531667ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 531767ab2ff2Smrg ;; 531867ab2ff2Smrg esac 531967ab2ff2Smrg 532067ab2ff2Smrg case $cc_basename in 532167ab2ff2Smrg nvcc*) # Cuda Compiler Driver 2.2 532267ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5323e494fffdSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5324e494fffdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5325e494fffdSmrg fi 532667ab2ff2Smrg ;; 532767ab2ff2Smrg esac 532867ab2ff2Smrg else 532967ab2ff2Smrg # PORTME Check for flag to pass linker flags through the system compiler. 533067ab2ff2Smrg case $host_os in 533167ab2ff2Smrg aix*) 533267ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 533367ab2ff2Smrg if test "$host_cpu" = ia64; then 533467ab2ff2Smrg # AIX 5 now supports IA64 processor 533567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 533667ab2ff2Smrg else 533767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 533867ab2ff2Smrg fi 533967ab2ff2Smrg ;; 534067ab2ff2Smrg 534167ab2ff2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 534267ab2ff2Smrg # This hack is so that the source file can tell whether it is being 534367ab2ff2Smrg # built for inclusion in a dll (and should export symbols for example). 534467ab2ff2Smrg m4_if([$1], [GCJ], [], 534567ab2ff2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 534667ab2ff2Smrg ;; 534767ab2ff2Smrg 534867ab2ff2Smrg hpux9* | hpux10* | hpux11*) 534967ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 535067ab2ff2Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 535167ab2ff2Smrg # not for PA HP-UX. 535267ab2ff2Smrg case $host_cpu in 535367ab2ff2Smrg hppa*64*|ia64*) 535467ab2ff2Smrg # +Z the default 535567ab2ff2Smrg ;; 535667ab2ff2Smrg *) 535767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 535867ab2ff2Smrg ;; 535967ab2ff2Smrg esac 536067ab2ff2Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 536167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 536267ab2ff2Smrg ;; 536367ab2ff2Smrg 536467ab2ff2Smrg irix5* | irix6* | nonstopux*) 536567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 536667ab2ff2Smrg # PIC (with -KPIC) is the default. 536767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 536867ab2ff2Smrg ;; 536967ab2ff2Smrg 537067ab2ff2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 537167ab2ff2Smrg case $cc_basename in 537267ab2ff2Smrg # old Intel for x86_64 which still supported -KPIC. 537367ab2ff2Smrg ecc*) 537467ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 537567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 537667ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 537767ab2ff2Smrg ;; 537867ab2ff2Smrg # icc used to be incompatible with GCC. 537967ab2ff2Smrg # ICC 10 doesn't accept -KPIC any more. 538067ab2ff2Smrg icc* | ifort*) 538167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 538267ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 538367ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 538467ab2ff2Smrg ;; 538567ab2ff2Smrg # Lahey Fortran 8.1. 538667ab2ff2Smrg lf95*) 538767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 538867ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 538967ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 539067ab2ff2Smrg ;; 539167ab2ff2Smrg nagfor*) 539267ab2ff2Smrg # NAG Fortran compiler 539367ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 539467ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 539567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 539667ab2ff2Smrg ;; 539767ab2ff2Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 539867ab2ff2Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 539967ab2ff2Smrg # which looks to be a dead project) 540067ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 540167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 540267ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 540367ab2ff2Smrg ;; 540467ab2ff2Smrg ccc*) 540567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 540667ab2ff2Smrg # All Alpha code is PIC. 540767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 540867ab2ff2Smrg ;; 540967ab2ff2Smrg xl* | bgxl* | bgf* | mpixl*) 541067ab2ff2Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 541167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 541267ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 541367ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 541467ab2ff2Smrg ;; 541567ab2ff2Smrg *) 541667ab2ff2Smrg case `$CC -V 2>&1 | sed 5q` in 5417e494fffdSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 541867ab2ff2Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 541967ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 542067ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 542167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 542267ab2ff2Smrg ;; 5423e494fffdSmrg *Sun\ F* | *Sun*Fortran*) 5424e494fffdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5425e494fffdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5426e494fffdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5427e494fffdSmrg ;; 542867ab2ff2Smrg *Sun\ C*) 542967ab2ff2Smrg # Sun C 5.9 543067ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 543167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 543267ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 543367ab2ff2Smrg ;; 5434e494fffdSmrg *Intel*\ [[CF]]*Compiler*) 5435e494fffdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5436e494fffdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5437e494fffdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5438e494fffdSmrg ;; 5439e494fffdSmrg *Portland\ Group*) 5440e494fffdSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5441e494fffdSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5442e494fffdSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5443e494fffdSmrg ;; 544467ab2ff2Smrg esac 544567ab2ff2Smrg ;; 544667ab2ff2Smrg esac 544767ab2ff2Smrg ;; 544867ab2ff2Smrg 544967ab2ff2Smrg newsos6) 545067ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 545167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 545267ab2ff2Smrg ;; 545367ab2ff2Smrg 545467ab2ff2Smrg *nto* | *qnx*) 545567ab2ff2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 545667ab2ff2Smrg # it will coredump. 545767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 545867ab2ff2Smrg ;; 545967ab2ff2Smrg 546067ab2ff2Smrg osf3* | osf4* | osf5*) 546167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 546267ab2ff2Smrg # All OSF/1 code is PIC. 546367ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 546467ab2ff2Smrg ;; 546567ab2ff2Smrg 546667ab2ff2Smrg rdos*) 546767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 546867ab2ff2Smrg ;; 546967ab2ff2Smrg 547067ab2ff2Smrg solaris*) 547167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 547267ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 547367ab2ff2Smrg case $cc_basename in 547467ab2ff2Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 547567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 547667ab2ff2Smrg *) 547767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 547867ab2ff2Smrg esac 547967ab2ff2Smrg ;; 548067ab2ff2Smrg 548167ab2ff2Smrg sunos4*) 548267ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 548367ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 548467ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 548567ab2ff2Smrg ;; 548667ab2ff2Smrg 548767ab2ff2Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 548867ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 548967ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 549067ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549167ab2ff2Smrg ;; 549267ab2ff2Smrg 549367ab2ff2Smrg sysv4*MP*) 549467ab2ff2Smrg if test -d /usr/nec ;then 549567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 549667ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 549767ab2ff2Smrg fi 549867ab2ff2Smrg ;; 549967ab2ff2Smrg 550067ab2ff2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 550167ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550267ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 550367ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 550467ab2ff2Smrg ;; 550567ab2ff2Smrg 550667ab2ff2Smrg unicos*) 550767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 550867ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 550967ab2ff2Smrg ;; 551067ab2ff2Smrg 551167ab2ff2Smrg uts4*) 551267ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 551367ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 551467ab2ff2Smrg ;; 551567ab2ff2Smrg 551667ab2ff2Smrg *) 551767ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 551867ab2ff2Smrg ;; 551967ab2ff2Smrg esac 552067ab2ff2Smrg fi 552167ab2ff2Smrg]) 552267ab2ff2Smrgcase $host_os in 552367ab2ff2Smrg # For platforms which do not support PIC, -DPIC is meaningless: 552467ab2ff2Smrg *djgpp*) 552567ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 552667ab2ff2Smrg ;; 552767ab2ff2Smrg *) 552867ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 552967ab2ff2Smrg ;; 553067ab2ff2Smrgesac 553167ab2ff2Smrg 553267ab2ff2SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 553367ab2ff2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 553467ab2ff2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 553567ab2ff2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 553667ab2ff2Smrg 553767ab2ff2Smrg# 553867ab2ff2Smrg# Check to make sure the PIC flag actually works. 553967ab2ff2Smrg# 554067ab2ff2Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 554167ab2ff2Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 554267ab2ff2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 554367ab2ff2Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 554467ab2ff2Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 554567ab2ff2Smrg "" | " "*) ;; 554667ab2ff2Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 554767ab2ff2Smrg esac], 554867ab2ff2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 554967ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 555067ab2ff2Smrgfi 555167ab2ff2Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 555267ab2ff2Smrg [Additional compiler flags for building library objects]) 555367ab2ff2Smrg 555467ab2ff2Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 555567ab2ff2Smrg [How to pass a linker flag through the compiler]) 555667ab2ff2Smrg# 555767ab2ff2Smrg# Check to make sure the static flag actually works. 555867ab2ff2Smrg# 555967ab2ff2Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 556067ab2ff2Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 556167ab2ff2Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 556267ab2ff2Smrg $lt_tmp_static_flag, 556367ab2ff2Smrg [], 556467ab2ff2Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 556567ab2ff2Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 556667ab2ff2Smrg [Compiler flag to prevent dynamic linking]) 556767ab2ff2Smrg])# _LT_COMPILER_PIC 556867ab2ff2Smrg 556967ab2ff2Smrg 557067ab2ff2Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 557167ab2ff2Smrg# ---------------------------- 557267ab2ff2Smrg# See if the linker supports building shared libraries. 557367ab2ff2Smrgm4_defun([_LT_LINKER_SHLIBS], 557467ab2ff2Smrg[AC_REQUIRE([LT_PATH_LD])dnl 557567ab2ff2SmrgAC_REQUIRE([LT_PATH_NM])dnl 557667ab2ff2Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 557767ab2ff2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 557867ab2ff2Smrgm4_require([_LT_DECL_EGREP])dnl 557967ab2ff2Smrgm4_require([_LT_DECL_SED])dnl 558067ab2ff2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 558167ab2ff2Smrgm4_require([_LT_TAG_COMPILER])dnl 558267ab2ff2SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 558367ab2ff2Smrgm4_if([$1], [CXX], [ 558467ab2ff2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 558567ab2ff2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 558667ab2ff2Smrg case $host_os in 558767ab2ff2Smrg aix[[4-9]]*) 558867ab2ff2Smrg # If we're using GNU nm, then we don't want the "-C" option. 558967ab2ff2Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 559067ab2ff2Smrg # Also, AIX nm treats weak defined symbols like other global defined 559167ab2ff2Smrg # symbols, whereas GNU nm marks them as "W". 559267ab2ff2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 559367ab2ff2Smrg _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' 559467ab2ff2Smrg else 559567ab2ff2Smrg _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' 559667ab2ff2Smrg fi 559767ab2ff2Smrg ;; 559867ab2ff2Smrg pw32*) 559967ab2ff2Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 560067ab2ff2Smrg ;; 560167ab2ff2Smrg cygwin* | mingw* | cegcc*) 560267ab2ff2Smrg case $cc_basename in 5603e494fffdSmrg cl*) 5604e494fffdSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5605e494fffdSmrg ;; 560667ab2ff2Smrg *) 560767ab2ff2Smrg _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' 560867ab2ff2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 560967ab2ff2Smrg ;; 561067ab2ff2Smrg esac 561167ab2ff2Smrg ;; 561267ab2ff2Smrg *) 561367ab2ff2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 561467ab2ff2Smrg ;; 561567ab2ff2Smrg esac 561667ab2ff2Smrg], [ 561767ab2ff2Smrg runpath_var= 561867ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 561967ab2ff2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 562067ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)= 562167ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 562267ab2ff2Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 562367ab2ff2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 562467ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 562567ab2ff2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 562667ab2ff2Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 562767ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 562867ab2ff2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 562967ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 563067ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 563167ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 563267ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 563367ab2ff2Smrg _LT_TAGVAR(inherit_rpath, $1)=no 563467ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 563567ab2ff2Smrg _LT_TAGVAR(module_cmds, $1)= 563667ab2ff2Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 563767ab2ff2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 563867ab2ff2Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 563967ab2ff2Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 564067ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 564167ab2ff2Smrg # include_expsyms should be a list of space-separated symbols to be *always* 564267ab2ff2Smrg # included in the symbol list 564367ab2ff2Smrg _LT_TAGVAR(include_expsyms, $1)= 564467ab2ff2Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 564567ab2ff2Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 564667ab2ff2Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 564767ab2ff2Smrg # as well as any symbol that contains `d'. 564867ab2ff2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 564967ab2ff2Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 565067ab2ff2Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 565167ab2ff2Smrg # the symbol is explicitly referenced. Since portable code cannot 565267ab2ff2Smrg # rely on this symbol name, it's probably fine to never include it in 565367ab2ff2Smrg # preloaded symbol tables. 565467ab2ff2Smrg # Exclude shared library initialization/finalization symbols. 565567ab2ff2Smrgdnl Note also adjust exclude_expsyms for C++ above. 565667ab2ff2Smrg extract_expsyms_cmds= 565767ab2ff2Smrg 565867ab2ff2Smrg case $host_os in 565967ab2ff2Smrg cygwin* | mingw* | pw32* | cegcc*) 566067ab2ff2Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 566167ab2ff2Smrg # When not using gcc, we currently assume that we are using 566267ab2ff2Smrg # Microsoft Visual C++. 566367ab2ff2Smrg if test "$GCC" != yes; then 566467ab2ff2Smrg with_gnu_ld=no 566567ab2ff2Smrg fi 566667ab2ff2Smrg ;; 566767ab2ff2Smrg interix*) 566867ab2ff2Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 566967ab2ff2Smrg with_gnu_ld=yes 567067ab2ff2Smrg ;; 567167ab2ff2Smrg openbsd*) 567267ab2ff2Smrg with_gnu_ld=no 567367ab2ff2Smrg ;; 567467ab2ff2Smrg esac 567567ab2ff2Smrg 567667ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 567767ab2ff2Smrg 567867ab2ff2Smrg # On some targets, GNU ld is compatible enough with the native linker 567967ab2ff2Smrg # that we're better off using the native interface for both. 568067ab2ff2Smrg lt_use_gnu_ld_interface=no 568167ab2ff2Smrg if test "$with_gnu_ld" = yes; then 568267ab2ff2Smrg case $host_os in 568367ab2ff2Smrg aix*) 568467ab2ff2Smrg # The AIX port of GNU ld has always aspired to compatibility 568567ab2ff2Smrg # with the native linker. However, as the warning in the GNU ld 568667ab2ff2Smrg # block says, versions before 2.19.5* couldn't really create working 568767ab2ff2Smrg # shared libraries, regardless of the interface used. 568867ab2ff2Smrg case `$LD -v 2>&1` in 568967ab2ff2Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 569067ab2ff2Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 569167ab2ff2Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 569267ab2ff2Smrg *) 569367ab2ff2Smrg lt_use_gnu_ld_interface=yes 569467ab2ff2Smrg ;; 569567ab2ff2Smrg esac 569667ab2ff2Smrg ;; 569767ab2ff2Smrg *) 569867ab2ff2Smrg lt_use_gnu_ld_interface=yes 5699f05b35a2Smrg ;; 570067ab2ff2Smrg esac 570167ab2ff2Smrg fi 570267ab2ff2Smrg 570367ab2ff2Smrg if test "$lt_use_gnu_ld_interface" = yes; then 570467ab2ff2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 570567ab2ff2Smrg wlarc='${wl}' 570667ab2ff2Smrg 570767ab2ff2Smrg # Set some defaults for GNU ld with shared library support. These 570867ab2ff2Smrg # are reset later if shared libraries are not supported. Putting them 570967ab2ff2Smrg # here allows them to be overridden if necessary. 571067ab2ff2Smrg runpath_var=LD_RUN_PATH 571167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 571267ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 571367ab2ff2Smrg # ancient GNU ld didn't support --whole-archive et. al. 571467ab2ff2Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 571567ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 571667ab2ff2Smrg else 571767ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 571867ab2ff2Smrg fi 571967ab2ff2Smrg supports_anon_versioning=no 572067ab2ff2Smrg case `$LD -v 2>&1` in 572167ab2ff2Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 572267ab2ff2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 572367ab2ff2Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 572467ab2ff2Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 572567ab2ff2Smrg *\ 2.11.*) ;; # other 2.11 versions 572667ab2ff2Smrg *) supports_anon_versioning=yes ;; 572767ab2ff2Smrg esac 572867ab2ff2Smrg 572967ab2ff2Smrg # See if GNU ld supports shared libraries. 573067ab2ff2Smrg case $host_os in 573167ab2ff2Smrg aix[[3-9]]*) 573267ab2ff2Smrg # On AIX/PPC, the GNU linker is very broken 573367ab2ff2Smrg if test "$host_cpu" != ia64; then 573467ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 573567ab2ff2Smrg cat <<_LT_EOF 1>&2 573667ab2ff2Smrg 573767ab2ff2Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 573867ab2ff2Smrg*** to be unable to reliably create shared libraries on AIX. 573967ab2ff2Smrg*** Therefore, libtool is disabling shared libraries support. If you 574067ab2ff2Smrg*** really care for shared libraries, you may want to install binutils 574167ab2ff2Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 574267ab2ff2Smrg*** You will then need to restart the configuration process. 574367ab2ff2Smrg 574467ab2ff2Smrg_LT_EOF 574567ab2ff2Smrg fi 574667ab2ff2Smrg ;; 574767ab2ff2Smrg 574867ab2ff2Smrg amigaos*) 574967ab2ff2Smrg case $host_cpu in 575067ab2ff2Smrg powerpc) 575167ab2ff2Smrg # see comment about AmigaOS4 .so support 575267ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 575367ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 575467ab2ff2Smrg ;; 575567ab2ff2Smrg m68k) 575667ab2ff2Smrg _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)' 575767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 575867ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 575967ab2ff2Smrg ;; 576067ab2ff2Smrg esac 576167ab2ff2Smrg ;; 576267ab2ff2Smrg 576367ab2ff2Smrg beos*) 576467ab2ff2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 576567ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 576667ab2ff2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 576767ab2ff2Smrg # support --undefined. This deserves some investigation. FIXME 576867ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 576967ab2ff2Smrg else 577067ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 577167ab2ff2Smrg fi 577267ab2ff2Smrg ;; 577367ab2ff2Smrg 577467ab2ff2Smrg cygwin* | mingw* | pw32* | cegcc*) 577567ab2ff2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 577667ab2ff2Smrg # as there is no search path for DLLs. 577767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 577867ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 577967ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 578067ab2ff2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 578167ab2ff2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 578267ab2ff2Smrg _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' 578367ab2ff2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 578467ab2ff2Smrg 578567ab2ff2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 578667ab2ff2Smrg _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' 578767ab2ff2Smrg # If the export-symbols file already is a .def file (1st line 578867ab2ff2Smrg # is EXPORTS), use it as is; otherwise, prepend... 578967ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 579067ab2ff2Smrg cp $export_symbols $output_objdir/$soname.def; 579167ab2ff2Smrg else 579267ab2ff2Smrg echo EXPORTS > $output_objdir/$soname.def; 579367ab2ff2Smrg cat $export_symbols >> $output_objdir/$soname.def; 579467ab2ff2Smrg fi~ 579567ab2ff2Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 579667ab2ff2Smrg else 579767ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 579867ab2ff2Smrg fi 579967ab2ff2Smrg ;; 580067ab2ff2Smrg 580167ab2ff2Smrg haiku*) 580267ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 580367ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 580467ab2ff2Smrg ;; 580567ab2ff2Smrg 580667ab2ff2Smrg interix[[3-9]]*) 580767ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 580867ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 580967ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 581067ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 581167ab2ff2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 581267ab2ff2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 581367ab2ff2Smrg # default) and relocated if they conflict, which is a slow very memory 581467ab2ff2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 581567ab2ff2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 581667ab2ff2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 581767ab2ff2Smrg _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' 581867ab2ff2Smrg _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' 581967ab2ff2Smrg ;; 582067ab2ff2Smrg 582167ab2ff2Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 582267ab2ff2Smrg tmp_diet=no 582367ab2ff2Smrg if test "$host_os" = linux-dietlibc; then 582449e108a1Smrg case $cc_basename in 582567ab2ff2Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 582649e108a1Smrg esac 582767ab2ff2Smrg fi 582867ab2ff2Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 582967ab2ff2Smrg && test "$tmp_diet" = no 583067ab2ff2Smrg then 583167ab2ff2Smrg tmp_addflag=' $pic_flag' 583267ab2ff2Smrg tmp_sharedflag='-shared' 583367ab2ff2Smrg case $cc_basename,$host_cpu in 583467ab2ff2Smrg pgcc*) # Portland Group C compiler 583567ab2ff2Smrg _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' 583667ab2ff2Smrg tmp_addflag=' $pic_flag' 583767ab2ff2Smrg ;; 583867ab2ff2Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 583967ab2ff2Smrg # Portland Group f77 and f90 compilers 584067ab2ff2Smrg _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' 584167ab2ff2Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 584267ab2ff2Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 584367ab2ff2Smrg tmp_addflag=' -i_dynamic' ;; 584467ab2ff2Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 584567ab2ff2Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 584667ab2ff2Smrg ifc* | ifort*) # Intel Fortran compiler 584767ab2ff2Smrg tmp_addflag=' -nofor_main' ;; 584867ab2ff2Smrg lf95*) # Lahey Fortran 8.1 584967ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 585067ab2ff2Smrg tmp_sharedflag='--shared' ;; 585167ab2ff2Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 585267ab2ff2Smrg tmp_sharedflag='-qmkshrobj' 585367ab2ff2Smrg tmp_addflag= ;; 585467ab2ff2Smrg nvcc*) # Cuda Compiler Driver 2.2 585567ab2ff2Smrg _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' 585667ab2ff2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 585767ab2ff2Smrg ;; 5858f05b35a2Smrg esac 585967ab2ff2Smrg case `$CC -V 2>&1 | sed 5q` in 586067ab2ff2Smrg *Sun\ C*) # Sun C 5.9 586167ab2ff2Smrg _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' 586267ab2ff2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 586367ab2ff2Smrg tmp_sharedflag='-G' ;; 586467ab2ff2Smrg *Sun\ F*) # Sun Fortran 8.3 586567ab2ff2Smrg tmp_sharedflag='-G' ;; 586649e108a1Smrg esac 586767ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 586867ab2ff2Smrg 586967ab2ff2Smrg if test "x$supports_anon_versioning" = xyes; then 587067ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 587167ab2ff2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 587267ab2ff2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 587367ab2ff2Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 587467ab2ff2Smrg fi 587567ab2ff2Smrg 587649e108a1Smrg case $cc_basename in 587767ab2ff2Smrg xlf* | bgf* | bgxlf* | mpixlf*) 587867ab2ff2Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 587967ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5880e494fffdSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 588167ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 588267ab2ff2Smrg if test "x$supports_anon_versioning" = xyes; then 588367ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 588467ab2ff2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 588567ab2ff2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 588667ab2ff2Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 588767ab2ff2Smrg fi 588867ab2ff2Smrg ;; 588949e108a1Smrg esac 589067ab2ff2Smrg else 589167ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 589267ab2ff2Smrg fi 589367ab2ff2Smrg ;; 589467ab2ff2Smrg 589567ab2ff2Smrg netbsd*) 589667ab2ff2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 589767ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 589867ab2ff2Smrg wlarc= 589967ab2ff2Smrg else 590067ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 590167ab2ff2Smrg _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' 590267ab2ff2Smrg fi 590367ab2ff2Smrg ;; 590467ab2ff2Smrg 590567ab2ff2Smrg solaris*) 590667ab2ff2Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 590767ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 590867ab2ff2Smrg cat <<_LT_EOF 1>&2 590967ab2ff2Smrg 591067ab2ff2Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 591167ab2ff2Smrg*** create shared libraries on Solaris systems. Therefore, libtool 591267ab2ff2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 591367ab2ff2Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 591467ab2ff2Smrg*** your PATH or compiler configuration so that the native linker is 591567ab2ff2Smrg*** used, and then restart. 591667ab2ff2Smrg 591767ab2ff2Smrg_LT_EOF 591867ab2ff2Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 591967ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 592067ab2ff2Smrg _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' 592167ab2ff2Smrg else 592267ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 592367ab2ff2Smrg fi 592467ab2ff2Smrg ;; 592567ab2ff2Smrg 592667ab2ff2Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 592767ab2ff2Smrg case `$LD -v 2>&1` in 592867ab2ff2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 592967ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 593067ab2ff2Smrg cat <<_LT_EOF 1>&2 593167ab2ff2Smrg 593267ab2ff2Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 593367ab2ff2Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 593467ab2ff2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 593567ab2ff2Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 593667ab2ff2Smrg*** your PATH or compiler configuration so that the native linker is 593767ab2ff2Smrg*** used, and then restart. 593867ab2ff2Smrg 593967ab2ff2Smrg_LT_EOF 5940f05b35a2Smrg ;; 594167ab2ff2Smrg *) 594267ab2ff2Smrg # For security reasons, it is highly recommended that you always 594367ab2ff2Smrg # use absolute paths for naming shared libraries, and exclude the 594467ab2ff2Smrg # DT_RUNPATH tag from executables and libraries. But doing so 594567ab2ff2Smrg # requires that you compile everything twice, which is a pain. 594667ab2ff2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 594767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 594867ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 594967ab2ff2Smrg _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' 595067ab2ff2Smrg else 595167ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 595267ab2ff2Smrg fi 5953f05b35a2Smrg ;; 595467ab2ff2Smrg esac 595567ab2ff2Smrg ;; 595667ab2ff2Smrg 595767ab2ff2Smrg sunos4*) 595867ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 595967ab2ff2Smrg wlarc= 596067ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 596167ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 596267ab2ff2Smrg ;; 596367ab2ff2Smrg 596467ab2ff2Smrg *) 596567ab2ff2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 596667ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 596767ab2ff2Smrg _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' 596867ab2ff2Smrg else 596967ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 597067ab2ff2Smrg fi 597167ab2ff2Smrg ;; 597249e108a1Smrg esac 5973e0963edeSmrg 597467ab2ff2Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 597567ab2ff2Smrg runpath_var= 597667ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 597767ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 597867ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 597967ab2ff2Smrg fi 598067ab2ff2Smrg else 598167ab2ff2Smrg # PORTME fill in a description of your system's linker (not GNU ld) 598249e108a1Smrg case $host_os in 598367ab2ff2Smrg aix3*) 598467ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 598567ab2ff2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 598667ab2ff2Smrg _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' 598767ab2ff2Smrg # Note: this linker hardcodes the directories in LIBPATH if there 598867ab2ff2Smrg # are no directories specified by -L. 598967ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 599067ab2ff2Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 599167ab2ff2Smrg # Neither direct hardcoding nor static linking is supported with a 599267ab2ff2Smrg # broken collect2. 599367ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 599467ab2ff2Smrg fi 599567ab2ff2Smrg ;; 599667ab2ff2Smrg 599767ab2ff2Smrg aix[[4-9]]*) 599849e108a1Smrg if test "$host_cpu" = ia64; then 599967ab2ff2Smrg # On IA64, the linker does run time linking by default, so we don't 600067ab2ff2Smrg # have to do anything special. 600167ab2ff2Smrg aix_use_runtimelinking=no 600267ab2ff2Smrg exp_sym_flag='-Bexport' 600367ab2ff2Smrg no_entry_flag="" 600467ab2ff2Smrg else 600567ab2ff2Smrg # If we're using GNU nm, then we don't want the "-C" option. 600667ab2ff2Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 600767ab2ff2Smrg # Also, AIX nm treats weak defined symbols like other global 600867ab2ff2Smrg # defined symbols, whereas GNU nm marks them as "W". 600967ab2ff2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 601067ab2ff2Smrg _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' 601167ab2ff2Smrg else 601267ab2ff2Smrg _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' 601367ab2ff2Smrg fi 601467ab2ff2Smrg aix_use_runtimelinking=no 601567ab2ff2Smrg 601667ab2ff2Smrg # Test if we are trying to use run time linking or normal 601767ab2ff2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 601867ab2ff2Smrg # need to do runtime linking. 601967ab2ff2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 602067ab2ff2Smrg for ld_flag in $LDFLAGS; do 602167ab2ff2Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 602267ab2ff2Smrg aix_use_runtimelinking=yes 602367ab2ff2Smrg break 602467ab2ff2Smrg fi 602567ab2ff2Smrg done 602667ab2ff2Smrg ;; 602767ab2ff2Smrg esac 602867ab2ff2Smrg 602967ab2ff2Smrg exp_sym_flag='-bexport' 603067ab2ff2Smrg no_entry_flag='-bnoentry' 603167ab2ff2Smrg fi 603267ab2ff2Smrg 603367ab2ff2Smrg # When large executables or shared objects are built, AIX ld can 603467ab2ff2Smrg # have problems creating the table of contents. If linking a library 603567ab2ff2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 603667ab2ff2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 603767ab2ff2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 603867ab2ff2Smrg 603967ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='' 604067ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 604167ab2ff2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 604267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 604367ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 604467ab2ff2Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 604567ab2ff2Smrg 604667ab2ff2Smrg if test "$GCC" = yes; then 604767ab2ff2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 604867ab2ff2Smrg # We only want to do this on AIX 4.2 and lower, the check 604967ab2ff2Smrg # below for broken collect2 doesn't work under 4.3+ 605067ab2ff2Smrg collect2name=`${CC} -print-prog-name=collect2` 605167ab2ff2Smrg if test -f "$collect2name" && 605267ab2ff2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 605367ab2ff2Smrg then 605467ab2ff2Smrg # We have reworked collect2 605567ab2ff2Smrg : 605667ab2ff2Smrg else 605767ab2ff2Smrg # We have old collect2 605867ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 605967ab2ff2Smrg # It fails to find uninstalled libraries when the uninstalled 606067ab2ff2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 606167ab2ff2Smrg # to unsupported forces relinking 606267ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 606367ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 606467ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 606567ab2ff2Smrg fi 606667ab2ff2Smrg ;; 606767ab2ff2Smrg esac 606867ab2ff2Smrg shared_flag='-shared' 606967ab2ff2Smrg if test "$aix_use_runtimelinking" = yes; then 607067ab2ff2Smrg shared_flag="$shared_flag "'${wl}-G' 607167ab2ff2Smrg fi 607267ab2ff2Smrg else 607367ab2ff2Smrg # not using gcc 607467ab2ff2Smrg if test "$host_cpu" = ia64; then 607567ab2ff2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 607667ab2ff2Smrg # chokes on -Wl,-G. The following line is correct: 607767ab2ff2Smrg shared_flag='-G' 607867ab2ff2Smrg else 607967ab2ff2Smrg if test "$aix_use_runtimelinking" = yes; then 608067ab2ff2Smrg shared_flag='${wl}-G' 608167ab2ff2Smrg else 608267ab2ff2Smrg shared_flag='${wl}-bM:SRE' 608367ab2ff2Smrg fi 608467ab2ff2Smrg fi 608567ab2ff2Smrg fi 608667ab2ff2Smrg 608767ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 608867ab2ff2Smrg # It seems that -bexpall does not export symbols beginning with 608967ab2ff2Smrg # underscore (_), so it is better to generate a list of symbols to export. 609067ab2ff2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 609167ab2ff2Smrg if test "$aix_use_runtimelinking" = yes; then 609267ab2ff2Smrg # Warning - without using the other runtime loading flags (-brtl), 609367ab2ff2Smrg # -berok will link without error, but may produce a broken library. 609467ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 609567ab2ff2Smrg # Determine the default libpath from the value encoded in an 609667ab2ff2Smrg # empty executable. 609767ab2ff2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 609867ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 609967ab2ff2Smrg _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" 610067ab2ff2Smrg else 610167ab2ff2Smrg if test "$host_cpu" = ia64; then 610267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 610367ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 610467ab2ff2Smrg _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" 610567ab2ff2Smrg else 610667ab2ff2Smrg # Determine the default libpath from the value encoded in an 610767ab2ff2Smrg # empty executable. 610867ab2ff2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 610967ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 611067ab2ff2Smrg # Warning - without using the other run time loading flags, 611167ab2ff2Smrg # -berok will link without error, but may produce a broken library. 611267ab2ff2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 611367ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 611467ab2ff2Smrg if test "$with_gnu_ld" = yes; then 611567ab2ff2Smrg # We only use this code for GNU lds that support --whole-archive. 611667ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 611767ab2ff2Smrg else 611867ab2ff2Smrg # Exported symbols can be pulled into shared objects from archives 611967ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 612067ab2ff2Smrg fi 612167ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 612267ab2ff2Smrg # This is similar to how AIX traditionally builds its shared libraries. 612367ab2ff2Smrg _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' 612467ab2ff2Smrg fi 612549e108a1Smrg fi 612649e108a1Smrg ;; 6127e0963edeSmrg 612849e108a1Smrg amigaos*) 612949e108a1Smrg case $host_cpu in 613049e108a1Smrg powerpc) 613149e108a1Smrg # see comment about AmigaOS4 .so support 613267ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 613367ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 613449e108a1Smrg ;; 613549e108a1Smrg m68k) 613667ab2ff2Smrg _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)' 613767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 613867ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 613949e108a1Smrg ;; 614049e108a1Smrg esac 614149e108a1Smrg ;; 6142f05b35a2Smrg 614367ab2ff2Smrg bsdi[[45]]*) 614467ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 614567ab2ff2Smrg ;; 614667ab2ff2Smrg 614767ab2ff2Smrg cygwin* | mingw* | pw32* | cegcc*) 614867ab2ff2Smrg # When not using gcc, we currently assume that we are using 614967ab2ff2Smrg # Microsoft Visual C++. 615067ab2ff2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 615167ab2ff2Smrg # no search path for DLLs. 615267ab2ff2Smrg case $cc_basename in 615367ab2ff2Smrg cl*) 615467ab2ff2Smrg # Native MSVC 615567ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 615667ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 615767ab2ff2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 615867ab2ff2Smrg _LT_TAGVAR(file_list_spec, $1)='@' 615967ab2ff2Smrg # Tell ltmain to make .lib files, not .a files. 616067ab2ff2Smrg libext=lib 616167ab2ff2Smrg # Tell ltmain to make .dll files, not .so files. 616267ab2ff2Smrg shrext_cmds=".dll" 616367ab2ff2Smrg # FIXME: Setting linknames here is a bad hack. 616467ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 616567ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 616667ab2ff2Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 616767ab2ff2Smrg else 616867ab2ff2Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 616967ab2ff2Smrg fi~ 617067ab2ff2Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 617167ab2ff2Smrg linknames=' 617267ab2ff2Smrg # The linker will not automatically build a static lib if we build a DLL. 617367ab2ff2Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 617467ab2ff2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6175e494fffdSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 617667ab2ff2Smrg _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' 617767ab2ff2Smrg # Don't use ranlib 617867ab2ff2Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 617967ab2ff2Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 618067ab2ff2Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 618167ab2ff2Smrg case $lt_outputfile in 618267ab2ff2Smrg *.exe|*.EXE) ;; 618367ab2ff2Smrg *) 618467ab2ff2Smrg lt_outputfile="$lt_outputfile.exe" 618567ab2ff2Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 618667ab2ff2Smrg ;; 618767ab2ff2Smrg esac~ 618867ab2ff2Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 618967ab2ff2Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 619067ab2ff2Smrg $RM "$lt_outputfile.manifest"; 619167ab2ff2Smrg fi' 619249e108a1Smrg ;; 619349e108a1Smrg *) 619467ab2ff2Smrg # Assume MSVC wrapper 619567ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 619667ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 619767ab2ff2Smrg # Tell ltmain to make .lib files, not .a files. 619867ab2ff2Smrg libext=lib 619967ab2ff2Smrg # Tell ltmain to make .dll files, not .so files. 620067ab2ff2Smrg shrext_cmds=".dll" 620167ab2ff2Smrg # FIXME: Setting linknames here is a bad hack. 620267ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 620367ab2ff2Smrg # The linker will automatically build a .lib file if we build a DLL. 620467ab2ff2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 620567ab2ff2Smrg # FIXME: Should let the user specify the lib program. 620667ab2ff2Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 620767ab2ff2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 620849e108a1Smrg ;; 620949e108a1Smrg esac 621049e108a1Smrg ;; 6211e0963edeSmrg 621267ab2ff2Smrg darwin* | rhapsody*) 621367ab2ff2Smrg _LT_DARWIN_LINKER_FEATURES($1) 621449e108a1Smrg ;; 6215f05b35a2Smrg 621667ab2ff2Smrg dgux*) 621767ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 621867ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 621967ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 622049e108a1Smrg ;; 6221e0963edeSmrg 622267ab2ff2Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 622367ab2ff2Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 622467ab2ff2Smrg # does not break anything, and helps significantly (at the cost of a little 622567ab2ff2Smrg # extra space). 622667ab2ff2Smrg freebsd2.2*) 622767ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 622867ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 622967ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 623067ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 623149e108a1Smrg ;; 6232e0963edeSmrg 623367ab2ff2Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6234e494fffdSmrg freebsd2.*) 623567ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 623667ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 623767ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 623867ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 623949e108a1Smrg ;; 6240f05b35a2Smrg 624167ab2ff2Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 624267ab2ff2Smrg freebsd* | dragonfly*) 624367ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 624467ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 624567ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 624667ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 624749e108a1Smrg ;; 624867ab2ff2Smrg 624967ab2ff2Smrg hpux9*) 625067ab2ff2Smrg if test "$GCC" = yes; then 625167ab2ff2Smrg _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' 625249e108a1Smrg else 625367ab2ff2Smrg _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' 625449e108a1Smrg fi 625567ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 625667ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 625767ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6258f05b35a2Smrg 625967ab2ff2Smrg # hardcode_minus_L: Not really in the search PATH, 626067ab2ff2Smrg # but as the default location of the library. 626167ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 626267ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 626349e108a1Smrg ;; 6264f05b35a2Smrg 626567ab2ff2Smrg hpux10*) 626667ab2ff2Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 626767ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 626867ab2ff2Smrg else 626967ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 627067ab2ff2Smrg fi 627167ab2ff2Smrg if test "$with_gnu_ld" = no; then 627267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 627367ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 627467ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 627567ab2ff2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 627667ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 627767ab2ff2Smrg # hardcode_minus_L: Not really in the search PATH, 627867ab2ff2Smrg # but as the default location of the library. 627967ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 628067ab2ff2Smrg fi 628149e108a1Smrg ;; 6282e0963edeSmrg 628367ab2ff2Smrg hpux11*) 628467ab2ff2Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 628567ab2ff2Smrg case $host_cpu in 628667ab2ff2Smrg hppa*64*) 628767ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 628867ab2ff2Smrg ;; 628967ab2ff2Smrg ia64*) 629067ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 629167ab2ff2Smrg ;; 629267ab2ff2Smrg *) 629367ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 629467ab2ff2Smrg ;; 629567ab2ff2Smrg esac 629667ab2ff2Smrg else 629767ab2ff2Smrg case $host_cpu in 629867ab2ff2Smrg hppa*64*) 629967ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 630067ab2ff2Smrg ;; 630167ab2ff2Smrg ia64*) 630267ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 630367ab2ff2Smrg ;; 630467ab2ff2Smrg *) 630567ab2ff2Smrg m4_if($1, [], [ 630667ab2ff2Smrg # Older versions of the 11.00 compiler do not understand -b yet 630767ab2ff2Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 630867ab2ff2Smrg _LT_LINKER_OPTION([if $CC understands -b], 630967ab2ff2Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 631067ab2ff2Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 631167ab2ff2Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 631267ab2ff2Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 631367ab2ff2Smrg ;; 631467ab2ff2Smrg esac 631567ab2ff2Smrg fi 631667ab2ff2Smrg if test "$with_gnu_ld" = no; then 631767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 631867ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6319e0963edeSmrg 632067ab2ff2Smrg case $host_cpu in 632167ab2ff2Smrg hppa*64*|ia64*) 632267ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 632367ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6324f05b35a2Smrg ;; 632567ab2ff2Smrg *) 632667ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 632767ab2ff2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 632867ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 632967ab2ff2Smrg 633067ab2ff2Smrg # hardcode_minus_L: Not really in the search PATH, 633167ab2ff2Smrg # but as the default location of the library. 633267ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6333f05b35a2Smrg ;; 633449e108a1Smrg esac 633567ab2ff2Smrg fi 633667ab2ff2Smrg ;; 633767ab2ff2Smrg 633867ab2ff2Smrg irix5* | irix6* | nonstopux*) 633967ab2ff2Smrg if test "$GCC" = yes; then 634067ab2ff2Smrg _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' 634167ab2ff2Smrg # Try to use the -exported_symbol ld option, if it does not 634267ab2ff2Smrg # work, assume that -exports_file does not work either and 634367ab2ff2Smrg # implicitly export all symbols. 634467ab2ff2Smrg # This should be the same for all languages, so no per-tag cache variable. 634567ab2ff2Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 634667ab2ff2Smrg [lt_cv_irix_exported_symbol], 634767ab2ff2Smrg [save_LDFLAGS="$LDFLAGS" 634867ab2ff2Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 634967ab2ff2Smrg AC_LINK_IFELSE( 635067ab2ff2Smrg [AC_LANG_SOURCE( 635167ab2ff2Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 635267ab2ff2Smrg [C++], [[int foo (void) { return 0; }]], 635367ab2ff2Smrg [Fortran 77], [[ 635467ab2ff2Smrg subroutine foo 635567ab2ff2Smrg end]], 635667ab2ff2Smrg [Fortran], [[ 635767ab2ff2Smrg subroutine foo 635867ab2ff2Smrg end]])])], 635967ab2ff2Smrg [lt_cv_irix_exported_symbol=yes], 636067ab2ff2Smrg [lt_cv_irix_exported_symbol=no]) 636167ab2ff2Smrg LDFLAGS="$save_LDFLAGS"]) 636267ab2ff2Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 636367ab2ff2Smrg _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' 636467ab2ff2Smrg fi 636567ab2ff2Smrg else 636667ab2ff2Smrg _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' 636767ab2ff2Smrg _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' 636867ab2ff2Smrg fi 636967ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 637067ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 637167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 637267ab2ff2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 637367ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 637467ab2ff2Smrg ;; 637567ab2ff2Smrg 637667ab2ff2Smrg netbsd*) 637767ab2ff2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 637867ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 637967ab2ff2Smrg else 638067ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 638167ab2ff2Smrg fi 638267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 638367ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 638467ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6385f05b35a2Smrg ;; 6386e0963edeSmrg 638749e108a1Smrg newsos6) 638867ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 638967ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 639067ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 639167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 639267ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 639349e108a1Smrg ;; 6394e0963edeSmrg 639549e108a1Smrg *nto* | *qnx*) 6396f05b35a2Smrg ;; 6397e0963edeSmrg 639867ab2ff2Smrg openbsd*) 639967ab2ff2Smrg if test -f /usr/libexec/ld.so; then 640067ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 640167ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 640267ab2ff2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 640367ab2ff2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 640467ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 640567ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 640667ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 640767ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 640867ab2ff2Smrg else 640967ab2ff2Smrg case $host_os in 641067ab2ff2Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 641167ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 641267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 641367ab2ff2Smrg ;; 641467ab2ff2Smrg *) 641567ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 641667ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 641767ab2ff2Smrg ;; 641867ab2ff2Smrg esac 641967ab2ff2Smrg fi 642067ab2ff2Smrg else 642167ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 642267ab2ff2Smrg fi 642349e108a1Smrg ;; 6424e0963edeSmrg 642567ab2ff2Smrg os2*) 642667ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 642767ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 642867ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 642967ab2ff2Smrg _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' 643067ab2ff2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 643167ab2ff2Smrg ;; 643267ab2ff2Smrg 643367ab2ff2Smrg osf3*) 643467ab2ff2Smrg if test "$GCC" = yes; then 643567ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 643667ab2ff2Smrg _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' 643767ab2ff2Smrg else 643867ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 643967ab2ff2Smrg _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' 644067ab2ff2Smrg fi 644167ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 644267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 644367ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 644467ab2ff2Smrg ;; 644567ab2ff2Smrg 644667ab2ff2Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 644767ab2ff2Smrg if test "$GCC" = yes; then 644867ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 644967ab2ff2Smrg _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' 645067ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 645167ab2ff2Smrg else 645267ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 645367ab2ff2Smrg _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' 645467ab2ff2Smrg _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~ 645567ab2ff2Smrg $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' 645667ab2ff2Smrg 645767ab2ff2Smrg # Both c and cxx compiler support -rpath directly 645867ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 645967ab2ff2Smrg fi 646067ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 646167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 646249e108a1Smrg ;; 6463e0963edeSmrg 646449e108a1Smrg solaris*) 646567ab2ff2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 646667ab2ff2Smrg if test "$GCC" = yes; then 646767ab2ff2Smrg wlarc='${wl}' 646867ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 646967ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 647067ab2ff2Smrg $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' 647167ab2ff2Smrg else 647267ab2ff2Smrg case `$CC -V 2>&1` in 647367ab2ff2Smrg *"Compilers 5.0"*) 647467ab2ff2Smrg wlarc='' 647567ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 647667ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 647767ab2ff2Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 647867ab2ff2Smrg ;; 647967ab2ff2Smrg *) 648067ab2ff2Smrg wlarc='${wl}' 648167ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 648267ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 648367ab2ff2Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 648467ab2ff2Smrg ;; 648567ab2ff2Smrg esac 648667ab2ff2Smrg fi 648767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 648867ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 648967ab2ff2Smrg case $host_os in 649067ab2ff2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6491f05b35a2Smrg *) 649267ab2ff2Smrg # The compiler driver will combine and reorder linker options, 649367ab2ff2Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 649467ab2ff2Smrg # but is careful enough not to reorder. 649567ab2ff2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 649667ab2ff2Smrg if test "$GCC" = yes; then 649767ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 649867ab2ff2Smrg else 649967ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 650067ab2ff2Smrg fi 650167ab2ff2Smrg ;; 650249e108a1Smrg esac 650367ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 650449e108a1Smrg ;; 6505e0963edeSmrg 650649e108a1Smrg sunos4*) 650767ab2ff2Smrg if test "x$host_vendor" = xsequent; then 650867ab2ff2Smrg # Use $CC to link under sequent, because it throws in some extra .o 650967ab2ff2Smrg # files that make .init and .fini sections work. 651067ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 651167ab2ff2Smrg else 651267ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 651367ab2ff2Smrg fi 651467ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 651567ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 651667ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 651767ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 651849e108a1Smrg ;; 6519f05b35a2Smrg 652067ab2ff2Smrg sysv4) 652167ab2ff2Smrg case $host_vendor in 652267ab2ff2Smrg sni) 652367ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 652467ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 652567ab2ff2Smrg ;; 652667ab2ff2Smrg siemens) 652767ab2ff2Smrg ## LD is ld it makes a PLAMLIB 652867ab2ff2Smrg ## CC just makes a GrossModule. 652967ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 653067ab2ff2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 653167ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 653267ab2ff2Smrg ;; 653367ab2ff2Smrg motorola) 653467ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 653567ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 653667ab2ff2Smrg ;; 653767ab2ff2Smrg esac 653867ab2ff2Smrg runpath_var='LD_RUN_PATH' 653967ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 654067ab2ff2Smrg ;; 654167ab2ff2Smrg 654267ab2ff2Smrg sysv4.3*) 654367ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 654467ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 654567ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 654649e108a1Smrg ;; 6547f05b35a2Smrg 654849e108a1Smrg sysv4*MP*) 654967ab2ff2Smrg if test -d /usr/nec; then 655067ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 655167ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 655267ab2ff2Smrg runpath_var=LD_RUN_PATH 655367ab2ff2Smrg hardcode_runpath_var=yes 655467ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 655549e108a1Smrg fi 655649e108a1Smrg ;; 6557f05b35a2Smrg 655867ab2ff2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 655967ab2ff2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 656067ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 656167ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 656267ab2ff2Smrg runpath_var='LD_RUN_PATH' 656367ab2ff2Smrg 656467ab2ff2Smrg if test "$GCC" = yes; then 656567ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 656667ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 656767ab2ff2Smrg else 656867ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 656967ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 657067ab2ff2Smrg fi 657149e108a1Smrg ;; 6572f05b35a2Smrg 657367ab2ff2Smrg sysv5* | sco3.2v5* | sco5v6*) 657467ab2ff2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 657567ab2ff2Smrg # link with -lc, and that would cause any symbols used from libc to 657667ab2ff2Smrg # always be unresolved, which means just about no library would 657767ab2ff2Smrg # ever link correctly. If we're not using GNU ld we use -z text 657867ab2ff2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 657967ab2ff2Smrg # as -z defs. 658067ab2ff2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 658167ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 658267ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 658367ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 658467ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 658567ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 658667ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 658767ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 658867ab2ff2Smrg runpath_var='LD_RUN_PATH' 658967ab2ff2Smrg 659067ab2ff2Smrg if test "$GCC" = yes; then 659167ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659267ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659367ab2ff2Smrg else 659467ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659567ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 659667ab2ff2Smrg fi 659749e108a1Smrg ;; 6598e0963edeSmrg 659949e108a1Smrg uts4*) 660067ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 660167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 660267ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 660367ab2ff2Smrg ;; 660467ab2ff2Smrg 660567ab2ff2Smrg *) 660667ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 660767ab2ff2Smrg ;; 660867ab2ff2Smrg esac 660967ab2ff2Smrg 661067ab2ff2Smrg if test x$host_vendor = xsni; then 661167ab2ff2Smrg case $host in 661267ab2ff2Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 661367ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 661467ab2ff2Smrg ;; 661567ab2ff2Smrg esac 661667ab2ff2Smrg fi 661767ab2ff2Smrg fi 661867ab2ff2Smrg]) 661967ab2ff2SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 662067ab2ff2Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 662167ab2ff2Smrg 662267ab2ff2Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 662367ab2ff2Smrg 662467ab2ff2Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 662567ab2ff2Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 662667ab2ff2Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 662767ab2ff2Smrg [The commands to extract the exported symbol list from a shared archive]) 662867ab2ff2Smrg 662967ab2ff2Smrg# 663067ab2ff2Smrg# Do we need to explicitly link libc? 663167ab2ff2Smrg# 663267ab2ff2Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 663367ab2ff2Smrgx|xyes) 663467ab2ff2Smrg # Assume -lc should be added 663567ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 663667ab2ff2Smrg 663767ab2ff2Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 663867ab2ff2Smrg case $_LT_TAGVAR(archive_cmds, $1) in 663967ab2ff2Smrg *'~'*) 664067ab2ff2Smrg # FIXME: we may have to deal with multi-command sequences. 664149e108a1Smrg ;; 664267ab2ff2Smrg '$CC '*) 664367ab2ff2Smrg # Test whether the compiler implicitly links with -lc since on some 664467ab2ff2Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 664567ab2ff2Smrg # to ld, don't add -lc before -lgcc. 664667ab2ff2Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 664767ab2ff2Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 664867ab2ff2Smrg [$RM conftest* 664967ab2ff2Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6650e0963edeSmrg 665167ab2ff2Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 665267ab2ff2Smrg soname=conftest 665367ab2ff2Smrg lib=conftest 665467ab2ff2Smrg libobjs=conftest.$ac_objext 665567ab2ff2Smrg deplibs= 665667ab2ff2Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 665767ab2ff2Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 665867ab2ff2Smrg compiler_flags=-v 665967ab2ff2Smrg linker_flags=-v 666067ab2ff2Smrg verstring= 666167ab2ff2Smrg output_objdir=. 666267ab2ff2Smrg libname=conftest 666367ab2ff2Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 666467ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 666567ab2ff2Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 666667ab2ff2Smrg then 666767ab2ff2Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 666867ab2ff2Smrg else 666967ab2ff2Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 667067ab2ff2Smrg fi 667167ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 667267ab2ff2Smrg else 667367ab2ff2Smrg cat conftest.err 1>&5 667467ab2ff2Smrg fi 667567ab2ff2Smrg $RM conftest* 667667ab2ff2Smrg ]) 667767ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 667849e108a1Smrg ;; 667949e108a1Smrg esac 668049e108a1Smrg fi 668167ab2ff2Smrg ;; 668249e108a1Smrgesac 6683e0963edeSmrg 668467ab2ff2Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 668567ab2ff2Smrg [Whether or not to add -lc for building shared libraries]) 668667ab2ff2Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 668767ab2ff2Smrg [enable_shared_with_static_runtimes], [0], 668867ab2ff2Smrg [Whether or not to disallow shared libs when runtime libs are static]) 668967ab2ff2Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 669067ab2ff2Smrg [Compiler flag to allow reflexive dlopens]) 669167ab2ff2Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 669267ab2ff2Smrg [Compiler flag to generate shared objects directly from archives]) 669367ab2ff2Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 669467ab2ff2Smrg [Whether the compiler copes with passing no objects directly]) 669567ab2ff2Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 669667ab2ff2Smrg [Create an old-style archive from a shared archive]) 669767ab2ff2Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 669867ab2ff2Smrg [Create a temporary old-style archive to link instead of a shared archive]) 669967ab2ff2Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 670067ab2ff2Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 670167ab2ff2Smrg_LT_TAGDECL([], [module_cmds], [2], 670267ab2ff2Smrg [Commands used to build a loadable module if different from building 670367ab2ff2Smrg a shared archive.]) 670467ab2ff2Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 670567ab2ff2Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 670667ab2ff2Smrg [Whether we are building with GNU ld or not]) 670767ab2ff2Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 670867ab2ff2Smrg [Flag that allows shared libraries with undefined symbols to be built]) 670967ab2ff2Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 671067ab2ff2Smrg [Flag that enforces no undefined symbols]) 671167ab2ff2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 671267ab2ff2Smrg [Flag to hardcode $libdir into a binary during linking. 671367ab2ff2Smrg This must work even if $libdir does not exist]) 671467ab2ff2Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 671567ab2ff2Smrg [Whether we need a single "-rpath" flag with a separated argument]) 671667ab2ff2Smrg_LT_TAGDECL([], [hardcode_direct], [0], 671767ab2ff2Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 671867ab2ff2Smrg DIR into the resulting binary]) 671967ab2ff2Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 672067ab2ff2Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 672167ab2ff2Smrg DIR into the resulting binary and the resulting library dependency is 672267ab2ff2Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 672367ab2ff2Smrg library is relocated]) 672467ab2ff2Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 672567ab2ff2Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 672667ab2ff2Smrg into the resulting binary]) 672767ab2ff2Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 672867ab2ff2Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 672967ab2ff2Smrg into the resulting binary]) 673067ab2ff2Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 673167ab2ff2Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 673267ab2ff2Smrg into the library and all subsequent libraries and executables linked 673367ab2ff2Smrg against it]) 673467ab2ff2Smrg_LT_TAGDECL([], [inherit_rpath], [0], 673567ab2ff2Smrg [Set to yes if linker adds runtime paths of dependent libraries 673667ab2ff2Smrg to runtime path list]) 673767ab2ff2Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 673867ab2ff2Smrg [Whether libtool must link a program against all its dependency libraries]) 673967ab2ff2Smrg_LT_TAGDECL([], [always_export_symbols], [0], 674067ab2ff2Smrg [Set to "yes" if exported symbols are required]) 674167ab2ff2Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 674267ab2ff2Smrg [The commands to list exported symbols]) 674367ab2ff2Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 674467ab2ff2Smrg [Symbols that should not be listed in the preloaded symbols]) 674567ab2ff2Smrg_LT_TAGDECL([], [include_expsyms], [1], 674667ab2ff2Smrg [Symbols that must always be exported]) 674767ab2ff2Smrg_LT_TAGDECL([], [prelink_cmds], [2], 674867ab2ff2Smrg [Commands necessary for linking programs (against libraries) with templates]) 674967ab2ff2Smrg_LT_TAGDECL([], [postlink_cmds], [2], 675067ab2ff2Smrg [Commands necessary for finishing linking programs]) 675167ab2ff2Smrg_LT_TAGDECL([], [file_list_spec], [1], 675267ab2ff2Smrg [Specify filename containing input files]) 675367ab2ff2Smrgdnl FIXME: Not yet implemented 675467ab2ff2Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 675567ab2ff2Smrgdnl [Compiler flag to generate thread safe objects]) 675667ab2ff2Smrg])# _LT_LINKER_SHLIBS 6757e0963edeSmrg 675849e108a1Smrg 675967ab2ff2Smrg# _LT_LANG_C_CONFIG([TAG]) 676067ab2ff2Smrg# ------------------------ 676167ab2ff2Smrg# Ensure that the configuration variables for a C compiler are suitably 676267ab2ff2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 676367ab2ff2Smrg# the compiler configuration to `libtool'. 676467ab2ff2Smrgm4_defun([_LT_LANG_C_CONFIG], 676567ab2ff2Smrg[m4_require([_LT_DECL_EGREP])dnl 676667ab2ff2Smrglt_save_CC="$CC" 676767ab2ff2SmrgAC_LANG_PUSH(C) 6768e0963edeSmrg 676967ab2ff2Smrg# Source file extension for C test sources. 677067ab2ff2Smrgac_ext=c 6771e0963edeSmrg 677267ab2ff2Smrg# Object file extension for compiled C test sources. 677367ab2ff2Smrgobjext=o 677467ab2ff2Smrg_LT_TAGVAR(objext, $1)=$objext 6775e0963edeSmrg 677667ab2ff2Smrg# Code to be used in simple compile tests 677767ab2ff2Smrglt_simple_compile_test_code="int some_variable = 0;" 6778e0963edeSmrg 677967ab2ff2Smrg# Code to be used in simple link tests 678067ab2ff2Smrglt_simple_link_test_code='int main(){return(0);}' 6781e0963edeSmrg 678267ab2ff2Smrg_LT_TAG_COMPILER 678367ab2ff2Smrg# Save the default compiler, since it gets overwritten when the other 678467ab2ff2Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 678567ab2ff2Smrgcompiler_DEFAULT=$CC 6786e0963edeSmrg 678767ab2ff2Smrg# save warnings/boilerplate of simple test code 678867ab2ff2Smrg_LT_COMPILER_BOILERPLATE 678967ab2ff2Smrg_LT_LINKER_BOILERPLATE 6790e0963edeSmrg 679167ab2ff2Smrgif test -n "$compiler"; then 679267ab2ff2Smrg _LT_COMPILER_NO_RTTI($1) 679367ab2ff2Smrg _LT_COMPILER_PIC($1) 679467ab2ff2Smrg _LT_COMPILER_C_O($1) 679567ab2ff2Smrg _LT_COMPILER_FILE_LOCKS($1) 679667ab2ff2Smrg _LT_LINKER_SHLIBS($1) 679767ab2ff2Smrg _LT_SYS_DYNAMIC_LINKER($1) 679867ab2ff2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 679967ab2ff2Smrg LT_SYS_DLOPEN_SELF 680067ab2ff2Smrg _LT_CMD_STRIPLIB 6801e0963edeSmrg 680267ab2ff2Smrg # Report which library types will actually be built 680367ab2ff2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 680467ab2ff2Smrg AC_MSG_RESULT([$can_build_shared]) 6805e0963edeSmrg 680667ab2ff2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 680767ab2ff2Smrg test "$can_build_shared" = "no" && enable_shared=no 6808e0963edeSmrg 680967ab2ff2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 681067ab2ff2Smrg # are all built from PIC. 681167ab2ff2Smrg case $host_os in 681267ab2ff2Smrg aix3*) 681367ab2ff2Smrg test "$enable_shared" = yes && enable_static=no 681467ab2ff2Smrg if test -n "$RANLIB"; then 681567ab2ff2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 681667ab2ff2Smrg postinstall_cmds='$RANLIB $lib' 681767ab2ff2Smrg fi 681867ab2ff2Smrg ;; 6819e0963edeSmrg 682067ab2ff2Smrg aix[[4-9]]*) 682167ab2ff2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 682267ab2ff2Smrg test "$enable_shared" = yes && enable_static=no 682367ab2ff2Smrg fi 682467ab2ff2Smrg ;; 682567ab2ff2Smrg esac 682667ab2ff2Smrg AC_MSG_RESULT([$enable_shared]) 6827e0963edeSmrg 682867ab2ff2Smrg AC_MSG_CHECKING([whether to build static libraries]) 682967ab2ff2Smrg # Make sure either enable_shared or enable_static is yes. 683067ab2ff2Smrg test "$enable_shared" = yes || enable_static=yes 683167ab2ff2Smrg AC_MSG_RESULT([$enable_static]) 6832f05b35a2Smrg 683367ab2ff2Smrg _LT_CONFIG($1) 683467ab2ff2Smrgfi 683567ab2ff2SmrgAC_LANG_POP 683667ab2ff2SmrgCC="$lt_save_CC" 683767ab2ff2Smrg])# _LT_LANG_C_CONFIG 6838e0963edeSmrg 6839e0963edeSmrg 684067ab2ff2Smrg# _LT_LANG_CXX_CONFIG([TAG]) 684167ab2ff2Smrg# -------------------------- 684267ab2ff2Smrg# Ensure that the configuration variables for a C++ compiler are suitably 684367ab2ff2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 684467ab2ff2Smrg# the compiler configuration to `libtool'. 684567ab2ff2Smrgm4_defun([_LT_LANG_CXX_CONFIG], 684667ab2ff2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 684767ab2ff2Smrgm4_require([_LT_DECL_EGREP])dnl 684867ab2ff2Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 684967ab2ff2Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 685067ab2ff2Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 685167ab2ff2Smrg (test "X$CXX" != "Xg++"))) ; then 685267ab2ff2Smrg AC_PROG_CXXCPP 685367ab2ff2Smrgelse 685467ab2ff2Smrg _lt_caught_CXX_error=yes 685567ab2ff2Smrgfi 685667ab2ff2Smrg 685767ab2ff2SmrgAC_LANG_PUSH(C++) 685867ab2ff2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 685967ab2ff2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 686067ab2ff2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 686167ab2ff2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 686267ab2ff2Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 686367ab2ff2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 686467ab2ff2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 686567ab2ff2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 686667ab2ff2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 686767ab2ff2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 686867ab2ff2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 686967ab2ff2Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 687067ab2ff2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 687167ab2ff2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 687267ab2ff2Smrg_LT_TAGVAR(module_cmds, $1)= 687367ab2ff2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 687467ab2ff2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 687567ab2ff2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 687667ab2ff2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 687767ab2ff2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 687867ab2ff2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 687967ab2ff2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 688067ab2ff2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 688167ab2ff2Smrg 688267ab2ff2Smrg# Source file extension for C++ test sources. 688367ab2ff2Smrgac_ext=cpp 6884f05b35a2Smrg 688567ab2ff2Smrg# Object file extension for compiled C++ test sources. 688667ab2ff2Smrgobjext=o 688767ab2ff2Smrg_LT_TAGVAR(objext, $1)=$objext 6888f05b35a2Smrg 688967ab2ff2Smrg# No sense in running all these tests if we already determined that 689067ab2ff2Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 689167ab2ff2Smrg# are currently assumed to apply to all compilers on this platform, 689267ab2ff2Smrg# and will be corrupted by setting them based on a non-working compiler. 689367ab2ff2Smrgif test "$_lt_caught_CXX_error" != yes; then 689467ab2ff2Smrg # Code to be used in simple compile tests 689567ab2ff2Smrg lt_simple_compile_test_code="int some_variable = 0;" 6896e0963edeSmrg 689767ab2ff2Smrg # Code to be used in simple link tests 689867ab2ff2Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6899e0963edeSmrg 690067ab2ff2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 690167ab2ff2Smrg _LT_TAG_COMPILER 6902e0963edeSmrg 690367ab2ff2Smrg # save warnings/boilerplate of simple test code 690467ab2ff2Smrg _LT_COMPILER_BOILERPLATE 690567ab2ff2Smrg _LT_LINKER_BOILERPLATE 6906e0963edeSmrg 690767ab2ff2Smrg # Allow CC to be a program name with arguments. 690867ab2ff2Smrg lt_save_CC=$CC 690967ab2ff2Smrg lt_save_CFLAGS=$CFLAGS 691067ab2ff2Smrg lt_save_LD=$LD 691167ab2ff2Smrg lt_save_GCC=$GCC 691267ab2ff2Smrg GCC=$GXX 691367ab2ff2Smrg lt_save_with_gnu_ld=$with_gnu_ld 691467ab2ff2Smrg lt_save_path_LD=$lt_cv_path_LD 691567ab2ff2Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 691667ab2ff2Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 691767ab2ff2Smrg else 691867ab2ff2Smrg $as_unset lt_cv_prog_gnu_ld 691967ab2ff2Smrg fi 692067ab2ff2Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 692167ab2ff2Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 692267ab2ff2Smrg else 692367ab2ff2Smrg $as_unset lt_cv_path_LD 692467ab2ff2Smrg fi 692567ab2ff2Smrg test -z "${LDCXX+set}" || LD=$LDCXX 692667ab2ff2Smrg CC=${CXX-"c++"} 692767ab2ff2Smrg CFLAGS=$CXXFLAGS 692867ab2ff2Smrg compiler=$CC 692967ab2ff2Smrg _LT_TAGVAR(compiler, $1)=$CC 693067ab2ff2Smrg _LT_CC_BASENAME([$compiler]) 6931e0963edeSmrg 693267ab2ff2Smrg if test -n "$compiler"; then 693367ab2ff2Smrg # We don't want -fno-exception when compiling C++ code, so set the 693467ab2ff2Smrg # no_builtin_flag separately 693567ab2ff2Smrg if test "$GXX" = yes; then 693667ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 693767ab2ff2Smrg else 693867ab2ff2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 693967ab2ff2Smrg fi 6940e0963edeSmrg 694167ab2ff2Smrg if test "$GXX" = yes; then 694267ab2ff2Smrg # Set up default GNU C++ configuration 6943f05b35a2Smrg 694467ab2ff2Smrg LT_PATH_LD 6945e0963edeSmrg 694667ab2ff2Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 694767ab2ff2Smrg # archiving commands below assume that GNU ld is being used. 694867ab2ff2Smrg if test "$with_gnu_ld" = yes; then 694967ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 695067ab2ff2Smrg _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' 695167ab2ff2Smrg 695267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 695367ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 695467ab2ff2Smrg 695567ab2ff2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 695667ab2ff2Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 695767ab2ff2Smrg # investigate it a little bit more. (MM) 695867ab2ff2Smrg wlarc='${wl}' 695967ab2ff2Smrg 696067ab2ff2Smrg # ancient GNU ld didn't support --whole-archive et. al. 696167ab2ff2Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 696267ab2ff2Smrg $GREP 'no-whole-archive' > /dev/null; then 696367ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 696467ab2ff2Smrg else 696567ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 696667ab2ff2Smrg fi 696749e108a1Smrg else 696867ab2ff2Smrg with_gnu_ld=no 696967ab2ff2Smrg wlarc= 697067ab2ff2Smrg 697167ab2ff2Smrg # A generic and very simple default shared library creation 697267ab2ff2Smrg # command for GNU C++ for the case where it uses the native 697367ab2ff2Smrg # linker, instead of GNU ld. If possible, this setting should 697467ab2ff2Smrg # overridden to take advantage of the native linker features on 697567ab2ff2Smrg # the platform it is being used on. 697667ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 697749e108a1Smrg fi 6978e0963edeSmrg 697967ab2ff2Smrg # Commands to make compiler produce verbose output that lists 698067ab2ff2Smrg # what "hidden" libraries, object files and flags are used when 698167ab2ff2Smrg # linking a shared library. 698267ab2ff2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 698367ab2ff2Smrg 698467ab2ff2Smrg else 698567ab2ff2Smrg GXX=no 698667ab2ff2Smrg with_gnu_ld=no 698767ab2ff2Smrg wlarc= 698849e108a1Smrg fi 6989e0963edeSmrg 699067ab2ff2Smrg # PORTME: fill in a description of your system's C++ link characteristics 699167ab2ff2Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 699267ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 699367ab2ff2Smrg case $host_os in 699467ab2ff2Smrg aix3*) 699567ab2ff2Smrg # FIXME: insert proper C++ library support 699667ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 699767ab2ff2Smrg ;; 699867ab2ff2Smrg aix[[4-9]]*) 699967ab2ff2Smrg if test "$host_cpu" = ia64; then 700067ab2ff2Smrg # On IA64, the linker does run time linking by default, so we don't 700167ab2ff2Smrg # have to do anything special. 700267ab2ff2Smrg aix_use_runtimelinking=no 700367ab2ff2Smrg exp_sym_flag='-Bexport' 700467ab2ff2Smrg no_entry_flag="" 700567ab2ff2Smrg else 700667ab2ff2Smrg aix_use_runtimelinking=no 7007e0963edeSmrg 700867ab2ff2Smrg # Test if we are trying to use run time linking or normal 700967ab2ff2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 701067ab2ff2Smrg # need to do runtime linking. 701167ab2ff2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 701267ab2ff2Smrg for ld_flag in $LDFLAGS; do 701367ab2ff2Smrg case $ld_flag in 701467ab2ff2Smrg *-brtl*) 701567ab2ff2Smrg aix_use_runtimelinking=yes 701667ab2ff2Smrg break 701767ab2ff2Smrg ;; 701867ab2ff2Smrg esac 701967ab2ff2Smrg done 702067ab2ff2Smrg ;; 702167ab2ff2Smrg esac 7022e0963edeSmrg 702367ab2ff2Smrg exp_sym_flag='-bexport' 702467ab2ff2Smrg no_entry_flag='-bnoentry' 702567ab2ff2Smrg fi 7026f05b35a2Smrg 702767ab2ff2Smrg # When large executables or shared objects are built, AIX ld can 702867ab2ff2Smrg # have problems creating the table of contents. If linking a library 702967ab2ff2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 703067ab2ff2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 703167ab2ff2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7032f05b35a2Smrg 703367ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='' 703467ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 703567ab2ff2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 703667ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 703767ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 703867ab2ff2Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7039f05b35a2Smrg 704067ab2ff2Smrg if test "$GXX" = yes; then 704167ab2ff2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 704267ab2ff2Smrg # We only want to do this on AIX 4.2 and lower, the check 704367ab2ff2Smrg # below for broken collect2 doesn't work under 4.3+ 704449e108a1Smrg collect2name=`${CC} -print-prog-name=collect2` 704549e108a1Smrg if test -f "$collect2name" && 704667ab2ff2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 704749e108a1Smrg then 704867ab2ff2Smrg # We have reworked collect2 704967ab2ff2Smrg : 705049e108a1Smrg else 705167ab2ff2Smrg # We have old collect2 705267ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 705367ab2ff2Smrg # It fails to find uninstalled libraries when the uninstalled 705467ab2ff2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 705567ab2ff2Smrg # to unsupported forces relinking 705667ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 705767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 705867ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 705949e108a1Smrg fi 706067ab2ff2Smrg esac 706167ab2ff2Smrg shared_flag='-shared' 706249e108a1Smrg if test "$aix_use_runtimelinking" = yes; then 706367ab2ff2Smrg shared_flag="$shared_flag "'${wl}-G' 706449e108a1Smrg fi 706567ab2ff2Smrg else 706667ab2ff2Smrg # not using gcc 706767ab2ff2Smrg if test "$host_cpu" = ia64; then 706867ab2ff2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 706967ab2ff2Smrg # chokes on -Wl,-G. The following line is correct: 707067ab2ff2Smrg shared_flag='-G' 707167ab2ff2Smrg else 707267ab2ff2Smrg if test "$aix_use_runtimelinking" = yes; then 707367ab2ff2Smrg shared_flag='${wl}-G' 707467ab2ff2Smrg else 707567ab2ff2Smrg shared_flag='${wl}-bM:SRE' 707667ab2ff2Smrg fi 707767ab2ff2Smrg fi 707867ab2ff2Smrg fi 7079f05b35a2Smrg 708067ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 708167ab2ff2Smrg # It seems that -bexpall does not export symbols beginning with 708267ab2ff2Smrg # underscore (_), so it is better to generate a list of symbols to 708367ab2ff2Smrg # export. 708467ab2ff2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 708567ab2ff2Smrg if test "$aix_use_runtimelinking" = yes; then 708667ab2ff2Smrg # Warning - without using the other runtime loading flags (-brtl), 708767ab2ff2Smrg # -berok will link without error, but may produce a broken library. 708867ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 708967ab2ff2Smrg # Determine the default libpath from the value encoded in an empty 709067ab2ff2Smrg # executable. 709167ab2ff2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 709267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7093f05b35a2Smrg 709467ab2ff2Smrg _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" 709567ab2ff2Smrg else 709667ab2ff2Smrg if test "$host_cpu" = ia64; then 709767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 709867ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 709967ab2ff2Smrg _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" 710067ab2ff2Smrg else 710167ab2ff2Smrg # Determine the default libpath from the value encoded in an 710267ab2ff2Smrg # empty executable. 710367ab2ff2Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 710467ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 710567ab2ff2Smrg # Warning - without using the other run time loading flags, 710667ab2ff2Smrg # -berok will link without error, but may produce a broken library. 710767ab2ff2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 710867ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 710967ab2ff2Smrg if test "$with_gnu_ld" = yes; then 711067ab2ff2Smrg # We only use this code for GNU lds that support --whole-archive. 711167ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 711267ab2ff2Smrg else 711367ab2ff2Smrg # Exported symbols can be pulled into shared objects from archives 711467ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 711567ab2ff2Smrg fi 711667ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 711767ab2ff2Smrg # This is similar to how AIX traditionally builds its shared 711867ab2ff2Smrg # libraries. 711967ab2ff2Smrg _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' 712067ab2ff2Smrg fi 712167ab2ff2Smrg fi 712249e108a1Smrg ;; 7123f05b35a2Smrg 712467ab2ff2Smrg beos*) 712567ab2ff2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 712667ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 712767ab2ff2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 712867ab2ff2Smrg # support --undefined. This deserves some investigation. FIXME 712967ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 713067ab2ff2Smrg else 713167ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 713267ab2ff2Smrg fi 713367ab2ff2Smrg ;; 7134e0963edeSmrg 713567ab2ff2Smrg chorus*) 713667ab2ff2Smrg case $cc_basename in 713767ab2ff2Smrg *) 713867ab2ff2Smrg # FIXME: insert proper C++ library support 713967ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 714067ab2ff2Smrg ;; 714167ab2ff2Smrg esac 714267ab2ff2Smrg ;; 7143f05b35a2Smrg 714467ab2ff2Smrg cygwin* | mingw* | pw32* | cegcc*) 714567ab2ff2Smrg case $GXX,$cc_basename in 714667ab2ff2Smrg ,cl* | no,cl*) 714767ab2ff2Smrg # Native MSVC 714867ab2ff2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 714967ab2ff2Smrg # no search path for DLLs. 715067ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 715167ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 715267ab2ff2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 715367ab2ff2Smrg _LT_TAGVAR(file_list_spec, $1)='@' 715467ab2ff2Smrg # Tell ltmain to make .lib files, not .a files. 715567ab2ff2Smrg libext=lib 715667ab2ff2Smrg # Tell ltmain to make .dll files, not .so files. 715767ab2ff2Smrg shrext_cmds=".dll" 715867ab2ff2Smrg # FIXME: Setting linknames here is a bad hack. 715967ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 716067ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 716167ab2ff2Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 716267ab2ff2Smrg else 716367ab2ff2Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 716467ab2ff2Smrg fi~ 716567ab2ff2Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 716667ab2ff2Smrg linknames=' 716767ab2ff2Smrg # The linker will not automatically build a static lib if we build a DLL. 716867ab2ff2Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 716967ab2ff2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 717067ab2ff2Smrg # Don't use ranlib 717167ab2ff2Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 717267ab2ff2Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 717367ab2ff2Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 717467ab2ff2Smrg case $lt_outputfile in 717567ab2ff2Smrg *.exe|*.EXE) ;; 717667ab2ff2Smrg *) 717767ab2ff2Smrg lt_outputfile="$lt_outputfile.exe" 717867ab2ff2Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 717967ab2ff2Smrg ;; 718067ab2ff2Smrg esac~ 718167ab2ff2Smrg func_to_tool_file "$lt_outputfile"~ 718267ab2ff2Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 718367ab2ff2Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 718467ab2ff2Smrg $RM "$lt_outputfile.manifest"; 718567ab2ff2Smrg fi' 718667ab2ff2Smrg ;; 718767ab2ff2Smrg *) 718867ab2ff2Smrg # g++ 718967ab2ff2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 719067ab2ff2Smrg # as there is no search path for DLLs. 719167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 719267ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 719367ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 719467ab2ff2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 719567ab2ff2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 719667ab2ff2Smrg 719767ab2ff2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 719867ab2ff2Smrg _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' 719967ab2ff2Smrg # If the export-symbols file already is a .def file (1st line 720067ab2ff2Smrg # is EXPORTS), use it as is; otherwise, prepend... 720167ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 720267ab2ff2Smrg cp $export_symbols $output_objdir/$soname.def; 720367ab2ff2Smrg else 720467ab2ff2Smrg echo EXPORTS > $output_objdir/$soname.def; 720567ab2ff2Smrg cat $export_symbols >> $output_objdir/$soname.def; 720667ab2ff2Smrg fi~ 720767ab2ff2Smrg $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' 720867ab2ff2Smrg else 720967ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 721067ab2ff2Smrg fi 721167ab2ff2Smrg ;; 721267ab2ff2Smrg esac 721367ab2ff2Smrg ;; 721467ab2ff2Smrg darwin* | rhapsody*) 721567ab2ff2Smrg _LT_DARWIN_LINKER_FEATURES($1) 721667ab2ff2Smrg ;; 7217f05b35a2Smrg 721867ab2ff2Smrg dgux*) 721967ab2ff2Smrg case $cc_basename in 722067ab2ff2Smrg ec++*) 722167ab2ff2Smrg # FIXME: insert proper C++ library support 722267ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 722367ab2ff2Smrg ;; 722467ab2ff2Smrg ghcx*) 722567ab2ff2Smrg # Green Hills C++ Compiler 722667ab2ff2Smrg # FIXME: insert proper C++ library support 722767ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 722867ab2ff2Smrg ;; 722967ab2ff2Smrg *) 723067ab2ff2Smrg # FIXME: insert proper C++ library support 723167ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723267ab2ff2Smrg ;; 723367ab2ff2Smrg esac 723467ab2ff2Smrg ;; 7235e0963edeSmrg 7236e494fffdSmrg freebsd2.*) 723767ab2ff2Smrg # C++ shared libraries reported to be fairly broken before 723867ab2ff2Smrg # switch to ELF 723967ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 724067ab2ff2Smrg ;; 7241e0963edeSmrg 724267ab2ff2Smrg freebsd-elf*) 724367ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 724467ab2ff2Smrg ;; 7245e0963edeSmrg 724667ab2ff2Smrg freebsd* | dragonfly*) 724767ab2ff2Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 724867ab2ff2Smrg # conventions 724967ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 725067ab2ff2Smrg ;; 7251f05b35a2Smrg 725267ab2ff2Smrg gnu*) 725367ab2ff2Smrg ;; 7254f05b35a2Smrg 725567ab2ff2Smrg haiku*) 725667ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 725767ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 725867ab2ff2Smrg ;; 7259f05b35a2Smrg 726067ab2ff2Smrg hpux9*) 726167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 726267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 726367ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 726467ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 726567ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 726667ab2ff2Smrg # but as the default 726767ab2ff2Smrg # location of the library. 7268f05b35a2Smrg 726967ab2ff2Smrg case $cc_basename in 727067ab2ff2Smrg CC*) 727167ab2ff2Smrg # FIXME: insert proper C++ library support 727267ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 727367ab2ff2Smrg ;; 727467ab2ff2Smrg aCC*) 727567ab2ff2Smrg _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' 727667ab2ff2Smrg # Commands to make compiler produce verbose output that lists 727767ab2ff2Smrg # what "hidden" libraries, object files and flags are used when 727867ab2ff2Smrg # linking a shared library. 727967ab2ff2Smrg # 728067ab2ff2Smrg # There doesn't appear to be a way to prevent this compiler from 728167ab2ff2Smrg # explicitly linking system object files so we need to strip them 728267ab2ff2Smrg # from the output so that they don't get included in the library 728367ab2ff2Smrg # dependencies. 728467ab2ff2Smrg 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"' 728567ab2ff2Smrg ;; 728667ab2ff2Smrg *) 728767ab2ff2Smrg if test "$GXX" = yes; then 728867ab2ff2Smrg _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' 728967ab2ff2Smrg else 729067ab2ff2Smrg # FIXME: insert proper C++ library support 729167ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 729267ab2ff2Smrg fi 729367ab2ff2Smrg ;; 729467ab2ff2Smrg esac 729567ab2ff2Smrg ;; 7296f05b35a2Smrg 729767ab2ff2Smrg hpux10*|hpux11*) 729867ab2ff2Smrg if test $with_gnu_ld = no; then 729967ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 730067ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7301f05b35a2Smrg 730267ab2ff2Smrg case $host_cpu in 730367ab2ff2Smrg hppa*64*|ia64*) 730467ab2ff2Smrg ;; 730567ab2ff2Smrg *) 730667ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 730767ab2ff2Smrg ;; 730867ab2ff2Smrg esac 730967ab2ff2Smrg fi 731067ab2ff2Smrg case $host_cpu in 731167ab2ff2Smrg hppa*64*|ia64*) 731267ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 731367ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 731467ab2ff2Smrg ;; 731567ab2ff2Smrg *) 731667ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 731767ab2ff2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 731867ab2ff2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 731967ab2ff2Smrg # but as the default 732067ab2ff2Smrg # location of the library. 732167ab2ff2Smrg ;; 732267ab2ff2Smrg esac 7323f05b35a2Smrg 732467ab2ff2Smrg case $cc_basename in 732567ab2ff2Smrg CC*) 732667ab2ff2Smrg # FIXME: insert proper C++ library support 732767ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 732867ab2ff2Smrg ;; 732967ab2ff2Smrg aCC*) 733067ab2ff2Smrg case $host_cpu in 733167ab2ff2Smrg hppa*64*) 733267ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 733367ab2ff2Smrg ;; 733467ab2ff2Smrg ia64*) 733567ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 733667ab2ff2Smrg ;; 733767ab2ff2Smrg *) 733867ab2ff2Smrg _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' 733967ab2ff2Smrg ;; 734067ab2ff2Smrg esac 734167ab2ff2Smrg # Commands to make compiler produce verbose output that lists 734267ab2ff2Smrg # what "hidden" libraries, object files and flags are used when 734367ab2ff2Smrg # linking a shared library. 734467ab2ff2Smrg # 734567ab2ff2Smrg # There doesn't appear to be a way to prevent this compiler from 734667ab2ff2Smrg # explicitly linking system object files so we need to strip them 734767ab2ff2Smrg # from the output so that they don't get included in the library 734867ab2ff2Smrg # dependencies. 734967ab2ff2Smrg 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"' 735067ab2ff2Smrg ;; 735167ab2ff2Smrg *) 735267ab2ff2Smrg if test "$GXX" = yes; then 735367ab2ff2Smrg if test $with_gnu_ld = no; then 735467ab2ff2Smrg case $host_cpu in 735567ab2ff2Smrg hppa*64*) 735667ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 735767ab2ff2Smrg ;; 735867ab2ff2Smrg ia64*) 735967ab2ff2Smrg _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' 736067ab2ff2Smrg ;; 736167ab2ff2Smrg *) 736267ab2ff2Smrg _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' 736367ab2ff2Smrg ;; 736467ab2ff2Smrg esac 736567ab2ff2Smrg fi 736667ab2ff2Smrg else 736767ab2ff2Smrg # FIXME: insert proper C++ library support 736867ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 736967ab2ff2Smrg fi 737067ab2ff2Smrg ;; 737167ab2ff2Smrg esac 737267ab2ff2Smrg ;; 7373e0963edeSmrg 737467ab2ff2Smrg interix[[3-9]]*) 737567ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 737667ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 737767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 737867ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 737967ab2ff2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 738067ab2ff2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 738167ab2ff2Smrg # default) and relocated if they conflict, which is a slow very memory 738267ab2ff2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 738367ab2ff2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 738467ab2ff2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 738567ab2ff2Smrg _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' 738667ab2ff2Smrg _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' 738767ab2ff2Smrg ;; 738867ab2ff2Smrg irix5* | irix6*) 738967ab2ff2Smrg case $cc_basename in 739067ab2ff2Smrg CC*) 739167ab2ff2Smrg # SGI C++ 739267ab2ff2Smrg _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' 7393f05b35a2Smrg 739467ab2ff2Smrg # Archives containing C++ object files must be created using 739567ab2ff2Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 739667ab2ff2Smrg # necessary to make sure instantiated templates are included 739767ab2ff2Smrg # in the archive. 739867ab2ff2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 739967ab2ff2Smrg ;; 740067ab2ff2Smrg *) 740167ab2ff2Smrg if test "$GXX" = yes; then 740267ab2ff2Smrg if test "$with_gnu_ld" = no; then 740367ab2ff2Smrg _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' 740467ab2ff2Smrg else 740567ab2ff2Smrg _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' 740667ab2ff2Smrg fi 740767ab2ff2Smrg fi 740867ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 740967ab2ff2Smrg ;; 741067ab2ff2Smrg esac 741167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 741267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 741367ab2ff2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 741467ab2ff2Smrg ;; 7415f05b35a2Smrg 741667ab2ff2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 741767ab2ff2Smrg case $cc_basename in 741867ab2ff2Smrg KCC*) 741967ab2ff2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7420f05b35a2Smrg 742167ab2ff2Smrg # KCC will only create a shared library if the output file 742267ab2ff2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 742367ab2ff2Smrg # to its proper name (with version) after linking. 742467ab2ff2Smrg _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' 742567ab2ff2Smrg _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' 742667ab2ff2Smrg # Commands to make compiler produce verbose output that lists 742767ab2ff2Smrg # what "hidden" libraries, object files and flags are used when 742867ab2ff2Smrg # linking a shared library. 742967ab2ff2Smrg # 743067ab2ff2Smrg # There doesn't appear to be a way to prevent this compiler from 743167ab2ff2Smrg # explicitly linking system object files so we need to strip them 743267ab2ff2Smrg # from the output so that they don't get included in the library 743367ab2ff2Smrg # dependencies. 743467ab2ff2Smrg 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"' 7435f05b35a2Smrg 743667ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 743767ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7438f05b35a2Smrg 743967ab2ff2Smrg # Archives containing C++ object files must be created using 744067ab2ff2Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 744167ab2ff2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 744267ab2ff2Smrg ;; 744367ab2ff2Smrg icpc* | ecpc* ) 744467ab2ff2Smrg # Intel C++ 744567ab2ff2Smrg with_gnu_ld=yes 744667ab2ff2Smrg # version 8.0 and above of icpc choke on multiply defined symbols 744767ab2ff2Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 744867ab2ff2Smrg # earlier do not add the objects themselves. 744967ab2ff2Smrg case `$CC -V 2>&1` in 745067ab2ff2Smrg *"Version 7."*) 745167ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 745267ab2ff2Smrg _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' 745367ab2ff2Smrg ;; 745467ab2ff2Smrg *) # Version 8.0 or newer 745567ab2ff2Smrg tmp_idyn= 745667ab2ff2Smrg case $host_cpu in 745767ab2ff2Smrg ia64*) tmp_idyn=' -i_dynamic';; 745867ab2ff2Smrg esac 745967ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 746067ab2ff2Smrg _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' 746167ab2ff2Smrg ;; 746267ab2ff2Smrg esac 746367ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 746467ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 746567ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 746667ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 746767ab2ff2Smrg ;; 746867ab2ff2Smrg pgCC* | pgcpp*) 746967ab2ff2Smrg # Portland Group C++ compiler 747067ab2ff2Smrg case `$CC -V` in 747167ab2ff2Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 747267ab2ff2Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 747367ab2ff2Smrg rm -rf $tpldir~ 747467ab2ff2Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 747567ab2ff2Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 747667ab2ff2Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 747767ab2ff2Smrg rm -rf $tpldir~ 747867ab2ff2Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 747967ab2ff2Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 748067ab2ff2Smrg $RANLIB $oldlib' 748167ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 748267ab2ff2Smrg rm -rf $tpldir~ 748367ab2ff2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 748467ab2ff2Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 748567ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 748667ab2ff2Smrg rm -rf $tpldir~ 748767ab2ff2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 748867ab2ff2Smrg $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' 748967ab2ff2Smrg ;; 749067ab2ff2Smrg *) # Version 6 and above use weak symbols 749167ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 749267ab2ff2Smrg _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' 749367ab2ff2Smrg ;; 749467ab2ff2Smrg esac 7495f05b35a2Smrg 749667ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 749767ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 749867ab2ff2Smrg _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' 749967ab2ff2Smrg ;; 750067ab2ff2Smrg cxx*) 750167ab2ff2Smrg # Compaq C++ 750267ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 750367ab2ff2Smrg _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' 7504f05b35a2Smrg 750567ab2ff2Smrg runpath_var=LD_RUN_PATH 750667ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 750767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7508f05b35a2Smrg 750967ab2ff2Smrg # Commands to make compiler produce verbose output that lists 751067ab2ff2Smrg # what "hidden" libraries, object files and flags are used when 751167ab2ff2Smrg # linking a shared library. 751267ab2ff2Smrg # 751367ab2ff2Smrg # There doesn't appear to be a way to prevent this compiler from 751467ab2ff2Smrg # explicitly linking system object files so we need to strip them 751567ab2ff2Smrg # from the output so that they don't get included in the library 751667ab2ff2Smrg # dependencies. 751767ab2ff2Smrg 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' 751867ab2ff2Smrg ;; 751967ab2ff2Smrg xl* | mpixl* | bgxl*) 752067ab2ff2Smrg # IBM XL 8.0 on PPC, with GNU ld 752167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 752267ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 752367ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 752467ab2ff2Smrg if test "x$supports_anon_versioning" = xyes; then 752567ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 752667ab2ff2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 752767ab2ff2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 752867ab2ff2Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 752967ab2ff2Smrg fi 753067ab2ff2Smrg ;; 753167ab2ff2Smrg *) 753267ab2ff2Smrg case `$CC -V 2>&1 | sed 5q` in 753367ab2ff2Smrg *Sun\ C*) 753467ab2ff2Smrg # Sun C++ 5.9 753567ab2ff2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 753667ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 753767ab2ff2Smrg _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' 753867ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 753967ab2ff2Smrg _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' 754067ab2ff2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 754167ab2ff2Smrg 754267ab2ff2Smrg # Not sure whether something based on 754367ab2ff2Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 754467ab2ff2Smrg # would be better. 754567ab2ff2Smrg output_verbose_link_cmd='func_echo_all' 7546f05b35a2Smrg 754767ab2ff2Smrg # Archives containing C++ object files must be created using 754867ab2ff2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 754967ab2ff2Smrg # necessary to make sure instantiated templates are included 755067ab2ff2Smrg # in the archive. 755167ab2ff2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 755267ab2ff2Smrg ;; 755367ab2ff2Smrg esac 755467ab2ff2Smrg ;; 755549e108a1Smrg esac 755649e108a1Smrg ;; 7557e0963edeSmrg 755867ab2ff2Smrg lynxos*) 755967ab2ff2Smrg # FIXME: insert proper C++ library support 756067ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 756149e108a1Smrg ;; 7562e0963edeSmrg 756367ab2ff2Smrg m88k*) 756467ab2ff2Smrg # FIXME: insert proper C++ library support 756567ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 756667ab2ff2Smrg ;; 7567e0963edeSmrg 756867ab2ff2Smrg mvs*) 756967ab2ff2Smrg case $cc_basename in 757067ab2ff2Smrg cxx*) 757167ab2ff2Smrg # FIXME: insert proper C++ library support 757267ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 757367ab2ff2Smrg ;; 757467ab2ff2Smrg *) 757567ab2ff2Smrg # FIXME: insert proper C++ library support 757667ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 757767ab2ff2Smrg ;; 757867ab2ff2Smrg esac 757967ab2ff2Smrg ;; 7580e0963edeSmrg 758167ab2ff2Smrg netbsd*) 758267ab2ff2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 758367ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 758467ab2ff2Smrg wlarc= 758567ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 758667ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 758767ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 758867ab2ff2Smrg fi 758967ab2ff2Smrg # Workaround some broken pre-1.5 toolchains 759067ab2ff2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 759167ab2ff2Smrg ;; 7592e0963edeSmrg 759367ab2ff2Smrg *nto* | *qnx*) 759467ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 759567ab2ff2Smrg ;; 7596e0963edeSmrg 759767ab2ff2Smrg openbsd2*) 759867ab2ff2Smrg # C++ shared libraries are fairly broken 759967ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 760067ab2ff2Smrg ;; 7601f05b35a2Smrg 760267ab2ff2Smrg openbsd*) 760367ab2ff2Smrg if test -f /usr/libexec/ld.so; then 760467ab2ff2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 760567ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 760667ab2ff2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 760767ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 760867ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 760967ab2ff2Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 761067ab2ff2Smrg _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' 761167ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 761267ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 761367ab2ff2Smrg fi 761467ab2ff2Smrg output_verbose_link_cmd=func_echo_all 761567ab2ff2Smrg else 761667ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 761767ab2ff2Smrg fi 761849e108a1Smrg ;; 7619f05b35a2Smrg 762067ab2ff2Smrg osf3* | osf4* | osf5*) 762167ab2ff2Smrg case $cc_basename in 762267ab2ff2Smrg KCC*) 762367ab2ff2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7624f05b35a2Smrg 762567ab2ff2Smrg # KCC will only create a shared library if the output file 762667ab2ff2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 762767ab2ff2Smrg # to its proper name (with version) after linking. 762867ab2ff2Smrg _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' 7629f05b35a2Smrg 763067ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 763167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 763267ab2ff2Smrg 763367ab2ff2Smrg # Archives containing C++ object files must be created using 763467ab2ff2Smrg # the KAI C++ compiler. 763567ab2ff2Smrg case $host in 763667ab2ff2Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 763767ab2ff2Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 763867ab2ff2Smrg esac 763967ab2ff2Smrg ;; 764067ab2ff2Smrg RCC*) 764167ab2ff2Smrg # Rational C++ 2.4.1 764267ab2ff2Smrg # FIXME: insert proper C++ library support 764367ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 764467ab2ff2Smrg ;; 764567ab2ff2Smrg cxx*) 764667ab2ff2Smrg case $host in 764767ab2ff2Smrg osf3*) 764867ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 764967ab2ff2Smrg _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' 765067ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 765167ab2ff2Smrg ;; 765267ab2ff2Smrg *) 765367ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 765467ab2ff2Smrg _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' 765567ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 765667ab2ff2Smrg echo "-hidden">> $lib.exp~ 765767ab2ff2Smrg $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~ 765867ab2ff2Smrg $RM $lib.exp' 765967ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 766067ab2ff2Smrg ;; 766167ab2ff2Smrg esac 7662f05b35a2Smrg 766367ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 766449e108a1Smrg 766567ab2ff2Smrg # Commands to make compiler produce verbose output that lists 766667ab2ff2Smrg # what "hidden" libraries, object files and flags are used when 766767ab2ff2Smrg # linking a shared library. 766867ab2ff2Smrg # 766967ab2ff2Smrg # There doesn't appear to be a way to prevent this compiler from 767067ab2ff2Smrg # explicitly linking system object files so we need to strip them 767167ab2ff2Smrg # from the output so that they don't get included in the library 767267ab2ff2Smrg # dependencies. 767367ab2ff2Smrg 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"' 767467ab2ff2Smrg ;; 767567ab2ff2Smrg *) 767667ab2ff2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 767767ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 767867ab2ff2Smrg case $host in 767967ab2ff2Smrg osf3*) 768067ab2ff2Smrg _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' 768167ab2ff2Smrg ;; 768267ab2ff2Smrg *) 768367ab2ff2Smrg _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' 768467ab2ff2Smrg ;; 768567ab2ff2Smrg esac 7686f05b35a2Smrg 768767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 768867ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7689f05b35a2Smrg 769067ab2ff2Smrg # Commands to make compiler produce verbose output that lists 769167ab2ff2Smrg # what "hidden" libraries, object files and flags are used when 769267ab2ff2Smrg # linking a shared library. 769367ab2ff2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7694f05b35a2Smrg 769567ab2ff2Smrg else 769667ab2ff2Smrg # FIXME: insert proper C++ library support 769767ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 769867ab2ff2Smrg fi 769967ab2ff2Smrg ;; 770067ab2ff2Smrg esac 770167ab2ff2Smrg ;; 7702f05b35a2Smrg 770367ab2ff2Smrg psos*) 770467ab2ff2Smrg # FIXME: insert proper C++ library support 770567ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 770667ab2ff2Smrg ;; 7707f05b35a2Smrg 770867ab2ff2Smrg sunos4*) 770967ab2ff2Smrg case $cc_basename in 771067ab2ff2Smrg CC*) 771167ab2ff2Smrg # Sun C++ 4.x 771267ab2ff2Smrg # FIXME: insert proper C++ library support 771367ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 771467ab2ff2Smrg ;; 771567ab2ff2Smrg lcc*) 771667ab2ff2Smrg # Lucid 771767ab2ff2Smrg # FIXME: insert proper C++ library support 771867ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 771967ab2ff2Smrg ;; 772067ab2ff2Smrg *) 772167ab2ff2Smrg # FIXME: insert proper C++ library support 772267ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 772367ab2ff2Smrg ;; 772467ab2ff2Smrg esac 772567ab2ff2Smrg ;; 7726f05b35a2Smrg 772767ab2ff2Smrg solaris*) 772867ab2ff2Smrg case $cc_basename in 772967ab2ff2Smrg CC* | sunCC*) 773067ab2ff2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 773167ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 773267ab2ff2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 773367ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 773467ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 773567ab2ff2Smrg $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' 7736f05b35a2Smrg 773767ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 773867ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 773967ab2ff2Smrg case $host_os in 774067ab2ff2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 774167ab2ff2Smrg *) 774267ab2ff2Smrg # The compiler driver will combine and reorder linker options, 774367ab2ff2Smrg # but understands `-z linker_flag'. 774467ab2ff2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 774567ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 774667ab2ff2Smrg ;; 774767ab2ff2Smrg esac 774867ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7749f05b35a2Smrg 775067ab2ff2Smrg output_verbose_link_cmd='func_echo_all' 7751f05b35a2Smrg 775267ab2ff2Smrg # Archives containing C++ object files must be created using 775367ab2ff2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 775467ab2ff2Smrg # necessary to make sure instantiated templates are included 775567ab2ff2Smrg # in the archive. 775667ab2ff2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 775767ab2ff2Smrg ;; 775867ab2ff2Smrg gcx*) 775967ab2ff2Smrg # Green Hills C++ Compiler 776067ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7761f05b35a2Smrg 776267ab2ff2Smrg # The C++ compiler must be used to create the archive. 776367ab2ff2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 776467ab2ff2Smrg ;; 776567ab2ff2Smrg *) 776667ab2ff2Smrg # GNU C++ compiler with Solaris linker 776767ab2ff2Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 776867ab2ff2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 776967ab2ff2Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 777067ab2ff2Smrg _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' 777167ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 777267ab2ff2Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 777367ab2ff2Smrg 777467ab2ff2Smrg # Commands to make compiler produce verbose output that lists 777567ab2ff2Smrg # what "hidden" libraries, object files and flags are used when 777667ab2ff2Smrg # linking a shared library. 777767ab2ff2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 777867ab2ff2Smrg else 777967ab2ff2Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 778067ab2ff2Smrg # platform. 778167ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 778267ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 778367ab2ff2Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7784e0963edeSmrg 778567ab2ff2Smrg # Commands to make compiler produce verbose output that lists 778667ab2ff2Smrg # what "hidden" libraries, object files and flags are used when 778767ab2ff2Smrg # linking a shared library. 778867ab2ff2Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 778967ab2ff2Smrg fi 7790f05b35a2Smrg 779167ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 779267ab2ff2Smrg case $host_os in 779367ab2ff2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 779467ab2ff2Smrg *) 779567ab2ff2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 779667ab2ff2Smrg ;; 779767ab2ff2Smrg esac 779867ab2ff2Smrg fi 779967ab2ff2Smrg ;; 780067ab2ff2Smrg esac 780167ab2ff2Smrg ;; 7802e0963edeSmrg 780367ab2ff2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 780467ab2ff2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 780567ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 780667ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 780767ab2ff2Smrg runpath_var='LD_RUN_PATH' 7808f05b35a2Smrg 780967ab2ff2Smrg case $cc_basename in 781067ab2ff2Smrg CC*) 781167ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781267ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781367ab2ff2Smrg ;; 781467ab2ff2Smrg *) 781567ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781667ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 781767ab2ff2Smrg ;; 781867ab2ff2Smrg esac 781967ab2ff2Smrg ;; 7820f05b35a2Smrg 782167ab2ff2Smrg sysv5* | sco3.2v5* | sco5v6*) 782267ab2ff2Smrg # Note: We can NOT use -z defs as we might desire, because we do not 782367ab2ff2Smrg # link with -lc, and that would cause any symbols used from libc to 782467ab2ff2Smrg # always be unresolved, which means just about no library would 782567ab2ff2Smrg # ever link correctly. If we're not using GNU ld we use -z text 782667ab2ff2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 782767ab2ff2Smrg # as -z defs. 782867ab2ff2Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 782967ab2ff2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 783067ab2ff2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 783167ab2ff2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 783267ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 783367ab2ff2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 783467ab2ff2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 783567ab2ff2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 783667ab2ff2Smrg runpath_var='LD_RUN_PATH' 7837f05b35a2Smrg 783867ab2ff2Smrg case $cc_basename in 783967ab2ff2Smrg CC*) 784067ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 784167ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 784267ab2ff2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 784367ab2ff2Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 784467ab2ff2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 784567ab2ff2Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 784667ab2ff2Smrg ;; 784767ab2ff2Smrg *) 784867ab2ff2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 784967ab2ff2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 785067ab2ff2Smrg ;; 785167ab2ff2Smrg esac 785267ab2ff2Smrg ;; 7853f05b35a2Smrg 785467ab2ff2Smrg tandem*) 785567ab2ff2Smrg case $cc_basename in 785667ab2ff2Smrg NCC*) 785767ab2ff2Smrg # NonStop-UX NCC 3.20 785867ab2ff2Smrg # FIXME: insert proper C++ library support 785967ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 786067ab2ff2Smrg ;; 786167ab2ff2Smrg *) 786267ab2ff2Smrg # FIXME: insert proper C++ library support 786367ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 786467ab2ff2Smrg ;; 786567ab2ff2Smrg esac 786667ab2ff2Smrg ;; 7867f05b35a2Smrg 786867ab2ff2Smrg vxworks*) 786967ab2ff2Smrg # FIXME: insert proper C++ library support 787067ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 787167ab2ff2Smrg ;; 7872f05b35a2Smrg 787367ab2ff2Smrg *) 787467ab2ff2Smrg # FIXME: insert proper C++ library support 787567ab2ff2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 787667ab2ff2Smrg ;; 787767ab2ff2Smrg esac 7878f05b35a2Smrg 787967ab2ff2Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 788067ab2ff2Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7881f05b35a2Smrg 788267ab2ff2Smrg _LT_TAGVAR(GCC, $1)="$GXX" 788367ab2ff2Smrg _LT_TAGVAR(LD, $1)="$LD" 7884f05b35a2Smrg 788567ab2ff2Smrg ## CAVEAT EMPTOR: 788667ab2ff2Smrg ## There is no encapsulation within the following macros, do not change 788767ab2ff2Smrg ## the running order or otherwise move them around unless you know exactly 788867ab2ff2Smrg ## what you are doing... 788967ab2ff2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 789067ab2ff2Smrg _LT_COMPILER_PIC($1) 789167ab2ff2Smrg _LT_COMPILER_C_O($1) 789267ab2ff2Smrg _LT_COMPILER_FILE_LOCKS($1) 789367ab2ff2Smrg _LT_LINKER_SHLIBS($1) 789467ab2ff2Smrg _LT_SYS_DYNAMIC_LINKER($1) 789567ab2ff2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7896f05b35a2Smrg 789767ab2ff2Smrg _LT_CONFIG($1) 789867ab2ff2Smrg fi # test -n "$compiler" 7899f05b35a2Smrg 790067ab2ff2Smrg CC=$lt_save_CC 790167ab2ff2Smrg CFLAGS=$lt_save_CFLAGS 790267ab2ff2Smrg LDCXX=$LD 790367ab2ff2Smrg LD=$lt_save_LD 790467ab2ff2Smrg GCC=$lt_save_GCC 790567ab2ff2Smrg with_gnu_ld=$lt_save_with_gnu_ld 790667ab2ff2Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 790767ab2ff2Smrg lt_cv_path_LD=$lt_save_path_LD 790867ab2ff2Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 790967ab2ff2Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 791067ab2ff2Smrgfi # test "$_lt_caught_CXX_error" != yes 7911f05b35a2Smrg 791267ab2ff2SmrgAC_LANG_POP 791367ab2ff2Smrg])# _LT_LANG_CXX_CONFIG 7914f05b35a2Smrg 7915e0963edeSmrg 791667ab2ff2Smrg# _LT_FUNC_STRIPNAME_CNF 791767ab2ff2Smrg# ---------------------- 791867ab2ff2Smrg# func_stripname_cnf prefix suffix name 791967ab2ff2Smrg# strip PREFIX and SUFFIX off of NAME. 792067ab2ff2Smrg# PREFIX and SUFFIX must not contain globbing or regex special 792167ab2ff2Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 792267ab2ff2Smrg# dot (in which case that matches only a dot). 792367ab2ff2Smrg# 792467ab2ff2Smrg# This function is identical to the (non-XSI) version of func_stripname, 792567ab2ff2Smrg# except this one can be used by m4 code that may be executed by configure, 792667ab2ff2Smrg# rather than the libtool script. 792767ab2ff2Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 792867ab2ff2SmrgAC_REQUIRE([_LT_DECL_SED]) 792967ab2ff2SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 793067ab2ff2Smrgfunc_stripname_cnf () 793167ab2ff2Smrg{ 793267ab2ff2Smrg case ${2} in 793367ab2ff2Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 793467ab2ff2Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 793567ab2ff2Smrg esac 793667ab2ff2Smrg} # func_stripname_cnf 793767ab2ff2Smrg])# _LT_FUNC_STRIPNAME_CNF 793867ab2ff2Smrg 793967ab2ff2Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 794067ab2ff2Smrg# --------------------------------- 794167ab2ff2Smrg# Figure out "hidden" library dependencies from verbose 794267ab2ff2Smrg# compiler output when linking a shared library. 794367ab2ff2Smrg# Parse the compiler output and extract the necessary 794467ab2ff2Smrg# objects, libraries and library flags. 794567ab2ff2Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 794667ab2ff2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 794767ab2ff2SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 794867ab2ff2Smrg# Dependencies to place before and after the object being linked: 794967ab2ff2Smrg_LT_TAGVAR(predep_objects, $1)= 795067ab2ff2Smrg_LT_TAGVAR(postdep_objects, $1)= 795167ab2ff2Smrg_LT_TAGVAR(predeps, $1)= 795267ab2ff2Smrg_LT_TAGVAR(postdeps, $1)= 795367ab2ff2Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7954e0963edeSmrg 795567ab2ff2Smrgdnl we can't use the lt_simple_compile_test_code here, 795667ab2ff2Smrgdnl because it contains code intended for an executable, 795767ab2ff2Smrgdnl not a library. It's possible we should let each 795867ab2ff2Smrgdnl tag define a new lt_????_link_test_code variable, 795967ab2ff2Smrgdnl but it's only used here... 796067ab2ff2Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 796167ab2ff2Smrgint a; 796267ab2ff2Smrgvoid foo (void) { a = 0; } 796367ab2ff2Smrg_LT_EOF 796467ab2ff2Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 796567ab2ff2Smrgclass Foo 796667ab2ff2Smrg{ 796767ab2ff2Smrgpublic: 796867ab2ff2Smrg Foo (void) { a = 0; } 796967ab2ff2Smrgprivate: 797067ab2ff2Smrg int a; 797167ab2ff2Smrg}; 797267ab2ff2Smrg_LT_EOF 797367ab2ff2Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 797467ab2ff2Smrg subroutine foo 797567ab2ff2Smrg implicit none 797667ab2ff2Smrg integer*4 a 797767ab2ff2Smrg a=0 797867ab2ff2Smrg return 797967ab2ff2Smrg end 798067ab2ff2Smrg_LT_EOF 798167ab2ff2Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 798267ab2ff2Smrg subroutine foo 798367ab2ff2Smrg implicit none 798467ab2ff2Smrg integer a 798567ab2ff2Smrg a=0 798667ab2ff2Smrg return 798767ab2ff2Smrg end 798867ab2ff2Smrg_LT_EOF 798967ab2ff2Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 799067ab2ff2Smrgpublic class foo { 799167ab2ff2Smrg private int a; 799267ab2ff2Smrg public void bar (void) { 799367ab2ff2Smrg a = 0; 799467ab2ff2Smrg } 799567ab2ff2Smrg}; 799667ab2ff2Smrg_LT_EOF 7997e494fffdSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7998e494fffdSmrgpackage foo 7999e494fffdSmrgfunc foo() { 8000e494fffdSmrg} 8001e494fffdSmrg_LT_EOF 800267ab2ff2Smrg]) 8003e0963edeSmrg 800467ab2ff2Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 800567ab2ff2Smrgcase "$CC $CFLAGS " in #( 800667ab2ff2Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 800767ab2ff2Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8008e494fffdSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 800967ab2ff2Smrgesac 8010e0963edeSmrg 801167ab2ff2Smrgdnl Parse the compiler output and extract the necessary 801267ab2ff2Smrgdnl objects, libraries and library flags. 801367ab2ff2Smrgif AC_TRY_EVAL(ac_compile); then 801467ab2ff2Smrg # Parse the compiler output and extract the necessary 801567ab2ff2Smrg # objects, libraries and library flags. 8016e0963edeSmrg 801767ab2ff2Smrg # Sentinel used to keep track of whether or not we are before 801867ab2ff2Smrg # the conftest object file. 801967ab2ff2Smrg pre_test_object_deps_done=no 8020e0963edeSmrg 802167ab2ff2Smrg for p in `eval "$output_verbose_link_cmd"`; do 802267ab2ff2Smrg case ${prev}${p} in 8023e0963edeSmrg 802467ab2ff2Smrg -L* | -R* | -l*) 802567ab2ff2Smrg # Some compilers place space between "-{L,R}" and the path. 802667ab2ff2Smrg # Remove the space. 802767ab2ff2Smrg if test $p = "-L" || 802867ab2ff2Smrg test $p = "-R"; then 802967ab2ff2Smrg prev=$p 803067ab2ff2Smrg continue 803167ab2ff2Smrg fi 8032e0963edeSmrg 803367ab2ff2Smrg # Expand the sysroot to ease extracting the directories later. 803467ab2ff2Smrg if test -z "$prev"; then 803567ab2ff2Smrg case $p in 803667ab2ff2Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 803767ab2ff2Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 803867ab2ff2Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 803967ab2ff2Smrg esac 804067ab2ff2Smrg fi 804167ab2ff2Smrg case $p in 804267ab2ff2Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 804367ab2ff2Smrg esac 804467ab2ff2Smrg if test "$pre_test_object_deps_done" = no; then 804567ab2ff2Smrg case ${prev} in 804667ab2ff2Smrg -L | -R) 804767ab2ff2Smrg # Internal compiler library paths should come after those 804867ab2ff2Smrg # provided the user. The postdeps already come after the 804967ab2ff2Smrg # user supplied libs so there is no need to process them. 805067ab2ff2Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 805167ab2ff2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 805267ab2ff2Smrg else 805367ab2ff2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 805467ab2ff2Smrg fi 805567ab2ff2Smrg ;; 805667ab2ff2Smrg # The "-l" case would never come before the object being 805767ab2ff2Smrg # linked, so don't bother handling this case. 805867ab2ff2Smrg esac 805967ab2ff2Smrg else 806067ab2ff2Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 806167ab2ff2Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 806267ab2ff2Smrg else 806367ab2ff2Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 806467ab2ff2Smrg fi 806567ab2ff2Smrg fi 806667ab2ff2Smrg prev= 806767ab2ff2Smrg ;; 8068e0963edeSmrg 806967ab2ff2Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 807067ab2ff2Smrg *.$objext) 807167ab2ff2Smrg # This assumes that the test object file only shows up 807267ab2ff2Smrg # once in the compiler output. 807367ab2ff2Smrg if test "$p" = "conftest.$objext"; then 807467ab2ff2Smrg pre_test_object_deps_done=yes 807567ab2ff2Smrg continue 807667ab2ff2Smrg fi 8077e0963edeSmrg 807867ab2ff2Smrg if test "$pre_test_object_deps_done" = no; then 807967ab2ff2Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 808067ab2ff2Smrg _LT_TAGVAR(predep_objects, $1)="$p" 808167ab2ff2Smrg else 808267ab2ff2Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 808367ab2ff2Smrg fi 808467ab2ff2Smrg else 808567ab2ff2Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 808667ab2ff2Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 808767ab2ff2Smrg else 808867ab2ff2Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 808967ab2ff2Smrg fi 809067ab2ff2Smrg fi 809167ab2ff2Smrg ;; 8092e0963edeSmrg 809367ab2ff2Smrg *) ;; # Ignore the rest. 8094e0963edeSmrg 809567ab2ff2Smrg esac 809667ab2ff2Smrg done 8097e0963edeSmrg 809867ab2ff2Smrg # Clean up. 809967ab2ff2Smrg rm -f a.out a.exe 810067ab2ff2Smrgelse 810167ab2ff2Smrg echo "libtool.m4: error: problem compiling $1 test program" 810267ab2ff2Smrgfi 8103e0963edeSmrg 810467ab2ff2Smrg$RM -f confest.$objext 810567ab2ff2SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 8106e0963edeSmrg 810767ab2ff2Smrg# PORTME: override above test on systems where it is broken 810867ab2ff2Smrgm4_if([$1], [CXX], 810967ab2ff2Smrg[case $host_os in 811067ab2ff2Smrginterix[[3-9]]*) 811167ab2ff2Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 811267ab2ff2Smrg # hack all around it, let's just trust "g++" to DTRT. 811367ab2ff2Smrg _LT_TAGVAR(predep_objects,$1)= 811467ab2ff2Smrg _LT_TAGVAR(postdep_objects,$1)= 811567ab2ff2Smrg _LT_TAGVAR(postdeps,$1)= 811667ab2ff2Smrg ;; 8117e0963edeSmrg 811867ab2ff2Smrglinux*) 811967ab2ff2Smrg case `$CC -V 2>&1 | sed 5q` in 812067ab2ff2Smrg *Sun\ C*) 812167ab2ff2Smrg # Sun C++ 5.9 8122e0963edeSmrg 812367ab2ff2Smrg # The more standards-conforming stlport4 library is 812467ab2ff2Smrg # incompatible with the Cstd library. Avoid specifying 812567ab2ff2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 812667ab2ff2Smrg # -library=stlport4 depends on it. 812767ab2ff2Smrg case " $CXX $CXXFLAGS " in 812867ab2ff2Smrg *" -library=stlport4 "*) 812967ab2ff2Smrg solaris_use_stlport4=yes 813067ab2ff2Smrg ;; 813167ab2ff2Smrg esac 8132e0963edeSmrg 813367ab2ff2Smrg if test "$solaris_use_stlport4" != yes; then 813467ab2ff2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 813567ab2ff2Smrg fi 813667ab2ff2Smrg ;; 813767ab2ff2Smrg esac 813867ab2ff2Smrg ;; 8139f05b35a2Smrg 814067ab2ff2Smrgsolaris*) 814167ab2ff2Smrg case $cc_basename in 814267ab2ff2Smrg CC* | sunCC*) 814367ab2ff2Smrg # The more standards-conforming stlport4 library is 814467ab2ff2Smrg # incompatible with the Cstd library. Avoid specifying 814567ab2ff2Smrg # it if it's in CXXFLAGS. Ignore libCrun as 814667ab2ff2Smrg # -library=stlport4 depends on it. 814767ab2ff2Smrg case " $CXX $CXXFLAGS " in 814867ab2ff2Smrg *" -library=stlport4 "*) 814967ab2ff2Smrg solaris_use_stlport4=yes 815067ab2ff2Smrg ;; 815167ab2ff2Smrg esac 8152f05b35a2Smrg 815367ab2ff2Smrg # Adding this requires a known-good setup of shared libraries for 815467ab2ff2Smrg # Sun compiler versions before 5.6, else PIC objects from an old 815567ab2ff2Smrg # archive will be linked into the output, leading to subtle bugs. 815667ab2ff2Smrg if test "$solaris_use_stlport4" != yes; then 815767ab2ff2Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 815867ab2ff2Smrg fi 815967ab2ff2Smrg ;; 816067ab2ff2Smrg esac 816167ab2ff2Smrg ;; 816267ab2ff2Smrgesac 816367ab2ff2Smrg]) 8164e0963edeSmrg 816567ab2ff2Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 816667ab2ff2Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 816767ab2ff2Smrgesac 816867ab2ff2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 816967ab2ff2Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 817067ab2ff2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 817167ab2ff2Smrgfi 817267ab2ff2Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 817367ab2ff2Smrg [The directories searched by this compiler when creating a shared library]) 817467ab2ff2Smrg_LT_TAGDECL([], [predep_objects], [1], 817567ab2ff2Smrg [Dependencies to place before and after the objects being linked to 817667ab2ff2Smrg create a shared library]) 817767ab2ff2Smrg_LT_TAGDECL([], [postdep_objects], [1]) 817867ab2ff2Smrg_LT_TAGDECL([], [predeps], [1]) 817967ab2ff2Smrg_LT_TAGDECL([], [postdeps], [1]) 818067ab2ff2Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 818167ab2ff2Smrg [The library search path used internally by the compiler when linking 818267ab2ff2Smrg a shared library]) 818367ab2ff2Smrg])# _LT_SYS_HIDDEN_LIBDEPS 8184f05b35a2Smrg 8185e0963edeSmrg 818667ab2ff2Smrg# _LT_LANG_F77_CONFIG([TAG]) 818767ab2ff2Smrg# -------------------------- 818867ab2ff2Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 818967ab2ff2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 819067ab2ff2Smrg# to write the compiler configuration to `libtool'. 819167ab2ff2Smrgm4_defun([_LT_LANG_F77_CONFIG], 819267ab2ff2Smrg[AC_LANG_PUSH(Fortran 77) 819367ab2ff2Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 819467ab2ff2Smrg _lt_disable_F77=yes 819567ab2ff2Smrgfi 8196e0963edeSmrg 819767ab2ff2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 819867ab2ff2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 819967ab2ff2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 820067ab2ff2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 820167ab2ff2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 820267ab2ff2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 820367ab2ff2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 820467ab2ff2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 820567ab2ff2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 820667ab2ff2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 820767ab2ff2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 820867ab2ff2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 820967ab2ff2Smrg_LT_TAGVAR(module_cmds, $1)= 821067ab2ff2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 821167ab2ff2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 821267ab2ff2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 821367ab2ff2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 821467ab2ff2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 821567ab2ff2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 821667ab2ff2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 821767ab2ff2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8218e0963edeSmrg 821967ab2ff2Smrg# Source file extension for f77 test sources. 822067ab2ff2Smrgac_ext=f 8221e0963edeSmrg 822267ab2ff2Smrg# Object file extension for compiled f77 test sources. 822367ab2ff2Smrgobjext=o 822467ab2ff2Smrg_LT_TAGVAR(objext, $1)=$objext 8225e0963edeSmrg 822667ab2ff2Smrg# No sense in running all these tests if we already determined that 822767ab2ff2Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 822867ab2ff2Smrg# are currently assumed to apply to all compilers on this platform, 822967ab2ff2Smrg# and will be corrupted by setting them based on a non-working compiler. 823067ab2ff2Smrgif test "$_lt_disable_F77" != yes; then 823167ab2ff2Smrg # Code to be used in simple compile tests 823267ab2ff2Smrg lt_simple_compile_test_code="\ 823367ab2ff2Smrg subroutine t 823467ab2ff2Smrg return 823567ab2ff2Smrg end 823667ab2ff2Smrg" 8237e0963edeSmrg 823867ab2ff2Smrg # Code to be used in simple link tests 823967ab2ff2Smrg lt_simple_link_test_code="\ 824067ab2ff2Smrg program t 824167ab2ff2Smrg end 824267ab2ff2Smrg" 8243e0963edeSmrg 824467ab2ff2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 824567ab2ff2Smrg _LT_TAG_COMPILER 824667ab2ff2Smrg 824767ab2ff2Smrg # save warnings/boilerplate of simple test code 824867ab2ff2Smrg _LT_COMPILER_BOILERPLATE 824967ab2ff2Smrg _LT_LINKER_BOILERPLATE 825067ab2ff2Smrg 825167ab2ff2Smrg # Allow CC to be a program name with arguments. 825267ab2ff2Smrg lt_save_CC="$CC" 825367ab2ff2Smrg lt_save_GCC=$GCC 825467ab2ff2Smrg lt_save_CFLAGS=$CFLAGS 825567ab2ff2Smrg CC=${F77-"f77"} 825667ab2ff2Smrg CFLAGS=$FFLAGS 825767ab2ff2Smrg compiler=$CC 825867ab2ff2Smrg _LT_TAGVAR(compiler, $1)=$CC 825967ab2ff2Smrg _LT_CC_BASENAME([$compiler]) 826067ab2ff2Smrg GCC=$G77 826167ab2ff2Smrg if test -n "$compiler"; then 826267ab2ff2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 826367ab2ff2Smrg AC_MSG_RESULT([$can_build_shared]) 8264e0963edeSmrg 826567ab2ff2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 826667ab2ff2Smrg test "$can_build_shared" = "no" && enable_shared=no 8267e0963edeSmrg 826867ab2ff2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 826967ab2ff2Smrg # are all built from PIC. 827067ab2ff2Smrg case $host_os in 827167ab2ff2Smrg aix3*) 827267ab2ff2Smrg test "$enable_shared" = yes && enable_static=no 827367ab2ff2Smrg if test -n "$RANLIB"; then 827467ab2ff2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 827567ab2ff2Smrg postinstall_cmds='$RANLIB $lib' 827649e108a1Smrg fi 827749e108a1Smrg ;; 827867ab2ff2Smrg aix[[4-9]]*) 827967ab2ff2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 828067ab2ff2Smrg test "$enable_shared" = yes && enable_static=no 828167ab2ff2Smrg fi 828267ab2ff2Smrg ;; 828367ab2ff2Smrg esac 828467ab2ff2Smrg AC_MSG_RESULT([$enable_shared]) 8285e0963edeSmrg 828667ab2ff2Smrg AC_MSG_CHECKING([whether to build static libraries]) 828767ab2ff2Smrg # Make sure either enable_shared or enable_static is yes. 828867ab2ff2Smrg test "$enable_shared" = yes || enable_static=yes 828967ab2ff2Smrg AC_MSG_RESULT([$enable_static]) 8290f05b35a2Smrg 829167ab2ff2Smrg _LT_TAGVAR(GCC, $1)="$G77" 829267ab2ff2Smrg _LT_TAGVAR(LD, $1)="$LD" 8293e0963edeSmrg 829467ab2ff2Smrg ## CAVEAT EMPTOR: 829567ab2ff2Smrg ## There is no encapsulation within the following macros, do not change 829667ab2ff2Smrg ## the running order or otherwise move them around unless you know exactly 829767ab2ff2Smrg ## what you are doing... 829867ab2ff2Smrg _LT_COMPILER_PIC($1) 829967ab2ff2Smrg _LT_COMPILER_C_O($1) 830067ab2ff2Smrg _LT_COMPILER_FILE_LOCKS($1) 830167ab2ff2Smrg _LT_LINKER_SHLIBS($1) 830267ab2ff2Smrg _LT_SYS_DYNAMIC_LINKER($1) 830367ab2ff2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8304e0963edeSmrg 830567ab2ff2Smrg _LT_CONFIG($1) 830667ab2ff2Smrg fi # test -n "$compiler" 8307e0963edeSmrg 830867ab2ff2Smrg GCC=$lt_save_GCC 830967ab2ff2Smrg CC="$lt_save_CC" 831067ab2ff2Smrg CFLAGS="$lt_save_CFLAGS" 831167ab2ff2Smrgfi # test "$_lt_disable_F77" != yes 8312e0963edeSmrg 831367ab2ff2SmrgAC_LANG_POP 831467ab2ff2Smrg])# _LT_LANG_F77_CONFIG 831567ab2ff2Smrg 831667ab2ff2Smrg 831767ab2ff2Smrg# _LT_LANG_FC_CONFIG([TAG]) 831867ab2ff2Smrg# ------------------------- 831967ab2ff2Smrg# Ensure that the configuration variables for a Fortran compiler are 832067ab2ff2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 832167ab2ff2Smrg# to write the compiler configuration to `libtool'. 832267ab2ff2Smrgm4_defun([_LT_LANG_FC_CONFIG], 832367ab2ff2Smrg[AC_LANG_PUSH(Fortran) 832467ab2ff2Smrg 832567ab2ff2Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 832667ab2ff2Smrg _lt_disable_FC=yes 832767ab2ff2Smrgfi 832867ab2ff2Smrg 832967ab2ff2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 833067ab2ff2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 833167ab2ff2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 833267ab2ff2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 833367ab2ff2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 833467ab2ff2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 833567ab2ff2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 833667ab2ff2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 833767ab2ff2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 833867ab2ff2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 833967ab2ff2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 834067ab2ff2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 834167ab2ff2Smrg_LT_TAGVAR(module_cmds, $1)= 834267ab2ff2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 834367ab2ff2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 834467ab2ff2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 834567ab2ff2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 834667ab2ff2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 834767ab2ff2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 834867ab2ff2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 834967ab2ff2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8350e0963edeSmrg 835167ab2ff2Smrg# Source file extension for fc test sources. 835267ab2ff2Smrgac_ext=${ac_fc_srcext-f} 8353e0963edeSmrg 835467ab2ff2Smrg# Object file extension for compiled fc test sources. 835567ab2ff2Smrgobjext=o 835667ab2ff2Smrg_LT_TAGVAR(objext, $1)=$objext 8357f05b35a2Smrg 835867ab2ff2Smrg# No sense in running all these tests if we already determined that 835967ab2ff2Smrg# the FC compiler isn't working. Some variables (like enable_shared) 836067ab2ff2Smrg# are currently assumed to apply to all compilers on this platform, 836167ab2ff2Smrg# and will be corrupted by setting them based on a non-working compiler. 836267ab2ff2Smrgif test "$_lt_disable_FC" != yes; then 836367ab2ff2Smrg # Code to be used in simple compile tests 836467ab2ff2Smrg lt_simple_compile_test_code="\ 836567ab2ff2Smrg subroutine t 836667ab2ff2Smrg return 836767ab2ff2Smrg end 836867ab2ff2Smrg" 8369e0963edeSmrg 837067ab2ff2Smrg # Code to be used in simple link tests 837167ab2ff2Smrg lt_simple_link_test_code="\ 837267ab2ff2Smrg program t 837367ab2ff2Smrg end 837467ab2ff2Smrg" 8375e0963edeSmrg 837667ab2ff2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 837767ab2ff2Smrg _LT_TAG_COMPILER 8378e0963edeSmrg 837967ab2ff2Smrg # save warnings/boilerplate of simple test code 838067ab2ff2Smrg _LT_COMPILER_BOILERPLATE 838167ab2ff2Smrg _LT_LINKER_BOILERPLATE 8382e0963edeSmrg 838367ab2ff2Smrg # Allow CC to be a program name with arguments. 838467ab2ff2Smrg lt_save_CC="$CC" 838567ab2ff2Smrg lt_save_GCC=$GCC 838667ab2ff2Smrg lt_save_CFLAGS=$CFLAGS 838767ab2ff2Smrg CC=${FC-"f95"} 838867ab2ff2Smrg CFLAGS=$FCFLAGS 838967ab2ff2Smrg compiler=$CC 839067ab2ff2Smrg GCC=$ac_cv_fc_compiler_gnu 8391e0963edeSmrg 839267ab2ff2Smrg _LT_TAGVAR(compiler, $1)=$CC 839367ab2ff2Smrg _LT_CC_BASENAME([$compiler]) 8394e0963edeSmrg 839567ab2ff2Smrg if test -n "$compiler"; then 839667ab2ff2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 839767ab2ff2Smrg AC_MSG_RESULT([$can_build_shared]) 839867ab2ff2Smrg 839967ab2ff2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 840067ab2ff2Smrg test "$can_build_shared" = "no" && enable_shared=no 840167ab2ff2Smrg 840267ab2ff2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 840367ab2ff2Smrg # are all built from PIC. 840467ab2ff2Smrg case $host_os in 840567ab2ff2Smrg aix3*) 840667ab2ff2Smrg test "$enable_shared" = yes && enable_static=no 840767ab2ff2Smrg if test -n "$RANLIB"; then 840867ab2ff2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 840967ab2ff2Smrg postinstall_cmds='$RANLIB $lib' 841067ab2ff2Smrg fi 841167ab2ff2Smrg ;; 841267ab2ff2Smrg aix[[4-9]]*) 841367ab2ff2Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 841467ab2ff2Smrg test "$enable_shared" = yes && enable_static=no 841549e108a1Smrg fi 841667ab2ff2Smrg ;; 841767ab2ff2Smrg esac 841867ab2ff2Smrg AC_MSG_RESULT([$enable_shared]) 8419e0963edeSmrg 842067ab2ff2Smrg AC_MSG_CHECKING([whether to build static libraries]) 842167ab2ff2Smrg # Make sure either enable_shared or enable_static is yes. 842267ab2ff2Smrg test "$enable_shared" = yes || enable_static=yes 842367ab2ff2Smrg AC_MSG_RESULT([$enable_static]) 8424e0963edeSmrg 842567ab2ff2Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 842667ab2ff2Smrg _LT_TAGVAR(LD, $1)="$LD" 8427e0963edeSmrg 842867ab2ff2Smrg ## CAVEAT EMPTOR: 842967ab2ff2Smrg ## There is no encapsulation within the following macros, do not change 843067ab2ff2Smrg ## the running order or otherwise move them around unless you know exactly 843167ab2ff2Smrg ## what you are doing... 843267ab2ff2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 843367ab2ff2Smrg _LT_COMPILER_PIC($1) 843467ab2ff2Smrg _LT_COMPILER_C_O($1) 843567ab2ff2Smrg _LT_COMPILER_FILE_LOCKS($1) 843667ab2ff2Smrg _LT_LINKER_SHLIBS($1) 843767ab2ff2Smrg _LT_SYS_DYNAMIC_LINKER($1) 843867ab2ff2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8439e0963edeSmrg 844067ab2ff2Smrg _LT_CONFIG($1) 844167ab2ff2Smrg fi # test -n "$compiler" 8442e0963edeSmrg 844367ab2ff2Smrg GCC=$lt_save_GCC 844467ab2ff2Smrg CC=$lt_save_CC 844567ab2ff2Smrg CFLAGS=$lt_save_CFLAGS 844667ab2ff2Smrgfi # test "$_lt_disable_FC" != yes 8447e0963edeSmrg 844867ab2ff2SmrgAC_LANG_POP 844967ab2ff2Smrg])# _LT_LANG_FC_CONFIG 8450e0963edeSmrg 8451e0963edeSmrg 845267ab2ff2Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 845367ab2ff2Smrg# -------------------------- 845467ab2ff2Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 845567ab2ff2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 845667ab2ff2Smrg# to write the compiler configuration to `libtool'. 845767ab2ff2Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 845867ab2ff2Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 845967ab2ff2SmrgAC_LANG_SAVE 846067ab2ff2Smrg 846167ab2ff2Smrg# Source file extension for Java test sources. 846267ab2ff2Smrgac_ext=java 846367ab2ff2Smrg 846467ab2ff2Smrg# Object file extension for compiled Java test sources. 846567ab2ff2Smrgobjext=o 846667ab2ff2Smrg_LT_TAGVAR(objext, $1)=$objext 8467e0963edeSmrg 846867ab2ff2Smrg# Code to be used in simple compile tests 846967ab2ff2Smrglt_simple_compile_test_code="class foo {}" 8470e0963edeSmrg 847167ab2ff2Smrg# Code to be used in simple link tests 847267ab2ff2Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8473e0963edeSmrg 847467ab2ff2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 847567ab2ff2Smrg_LT_TAG_COMPILER 8476f05b35a2Smrg 847767ab2ff2Smrg# save warnings/boilerplate of simple test code 847867ab2ff2Smrg_LT_COMPILER_BOILERPLATE 847967ab2ff2Smrg_LT_LINKER_BOILERPLATE 8480e0963edeSmrg 848167ab2ff2Smrg# Allow CC to be a program name with arguments. 848267ab2ff2Smrglt_save_CC=$CC 848367ab2ff2Smrglt_save_CFLAGS=$CFLAGS 848467ab2ff2Smrglt_save_GCC=$GCC 848567ab2ff2SmrgGCC=yes 848667ab2ff2SmrgCC=${GCJ-"gcj"} 848767ab2ff2SmrgCFLAGS=$GCJFLAGS 848867ab2ff2Smrgcompiler=$CC 848967ab2ff2Smrg_LT_TAGVAR(compiler, $1)=$CC 849067ab2ff2Smrg_LT_TAGVAR(LD, $1)="$LD" 849167ab2ff2Smrg_LT_CC_BASENAME([$compiler]) 8492e0963edeSmrg 849367ab2ff2Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 849467ab2ff2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8495e0963edeSmrg 849667ab2ff2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 849767ab2ff2Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 849867ab2ff2Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8499e0963edeSmrg 850067ab2ff2Smrgif test -n "$compiler"; then 850167ab2ff2Smrg _LT_COMPILER_NO_RTTI($1) 850267ab2ff2Smrg _LT_COMPILER_PIC($1) 850367ab2ff2Smrg _LT_COMPILER_C_O($1) 850467ab2ff2Smrg _LT_COMPILER_FILE_LOCKS($1) 850567ab2ff2Smrg _LT_LINKER_SHLIBS($1) 850667ab2ff2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8507e0963edeSmrg 850867ab2ff2Smrg _LT_CONFIG($1) 850967ab2ff2Smrgfi 8510e0963edeSmrg 851167ab2ff2SmrgAC_LANG_RESTORE 8512e0963edeSmrg 851367ab2ff2SmrgGCC=$lt_save_GCC 851467ab2ff2SmrgCC=$lt_save_CC 851567ab2ff2SmrgCFLAGS=$lt_save_CFLAGS 851667ab2ff2Smrg])# _LT_LANG_GCJ_CONFIG 8517f05b35a2Smrg 8518f05b35a2Smrg 8519e494fffdSmrg# _LT_LANG_GO_CONFIG([TAG]) 8520e494fffdSmrg# -------------------------- 8521e494fffdSmrg# Ensure that the configuration variables for the GNU Go compiler 8522e494fffdSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8523e494fffdSmrg# to write the compiler configuration to `libtool'. 8524e494fffdSmrgm4_defun([_LT_LANG_GO_CONFIG], 8525e494fffdSmrg[AC_REQUIRE([LT_PROG_GO])dnl 8526e494fffdSmrgAC_LANG_SAVE 8527e494fffdSmrg 8528e494fffdSmrg# Source file extension for Go test sources. 8529e494fffdSmrgac_ext=go 8530e494fffdSmrg 8531e494fffdSmrg# Object file extension for compiled Go test sources. 8532e494fffdSmrgobjext=o 8533e494fffdSmrg_LT_TAGVAR(objext, $1)=$objext 8534e494fffdSmrg 8535e494fffdSmrg# Code to be used in simple compile tests 8536e494fffdSmrglt_simple_compile_test_code="package main; func main() { }" 8537e494fffdSmrg 8538e494fffdSmrg# Code to be used in simple link tests 8539e494fffdSmrglt_simple_link_test_code='package main; func main() { }' 8540e494fffdSmrg 8541e494fffdSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8542e494fffdSmrg_LT_TAG_COMPILER 8543e494fffdSmrg 8544e494fffdSmrg# save warnings/boilerplate of simple test code 8545e494fffdSmrg_LT_COMPILER_BOILERPLATE 8546e494fffdSmrg_LT_LINKER_BOILERPLATE 8547e494fffdSmrg 8548e494fffdSmrg# Allow CC to be a program name with arguments. 8549e494fffdSmrglt_save_CC=$CC 8550e494fffdSmrglt_save_CFLAGS=$CFLAGS 8551e494fffdSmrglt_save_GCC=$GCC 8552e494fffdSmrgGCC=yes 8553e494fffdSmrgCC=${GOC-"gccgo"} 8554e494fffdSmrgCFLAGS=$GOFLAGS 8555e494fffdSmrgcompiler=$CC 8556e494fffdSmrg_LT_TAGVAR(compiler, $1)=$CC 8557e494fffdSmrg_LT_TAGVAR(LD, $1)="$LD" 8558e494fffdSmrg_LT_CC_BASENAME([$compiler]) 8559e494fffdSmrg 8560e494fffdSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 8561e494fffdSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8562e494fffdSmrg 8563e494fffdSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8564e494fffdSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8565e494fffdSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8566e494fffdSmrg 8567e494fffdSmrgif test -n "$compiler"; then 8568e494fffdSmrg _LT_COMPILER_NO_RTTI($1) 8569e494fffdSmrg _LT_COMPILER_PIC($1) 8570e494fffdSmrg _LT_COMPILER_C_O($1) 8571e494fffdSmrg _LT_COMPILER_FILE_LOCKS($1) 8572e494fffdSmrg _LT_LINKER_SHLIBS($1) 8573e494fffdSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8574e494fffdSmrg 8575e494fffdSmrg _LT_CONFIG($1) 8576e494fffdSmrgfi 8577e494fffdSmrg 8578e494fffdSmrgAC_LANG_RESTORE 8579e494fffdSmrg 8580e494fffdSmrgGCC=$lt_save_GCC 8581e494fffdSmrgCC=$lt_save_CC 8582e494fffdSmrgCFLAGS=$lt_save_CFLAGS 8583e494fffdSmrg])# _LT_LANG_GO_CONFIG 8584e494fffdSmrg 8585e494fffdSmrg 858667ab2ff2Smrg# _LT_LANG_RC_CONFIG([TAG]) 858767ab2ff2Smrg# ------------------------- 858867ab2ff2Smrg# Ensure that the configuration variables for the Windows resource compiler 858967ab2ff2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 859067ab2ff2Smrg# to write the compiler configuration to `libtool'. 859167ab2ff2Smrgm4_defun([_LT_LANG_RC_CONFIG], 859267ab2ff2Smrg[AC_REQUIRE([LT_PROG_RC])dnl 859367ab2ff2SmrgAC_LANG_SAVE 8594f05b35a2Smrg 859567ab2ff2Smrg# Source file extension for RC test sources. 859667ab2ff2Smrgac_ext=rc 8597f05b35a2Smrg 859867ab2ff2Smrg# Object file extension for compiled RC test sources. 859967ab2ff2Smrgobjext=o 860067ab2ff2Smrg_LT_TAGVAR(objext, $1)=$objext 8601f05b35a2Smrg 860267ab2ff2Smrg# Code to be used in simple compile tests 860367ab2ff2Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8604e0963edeSmrg 860567ab2ff2Smrg# Code to be used in simple link tests 860667ab2ff2Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 8607e0963edeSmrg 860867ab2ff2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 860967ab2ff2Smrg_LT_TAG_COMPILER 8610e0963edeSmrg 861167ab2ff2Smrg# save warnings/boilerplate of simple test code 861267ab2ff2Smrg_LT_COMPILER_BOILERPLATE 861367ab2ff2Smrg_LT_LINKER_BOILERPLATE 861467ab2ff2Smrg 861567ab2ff2Smrg# Allow CC to be a program name with arguments. 861667ab2ff2Smrglt_save_CC="$CC" 861767ab2ff2Smrglt_save_CFLAGS=$CFLAGS 861867ab2ff2Smrglt_save_GCC=$GCC 861967ab2ff2SmrgGCC= 862067ab2ff2SmrgCC=${RC-"windres"} 862167ab2ff2SmrgCFLAGS= 862267ab2ff2Smrgcompiler=$CC 862367ab2ff2Smrg_LT_TAGVAR(compiler, $1)=$CC 862467ab2ff2Smrg_LT_CC_BASENAME([$compiler]) 862567ab2ff2Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 862667ab2ff2Smrg 862767ab2ff2Smrgif test -n "$compiler"; then 862867ab2ff2Smrg : 862967ab2ff2Smrg _LT_CONFIG($1) 863067ab2ff2Smrgfi 8631e0963edeSmrg 863267ab2ff2SmrgGCC=$lt_save_GCC 863367ab2ff2SmrgAC_LANG_RESTORE 863467ab2ff2SmrgCC=$lt_save_CC 863567ab2ff2SmrgCFLAGS=$lt_save_CFLAGS 863667ab2ff2Smrg])# _LT_LANG_RC_CONFIG 8637e0963edeSmrg 8638e0963edeSmrg 863967ab2ff2Smrg# LT_PROG_GCJ 864067ab2ff2Smrg# ----------- 864167ab2ff2SmrgAC_DEFUN([LT_PROG_GCJ], 864267ab2ff2Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 864367ab2ff2Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 864467ab2ff2Smrg [AC_CHECK_TOOL(GCJ, gcj,) 864567ab2ff2Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 864667ab2ff2Smrg AC_SUBST(GCJFLAGS)])])[]dnl 864767ab2ff2Smrg]) 8648e0963edeSmrg 864967ab2ff2Smrg# Old name: 865067ab2ff2SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 865167ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 865267ab2ff2Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8653e0963edeSmrg 8654f05b35a2Smrg 8655e494fffdSmrg# LT_PROG_GO 8656e494fffdSmrg# ---------- 8657e494fffdSmrgAC_DEFUN([LT_PROG_GO], 8658e494fffdSmrg[AC_CHECK_TOOL(GOC, gccgo,) 8659e494fffdSmrg]) 8660e494fffdSmrg 8661e494fffdSmrg 866267ab2ff2Smrg# LT_PROG_RC 866367ab2ff2Smrg# ---------- 866467ab2ff2SmrgAC_DEFUN([LT_PROG_RC], 866567ab2ff2Smrg[AC_CHECK_TOOL(RC, windres,) 866667ab2ff2Smrg]) 8667f05b35a2Smrg 866867ab2ff2Smrg# Old name: 866967ab2ff2SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 867067ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 867167ab2ff2Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8672f05b35a2Smrg 8673f05b35a2Smrg 867467ab2ff2Smrg# _LT_DECL_EGREP 867567ab2ff2Smrg# -------------- 867667ab2ff2Smrg# If we don't have a new enough Autoconf to choose the best grep 867767ab2ff2Smrg# available, choose the one first in the user's PATH. 867867ab2ff2Smrgm4_defun([_LT_DECL_EGREP], 867967ab2ff2Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 868067ab2ff2SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 868167ab2ff2Smrgtest -z "$GREP" && GREP=grep 868267ab2ff2Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 868367ab2ff2Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 868467ab2ff2Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 868567ab2ff2Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 868667ab2ff2SmrgAC_SUBST([GREP]) 868767ab2ff2Smrg]) 8688f05b35a2Smrg 8689f05b35a2Smrg 869067ab2ff2Smrg# _LT_DECL_OBJDUMP 869167ab2ff2Smrg# -------------- 869267ab2ff2Smrg# If we don't have a new enough Autoconf to choose the best objdump 869367ab2ff2Smrg# available, choose the one first in the user's PATH. 869467ab2ff2Smrgm4_defun([_LT_DECL_OBJDUMP], 869567ab2ff2Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 869667ab2ff2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 869767ab2ff2Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 869867ab2ff2SmrgAC_SUBST([OBJDUMP]) 869949e108a1Smrg]) 8700f05b35a2Smrg 870167ab2ff2Smrg# _LT_DECL_DLLTOOL 870267ab2ff2Smrg# ---------------- 870367ab2ff2Smrg# Ensure DLLTOOL variable is set. 870467ab2ff2Smrgm4_defun([_LT_DECL_DLLTOOL], 870567ab2ff2Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 870667ab2ff2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 870767ab2ff2Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 870867ab2ff2SmrgAC_SUBST([DLLTOOL]) 870967ab2ff2Smrg]) 8710f05b35a2Smrg 871167ab2ff2Smrg# _LT_DECL_SED 871267ab2ff2Smrg# ------------ 871367ab2ff2Smrg# Check for a fully-functional sed program, that truncates 871467ab2ff2Smrg# as few characters as possible. Prefer GNU sed if found. 871567ab2ff2Smrgm4_defun([_LT_DECL_SED], 871667ab2ff2Smrg[AC_PROG_SED 871767ab2ff2Smrgtest -z "$SED" && SED=sed 871867ab2ff2SmrgXsed="$SED -e 1s/^X//" 871967ab2ff2Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 872067ab2ff2Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 872167ab2ff2Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 872267ab2ff2Smrg])# _LT_DECL_SED 8723f05b35a2Smrg 872467ab2ff2Smrgm4_ifndef([AC_PROG_SED], [ 872567ab2ff2Smrg# NOTE: This macro has been submitted for inclusion into # 872667ab2ff2Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 872767ab2ff2Smrg# a released version of Autoconf we should remove this # 872867ab2ff2Smrg# macro and use it instead. # 8729f05b35a2Smrg 873067ab2ff2Smrgm4_defun([AC_PROG_SED], 873167ab2ff2Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 873267ab2ff2SmrgAC_CACHE_VAL(lt_cv_path_SED, 873367ab2ff2Smrg[# Loop through the user's path and test for sed and gsed. 873467ab2ff2Smrg# Then use that list of sed's as ones to test for truncation. 873567ab2ff2Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 873667ab2ff2Smrgfor as_dir in $PATH 873767ab2ff2Smrgdo 873867ab2ff2Smrg IFS=$as_save_IFS 873967ab2ff2Smrg test -z "$as_dir" && as_dir=. 874067ab2ff2Smrg for lt_ac_prog in sed gsed; do 874167ab2ff2Smrg for ac_exec_ext in '' $ac_executable_extensions; do 874267ab2ff2Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 874367ab2ff2Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 874467ab2ff2Smrg fi 874567ab2ff2Smrg done 874667ab2ff2Smrg done 874767ab2ff2Smrgdone 874867ab2ff2SmrgIFS=$as_save_IFS 874967ab2ff2Smrglt_ac_max=0 875067ab2ff2Smrglt_ac_count=0 875167ab2ff2Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 875267ab2ff2Smrg# along with /bin/sed that truncates output. 875367ab2ff2Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 875467ab2ff2Smrg test ! -f $lt_ac_sed && continue 875567ab2ff2Smrg cat /dev/null > conftest.in 875667ab2ff2Smrg lt_ac_count=0 875767ab2ff2Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 875867ab2ff2Smrg # Check for GNU sed and select it if it is found. 875967ab2ff2Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 876067ab2ff2Smrg lt_cv_path_SED=$lt_ac_sed 876167ab2ff2Smrg break 876267ab2ff2Smrg fi 876367ab2ff2Smrg while true; do 876467ab2ff2Smrg cat conftest.in conftest.in >conftest.tmp 876567ab2ff2Smrg mv conftest.tmp conftest.in 876667ab2ff2Smrg cp conftest.in conftest.nl 876767ab2ff2Smrg echo >>conftest.nl 876867ab2ff2Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 876967ab2ff2Smrg cmp -s conftest.out conftest.nl || break 877067ab2ff2Smrg # 10000 chars as input seems more than enough 877167ab2ff2Smrg test $lt_ac_count -gt 10 && break 877267ab2ff2Smrg lt_ac_count=`expr $lt_ac_count + 1` 877367ab2ff2Smrg if test $lt_ac_count -gt $lt_ac_max; then 877467ab2ff2Smrg lt_ac_max=$lt_ac_count 877567ab2ff2Smrg lt_cv_path_SED=$lt_ac_sed 877667ab2ff2Smrg fi 877767ab2ff2Smrg done 877867ab2ff2Smrgdone 877967ab2ff2Smrg]) 878067ab2ff2SmrgSED=$lt_cv_path_SED 878167ab2ff2SmrgAC_SUBST([SED]) 878267ab2ff2SmrgAC_MSG_RESULT([$SED]) 878367ab2ff2Smrg])#AC_PROG_SED 878467ab2ff2Smrg])#m4_ifndef 8785f05b35a2Smrg 878667ab2ff2Smrg# Old name: 878767ab2ff2SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 878867ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 878967ab2ff2Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8790e0963edeSmrg 8791e0963edeSmrg 879267ab2ff2Smrg# _LT_CHECK_SHELL_FEATURES 879367ab2ff2Smrg# ------------------------ 879467ab2ff2Smrg# Find out whether the shell is Bourne or XSI compatible, 879567ab2ff2Smrg# or has some other useful features. 879667ab2ff2Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 879767ab2ff2Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 879867ab2ff2Smrg# Try some XSI features 879967ab2ff2Smrgxsi_shell=no 880067ab2ff2Smrg( _lt_dummy="a/b/c" 880167ab2ff2Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 880267ab2ff2Smrg = c,a/b,b/c, \ 880367ab2ff2Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 880467ab2ff2Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 880567ab2ff2Smrg && xsi_shell=yes 880667ab2ff2SmrgAC_MSG_RESULT([$xsi_shell]) 880767ab2ff2Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8808f05b35a2Smrg 880967ab2ff2SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 881067ab2ff2Smrglt_shell_append=no 881167ab2ff2Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 881267ab2ff2Smrg >/dev/null 2>&1 \ 881367ab2ff2Smrg && lt_shell_append=yes 881467ab2ff2SmrgAC_MSG_RESULT([$lt_shell_append]) 881567ab2ff2Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8816e0963edeSmrg 881767ab2ff2Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 881867ab2ff2Smrg lt_unset=unset 881949e108a1Smrgelse 882067ab2ff2Smrg lt_unset=false 882149e108a1Smrgfi 882267ab2ff2Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8823e0963edeSmrg 882467ab2ff2Smrg# test EBCDIC or ASCII 882567ab2ff2Smrgcase `echo X|tr X '\101'` in 882667ab2ff2Smrg A) # ASCII based system 882767ab2ff2Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 882867ab2ff2Smrg lt_SP2NL='tr \040 \012' 882967ab2ff2Smrg lt_NL2SP='tr \015\012 \040\040' 883049e108a1Smrg ;; 883167ab2ff2Smrg *) # EBCDIC based system 883267ab2ff2Smrg lt_SP2NL='tr \100 \n' 883367ab2ff2Smrg lt_NL2SP='tr \r\n \100\100' 883449e108a1Smrg ;; 883567ab2ff2Smrgesac 883667ab2ff2Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 883767ab2ff2Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 883867ab2ff2Smrg])# _LT_CHECK_SHELL_FEATURES 8839e0963edeSmrg 8840e0963edeSmrg 884167ab2ff2Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 884267ab2ff2Smrg# ------------------------------------------------------ 884367ab2ff2Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 884467ab2ff2Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 884567ab2ff2Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 884667ab2ff2Smrg[dnl { 884767ab2ff2Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 884867ab2ff2Smrg$1 ()\ 884967ab2ff2Smrg{\ 885067ab2ff2Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 885167ab2ff2Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 885267ab2ff2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 885367ab2ff2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 885467ab2ff2Smrgtest 0 -eq $? || _lt_function_replace_fail=: 885549e108a1Smrg]) 8856e0963edeSmrg 8857e0963edeSmrg 885867ab2ff2Smrg# _LT_PROG_REPLACE_SHELLFNS 885967ab2ff2Smrg# ------------------------- 886067ab2ff2Smrg# Replace existing portable implementations of several shell functions with 886167ab2ff2Smrg# equivalent extended shell implementations where those features are available.. 886267ab2ff2Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 886367ab2ff2Smrg[if test x"$xsi_shell" = xyes; then 886467ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 886567ab2ff2Smrg case ${1} in 886667ab2ff2Smrg */*) func_dirname_result="${1%/*}${2}" ;; 886767ab2ff2Smrg * ) func_dirname_result="${3}" ;; 886867ab2ff2Smrg esac]) 886967ab2ff2Smrg 887067ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 887167ab2ff2Smrg func_basename_result="${1##*/}"]) 887267ab2ff2Smrg 887367ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 887467ab2ff2Smrg case ${1} in 887567ab2ff2Smrg */*) func_dirname_result="${1%/*}${2}" ;; 887667ab2ff2Smrg * ) func_dirname_result="${3}" ;; 887767ab2ff2Smrg esac 887867ab2ff2Smrg func_basename_result="${1##*/}"]) 8879e0963edeSmrg 888067ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 888167ab2ff2Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 888267ab2ff2Smrg # positional parameters, so assign one to ordinary parameter first. 888367ab2ff2Smrg func_stripname_result=${3} 888467ab2ff2Smrg func_stripname_result=${func_stripname_result#"${1}"} 888567ab2ff2Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 8886f05b35a2Smrg 888767ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 888867ab2ff2Smrg func_split_long_opt_name=${1%%=*} 888967ab2ff2Smrg func_split_long_opt_arg=${1#*=}]) 8890f05b35a2Smrg 889167ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 889267ab2ff2Smrg func_split_short_opt_arg=${1#??} 889367ab2ff2Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 8894f05b35a2Smrg 889567ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 889667ab2ff2Smrg case ${1} in 889767ab2ff2Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 889867ab2ff2Smrg *) func_lo2o_result=${1} ;; 889967ab2ff2Smrg esac]) 8900f05b35a2Smrg 890167ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 8902f05b35a2Smrg 890367ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 8904e0963edeSmrg 890567ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 890667ab2ff2Smrgfi 890749e108a1Smrg 890867ab2ff2Smrgif test x"$lt_shell_append" = xyes; then 890967ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 891049e108a1Smrg 891167ab2ff2Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 891267ab2ff2Smrg func_quote_for_eval "${2}" 891367ab2ff2Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 891467ab2ff2Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 891549e108a1Smrg 891667ab2ff2Smrg # Save a `func_append' function call where possible by direct use of '+=' 891767ab2ff2Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 891867ab2ff2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 891967ab2ff2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 892067ab2ff2Smrg test 0 -eq $? || _lt_function_replace_fail=: 892167ab2ff2Smrgelse 892267ab2ff2Smrg # Save a `func_append' function call even when '+=' is not available 892367ab2ff2Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 892467ab2ff2Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 892567ab2ff2Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 892667ab2ff2Smrg test 0 -eq $? || _lt_function_replace_fail=: 892767ab2ff2Smrgfi 892849e108a1Smrg 892967ab2ff2Smrgif test x"$_lt_function_replace_fail" = x":"; then 893067ab2ff2Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 893167ab2ff2Smrgfi 893267ab2ff2Smrg]) 893367ab2ff2Smrg 893467ab2ff2Smrg# _LT_PATH_CONVERSION_FUNCTIONS 893567ab2ff2Smrg# ----------------------------- 893667ab2ff2Smrg# Determine which file name conversion functions should be used by 893767ab2ff2Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 893867ab2ff2Smrg# for certain cross-compile configurations and native mingw. 893967ab2ff2Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 894067ab2ff2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 894167ab2ff2SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 894267ab2ff2SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 894367ab2ff2SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 894467ab2ff2Smrg[case $host in 894567ab2ff2Smrg *-*-mingw* ) 894667ab2ff2Smrg case $build in 894767ab2ff2Smrg *-*-mingw* ) # actually msys 894867ab2ff2Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 894949e108a1Smrg ;; 895067ab2ff2Smrg *-*-cygwin* ) 895167ab2ff2Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 895267ab2ff2Smrg ;; 895367ab2ff2Smrg * ) # otherwise, assume *nix 895467ab2ff2Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 895549e108a1Smrg ;; 895649e108a1Smrg esac 895767ab2ff2Smrg ;; 895867ab2ff2Smrg *-*-cygwin* ) 895967ab2ff2Smrg case $build in 896067ab2ff2Smrg *-*-mingw* ) # actually msys 896167ab2ff2Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 896267ab2ff2Smrg ;; 896367ab2ff2Smrg *-*-cygwin* ) 896467ab2ff2Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 896567ab2ff2Smrg ;; 896667ab2ff2Smrg * ) # otherwise, assume *nix 896767ab2ff2Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 896867ab2ff2Smrg ;; 896967ab2ff2Smrg esac 897067ab2ff2Smrg ;; 897167ab2ff2Smrg * ) # unhandled hosts (and "normal" native builds) 897267ab2ff2Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 897367ab2ff2Smrg ;; 897467ab2ff2Smrgesac 897567ab2ff2Smrg]) 897667ab2ff2Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 897767ab2ff2SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 897867ab2ff2Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 897967ab2ff2Smrg [0], [convert $build file names to $host format])dnl 898067ab2ff2Smrg 898167ab2ff2SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 898267ab2ff2SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 898367ab2ff2Smrg[#assume ordinary cross tools, or native build. 898467ab2ff2Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 898567ab2ff2Smrgcase $host in 898667ab2ff2Smrg *-*-mingw* ) 898767ab2ff2Smrg case $build in 898867ab2ff2Smrg *-*-mingw* ) # actually msys 898967ab2ff2Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 899067ab2ff2Smrg ;; 899167ab2ff2Smrg esac 899267ab2ff2Smrg ;; 899367ab2ff2Smrgesac 899467ab2ff2Smrg]) 899567ab2ff2Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 899667ab2ff2SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 899767ab2ff2Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 899867ab2ff2Smrg [0], [convert $build files to toolchain format])dnl 899967ab2ff2Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 9000e0963edeSmrg 900167ab2ff2Smrg# Helper functions for option handling. -*- Autoconf -*- 900267ab2ff2Smrg# 900367ab2ff2Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 900467ab2ff2Smrg# Inc. 900567ab2ff2Smrg# Written by Gary V. Vaughan, 2004 900667ab2ff2Smrg# 900767ab2ff2Smrg# This file is free software; the Free Software Foundation gives 900867ab2ff2Smrg# unlimited permission to copy and/or distribute it, with or without 900967ab2ff2Smrg# modifications, as long as this notice is preserved. 9010e0963edeSmrg 901167ab2ff2Smrg# serial 7 ltoptions.m4 9012e0963edeSmrg 901367ab2ff2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 901467ab2ff2SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9015e0963edeSmrg 9016e0963edeSmrg 901767ab2ff2Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 901867ab2ff2Smrg# ------------------------------------------ 901967ab2ff2Smrgm4_define([_LT_MANGLE_OPTION], 902067ab2ff2Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9021e0963edeSmrg 9022e0963edeSmrg 902367ab2ff2Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 902467ab2ff2Smrg# --------------------------------------- 902567ab2ff2Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 902667ab2ff2Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 902767ab2ff2Smrg# saved as a flag. 902867ab2ff2Smrgm4_define([_LT_SET_OPTION], 902967ab2ff2Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 903067ab2ff2Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 903167ab2ff2Smrg _LT_MANGLE_DEFUN([$1], [$2]), 903267ab2ff2Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 903367ab2ff2Smrg]) 9034e0963edeSmrg 9035e0963edeSmrg 903667ab2ff2Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 903767ab2ff2Smrg# ------------------------------------------------------------ 903867ab2ff2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 903967ab2ff2Smrgm4_define([_LT_IF_OPTION], 904067ab2ff2Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9041e0963edeSmrg 9042e0963edeSmrg 904367ab2ff2Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 904467ab2ff2Smrg# ------------------------------------------------------- 904567ab2ff2Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 904667ab2ff2Smrg# are set. 904767ab2ff2Smrgm4_define([_LT_UNLESS_OPTIONS], 904867ab2ff2Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 904967ab2ff2Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 905067ab2ff2Smrg [m4_define([$0_found])])])[]dnl 905167ab2ff2Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 905267ab2ff2Smrg])[]dnl 905367ab2ff2Smrg]) 9054e0963edeSmrg 9055e0963edeSmrg 905667ab2ff2Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 905767ab2ff2Smrg# ---------------------------------------- 905867ab2ff2Smrg# OPTION-LIST is a space-separated list of Libtool options associated 905967ab2ff2Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 906067ab2ff2Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 906167ab2ff2Smrg# the unknown option and exit. 906267ab2ff2Smrgm4_defun([_LT_SET_OPTIONS], 906367ab2ff2Smrg[# Set options 906467ab2ff2Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 906567ab2ff2Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 9066e0963edeSmrg 906767ab2ff2Smrgm4_if([$1],[LT_INIT],[ 906867ab2ff2Smrg dnl 906967ab2ff2Smrg dnl Simply set some default values (i.e off) if boolean options were not 907067ab2ff2Smrg dnl specified: 907167ab2ff2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 907267ab2ff2Smrg ]) 907367ab2ff2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 907467ab2ff2Smrg ]) 907567ab2ff2Smrg dnl 907667ab2ff2Smrg dnl If no reference was made to various pairs of opposing options, then 907767ab2ff2Smrg dnl we run the default mode handler for the pair. For example, if neither 907867ab2ff2Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 907967ab2ff2Smrg dnl archives by default: 908067ab2ff2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 908167ab2ff2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 908267ab2ff2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 908367ab2ff2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 908467ab2ff2Smrg [_LT_ENABLE_FAST_INSTALL]) 908567ab2ff2Smrg ]) 908667ab2ff2Smrg])# _LT_SET_OPTIONS 9087e0963edeSmrg 908849e108a1Smrg 9089e0963edeSmrg 909067ab2ff2Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 909167ab2ff2Smrg# ----------------------------------------- 909267ab2ff2Smrgm4_define([_LT_MANGLE_DEFUN], 909367ab2ff2Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9094e0963edeSmrg 9095e0963edeSmrg 909667ab2ff2Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 909767ab2ff2Smrg# ----------------------------------------------- 909867ab2ff2Smrgm4_define([LT_OPTION_DEFINE], 909967ab2ff2Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 910067ab2ff2Smrg])# LT_OPTION_DEFINE 9101e0963edeSmrg 9102e0963edeSmrg 910367ab2ff2Smrg# dlopen 910467ab2ff2Smrg# ------ 910567ab2ff2SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 910667ab2ff2Smrg]) 9107e0963edeSmrg 910867ab2ff2SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 910967ab2ff2Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 911067ab2ff2SmrgAC_DIAGNOSE([obsolete], 911167ab2ff2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 911267ab2ff2Smrgput the `dlopen' option into LT_INIT's first parameter.]) 911367ab2ff2Smrg]) 9114f05b35a2Smrg 911567ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 911667ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9117f05b35a2Smrg 9118e0963edeSmrg 911967ab2ff2Smrg# win32-dll 912067ab2ff2Smrg# --------- 912167ab2ff2Smrg# Declare package support for building win32 dll's. 912267ab2ff2SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 912367ab2ff2Smrg[enable_win32_dll=yes 9124e0963edeSmrg 912567ab2ff2Smrgcase $host in 912667ab2ff2Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 912767ab2ff2Smrg AC_CHECK_TOOL(AS, as, false) 912867ab2ff2Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 912967ab2ff2Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 913067ab2ff2Smrg ;; 913167ab2ff2Smrgesac 913267ab2ff2Smrg 913367ab2ff2Smrgtest -z "$AS" && AS=as 913467ab2ff2Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 913567ab2ff2Smrg 913667ab2ff2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 913767ab2ff2Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 913867ab2ff2Smrg 913967ab2ff2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 914067ab2ff2Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 914167ab2ff2Smrg])# win32-dll 914267ab2ff2Smrg 914367ab2ff2SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 914467ab2ff2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 914567ab2ff2Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 914667ab2ff2SmrgAC_DIAGNOSE([obsolete], 914767ab2ff2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 914867ab2ff2Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 914967ab2ff2Smrg]) 9150e0963edeSmrg 915167ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 915267ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9153e0963edeSmrg 9154e0963edeSmrg 915567ab2ff2Smrg# _LT_ENABLE_SHARED([DEFAULT]) 915667ab2ff2Smrg# ---------------------------- 915767ab2ff2Smrg# implement the --enable-shared flag, and supports the `shared' and 915867ab2ff2Smrg# `disable-shared' LT_INIT options. 915967ab2ff2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 916067ab2ff2Smrgm4_define([_LT_ENABLE_SHARED], 916167ab2ff2Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 916267ab2ff2SmrgAC_ARG_ENABLE([shared], 916367ab2ff2Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 916467ab2ff2Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 916567ab2ff2Smrg [p=${PACKAGE-default} 916667ab2ff2Smrg case $enableval in 916767ab2ff2Smrg yes) enable_shared=yes ;; 916867ab2ff2Smrg no) enable_shared=no ;; 916967ab2ff2Smrg *) 917067ab2ff2Smrg enable_shared=no 917167ab2ff2Smrg # Look at the argument we got. We use all the common list separators. 917267ab2ff2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 917367ab2ff2Smrg for pkg in $enableval; do 917467ab2ff2Smrg IFS="$lt_save_ifs" 917567ab2ff2Smrg if test "X$pkg" = "X$p"; then 917667ab2ff2Smrg enable_shared=yes 917767ab2ff2Smrg fi 917867ab2ff2Smrg done 917967ab2ff2Smrg IFS="$lt_save_ifs" 918067ab2ff2Smrg ;; 918167ab2ff2Smrg esac], 918267ab2ff2Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9183e0963edeSmrg 918467ab2ff2Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 918567ab2ff2Smrg [Whether or not to build shared libraries]) 918667ab2ff2Smrg])# _LT_ENABLE_SHARED 9187e0963edeSmrg 918867ab2ff2SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 918967ab2ff2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9190e0963edeSmrg 919167ab2ff2Smrg# Old names: 919267ab2ff2SmrgAC_DEFUN([AC_ENABLE_SHARED], 919367ab2ff2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 919467ab2ff2Smrg]) 9195e0963edeSmrg 919667ab2ff2SmrgAC_DEFUN([AC_DISABLE_SHARED], 919767ab2ff2Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 919867ab2ff2Smrg]) 9199e0963edeSmrg 920067ab2ff2SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 920167ab2ff2SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9202e0963edeSmrg 920367ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 920467ab2ff2Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 920567ab2ff2Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9206e0963edeSmrg 9207e0963edeSmrg 9208e0963edeSmrg 920967ab2ff2Smrg# _LT_ENABLE_STATIC([DEFAULT]) 921067ab2ff2Smrg# ---------------------------- 921167ab2ff2Smrg# implement the --enable-static flag, and support the `static' and 921267ab2ff2Smrg# `disable-static' LT_INIT options. 921367ab2ff2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 921467ab2ff2Smrgm4_define([_LT_ENABLE_STATIC], 921567ab2ff2Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 921667ab2ff2SmrgAC_ARG_ENABLE([static], 921767ab2ff2Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 921867ab2ff2Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 921967ab2ff2Smrg [p=${PACKAGE-default} 922067ab2ff2Smrg case $enableval in 922167ab2ff2Smrg yes) enable_static=yes ;; 922267ab2ff2Smrg no) enable_static=no ;; 922367ab2ff2Smrg *) 922467ab2ff2Smrg enable_static=no 922567ab2ff2Smrg # Look at the argument we got. We use all the common list separators. 922667ab2ff2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 922767ab2ff2Smrg for pkg in $enableval; do 922867ab2ff2Smrg IFS="$lt_save_ifs" 922967ab2ff2Smrg if test "X$pkg" = "X$p"; then 923067ab2ff2Smrg enable_static=yes 923167ab2ff2Smrg fi 923267ab2ff2Smrg done 923367ab2ff2Smrg IFS="$lt_save_ifs" 923467ab2ff2Smrg ;; 923567ab2ff2Smrg esac], 923667ab2ff2Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9237f05b35a2Smrg 923867ab2ff2Smrg _LT_DECL([build_old_libs], [enable_static], [0], 923967ab2ff2Smrg [Whether or not to build static libraries]) 924067ab2ff2Smrg])# _LT_ENABLE_STATIC 9241f05b35a2Smrg 924267ab2ff2SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 924367ab2ff2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9244e0963edeSmrg 924567ab2ff2Smrg# Old names: 924667ab2ff2SmrgAC_DEFUN([AC_ENABLE_STATIC], 924767ab2ff2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 924867ab2ff2Smrg]) 9249e0963edeSmrg 925067ab2ff2SmrgAC_DEFUN([AC_DISABLE_STATIC], 925167ab2ff2Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 925267ab2ff2Smrg]) 9253e0963edeSmrg 925467ab2ff2SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 925567ab2ff2SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9256e0963edeSmrg 925767ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 925867ab2ff2Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 925967ab2ff2Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9260e0963edeSmrg 9261e0963edeSmrg 9262e0963edeSmrg 926367ab2ff2Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 926467ab2ff2Smrg# ---------------------------------- 926567ab2ff2Smrg# implement the --enable-fast-install flag, and support the `fast-install' 926667ab2ff2Smrg# and `disable-fast-install' LT_INIT options. 926767ab2ff2Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 926867ab2ff2Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 926967ab2ff2Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 927067ab2ff2SmrgAC_ARG_ENABLE([fast-install], 927167ab2ff2Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 927267ab2ff2Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 927367ab2ff2Smrg [p=${PACKAGE-default} 927467ab2ff2Smrg case $enableval in 927567ab2ff2Smrg yes) enable_fast_install=yes ;; 927667ab2ff2Smrg no) enable_fast_install=no ;; 927767ab2ff2Smrg *) 927867ab2ff2Smrg enable_fast_install=no 927967ab2ff2Smrg # Look at the argument we got. We use all the common list separators. 928067ab2ff2Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 928167ab2ff2Smrg for pkg in $enableval; do 928267ab2ff2Smrg IFS="$lt_save_ifs" 928367ab2ff2Smrg if test "X$pkg" = "X$p"; then 928467ab2ff2Smrg enable_fast_install=yes 928567ab2ff2Smrg fi 928667ab2ff2Smrg done 928767ab2ff2Smrg IFS="$lt_save_ifs" 928867ab2ff2Smrg ;; 928967ab2ff2Smrg esac], 929067ab2ff2Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9291e0963edeSmrg 929267ab2ff2Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 929367ab2ff2Smrg [Whether or not to optimize for fast installation])dnl 929467ab2ff2Smrg])# _LT_ENABLE_FAST_INSTALL 9295e0963edeSmrg 929667ab2ff2SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 929767ab2ff2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9298e0963edeSmrg 929967ab2ff2Smrg# Old names: 930067ab2ff2SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 930167ab2ff2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 930267ab2ff2SmrgAC_DIAGNOSE([obsolete], 930367ab2ff2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 930467ab2ff2Smrgthe `fast-install' option into LT_INIT's first parameter.]) 930567ab2ff2Smrg]) 930649e108a1Smrg 930767ab2ff2SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 930867ab2ff2Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 930967ab2ff2SmrgAC_DIAGNOSE([obsolete], 931067ab2ff2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 931167ab2ff2Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 931267ab2ff2Smrg]) 931349e108a1Smrg 931467ab2ff2Smrgdnl aclocal-1.4 backwards compatibility: 931567ab2ff2Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 931667ab2ff2Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 931749e108a1Smrg 931849e108a1Smrg 931967ab2ff2Smrg# _LT_WITH_PIC([MODE]) 932067ab2ff2Smrg# -------------------- 932167ab2ff2Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 932267ab2ff2Smrg# LT_INIT options. 932367ab2ff2Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 932467ab2ff2Smrgm4_define([_LT_WITH_PIC], 932567ab2ff2Smrg[AC_ARG_WITH([pic], 9326e494fffdSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 932767ab2ff2Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9328e494fffdSmrg [lt_p=${PACKAGE-default} 9329e494fffdSmrg case $withval in 9330e494fffdSmrg yes|no) pic_mode=$withval ;; 9331e494fffdSmrg *) 9332e494fffdSmrg pic_mode=default 9333e494fffdSmrg # Look at the argument we got. We use all the common list separators. 9334e494fffdSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9335e494fffdSmrg for lt_pkg in $withval; do 9336e494fffdSmrg IFS="$lt_save_ifs" 9337e494fffdSmrg if test "X$lt_pkg" = "X$lt_p"; then 9338e494fffdSmrg pic_mode=yes 9339e494fffdSmrg fi 9340e494fffdSmrg done 9341e494fffdSmrg IFS="$lt_save_ifs" 9342e494fffdSmrg ;; 9343e494fffdSmrg esac], 934467ab2ff2Smrg [pic_mode=default]) 934567ab2ff2Smrg 934667ab2ff2Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 934749e108a1Smrg 934867ab2ff2Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 934967ab2ff2Smrg])# _LT_WITH_PIC 935067ab2ff2Smrg 935167ab2ff2SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 935267ab2ff2SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 9353e0963edeSmrg 935449e108a1Smrg# Old name: 935567ab2ff2SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 935667ab2ff2Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 935767ab2ff2SmrgAC_DIAGNOSE([obsolete], 935867ab2ff2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 935967ab2ff2Smrgput the `pic-only' option into LT_INIT's first parameter.]) 936067ab2ff2Smrg]) 936167ab2ff2Smrg 936249e108a1Smrgdnl aclocal-1.4 backwards compatibility: 936367ab2ff2Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9364e0963edeSmrg 9365e0963edeSmrg 936667ab2ff2Smrgm4_define([_LTDL_MODE], []) 936767ab2ff2SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 936867ab2ff2Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 936967ab2ff2SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 937067ab2ff2Smrg [m4_define([_LTDL_MODE], [recursive])]) 937167ab2ff2SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 937267ab2ff2Smrg [m4_define([_LTDL_MODE], [subproject])]) 9373e0963edeSmrg 937467ab2ff2Smrgm4_define([_LTDL_TYPE], []) 937567ab2ff2SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 937667ab2ff2Smrg [m4_define([_LTDL_TYPE], [installable])]) 937767ab2ff2SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 937867ab2ff2Smrg [m4_define([_LTDL_TYPE], [convenience])]) 9379e0963edeSmrg 938067ab2ff2Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 938167ab2ff2Smrg# 938267ab2ff2Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 938367ab2ff2Smrg# Written by Gary V. Vaughan, 2004 938467ab2ff2Smrg# 938567ab2ff2Smrg# This file is free software; the Free Software Foundation gives 938667ab2ff2Smrg# unlimited permission to copy and/or distribute it, with or without 938767ab2ff2Smrg# modifications, as long as this notice is preserved. 9388e0963edeSmrg 938967ab2ff2Smrg# serial 6 ltsugar.m4 9390f05b35a2Smrg 939167ab2ff2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 939267ab2ff2SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9393f05b35a2Smrg 939467ab2ff2Smrg 939567ab2ff2Smrg# lt_join(SEP, ARG1, [ARG2...]) 939667ab2ff2Smrg# ----------------------------- 939767ab2ff2Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 939867ab2ff2Smrg# associated separator. 939967ab2ff2Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 940067ab2ff2Smrg# versions in m4sugar had bugs. 940167ab2ff2Smrgm4_define([lt_join], 940267ab2ff2Smrg[m4_if([$#], [1], [], 940367ab2ff2Smrg [$#], [2], [[$2]], 940467ab2ff2Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 940567ab2ff2Smrgm4_define([_lt_join], 940667ab2ff2Smrg[m4_if([$#$2], [2], [], 940767ab2ff2Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9408e0963edeSmrg 9409e0963edeSmrg 941067ab2ff2Smrg# lt_car(LIST) 941167ab2ff2Smrg# lt_cdr(LIST) 941249e108a1Smrg# ------------ 941367ab2ff2Smrg# Manipulate m4 lists. 941467ab2ff2Smrg# These macros are necessary as long as will still need to support 941567ab2ff2Smrg# Autoconf-2.59 which quotes differently. 941667ab2ff2Smrgm4_define([lt_car], [[$1]]) 941767ab2ff2Smrgm4_define([lt_cdr], 941867ab2ff2Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 941967ab2ff2Smrg [$#], 1, [], 942067ab2ff2Smrg [m4_dquote(m4_shift($@))])]) 942167ab2ff2Smrgm4_define([lt_unquote], $1) 9422f05b35a2Smrg 9423f05b35a2Smrg 942467ab2ff2Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 942567ab2ff2Smrg# ------------------------------------------ 942667ab2ff2Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 942767ab2ff2Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 942867ab2ff2Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 942967ab2ff2Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 943067ab2ff2Smrg# than defined and empty). 943167ab2ff2Smrg# 943267ab2ff2Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 943367ab2ff2Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 943467ab2ff2Smrgm4_define([lt_append], 943567ab2ff2Smrg[m4_define([$1], 943667ab2ff2Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 9437e0963edeSmrg 9438e0963edeSmrg 9439e0963edeSmrg 944067ab2ff2Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 944167ab2ff2Smrg# ---------------------------------------------------------- 944267ab2ff2Smrg# Produce a SEP delimited list of all paired combinations of elements of 944367ab2ff2Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 944467ab2ff2Smrg# has the form PREFIXmINFIXSUFFIXn. 944567ab2ff2Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 944667ab2ff2Smrgm4_define([lt_combine], 944767ab2ff2Smrg[m4_if(m4_eval([$# > 3]), [1], 944867ab2ff2Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 944967ab2ff2Smrg[[m4_foreach([_Lt_prefix], [$2], 945067ab2ff2Smrg [m4_foreach([_Lt_suffix], 945167ab2ff2Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 945267ab2ff2Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9453e0963edeSmrg 9454e0963edeSmrg 945567ab2ff2Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 945667ab2ff2Smrg# ----------------------------------------------------------------------- 945767ab2ff2Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 945867ab2ff2Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 945967ab2ff2Smrgm4_define([lt_if_append_uniq], 946067ab2ff2Smrg[m4_ifdef([$1], 946167ab2ff2Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 946267ab2ff2Smrg [lt_append([$1], [$2], [$3])$4], 946367ab2ff2Smrg [$5])], 946467ab2ff2Smrg [lt_append([$1], [$2], [$3])$4])]) 9465e0963edeSmrg 946667ab2ff2Smrg 946767ab2ff2Smrg# lt_dict_add(DICT, KEY, VALUE) 946867ab2ff2Smrg# ----------------------------- 946967ab2ff2Smrgm4_define([lt_dict_add], 947067ab2ff2Smrg[m4_define([$1($2)], [$3])]) 947167ab2ff2Smrg 947267ab2ff2Smrg 947367ab2ff2Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 947467ab2ff2Smrg# -------------------------------------------- 947567ab2ff2Smrgm4_define([lt_dict_add_subkey], 947667ab2ff2Smrg[m4_define([$1($2:$3)], [$4])]) 9477e0963edeSmrg 9478e0963edeSmrg 947967ab2ff2Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 948067ab2ff2Smrg# ---------------------------------- 948167ab2ff2Smrgm4_define([lt_dict_fetch], 948267ab2ff2Smrg[m4_ifval([$3], 948367ab2ff2Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 948467ab2ff2Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9485e0963edeSmrg 9486e0963edeSmrg 948767ab2ff2Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 948867ab2ff2Smrg# ----------------------------------------------------------------- 948967ab2ff2Smrgm4_define([lt_if_dict_fetch], 949067ab2ff2Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 949167ab2ff2Smrg [$5], 949267ab2ff2Smrg [$6])]) 9493e0963edeSmrg 9494e0963edeSmrg 949567ab2ff2Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 949667ab2ff2Smrg# -------------------------------------------------------------- 949767ab2ff2Smrgm4_define([lt_dict_filter], 949867ab2ff2Smrg[m4_if([$5], [], [], 949967ab2ff2Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 950067ab2ff2Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 950167ab2ff2Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 950267ab2ff2Smrg]) 9503f05b35a2Smrg 950467ab2ff2Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 950567ab2ff2Smrg# 950667ab2ff2Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 950767ab2ff2Smrg# Written by Scott James Remnant, 2004 950867ab2ff2Smrg# 950967ab2ff2Smrg# This file is free software; the Free Software Foundation gives 951067ab2ff2Smrg# unlimited permission to copy and/or distribute it, with or without 951167ab2ff2Smrg# modifications, as long as this notice is preserved. 9512e0963edeSmrg 951367ab2ff2Smrg# @configure_input@ 9514e0963edeSmrg 9515e494fffdSmrg# serial 3337 ltversion.m4 951667ab2ff2Smrg# This file is part of GNU Libtool 9517e0963edeSmrg 9518e494fffdSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 9519e494fffdSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 952049e108a1Smrg 952167ab2ff2SmrgAC_DEFUN([LTVERSION_VERSION], 9522e494fffdSmrg[macro_version='2.4.2' 9523e494fffdSmrgmacro_revision='1.3337' 952467ab2ff2Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 952567ab2ff2Smrg_LT_DECL(, macro_revision, 0) 952667ab2ff2Smrg]) 952749e108a1Smrg 952867ab2ff2Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 952967ab2ff2Smrg# 953067ab2ff2Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 953167ab2ff2Smrg# Written by Scott James Remnant, 2004. 953267ab2ff2Smrg# 953367ab2ff2Smrg# This file is free software; the Free Software Foundation gives 953467ab2ff2Smrg# unlimited permission to copy and/or distribute it, with or without 953567ab2ff2Smrg# modifications, as long as this notice is preserved. 9536e0963edeSmrg 953767ab2ff2Smrg# serial 5 lt~obsolete.m4 953867ab2ff2Smrg 953967ab2ff2Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 954067ab2ff2Smrg# 954167ab2ff2Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 954267ab2ff2Smrg# which have later been changed to m4_define as they aren't part of the 954367ab2ff2Smrg# exported API, or moved to Autoconf or Automake where they belong. 954467ab2ff2Smrg# 954567ab2ff2Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 954667ab2ff2Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 954767ab2ff2Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 954867ab2ff2Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 954967ab2ff2Smrg# and doesn't know about Autoconf macros at all.) 955067ab2ff2Smrg# 955167ab2ff2Smrg# So we provide this file, which has a silly filename so it's always 955267ab2ff2Smrg# included after everything else. This provides aclocal with the 955367ab2ff2Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 955467ab2ff2Smrg# because those macros already exist, or will be overwritten later. 955567ab2ff2Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 955667ab2ff2Smrg# 955767ab2ff2Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 955867ab2ff2Smrg# Yes, that means every name once taken will need to remain here until 955967ab2ff2Smrg# we give up compatibility with versions before 1.7, at which point 956067ab2ff2Smrg# we need to keep only those names which we still refer to. 9561f05b35a2Smrg 956267ab2ff2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 956367ab2ff2SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9564e0963edeSmrg 956567ab2ff2Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 956667ab2ff2Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 956767ab2ff2Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 956867ab2ff2Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 956967ab2ff2Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 957067ab2ff2Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 957167ab2ff2Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 957267ab2ff2Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 957367ab2ff2Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 957467ab2ff2Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 957567ab2ff2Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 957667ab2ff2Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 957767ab2ff2Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 957867ab2ff2Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 957967ab2ff2Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 958067ab2ff2Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 958167ab2ff2Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 958267ab2ff2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 958367ab2ff2Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 958467ab2ff2Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 958567ab2ff2Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 958667ab2ff2Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 958767ab2ff2Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 958867ab2ff2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 958967ab2ff2Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 959067ab2ff2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 959167ab2ff2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 959267ab2ff2Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 959367ab2ff2Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 959467ab2ff2Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 959567ab2ff2Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 959667ab2ff2Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 959767ab2ff2Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 959867ab2ff2Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 959967ab2ff2Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 960067ab2ff2Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 960167ab2ff2Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 960267ab2ff2Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 960367ab2ff2Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 960467ab2ff2Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 960567ab2ff2Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 960667ab2ff2Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 960767ab2ff2Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 960867ab2ff2Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 960967ab2ff2Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 961067ab2ff2Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 961167ab2ff2Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 961267ab2ff2Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 961367ab2ff2Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 961467ab2ff2Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 961567ab2ff2Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 961667ab2ff2Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 961767ab2ff2Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 961867ab2ff2Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 961967ab2ff2Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 962067ab2ff2Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 962167ab2ff2Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 962267ab2ff2Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 962367ab2ff2Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 962467ab2ff2Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 962567ab2ff2Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 962667ab2ff2Smrg 9627e494fffdSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9628e494fffdSmrg# 9629e494fffdSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9630e494fffdSmrg# 9631e494fffdSmrg# This program is free software; you can redistribute it and/or modify 9632e494fffdSmrg# it under the terms of the GNU General Public License as published by 9633e494fffdSmrg# the Free Software Foundation; either version 2 of the License, or 9634e494fffdSmrg# (at your option) any later version. 9635e494fffdSmrg# 9636e494fffdSmrg# This program is distributed in the hope that it will be useful, but 9637e494fffdSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9638e494fffdSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9639e494fffdSmrg# General Public License for more details. 9640e494fffdSmrg# 9641e494fffdSmrg# You should have received a copy of the GNU General Public License 9642e494fffdSmrg# along with this program; if not, write to the Free Software 9643e494fffdSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9644e494fffdSmrg# 9645e494fffdSmrg# As a special exception to the GNU General Public License, if you 9646e494fffdSmrg# distribute this file as part of a program that contains a 9647e494fffdSmrg# configuration script generated by Autoconf, you may include it under 9648e494fffdSmrg# the same distribution terms that you use for the rest of that program. 9649e494fffdSmrg 9650e494fffdSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9651e494fffdSmrg# ---------------------------------- 9652e494fffdSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9653e494fffdSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9654e494fffdSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9655e494fffdSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9656e494fffdSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9657e494fffdSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9658e494fffdSmrgfi 9659e494fffdSmrgif test -n "$PKG_CONFIG"; then 9660e494fffdSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 9661e494fffdSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9662e494fffdSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9663e494fffdSmrg AC_MSG_RESULT([yes]) 9664e494fffdSmrg else 9665e494fffdSmrg AC_MSG_RESULT([no]) 9666e494fffdSmrg PKG_CONFIG="" 9667e494fffdSmrg fi 9668e494fffdSmrg 9669e494fffdSmrgfi[]dnl 9670e494fffdSmrg])# PKG_PROG_PKG_CONFIG 9671e494fffdSmrg 9672e494fffdSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9673e494fffdSmrg# 9674e494fffdSmrg# Check to see whether a particular set of modules exists. Similar 9675e494fffdSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9676e494fffdSmrg# 9677e494fffdSmrg# 9678e494fffdSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9679e494fffdSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 9680e494fffdSmrg# PKG_CHECK_EXISTS manually 9681e494fffdSmrg# -------------------------------------------------------------- 9682e494fffdSmrgAC_DEFUN([PKG_CHECK_EXISTS], 9683e494fffdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9684e494fffdSmrgif test -n "$PKG_CONFIG" && \ 9685e494fffdSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9686e494fffdSmrg m4_ifval([$2], [$2], [:]) 9687e494fffdSmrgm4_ifvaln([$3], [else 9688e494fffdSmrg $3])dnl 9689e494fffdSmrgfi]) 9690e494fffdSmrg 9691e494fffdSmrg 9692e494fffdSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9693e494fffdSmrg# --------------------------------------------- 9694e494fffdSmrgm4_define([_PKG_CONFIG], 9695e494fffdSmrg[if test -n "$$1"; then 9696e494fffdSmrg pkg_cv_[]$1="$$1" 9697e494fffdSmrg elif test -n "$PKG_CONFIG"; then 9698e494fffdSmrg PKG_CHECK_EXISTS([$3], 9699e494fffdSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9700e494fffdSmrg [pkg_failed=yes]) 9701e494fffdSmrg else 9702e494fffdSmrg pkg_failed=untried 9703e494fffdSmrgfi[]dnl 9704e494fffdSmrg])# _PKG_CONFIG 9705e494fffdSmrg 9706e494fffdSmrg# _PKG_SHORT_ERRORS_SUPPORTED 9707e494fffdSmrg# ----------------------------- 9708e494fffdSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9709e494fffdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9710e494fffdSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9711e494fffdSmrg _pkg_short_errors_supported=yes 9712e494fffdSmrgelse 9713e494fffdSmrg _pkg_short_errors_supported=no 9714e494fffdSmrgfi[]dnl 9715e494fffdSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 9716e494fffdSmrg 9717e494fffdSmrg 9718e494fffdSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9719e494fffdSmrg# [ACTION-IF-NOT-FOUND]) 9720e494fffdSmrg# 9721e494fffdSmrg# 9722e494fffdSmrg# Note that if there is a possibility the first call to 9723e494fffdSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 9724e494fffdSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9725e494fffdSmrg# 9726e494fffdSmrg# 9727e494fffdSmrg# -------------------------------------------------------------- 9728e494fffdSmrgAC_DEFUN([PKG_CHECK_MODULES], 9729e494fffdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9730e494fffdSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9731e494fffdSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9732e494fffdSmrg 9733e494fffdSmrgpkg_failed=no 9734e494fffdSmrgAC_MSG_CHECKING([for $1]) 9735e494fffdSmrg 9736e494fffdSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9737e494fffdSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9738e494fffdSmrg 9739e494fffdSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9740e494fffdSmrgand $1[]_LIBS to avoid the need to call pkg-config. 9741e494fffdSmrgSee the pkg-config man page for more details.]) 9742e494fffdSmrg 9743e494fffdSmrgif test $pkg_failed = yes; then 9744e494fffdSmrg _PKG_SHORT_ERRORS_SUPPORTED 9745e494fffdSmrg if test $_pkg_short_errors_supported = yes; then 9746e494fffdSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9747e494fffdSmrg else 9748e494fffdSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9749e494fffdSmrg fi 9750e494fffdSmrg # Put the nasty error message in config.log where it belongs 9751e494fffdSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9752e494fffdSmrg 9753e494fffdSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 9754e494fffdSmrg[Package requirements ($2) were not met: 9755e494fffdSmrg 9756e494fffdSmrg$$1_PKG_ERRORS 9757e494fffdSmrg 9758e494fffdSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9759e494fffdSmrginstalled software in a non-standard prefix. 9760e494fffdSmrg 9761e494fffdSmrg_PKG_TEXT 9762e494fffdSmrg])], 9763e494fffdSmrg [AC_MSG_RESULT([no]) 9764e494fffdSmrg $4]) 9765e494fffdSmrgelif test $pkg_failed = untried; then 9766e494fffdSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 9767e494fffdSmrg[The pkg-config script could not be found or is too old. Make sure it 9768e494fffdSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 9769e494fffdSmrgpath to pkg-config. 9770e494fffdSmrg 9771e494fffdSmrg_PKG_TEXT 9772e494fffdSmrg 9773e494fffdSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9774e494fffdSmrg [$4]) 9775e494fffdSmrgelse 9776e494fffdSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9777e494fffdSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9778e494fffdSmrg AC_MSG_RESULT([yes]) 9779e494fffdSmrg ifelse([$3], , :, [$3]) 9780e494fffdSmrgfi[]dnl 9781e494fffdSmrg])# PKG_CHECK_MODULES 9782e494fffdSmrg 978367ab2ff2Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 978467ab2ff2Smrgdnl 978567ab2ff2Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 978667ab2ff2Smrgdnl 978767ab2ff2Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 978867ab2ff2Smrgdnl copy of this software and associated documentation files (the "Software"), 978967ab2ff2Smrgdnl to deal in the Software without restriction, including without limitation 979067ab2ff2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 979167ab2ff2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 979267ab2ff2Smrgdnl Software is furnished to do so, subject to the following conditions: 979367ab2ff2Smrgdnl 979467ab2ff2Smrgdnl The above copyright notice and this permission notice (including the next 979567ab2ff2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 979667ab2ff2Smrgdnl Software. 979767ab2ff2Smrgdnl 979867ab2ff2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 979967ab2ff2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 980067ab2ff2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 980167ab2ff2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 980267ab2ff2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 980367ab2ff2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 980467ab2ff2Smrgdnl DEALINGS IN THE SOFTWARE. 9805e0963edeSmrg 980667ab2ff2Smrg# XORG_MACROS_VERSION(required-version) 980767ab2ff2Smrg# ------------------------------------- 980867ab2ff2Smrg# Minimum version: 1.1.0 980967ab2ff2Smrg# 981067ab2ff2Smrg# If you're using a macro added in Version 1.1 or newer, include this in 981167ab2ff2Smrg# your configure.ac with the minimum required version, such as: 981267ab2ff2Smrg# XORG_MACROS_VERSION(1.1) 981367ab2ff2Smrg# 981467ab2ff2Smrg# To ensure that this macro is defined, also add: 981567ab2ff2Smrg# m4_ifndef([XORG_MACROS_VERSION], 981667ab2ff2Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 981767ab2ff2Smrg# 981867ab2ff2Smrg# 981967ab2ff2Smrg# See the "minimum version" comment for each macro you use to see what 982067ab2ff2Smrg# version you require. 982167ab2ff2Smrgm4_defun([XORG_MACROS_VERSION],[ 9822e494fffdSmrgm4_define([vers_have], [1.17]) 982367ab2ff2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 982467ab2ff2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 982567ab2ff2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 982667ab2ff2Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 982767ab2ff2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 982867ab2ff2Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 982967ab2ff2Smrgm4_undefine([vers_have]) 983067ab2ff2Smrgm4_undefine([maj_have]) 983167ab2ff2Smrgm4_undefine([maj_needed]) 983267ab2ff2Smrg]) # XORG_MACROS_VERSION 9833e0963edeSmrg 983467ab2ff2Smrg# XORG_PROG_RAWCPP() 983567ab2ff2Smrg# ------------------ 983667ab2ff2Smrg# Minimum version: 1.0.0 983767ab2ff2Smrg# 983867ab2ff2Smrg# Find cpp program and necessary flags for use in pre-processing text files 983967ab2ff2Smrg# such as man pages and config files 984067ab2ff2SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 984167ab2ff2SmrgAC_REQUIRE([AC_PROG_CPP]) 984267ab2ff2SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 984367ab2ff2Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9844e0963edeSmrg 984567ab2ff2Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 984667ab2ff2Smrg# which is not the best choice for supporting other OS'es, but covers most 984767ab2ff2Smrg# of the ones we need for now. 984867ab2ff2SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 984967ab2ff2SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 985067ab2ff2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 985167ab2ff2Smrg AC_MSG_RESULT([no]) 985267ab2ff2Smrgelse 985367ab2ff2Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 985467ab2ff2Smrg RAWCPPFLAGS=-undef 985567ab2ff2Smrg AC_MSG_RESULT([yes]) 985667ab2ff2Smrg # under Cygwin unix is still defined even with -undef 985767ab2ff2Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 985867ab2ff2Smrg RAWCPPFLAGS="-undef -ansi" 985967ab2ff2Smrg AC_MSG_RESULT([yes, with -ansi]) 986067ab2ff2Smrg else 986167ab2ff2Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 986267ab2ff2Smrg fi 986367ab2ff2Smrgfi 986467ab2ff2Smrgrm -f conftest.$ac_ext 986549e108a1Smrg 986667ab2ff2SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 986767ab2ff2SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 986867ab2ff2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 986967ab2ff2Smrg AC_MSG_RESULT([no]) 987067ab2ff2Smrgelse 987167ab2ff2Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 987267ab2ff2Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 987367ab2ff2Smrg AC_MSG_RESULT([yes]) 987467ab2ff2Smrg else 987567ab2ff2Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 987667ab2ff2Smrg fi 987767ab2ff2Smrgfi 987867ab2ff2Smrgrm -f conftest.$ac_ext 987967ab2ff2SmrgAC_SUBST(RAWCPPFLAGS) 988067ab2ff2Smrg]) # XORG_PROG_RAWCPP 988149e108a1Smrg 988267ab2ff2Smrg# XORG_MANPAGE_SECTIONS() 988367ab2ff2Smrg# ----------------------- 988467ab2ff2Smrg# Minimum version: 1.0.0 988567ab2ff2Smrg# 988667ab2ff2Smrg# Determine which sections man pages go in for the different man page types 988767ab2ff2Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 988867ab2ff2Smrg# Not sure if there's any better way than just hardcoding by OS name. 988967ab2ff2Smrg# Override default settings by setting environment variables 989067ab2ff2Smrg# Added MAN_SUBSTS in version 1.8 989167ab2ff2Smrg# Added AC_PROG_SED in version 1.8 989249e108a1Smrg 989367ab2ff2SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 989467ab2ff2SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 989567ab2ff2SmrgAC_REQUIRE([AC_PROG_SED]) 989649e108a1Smrg 989767ab2ff2Smrgif test x$APP_MAN_SUFFIX = x ; then 989867ab2ff2Smrg APP_MAN_SUFFIX=1 989967ab2ff2Smrgfi 990067ab2ff2Smrgif test x$APP_MAN_DIR = x ; then 990167ab2ff2Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 990267ab2ff2Smrgfi 990349e108a1Smrg 990467ab2ff2Smrgif test x$LIB_MAN_SUFFIX = x ; then 990567ab2ff2Smrg LIB_MAN_SUFFIX=3 990667ab2ff2Smrgfi 990767ab2ff2Smrgif test x$LIB_MAN_DIR = x ; then 990867ab2ff2Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 990967ab2ff2Smrgfi 991049e108a1Smrg 991167ab2ff2Smrgif test x$FILE_MAN_SUFFIX = x ; then 991267ab2ff2Smrg case $host_os in 991367ab2ff2Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 991467ab2ff2Smrg *) FILE_MAN_SUFFIX=5 ;; 991567ab2ff2Smrg esac 991667ab2ff2Smrgfi 991767ab2ff2Smrgif test x$FILE_MAN_DIR = x ; then 991867ab2ff2Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 991967ab2ff2Smrgfi 992049e108a1Smrg 992167ab2ff2Smrgif test x$MISC_MAN_SUFFIX = x ; then 992267ab2ff2Smrg case $host_os in 992367ab2ff2Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 992467ab2ff2Smrg *) MISC_MAN_SUFFIX=7 ;; 992567ab2ff2Smrg esac 992667ab2ff2Smrgfi 992767ab2ff2Smrgif test x$MISC_MAN_DIR = x ; then 992867ab2ff2Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 992967ab2ff2Smrgfi 993049e108a1Smrg 993167ab2ff2Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 993267ab2ff2Smrg case $host_os in 993367ab2ff2Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 993467ab2ff2Smrg *) DRIVER_MAN_SUFFIX=4 ;; 993567ab2ff2Smrg esac 993667ab2ff2Smrgfi 993767ab2ff2Smrgif test x$DRIVER_MAN_DIR = x ; then 993867ab2ff2Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 993967ab2ff2Smrgfi 9940e0963edeSmrg 994167ab2ff2Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 994267ab2ff2Smrg case $host_os in 994367ab2ff2Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 994467ab2ff2Smrg *) ADMIN_MAN_SUFFIX=8 ;; 994567ab2ff2Smrg esac 994667ab2ff2Smrgfi 994767ab2ff2Smrgif test x$ADMIN_MAN_DIR = x ; then 994867ab2ff2Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 994967ab2ff2Smrgfi 9950e0963edeSmrg 9951e0963edeSmrg 995267ab2ff2SmrgAC_SUBST([APP_MAN_SUFFIX]) 995367ab2ff2SmrgAC_SUBST([LIB_MAN_SUFFIX]) 995467ab2ff2SmrgAC_SUBST([FILE_MAN_SUFFIX]) 995567ab2ff2SmrgAC_SUBST([MISC_MAN_SUFFIX]) 995667ab2ff2SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 995767ab2ff2SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 995867ab2ff2SmrgAC_SUBST([APP_MAN_DIR]) 995967ab2ff2SmrgAC_SUBST([LIB_MAN_DIR]) 996067ab2ff2SmrgAC_SUBST([FILE_MAN_DIR]) 996167ab2ff2SmrgAC_SUBST([MISC_MAN_DIR]) 996267ab2ff2SmrgAC_SUBST([DRIVER_MAN_DIR]) 996367ab2ff2SmrgAC_SUBST([ADMIN_MAN_DIR]) 9964e0963edeSmrg 996567ab2ff2SmrgXORG_MAN_PAGE="X Version 11" 996667ab2ff2SmrgAC_SUBST([XORG_MAN_PAGE]) 996767ab2ff2SmrgMAN_SUBSTS="\ 996867ab2ff2Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 996967ab2ff2Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 997067ab2ff2Smrg -e 's|__xservername__|Xorg|g' \ 997167ab2ff2Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 997267ab2ff2Smrg -e 's|__projectroot__|\$(prefix)|g' \ 997367ab2ff2Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 997467ab2ff2Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 997567ab2ff2Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 997667ab2ff2Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 997767ab2ff2Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 997867ab2ff2Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 997967ab2ff2Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 998067ab2ff2SmrgAC_SUBST([MAN_SUBSTS]) 9981f05b35a2Smrg 998267ab2ff2Smrg]) # XORG_MANPAGE_SECTIONS 9983f05b35a2Smrg 998467ab2ff2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 998567ab2ff2Smrg# ------------------------ 998667ab2ff2Smrg# Minimum version: 1.7.0 998767ab2ff2Smrg# 998867ab2ff2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 998967ab2ff2Smrg# provided by xorg-sgml-doctools, if installed. 999067ab2ff2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 999167ab2ff2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 999267ab2ff2SmrgXORG_SGML_PATH= 999367ab2ff2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 999467ab2ff2Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 999567ab2ff2Smrg [m4_ifval([$1],[:], 999667ab2ff2Smrg [if test x"$cross_compiling" != x"yes" ; then 999767ab2ff2Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 999867ab2ff2Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 999967ab2ff2Smrg fi]) 1000067ab2ff2Smrg ]) 10001f05b35a2Smrg 1000267ab2ff2Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1000367ab2ff2Smrg# the path and the name of the doc stylesheet 1000467ab2ff2Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1000567ab2ff2Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1000667ab2ff2Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1000767ab2ff2Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1000867ab2ff2Smrgelse 1000967ab2ff2Smrg AC_MSG_RESULT([no]) 1001067ab2ff2Smrgfi 10011f05b35a2Smrg 1001267ab2ff2SmrgAC_SUBST(XORG_SGML_PATH) 1001367ab2ff2SmrgAC_SUBST(STYLESHEET_SRCDIR) 1001467ab2ff2SmrgAC_SUBST(XSL_STYLESHEET) 1001567ab2ff2SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1001667ab2ff2Smrg]) # XORG_CHECK_SGML_DOCTOOLS 10017e0963edeSmrg 1001867ab2ff2Smrg# XORG_CHECK_LINUXDOC 1001967ab2ff2Smrg# ------------------- 1002067ab2ff2Smrg# Minimum version: 1.0.0 1002167ab2ff2Smrg# 1002267ab2ff2Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1002367ab2ff2Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1002467ab2ff2Smrg# Whether or not the necessary tools and files are found can be checked 1002567ab2ff2Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1002667ab2ff2SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1002767ab2ff2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1002867ab2ff2SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10029f05b35a2Smrg 1003067ab2ff2SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10031e0963edeSmrg 1003267ab2ff2SmrgAC_MSG_CHECKING([whether to build documentation]) 10033e0963edeSmrg 1003467ab2ff2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1003567ab2ff2Smrg BUILDDOC=yes 1003667ab2ff2Smrgelse 1003767ab2ff2Smrg BUILDDOC=no 1003867ab2ff2Smrgfi 10039e0963edeSmrg 1004067ab2ff2SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10041e0963edeSmrg 1004267ab2ff2SmrgAC_MSG_RESULT([$BUILDDOC]) 10043e0963edeSmrg 1004467ab2ff2SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10045e0963edeSmrg 1004667ab2ff2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1004767ab2ff2Smrg BUILDPDFDOC=yes 1004867ab2ff2Smrgelse 1004967ab2ff2Smrg BUILDPDFDOC=no 1005067ab2ff2Smrgfi 10051f05b35a2Smrg 1005267ab2ff2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10053e0963edeSmrg 1005467ab2ff2SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10055e0963edeSmrg 1005667ab2ff2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1005767ab2ff2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1005867ab2ff2SmrgMAKE_PDF="$PS2PDF" 1005967ab2ff2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1006049e108a1Smrg 1006167ab2ff2SmrgAC_SUBST(MAKE_TEXT) 1006267ab2ff2SmrgAC_SUBST(MAKE_PS) 1006367ab2ff2SmrgAC_SUBST(MAKE_PDF) 1006467ab2ff2SmrgAC_SUBST(MAKE_HTML) 1006567ab2ff2Smrg]) # XORG_CHECK_LINUXDOC 1006649e108a1Smrg 1006767ab2ff2Smrg# XORG_CHECK_DOCBOOK 1006867ab2ff2Smrg# ------------------- 1006967ab2ff2Smrg# Minimum version: 1.0.0 1007067ab2ff2Smrg# 1007167ab2ff2Smrg# Checks for the ability to build output formats from SGML DocBook source. 1007267ab2ff2Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1007367ab2ff2Smrg# indicates whether the necessary tools and files are found and, if set, 1007467ab2ff2Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1007567ab2ff2SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1007667ab2ff2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10077e0963edeSmrg 1007867ab2ff2SmrgBUILDTXTDOC=no 1007967ab2ff2SmrgBUILDPDFDOC=no 1008067ab2ff2SmrgBUILDPSDOC=no 1008167ab2ff2SmrgBUILDHTMLDOC=no 10082e0963edeSmrg 1008367ab2ff2SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1008467ab2ff2SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1008567ab2ff2SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1008667ab2ff2SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10087e0963edeSmrg 1008867ab2ff2SmrgAC_MSG_CHECKING([whether to build text documentation]) 1008967ab2ff2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1009067ab2ff2Smrg test x$BUILD_TXTDOC != xno; then 1009167ab2ff2Smrg BUILDTXTDOC=yes 1009267ab2ff2Smrgfi 1009367ab2ff2SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1009467ab2ff2SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10095e0963edeSmrg 1009667ab2ff2SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1009767ab2ff2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1009867ab2ff2Smrg test x$BUILD_PDFDOC != xno; then 1009967ab2ff2Smrg BUILDPDFDOC=yes 1010067ab2ff2Smrgfi 1010167ab2ff2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1010267ab2ff2SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10103e0963edeSmrg 1010467ab2ff2SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1010567ab2ff2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1010667ab2ff2Smrg test x$BUILD_PSDOC != xno; then 1010767ab2ff2Smrg BUILDPSDOC=yes 1010867ab2ff2Smrgfi 1010967ab2ff2SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1011067ab2ff2SmrgAC_MSG_RESULT([$BUILDPSDOC]) 10111e0963edeSmrg 1011267ab2ff2SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1011367ab2ff2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1011467ab2ff2Smrg test x$BUILD_HTMLDOC != xno; then 1011567ab2ff2Smrg BUILDHTMLDOC=yes 1011667ab2ff2Smrgfi 1011767ab2ff2SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1011867ab2ff2SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10119e0963edeSmrg 1012067ab2ff2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1012167ab2ff2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1012267ab2ff2SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1012367ab2ff2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10124e0963edeSmrg 1012567ab2ff2SmrgAC_SUBST(MAKE_TEXT) 1012667ab2ff2SmrgAC_SUBST(MAKE_PS) 1012767ab2ff2SmrgAC_SUBST(MAKE_PDF) 1012867ab2ff2SmrgAC_SUBST(MAKE_HTML) 1012967ab2ff2Smrg]) # XORG_CHECK_DOCBOOK 10130e0963edeSmrg 1013167ab2ff2Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1013267ab2ff2Smrg# ---------------- 1013367ab2ff2Smrg# Minimum version: 1.5.0 1013467ab2ff2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1013567ab2ff2Smrg# 1013667ab2ff2Smrg# Documentation tools are not always available on all platforms and sometimes 1013767ab2ff2Smrg# not at the appropriate level. This macro enables a module to test for the 1013867ab2ff2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1013967ab2ff2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1014067ab2ff2Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1014167ab2ff2Smrg# --with-xmlto assumes 'auto'. 1014267ab2ff2Smrg# 1014367ab2ff2Smrg# Interface to module: 1014467ab2ff2Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1014567ab2ff2Smrg# XMLTO: returns the path of the xmlto program found 1014667ab2ff2Smrg# returns the path set by the user in the environment 1014767ab2ff2Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1014867ab2ff2Smrg# 'no' user instructs the module not to use xmlto 1014967ab2ff2Smrg# 1015067ab2ff2Smrg# Added in version 1.10.0 1015167ab2ff2Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1015267ab2ff2Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1015367ab2ff2Smrg# 1015467ab2ff2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1015567ab2ff2Smrg# 1015667ab2ff2SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1015767ab2ff2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1015867ab2ff2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1015967ab2ff2SmrgAC_ARG_WITH(xmlto, 1016067ab2ff2Smrg AS_HELP_STRING([--with-xmlto], 1016167ab2ff2Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1016267ab2ff2Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1016367ab2ff2Smrgm4_undefine([_defopt]) 10164f05b35a2Smrg 1016567ab2ff2Smrgif test "x$use_xmlto" = x"auto"; then 1016667ab2ff2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1016767ab2ff2Smrg if test "x$XMLTO" = "x"; then 1016867ab2ff2Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1016967ab2ff2Smrg have_xmlto=no 1017067ab2ff2Smrg else 1017167ab2ff2Smrg have_xmlto=yes 1017267ab2ff2Smrg fi 1017367ab2ff2Smrgelif test "x$use_xmlto" = x"yes" ; then 1017467ab2ff2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1017567ab2ff2Smrg if test "x$XMLTO" = "x"; then 1017667ab2ff2Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1017767ab2ff2Smrg fi 1017867ab2ff2Smrg have_xmlto=yes 1017967ab2ff2Smrgelif test "x$use_xmlto" = x"no" ; then 1018067ab2ff2Smrg if test "x$XMLTO" != "x"; then 1018167ab2ff2Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1018267ab2ff2Smrg fi 1018367ab2ff2Smrg have_xmlto=no 1018467ab2ff2Smrgelse 1018567ab2ff2Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1018667ab2ff2Smrgfi 10187e0963edeSmrg 1018867ab2ff2Smrg# Test for a minimum version of xmlto, if provided. 1018967ab2ff2Smrgm4_ifval([$1], 1019067ab2ff2Smrg[if test "$have_xmlto" = yes; then 1019167ab2ff2Smrg # scrape the xmlto version 1019267ab2ff2Smrg AC_MSG_CHECKING([the xmlto version]) 1019367ab2ff2Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1019467ab2ff2Smrg AC_MSG_RESULT([$xmlto_version]) 1019567ab2ff2Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1019667ab2ff2Smrg [if test "x$use_xmlto" = xauto; then 1019767ab2ff2Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1019867ab2ff2Smrg have_xmlto=no 1019967ab2ff2Smrg else 1020067ab2ff2Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1020167ab2ff2Smrg fi]) 1020267ab2ff2Smrgfi]) 10203e0963edeSmrg 1020467ab2ff2Smrg# Test for the ability of xmlto to generate a text target 1020567ab2ff2Smrghave_xmlto_text=no 1020667ab2ff2Smrgcat > conftest.xml << "EOF" 1020767ab2ff2SmrgEOF 1020867ab2ff2SmrgAS_IF([test "$have_xmlto" = yes], 1020967ab2ff2Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1021067ab2ff2Smrg [have_xmlto_text=yes], 1021167ab2ff2Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1021267ab2ff2Smrgrm -f conftest.xml 1021367ab2ff2SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1021467ab2ff2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1021567ab2ff2Smrg]) # XORG_WITH_XMLTO 1021649e108a1Smrg 1021767ab2ff2Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1021867ab2ff2Smrg# -------------------------------------------- 1021967ab2ff2Smrg# Minimum version: 1.12.0 1022067ab2ff2Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1022167ab2ff2Smrg# 1022267ab2ff2Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1022367ab2ff2Smrg# XML-based language used for the transformation of XML documents. 1022467ab2ff2Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1022567ab2ff2Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1022667ab2ff2Smrg# The XSLT processor is often used as a standalone tool for transformations. 1022767ab2ff2Smrg# It should not be assumed that this tool is used only to work with documnetation. 1022867ab2ff2Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1022967ab2ff2Smrg# 1023067ab2ff2Smrg# Interface to module: 1023167ab2ff2Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1023267ab2ff2Smrg# XSLTPROC: returns the path of the xsltproc program found 1023367ab2ff2Smrg# returns the path set by the user in the environment 1023467ab2ff2Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1023567ab2ff2Smrg# 'no' user instructs the module not to use xsltproc 1023667ab2ff2Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1023767ab2ff2Smrg# 1023867ab2ff2Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1023967ab2ff2Smrg# 1024067ab2ff2SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1024167ab2ff2SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1024267ab2ff2Smrg# Preserves the interface, should it be implemented later 1024367ab2ff2Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1024467ab2ff2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1024567ab2ff2SmrgAC_ARG_WITH(xsltproc, 1024667ab2ff2Smrg AS_HELP_STRING([--with-xsltproc], 1024767ab2ff2Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1024867ab2ff2Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1024967ab2ff2Smrgm4_undefine([_defopt]) 1025067ab2ff2Smrg 1025167ab2ff2Smrgif test "x$use_xsltproc" = x"auto"; then 1025267ab2ff2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1025367ab2ff2Smrg if test "x$XSLTPROC" = "x"; then 1025467ab2ff2Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1025567ab2ff2Smrg have_xsltproc=no 1025667ab2ff2Smrg else 1025767ab2ff2Smrg have_xsltproc=yes 1025867ab2ff2Smrg fi 1025967ab2ff2Smrgelif test "x$use_xsltproc" = x"yes" ; then 1026067ab2ff2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1026167ab2ff2Smrg if test "x$XSLTPROC" = "x"; then 1026267ab2ff2Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1026367ab2ff2Smrg fi 1026467ab2ff2Smrg have_xsltproc=yes 1026567ab2ff2Smrgelif test "x$use_xsltproc" = x"no" ; then 1026667ab2ff2Smrg if test "x$XSLTPROC" != "x"; then 1026767ab2ff2Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1026867ab2ff2Smrg fi 1026967ab2ff2Smrg have_xsltproc=no 1027067ab2ff2Smrgelse 1027167ab2ff2Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1027267ab2ff2Smrgfi 1027349e108a1Smrg 1027467ab2ff2SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1027567ab2ff2Smrg]) # XORG_WITH_XSLTPROC 1027649e108a1Smrg 1027767ab2ff2Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1027867ab2ff2Smrg# ---------------------------------------- 1027967ab2ff2Smrg# Minimum version: 1.15.0 1028067ab2ff2Smrg# 1028167ab2ff2Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1028267ab2ff2Smrg# scanning arbitrary text files, extracting information from those text files, 1028367ab2ff2Smrg# and printing reports based on that information. 1028467ab2ff2Smrg# 1028567ab2ff2Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1028667ab2ff2Smrg# 1028767ab2ff2Smrg# Interface to module: 1028867ab2ff2Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1028967ab2ff2Smrg# PERL: returns the path of the perl program found 1029067ab2ff2Smrg# returns the path set by the user in the environment 1029167ab2ff2Smrg# --with-perl: 'yes' user instructs the module to use perl 1029267ab2ff2Smrg# 'no' user instructs the module not to use perl 1029367ab2ff2Smrg# have_perl: returns yes if perl found in PATH or no 1029467ab2ff2Smrg# 1029567ab2ff2Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1029667ab2ff2Smrg# 1029767ab2ff2SmrgAC_DEFUN([XORG_WITH_PERL],[ 1029867ab2ff2SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1029967ab2ff2Smrg# Preserves the interface, should it be implemented later 1030067ab2ff2Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1030167ab2ff2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1030267ab2ff2SmrgAC_ARG_WITH(perl, 1030367ab2ff2Smrg AS_HELP_STRING([--with-perl], 1030467ab2ff2Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1030567ab2ff2Smrg [use_perl=$withval], [use_perl=]_defopt) 1030667ab2ff2Smrgm4_undefine([_defopt]) 1030767ab2ff2Smrg 1030867ab2ff2Smrgif test "x$use_perl" = x"auto"; then 1030967ab2ff2Smrg AC_PATH_PROG([PERL], [perl]) 1031067ab2ff2Smrg if test "x$PERL" = "x"; then 1031167ab2ff2Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1031267ab2ff2Smrg have_perl=no 1031367ab2ff2Smrg else 1031467ab2ff2Smrg have_perl=yes 1031567ab2ff2Smrg fi 1031667ab2ff2Smrgelif test "x$use_perl" = x"yes" ; then 1031767ab2ff2Smrg AC_PATH_PROG([PERL], [perl]) 1031867ab2ff2Smrg if test "x$PERL" = "x"; then 1031967ab2ff2Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1032067ab2ff2Smrg fi 1032167ab2ff2Smrg have_perl=yes 1032267ab2ff2Smrgelif test "x$use_perl" = x"no" ; then 1032367ab2ff2Smrg if test "x$PERL" != "x"; then 1032467ab2ff2Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1032567ab2ff2Smrg fi 1032667ab2ff2Smrg have_perl=no 1032767ab2ff2Smrgelse 1032867ab2ff2Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1032967ab2ff2Smrgfi 10330e0963edeSmrg 1033167ab2ff2SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1033267ab2ff2Smrg]) # XORG_WITH_PERL 10333e0963edeSmrg 1033467ab2ff2Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1033567ab2ff2Smrg# ---------------- 1033667ab2ff2Smrg# Minimum version: 1.5.0 1033767ab2ff2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1033867ab2ff2Smrg# 1033967ab2ff2Smrg# Documentation tools are not always available on all platforms and sometimes 1034067ab2ff2Smrg# not at the appropriate level. This macro enables a module to test for the 1034167ab2ff2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1034267ab2ff2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1034367ab2ff2Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1034467ab2ff2Smrg# --with-asciidoc assumes 'auto'. 1034567ab2ff2Smrg# 1034667ab2ff2Smrg# Interface to module: 1034767ab2ff2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1034867ab2ff2Smrg# ASCIIDOC: returns the path of the asciidoc program found 1034967ab2ff2Smrg# returns the path set by the user in the environment 1035067ab2ff2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1035167ab2ff2Smrg# 'no' user instructs the module not to use asciidoc 1035267ab2ff2Smrg# 1035367ab2ff2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1035467ab2ff2Smrg# 1035567ab2ff2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1035667ab2ff2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1035767ab2ff2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1035867ab2ff2SmrgAC_ARG_WITH(asciidoc, 1035967ab2ff2Smrg AS_HELP_STRING([--with-asciidoc], 1036067ab2ff2Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1036167ab2ff2Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1036267ab2ff2Smrgm4_undefine([_defopt]) 10363e0963edeSmrg 1036467ab2ff2Smrgif test "x$use_asciidoc" = x"auto"; then 1036567ab2ff2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1036667ab2ff2Smrg if test "x$ASCIIDOC" = "x"; then 1036767ab2ff2Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1036867ab2ff2Smrg have_asciidoc=no 1036967ab2ff2Smrg else 1037067ab2ff2Smrg have_asciidoc=yes 1037167ab2ff2Smrg fi 1037267ab2ff2Smrgelif test "x$use_asciidoc" = x"yes" ; then 1037367ab2ff2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1037467ab2ff2Smrg if test "x$ASCIIDOC" = "x"; then 1037567ab2ff2Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1037667ab2ff2Smrg fi 1037767ab2ff2Smrg have_asciidoc=yes 1037867ab2ff2Smrgelif test "x$use_asciidoc" = x"no" ; then 1037967ab2ff2Smrg if test "x$ASCIIDOC" != "x"; then 1038067ab2ff2Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1038167ab2ff2Smrg fi 1038267ab2ff2Smrg have_asciidoc=no 1038367ab2ff2Smrgelse 1038467ab2ff2Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1038567ab2ff2Smrgfi 1038667ab2ff2Smrgm4_ifval([$1], 1038767ab2ff2Smrg[if test "$have_asciidoc" = yes; then 1038867ab2ff2Smrg # scrape the asciidoc version 1038967ab2ff2Smrg AC_MSG_CHECKING([the asciidoc version]) 1039067ab2ff2Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1039167ab2ff2Smrg AC_MSG_RESULT([$asciidoc_version]) 1039267ab2ff2Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1039367ab2ff2Smrg [if test "x$use_asciidoc" = xauto; then 1039467ab2ff2Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1039567ab2ff2Smrg have_asciidoc=no 1039667ab2ff2Smrg else 1039767ab2ff2Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1039867ab2ff2Smrg fi]) 1039967ab2ff2Smrgfi]) 1040067ab2ff2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1040167ab2ff2Smrg]) # XORG_WITH_ASCIIDOC 10402e0963edeSmrg 1040367ab2ff2Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1040467ab2ff2Smrg# -------------------------------- 1040567ab2ff2Smrg# Minimum version: 1.5.0 1040667ab2ff2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1040767ab2ff2Smrg# 1040867ab2ff2Smrg# Documentation tools are not always available on all platforms and sometimes 1040967ab2ff2Smrg# not at the appropriate level. This macro enables a module to test for the 1041067ab2ff2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1041167ab2ff2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1041267ab2ff2Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1041367ab2ff2Smrg# --with-doxygen assumes 'auto'. 1041467ab2ff2Smrg# 1041567ab2ff2Smrg# Interface to module: 1041667ab2ff2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1041767ab2ff2Smrg# DOXYGEN: returns the path of the doxygen program found 1041867ab2ff2Smrg# returns the path set by the user in the environment 1041967ab2ff2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1042067ab2ff2Smrg# 'no' user instructs the module not to use doxygen 1042167ab2ff2Smrg# 1042267ab2ff2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1042367ab2ff2Smrg# 1042467ab2ff2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1042567ab2ff2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1042667ab2ff2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1042767ab2ff2SmrgAC_ARG_WITH(doxygen, 1042867ab2ff2Smrg AS_HELP_STRING([--with-doxygen], 1042967ab2ff2Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1043067ab2ff2Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1043167ab2ff2Smrgm4_undefine([_defopt]) 10432e0963edeSmrg 1043367ab2ff2Smrgif test "x$use_doxygen" = x"auto"; then 1043467ab2ff2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1043567ab2ff2Smrg if test "x$DOXYGEN" = "x"; then 1043667ab2ff2Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1043767ab2ff2Smrg have_doxygen=no 1043867ab2ff2Smrg else 1043967ab2ff2Smrg have_doxygen=yes 1044067ab2ff2Smrg fi 1044167ab2ff2Smrgelif test "x$use_doxygen" = x"yes" ; then 1044267ab2ff2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1044367ab2ff2Smrg if test "x$DOXYGEN" = "x"; then 1044467ab2ff2Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1044567ab2ff2Smrg fi 1044667ab2ff2Smrg have_doxygen=yes 1044767ab2ff2Smrgelif test "x$use_doxygen" = x"no" ; then 1044867ab2ff2Smrg if test "x$DOXYGEN" != "x"; then 1044967ab2ff2Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1045067ab2ff2Smrg fi 1045167ab2ff2Smrg have_doxygen=no 1045267ab2ff2Smrgelse 1045367ab2ff2Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1045467ab2ff2Smrgfi 1045567ab2ff2Smrgm4_ifval([$1], 1045667ab2ff2Smrg[if test "$have_doxygen" = yes; then 1045767ab2ff2Smrg # scrape the doxygen version 1045867ab2ff2Smrg AC_MSG_CHECKING([the doxygen version]) 1045967ab2ff2Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1046067ab2ff2Smrg AC_MSG_RESULT([$doxygen_version]) 1046167ab2ff2Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1046267ab2ff2Smrg [if test "x$use_doxygen" = xauto; then 1046367ab2ff2Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1046467ab2ff2Smrg have_doxygen=no 1046567ab2ff2Smrg else 1046667ab2ff2Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1046767ab2ff2Smrg fi]) 1046867ab2ff2Smrgfi]) 1046967ab2ff2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1047067ab2ff2Smrg]) # XORG_WITH_DOXYGEN 10471e0963edeSmrg 1047267ab2ff2Smrg# XORG_WITH_GROFF([DEFAULT]) 1047367ab2ff2Smrg# ---------------- 1047467ab2ff2Smrg# Minimum version: 1.6.0 1047567ab2ff2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1047667ab2ff2Smrg# 1047767ab2ff2Smrg# Documentation tools are not always available on all platforms and sometimes 1047867ab2ff2Smrg# not at the appropriate level. This macro enables a module to test for the 1047967ab2ff2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1048067ab2ff2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1048167ab2ff2Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1048267ab2ff2Smrg# --with-groff assumes 'auto'. 1048367ab2ff2Smrg# 1048467ab2ff2Smrg# Interface to module: 1048567ab2ff2Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1048667ab2ff2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1048767ab2ff2Smrg# HAVE_GROFF_MS: the -ms macros package 1048867ab2ff2Smrg# GROFF: returns the path of the groff program found 1048967ab2ff2Smrg# returns the path set by the user in the environment 1049067ab2ff2Smrg# --with-groff: 'yes' user instructs the module to use groff 1049167ab2ff2Smrg# 'no' user instructs the module not to use groff 1049267ab2ff2Smrg# 1049367ab2ff2Smrg# Added in version 1.9.0: 1049467ab2ff2Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1049567ab2ff2Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1049667ab2ff2Smrg# psselect from the psutils package. 1049767ab2ff2Smrg# the ghostcript package. Refer to the grohtml man pages 1049867ab2ff2Smrg# 1049967ab2ff2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1050067ab2ff2Smrg# 1050167ab2ff2Smrg# OS and distros often splits groff in a basic and full package, the former 1050267ab2ff2Smrg# having the groff program and the later having devices, fonts and macros 1050367ab2ff2Smrg# Checking for the groff executable is not enough. 1050467ab2ff2Smrg# 1050567ab2ff2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1050667ab2ff2Smrg# unset HAVE_GROFF or GROFF env variables. 1050767ab2ff2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1050867ab2ff2Smrg# 1050967ab2ff2SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1051067ab2ff2SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1051167ab2ff2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1051267ab2ff2SmrgAC_ARG_WITH(groff, 1051367ab2ff2Smrg AS_HELP_STRING([--with-groff], 1051467ab2ff2Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1051567ab2ff2Smrg [use_groff=$withval], [use_groff=]_defopt) 1051667ab2ff2Smrgm4_undefine([_defopt]) 10517e0963edeSmrg 1051867ab2ff2Smrgif test "x$use_groff" = x"auto"; then 1051967ab2ff2Smrg AC_PATH_PROG([GROFF], [groff]) 1052067ab2ff2Smrg if test "x$GROFF" = "x"; then 1052167ab2ff2Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1052267ab2ff2Smrg have_groff=no 1052367ab2ff2Smrg else 1052467ab2ff2Smrg have_groff=yes 1052567ab2ff2Smrg fi 1052667ab2ff2Smrgelif test "x$use_groff" = x"yes" ; then 1052767ab2ff2Smrg AC_PATH_PROG([GROFF], [groff]) 1052867ab2ff2Smrg if test "x$GROFF" = "x"; then 1052967ab2ff2Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1053067ab2ff2Smrg fi 1053167ab2ff2Smrg have_groff=yes 1053267ab2ff2Smrgelif test "x$use_groff" = x"no" ; then 1053367ab2ff2Smrg if test "x$GROFF" != "x"; then 1053467ab2ff2Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1053567ab2ff2Smrg fi 1053667ab2ff2Smrg have_groff=no 1053767ab2ff2Smrgelse 1053867ab2ff2Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1053967ab2ff2Smrgfi 10540e0963edeSmrg 1054167ab2ff2Smrg# We have groff, test for the presence of the macro packages 1054267ab2ff2Smrgif test "x$have_groff" = x"yes"; then 1054367ab2ff2Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1054467ab2ff2Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1054567ab2ff2Smrg groff_ms_works=yes 1054667ab2ff2Smrg else 1054767ab2ff2Smrg groff_ms_works=no 1054867ab2ff2Smrg fi 1054967ab2ff2Smrg AC_MSG_RESULT([$groff_ms_works]) 1055067ab2ff2Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1055167ab2ff2Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1055267ab2ff2Smrg groff_mm_works=yes 1055367ab2ff2Smrg else 1055467ab2ff2Smrg groff_mm_works=no 1055567ab2ff2Smrg fi 1055667ab2ff2Smrg AC_MSG_RESULT([$groff_mm_works]) 1055767ab2ff2Smrgfi 10558e0963edeSmrg 1055967ab2ff2Smrg# We have groff, test for HTML dependencies, one command per package 1056067ab2ff2Smrgif test "x$have_groff" = x"yes"; then 1056167ab2ff2Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1056267ab2ff2Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1056367ab2ff2Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1056467ab2ff2Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1056567ab2ff2Smrg have_groff_html=yes 1056667ab2ff2Smrg else 1056767ab2ff2Smrg have_groff_html=no 1056867ab2ff2Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1056967ab2ff2Smrg fi 1057067ab2ff2Smrgfi 10571e0963edeSmrg 1057267ab2ff2Smrg# Set Automake conditionals for Makefiles 1057367ab2ff2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1057467ab2ff2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1057567ab2ff2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1057667ab2ff2SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1057767ab2ff2Smrg]) # XORG_WITH_GROFF 10578e0963edeSmrg 1057967ab2ff2Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1058067ab2ff2Smrg# --------------------------------------- 1058167ab2ff2Smrg# Minimum version: 1.6.0 1058267ab2ff2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1058367ab2ff2Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1058467ab2ff2Smrg# 1058567ab2ff2Smrg# Documentation tools are not always available on all platforms and sometimes 1058667ab2ff2Smrg# not at the appropriate level. This macro enables a module to test for the 1058767ab2ff2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1058867ab2ff2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1058967ab2ff2Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1059067ab2ff2Smrg# --with-fop assumes 'auto'. 1059167ab2ff2Smrg# 1059267ab2ff2Smrg# Interface to module: 1059367ab2ff2Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1059467ab2ff2Smrg# FOP: returns the path of the fop program found 1059567ab2ff2Smrg# returns the path set by the user in the environment 1059667ab2ff2Smrg# --with-fop: 'yes' user instructs the module to use fop 1059767ab2ff2Smrg# 'no' user instructs the module not to use fop 1059867ab2ff2Smrg# 1059967ab2ff2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1060067ab2ff2Smrg# 1060167ab2ff2SmrgAC_DEFUN([XORG_WITH_FOP],[ 1060267ab2ff2SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1060367ab2ff2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1060467ab2ff2SmrgAC_ARG_WITH(fop, 1060567ab2ff2Smrg AS_HELP_STRING([--with-fop], 1060667ab2ff2Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1060767ab2ff2Smrg [use_fop=$withval], [use_fop=]_defopt) 1060867ab2ff2Smrgm4_undefine([_defopt]) 10609e0963edeSmrg 1061067ab2ff2Smrgif test "x$use_fop" = x"auto"; then 1061167ab2ff2Smrg AC_PATH_PROG([FOP], [fop]) 1061267ab2ff2Smrg if test "x$FOP" = "x"; then 1061367ab2ff2Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1061467ab2ff2Smrg have_fop=no 1061567ab2ff2Smrg else 1061667ab2ff2Smrg have_fop=yes 1061767ab2ff2Smrg fi 1061867ab2ff2Smrgelif test "x$use_fop" = x"yes" ; then 1061967ab2ff2Smrg AC_PATH_PROG([FOP], [fop]) 1062067ab2ff2Smrg if test "x$FOP" = "x"; then 1062167ab2ff2Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1062267ab2ff2Smrg fi 1062367ab2ff2Smrg have_fop=yes 1062467ab2ff2Smrgelif test "x$use_fop" = x"no" ; then 1062567ab2ff2Smrg if test "x$FOP" != "x"; then 1062667ab2ff2Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1062767ab2ff2Smrg fi 1062867ab2ff2Smrg have_fop=no 1062967ab2ff2Smrgelse 1063067ab2ff2Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1063167ab2ff2Smrgfi 10632e0963edeSmrg 1063367ab2ff2Smrg# Test for a minimum version of fop, if provided. 1063467ab2ff2Smrgm4_ifval([$1], 1063567ab2ff2Smrg[if test "$have_fop" = yes; then 1063667ab2ff2Smrg # scrape the fop version 1063767ab2ff2Smrg AC_MSG_CHECKING([for fop minimum version]) 1063867ab2ff2Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1063967ab2ff2Smrg AC_MSG_RESULT([$fop_version]) 1064067ab2ff2Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1064167ab2ff2Smrg [if test "x$use_fop" = xauto; then 1064267ab2ff2Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1064367ab2ff2Smrg have_fop=no 1064467ab2ff2Smrg else 1064567ab2ff2Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1064667ab2ff2Smrg fi]) 1064767ab2ff2Smrgfi]) 1064867ab2ff2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1064967ab2ff2Smrg]) # XORG_WITH_FOP 10650e0963edeSmrg 1065167ab2ff2Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1065267ab2ff2Smrg# ---------------- 1065367ab2ff2Smrg# Minimum version: 1.6.0 1065467ab2ff2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1065567ab2ff2Smrg# 1065667ab2ff2Smrg# Documentation tools are not always available on all platforms and sometimes 1065767ab2ff2Smrg# not at the appropriate level. This macro enables a module to test for the 1065867ab2ff2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1065967ab2ff2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1066067ab2ff2Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1066167ab2ff2Smrg# --with-ps2pdf assumes 'auto'. 1066267ab2ff2Smrg# 1066367ab2ff2Smrg# Interface to module: 1066467ab2ff2Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1066567ab2ff2Smrg# PS2PDF: returns the path of the ps2pdf program found 1066667ab2ff2Smrg# returns the path set by the user in the environment 1066767ab2ff2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1066867ab2ff2Smrg# 'no' user instructs the module not to use ps2pdf 1066967ab2ff2Smrg# 1067067ab2ff2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1067167ab2ff2Smrg# 1067267ab2ff2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1067367ab2ff2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1067467ab2ff2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1067567ab2ff2SmrgAC_ARG_WITH(ps2pdf, 1067667ab2ff2Smrg AS_HELP_STRING([--with-ps2pdf], 1067767ab2ff2Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1067867ab2ff2Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1067967ab2ff2Smrgm4_undefine([_defopt]) 10680f05b35a2Smrg 1068167ab2ff2Smrgif test "x$use_ps2pdf" = x"auto"; then 1068267ab2ff2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1068367ab2ff2Smrg if test "x$PS2PDF" = "x"; then 1068467ab2ff2Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1068567ab2ff2Smrg have_ps2pdf=no 1068667ab2ff2Smrg else 1068767ab2ff2Smrg have_ps2pdf=yes 1068867ab2ff2Smrg fi 1068967ab2ff2Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1069067ab2ff2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1069167ab2ff2Smrg if test "x$PS2PDF" = "x"; then 1069267ab2ff2Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1069367ab2ff2Smrg fi 1069467ab2ff2Smrg have_ps2pdf=yes 1069567ab2ff2Smrgelif test "x$use_ps2pdf" = x"no" ; then 1069667ab2ff2Smrg if test "x$PS2PDF" != "x"; then 1069767ab2ff2Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1069867ab2ff2Smrg fi 1069967ab2ff2Smrg have_ps2pdf=no 1070067ab2ff2Smrgelse 1070167ab2ff2Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1070267ab2ff2Smrgfi 1070367ab2ff2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1070467ab2ff2Smrg]) # XORG_WITH_PS2PDF 1070549e108a1Smrg 1070667ab2ff2Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1070767ab2ff2Smrg# ---------------- 1070867ab2ff2Smrg# Minimum version: 1.6.0 1070967ab2ff2Smrg# 1071067ab2ff2Smrg# Documentation tools are not always available on all platforms and sometimes 1071167ab2ff2Smrg# not at the appropriate level. This macro enables a builder to skip all 1071267ab2ff2Smrg# documentation targets except traditional man pages. 1071367ab2ff2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1071467ab2ff2Smrg# maximum flexibilty in controlling documentation building. 1071567ab2ff2Smrg# Refer to: 1071667ab2ff2Smrg# XORG_WITH_XMLTO --with-xmlto 1071767ab2ff2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1071867ab2ff2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1071967ab2ff2Smrg# XORG_WITH_FOP --with-fop 1072067ab2ff2Smrg# XORG_WITH_GROFF --with-groff 1072167ab2ff2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1072267ab2ff2Smrg# 1072367ab2ff2Smrg# Interface to module: 1072467ab2ff2Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1072567ab2ff2Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1072667ab2ff2Smrg# 'no' user instructs the module not to generate docs 1072767ab2ff2Smrg# parm1: specify the default value, yes or no. 1072867ab2ff2Smrg# 1072967ab2ff2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1073067ab2ff2Smrgm4_define([docs_default], m4_default([$1], [yes])) 1073167ab2ff2SmrgAC_ARG_ENABLE(docs, 1073267ab2ff2Smrg AS_HELP_STRING([--enable-docs], 1073367ab2ff2Smrg [Enable building the documentation (default: ]docs_default[)]), 1073467ab2ff2Smrg [build_docs=$enableval], [build_docs=]docs_default) 1073567ab2ff2Smrgm4_undefine([docs_default]) 1073667ab2ff2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1073767ab2ff2SmrgAC_MSG_CHECKING([whether to build documentation]) 1073867ab2ff2SmrgAC_MSG_RESULT([$build_docs]) 1073967ab2ff2Smrg]) # XORG_ENABLE_DOCS 10740f05b35a2Smrg 1074167ab2ff2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1074267ab2ff2Smrg# ---------------- 1074367ab2ff2Smrg# Minimum version: 1.6.0 1074467ab2ff2Smrg# 1074567ab2ff2Smrg# This macro enables a builder to skip all developer documentation. 1074667ab2ff2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1074767ab2ff2Smrg# maximum flexibilty in controlling documentation building. 1074867ab2ff2Smrg# Refer to: 1074967ab2ff2Smrg# XORG_WITH_XMLTO --with-xmlto 1075067ab2ff2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1075167ab2ff2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1075267ab2ff2Smrg# XORG_WITH_FOP --with-fop 1075367ab2ff2Smrg# XORG_WITH_GROFF --with-groff 1075467ab2ff2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1075567ab2ff2Smrg# 1075667ab2ff2Smrg# Interface to module: 1075767ab2ff2Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1075867ab2ff2Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1075967ab2ff2Smrg# 'no' user instructs the module not to generate developer docs 1076067ab2ff2Smrg# parm1: specify the default value, yes or no. 1076167ab2ff2Smrg# 1076267ab2ff2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1076367ab2ff2Smrgm4_define([devel_default], m4_default([$1], [yes])) 1076467ab2ff2SmrgAC_ARG_ENABLE(devel-docs, 1076567ab2ff2Smrg AS_HELP_STRING([--enable-devel-docs], 1076667ab2ff2Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1076767ab2ff2Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1076867ab2ff2Smrgm4_undefine([devel_default]) 1076967ab2ff2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1077067ab2ff2SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1077167ab2ff2SmrgAC_MSG_RESULT([$build_devel_docs]) 1077267ab2ff2Smrg]) # XORG_ENABLE_DEVEL_DOCS 10773f05b35a2Smrg 1077467ab2ff2Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1077567ab2ff2Smrg# ---------------- 1077667ab2ff2Smrg# Minimum version: 1.6.0 1077767ab2ff2Smrg# 1077867ab2ff2Smrg# This macro enables a builder to skip all functional specification targets. 1077967ab2ff2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1078067ab2ff2Smrg# maximum flexibilty in controlling documentation building. 1078167ab2ff2Smrg# Refer to: 1078267ab2ff2Smrg# XORG_WITH_XMLTO --with-xmlto 1078367ab2ff2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1078467ab2ff2Smrg# XORG_WITH_DOXYGEN --with-doxygen 1078567ab2ff2Smrg# XORG_WITH_FOP --with-fop 1078667ab2ff2Smrg# XORG_WITH_GROFF --with-groff 1078767ab2ff2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1078867ab2ff2Smrg# 1078967ab2ff2Smrg# Interface to module: 1079067ab2ff2Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1079167ab2ff2Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1079267ab2ff2Smrg# 'no' user instructs the module not to generate specs 1079367ab2ff2Smrg# parm1: specify the default value, yes or no. 1079467ab2ff2Smrg# 1079567ab2ff2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1079667ab2ff2Smrgm4_define([spec_default], m4_default([$1], [yes])) 1079767ab2ff2SmrgAC_ARG_ENABLE(specs, 1079867ab2ff2Smrg AS_HELP_STRING([--enable-specs], 1079967ab2ff2Smrg [Enable building the specs (default: ]spec_default[)]), 1080067ab2ff2Smrg [build_specs=$enableval], [build_specs=]spec_default) 1080167ab2ff2Smrgm4_undefine([spec_default]) 1080267ab2ff2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1080367ab2ff2SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1080467ab2ff2SmrgAC_MSG_RESULT([$build_specs]) 1080567ab2ff2Smrg]) # XORG_ENABLE_SPECS 10806f05b35a2Smrg 1080767ab2ff2Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1080867ab2ff2Smrg# ---------------------------------------------- 1080967ab2ff2Smrg# Minimum version: 1.13.0 1081067ab2ff2Smrg# 1081167ab2ff2Smrg# This macro enables a builder to enable/disable unit testing 1081267ab2ff2Smrg# It makes no assumption about the test cases implementation 1081367ab2ff2Smrg# Test cases may or may not use Automake "Support for test suites" 1081467ab2ff2Smrg# They may or may not use the software utility library GLib 1081567ab2ff2Smrg# 1081667ab2ff2Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1081767ab2ff2Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1081867ab2ff2Smrg# The variable enable_unit_tests is used by other macros in this file. 1081967ab2ff2Smrg# 1082067ab2ff2Smrg# Interface to module: 1082167ab2ff2Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1082267ab2ff2Smrg# enable_unit_tests: used in configure.ac for additional configuration 1082367ab2ff2Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1082467ab2ff2Smrg# 'no' user instructs the module not to build tests 1082567ab2ff2Smrg# parm1: specify the default value, yes or no. 1082667ab2ff2Smrg# 1082767ab2ff2SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1082867ab2ff2SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1082967ab2ff2SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1083067ab2ff2SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1083167ab2ff2Smrgm4_define([_defopt], m4_default([$1], [auto])) 1083267ab2ff2SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1083367ab2ff2Smrg [Enable building unit test cases (default: ]_defopt[)]), 1083467ab2ff2Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1083567ab2ff2Smrgm4_undefine([_defopt]) 1083667ab2ff2SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1083767ab2ff2SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1083867ab2ff2SmrgAC_MSG_RESULT([$enable_unit_tests]) 1083967ab2ff2Smrg]) # XORG_ENABLE_UNIT_TESTS 1084067ab2ff2Smrg 10841e494fffdSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10842e494fffdSmrg# ------------------------------------------------------ 10843e494fffdSmrg# Minimum version: 1.17.0 10844e494fffdSmrg# 10845e494fffdSmrg# This macro enables a builder to enable/disable integration testing 10846e494fffdSmrg# It makes no assumption about the test cases' implementation 10847e494fffdSmrg# Test cases may or may not use Automake "Support for test suites" 10848e494fffdSmrg# 10849e494fffdSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10850e494fffdSmrg# usually requires less dependencies and may be built and run under less 10851e494fffdSmrg# stringent environments than integration tests. 10852e494fffdSmrg# 10853e494fffdSmrg# Interface to module: 10854e494fffdSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10855e494fffdSmrg# enable_integration_tests: used in configure.ac for additional configuration 10856e494fffdSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10857e494fffdSmrg# 'no' user instructs the module not to build tests 10858e494fffdSmrg# parm1: specify the default value, yes or no. 10859e494fffdSmrg# 10860e494fffdSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10861e494fffdSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10862e494fffdSmrgm4_define([_defopt], m4_default([$1], [auto])) 10863e494fffdSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10864e494fffdSmrg [Enable building integration test cases (default: ]_defopt[)]), 10865e494fffdSmrg [enable_integration_tests=$enableval], 10866e494fffdSmrg [enable_integration_tests=]_defopt) 10867e494fffdSmrgm4_undefine([_defopt]) 10868e494fffdSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10869e494fffdSmrg [test "x$enable_integration_tests" != xno]) 10870e494fffdSmrgAC_MSG_CHECKING([whether to build unit test cases]) 10871e494fffdSmrgAC_MSG_RESULT([$enable_integration_tests]) 10872e494fffdSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 10873e494fffdSmrg 1087467ab2ff2Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1087567ab2ff2Smrg# ---------------------------------------- 1087667ab2ff2Smrg# Minimum version: 1.13.0 1087767ab2ff2Smrg# 1087867ab2ff2Smrg# GLib is a library which provides advanced data structures and functions. 1087967ab2ff2Smrg# This macro enables a module to test for the presence of Glib. 1088067ab2ff2Smrg# 1088167ab2ff2Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1088267ab2ff2Smrg# Otherwise the value of $enable_unit_tests is blank. 1088367ab2ff2Smrg# 10884e494fffdSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10885e494fffdSmrg# test support usually requires less dependencies and may be built and run under 10886e494fffdSmrg# less stringent environments than integration tests. 10887e494fffdSmrg# 1088867ab2ff2Smrg# Interface to module: 1088967ab2ff2Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1089067ab2ff2Smrg# with_glib: used in configure.ac to know if GLib has been found 1089167ab2ff2Smrg# --with-glib: 'yes' user instructs the module to use glib 1089267ab2ff2Smrg# 'no' user instructs the module not to use glib 1089367ab2ff2Smrg# 1089467ab2ff2SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1089567ab2ff2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1089667ab2ff2Smrgm4_define([_defopt], m4_default([$2], [auto])) 1089767ab2ff2SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1089867ab2ff2Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1089967ab2ff2Smrg [with_glib=$withval], [with_glib=]_defopt) 1090067ab2ff2Smrgm4_undefine([_defopt]) 1090167ab2ff2Smrg 1090267ab2ff2Smrghave_glib=no 1090367ab2ff2Smrg# Do not probe GLib if user explicitly disabled unit testing 1090467ab2ff2Smrgif test "x$enable_unit_tests" != x"no"; then 1090567ab2ff2Smrg # Do not probe GLib if user explicitly disabled it 1090667ab2ff2Smrg if test "x$with_glib" != x"no"; then 1090767ab2ff2Smrg m4_ifval( 1090867ab2ff2Smrg [$1], 1090967ab2ff2Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1091067ab2ff2Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1091167ab2ff2Smrg ) 1091267ab2ff2Smrg fi 1091367ab2ff2Smrgfi 10914e0963edeSmrg 1091567ab2ff2Smrg# Not having GLib when unit testing has been explicitly requested is an error 1091667ab2ff2Smrgif test "x$enable_unit_tests" = x"yes"; then 1091767ab2ff2Smrg if test "x$have_glib" = x"no"; then 1091867ab2ff2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1091967ab2ff2Smrg fi 1092067ab2ff2Smrgfi 10921e0963edeSmrg 1092267ab2ff2Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1092367ab2ff2Smrgif test "x$enable_unit_tests" = x"no"; then 1092467ab2ff2Smrg if test "x$with_glib" = x"yes"; then 1092567ab2ff2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1092667ab2ff2Smrg fi 1092767ab2ff2Smrgfi 10928e0963edeSmrg 1092967ab2ff2Smrg# Not having GLib when it has been explicitly requested is an error 1093067ab2ff2Smrgif test "x$with_glib" = x"yes"; then 1093167ab2ff2Smrg if test "x$have_glib" = x"no"; then 1093267ab2ff2Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1093367ab2ff2Smrg fi 1093467ab2ff2Smrgfi 10935e0963edeSmrg 1093667ab2ff2SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1093767ab2ff2Smrg]) # XORG_WITH_GLIB 10938e0963edeSmrg 1093967ab2ff2Smrg# XORG_LD_WRAP([required|optional]) 1094067ab2ff2Smrg# --------------------------------- 1094167ab2ff2Smrg# Minimum version: 1.13.0 1094267ab2ff2Smrg# 1094367ab2ff2Smrg# Check if linker supports -wrap, passed via compiler flags 1094467ab2ff2Smrg# 1094567ab2ff2Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1094667ab2ff2Smrg# Otherwise the value of $enable_unit_tests is blank. 1094767ab2ff2Smrg# 1094867ab2ff2Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1094967ab2ff2Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1095067ab2ff2Smrg# available, an argument of "optional" allows use when some unit tests require 1095167ab2ff2Smrg# ld -wrap and others do not. 1095267ab2ff2Smrg# 1095367ab2ff2SmrgAC_DEFUN([XORG_LD_WRAP],[ 1095467ab2ff2SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1095567ab2ff2Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1095667ab2ff2Smrg void __wrap_exit(int status) { return; }], 1095767ab2ff2Smrg [exit(0);])]) 1095867ab2ff2Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1095967ab2ff2Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1096067ab2ff2Smrg if test "x$have_ld_wrap" = x"no"; then 1096167ab2ff2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1096267ab2ff2Smrg fi 1096367ab2ff2Smrgfi 1096467ab2ff2SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1096567ab2ff2Smrg# 1096667ab2ff2Smrg]) # XORG_LD_WRAP 10967e0963edeSmrg 1096867ab2ff2Smrg# XORG_CHECK_LINKER_FLAGS 1096967ab2ff2Smrg# ----------------------- 1097067ab2ff2Smrg# SYNOPSIS 1097167ab2ff2Smrg# 1097267ab2ff2Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1097367ab2ff2Smrg# 1097467ab2ff2Smrg# DESCRIPTION 1097567ab2ff2Smrg# 1097667ab2ff2Smrg# Check whether the given linker FLAGS work with the current language's 1097767ab2ff2Smrg# linker, or whether they give an error. 1097867ab2ff2Smrg# 1097967ab2ff2Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1098067ab2ff2Smrg# success/failure. 1098167ab2ff2Smrg# 1098267ab2ff2Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1098367ab2ff2Smrg# 1098467ab2ff2Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1098567ab2ff2Smrg# 1098667ab2ff2Smrg# LICENSE 1098767ab2ff2Smrg# 1098867ab2ff2Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1098967ab2ff2Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1099067ab2ff2Smrg# Copyright (c) 2009 Matteo Frigo 1099167ab2ff2Smrg# 1099267ab2ff2Smrg# This program is free software: you can redistribute it and/or modify it 1099367ab2ff2Smrg# under the terms of the GNU General Public License as published by the 1099467ab2ff2Smrg# Free Software Foundation, either version 3 of the License, or (at your 1099567ab2ff2Smrg# option) any later version. 1099667ab2ff2Smrg# 1099767ab2ff2Smrg# This program is distributed in the hope that it will be useful, but 1099867ab2ff2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1099967ab2ff2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1100067ab2ff2Smrg# Public License for more details. 1100167ab2ff2Smrg# 1100267ab2ff2Smrg# You should have received a copy of the GNU General Public License along 1100367ab2ff2Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1100467ab2ff2Smrg# 1100567ab2ff2Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1100667ab2ff2Smrg# gives unlimited permission to copy, distribute and modify the configure 1100767ab2ff2Smrg# scripts that are the output of Autoconf when processing the Macro. You 1100867ab2ff2Smrg# need not follow the terms of the GNU General Public License when using 1100967ab2ff2Smrg# or distributing such scripts, even though portions of the text of the 1101067ab2ff2Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1101167ab2ff2Smrg# all other use of the material that constitutes the Autoconf Macro. 1101267ab2ff2Smrg# 1101367ab2ff2Smrg# This special exception to the GPL applies to versions of the Autoconf 1101467ab2ff2Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1101567ab2ff2Smrg# modified version of the Autoconf Macro, you may extend this special 1101667ab2ff2Smrg# exception to the GPL to apply to your modified version as well.# 1101767ab2ff2SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1101867ab2ff2Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1101967ab2ff2Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1102067ab2ff2SmrgAS_LITERAL_IF([$1], 1102167ab2ff2Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1102267ab2ff2Smrg ax_save_FLAGS=$LDFLAGS 1102367ab2ff2Smrg LDFLAGS="$1" 1102467ab2ff2Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1102567ab2ff2Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1102667ab2ff2Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1102767ab2ff2Smrg LDFLAGS=$ax_save_FLAGS])], 1102867ab2ff2Smrg [ax_save_FLAGS=$LDFLAGS 1102967ab2ff2Smrg LDFLAGS="$1" 1103067ab2ff2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1103167ab2ff2Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1103267ab2ff2Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1103367ab2ff2Smrg LDFLAGS=$ax_save_FLAGS]) 1103467ab2ff2Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1103567ab2ff2SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1103667ab2ff2Smrgif test "x$xorg_check_linker_flags" = xyes; then 1103767ab2ff2Smrg m4_default([$2], :) 1103867ab2ff2Smrgelse 1103967ab2ff2Smrg m4_default([$3], :) 1104067ab2ff2Smrgfi 1104167ab2ff2Smrg]) # XORG_CHECK_LINKER_FLAGS 11042f05b35a2Smrg 1104367ab2ff2Smrg# XORG_MEMORY_CHECK_FLAGS 1104467ab2ff2Smrg# ----------------------- 1104567ab2ff2Smrg# Minimum version: 1.16.0 1104667ab2ff2Smrg# 1104767ab2ff2Smrg# This macro attempts to find appropriate memory checking functionality 1104867ab2ff2Smrg# for various platforms which unit testing code may use to catch various 1104967ab2ff2Smrg# forms of memory allocation and access errors in testing. 1105067ab2ff2Smrg# 1105167ab2ff2Smrg# Interface to module: 1105267ab2ff2Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1105367ab2ff2Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1105467ab2ff2Smrg# 1105567ab2ff2Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1105667ab2ff2Smrg# 1105767ab2ff2SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11058e0963edeSmrg 1105967ab2ff2SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1106067ab2ff2SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1106167ab2ff2Smrg [Environment variables to enable memory checking in tests]) 11062e0963edeSmrg 1106367ab2ff2Smrg# Check for different types of support on different platforms 1106467ab2ff2Smrgcase $host_os in 1106567ab2ff2Smrg solaris*) 1106667ab2ff2Smrg AC_CHECK_LIB([umem], [umem_alloc], 1106767ab2ff2Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1106867ab2ff2Smrg ;; 1106967ab2ff2Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1107067ab2ff2Smrg # both directly and inverted, so should not be 0 or 255. 1107167ab2ff2Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1107267ab2ff2Smrg ;; 1107367ab2ff2Smrg darwin*) 1107467ab2ff2Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1107567ab2ff2Smrg ;; 1107667ab2ff2Smrg *bsd*) 1107767ab2ff2Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1107867ab2ff2Smrg ;; 1107967ab2ff2Smrgesac 11080e0963edeSmrg 1108167ab2ff2Smrg# User supplied flags override default flags 1108267ab2ff2Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1108367ab2ff2Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1108467ab2ff2Smrgfi 11085f05b35a2Smrg 1108667ab2ff2SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1108767ab2ff2Smrg]) # XORG_WITH_LINT 11088e0963edeSmrg 1108967ab2ff2Smrg# XORG_CHECK_MALLOC_ZERO 1109067ab2ff2Smrg# ---------------------- 1109167ab2ff2Smrg# Minimum version: 1.0.0 1109249e108a1Smrg# 1109367ab2ff2Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1109467ab2ff2Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1109567ab2ff2Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1109667ab2ff2SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1109767ab2ff2SmrgAC_ARG_ENABLE(malloc0returnsnull, 1109867ab2ff2Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1109967ab2ff2Smrg [malloc(0) returns NULL (default: auto)]), 1110067ab2ff2Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1110167ab2ff2Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11102e0963edeSmrg 1110367ab2ff2SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1110467ab2ff2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1110567ab2ff2Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1110667ab2ff2Smrg#include <stdlib.h> 1110767ab2ff2Smrg],[ 1110867ab2ff2Smrg char *m0, *r0, *c0, *p; 1110967ab2ff2Smrg m0 = malloc(0); 1111067ab2ff2Smrg p = malloc(10); 1111167ab2ff2Smrg r0 = realloc(p,0); 1111267ab2ff2Smrg c0 = calloc(0,10); 1111367ab2ff2Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1111467ab2ff2Smrg])], 1111567ab2ff2Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1111667ab2ff2Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1111767ab2ff2Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1111867ab2ff2Smrgfi 1111967ab2ff2SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11120e0963edeSmrg 1112167ab2ff2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1112267ab2ff2Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1112367ab2ff2Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1112467ab2ff2Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1112567ab2ff2Smrgelse 1112667ab2ff2Smrg MALLOC_ZERO_CFLAGS="" 1112767ab2ff2Smrg XMALLOC_ZERO_CFLAGS="" 1112867ab2ff2Smrg XTMALLOC_ZERO_CFLAGS="" 1112967ab2ff2Smrgfi 11130e0963edeSmrg 1113167ab2ff2SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1113267ab2ff2SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1113367ab2ff2SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1113467ab2ff2Smrg]) # XORG_CHECK_MALLOC_ZERO 11135e0963edeSmrg 1113667ab2ff2Smrg# XORG_WITH_LINT() 1113767ab2ff2Smrg# ---------------- 1113867ab2ff2Smrg# Minimum version: 1.1.0 1113967ab2ff2Smrg# 1114067ab2ff2Smrg# This macro enables the use of a tool that flags some suspicious and 1114167ab2ff2Smrg# non-portable constructs (likely to be bugs) in C language source code. 1114267ab2ff2Smrg# It will attempt to locate the tool and use appropriate options. 1114367ab2ff2Smrg# There are various lint type tools on different platforms. 1114467ab2ff2Smrg# 1114567ab2ff2Smrg# Interface to module: 1114667ab2ff2Smrg# LINT: returns the path to the tool found on the platform 1114767ab2ff2Smrg# or the value set to LINT on the configure cmd line 1114867ab2ff2Smrg# also an Automake conditional 1114967ab2ff2Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1115067ab2ff2Smrg# 1115167ab2ff2Smrg# --with-lint: 'yes' user instructs the module to use lint 1115267ab2ff2Smrg# 'no' user instructs the module not to use lint (default) 1115367ab2ff2Smrg# 1115467ab2ff2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1115567ab2ff2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1115667ab2ff2Smrg# 1115767ab2ff2SmrgAC_DEFUN([XORG_WITH_LINT],[ 11158e0963edeSmrg 1115967ab2ff2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1116067ab2ff2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1116167ab2ff2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1116267ab2ff2Smrg [Use a lint-style source code checker (default: disabled)])], 1116367ab2ff2Smrg [use_lint=$withval], [use_lint=no]) 11164e0963edeSmrg 1116567ab2ff2Smrg# Obtain platform specific info like program name and options 1116667ab2ff2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1116767ab2ff2Smrgcase $host_os in 1116867ab2ff2Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1116967ab2ff2Smrg lint_name=splint 1117067ab2ff2Smrg lint_options="-badflag" 1117167ab2ff2Smrg ;; 1117267ab2ff2Smrg *freebsd* | *netbsd*) 1117367ab2ff2Smrg lint_name=lint 1117467ab2ff2Smrg lint_options="-u -b" 1117567ab2ff2Smrg ;; 1117667ab2ff2Smrg *solaris*) 1117767ab2ff2Smrg lint_name=lint 1117867ab2ff2Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1117967ab2ff2Smrg ;; 1118067ab2ff2Smrgesac 11181f05b35a2Smrg 1118267ab2ff2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1118367ab2ff2Smrgif test "x$use_lint" = x"yes" ; then 1118467ab2ff2Smrg AC_PATH_PROG([LINT], [$lint_name]) 1118567ab2ff2Smrg if test "x$LINT" = "x"; then 1118667ab2ff2Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1118767ab2ff2Smrg fi 1118867ab2ff2Smrgelif test "x$use_lint" = x"no" ; then 1118967ab2ff2Smrg if test "x$LINT" != "x"; then 1119067ab2ff2Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1119167ab2ff2Smrg fi 1119267ab2ff2Smrgelse 1119367ab2ff2Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1119467ab2ff2Smrgfi 11195f05b35a2Smrg 1119667ab2ff2Smrg# User supplied flags override default flags 1119767ab2ff2Smrgif test "x$LINT_FLAGS" != "x"; then 1119867ab2ff2Smrg lint_options=$LINT_FLAGS 1119967ab2ff2Smrgfi 11200e0963edeSmrg 1120167ab2ff2SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1120267ab2ff2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11203e0963edeSmrg 1120467ab2ff2Smrg]) # XORG_WITH_LINT 11205e0963edeSmrg 1120667ab2ff2Smrg# XORG_LINT_LIBRARY(LIBNAME) 1120767ab2ff2Smrg# -------------------------- 1120867ab2ff2Smrg# Minimum version: 1.1.0 1120967ab2ff2Smrg# 1121067ab2ff2Smrg# Sets up flags for building lint libraries for checking programs that call 1121167ab2ff2Smrg# functions in the library. 1121267ab2ff2Smrg# 1121367ab2ff2Smrg# Interface to module: 1121467ab2ff2Smrg# LINTLIB - Automake variable with the name of lint library file to make 1121567ab2ff2Smrg# MAKE_LINT_LIB - Automake conditional 1121667ab2ff2Smrg# 1121767ab2ff2Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1121867ab2ff2Smrg# - 'no' user instructs the module not to create a lint library (default) 11219f05b35a2Smrg 1122067ab2ff2SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1122167ab2ff2SmrgAC_REQUIRE([XORG_WITH_LINT]) 1122267ab2ff2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1122367ab2ff2Smrg [Create lint library (default: disabled)])], 1122467ab2ff2Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11225e0963edeSmrg 1122667ab2ff2Smrgif test "x$make_lint_lib" = x"yes" ; then 1122767ab2ff2Smrg LINTLIB=llib-l$1.ln 1122867ab2ff2Smrg if test "x$LINT" = "x"; then 1122967ab2ff2Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1123067ab2ff2Smrg fi 1123167ab2ff2Smrgelif test "x$make_lint_lib" != x"no" ; then 1123267ab2ff2Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1123367ab2ff2Smrgfi 1123449e108a1Smrg 1123567ab2ff2SmrgAC_SUBST(LINTLIB) 1123667ab2ff2SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1123749e108a1Smrg 1123867ab2ff2Smrg]) # XORG_LINT_LIBRARY 1123967ab2ff2Smrg 1124067ab2ff2Smrg# XORG_COMPILER_BRAND 1124167ab2ff2Smrg# ------------------- 1124267ab2ff2Smrg# Minimum version: 1.14.0 1124367ab2ff2Smrg# 1124467ab2ff2Smrg# Checks for various brands of compilers and sets flags as appropriate: 1124567ab2ff2Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1124667ab2ff2Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1124767ab2ff2Smrg# clang compiler - sets CLANGCC to "yes" 1124867ab2ff2Smrg# Intel compiler - sets INTELCC to "yes" 1124967ab2ff2Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1125067ab2ff2Smrg# 1125167ab2ff2SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1125267ab2ff2SmrgAC_LANG_CASE( 1125367ab2ff2Smrg [C], [ 1125467ab2ff2Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1125567ab2ff2Smrg ], 1125667ab2ff2Smrg [C++], [ 1125767ab2ff2Smrg AC_REQUIRE([AC_PROG_CXX]) 1125867ab2ff2Smrg ] 1125967ab2ff2Smrg) 1126067ab2ff2SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1126167ab2ff2SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1126267ab2ff2SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1126367ab2ff2Smrg]) # XORG_COMPILER_BRAND 1126449e108a1Smrg 1126567ab2ff2Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1126667ab2ff2Smrg# --------------- 1126767ab2ff2Smrg# Minimum version: 1.16.0 1126867ab2ff2Smrg# 1126967ab2ff2Smrg# Test if the compiler works when passed the given flag as a command line argument. 1127067ab2ff2Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1127167ab2ff2Smrg# next flag in the list until there are no more options. 1127267ab2ff2Smrg# 1127367ab2ff2Smrg# Note that this does not guarantee that the compiler supports the flag as some 1127467ab2ff2Smrg# compilers will simply ignore arguments that they do not understand, but we do 1127567ab2ff2Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1127667ab2ff2Smrg# -Werror=unused-command-line-argument 1127767ab2ff2Smrg# 1127867ab2ff2SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1127967ab2ff2Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1128067ab2ff2Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1128167ab2ff2Smrg 1128267ab2ff2SmrgAC_LANG_COMPILER_REQUIRE 1128367ab2ff2Smrg 1128467ab2ff2SmrgAC_LANG_CASE( 1128567ab2ff2Smrg [C], [ 1128667ab2ff2Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1128767ab2ff2Smrg define([PREFIX], [C]) 11288e494fffdSmrg define([CACHE_PREFIX], [cc]) 11289e494fffdSmrg define([COMPILER], [$CC]) 1129067ab2ff2Smrg ], 1129167ab2ff2Smrg [C++], [ 1129267ab2ff2Smrg define([PREFIX], [CXX]) 11293e494fffdSmrg define([CACHE_PREFIX], [cxx]) 11294e494fffdSmrg define([COMPILER], [$CXX]) 1129567ab2ff2Smrg ] 1129667ab2ff2Smrg) 11297e0963edeSmrg 1129867ab2ff2Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1129967ab2ff2Smrg 11300e494fffdSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1130167ab2ff2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11302e494fffdSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11303e494fffdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1130467ab2ff2Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11305e494fffdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11306e494fffdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11307e494fffdSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1130867ab2ff2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1130967ab2ff2Smrgfi 11310e0963edeSmrg 11311e494fffdSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11312e494fffdSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1131367ab2ff2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1131467ab2ff2Smrg fi 1131567ab2ff2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11316e494fffdSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11317e494fffdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1131867ab2ff2Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11319e494fffdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11320e494fffdSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11321e494fffdSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1132267ab2ff2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1132367ab2ff2Smrgfi 11324e0963edeSmrg 1132567ab2ff2Smrgfound="no" 1132667ab2ff2Smrgm4_foreach([flag], m4_cdr($@), [ 1132767ab2ff2Smrg if test $found = "no" ; then 1132867ab2ff2Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1132967ab2ff2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1133067ab2ff2Smrg fi 1133167ab2ff2Smrg 1133267ab2ff2Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 1133367ab2ff2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1133467ab2ff2Smrg fi 1133567ab2ff2Smrg 1133667ab2ff2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1133767ab2ff2Smrg 1133867ab2ff2Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11339e494fffdSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11340e494fffdSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11341e494fffdSmrg AC_CACHE_VAL($cacheid, 1134267ab2ff2Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11343e494fffdSmrg [eval $cacheid=yes], 11344e494fffdSmrg [eval $cacheid=no])]) 1134567ab2ff2Smrg 1134667ab2ff2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1134767ab2ff2Smrg 11348e494fffdSmrg eval supported=\$$cacheid 1134967ab2ff2Smrg AC_MSG_RESULT([$supported]) 1135067ab2ff2Smrg if test "$supported" = "yes" ; then 1135167ab2ff2Smrg $1="$$1 ]flag[" 1135267ab2ff2Smrg found="yes" 1135367ab2ff2Smrg fi 1135467ab2ff2Smrg fi 1135567ab2ff2Smrg]) 1135667ab2ff2Smrg]) # XORG_TESTSET_CFLAG 11357e0963edeSmrg 1135867ab2ff2Smrg# XORG_COMPILER_FLAGS 1135967ab2ff2Smrg# --------------- 1136067ab2ff2Smrg# Minimum version: 1.16.0 1136167ab2ff2Smrg# 1136267ab2ff2Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1136367ab2ff2Smrg# arguments supported by the selected compiler which do NOT alter the generated 1136467ab2ff2Smrg# code. These arguments will cause the compiler to print various warnings 1136567ab2ff2Smrg# during compilation AND turn a conservative set of warnings into errors. 1136667ab2ff2Smrg# 1136767ab2ff2Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1136867ab2ff2Smrg# future versions of util-macros as options are added to new compilers. 1136967ab2ff2Smrg# 1137067ab2ff2SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1137167ab2ff2SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1137267ab2ff2Smrg 1137367ab2ff2SmrgAC_ARG_ENABLE(selective-werror, 1137467ab2ff2Smrg AS_HELP_STRING([--disable-selective-werror], 1137567ab2ff2Smrg [Turn off selective compiler errors. (default: enabled)]), 1137667ab2ff2Smrg [SELECTIVE_WERROR=$enableval], 1137767ab2ff2Smrg [SELECTIVE_WERROR=yes]) 1137867ab2ff2Smrg 1137967ab2ff2SmrgAC_LANG_CASE( 1138067ab2ff2Smrg [C], [ 1138167ab2ff2Smrg define([PREFIX], [C]) 1138267ab2ff2Smrg ], 1138367ab2ff2Smrg [C++], [ 1138467ab2ff2Smrg define([PREFIX], [CXX]) 1138567ab2ff2Smrg ] 1138667ab2ff2Smrg) 1138767ab2ff2Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1138867ab2ff2Smrgif test "x$SUNCC" = "xyes"; then 1138967ab2ff2Smrg [BASE_]PREFIX[FLAGS]="-v" 1139067ab2ff2Smrgelse 1139167ab2ff2Smrg [BASE_]PREFIX[FLAGS]="" 1139267ab2ff2Smrgfi 11393e0963edeSmrg 1139467ab2ff2Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1139567ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1139667ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1139767ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1139867ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1139967ab2ff2Smrg 1140067ab2ff2SmrgAC_LANG_CASE( 1140167ab2ff2Smrg [C], [ 1140267ab2ff2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1140367ab2ff2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1140467ab2ff2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1140567ab2ff2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1140667ab2ff2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 1140767ab2ff2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1140867ab2ff2Smrg ] 1140967ab2ff2Smrg) 11410e0963edeSmrg 1141167ab2ff2Smrg# This chunk adds additional warnings that could catch undesired effects. 1141267ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1141367ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1141467ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1141567ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1141667ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1141767ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1141867ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1141967ab2ff2Smrg 1142067ab2ff2Smrg# These are currently disabled because they are noisy. They will be enabled 1142167ab2ff2Smrg# in the future once the codebase is sufficiently modernized to silence 1142267ab2ff2Smrg# them. For now, I don't want them to drown out the other warnings. 1142367ab2ff2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1142467ab2ff2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1142567ab2ff2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1142667ab2ff2Smrg 1142767ab2ff2Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1142867ab2ff2Smrg# when there are problems that should be fixed. 1142967ab2ff2Smrg 1143067ab2ff2Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1143167ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1143267ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1143367ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1143467ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1143567ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1143667ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1143767ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1143867ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1143967ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1144067ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1144167ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1144267ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1144367ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1144467ab2ff2Smrgelse 1144567ab2ff2SmrgAC_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]) 1144667ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1144767ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1144867ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1144967ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1145067ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1145167ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1145267ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1145367ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1145467ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1145567ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1145667ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1145767ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1145867ab2ff2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1145967ab2ff2Smrgfi 1146049e108a1Smrg 1146167ab2ff2SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1146267ab2ff2Smrg]) # XORG_COMPILER_FLAGS 1146349e108a1Smrg 1146467ab2ff2Smrg# XORG_CWARNFLAGS 1146567ab2ff2Smrg# --------------- 1146667ab2ff2Smrg# Minimum version: 1.2.0 1146767ab2ff2Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11468e0963edeSmrg# 1146967ab2ff2Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11470f05b35a2Smrg# 1147167ab2ff2Smrg# This function is deprecated because it defines -fno-strict-aliasing 1147267ab2ff2Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1147367ab2ff2Smrg# is needed, then it should be added explicitly in the module when 1147467ab2ff2Smrg# it is updated to use BASE_CFLAGS. 1147567ab2ff2Smrg# 1147667ab2ff2SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1147767ab2ff2SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1147867ab2ff2SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1147967ab2ff2SmrgAC_LANG_CASE( 1148067ab2ff2Smrg [C], [ 1148167ab2ff2Smrg CWARNFLAGS="$BASE_CFLAGS" 1148267ab2ff2Smrg if test "x$GCC" = xyes ; then 1148367ab2ff2Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1148467ab2ff2Smrg fi 1148567ab2ff2Smrg AC_SUBST(CWARNFLAGS) 1148667ab2ff2Smrg ] 1148767ab2ff2Smrg) 1148867ab2ff2Smrg]) # XORG_CWARNFLAGS 11489e0963edeSmrg 1149067ab2ff2Smrg# XORG_STRICT_OPTION 1149167ab2ff2Smrg# ----------------------- 1149267ab2ff2Smrg# Minimum version: 1.3.0 1149367ab2ff2Smrg# 1149467ab2ff2Smrg# Add configure option to enable strict compilation flags, such as treating 1149567ab2ff2Smrg# warnings as fatal errors. 1149667ab2ff2Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1149767ab2ff2Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1149867ab2ff2Smrg# 1149967ab2ff2Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1150067ab2ff2Smrg# when strict compilation is unconditionally desired. 1150167ab2ff2SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1150267ab2ff2SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1150367ab2ff2SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11504f05b35a2Smrg 1150567ab2ff2SmrgAC_ARG_ENABLE(strict-compilation, 1150667ab2ff2Smrg AS_HELP_STRING([--enable-strict-compilation], 1150767ab2ff2Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1150867ab2ff2Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11509e0963edeSmrg 1151067ab2ff2SmrgAC_LANG_CASE( 1151167ab2ff2Smrg [C], [ 1151267ab2ff2Smrg define([PREFIX], [C]) 1151367ab2ff2Smrg ], 1151467ab2ff2Smrg [C++], [ 1151567ab2ff2Smrg define([PREFIX], [CXX]) 1151667ab2ff2Smrg ] 1151767ab2ff2Smrg) 1151849e108a1Smrg 1151967ab2ff2Smrg[STRICT_]PREFIX[FLAGS]="" 1152067ab2ff2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1152167ab2ff2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1152249e108a1Smrg 1152367ab2ff2Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1152467ab2ff2Smrg# activate it with -Werror, so we add it here explicitly. 1152567ab2ff2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11526e0963edeSmrg 1152767ab2ff2Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1152867ab2ff2Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1152967ab2ff2Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1153067ab2ff2Smrgfi 1153167ab2ff2SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1153267ab2ff2SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1153367ab2ff2SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1153467ab2ff2Smrg]) # XORG_STRICT_OPTION 11535e0963edeSmrg 1153667ab2ff2Smrg# XORG_DEFAULT_OPTIONS 1153767ab2ff2Smrg# -------------------- 1153867ab2ff2Smrg# Minimum version: 1.3.0 11539f05b35a2Smrg# 1154067ab2ff2Smrg# Defines default options for X.Org modules. 11541f05b35a2Smrg# 1154267ab2ff2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1154367ab2ff2SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1154467ab2ff2SmrgXORG_COMPILER_FLAGS 1154567ab2ff2SmrgXORG_CWARNFLAGS 1154667ab2ff2SmrgXORG_STRICT_OPTION 1154767ab2ff2SmrgXORG_RELEASE_VERSION 1154867ab2ff2SmrgXORG_CHANGELOG 1154967ab2ff2SmrgXORG_INSTALL 1155067ab2ff2SmrgXORG_MANPAGE_SECTIONS 1155167ab2ff2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1155267ab2ff2Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1155367ab2ff2Smrg]) # XORG_DEFAULT_OPTIONS 1155467ab2ff2Smrg 1155567ab2ff2Smrg# XORG_INSTALL() 1155667ab2ff2Smrg# ---------------- 1155767ab2ff2Smrg# Minimum version: 1.4.0 11558f05b35a2Smrg# 1155967ab2ff2Smrg# Defines the variable INSTALL_CMD as the command to copy 1156067ab2ff2Smrg# INSTALL from $prefix/share/util-macros. 1156149e108a1Smrg# 1156267ab2ff2SmrgAC_DEFUN([XORG_INSTALL], [ 1156367ab2ff2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1156467ab2ff2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1156567ab2ff2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1156667ab2ff2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1156767ab2ff2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1156867ab2ff2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1156967ab2ff2SmrgAC_SUBST([INSTALL_CMD]) 1157067ab2ff2Smrg]) # XORG_INSTALL 1157167ab2ff2Smrgdnl Copyright 2005 Red Hat, Inc 1157267ab2ff2Smrgdnl 1157367ab2ff2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1157467ab2ff2Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1157567ab2ff2Smrgdnl the above copyright notice appear in all copies and that both that 1157667ab2ff2Smrgdnl copyright notice and this permission notice appear in supporting 1157767ab2ff2Smrgdnl documentation. 1157867ab2ff2Smrgdnl 1157967ab2ff2Smrgdnl The above copyright notice and this permission notice shall be included 1158067ab2ff2Smrgdnl in all copies or substantial portions of the Software. 1158167ab2ff2Smrgdnl 1158267ab2ff2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1158367ab2ff2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1158467ab2ff2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1158567ab2ff2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1158667ab2ff2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1158767ab2ff2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1158867ab2ff2Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1158967ab2ff2Smrgdnl 1159067ab2ff2Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1159167ab2ff2Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1159267ab2ff2Smrgdnl other dealings in this Software without prior written authorization 1159367ab2ff2Smrgdnl from the copyright holders. 1159467ab2ff2Smrgdnl 1159549e108a1Smrg 1159667ab2ff2Smrg# XORG_RELEASE_VERSION 1159767ab2ff2Smrg# -------------------- 1159867ab2ff2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1159967ab2ff2Smrg 1160067ab2ff2SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1160167ab2ff2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1160267ab2ff2Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1160367ab2ff2Smrg [Major version of this package]) 1160467ab2ff2Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1160567ab2ff2Smrg if test "x$PVM" = "x"; then 1160667ab2ff2Smrg PVM="0" 1160767ab2ff2Smrg fi 1160867ab2ff2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1160967ab2ff2Smrg [$PVM], 1161067ab2ff2Smrg [Minor version of this package]) 1161167ab2ff2Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1161267ab2ff2Smrg if test "x$PVP" = "x"; then 1161367ab2ff2Smrg PVP="0" 1161467ab2ff2Smrg fi 1161567ab2ff2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1161667ab2ff2Smrg [$PVP], 1161767ab2ff2Smrg [Patch version of this package]) 1161867ab2ff2Smrg]) 1161949e108a1Smrg 1162067ab2ff2Smrg# XORG_CHANGELOG() 1162167ab2ff2Smrg# ---------------- 1162267ab2ff2Smrg# Minimum version: 1.2.0 1162367ab2ff2Smrg# 1162467ab2ff2Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1162567ab2ff2Smrg# ChangeLog from git. 1162667ab2ff2Smrg# 1162767ab2ff2Smrg# 1162867ab2ff2SmrgAC_DEFUN([XORG_CHANGELOG], [ 1162967ab2ff2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1163067ab2ff2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1163167ab2ff2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1163267ab2ff2Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1163367ab2ff2SmrgAC_SUBST([CHANGELOG_CMD]) 1163467ab2ff2Smrg]) # XORG_CHANGELOG 11635e0963edeSmrg 11636