aclocal.m4 revision 339a7c43
1339a7c43Smrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 29e7bcd65Smrg 3339a7c43Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4444c061aSmrg 5444c061aSmrg# This file is free software; the Free Software Foundation 6444c061aSmrg# gives unlimited permission to copy and/or distribute it, 7444c061aSmrg# with or without modifications, as long as this notice is preserved. 8444c061aSmrg 9444c061aSmrg# This program is distributed in the hope that it will be useful, 10444c061aSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11444c061aSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12444c061aSmrg# PARTICULAR PURPOSE. 13444c061aSmrg 149e7bcd65Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 152265a131Smrgm4_ifndef([AC_AUTOCONF_VERSION], 162265a131Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17339a7c43Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18339a7c43Smrg[m4_warning([this file was generated for autoconf 2.69. 192265a131SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 202265a131SmrgIf you have problems, you may need to regenerate the build system entirely. 219e7bcd65SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22444c061aSmrg 23339a7c43Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 24bdf0f55dSmrg# 259e7bcd65Smrg# This file is free software; the Free Software Foundation 269e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 279e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 28249c3046Smrg 299e7bcd65Smrg# AM_AUTOMAKE_VERSION(VERSION) 309e7bcd65Smrg# ---------------------------- 319e7bcd65Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 329e7bcd65Smrg# generated from the m4 files accompanying Automake X.Y. 339e7bcd65Smrg# (This private macro should not be called outside this file.) 349e7bcd65SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35339a7c43Smrg[am__api_version='1.15' 369e7bcd65Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 379e7bcd65Smrgdnl require some minimum version. Point them to the right macro. 38339a7c43Smrgm4_if([$1], [1.15], [], 399e7bcd65Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 409e7bcd65Smrg]) 41249c3046Smrg 429e7bcd65Smrg# _AM_AUTOCONF_VERSION(VERSION) 439e7bcd65Smrg# ----------------------------- 449e7bcd65Smrg# aclocal traces this macro to find the Autoconf version. 459e7bcd65Smrg# This is a private macro too. Using m4_define simplifies 469e7bcd65Smrg# the logic in aclocal, which can simply ignore this definition. 479e7bcd65Smrgm4_define([_AM_AUTOCONF_VERSION], []) 48249c3046Smrg 499e7bcd65Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 509e7bcd65Smrg# ------------------------------- 519e7bcd65Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 529e7bcd65Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 539e7bcd65SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54339a7c43Smrg[AM_AUTOMAKE_VERSION([1.15])dnl 559e7bcd65Smrgm4_ifndef([AC_AUTOCONF_VERSION], 569e7bcd65Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 579e7bcd65Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58249c3046Smrg 599e7bcd65Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 601477040fSmrg 61339a7c43Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 629e7bcd65Smrg# 639e7bcd65Smrg# This file is free software; the Free Software Foundation 649e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 659e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 66bdf0f55dSmrg 679e7bcd65Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 689e7bcd65Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 699e7bcd65Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70444c061aSmrg# 719e7bcd65Smrg# Of course, Automake must honor this variable whenever it calls a 729e7bcd65Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 739e7bcd65Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 749e7bcd65Smrg# depending on how configure is run. This is pretty annoying, since 759e7bcd65Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 769e7bcd65Smrg# source directory, any form will work fine, but in subdirectories a 779e7bcd65Smrg# relative path needs to be adjusted first. 78444c061aSmrg# 799e7bcd65Smrg# $ac_aux_dir/missing 809e7bcd65Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 819e7bcd65Smrg# $top_srcdir/$ac_aux_dir/missing 829e7bcd65Smrg# fails if $ac_aux_dir is absolute, 839e7bcd65Smrg# fails when called from a subdirectory in a VPATH build with 849e7bcd65Smrg# a relative $ac_aux_dir 85444c061aSmrg# 869e7bcd65Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 879e7bcd65Smrg# are both prefixed by $srcdir. In an in-source build this is usually 889e7bcd65Smrg# harmless because $srcdir is '.', but things will broke when you 899e7bcd65Smrg# start a VPATH build or use an absolute $srcdir. 902265a131Smrg# 919e7bcd65Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 929e7bcd65Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 939e7bcd65Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 949e7bcd65Smrg# and then we would define $MISSING as 959e7bcd65Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 969e7bcd65Smrg# This will work as long as MISSING is not called from configure, because 979e7bcd65Smrg# unfortunately $(top_srcdir) has no meaning in configure. 989e7bcd65Smrg# However there are other variables, like CC, which are often used in 999e7bcd65Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1009e7bcd65Smrg# 1019e7bcd65Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1029e7bcd65Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1039e7bcd65Smrg# configured tree to be moved without reconfiguration. 1041477040fSmrg 1059e7bcd65SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 106339a7c43Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107339a7c43Smrg# Expand $ac_aux_dir to an absolute path. 108339a7c43Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1099e7bcd65Smrg]) 110444c061aSmrg 1119e7bcd65Smrg# AM_CONDITIONAL -*- Autoconf -*- 112444c061aSmrg 113339a7c43Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 1149e7bcd65Smrg# 1159e7bcd65Smrg# This file is free software; the Free Software Foundation 1169e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 1179e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 118444c061aSmrg 1199e7bcd65Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1209e7bcd65Smrg# ------------------------------------- 1219e7bcd65Smrg# Define a conditional. 1229e7bcd65SmrgAC_DEFUN([AM_CONDITIONAL], 1239e7bcd65Smrg[AC_PREREQ([2.52])dnl 1249e7bcd65Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1259e7bcd65Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1269e7bcd65SmrgAC_SUBST([$1_TRUE])dnl 1279e7bcd65SmrgAC_SUBST([$1_FALSE])dnl 1289e7bcd65Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1299e7bcd65Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1309e7bcd65Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1319e7bcd65Smrgif $2; then 1329e7bcd65Smrg $1_TRUE= 1339e7bcd65Smrg $1_FALSE='#' 1349e7bcd65Smrgelse 1359e7bcd65Smrg $1_TRUE='#' 1369e7bcd65Smrg $1_FALSE= 1379e7bcd65Smrgfi 1389e7bcd65SmrgAC_CONFIG_COMMANDS_PRE( 1399e7bcd65Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1409e7bcd65Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1419e7bcd65SmrgUsually this means the macro was only invoked conditionally.]]) 1429e7bcd65Smrgfi])]) 143444c061aSmrg 144339a7c43Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 1459e7bcd65Smrg# 1469e7bcd65Smrg# This file is free software; the Free Software Foundation 1479e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 1489e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 149444c061aSmrg 150444c061aSmrg 1519e7bcd65Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1529e7bcd65Smrg# written in clear, in which case automake, when reading aclocal.m4, 1539e7bcd65Smrg# will think it sees a *use*, and therefore will trigger all it's 1549e7bcd65Smrg# C support machinery. Also note that it means that autoscan, seeing 1559e7bcd65Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1562265a131Smrg 1571477040fSmrg 1589e7bcd65Smrg# _AM_DEPENDENCIES(NAME) 1599e7bcd65Smrg# ---------------------- 1609e7bcd65Smrg# See how the compiler implements dependency checking. 1619e7bcd65Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1629e7bcd65Smrg# We try a few techniques and use that to set a single cache variable. 1639e7bcd65Smrg# 1649e7bcd65Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1659e7bcd65Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1669e7bcd65Smrg# dependency, and given that the user is not expected to run this macro, 1679e7bcd65Smrg# just rely on AC_PROG_CC. 1689e7bcd65SmrgAC_DEFUN([_AM_DEPENDENCIES], 1699e7bcd65Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1709e7bcd65SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1719e7bcd65SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1729e7bcd65SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1731477040fSmrg 1749e7bcd65Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1759e7bcd65Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1769e7bcd65Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1779e7bcd65Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1789e7bcd65Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1799e7bcd65Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1809e7bcd65Smrg [depcc="$$1" am_compiler_list=]) 1811477040fSmrg 1829e7bcd65SmrgAC_CACHE_CHECK([dependency style of $depcc], 1839e7bcd65Smrg [am_cv_$1_dependencies_compiler_type], 1849e7bcd65Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1859e7bcd65Smrg # We make a subdir and do the tests there. Otherwise we can end up 1869e7bcd65Smrg # making bogus files that we don't know about and never remove. For 1879e7bcd65Smrg # instance it was reported that on HP-UX the gcc test will end up 1889e7bcd65Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 1899e7bcd65Smrg # in D". 1909e7bcd65Smrg rm -rf conftest.dir 1919e7bcd65Smrg mkdir conftest.dir 1929e7bcd65Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1939e7bcd65Smrg # using a relative directory. 1949e7bcd65Smrg cp "$am_depcomp" conftest.dir 1959e7bcd65Smrg cd conftest.dir 1969e7bcd65Smrg # We will build objects and dependencies in a subdirectory because 1979e7bcd65Smrg # it helps to detect inapplicable dependency modes. For instance 1989e7bcd65Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 1999e7bcd65Smrg # side effect of compilation, but ICC will put the dependencies in 2009e7bcd65Smrg # the current directory while Tru64 will put them in the object 2019e7bcd65Smrg # directory. 2029e7bcd65Smrg mkdir sub 2031477040fSmrg 2049e7bcd65Smrg am_cv_$1_dependencies_compiler_type=none 2059e7bcd65Smrg if test "$am_compiler_list" = ""; then 2069e7bcd65Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2079e7bcd65Smrg fi 2089e7bcd65Smrg am__universal=false 2099e7bcd65Smrg m4_case([$1], [CC], 2109e7bcd65Smrg [case " $depcc " in #( 2119e7bcd65Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2129e7bcd65Smrg esac], 2139e7bcd65Smrg [CXX], 2149e7bcd65Smrg [case " $depcc " in #( 2159e7bcd65Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2169e7bcd65Smrg esac]) 2171477040fSmrg 2189e7bcd65Smrg for depmode in $am_compiler_list; do 2199e7bcd65Smrg # Setup a source with many dependencies, because some compilers 2209e7bcd65Smrg # like to wrap large dependency lists on column 80 (with \), and 2219e7bcd65Smrg # we should not choose a depcomp mode which is confused by this. 2229e7bcd65Smrg # 2239e7bcd65Smrg # We need to recreate these files for each test, as the compiler may 2249e7bcd65Smrg # overwrite some of them when testing with obscure command lines. 2259e7bcd65Smrg # This happens at least with the AIX C compiler. 2269e7bcd65Smrg : > sub/conftest.c 2279e7bcd65Smrg for i in 1 2 3 4 5 6; do 2289e7bcd65Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2299e7bcd65Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2309e7bcd65Smrg # Solaris 10 /bin/sh. 2319e7bcd65Smrg echo '/* dummy */' > sub/conftst$i.h 2329e7bcd65Smrg done 2339e7bcd65Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2341477040fSmrg 2359e7bcd65Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 2369e7bcd65Smrg # mode. It turns out that the SunPro C++ compiler does not properly 2379e7bcd65Smrg # handle '-M -o', and we need to detect this. Also, some Intel 2389e7bcd65Smrg # versions had trouble with output in subdirs. 2399e7bcd65Smrg am__obj=sub/conftest.${OBJEXT-o} 2409e7bcd65Smrg am__minus_obj="-o $am__obj" 2419e7bcd65Smrg case $depmode in 2429e7bcd65Smrg gcc) 2439e7bcd65Smrg # This depmode causes a compiler race in universal mode. 2449e7bcd65Smrg test "$am__universal" = false || continue 2459e7bcd65Smrg ;; 2469e7bcd65Smrg nosideeffect) 2479e7bcd65Smrg # After this tag, mechanisms are not by side-effect, so they'll 2489e7bcd65Smrg # only be used when explicitly requested. 2499e7bcd65Smrg if test "x$enable_dependency_tracking" = xyes; then 2509e7bcd65Smrg continue 2519e7bcd65Smrg else 2529e7bcd65Smrg break 2539e7bcd65Smrg fi 2549e7bcd65Smrg ;; 2559e7bcd65Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2569e7bcd65Smrg # This compiler won't grok '-c -o', but also, the minuso test has 2579e7bcd65Smrg # not run yet. These depmodes are late enough in the game, and 2589e7bcd65Smrg # so weak that their functioning should not be impacted. 2599e7bcd65Smrg am__obj=conftest.${OBJEXT-o} 2609e7bcd65Smrg am__minus_obj= 2619e7bcd65Smrg ;; 2629e7bcd65Smrg none) break ;; 2639e7bcd65Smrg esac 2649e7bcd65Smrg if depmode=$depmode \ 2659e7bcd65Smrg source=sub/conftest.c object=$am__obj \ 2669e7bcd65Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2679e7bcd65Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2689e7bcd65Smrg >/dev/null 2>conftest.err && 2699e7bcd65Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2709e7bcd65Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2719e7bcd65Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2729e7bcd65Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2739e7bcd65Smrg # icc doesn't choke on unknown options, it will just issue warnings 2749e7bcd65Smrg # or remarks (even with -Werror). So we grep stderr for any message 2759e7bcd65Smrg # that says an option was ignored or not supported. 2769e7bcd65Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2779e7bcd65Smrg # icc: Command line warning: ignoring option '-M'; no argument required 2789e7bcd65Smrg # The diagnosis changed in icc 8.0: 2799e7bcd65Smrg # icc: Command line remark: option '-MP' not supported 2809e7bcd65Smrg if (grep 'ignoring option' conftest.err || 2819e7bcd65Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2829e7bcd65Smrg am_cv_$1_dependencies_compiler_type=$depmode 2839e7bcd65Smrg break 2849e7bcd65Smrg fi 2859e7bcd65Smrg fi 2869e7bcd65Smrg done 2871477040fSmrg 2889e7bcd65Smrg cd .. 2899e7bcd65Smrg rm -rf conftest.dir 290bdf0f55dSmrgelse 2919e7bcd65Smrg am_cv_$1_dependencies_compiler_type=none 292bdf0f55dSmrgfi 2939e7bcd65Smrg]) 2949e7bcd65SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2959e7bcd65SmrgAM_CONDITIONAL([am__fastdep$1], [ 2969e7bcd65Smrg test "x$enable_dependency_tracking" != xno \ 2979e7bcd65Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 2989e7bcd65Smrg]) 2991477040fSmrg 3001477040fSmrg 3019e7bcd65Smrg# AM_SET_DEPDIR 3029e7bcd65Smrg# ------------- 3039e7bcd65Smrg# Choose a directory name for dependency files. 3049e7bcd65Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3059e7bcd65SmrgAC_DEFUN([AM_SET_DEPDIR], 3069e7bcd65Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3079e7bcd65SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3089e7bcd65Smrg]) 3091477040fSmrg 3101477040fSmrg 3119e7bcd65Smrg# AM_DEP_TRACK 3129e7bcd65Smrg# ------------ 3139e7bcd65SmrgAC_DEFUN([AM_DEP_TRACK], 3149e7bcd65Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3159e7bcd65SmrgAS_HELP_STRING( 3169e7bcd65Smrg [--enable-dependency-tracking], 3179e7bcd65Smrg [do not reject slow dependency extractors]) 3189e7bcd65SmrgAS_HELP_STRING( 3199e7bcd65Smrg [--disable-dependency-tracking], 3209e7bcd65Smrg [speeds up one-time build])]) 3219e7bcd65Smrgif test "x$enable_dependency_tracking" != xno; then 3229e7bcd65Smrg am_depcomp="$ac_aux_dir/depcomp" 3239e7bcd65Smrg AMDEPBACKSLASH='\' 3249e7bcd65Smrg am__nodep='_no' 325bdf0f55dSmrgfi 3269e7bcd65SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3279e7bcd65SmrgAC_SUBST([AMDEPBACKSLASH])dnl 3289e7bcd65Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3299e7bcd65SmrgAC_SUBST([am__nodep])dnl 3309e7bcd65Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 3319e7bcd65Smrg]) 3321477040fSmrg 3339e7bcd65Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3341477040fSmrg 335339a7c43Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 3369e7bcd65Smrg# 3379e7bcd65Smrg# This file is free software; the Free Software Foundation 3389e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 3399e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 3401477040fSmrg 3411477040fSmrg 3429e7bcd65Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3439e7bcd65Smrg# ------------------------------ 3449e7bcd65SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3459e7bcd65Smrg[{ 3469e7bcd65Smrg # Older Autoconf quotes --file arguments for eval, but not when files 3479e7bcd65Smrg # are listed without --file. Let's play safe and only enable the eval 3489e7bcd65Smrg # if we detect the quoting. 3499e7bcd65Smrg case $CONFIG_FILES in 3509e7bcd65Smrg *\'*) eval set x "$CONFIG_FILES" ;; 3519e7bcd65Smrg *) set x $CONFIG_FILES ;; 3529e7bcd65Smrg esac 3539e7bcd65Smrg shift 3549e7bcd65Smrg for mf 3559e7bcd65Smrg do 3569e7bcd65Smrg # Strip MF so we end up with the name of the file. 3579e7bcd65Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3589e7bcd65Smrg # Check whether this is an Automake generated Makefile or not. 3599e7bcd65Smrg # We used to match only the files named 'Makefile.in', but 3609e7bcd65Smrg # some people rename them; so instead we look at the file content. 3619e7bcd65Smrg # Grep'ing the first line is not enough: some people post-process 3629e7bcd65Smrg # each Makefile.in and add a new line on top of each file to say so. 3639e7bcd65Smrg # Grep'ing the whole file is not good either: AIX grep has a line 3649e7bcd65Smrg # limit of 2048, but all sed's we know have understand at least 4000. 3659e7bcd65Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3669e7bcd65Smrg dirpart=`AS_DIRNAME("$mf")` 3679e7bcd65Smrg else 3689e7bcd65Smrg continue 3699e7bcd65Smrg fi 3709e7bcd65Smrg # Extract the definition of DEPDIR, am__include, and am__quote 3719e7bcd65Smrg # from the Makefile without running 'make'. 3729e7bcd65Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3739e7bcd65Smrg test -z "$DEPDIR" && continue 3749e7bcd65Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3759e7bcd65Smrg test -z "$am__include" && continue 3769e7bcd65Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3779e7bcd65Smrg # Find all dependency output files, they are included files with 3789e7bcd65Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3799e7bcd65Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 3809e7bcd65Smrg # expansion. 3819e7bcd65Smrg for file in `sed -n " 3829e7bcd65Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3839e7bcd65Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 3849e7bcd65Smrg # Make sure the directory exists. 3859e7bcd65Smrg test -f "$dirpart/$file" && continue 3869e7bcd65Smrg fdir=`AS_DIRNAME(["$file"])` 3879e7bcd65Smrg AS_MKDIR_P([$dirpart/$fdir]) 3889e7bcd65Smrg # echo "creating $dirpart/$file" 3899e7bcd65Smrg echo '# dummy' > "$dirpart/$file" 3909e7bcd65Smrg done 3919e7bcd65Smrg done 3929e7bcd65Smrg} 3939e7bcd65Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3941477040fSmrg 3951477040fSmrg 3969e7bcd65Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3979e7bcd65Smrg# ----------------------------- 3989e7bcd65Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 399bdf0f55dSmrg# 4009e7bcd65Smrg# This code is only required when automatic dependency tracking 4019e7bcd65Smrg# is enabled. FIXME. This creates each '.P' file that we will 4029e7bcd65Smrg# need in order to bootstrap the dependency handling code. 4039e7bcd65SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4049e7bcd65Smrg[AC_CONFIG_COMMANDS([depfiles], 4059e7bcd65Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4069e7bcd65Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4079e7bcd65Smrg]) 4081477040fSmrg 4099e7bcd65Smrg# Do all the work for Automake. -*- Autoconf -*- 410bdf0f55dSmrg 411339a7c43Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 412249c3046Smrg# 4139e7bcd65Smrg# This file is free software; the Free Software Foundation 4149e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 4159e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 4162265a131Smrg 4179e7bcd65Smrg# This macro actually does too much. Some checks are only needed if 4189e7bcd65Smrg# your package does certain things. But this isn't really a big deal. 4192265a131Smrg 420339a7c43Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 421339a7c43Smrgm4_define([AC_PROG_CC], 422339a7c43Smrgm4_defn([AC_PROG_CC]) 423339a7c43Smrg[_AM_PROG_CC_C_O 424339a7c43Smrg]) 425339a7c43Smrg 4269e7bcd65Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4279e7bcd65Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 4289e7bcd65Smrg# ----------------------------------------------- 4299e7bcd65Smrg# The call with PACKAGE and VERSION arguments is the old style 4309e7bcd65Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4319e7bcd65Smrg# and VERSION should now be passed to AC_INIT and removed from 4329e7bcd65Smrg# the call to AM_INIT_AUTOMAKE. 4339e7bcd65Smrg# We support both call styles for the transition. After 4349e7bcd65Smrg# the next Automake release, Autoconf can make the AC_INIT 4359e7bcd65Smrg# arguments mandatory, and then we can depend on a new Autoconf 4369e7bcd65Smrg# release and drop the old call support. 4379e7bcd65SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4389e7bcd65Smrg[AC_PREREQ([2.65])dnl 4399e7bcd65Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4409e7bcd65Smrgdnl the ones we care about. 4419e7bcd65Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4429e7bcd65SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4439e7bcd65SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4449e7bcd65Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4459e7bcd65Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4469e7bcd65Smrg # is not polluted with repeated "-I." 4479e7bcd65Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4489e7bcd65Smrg # test to see if srcdir already configured 4499e7bcd65Smrg if test -f $srcdir/config.status; then 4509e7bcd65Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4519e7bcd65Smrg fi 452249c3046Smrgfi 4531477040fSmrg 4549e7bcd65Smrg# test whether we have cygpath 4559e7bcd65Smrgif test -z "$CYGPATH_W"; then 4569e7bcd65Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 4579e7bcd65Smrg CYGPATH_W='cygpath -w' 4589e7bcd65Smrg else 4599e7bcd65Smrg CYGPATH_W=echo 4609e7bcd65Smrg fi 4619e7bcd65Smrgfi 4629e7bcd65SmrgAC_SUBST([CYGPATH_W]) 463bdf0f55dSmrg 4649e7bcd65Smrg# Define the identity of the package. 4659e7bcd65Smrgdnl Distinguish between old-style and new-style calls. 4669e7bcd65Smrgm4_ifval([$2], 4679e7bcd65Smrg[AC_DIAGNOSE([obsolete], 4689e7bcd65Smrg [$0: two- and three-arguments forms are deprecated.]) 4699e7bcd65Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4709e7bcd65Smrg AC_SUBST([PACKAGE], [$1])dnl 4719e7bcd65Smrg AC_SUBST([VERSION], [$2])], 4729e7bcd65Smrg[_AM_SET_OPTIONS([$1])dnl 4739e7bcd65Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4749e7bcd65Smrgm4_if( 4759e7bcd65Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 4769e7bcd65Smrg [ok:ok],, 4779e7bcd65Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4789e7bcd65Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4799e7bcd65Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 480bdf0f55dSmrg 4819e7bcd65Smrg_AM_IF_OPTION([no-define],, 4829e7bcd65Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4839e7bcd65Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 484bdf0f55dSmrg 4859e7bcd65Smrg# Some tools Automake needs. 4869e7bcd65SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4879e7bcd65SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4889e7bcd65SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4899e7bcd65SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4909e7bcd65SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4919e7bcd65SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4929e7bcd65SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 4939e7bcd65SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4949e7bcd65SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4959e7bcd65SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4969e7bcd65Smrg# For better backward compatibility. To be removed once Automake 1.9.x 4979e7bcd65Smrg# dies out for good. For more background, see: 4989e7bcd65Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 4999e7bcd65Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 5009e7bcd65SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 501339a7c43Smrg# We need awk for the "check" target (and possibly the TAP driver). The 502339a7c43Smrg# system "awk" is bad on some platforms. 5039e7bcd65SmrgAC_REQUIRE([AC_PROG_AWK])dnl 5049e7bcd65SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5059e7bcd65SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5069e7bcd65Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5079e7bcd65Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5089e7bcd65Smrg [_AM_PROG_TAR([v7])])]) 5099e7bcd65Smrg_AM_IF_OPTION([no-dependencies],, 5109e7bcd65Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5119e7bcd65Smrg [_AM_DEPENDENCIES([CC])], 5129e7bcd65Smrg [m4_define([AC_PROG_CC], 5139e7bcd65Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 5149e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5159e7bcd65Smrg [_AM_DEPENDENCIES([CXX])], 5169e7bcd65Smrg [m4_define([AC_PROG_CXX], 5179e7bcd65Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 5189e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5199e7bcd65Smrg [_AM_DEPENDENCIES([OBJC])], 5209e7bcd65Smrg [m4_define([AC_PROG_OBJC], 5219e7bcd65Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5229e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5239e7bcd65Smrg [_AM_DEPENDENCIES([OBJCXX])], 5249e7bcd65Smrg [m4_define([AC_PROG_OBJCXX], 5259e7bcd65Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 5269e7bcd65Smrg]) 5279e7bcd65SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 5289e7bcd65Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 5299e7bcd65Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 5309e7bcd65Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 5319e7bcd65SmrgAC_CONFIG_COMMANDS_PRE(dnl 5329e7bcd65Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5339e7bcd65Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 534339a7c43Smrg 535339a7c43Smrg# POSIX will say in a future version that running "rm -f" with no argument 536339a7c43Smrg# is OK; and we want to be able to make that assumption in our Makefile 537339a7c43Smrg# recipes. So use an aggressive probe to check that the usage we want is 538339a7c43Smrg# actually supported "in the wild" to an acceptable degree. 539339a7c43Smrg# See automake bug#10828. 540339a7c43Smrg# To make any issue more visible, cause the running configure to be aborted 541339a7c43Smrg# by default if the 'rm' program in use doesn't match our expectations; the 542339a7c43Smrg# user can still override this though. 543339a7c43Smrgif rm -f && rm -fr && rm -rf; then : OK; else 544339a7c43Smrg cat >&2 <<'END' 545339a7c43SmrgOops! 546339a7c43Smrg 547339a7c43SmrgYour 'rm' program seems unable to run without file operands specified 548339a7c43Smrgon the command line, even when the '-f' option is present. This is contrary 549339a7c43Smrgto the behaviour of most rm programs out there, and not conforming with 550339a7c43Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 551339a7c43Smrg 552339a7c43SmrgPlease tell bug-automake@gnu.org about your system, including the value 553339a7c43Smrgof your $PATH and any error possibly output before this message. This 554339a7c43Smrgcan help us improve future automake versions. 555339a7c43Smrg 556339a7c43SmrgEND 557339a7c43Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 558339a7c43Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 559339a7c43Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 560339a7c43Smrg echo >&2 561339a7c43Smrg else 562339a7c43Smrg cat >&2 <<'END' 563339a7c43SmrgAborting the configuration process, to ensure you take notice of the issue. 564339a7c43Smrg 565339a7c43SmrgYou can download and install GNU coreutils to get an 'rm' implementation 566339a7c43Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 567339a7c43Smrg 568339a7c43SmrgIf you want to complete the configuration process using your problematic 569339a7c43Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 570339a7c43Smrgto "yes", and re-run configure. 571339a7c43Smrg 572339a7c43SmrgEND 573339a7c43Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 574339a7c43Smrg fi 575339a7c43Smrgfi 576339a7c43Smrgdnl The trailing newline in this macro's definition is deliberate, for 577339a7c43Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 578339a7c43Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 5799e7bcd65Smrg]) 5801477040fSmrg 5819e7bcd65Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5829e7bcd65Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5839e7bcd65Smrgdnl mangled by Autoconf and run in a shell conditional statement. 5849e7bcd65Smrgm4_define([_AC_COMPILER_EXEEXT], 5859e7bcd65Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5861477040fSmrg 5879e7bcd65Smrg# When config.status generates a header, we must update the stamp-h file. 5889e7bcd65Smrg# This file resides in the same directory as the config header 5899e7bcd65Smrg# that is generated. The stamp files are numbered to have different names. 5901477040fSmrg 5919e7bcd65Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5929e7bcd65Smrg# loop where config.status creates the headers, so we can generate 5939e7bcd65Smrg# our stamp files there. 5949e7bcd65SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5959e7bcd65Smrg[# Compute $1's index in $config_headers. 5969e7bcd65Smrg_am_arg=$1 5979e7bcd65Smrg_am_stamp_count=1 5989e7bcd65Smrgfor _am_header in $config_headers :; do 5999e7bcd65Smrg case $_am_header in 6009e7bcd65Smrg $_am_arg | $_am_arg:* ) 6019e7bcd65Smrg break ;; 6029e7bcd65Smrg * ) 6039e7bcd65Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6049e7bcd65Smrg esac 6059e7bcd65Smrgdone 6069e7bcd65Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 6071477040fSmrg 608339a7c43Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 609249c3046Smrg# 6109e7bcd65Smrg# This file is free software; the Free Software Foundation 6119e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 6129e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 6131477040fSmrg 6149e7bcd65Smrg# AM_PROG_INSTALL_SH 6159e7bcd65Smrg# ------------------ 6169e7bcd65Smrg# Define $install_sh. 6179e7bcd65SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 6189e7bcd65Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 619339a7c43Smrgif test x"${install_sh+set}" != xset; then 6209e7bcd65Smrg case $am_aux_dir in 6219e7bcd65Smrg *\ * | *\ *) 6229e7bcd65Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 6239e7bcd65Smrg *) 6249e7bcd65Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 6259e7bcd65Smrg esac 6269e7bcd65Smrgfi 6279e7bcd65SmrgAC_SUBST([install_sh])]) 6282265a131Smrg 629339a7c43Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 6309e7bcd65Smrg# 6319e7bcd65Smrg# This file is free software; the Free Software Foundation 6329e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 6339e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 6342265a131Smrg 6359e7bcd65Smrg# Check whether the underlying file-system supports filenames 6369e7bcd65Smrg# with a leading dot. For instance MS-DOS doesn't. 6379e7bcd65SmrgAC_DEFUN([AM_SET_LEADING_DOT], 6389e7bcd65Smrg[rm -rf .tst 2>/dev/null 6399e7bcd65Smrgmkdir .tst 2>/dev/null 6409e7bcd65Smrgif test -d .tst; then 6419e7bcd65Smrg am__leading_dot=. 6429e7bcd65Smrgelse 6439e7bcd65Smrg am__leading_dot=_ 644249c3046Smrgfi 6459e7bcd65Smrgrmdir .tst 2>/dev/null 6469e7bcd65SmrgAC_SUBST([am__leading_dot])]) 6472265a131Smrg 6489e7bcd65Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6492265a131Smrg 650339a7c43Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 6519e7bcd65Smrg# 6529e7bcd65Smrg# This file is free software; the Free Software Foundation 6539e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 6549e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 6552265a131Smrg 6569e7bcd65Smrg# AM_MAKE_INCLUDE() 6579e7bcd65Smrg# ----------------- 6589e7bcd65Smrg# Check to see how make treats includes. 6599e7bcd65SmrgAC_DEFUN([AM_MAKE_INCLUDE], 6609e7bcd65Smrg[am_make=${MAKE-make} 6619e7bcd65Smrgcat > confinc << 'END' 6629e7bcd65Smrgam__doit: 6639e7bcd65Smrg @echo this is the am__doit target 6649e7bcd65Smrg.PHONY: am__doit 6659e7bcd65SmrgEND 6669e7bcd65Smrg# If we don't find an include directive, just comment out the code. 6679e7bcd65SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6689e7bcd65Smrgam__include="#" 6699e7bcd65Smrgam__quote= 6709e7bcd65Smrg_am_result=none 6719e7bcd65Smrg# First try GNU make style include. 6729e7bcd65Smrgecho "include confinc" > confmf 6739e7bcd65Smrg# Ignore all kinds of additional output from 'make'. 6749e7bcd65Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6759e7bcd65Smrg*the\ am__doit\ target*) 6769e7bcd65Smrg am__include=include 6779e7bcd65Smrg am__quote= 6789e7bcd65Smrg _am_result=GNU 6799e7bcd65Smrg ;; 6809e7bcd65Smrgesac 6819e7bcd65Smrg# Now try BSD make style include. 6829e7bcd65Smrgif test "$am__include" = "#"; then 6839e7bcd65Smrg echo '.include "confinc"' > confmf 6849e7bcd65Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 6859e7bcd65Smrg *the\ am__doit\ target*) 6869e7bcd65Smrg am__include=.include 6879e7bcd65Smrg am__quote="\"" 6889e7bcd65Smrg _am_result=BSD 6899e7bcd65Smrg ;; 6909e7bcd65Smrg esac 691bdf0f55dSmrgfi 6929e7bcd65SmrgAC_SUBST([am__include]) 6939e7bcd65SmrgAC_SUBST([am__quote]) 6949e7bcd65SmrgAC_MSG_RESULT([$_am_result]) 6959e7bcd65Smrgrm -f confinc confmf 6969e7bcd65Smrg]) 6971477040fSmrg 6989e7bcd65Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 699444c061aSmrg 700339a7c43Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 701bdf0f55dSmrg# 7029e7bcd65Smrg# This file is free software; the Free Software Foundation 7039e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 7049e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 705444c061aSmrg 7069e7bcd65Smrg# AM_MISSING_PROG(NAME, PROGRAM) 7079e7bcd65Smrg# ------------------------------ 7089e7bcd65SmrgAC_DEFUN([AM_MISSING_PROG], 7099e7bcd65Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7109e7bcd65Smrg$1=${$1-"${am_missing_run}$2"} 7119e7bcd65SmrgAC_SUBST($1)]) 7129e7bcd65Smrg 7139e7bcd65Smrg# AM_MISSING_HAS_RUN 7149e7bcd65Smrg# ------------------ 7159e7bcd65Smrg# Define MISSING if not defined so far and test if it is modern enough. 7169e7bcd65Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 7179e7bcd65SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7189e7bcd65Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7199e7bcd65SmrgAC_REQUIRE_AUX_FILE([missing])dnl 7209e7bcd65Smrgif test x"${MISSING+set}" != xset; then 7219e7bcd65Smrg case $am_aux_dir in 7229e7bcd65Smrg *\ * | *\ *) 7239e7bcd65Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7249e7bcd65Smrg *) 7259e7bcd65Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7269e7bcd65Smrg esac 7279e7bcd65Smrgfi 7289e7bcd65Smrg# Use eval to expand $SHELL 7299e7bcd65Smrgif eval "$MISSING --is-lightweight"; then 7309e7bcd65Smrg am_missing_run="$MISSING " 731bdf0f55dSmrgelse 7329e7bcd65Smrg am_missing_run= 7339e7bcd65Smrg AC_MSG_WARN(['missing' script is too old or missing]) 734249c3046Smrgfi 7359e7bcd65Smrg]) 736444c061aSmrg 7379e7bcd65Smrg# Helper functions for option handling. -*- Autoconf -*- 738444c061aSmrg 739339a7c43Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 740bdf0f55dSmrg# 7419e7bcd65Smrg# This file is free software; the Free Software Foundation 7429e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 7439e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 7441477040fSmrg 7459e7bcd65Smrg# _AM_MANGLE_OPTION(NAME) 7469e7bcd65Smrg# ----------------------- 7479e7bcd65SmrgAC_DEFUN([_AM_MANGLE_OPTION], 7489e7bcd65Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7499e7bcd65Smrg 7509e7bcd65Smrg# _AM_SET_OPTION(NAME) 7519e7bcd65Smrg# -------------------- 7529e7bcd65Smrg# Set option NAME. Presently that only means defining a flag for this option. 7539e7bcd65SmrgAC_DEFUN([_AM_SET_OPTION], 7549e7bcd65Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 7559e7bcd65Smrg 7569e7bcd65Smrg# _AM_SET_OPTIONS(OPTIONS) 7579e7bcd65Smrg# ------------------------ 7589e7bcd65Smrg# OPTIONS is a space-separated list of Automake options. 7599e7bcd65SmrgAC_DEFUN([_AM_SET_OPTIONS], 7609e7bcd65Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7619e7bcd65Smrg 7629e7bcd65Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7639e7bcd65Smrg# ------------------------------------------- 7649e7bcd65Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7659e7bcd65SmrgAC_DEFUN([_AM_IF_OPTION], 7669e7bcd65Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7679e7bcd65Smrg 768339a7c43Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 769339a7c43Smrg# 770339a7c43Smrg# This file is free software; the Free Software Foundation 771339a7c43Smrg# gives unlimited permission to copy and/or distribute it, 772339a7c43Smrg# with or without modifications, as long as this notice is preserved. 773339a7c43Smrg 774339a7c43Smrg# _AM_PROG_CC_C_O 775339a7c43Smrg# --------------- 776339a7c43Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 777339a7c43Smrg# to automatically call this. 778339a7c43SmrgAC_DEFUN([_AM_PROG_CC_C_O], 779339a7c43Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 780339a7c43SmrgAC_REQUIRE_AUX_FILE([compile])dnl 781339a7c43SmrgAC_LANG_PUSH([C])dnl 782339a7c43SmrgAC_CACHE_CHECK( 783339a7c43Smrg [whether $CC understands -c and -o together], 784339a7c43Smrg [am_cv_prog_cc_c_o], 785339a7c43Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 786339a7c43Smrg # Make sure it works both with $CC and with simple cc. 787339a7c43Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 788339a7c43Smrg # compilers refuse to overwrite an existing .o file with -o, 789339a7c43Smrg # though they will create one. 790339a7c43Smrg am_cv_prog_cc_c_o=yes 791339a7c43Smrg for am_i in 1 2; do 792339a7c43Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 793339a7c43Smrg && test -f conftest2.$ac_objext; then 794339a7c43Smrg : OK 795339a7c43Smrg else 796339a7c43Smrg am_cv_prog_cc_c_o=no 797339a7c43Smrg break 798339a7c43Smrg fi 799339a7c43Smrg done 800339a7c43Smrg rm -f core conftest* 801339a7c43Smrg unset am_i]) 802339a7c43Smrgif test "$am_cv_prog_cc_c_o" != yes; then 803339a7c43Smrg # Losing compiler, so override with the script. 804339a7c43Smrg # FIXME: It is wrong to rewrite CC. 805339a7c43Smrg # But if we don't then we get into trouble of one sort or another. 806339a7c43Smrg # A longer-term fix would be to have automake use am__CC in this case, 807339a7c43Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 808339a7c43Smrg CC="$am_aux_dir/compile $CC" 809339a7c43Smrgfi 810339a7c43SmrgAC_LANG_POP([C])]) 811339a7c43Smrg 812339a7c43Smrg# For backward compatibility. 813339a7c43SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 814339a7c43Smrg 815339a7c43Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 816339a7c43Smrg# 817339a7c43Smrg# This file is free software; the Free Software Foundation 818339a7c43Smrg# gives unlimited permission to copy and/or distribute it, 819339a7c43Smrg# with or without modifications, as long as this notice is preserved. 820339a7c43Smrg 821339a7c43Smrg# AM_RUN_LOG(COMMAND) 822339a7c43Smrg# ------------------- 823339a7c43Smrg# Run COMMAND, save the exit status in ac_status, and log it. 824339a7c43Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 825339a7c43SmrgAC_DEFUN([AM_RUN_LOG], 826339a7c43Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 827339a7c43Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 828339a7c43Smrg ac_status=$? 829339a7c43Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 830339a7c43Smrg (exit $ac_status); }]) 831339a7c43Smrg 8329e7bcd65Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8339e7bcd65Smrg 834339a7c43Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 8359e7bcd65Smrg# 8369e7bcd65Smrg# This file is free software; the Free Software Foundation 8379e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 8389e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 8399e7bcd65Smrg 8409e7bcd65Smrg# AM_SANITY_CHECK 8419e7bcd65Smrg# --------------- 8429e7bcd65SmrgAC_DEFUN([AM_SANITY_CHECK], 8439e7bcd65Smrg[AC_MSG_CHECKING([whether build environment is sane]) 8449e7bcd65Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8459e7bcd65Smrg# name. Accept space and tab only in the latter. 8469e7bcd65Smrgam_lf=' 8479e7bcd65Smrg' 8489e7bcd65Smrgcase `pwd` in 8499e7bcd65Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8509e7bcd65Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8519e7bcd65Smrgesac 8529e7bcd65Smrgcase $srcdir in 8539e7bcd65Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8549e7bcd65Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 8559e7bcd65Smrgesac 8569e7bcd65Smrg 8579e7bcd65Smrg# Do 'set' in a subshell so we don't clobber the current shell's 8589e7bcd65Smrg# arguments. Must try -L first in case configure is actually a 8599e7bcd65Smrg# symlink; some systems play weird games with the mod time of symlinks 8609e7bcd65Smrg# (eg FreeBSD returns the mod time of the symlink's containing 8619e7bcd65Smrg# directory). 8629e7bcd65Smrgif ( 8639e7bcd65Smrg am_has_slept=no 8649e7bcd65Smrg for am_try in 1 2; do 8659e7bcd65Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 8669e7bcd65Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8679e7bcd65Smrg if test "$[*]" = "X"; then 8689e7bcd65Smrg # -L didn't work. 8699e7bcd65Smrg set X `ls -t "$srcdir/configure" conftest.file` 8709e7bcd65Smrg fi 8719e7bcd65Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8729e7bcd65Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8739e7bcd65Smrg 8749e7bcd65Smrg # If neither matched, then we have a broken ls. This can happen 8759e7bcd65Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8769e7bcd65Smrg # broken ls alias from the environment. This has actually 8779e7bcd65Smrg # happened. Such a system could not be considered "sane". 8789e7bcd65Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8799e7bcd65Smrg alias in your environment]) 8809e7bcd65Smrg fi 8819e7bcd65Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 8829e7bcd65Smrg break 8839e7bcd65Smrg fi 8849e7bcd65Smrg # Just in case. 8859e7bcd65Smrg sleep 1 8869e7bcd65Smrg am_has_slept=yes 8879e7bcd65Smrg done 8889e7bcd65Smrg test "$[2]" = conftest.file 8899e7bcd65Smrg ) 8909e7bcd65Smrgthen 8919e7bcd65Smrg # Ok. 8929e7bcd65Smrg : 893249c3046Smrgelse 8949e7bcd65Smrg AC_MSG_ERROR([newly created file is older than distributed files! 8959e7bcd65SmrgCheck your system clock]) 896249c3046Smrgfi 8979e7bcd65SmrgAC_MSG_RESULT([yes]) 8989e7bcd65Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 8999e7bcd65Smrg# generated files are strictly newer. 9009e7bcd65Smrgam_sleep_pid= 9019e7bcd65Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 9029e7bcd65Smrg ( sleep 1 ) & 9039e7bcd65Smrg am_sleep_pid=$! 9049e7bcd65Smrgfi 9059e7bcd65SmrgAC_CONFIG_COMMANDS_PRE( 9069e7bcd65Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 9079e7bcd65Smrg if test -n "$am_sleep_pid"; then 9089e7bcd65Smrg # Hide warnings about reused PIDs. 9099e7bcd65Smrg wait $am_sleep_pid 2>/dev/null 9109e7bcd65Smrg fi 9119e7bcd65Smrg AC_MSG_RESULT([done])]) 9129e7bcd65Smrgrm -f conftest.file 9139e7bcd65Smrg]) 9149e7bcd65Smrg 915339a7c43Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 9169e7bcd65Smrg# 9179e7bcd65Smrg# This file is free software; the Free Software Foundation 9189e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 9199e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 9209e7bcd65Smrg 9219e7bcd65Smrg# AM_SILENT_RULES([DEFAULT]) 9229e7bcd65Smrg# -------------------------- 9239e7bcd65Smrg# Enable less verbose build rules; with the default set to DEFAULT 9249e7bcd65Smrg# ("yes" being less verbose, "no" or empty being verbose). 9259e7bcd65SmrgAC_DEFUN([AM_SILENT_RULES], 9269e7bcd65Smrg[AC_ARG_ENABLE([silent-rules], [dnl 9279e7bcd65SmrgAS_HELP_STRING( 9289e7bcd65Smrg [--enable-silent-rules], 9299e7bcd65Smrg [less verbose build output (undo: "make V=1")]) 9309e7bcd65SmrgAS_HELP_STRING( 9319e7bcd65Smrg [--disable-silent-rules], 9329e7bcd65Smrg [verbose build output (undo: "make V=0")])dnl 9339e7bcd65Smrg]) 9349e7bcd65Smrgcase $enable_silent_rules in @%:@ ((( 9359e7bcd65Smrg yes) AM_DEFAULT_VERBOSITY=0;; 9369e7bcd65Smrg no) AM_DEFAULT_VERBOSITY=1;; 9379e7bcd65Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9389e7bcd65Smrgesac 9399e7bcd65Smrgdnl 9409e7bcd65Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 9419e7bcd65Smrgdnl do not support nested variable expansions. 9429e7bcd65Smrgdnl See automake bug#9928 and bug#10237. 9439e7bcd65Smrgam_make=${MAKE-make} 9449e7bcd65SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 9459e7bcd65Smrg [am_cv_make_support_nested_variables], 9469e7bcd65Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 9479e7bcd65SmrgBAR0=false 9489e7bcd65SmrgBAR1=true 9499e7bcd65SmrgV=1 9509e7bcd65Smrgam__doit: 9519e7bcd65Smrg @$(TRUE) 9529e7bcd65Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 9539e7bcd65Smrg am_cv_make_support_nested_variables=yes 9549e7bcd65Smrgelse 9559e7bcd65Smrg am_cv_make_support_nested_variables=no 956bdf0f55dSmrgfi]) 9579e7bcd65Smrgif test $am_cv_make_support_nested_variables = yes; then 9589e7bcd65Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 9599e7bcd65Smrg AM_V='$(V)' 9609e7bcd65Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 9619e7bcd65Smrgelse 9629e7bcd65Smrg AM_V=$AM_DEFAULT_VERBOSITY 9639e7bcd65Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 9649e7bcd65Smrgfi 9659e7bcd65SmrgAC_SUBST([AM_V])dnl 9669e7bcd65SmrgAM_SUBST_NOTMAKE([AM_V])dnl 9679e7bcd65SmrgAC_SUBST([AM_DEFAULT_V])dnl 9689e7bcd65SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 9699e7bcd65SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9709e7bcd65SmrgAM_BACKSLASH='\' 9719e7bcd65SmrgAC_SUBST([AM_BACKSLASH])dnl 9729e7bcd65Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9739e7bcd65Smrg]) 9742265a131Smrg 975339a7c43Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 976249c3046Smrg# 9779e7bcd65Smrg# This file is free software; the Free Software Foundation 9789e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 9799e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 9809e7bcd65Smrg 9819e7bcd65Smrg# AM_PROG_INSTALL_STRIP 9829e7bcd65Smrg# --------------------- 9839e7bcd65Smrg# One issue with vendor 'install' (even GNU) is that you can't 9849e7bcd65Smrg# specify the program used to strip binaries. This is especially 9859e7bcd65Smrg# annoying in cross-compiling environments, where the build's strip 9869e7bcd65Smrg# is unlikely to handle the host's binaries. 9879e7bcd65Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9889e7bcd65Smrg# always use install-sh in "make install-strip", and initialize 9899e7bcd65Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 9909e7bcd65SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9919e7bcd65Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9929e7bcd65Smrg# Installed binaries are usually stripped using 'strip' when the user 9939e7bcd65Smrg# run "make install-strip". However 'strip' might not be the right 9949e7bcd65Smrg# tool to use in cross-compilation environments, therefore Automake 9959e7bcd65Smrg# will honor the 'STRIP' environment variable to overrule this program. 9969e7bcd65Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9979e7bcd65Smrgif test "$cross_compiling" != no; then 9989e7bcd65Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9999e7bcd65Smrgfi 10009e7bcd65SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 10019e7bcd65SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10029e7bcd65Smrg 1003339a7c43Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 1004249c3046Smrg# 10059e7bcd65Smrg# This file is free software; the Free Software Foundation 10069e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 10079e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 10089e7bcd65Smrg 10099e7bcd65Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 10109e7bcd65Smrg# --------------------------- 10119e7bcd65Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10129e7bcd65Smrg# This macro is traced by Automake. 10139e7bcd65SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10149e7bcd65Smrg 10159e7bcd65Smrg# AM_SUBST_NOTMAKE(VARIABLE) 10169e7bcd65Smrg# -------------------------- 10179e7bcd65Smrg# Public sister of _AM_SUBST_NOTMAKE. 10189e7bcd65SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10199e7bcd65Smrg 10209e7bcd65Smrg# Check how to create a tarball. -*- Autoconf -*- 10219e7bcd65Smrg 1022339a7c43Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 1023249c3046Smrg# 10249e7bcd65Smrg# This file is free software; the Free Software Foundation 10259e7bcd65Smrg# gives unlimited permission to copy and/or distribute it, 10269e7bcd65Smrg# with or without modifications, as long as this notice is preserved. 10279e7bcd65Smrg 10289e7bcd65Smrg# _AM_PROG_TAR(FORMAT) 10299e7bcd65Smrg# -------------------- 10309e7bcd65Smrg# Check how to create a tarball in format FORMAT. 10319e7bcd65Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1032bdf0f55dSmrg# 10339e7bcd65Smrg# Substitute a variable $(am__tar) that is a command 10349e7bcd65Smrg# writing to stdout a FORMAT-tarball containing the directory 10359e7bcd65Smrg# $tardir. 10369e7bcd65Smrg# tardir=directory && $(am__tar) > result.tar 10379e7bcd65Smrg# 10389e7bcd65Smrg# Substitute a variable $(am__untar) that extract such 10399e7bcd65Smrg# a tarball read from stdin. 10409e7bcd65Smrg# $(am__untar) < result.tar 10419e7bcd65Smrg# 10429e7bcd65SmrgAC_DEFUN([_AM_PROG_TAR], 10439e7bcd65Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10449e7bcd65Smrg# in the wild :-( We should find a proper way to deprecate it ... 10459e7bcd65SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 10461477040fSmrg 10479e7bcd65Smrg# We'll loop over all known methods to create a tar archive until one works. 10489e7bcd65Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10491477040fSmrg 10509e7bcd65Smrgm4_if([$1], [v7], 10519e7bcd65Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10529e7bcd65Smrg 10539e7bcd65Smrg [m4_case([$1], 10549e7bcd65Smrg [ustar], 10559e7bcd65Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10569e7bcd65Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10579e7bcd65Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10589e7bcd65Smrg # and bug#13588). 10599e7bcd65Smrg am_max_uid=2097151 # 2^21 - 1 10609e7bcd65Smrg am_max_gid=$am_max_uid 10619e7bcd65Smrg # The $UID and $GID variables are not portable, so we need to resort 10629e7bcd65Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10639e7bcd65Smrg # below are definitely unexpected, so allow the users to see them 10649e7bcd65Smrg # (that is, avoid stderr redirection). 10659e7bcd65Smrg am_uid=`id -u || echo unknown` 10669e7bcd65Smrg am_gid=`id -g || echo unknown` 10679e7bcd65Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10689e7bcd65Smrg if test $am_uid -le $am_max_uid; then 10699e7bcd65Smrg AC_MSG_RESULT([yes]) 10709e7bcd65Smrg else 10719e7bcd65Smrg AC_MSG_RESULT([no]) 10729e7bcd65Smrg _am_tools=none 10739e7bcd65Smrg fi 10749e7bcd65Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10759e7bcd65Smrg if test $am_gid -le $am_max_gid; then 10769e7bcd65Smrg AC_MSG_RESULT([yes]) 10779e7bcd65Smrg else 10789e7bcd65Smrg AC_MSG_RESULT([no]) 10799e7bcd65Smrg _am_tools=none 10809e7bcd65Smrg fi], 10819e7bcd65Smrg 10829e7bcd65Smrg [pax], 10839e7bcd65Smrg [], 10849e7bcd65Smrg 10859e7bcd65Smrg [m4_fatal([Unknown tar format])]) 10869e7bcd65Smrg 10879e7bcd65Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10889e7bcd65Smrg 10899e7bcd65Smrg # Go ahead even if we have the value already cached. We do so because we 10909e7bcd65Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10919e7bcd65Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10929e7bcd65Smrg 10939e7bcd65Smrg for _am_tool in $_am_tools; do 10949e7bcd65Smrg case $_am_tool in 10959e7bcd65Smrg gnutar) 10969e7bcd65Smrg for _am_tar in tar gnutar gtar; do 10979e7bcd65Smrg AM_RUN_LOG([$_am_tar --version]) && break 10989e7bcd65Smrg done 10999e7bcd65Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11009e7bcd65Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11019e7bcd65Smrg am__untar="$_am_tar -xf -" 11029e7bcd65Smrg ;; 11039e7bcd65Smrg plaintar) 11049e7bcd65Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 11059e7bcd65Smrg # ustar tarball either. 11069e7bcd65Smrg (tar --version) >/dev/null 2>&1 && continue 11079e7bcd65Smrg am__tar='tar chf - "$$tardir"' 11089e7bcd65Smrg am__tar_='tar chf - "$tardir"' 11099e7bcd65Smrg am__untar='tar xf -' 11109e7bcd65Smrg ;; 11119e7bcd65Smrg pax) 11129e7bcd65Smrg am__tar='pax -L -x $1 -w "$$tardir"' 11139e7bcd65Smrg am__tar_='pax -L -x $1 -w "$tardir"' 11149e7bcd65Smrg am__untar='pax -r' 11159e7bcd65Smrg ;; 11169e7bcd65Smrg cpio) 11179e7bcd65Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11189e7bcd65Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11199e7bcd65Smrg am__untar='cpio -i -H $1 -d' 11209e7bcd65Smrg ;; 11219e7bcd65Smrg none) 11229e7bcd65Smrg am__tar=false 11239e7bcd65Smrg am__tar_=false 11249e7bcd65Smrg am__untar=false 11259e7bcd65Smrg ;; 11269e7bcd65Smrg esac 11279e7bcd65Smrg 11289e7bcd65Smrg # If the value was cached, stop now. We just wanted to have am__tar 11299e7bcd65Smrg # and am__untar set. 11309e7bcd65Smrg test -n "${am_cv_prog_tar_$1}" && break 11319e7bcd65Smrg 11329e7bcd65Smrg # tar/untar a dummy directory, and stop if the command works. 11339e7bcd65Smrg rm -rf conftest.dir 11349e7bcd65Smrg mkdir conftest.dir 11359e7bcd65Smrg echo GrepMe > conftest.dir/file 11369e7bcd65Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11379e7bcd65Smrg rm -rf conftest.dir 11389e7bcd65Smrg if test -s conftest.tar; then 11399e7bcd65Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 11409e7bcd65Smrg AM_RUN_LOG([cat conftest.dir/file]) 11419e7bcd65Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11429e7bcd65Smrg fi 11439e7bcd65Smrg done 11449e7bcd65Smrg rm -rf conftest.dir 11459e7bcd65Smrg 11469e7bcd65Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11479e7bcd65Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11489e7bcd65Smrg 11499e7bcd65SmrgAC_SUBST([am__tar]) 11509e7bcd65SmrgAC_SUBST([am__untar]) 11519e7bcd65Smrg]) # _AM_PROG_TAR 11529e7bcd65Smrg 11539e7bcd65Smrgm4_include([m4/ax_define_dir.m4]) 11549e7bcd65Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 1155249c3046Smrg# 11569e7bcd65Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 11579e7bcd65Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 11589e7bcd65Smrg# Foundation, Inc. 11599e7bcd65Smrg# Written by Gordon Matzigkeit, 1996 1160249c3046Smrg# 11619e7bcd65Smrg# This file is free software; the Free Software Foundation gives 11629e7bcd65Smrg# unlimited permission to copy and/or distribute it, with or without 11639e7bcd65Smrg# modifications, as long as this notice is preserved. 11649e7bcd65Smrg 11659e7bcd65Smrgm4_define([_LT_COPYING], [dnl 11669e7bcd65Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 11679e7bcd65Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 11689e7bcd65Smrg# Foundation, Inc. 11699e7bcd65Smrg# Written by Gordon Matzigkeit, 1996 1170249c3046Smrg# 11719e7bcd65Smrg# This file is part of GNU Libtool. 1172bdf0f55dSmrg# 11739e7bcd65Smrg# GNU Libtool is free software; you can redistribute it and/or 11749e7bcd65Smrg# modify it under the terms of the GNU General Public License as 11759e7bcd65Smrg# published by the Free Software Foundation; either version 2 of 11769e7bcd65Smrg# the License, or (at your option) any later version. 1177bdf0f55dSmrg# 11789e7bcd65Smrg# As a special exception to the GNU General Public License, 11799e7bcd65Smrg# if you distribute this file as part of a program or library that 11809e7bcd65Smrg# is built using GNU Libtool, you may include this file under the 11819e7bcd65Smrg# same distribution terms that you use for the rest of that program. 1182bdf0f55dSmrg# 11839e7bcd65Smrg# GNU Libtool is distributed in the hope that it will be useful, 11849e7bcd65Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 11859e7bcd65Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11869e7bcd65Smrg# GNU General Public License for more details. 1187bdf0f55dSmrg# 11889e7bcd65Smrg# You should have received a copy of the GNU General Public License 11899e7bcd65Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 11909e7bcd65Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 11919e7bcd65Smrg# obtained by writing to the Free Software Foundation, Inc., 11929e7bcd65Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 11939e7bcd65Smrg]) 11941477040fSmrg 11959e7bcd65Smrg# serial 57 LT_INIT 11961477040fSmrg 11971477040fSmrg 11989e7bcd65Smrg# LT_PREREQ(VERSION) 11999e7bcd65Smrg# ------------------ 12009e7bcd65Smrg# Complain and exit if this libtool version is less that VERSION. 12019e7bcd65Smrgm4_defun([LT_PREREQ], 12029e7bcd65Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 12039e7bcd65Smrg [m4_default([$3], 12049e7bcd65Smrg [m4_fatal([Libtool version $1 or higher is required], 12059e7bcd65Smrg 63)])], 12069e7bcd65Smrg [$2])]) 12071477040fSmrg 1208444c061aSmrg 12099e7bcd65Smrg# _LT_CHECK_BUILDDIR 12109e7bcd65Smrg# ------------------ 12119e7bcd65Smrg# Complain if the absolute build directory name contains unusual characters 12129e7bcd65Smrgm4_defun([_LT_CHECK_BUILDDIR], 12139e7bcd65Smrg[case `pwd` in 12149e7bcd65Smrg *\ * | *\ *) 12159e7bcd65Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 12169e7bcd65Smrgesac 12179e7bcd65Smrg]) 12182265a131Smrg 12199e7bcd65Smrg 12209e7bcd65Smrg# LT_INIT([OPTIONS]) 12219e7bcd65Smrg# ------------------ 12229e7bcd65SmrgAC_DEFUN([LT_INIT], 12239e7bcd65Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 12249e7bcd65SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 12259e7bcd65SmrgAC_BEFORE([$0], [LT_LANG])dnl 12269e7bcd65SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 12279e7bcd65SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 12289e7bcd65Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 12299e7bcd65Smrg 12309e7bcd65Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 12319e7bcd65Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 12329e7bcd65Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 12339e7bcd65Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 12349e7bcd65Smrgdnl unless we require an AC_DEFUNed macro: 12359e7bcd65SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 12369e7bcd65SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 12379e7bcd65SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 12389e7bcd65SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 12399e7bcd65Smrgm4_require([_LT_PROG_LTMAIN])dnl 12409e7bcd65Smrg 12419e7bcd65Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 12429e7bcd65Smrg 12439e7bcd65Smrgdnl Parse OPTIONS 12449e7bcd65Smrg_LT_SET_OPTIONS([$0], [$1]) 12459e7bcd65Smrg 12469e7bcd65Smrg# This can be used to rebuild libtool when needed 12479e7bcd65SmrgLIBTOOL_DEPS="$ltmain" 12489e7bcd65Smrg 12499e7bcd65Smrg# Always use our own libtool. 12509e7bcd65SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 12519e7bcd65SmrgAC_SUBST(LIBTOOL)dnl 12529e7bcd65Smrg 12539e7bcd65Smrg_LT_SETUP 12549e7bcd65Smrg 12559e7bcd65Smrg# Only expand once: 12569e7bcd65Smrgm4_define([LT_INIT]) 12579e7bcd65Smrg])# LT_INIT 12589e7bcd65Smrg 12599e7bcd65Smrg# Old names: 12609e7bcd65SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 12619e7bcd65SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 12629e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 12639e7bcd65Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 12649e7bcd65Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 12659e7bcd65Smrg 12669e7bcd65Smrg 12679e7bcd65Smrg# _LT_CC_BASENAME(CC) 12689e7bcd65Smrg# ------------------- 12699e7bcd65Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 12709e7bcd65Smrgm4_defun([_LT_CC_BASENAME], 12719e7bcd65Smrg[for cc_temp in $1""; do 12729e7bcd65Smrg case $cc_temp in 12739e7bcd65Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 12749e7bcd65Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 12759e7bcd65Smrg \-*) ;; 12769e7bcd65Smrg *) break;; 12779e7bcd65Smrg esac 12789e7bcd65Smrgdone 12799e7bcd65Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 12809e7bcd65Smrg]) 12819e7bcd65Smrg 12829e7bcd65Smrg 12839e7bcd65Smrg# _LT_FILEUTILS_DEFAULTS 12849e7bcd65Smrg# ---------------------- 12859e7bcd65Smrg# It is okay to use these file commands and assume they have been set 12869e7bcd65Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 12879e7bcd65Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 12889e7bcd65Smrg[: ${CP="cp -f"} 12899e7bcd65Smrg: ${MV="mv -f"} 12909e7bcd65Smrg: ${RM="rm -f"} 12919e7bcd65Smrg])# _LT_FILEUTILS_DEFAULTS 12929e7bcd65Smrg 12939e7bcd65Smrg 12949e7bcd65Smrg# _LT_SETUP 12959e7bcd65Smrg# --------- 12969e7bcd65Smrgm4_defun([_LT_SETUP], 12979e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 12989e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 12999e7bcd65SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 13009e7bcd65SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 13019e7bcd65Smrg 13029e7bcd65Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 13039e7bcd65Smrgdnl 13049e7bcd65Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 13059e7bcd65Smrg_LT_DECL([], [host], [0])dnl 13069e7bcd65Smrg_LT_DECL([], [host_os], [0])dnl 13079e7bcd65Smrgdnl 13089e7bcd65Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 13099e7bcd65Smrg_LT_DECL([], [build], [0])dnl 13109e7bcd65Smrg_LT_DECL([], [build_os], [0])dnl 13119e7bcd65Smrgdnl 13129e7bcd65SmrgAC_REQUIRE([AC_PROG_CC])dnl 13139e7bcd65SmrgAC_REQUIRE([LT_PATH_LD])dnl 13149e7bcd65SmrgAC_REQUIRE([LT_PATH_NM])dnl 13159e7bcd65Smrgdnl 13169e7bcd65SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 13179e7bcd65Smrgtest -z "$LN_S" && LN_S="ln -s" 13189e7bcd65Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 13199e7bcd65Smrgdnl 13209e7bcd65SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 13219e7bcd65Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 13229e7bcd65Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 13239e7bcd65Smrgdnl 13249e7bcd65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 13259e7bcd65Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 13269e7bcd65Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 13279e7bcd65Smrgm4_require([_LT_CMD_RELOAD])dnl 13289e7bcd65Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 13299e7bcd65Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 13309e7bcd65Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 13319e7bcd65Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 13329e7bcd65Smrgm4_require([_LT_WITH_SYSROOT])dnl 13339e7bcd65Smrg 13349e7bcd65Smrg_LT_CONFIG_LIBTOOL_INIT([ 13359e7bcd65Smrg# See if we are running on zsh, and set the options which allow our 13369e7bcd65Smrg# commands through without removal of \ escapes INIT. 13379e7bcd65Smrgif test -n "\${ZSH_VERSION+set}" ; then 13389e7bcd65Smrg setopt NO_GLOB_SUBST 13399e7bcd65Smrgfi 13409e7bcd65Smrg]) 13419e7bcd65Smrgif test -n "${ZSH_VERSION+set}" ; then 13429e7bcd65Smrg setopt NO_GLOB_SUBST 1343249c3046Smrgfi 1344444c061aSmrg 13459e7bcd65Smrg_LT_CHECK_OBJDIR 13469e7bcd65Smrg 13479e7bcd65Smrgm4_require([_LT_TAG_COMPILER])dnl 13489e7bcd65Smrg 13499e7bcd65Smrgcase $host_os in 13509e7bcd65Smrgaix3*) 13519e7bcd65Smrg # AIX sometimes has problems with the GCC collect2 program. For some 13529e7bcd65Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 13539e7bcd65Smrg # vanish in a puff of smoke. 13549e7bcd65Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 13559e7bcd65Smrg COLLECT_NAMES= 13569e7bcd65Smrg export COLLECT_NAMES 13579e7bcd65Smrg fi 13589e7bcd65Smrg ;; 13599e7bcd65Smrgesac 13609e7bcd65Smrg 13619e7bcd65Smrg# Global variables: 13629e7bcd65Smrgofile=libtool 13639e7bcd65Smrgcan_build_shared=yes 13649e7bcd65Smrg 13659e7bcd65Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 13669e7bcd65Smrg# which needs '.lib'). 13679e7bcd65Smrglibext=a 13689e7bcd65Smrg 13699e7bcd65Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 13709e7bcd65Smrg 13719e7bcd65Smrgold_CC="$CC" 13729e7bcd65Smrgold_CFLAGS="$CFLAGS" 13739e7bcd65Smrg 13749e7bcd65Smrg# Set sane defaults for various variables 13759e7bcd65Smrgtest -z "$CC" && CC=cc 13769e7bcd65Smrgtest -z "$LTCC" && LTCC=$CC 13779e7bcd65Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 13789e7bcd65Smrgtest -z "$LD" && LD=ld 13799e7bcd65Smrgtest -z "$ac_objext" && ac_objext=o 13809e7bcd65Smrg 13819e7bcd65Smrg_LT_CC_BASENAME([$compiler]) 13829e7bcd65Smrg 13839e7bcd65Smrg# Only perform the check for file, if the check method requires it 13849e7bcd65Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 13859e7bcd65Smrgcase $deplibs_check_method in 13869e7bcd65Smrgfile_magic*) 13879e7bcd65Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 13889e7bcd65Smrg _LT_PATH_MAGIC 13899e7bcd65Smrg fi 13909e7bcd65Smrg ;; 13919e7bcd65Smrgesac 13929e7bcd65Smrg 13939e7bcd65Smrg# Use C for the default configuration in the libtool script 13949e7bcd65SmrgLT_SUPPORTED_TAG([CC]) 13959e7bcd65Smrg_LT_LANG_C_CONFIG 13969e7bcd65Smrg_LT_LANG_DEFAULT_CONFIG 13979e7bcd65Smrg_LT_CONFIG_COMMANDS 13989e7bcd65Smrg])# _LT_SETUP 13999e7bcd65Smrg 14009e7bcd65Smrg 14019e7bcd65Smrg# _LT_PREPARE_SED_QUOTE_VARS 14029e7bcd65Smrg# -------------------------- 14039e7bcd65Smrg# Define a few sed substitution that help us do robust quoting. 14049e7bcd65Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 14059e7bcd65Smrg[# Backslashify metacharacters that are still active within 14069e7bcd65Smrg# double-quoted strings. 14079e7bcd65Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 14089e7bcd65Smrg 14099e7bcd65Smrg# Same as above, but do not quote variable references. 14109e7bcd65Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 14119e7bcd65Smrg 14129e7bcd65Smrg# Sed substitution to delay expansion of an escaped shell variable in a 14139e7bcd65Smrg# double_quote_subst'ed string. 14149e7bcd65Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 14159e7bcd65Smrg 14169e7bcd65Smrg# Sed substitution to delay expansion of an escaped single quote. 14179e7bcd65Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 14189e7bcd65Smrg 14199e7bcd65Smrg# Sed substitution to avoid accidental globbing in evaled expressions 14209e7bcd65Smrgno_glob_subst='s/\*/\\\*/g' 14219e7bcd65Smrg]) 14229e7bcd65Smrg 14239e7bcd65Smrg# _LT_PROG_LTMAIN 14249e7bcd65Smrg# --------------- 14259e7bcd65Smrg# Note that this code is called both from `configure', and `config.status' 14269e7bcd65Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 14279e7bcd65Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 14289e7bcd65Smrg# so we pass a copy along to make sure it has a sensible value anyway. 14299e7bcd65Smrgm4_defun([_LT_PROG_LTMAIN], 14309e7bcd65Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 14319e7bcd65Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 14329e7bcd65Smrgltmain="$ac_aux_dir/ltmain.sh" 14339e7bcd65Smrg])# _LT_PROG_LTMAIN 14349e7bcd65Smrg 14359e7bcd65Smrg 14369e7bcd65Smrg 14379e7bcd65Smrg# So that we can recreate a full libtool script including additional 14389e7bcd65Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 14399e7bcd65Smrg# in macros and then make a single call at the end using the `libtool' 14409e7bcd65Smrg# label. 14419e7bcd65Smrg 14429e7bcd65Smrg 14439e7bcd65Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 14449e7bcd65Smrg# ---------------------------------------- 14459e7bcd65Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14469e7bcd65Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 14479e7bcd65Smrg[m4_ifval([$1], 14489e7bcd65Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 14499e7bcd65Smrg [$1 14509e7bcd65Smrg])])]) 14519e7bcd65Smrg 14529e7bcd65Smrg# Initialize. 14539e7bcd65Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 14549e7bcd65Smrg 14559e7bcd65Smrg 14569e7bcd65Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 14579e7bcd65Smrg# ------------------------------ 14589e7bcd65Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14599e7bcd65Smrgm4_define([_LT_CONFIG_LIBTOOL], 14609e7bcd65Smrg[m4_ifval([$1], 14619e7bcd65Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 14629e7bcd65Smrg [$1 14639e7bcd65Smrg])])]) 14649e7bcd65Smrg 14659e7bcd65Smrg# Initialize. 14669e7bcd65Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 14679e7bcd65Smrg 14689e7bcd65Smrg 14699e7bcd65Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 14709e7bcd65Smrg# ----------------------------------------------------- 14719e7bcd65Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 14729e7bcd65Smrg[_LT_CONFIG_LIBTOOL([$1]) 14739e7bcd65Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 14749e7bcd65Smrg]) 14759e7bcd65Smrg 14769e7bcd65Smrg 14779e7bcd65Smrg# _LT_FORMAT_COMMENT([COMMENT]) 14789e7bcd65Smrg# ----------------------------- 14799e7bcd65Smrg# Add leading comment marks to the start of each line, and a trailing 14809e7bcd65Smrg# full-stop to the whole comment if one is not present already. 14819e7bcd65Smrgm4_define([_LT_FORMAT_COMMENT], 14829e7bcd65Smrg[m4_ifval([$1], [ 14839e7bcd65Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 14849e7bcd65Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 14859e7bcd65Smrg)]) 14869e7bcd65Smrg 14879e7bcd65Smrg 14889e7bcd65Smrg 14899e7bcd65Smrg 14909e7bcd65Smrg 14919e7bcd65Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 14929e7bcd65Smrg# ------------------------------------------------------------------- 14939e7bcd65Smrg# CONFIGNAME is the name given to the value in the libtool script. 14949e7bcd65Smrg# VARNAME is the (base) name used in the configure script. 14959e7bcd65Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 14969e7bcd65Smrg# VARNAME. Any other value will be used directly. 14979e7bcd65Smrgm4_define([_LT_DECL], 14989e7bcd65Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 14999e7bcd65Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 15009e7bcd65Smrg [m4_ifval([$1], [$1], [$2])]) 15019e7bcd65Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 15029e7bcd65Smrg m4_ifval([$4], 15039e7bcd65Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 15049e7bcd65Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 15059e7bcd65Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 15069e7bcd65Smrg]) 15079e7bcd65Smrg 15089e7bcd65Smrg 15099e7bcd65Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 15109e7bcd65Smrg# -------------------------------------------------------- 15119e7bcd65Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 15129e7bcd65Smrg 15139e7bcd65Smrg 15149e7bcd65Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 15159e7bcd65Smrg# ------------------------------------------------ 15169e7bcd65Smrgm4_define([lt_decl_tag_varnames], 15179e7bcd65Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 15189e7bcd65Smrg 15199e7bcd65Smrg 15209e7bcd65Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 15219e7bcd65Smrg# --------------------------------------------------------- 15229e7bcd65Smrgm4_define([_lt_decl_filter], 15239e7bcd65Smrg[m4_case([$#], 15249e7bcd65Smrg [0], [m4_fatal([$0: too few arguments: $#])], 15259e7bcd65Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 15269e7bcd65Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 15279e7bcd65Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 15289e7bcd65Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 15299e7bcd65Smrg]) 15309e7bcd65Smrg 15319e7bcd65Smrg 15329e7bcd65Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 15339e7bcd65Smrg# -------------------------------------------------- 15349e7bcd65Smrgm4_define([lt_decl_quote_varnames], 15359e7bcd65Smrg[_lt_decl_filter([value], [1], $@)]) 15369e7bcd65Smrg 15379e7bcd65Smrg 15389e7bcd65Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 15399e7bcd65Smrg# --------------------------------------------------- 15409e7bcd65Smrgm4_define([lt_decl_dquote_varnames], 15419e7bcd65Smrg[_lt_decl_filter([value], [2], $@)]) 15429e7bcd65Smrg 15439e7bcd65Smrg 15449e7bcd65Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 15459e7bcd65Smrg# --------------------------------------------------- 15469e7bcd65Smrgm4_define([lt_decl_varnames_tagged], 15479e7bcd65Smrg[m4_assert([$# <= 2])dnl 15489e7bcd65Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 15499e7bcd65Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 15509e7bcd65Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 15519e7bcd65Smrgm4_define([_lt_decl_varnames_tagged], 15529e7bcd65Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 15539e7bcd65Smrg 15549e7bcd65Smrg 15559e7bcd65Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 15569e7bcd65Smrg# ------------------------------------------------ 15579e7bcd65Smrgm4_define([lt_decl_all_varnames], 15589e7bcd65Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 15599e7bcd65Smrg m4_if([$2], [], 15609e7bcd65Smrg m4_quote(lt_decl_varnames), 15619e7bcd65Smrg m4_quote(m4_shift($@))))[]dnl 15629e7bcd65Smrg]) 15639e7bcd65Smrgm4_define([_lt_decl_all_varnames], 15649e7bcd65Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 15659e7bcd65Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 15669e7bcd65Smrg]) 15679e7bcd65Smrg 15689e7bcd65Smrg 15699e7bcd65Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 15709e7bcd65Smrg# ------------------------------------ 15719e7bcd65Smrg# Quote a variable value, and forward it to `config.status' so that its 15729e7bcd65Smrg# declaration there will have the same value as in `configure'. VARNAME 15739e7bcd65Smrg# must have a single quote delimited value for this to work. 15749e7bcd65Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 15759e7bcd65Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 15769e7bcd65Smrg 15779e7bcd65Smrg 15789e7bcd65Smrg# _LT_CONFIG_STATUS_DECLARATIONS 15799e7bcd65Smrg# ------------------------------ 15809e7bcd65Smrg# We delimit libtool config variables with single quotes, so when 15819e7bcd65Smrg# we write them to config.status, we have to be sure to quote all 15829e7bcd65Smrg# embedded single quotes properly. In configure, this macro expands 15839e7bcd65Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1584bdf0f55dSmrg# 15859e7bcd65Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 15869e7bcd65Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 15879e7bcd65Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 15889e7bcd65Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 15891477040fSmrg 15901477040fSmrg 15919e7bcd65Smrg# _LT_LIBTOOL_TAGS 1592bdf0f55dSmrg# ---------------- 15939e7bcd65Smrg# Output comment and list of tags supported by the script 15949e7bcd65Smrgm4_defun([_LT_LIBTOOL_TAGS], 15959e7bcd65Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 15969e7bcd65Smrgavailable_tags="_LT_TAGS"dnl 15979e7bcd65Smrg]) 15989e7bcd65Smrg 15999e7bcd65Smrg 16009e7bcd65Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 16019e7bcd65Smrg# ----------------------------------- 16029e7bcd65Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 16039e7bcd65Smrg# expand to a commented shell variable setting: 1604bdf0f55dSmrg# 16059e7bcd65Smrg# # Some comment about what VAR is for. 16069e7bcd65Smrg# visible_name=$lt_internal_name 16079e7bcd65Smrgm4_define([_LT_LIBTOOL_DECLARE], 16089e7bcd65Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 16099e7bcd65Smrg [description])))[]dnl 16109e7bcd65Smrgm4_pushdef([_libtool_name], 16119e7bcd65Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 16129e7bcd65Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 16139e7bcd65Smrg [0], [_libtool_name=[$]$1], 16149e7bcd65Smrg [1], [_libtool_name=$lt_[]$1], 16159e7bcd65Smrg [2], [_libtool_name=$lt_[]$1], 16169e7bcd65Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 16179e7bcd65Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 16189e7bcd65Smrg]) 16191477040fSmrg 16201477040fSmrg 16219e7bcd65Smrg# _LT_LIBTOOL_CONFIG_VARS 16229e7bcd65Smrg# ----------------------- 16239e7bcd65Smrg# Produce commented declarations of non-tagged libtool config variables 16249e7bcd65Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 16259e7bcd65Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 16269e7bcd65Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 16279e7bcd65Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 16289e7bcd65Smrg[m4_foreach([_lt_var], 16299e7bcd65Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 16309e7bcd65Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 16312265a131Smrg 16322265a131Smrg 16339e7bcd65Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 16349e7bcd65Smrg# ------------------------- 16359e7bcd65Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 16369e7bcd65Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 16379e7bcd65Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 16381477040fSmrg 16392265a131Smrg 16409e7bcd65Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 16419e7bcd65Smrg# ------------------------------ 16429e7bcd65Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 16432265a131Smrg 16441477040fSmrg 16459e7bcd65Smrg# _LT_CONFIG_COMMANDS 16469e7bcd65Smrg# ------------------- 16479e7bcd65Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 16489e7bcd65Smrg# variables for single and double quote escaping we saved from calls 16499e7bcd65Smrg# to _LT_DECL, we can put quote escaped variables declarations 16509e7bcd65Smrg# into `config.status', and then the shell code to quote escape them in 16519e7bcd65Smrg# for loops in `config.status'. Finally, any additional code accumulated 16529e7bcd65Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 16539e7bcd65Smrgm4_defun([_LT_CONFIG_COMMANDS], 16549e7bcd65Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 16559e7bcd65Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 16569e7bcd65Smrg dnl instead of duplicating it all over again into config.status, 16579e7bcd65Smrg dnl then we will have config.status run $CONFIG_LT later, so it 16589e7bcd65Smrg dnl needs to know what name is stored there: 16599e7bcd65Smrg [AC_CONFIG_COMMANDS([libtool], 16609e7bcd65Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 16619e7bcd65Smrg dnl If the libtool generation code is destined for config.status, 16629e7bcd65Smrg dnl expand the accumulated commands and init code now: 16639e7bcd65Smrg [AC_CONFIG_COMMANDS([libtool], 16649e7bcd65Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 16659e7bcd65Smrg])#_LT_CONFIG_COMMANDS 16669e7bcd65Smrg 16679e7bcd65Smrg 16689e7bcd65Smrg# Initialize. 16699e7bcd65Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 16709e7bcd65Smrg[ 16719e7bcd65Smrg 16729e7bcd65Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 16739e7bcd65Smrg# if CDPATH is set. 16749e7bcd65Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 16759e7bcd65Smrg 16769e7bcd65Smrgsed_quote_subst='$sed_quote_subst' 16779e7bcd65Smrgdouble_quote_subst='$double_quote_subst' 16789e7bcd65Smrgdelay_variable_subst='$delay_variable_subst' 16799e7bcd65Smrg_LT_CONFIG_STATUS_DECLARATIONS 16809e7bcd65SmrgLTCC='$LTCC' 16819e7bcd65SmrgLTCFLAGS='$LTCFLAGS' 16829e7bcd65Smrgcompiler='$compiler_DEFAULT' 16839e7bcd65Smrg 16849e7bcd65Smrg# A function that is used when there is no print builtin or printf. 16859e7bcd65Smrgfunc_fallback_echo () 16869e7bcd65Smrg{ 16879e7bcd65Smrg eval 'cat <<_LTECHO_EOF 16889e7bcd65Smrg\$[]1 16899e7bcd65Smrg_LTECHO_EOF' 16909e7bcd65Smrg} 16911477040fSmrg 16929e7bcd65Smrg# Quote evaled strings. 16939e7bcd65Smrgfor var in lt_decl_all_varnames([[ \ 16949e7bcd65Smrg]], lt_decl_quote_varnames); do 16959e7bcd65Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 16969e7bcd65Smrg *[[\\\\\\\`\\"\\\$]]*) 16979e7bcd65Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 16989e7bcd65Smrg ;; 16999e7bcd65Smrg *) 17009e7bcd65Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 17019e7bcd65Smrg ;; 17029e7bcd65Smrg esac 17039e7bcd65Smrgdone 17041477040fSmrg 17059e7bcd65Smrg# Double-quote double-evaled strings. 17069e7bcd65Smrgfor var in lt_decl_all_varnames([[ \ 17079e7bcd65Smrg]], lt_decl_dquote_varnames); do 17089e7bcd65Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 17099e7bcd65Smrg *[[\\\\\\\`\\"\\\$]]*) 17109e7bcd65Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 17119e7bcd65Smrg ;; 17129e7bcd65Smrg *) 17139e7bcd65Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 17149e7bcd65Smrg ;; 17159e7bcd65Smrg esac 17169e7bcd65Smrgdone 17171477040fSmrg 17189e7bcd65Smrg_LT_OUTPUT_LIBTOOL_INIT 17199e7bcd65Smrg]) 17209e7bcd65Smrg 17219e7bcd65Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 17229e7bcd65Smrg# ------------------------------------ 17239e7bcd65Smrg# Generate a child script FILE with all initialization necessary to 17249e7bcd65Smrg# reuse the environment learned by the parent script, and make the 17259e7bcd65Smrg# file executable. If COMMENT is supplied, it is inserted after the 17269e7bcd65Smrg# `#!' sequence but before initialization text begins. After this 17279e7bcd65Smrg# macro, additional text can be appended to FILE to form the body of 17289e7bcd65Smrg# the child script. The macro ends with non-zero status if the 17299e7bcd65Smrg# file could not be fully written (such as if the disk is full). 17309e7bcd65Smrgm4_ifdef([AS_INIT_GENERATED], 17319e7bcd65Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 17329e7bcd65Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 17339e7bcd65Smrg[m4_require([AS_PREPARE])]dnl 17349e7bcd65Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 17359e7bcd65Smrg[lt_write_fail=0 17369e7bcd65Smrgcat >$1 <<_ASEOF || lt_write_fail=1 17379e7bcd65Smrg#! $SHELL 17389e7bcd65Smrg# Generated by $as_me. 17399e7bcd65Smrg$2 17409e7bcd65SmrgSHELL=\${CONFIG_SHELL-$SHELL} 17419e7bcd65Smrgexport SHELL 17429e7bcd65Smrg_ASEOF 17439e7bcd65Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 17449e7bcd65SmrgAS_SHELL_SANITIZE 17459e7bcd65Smrg_AS_PREPARE 17469e7bcd65Smrgexec AS_MESSAGE_FD>&1 17479e7bcd65Smrg_ASEOF 17489e7bcd65Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 17499e7bcd65Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 17509e7bcd65Smrg 17519e7bcd65Smrg# LT_OUTPUT 17529e7bcd65Smrg# --------- 17539e7bcd65Smrg# This macro allows early generation of the libtool script (before 17549e7bcd65Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 17559e7bcd65Smrg# tests. 17569e7bcd65SmrgAC_DEFUN([LT_OUTPUT], 17579e7bcd65Smrg[: ${CONFIG_LT=./config.lt} 17589e7bcd65SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 17599e7bcd65Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 17609e7bcd65Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 17619e7bcd65Smrg 17629e7bcd65Smrgcat >>"$CONFIG_LT" <<\_LTEOF 17639e7bcd65Smrglt_cl_silent=false 17649e7bcd65Smrgexec AS_MESSAGE_LOG_FD>>config.log 17659e7bcd65Smrg{ 17669e7bcd65Smrg echo 17679e7bcd65Smrg AS_BOX([Running $as_me.]) 17689e7bcd65Smrg} >&AS_MESSAGE_LOG_FD 17699e7bcd65Smrg 17709e7bcd65Smrglt_cl_help="\ 17719e7bcd65Smrg\`$as_me' creates a local libtool stub from the current configuration, 17729e7bcd65Smrgfor use in further configure time tests before the real libtool is 17739e7bcd65Smrggenerated. 17749e7bcd65Smrg 17759e7bcd65SmrgUsage: $[0] [[OPTIONS]] 17769e7bcd65Smrg 17779e7bcd65Smrg -h, --help print this help, then exit 17789e7bcd65Smrg -V, --version print version number, then exit 17799e7bcd65Smrg -q, --quiet do not print progress messages 17809e7bcd65Smrg -d, --debug don't remove temporary files 17819e7bcd65Smrg 17829e7bcd65SmrgReport bugs to <bug-libtool@gnu.org>." 17839e7bcd65Smrg 17849e7bcd65Smrglt_cl_version="\ 17859e7bcd65Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 17869e7bcd65Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 17879e7bcd65Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 17889e7bcd65Smrg 17899e7bcd65SmrgCopyright (C) 2011 Free Software Foundation, Inc. 17909e7bcd65SmrgThis config.lt script is free software; the Free Software Foundation 17919e7bcd65Smrggives unlimited permision to copy, distribute and modify it." 17929e7bcd65Smrg 17939e7bcd65Smrgwhile test $[#] != 0 17949e7bcd65Smrgdo 17959e7bcd65Smrg case $[1] in 17969e7bcd65Smrg --version | --v* | -V ) 17979e7bcd65Smrg echo "$lt_cl_version"; exit 0 ;; 17989e7bcd65Smrg --help | --h* | -h ) 17999e7bcd65Smrg echo "$lt_cl_help"; exit 0 ;; 18009e7bcd65Smrg --debug | --d* | -d ) 18019e7bcd65Smrg debug=: ;; 18029e7bcd65Smrg --quiet | --q* | --silent | --s* | -q ) 18039e7bcd65Smrg lt_cl_silent=: ;; 18049e7bcd65Smrg 18059e7bcd65Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 18069e7bcd65SmrgTry \`$[0] --help' for more information.]) ;; 18079e7bcd65Smrg 18089e7bcd65Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 18099e7bcd65SmrgTry \`$[0] --help' for more information.]) ;; 18109e7bcd65Smrg esac 18119e7bcd65Smrg shift 18129e7bcd65Smrgdone 18139e7bcd65Smrg 18149e7bcd65Smrgif $lt_cl_silent; then 18159e7bcd65Smrg exec AS_MESSAGE_FD>/dev/null 1816bdf0f55dSmrgfi 18179e7bcd65Smrg_LTEOF 18189e7bcd65Smrg 18199e7bcd65Smrgcat >>"$CONFIG_LT" <<_LTEOF 18209e7bcd65Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 18219e7bcd65Smrg_LTEOF 18229e7bcd65Smrg 18239e7bcd65Smrgcat >>"$CONFIG_LT" <<\_LTEOF 18249e7bcd65SmrgAC_MSG_NOTICE([creating $ofile]) 18259e7bcd65Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 18269e7bcd65SmrgAS_EXIT(0) 18279e7bcd65Smrg_LTEOF 18289e7bcd65Smrgchmod +x "$CONFIG_LT" 18299e7bcd65Smrg 18309e7bcd65Smrg# configure is writing to config.log, but config.lt does its own redirection, 18319e7bcd65Smrg# appending to config.log, which fails on DOS, as config.log is still kept 18329e7bcd65Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 18339e7bcd65Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 18349e7bcd65Smrglt_cl_success=: 18359e7bcd65Smrgtest "$silent" = yes && 18369e7bcd65Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 18379e7bcd65Smrgexec AS_MESSAGE_LOG_FD>/dev/null 18389e7bcd65Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 18399e7bcd65Smrgexec AS_MESSAGE_LOG_FD>>config.log 18409e7bcd65Smrg$lt_cl_success || AS_EXIT(1) 18419e7bcd65Smrg])# LT_OUTPUT 18429e7bcd65Smrg 18439e7bcd65Smrg 18449e7bcd65Smrg# _LT_CONFIG(TAG) 18459e7bcd65Smrg# --------------- 18469e7bcd65Smrg# If TAG is the built-in tag, create an initial libtool script with a 18479e7bcd65Smrg# default configuration from the untagged config vars. Otherwise add code 18489e7bcd65Smrg# to config.status for appending the configuration named by TAG from the 18499e7bcd65Smrg# matching tagged config vars. 18509e7bcd65Smrgm4_defun([_LT_CONFIG], 18519e7bcd65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 18529e7bcd65Smrg_LT_CONFIG_SAVE_COMMANDS([ 18539e7bcd65Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 18549e7bcd65Smrg m4_if(_LT_TAG, [C], [ 18559e7bcd65Smrg # See if we are running on zsh, and set the options which allow our 18569e7bcd65Smrg # commands through without removal of \ escapes. 18579e7bcd65Smrg if test -n "${ZSH_VERSION+set}" ; then 18589e7bcd65Smrg setopt NO_GLOB_SUBST 18599e7bcd65Smrg fi 18601477040fSmrg 18619e7bcd65Smrg cfgfile="${ofile}T" 18629e7bcd65Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 18639e7bcd65Smrg $RM "$cfgfile" 18641477040fSmrg 18659e7bcd65Smrg cat <<_LT_EOF >> "$cfgfile" 18669e7bcd65Smrg#! $SHELL 18671477040fSmrg 18689e7bcd65Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 18699e7bcd65Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 18709e7bcd65Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 18719e7bcd65Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 1872bdf0f55dSmrg# 18739e7bcd65Smrg_LT_COPYING 18749e7bcd65Smrg_LT_LIBTOOL_TAGS 18759e7bcd65Smrg 18769e7bcd65Smrg# ### BEGIN LIBTOOL CONFIG 18779e7bcd65Smrg_LT_LIBTOOL_CONFIG_VARS 18789e7bcd65Smrg_LT_LIBTOOL_TAG_VARS 18799e7bcd65Smrg# ### END LIBTOOL CONFIG 18809e7bcd65Smrg 18819e7bcd65Smrg_LT_EOF 18829e7bcd65Smrg 18839e7bcd65Smrg case $host_os in 18849e7bcd65Smrg aix3*) 18859e7bcd65Smrg cat <<\_LT_EOF >> "$cfgfile" 18869e7bcd65Smrg# AIX sometimes has problems with the GCC collect2 program. For some 18879e7bcd65Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 18889e7bcd65Smrg# vanish in a puff of smoke. 18899e7bcd65Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 18909e7bcd65Smrg COLLECT_NAMES= 18919e7bcd65Smrg export COLLECT_NAMES 18929e7bcd65Smrgfi 18939e7bcd65Smrg_LT_EOF 18949e7bcd65Smrg ;; 18959e7bcd65Smrg esac 18961477040fSmrg 18979e7bcd65Smrg _LT_PROG_LTMAIN 18989e7bcd65Smrg 18999e7bcd65Smrg # We use sed instead of cat because bash on DJGPP gets confused if 19009e7bcd65Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 19019e7bcd65Smrg # text mode, it properly converts lines to CR/LF. This bash problem 19029e7bcd65Smrg # is reportedly fixed, but why not run on old versions too? 19039e7bcd65Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 19049e7bcd65Smrg || (rm -f "$cfgfile"; exit 1) 19059e7bcd65Smrg 19069e7bcd65Smrg _LT_PROG_REPLACE_SHELLFNS 19079e7bcd65Smrg 19089e7bcd65Smrg mv -f "$cfgfile" "$ofile" || 19099e7bcd65Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 19109e7bcd65Smrg chmod +x "$ofile" 19119e7bcd65Smrg], 19129e7bcd65Smrg[cat <<_LT_EOF >> "$ofile" 19139e7bcd65Smrg 19149e7bcd65Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 19159e7bcd65Smrgdnl in a comment (ie after a #). 19169e7bcd65Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 19179e7bcd65Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 19189e7bcd65Smrg# ### END LIBTOOL TAG CONFIG: $1 19199e7bcd65Smrg_LT_EOF 19209e7bcd65Smrg])dnl /m4_if 19219e7bcd65Smrg], 19229e7bcd65Smrg[m4_if([$1], [], [ 19239e7bcd65Smrg PACKAGE='$PACKAGE' 19249e7bcd65Smrg VERSION='$VERSION' 19259e7bcd65Smrg TIMESTAMP='$TIMESTAMP' 19269e7bcd65Smrg RM='$RM' 19279e7bcd65Smrg ofile='$ofile'], []) 19289e7bcd65Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 19299e7bcd65Smrg])# _LT_CONFIG 19309e7bcd65Smrg 19319e7bcd65Smrg 19329e7bcd65Smrg# LT_SUPPORTED_TAG(TAG) 19339e7bcd65Smrg# --------------------- 19349e7bcd65Smrg# Trace this macro to discover what tags are supported by the libtool 19359e7bcd65Smrg# --tag option, using: 19369e7bcd65Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 19379e7bcd65SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 19382265a131Smrg 19391477040fSmrg 19409e7bcd65Smrg# C support is built-in for now 19419e7bcd65Smrgm4_define([_LT_LANG_C_enabled], []) 19429e7bcd65Smrgm4_define([_LT_TAGS], []) 1943444c061aSmrg 19441477040fSmrg 19459e7bcd65Smrg# LT_LANG(LANG) 19469e7bcd65Smrg# ------------- 19479e7bcd65Smrg# Enable libtool support for the given language if not already enabled. 19489e7bcd65SmrgAC_DEFUN([LT_LANG], 19499e7bcd65Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 19509e7bcd65Smrgm4_case([$1], 19519e7bcd65Smrg [C], [_LT_LANG(C)], 19529e7bcd65Smrg [C++], [_LT_LANG(CXX)], 19539e7bcd65Smrg [Go], [_LT_LANG(GO)], 19549e7bcd65Smrg [Java], [_LT_LANG(GCJ)], 19559e7bcd65Smrg [Fortran 77], [_LT_LANG(F77)], 19569e7bcd65Smrg [Fortran], [_LT_LANG(FC)], 19579e7bcd65Smrg [Windows Resource], [_LT_LANG(RC)], 19589e7bcd65Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 19599e7bcd65Smrg [_LT_LANG($1)], 19609e7bcd65Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 19619e7bcd65Smrg])# LT_LANG 19629e7bcd65Smrg 19639e7bcd65Smrg 19649e7bcd65Smrg# _LT_LANG(LANGNAME) 19659e7bcd65Smrg# ------------------ 19669e7bcd65Smrgm4_defun([_LT_LANG], 19679e7bcd65Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 19689e7bcd65Smrg [LT_SUPPORTED_TAG([$1])dnl 19699e7bcd65Smrg m4_append([_LT_TAGS], [$1 ])dnl 19709e7bcd65Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 19719e7bcd65Smrg _LT_LANG_$1_CONFIG($1)])dnl 19729e7bcd65Smrg])# _LT_LANG 19739e7bcd65Smrg 19749e7bcd65Smrg 19759e7bcd65Smrgm4_ifndef([AC_PROG_GO], [ 19769e7bcd65Smrg# NOTE: This macro has been submitted for inclusion into # 19779e7bcd65Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 19789e7bcd65Smrg# a released version of Autoconf we should remove this # 19799e7bcd65Smrg# macro and use it instead. # 19809e7bcd65Smrgm4_defun([AC_PROG_GO], 19819e7bcd65Smrg[AC_LANG_PUSH(Go)dnl 19829e7bcd65SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 19839e7bcd65SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 19849e7bcd65Smrg_AC_ARG_VAR_LDFLAGS()dnl 19859e7bcd65SmrgAC_CHECK_TOOL(GOC, gccgo) 19869e7bcd65Smrgif test -z "$GOC"; then 19879e7bcd65Smrg if test -n "$ac_tool_prefix"; then 19889e7bcd65Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 19899e7bcd65Smrg fi 1990bdf0f55dSmrgfi 19919e7bcd65Smrgif test -z "$GOC"; then 19929e7bcd65Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 19939e7bcd65Smrgfi 19949e7bcd65Smrg])#m4_defun 19959e7bcd65Smrg])#m4_ifndef 19961477040fSmrg 19979e7bcd65Smrg 19989e7bcd65Smrg# _LT_LANG_DEFAULT_CONFIG 1999bdf0f55dSmrg# ----------------------- 20009e7bcd65Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 20019e7bcd65Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 20029e7bcd65Smrg [LT_LANG(CXX)], 20039e7bcd65Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 20049e7bcd65Smrg 20059e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 20069e7bcd65Smrg [LT_LANG(F77)], 20079e7bcd65Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 20089e7bcd65Smrg 20099e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 20109e7bcd65Smrg [LT_LANG(FC)], 20119e7bcd65Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 20129e7bcd65Smrg 20139e7bcd65Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 20149e7bcd65Smrgdnl pulling things in needlessly. 20159e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 20169e7bcd65Smrg [LT_LANG(GCJ)], 20179e7bcd65Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 20189e7bcd65Smrg [LT_LANG(GCJ)], 20199e7bcd65Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 20209e7bcd65Smrg [LT_LANG(GCJ)], 20219e7bcd65Smrg [m4_ifdef([AC_PROG_GCJ], 20229e7bcd65Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 20239e7bcd65Smrg m4_ifdef([A][M_PROG_GCJ], 20249e7bcd65Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 20259e7bcd65Smrg m4_ifdef([LT_PROG_GCJ], 20269e7bcd65Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 20279e7bcd65Smrg 20289e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 20299e7bcd65Smrg [LT_LANG(GO)], 20309e7bcd65Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 20319e7bcd65Smrg 20329e7bcd65SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 20339e7bcd65Smrg [LT_LANG(RC)], 20349e7bcd65Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 20359e7bcd65Smrg])# _LT_LANG_DEFAULT_CONFIG 20369e7bcd65Smrg 20379e7bcd65Smrg# Obsolete macros: 20389e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 20399e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 20409e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 20419e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 20429e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 20439e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 20449e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 20459e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 20469e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 20479e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 20489e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 20499e7bcd65Smrg 20509e7bcd65Smrg 20519e7bcd65Smrg# _LT_TAG_COMPILER 20529e7bcd65Smrg# ---------------- 20539e7bcd65Smrgm4_defun([_LT_TAG_COMPILER], 20549e7bcd65Smrg[AC_REQUIRE([AC_PROG_CC])dnl 20551477040fSmrg 20569e7bcd65Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 20579e7bcd65Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 20589e7bcd65Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 20599e7bcd65Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 20601477040fSmrg 20619e7bcd65Smrg# If no C compiler was specified, use CC. 20629e7bcd65SmrgLTCC=${LTCC-"$CC"} 20631477040fSmrg 20649e7bcd65Smrg# If no C compiler flags were specified, use CFLAGS. 20659e7bcd65SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 20661477040fSmrg 20679e7bcd65Smrg# Allow CC to be a program name with arguments. 20689e7bcd65Smrgcompiler=$CC 20699e7bcd65Smrg])# _LT_TAG_COMPILER 20701477040fSmrg 20711477040fSmrg 20729e7bcd65Smrg# _LT_COMPILER_BOILERPLATE 20739e7bcd65Smrg# ------------------------ 20749e7bcd65Smrg# Check for compiler boilerplate output or warnings with 20759e7bcd65Smrg# the simple compiler test code. 20769e7bcd65Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 20779e7bcd65Smrg[m4_require([_LT_DECL_SED])dnl 20789e7bcd65Smrgac_outfile=conftest.$ac_objext 20799e7bcd65Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 20809e7bcd65Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20819e7bcd65Smrg_lt_compiler_boilerplate=`cat conftest.err` 20829e7bcd65Smrg$RM conftest* 20839e7bcd65Smrg])# _LT_COMPILER_BOILERPLATE 20849e7bcd65Smrg 20859e7bcd65Smrg 20869e7bcd65Smrg# _LT_LINKER_BOILERPLATE 20879e7bcd65Smrg# ---------------------- 20889e7bcd65Smrg# Check for linker boilerplate output or warnings with 20899e7bcd65Smrg# the simple link test code. 20909e7bcd65Smrgm4_defun([_LT_LINKER_BOILERPLATE], 20919e7bcd65Smrg[m4_require([_LT_DECL_SED])dnl 20929e7bcd65Smrgac_outfile=conftest.$ac_objext 20939e7bcd65Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 20949e7bcd65Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20959e7bcd65Smrg_lt_linker_boilerplate=`cat conftest.err` 20969e7bcd65Smrg$RM -r conftest* 20979e7bcd65Smrg])# _LT_LINKER_BOILERPLATE 20989e7bcd65Smrg 20999e7bcd65Smrg# _LT_REQUIRED_DARWIN_CHECKS 21009e7bcd65Smrg# ------------------------- 21019e7bcd65Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 21029e7bcd65Smrg case $host_os in 21039e7bcd65Smrg rhapsody* | darwin*) 21049e7bcd65Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 21059e7bcd65Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 21069e7bcd65Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 21079e7bcd65Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 21089e7bcd65Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 21099e7bcd65Smrg _LT_DECL([], [DSYMUTIL], [1], 21109e7bcd65Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 21119e7bcd65Smrg _LT_DECL([], [NMEDIT], [1], 21129e7bcd65Smrg [Tool to change global to local symbols on Mac OS X]) 21139e7bcd65Smrg _LT_DECL([], [LIPO], [1], 21149e7bcd65Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 21159e7bcd65Smrg _LT_DECL([], [OTOOL], [1], 21169e7bcd65Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 21179e7bcd65Smrg _LT_DECL([], [OTOOL64], [1], 21189e7bcd65Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 21199e7bcd65Smrg 21209e7bcd65Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 21219e7bcd65Smrg [lt_cv_apple_cc_single_mod=no 21229e7bcd65Smrg if test -z "${LT_MULTI_MODULE}"; then 21239e7bcd65Smrg # By default we will add the -single_module flag. You can override 21249e7bcd65Smrg # by either setting the environment variable LT_MULTI_MODULE 21259e7bcd65Smrg # non-empty at configure time, or by adding -multi_module to the 21269e7bcd65Smrg # link flags. 21279e7bcd65Smrg rm -rf libconftest.dylib* 21289e7bcd65Smrg echo "int foo(void){return 1;}" > conftest.c 21299e7bcd65Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21309e7bcd65Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 21319e7bcd65Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21329e7bcd65Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 21339e7bcd65Smrg _lt_result=$? 21349e7bcd65Smrg # If there is a non-empty error log, and "single_module" 21359e7bcd65Smrg # appears in it, assume the flag caused a linker warning 21369e7bcd65Smrg if test -s conftest.err && $GREP single_module conftest.err; then 21379e7bcd65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21389e7bcd65Smrg # Otherwise, if the output was created with a 0 exit code from 21399e7bcd65Smrg # the compiler, it worked. 21409e7bcd65Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 21419e7bcd65Smrg lt_cv_apple_cc_single_mod=yes 21429e7bcd65Smrg else 21439e7bcd65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21449e7bcd65Smrg fi 21459e7bcd65Smrg rm -rf libconftest.dylib* 21469e7bcd65Smrg rm -f conftest.* 21479e7bcd65Smrg fi]) 21489e7bcd65Smrg 21499e7bcd65Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 21509e7bcd65Smrg [lt_cv_ld_exported_symbols_list], 21519e7bcd65Smrg [lt_cv_ld_exported_symbols_list=no 21529e7bcd65Smrg save_LDFLAGS=$LDFLAGS 21539e7bcd65Smrg echo "_main" > conftest.sym 21549e7bcd65Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 21559e7bcd65Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 21569e7bcd65Smrg [lt_cv_ld_exported_symbols_list=yes], 21579e7bcd65Smrg [lt_cv_ld_exported_symbols_list=no]) 21589e7bcd65Smrg LDFLAGS="$save_LDFLAGS" 21599e7bcd65Smrg ]) 21601477040fSmrg 21619e7bcd65Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 21629e7bcd65Smrg [lt_cv_ld_force_load=no 21639e7bcd65Smrg cat > conftest.c << _LT_EOF 21649e7bcd65Smrgint forced_loaded() { return 2;} 21659e7bcd65Smrg_LT_EOF 21669e7bcd65Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 21679e7bcd65Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 21689e7bcd65Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 21699e7bcd65Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 21709e7bcd65Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 21719e7bcd65Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 21729e7bcd65Smrg cat > conftest.c << _LT_EOF 21739e7bcd65Smrgint main() { return 0;} 21749e7bcd65Smrg_LT_EOF 21759e7bcd65Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 21769e7bcd65Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 21779e7bcd65Smrg _lt_result=$? 21789e7bcd65Smrg if test -s conftest.err && $GREP force_load conftest.err; then 21799e7bcd65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21809e7bcd65Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 21819e7bcd65Smrg lt_cv_ld_force_load=yes 21829e7bcd65Smrg else 21839e7bcd65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21849e7bcd65Smrg fi 21859e7bcd65Smrg rm -f conftest.err libconftest.a conftest conftest.c 21869e7bcd65Smrg rm -rf conftest.dSYM 21879e7bcd65Smrg ]) 21889e7bcd65Smrg case $host_os in 21899e7bcd65Smrg rhapsody* | darwin1.[[012]]) 21909e7bcd65Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 21919e7bcd65Smrg darwin1.*) 21929e7bcd65Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 21939e7bcd65Smrg darwin*) # darwin 5.x on 21949e7bcd65Smrg # if running on 10.5 or later, the deployment target defaults 21959e7bcd65Smrg # to the OS version, if on x86, and 10.4, the deployment 21969e7bcd65Smrg # target defaults to 10.4. Don't you love it? 21979e7bcd65Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 21989e7bcd65Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 21999e7bcd65Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 22009e7bcd65Smrg 10.[[012]]*) 22019e7bcd65Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 22029e7bcd65Smrg 10.*) 22039e7bcd65Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 22049e7bcd65Smrg esac 22059e7bcd65Smrg ;; 22069e7bcd65Smrg esac 22079e7bcd65Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 22089e7bcd65Smrg _lt_dar_single_mod='$single_module' 22099e7bcd65Smrg fi 22109e7bcd65Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 22119e7bcd65Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 22129e7bcd65Smrg else 22139e7bcd65Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 22149e7bcd65Smrg fi 22159e7bcd65Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 22169e7bcd65Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 22179e7bcd65Smrg else 22189e7bcd65Smrg _lt_dsymutil= 22199e7bcd65Smrg fi 22209e7bcd65Smrg ;; 22219e7bcd65Smrg esac 2222249c3046Smrg]) 22231477040fSmrg 22242265a131Smrg 22259e7bcd65Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 22269e7bcd65Smrg# --------------------------------- 22279e7bcd65Smrg# Checks for linker and compiler features on darwin 22289e7bcd65Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 22299e7bcd65Smrg[ 22309e7bcd65Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 22319e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 22329e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 22339e7bcd65Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 22349e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 22359e7bcd65Smrg if test "$lt_cv_ld_force_load" = "yes"; then 22369e7bcd65Smrg _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\"`' 22379e7bcd65Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 22389e7bcd65Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 22399e7bcd65Smrg else 22409e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 22419e7bcd65Smrg fi 22429e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 22439e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 22449e7bcd65Smrg case $cc_basename in 22459e7bcd65Smrg ifort*) _lt_dar_can_shared=yes ;; 22469e7bcd65Smrg *) _lt_dar_can_shared=$GCC ;; 22479e7bcd65Smrg esac 22489e7bcd65Smrg if test "$_lt_dar_can_shared" = "yes"; then 22499e7bcd65Smrg output_verbose_link_cmd=func_echo_all 22509e7bcd65Smrg _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}" 22519e7bcd65Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 22529e7bcd65Smrg _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}" 22539e7bcd65Smrg _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}" 22549e7bcd65Smrg m4_if([$1], [CXX], 22559e7bcd65Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 22569e7bcd65Smrg _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}" 22579e7bcd65Smrg _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}" 22589e7bcd65Smrg fi 22599e7bcd65Smrg],[]) 22609e7bcd65Smrg else 22619e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 22629e7bcd65Smrg fi 22639e7bcd65Smrg]) 22642265a131Smrg 22659e7bcd65Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 22669e7bcd65Smrg# ---------------------------------- 22679e7bcd65Smrg# Links a minimal program and checks the executable 22689e7bcd65Smrg# for the system default hardcoded library path. In most cases, 22699e7bcd65Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 22709e7bcd65Smrg# the location of the communication and MPI libs are included too. 22719e7bcd65Smrg# If we don't find anything, use the default library path according 22729e7bcd65Smrg# to the aix ld manual. 22739e7bcd65Smrg# Store the results from the different compilers for each TAGNAME. 22749e7bcd65Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 22759e7bcd65Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 22769e7bcd65Smrg[m4_require([_LT_DECL_SED])dnl 22779e7bcd65Smrgif test "${lt_cv_aix_libpath+set}" = set; then 22789e7bcd65Smrg aix_libpath=$lt_cv_aix_libpath 22799e7bcd65Smrgelse 22809e7bcd65Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 22819e7bcd65Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 22829e7bcd65Smrg lt_aix_libpath_sed='[ 22839e7bcd65Smrg /Import File Strings/,/^$/ { 22849e7bcd65Smrg /^0/ { 22859e7bcd65Smrg s/^0 *\([^ ]*\) *$/\1/ 22869e7bcd65Smrg p 22879e7bcd65Smrg } 22889e7bcd65Smrg }]' 22899e7bcd65Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22909e7bcd65Smrg # Check for a 64-bit object if we didn't find anything. 22919e7bcd65Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22929e7bcd65Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22939e7bcd65Smrg fi],[]) 22949e7bcd65Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22959e7bcd65Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 22969e7bcd65Smrg fi 22979e7bcd65Smrg ]) 22989e7bcd65Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 22999e7bcd65Smrgfi 23009e7bcd65Smrg])# _LT_SYS_MODULE_PATH_AIX 23011477040fSmrg 23021477040fSmrg 23039e7bcd65Smrg# _LT_SHELL_INIT(ARG) 23049e7bcd65Smrg# ------------------- 23059e7bcd65Smrgm4_define([_LT_SHELL_INIT], 23069e7bcd65Smrg[m4_divert_text([M4SH-INIT], [$1 23079e7bcd65Smrg])])# _LT_SHELL_INIT 23081477040fSmrg 23091477040fSmrg 23101477040fSmrg 23119e7bcd65Smrg# _LT_PROG_ECHO_BACKSLASH 23129e7bcd65Smrg# ----------------------- 23139e7bcd65Smrg# Find how we can fake an echo command that does not interpret backslash. 23149e7bcd65Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 23159e7bcd65Smrg# of the generated configure script which will find a shell with a builtin 23169e7bcd65Smrg# printf (which we can use as an echo command). 23179e7bcd65Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 23189e7bcd65Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23199e7bcd65SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23209e7bcd65SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23219e7bcd65Smrg 23229e7bcd65SmrgAC_MSG_CHECKING([how to print strings]) 23239e7bcd65Smrg# Test print first, because it will be a builtin if present. 23249e7bcd65Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 23259e7bcd65Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 23269e7bcd65Smrg ECHO='print -r --' 23279e7bcd65Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 23289e7bcd65Smrg ECHO='printf %s\n' 2329bdf0f55dSmrgelse 23309e7bcd65Smrg # Use this function as a fallback that always works. 23319e7bcd65Smrg func_fallback_echo () 23329e7bcd65Smrg { 23339e7bcd65Smrg eval 'cat <<_LTECHO_EOF 23349e7bcd65Smrg$[]1 23359e7bcd65Smrg_LTECHO_EOF' 23369e7bcd65Smrg } 23379e7bcd65Smrg ECHO='func_fallback_echo' 23381477040fSmrgfi 23391477040fSmrg 23409e7bcd65Smrg# func_echo_all arg... 23419e7bcd65Smrg# Invoke $ECHO with all args, space-separated. 23429e7bcd65Smrgfunc_echo_all () 23439e7bcd65Smrg{ 23449e7bcd65Smrg $ECHO "$*" 23459e7bcd65Smrg} 23461477040fSmrg 23479e7bcd65Smrgcase "$ECHO" in 23489e7bcd65Smrg printf*) AC_MSG_RESULT([printf]) ;; 23499e7bcd65Smrg print*) AC_MSG_RESULT([print -r]) ;; 23509e7bcd65Smrg *) AC_MSG_RESULT([cat]) ;; 23519e7bcd65Smrgesac 23521477040fSmrg 23539e7bcd65Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 23549e7bcd65Smrg[_AS_DETECT_SUGGESTED([ 23559e7bcd65Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 23569e7bcd65Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23579e7bcd65Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23589e7bcd65Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23599e7bcd65Smrg PATH=/empty FPATH=/empty; export PATH FPATH 23609e7bcd65Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 23619e7bcd65Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 23621477040fSmrg 23639e7bcd65Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 23649e7bcd65Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 23659e7bcd65Smrg])# _LT_PROG_ECHO_BACKSLASH 23661477040fSmrg 23671477040fSmrg 23689e7bcd65Smrg# _LT_WITH_SYSROOT 23699e7bcd65Smrg# ---------------- 23709e7bcd65SmrgAC_DEFUN([_LT_WITH_SYSROOT], 23719e7bcd65Smrg[AC_MSG_CHECKING([for sysroot]) 23729e7bcd65SmrgAC_ARG_WITH([sysroot], 23739e7bcd65Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 23749e7bcd65Smrg (or the compiler's sysroot if not specified).], 23759e7bcd65Smrg[], [with_sysroot=no]) 23769e7bcd65Smrg 23779e7bcd65Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 23789e7bcd65Smrgdnl in case the user passed a directory name. 23799e7bcd65Smrglt_sysroot= 23809e7bcd65Smrgcase ${with_sysroot} in #( 23819e7bcd65Smrg yes) 23829e7bcd65Smrg if test "$GCC" = yes; then 23839e7bcd65Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 23849e7bcd65Smrg fi 23859e7bcd65Smrg ;; #( 23869e7bcd65Smrg /*) 23879e7bcd65Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 23889e7bcd65Smrg ;; #( 23899e7bcd65Smrg no|'') 23909e7bcd65Smrg ;; #( 23919e7bcd65Smrg *) 23929e7bcd65Smrg AC_MSG_RESULT([${with_sysroot}]) 23939e7bcd65Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 23949e7bcd65Smrg ;; 23959e7bcd65Smrgesac 23961477040fSmrg 23979e7bcd65Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 23989e7bcd65Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 23999e7bcd65Smrg[dependent libraries, and in which our libraries should be installed.])]) 24001477040fSmrg 24019e7bcd65Smrg# _LT_ENABLE_LOCK 24029e7bcd65Smrg# --------------- 24039e7bcd65Smrgm4_defun([_LT_ENABLE_LOCK], 24049e7bcd65Smrg[AC_ARG_ENABLE([libtool-lock], 24059e7bcd65Smrg [AS_HELP_STRING([--disable-libtool-lock], 24069e7bcd65Smrg [avoid locking (might break parallel builds)])]) 24079e7bcd65Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 24089e7bcd65Smrg 24099e7bcd65Smrg# Some flags need to be propagated to the compiler or linker for good 24109e7bcd65Smrg# libtool support. 24119e7bcd65Smrgcase $host in 24129e7bcd65Smrgia64-*-hpux*) 24139e7bcd65Smrg # Find out which ABI we are using. 24149e7bcd65Smrg echo 'int i;' > conftest.$ac_ext 24159e7bcd65Smrg if AC_TRY_EVAL(ac_compile); then 24169e7bcd65Smrg case `/usr/bin/file conftest.$ac_objext` in 24179e7bcd65Smrg *ELF-32*) 24189e7bcd65Smrg HPUX_IA64_MODE="32" 24199e7bcd65Smrg ;; 24209e7bcd65Smrg *ELF-64*) 24219e7bcd65Smrg HPUX_IA64_MODE="64" 24229e7bcd65Smrg ;; 24239e7bcd65Smrg esac 2424bdf0f55dSmrg fi 24259e7bcd65Smrg rm -rf conftest* 24269e7bcd65Smrg ;; 24279e7bcd65Smrg*-*-irix6*) 24289e7bcd65Smrg # Find out which ABI we are using. 24299e7bcd65Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 24309e7bcd65Smrg if AC_TRY_EVAL(ac_compile); then 24319e7bcd65Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 24329e7bcd65Smrg case `/usr/bin/file conftest.$ac_objext` in 24339e7bcd65Smrg *32-bit*) 24349e7bcd65Smrg LD="${LD-ld} -melf32bsmip" 24359e7bcd65Smrg ;; 24369e7bcd65Smrg *N32*) 24379e7bcd65Smrg LD="${LD-ld} -melf32bmipn32" 24389e7bcd65Smrg ;; 24399e7bcd65Smrg *64-bit*) 24409e7bcd65Smrg LD="${LD-ld} -melf64bmip" 24419e7bcd65Smrg ;; 24429e7bcd65Smrg esac 24439e7bcd65Smrg else 24449e7bcd65Smrg case `/usr/bin/file conftest.$ac_objext` in 24459e7bcd65Smrg *32-bit*) 24469e7bcd65Smrg LD="${LD-ld} -32" 24479e7bcd65Smrg ;; 24489e7bcd65Smrg *N32*) 24499e7bcd65Smrg LD="${LD-ld} -n32" 24509e7bcd65Smrg ;; 24519e7bcd65Smrg *64-bit*) 24529e7bcd65Smrg LD="${LD-ld} -64" 24539e7bcd65Smrg ;; 24549e7bcd65Smrg esac 24559e7bcd65Smrg fi 24569e7bcd65Smrg fi 24579e7bcd65Smrg rm -rf conftest* 24589e7bcd65Smrg ;; 2459444c061aSmrg 24609e7bcd65Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 24619e7bcd65Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 24629e7bcd65Smrg # Find out which ABI we are using. 24639e7bcd65Smrg echo 'int i;' > conftest.$ac_ext 24649e7bcd65Smrg if AC_TRY_EVAL(ac_compile); then 24659e7bcd65Smrg case `/usr/bin/file conftest.o` in 24669e7bcd65Smrg *32-bit*) 24679e7bcd65Smrg case $host in 24689e7bcd65Smrg x86_64-*kfreebsd*-gnu) 24699e7bcd65Smrg LD="${LD-ld} -m elf_i386_fbsd" 24709e7bcd65Smrg ;; 24719e7bcd65Smrg x86_64-*linux*) 24729e7bcd65Smrg LD="${LD-ld} -m elf_i386" 24739e7bcd65Smrg ;; 24749e7bcd65Smrg ppc64-*linux*|powerpc64-*linux*) 24759e7bcd65Smrg LD="${LD-ld} -m elf32ppclinux" 24769e7bcd65Smrg ;; 24779e7bcd65Smrg s390x-*linux*) 24789e7bcd65Smrg LD="${LD-ld} -m elf_s390" 24799e7bcd65Smrg ;; 24809e7bcd65Smrg sparc64-*linux*) 24819e7bcd65Smrg LD="${LD-ld} -m elf32_sparc" 24829e7bcd65Smrg ;; 24839e7bcd65Smrg esac 24849e7bcd65Smrg ;; 24859e7bcd65Smrg *64-bit*) 24869e7bcd65Smrg case $host in 24879e7bcd65Smrg x86_64-*kfreebsd*-gnu) 24889e7bcd65Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 24899e7bcd65Smrg ;; 24909e7bcd65Smrg x86_64-*linux*) 24919e7bcd65Smrg LD="${LD-ld} -m elf_x86_64" 24929e7bcd65Smrg ;; 24939e7bcd65Smrg ppc*-*linux*|powerpc*-*linux*) 24949e7bcd65Smrg LD="${LD-ld} -m elf64ppc" 24959e7bcd65Smrg ;; 24969e7bcd65Smrg s390*-*linux*|s390*-*tpf*) 24979e7bcd65Smrg LD="${LD-ld} -m elf64_s390" 24989e7bcd65Smrg ;; 24999e7bcd65Smrg sparc*-*linux*) 25009e7bcd65Smrg LD="${LD-ld} -m elf64_sparc" 25019e7bcd65Smrg ;; 25029e7bcd65Smrg esac 25039e7bcd65Smrg ;; 25049e7bcd65Smrg esac 25059e7bcd65Smrg fi 25069e7bcd65Smrg rm -rf conftest* 25079e7bcd65Smrg ;; 25081477040fSmrg 25099e7bcd65Smrg*-*-sco3.2v5*) 25109e7bcd65Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 25119e7bcd65Smrg SAVE_CFLAGS="$CFLAGS" 25129e7bcd65Smrg CFLAGS="$CFLAGS -belf" 25139e7bcd65Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 25149e7bcd65Smrg [AC_LANG_PUSH(C) 25159e7bcd65Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 25169e7bcd65Smrg AC_LANG_POP]) 25179e7bcd65Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 25189e7bcd65Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 25199e7bcd65Smrg CFLAGS="$SAVE_CFLAGS" 25209e7bcd65Smrg fi 25219e7bcd65Smrg ;; 25229e7bcd65Smrg*-*solaris*) 25239e7bcd65Smrg # Find out which ABI we are using. 25249e7bcd65Smrg echo 'int i;' > conftest.$ac_ext 25259e7bcd65Smrg if AC_TRY_EVAL(ac_compile); then 25269e7bcd65Smrg case `/usr/bin/file conftest.o` in 25279e7bcd65Smrg *64-bit*) 25289e7bcd65Smrg case $lt_cv_prog_gnu_ld in 25299e7bcd65Smrg yes*) 25309e7bcd65Smrg case $host in 25319e7bcd65Smrg i?86-*-solaris*) 25329e7bcd65Smrg LD="${LD-ld} -m elf_x86_64" 25339e7bcd65Smrg ;; 25349e7bcd65Smrg sparc*-*-solaris*) 25359e7bcd65Smrg LD="${LD-ld} -m elf64_sparc" 25369e7bcd65Smrg ;; 25379e7bcd65Smrg esac 25389e7bcd65Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 25399e7bcd65Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 25409e7bcd65Smrg LD="${LD-ld}_sol2" 25419e7bcd65Smrg fi 25429e7bcd65Smrg ;; 25439e7bcd65Smrg *) 25449e7bcd65Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 25459e7bcd65Smrg LD="${LD-ld} -64" 25469e7bcd65Smrg fi 25479e7bcd65Smrg ;; 25489e7bcd65Smrg esac 2549bdf0f55dSmrg ;; 2550bdf0f55dSmrg esac 25519e7bcd65Smrg fi 25529e7bcd65Smrg rm -rf conftest* 25539e7bcd65Smrg ;; 25549e7bcd65Smrgesac 25559e7bcd65Smrg 25569e7bcd65Smrgneed_locks="$enable_libtool_lock" 25579e7bcd65Smrg])# _LT_ENABLE_LOCK 25589e7bcd65Smrg 25599e7bcd65Smrg 25609e7bcd65Smrg# _LT_PROG_AR 25619e7bcd65Smrg# ----------- 25629e7bcd65Smrgm4_defun([_LT_PROG_AR], 25639e7bcd65Smrg[AC_CHECK_TOOLS(AR, [ar], false) 25649e7bcd65Smrg: ${AR=ar} 25659e7bcd65Smrg: ${AR_FLAGS=cru} 25669e7bcd65Smrg_LT_DECL([], [AR], [1], [The archiver]) 25679e7bcd65Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 25689e7bcd65Smrg 25699e7bcd65SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 25709e7bcd65Smrg [lt_cv_ar_at_file=no 25719e7bcd65Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 25729e7bcd65Smrg [echo conftest.$ac_objext > conftest.lst 25739e7bcd65Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 25749e7bcd65Smrg AC_TRY_EVAL([lt_ar_try]) 25759e7bcd65Smrg if test "$ac_status" -eq 0; then 25769e7bcd65Smrg # Ensure the archiver fails upon bogus file names. 25779e7bcd65Smrg rm -f conftest.$ac_objext libconftest.a 25789e7bcd65Smrg AC_TRY_EVAL([lt_ar_try]) 25799e7bcd65Smrg if test "$ac_status" -ne 0; then 25809e7bcd65Smrg lt_cv_ar_at_file=@ 25819e7bcd65Smrg fi 2582bdf0f55dSmrg fi 25839e7bcd65Smrg rm -f conftest.* libconftest.a 25849e7bcd65Smrg ]) 25859e7bcd65Smrg ]) 2586249c3046Smrg 25879e7bcd65Smrgif test "x$lt_cv_ar_at_file" = xno; then 25889e7bcd65Smrg archiver_list_spec= 2589bdf0f55dSmrgelse 25909e7bcd65Smrg archiver_list_spec=$lt_cv_ar_at_file 25911477040fSmrgfi 25929e7bcd65Smrg_LT_DECL([], [archiver_list_spec], [1], 25939e7bcd65Smrg [How to feed a file listing to the archiver]) 25949e7bcd65Smrg])# _LT_PROG_AR 2595249c3046Smrg 2596444c061aSmrg 25979e7bcd65Smrg# _LT_CMD_OLD_ARCHIVE 25989e7bcd65Smrg# ------------------- 25999e7bcd65Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 26009e7bcd65Smrg[_LT_PROG_AR 26019e7bcd65Smrg 26029e7bcd65SmrgAC_CHECK_TOOL(STRIP, strip, :) 26039e7bcd65Smrgtest -z "$STRIP" && STRIP=: 26049e7bcd65Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 26059e7bcd65Smrg 26069e7bcd65SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 26079e7bcd65Smrgtest -z "$RANLIB" && RANLIB=: 26089e7bcd65Smrg_LT_DECL([], [RANLIB], [1], 26099e7bcd65Smrg [Commands used to install an old-style archive]) 26109e7bcd65Smrg 26119e7bcd65Smrg# Determine commands to create old-style static archives. 26129e7bcd65Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 26139e7bcd65Smrgold_postinstall_cmds='chmod 644 $oldlib' 26149e7bcd65Smrgold_postuninstall_cmds= 26159e7bcd65Smrg 26169e7bcd65Smrgif test -n "$RANLIB"; then 26179e7bcd65Smrg case $host_os in 26189e7bcd65Smrg openbsd*) 26199e7bcd65Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 26209e7bcd65Smrg ;; 26219e7bcd65Smrg *) 26229e7bcd65Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 26239e7bcd65Smrg ;; 26249e7bcd65Smrg esac 26259e7bcd65Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 26269e7bcd65Smrgfi 26271477040fSmrg 26289e7bcd65Smrgcase $host_os in 26299e7bcd65Smrg darwin*) 26309e7bcd65Smrg lock_old_archive_extraction=yes ;; 26319e7bcd65Smrg *) 26329e7bcd65Smrg lock_old_archive_extraction=no ;; 26339e7bcd65Smrgesac 26349e7bcd65Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 26359e7bcd65Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 26369e7bcd65Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 26379e7bcd65Smrg [Commands used to build an old-style archive]) 26389e7bcd65Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 26399e7bcd65Smrg [Whether to use a lock for old archive extraction]) 26409e7bcd65Smrg])# _LT_CMD_OLD_ARCHIVE 26419e7bcd65Smrg 26429e7bcd65Smrg 26439e7bcd65Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26449e7bcd65Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 26459e7bcd65Smrg# ---------------------------------------------------------------- 26469e7bcd65Smrg# Check whether the given compiler option works 26479e7bcd65SmrgAC_DEFUN([_LT_COMPILER_OPTION], 26489e7bcd65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26499e7bcd65Smrgm4_require([_LT_DECL_SED])dnl 26509e7bcd65SmrgAC_CACHE_CHECK([$1], [$2], 26519e7bcd65Smrg [$2=no 26529e7bcd65Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 26539e7bcd65Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 26549e7bcd65Smrg lt_compiler_flag="$3" 26559e7bcd65Smrg # Insert the option either (1) after the last *FLAGS variable, or 26569e7bcd65Smrg # (2) before a word containing "conftest.", or (3) at the end. 26579e7bcd65Smrg # Note that $ac_compile itself does not contain backslashes and begins 26589e7bcd65Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 26599e7bcd65Smrg # The option is referenced via a variable to avoid confusing sed. 26609e7bcd65Smrg lt_compile=`echo "$ac_compile" | $SED \ 26619e7bcd65Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 26629e7bcd65Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 26639e7bcd65Smrg -e 's:$: $lt_compiler_flag:'` 26649e7bcd65Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 26659e7bcd65Smrg (eval "$lt_compile" 2>conftest.err) 26669e7bcd65Smrg ac_status=$? 26679e7bcd65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 26689e7bcd65Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 26699e7bcd65Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 26709e7bcd65Smrg # The compiler can only warn and ignore the option if not recognized 26719e7bcd65Smrg # So say no if there are warnings other than the usual output. 26729e7bcd65Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 26739e7bcd65Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26749e7bcd65Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 26759e7bcd65Smrg $2=yes 26769e7bcd65Smrg fi 26779e7bcd65Smrg fi 26789e7bcd65Smrg $RM conftest* 26799e7bcd65Smrg]) 26801477040fSmrg 26819e7bcd65Smrgif test x"[$]$2" = xyes; then 26829e7bcd65Smrg m4_if([$5], , :, [$5]) 26839e7bcd65Smrgelse 26849e7bcd65Smrg m4_if([$6], , :, [$6]) 2685bdf0f55dSmrgfi 26869e7bcd65Smrg])# _LT_COMPILER_OPTION 26879e7bcd65Smrg 26889e7bcd65Smrg# Old name: 26899e7bcd65SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 26909e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 26919e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 26929e7bcd65Smrg 26939e7bcd65Smrg 26949e7bcd65Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26959e7bcd65Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 26969e7bcd65Smrg# ---------------------------------------------------- 26979e7bcd65Smrg# Check whether the given linker option works 26989e7bcd65SmrgAC_DEFUN([_LT_LINKER_OPTION], 26999e7bcd65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 27009e7bcd65Smrgm4_require([_LT_DECL_SED])dnl 27019e7bcd65SmrgAC_CACHE_CHECK([$1], [$2], 27029e7bcd65Smrg [$2=no 27039e7bcd65Smrg save_LDFLAGS="$LDFLAGS" 27049e7bcd65Smrg LDFLAGS="$LDFLAGS $3" 27059e7bcd65Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 27069e7bcd65Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 27079e7bcd65Smrg # The linker can only warn and ignore the option if not recognized 27089e7bcd65Smrg # So say no if there are warnings 27099e7bcd65Smrg if test -s conftest.err; then 27109e7bcd65Smrg # Append any errors to the config.log. 27119e7bcd65Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 27129e7bcd65Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 27139e7bcd65Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 27149e7bcd65Smrg if diff conftest.exp conftest.er2 >/dev/null; then 27159e7bcd65Smrg $2=yes 27169e7bcd65Smrg fi 27179e7bcd65Smrg else 27189e7bcd65Smrg $2=yes 27199e7bcd65Smrg fi 27209e7bcd65Smrg fi 27219e7bcd65Smrg $RM -r conftest* 27229e7bcd65Smrg LDFLAGS="$save_LDFLAGS" 2723249c3046Smrg]) 2724444c061aSmrg 27259e7bcd65Smrgif test x"[$]$2" = xyes; then 27269e7bcd65Smrg m4_if([$4], , :, [$4]) 27279e7bcd65Smrgelse 27289e7bcd65Smrg m4_if([$5], , :, [$5]) 27299e7bcd65Smrgfi 27309e7bcd65Smrg])# _LT_LINKER_OPTION 27319e7bcd65Smrg 27329e7bcd65Smrg# Old name: 27339e7bcd65SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 27349e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 27359e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 27369e7bcd65Smrg 27379e7bcd65Smrg 27389e7bcd65Smrg# LT_CMD_MAX_LEN 27399e7bcd65Smrg#--------------- 27409e7bcd65SmrgAC_DEFUN([LT_CMD_MAX_LEN], 27419e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 27429e7bcd65Smrg# find the maximum length of command line arguments 27439e7bcd65SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 27449e7bcd65SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 27459e7bcd65Smrg i=0 27469e7bcd65Smrg teststring="ABCD" 27479e7bcd65Smrg 27489e7bcd65Smrg case $build_os in 27499e7bcd65Smrg msdosdjgpp*) 27509e7bcd65Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 27519e7bcd65Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 27529e7bcd65Smrg # during glob expansion). Even if it were fixed, the result of this 27539e7bcd65Smrg # check would be larger than it should be. 27549e7bcd65Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 27559e7bcd65Smrg ;; 27562265a131Smrg 27579e7bcd65Smrg gnu*) 27589e7bcd65Smrg # Under GNU Hurd, this test is not required because there is 27599e7bcd65Smrg # no limit to the length of command line arguments. 27609e7bcd65Smrg # Libtool will interpret -1 as no limit whatsoever 27619e7bcd65Smrg lt_cv_sys_max_cmd_len=-1; 27629e7bcd65Smrg ;; 2763444c061aSmrg 27649e7bcd65Smrg cygwin* | mingw* | cegcc*) 27659e7bcd65Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 27669e7bcd65Smrg # about 5 minutes as the teststring grows exponentially. 27679e7bcd65Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 27689e7bcd65Smrg # you end up with a "frozen" computer, even though with patience 27699e7bcd65Smrg # the test eventually succeeds (with a max line length of 256k). 27709e7bcd65Smrg # Instead, let's just punt: use the minimum linelength reported by 27719e7bcd65Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 27729e7bcd65Smrg lt_cv_sys_max_cmd_len=8192; 27739e7bcd65Smrg ;; 2774444c061aSmrg 27759e7bcd65Smrg mint*) 27769e7bcd65Smrg # On MiNT this can take a long time and run out of memory. 27779e7bcd65Smrg lt_cv_sys_max_cmd_len=8192; 27789e7bcd65Smrg ;; 27799e7bcd65Smrg 27809e7bcd65Smrg amigaos*) 27819e7bcd65Smrg # On AmigaOS with pdksh, this test takes hours, literally. 27829e7bcd65Smrg # So we just punt and use a minimum line length of 8192. 27839e7bcd65Smrg lt_cv_sys_max_cmd_len=8192; 27849e7bcd65Smrg ;; 27859e7bcd65Smrg 27869e7bcd65Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 27879e7bcd65Smrg # This has been around since 386BSD, at least. Likely further. 27889e7bcd65Smrg if test -x /sbin/sysctl; then 27899e7bcd65Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 27909e7bcd65Smrg elif test -x /usr/sbin/sysctl; then 27919e7bcd65Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 2792bdf0f55dSmrg else 27939e7bcd65Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 2794bdf0f55dSmrg fi 27959e7bcd65Smrg # And add a safety zone 27969e7bcd65Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27979e7bcd65Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27989e7bcd65Smrg ;; 2799444c061aSmrg 28009e7bcd65Smrg interix*) 28019e7bcd65Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 28029e7bcd65Smrg lt_cv_sys_max_cmd_len=196608 28039e7bcd65Smrg ;; 2804444c061aSmrg 28059e7bcd65Smrg os2*) 28069e7bcd65Smrg # The test takes a long time on OS/2. 28079e7bcd65Smrg lt_cv_sys_max_cmd_len=8192 28089e7bcd65Smrg ;; 28099e7bcd65Smrg 28109e7bcd65Smrg osf*) 28119e7bcd65Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 28129e7bcd65Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 28139e7bcd65Smrg # nice to cause kernel panics so lets avoid the loop below. 28149e7bcd65Smrg # First set a reasonable default. 28159e7bcd65Smrg lt_cv_sys_max_cmd_len=16384 28169e7bcd65Smrg # 28179e7bcd65Smrg if test -x /sbin/sysconfig; then 28189e7bcd65Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 28199e7bcd65Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 28209e7bcd65Smrg esac 28219e7bcd65Smrg fi 28229e7bcd65Smrg ;; 28239e7bcd65Smrg sco3.2v5*) 28249e7bcd65Smrg lt_cv_sys_max_cmd_len=102400 28259e7bcd65Smrg ;; 28269e7bcd65Smrg sysv5* | sco5v6* | sysv4.2uw2*) 28279e7bcd65Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 28289e7bcd65Smrg if test -n "$kargmax"; then 28299e7bcd65Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 28309e7bcd65Smrg else 28319e7bcd65Smrg lt_cv_sys_max_cmd_len=32768 28329e7bcd65Smrg fi 28339e7bcd65Smrg ;; 28349e7bcd65Smrg *) 28359e7bcd65Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 28369e7bcd65Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 28379e7bcd65Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 28389e7bcd65Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 28399e7bcd65Smrg else 28409e7bcd65Smrg # Make teststring a little bigger before we do anything with it. 28419e7bcd65Smrg # a 1K string should be a reasonable start. 28429e7bcd65Smrg for i in 1 2 3 4 5 6 7 8 ; do 28439e7bcd65Smrg teststring=$teststring$teststring 28449e7bcd65Smrg done 28459e7bcd65Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 28469e7bcd65Smrg # If test is not a shell built-in, we'll probably end up computing a 28479e7bcd65Smrg # maximum length that is only half of the actual maximum length, but 28489e7bcd65Smrg # we can't tell. 28499e7bcd65Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 28509e7bcd65Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 28519e7bcd65Smrg test $i != 17 # 1/2 MB should be enough 28529e7bcd65Smrg do 28539e7bcd65Smrg i=`expr $i + 1` 28549e7bcd65Smrg teststring=$teststring$teststring 28559e7bcd65Smrg done 28569e7bcd65Smrg # Only check the string length outside the loop. 28579e7bcd65Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 28589e7bcd65Smrg teststring= 28599e7bcd65Smrg # Add a significant safety factor because C++ compilers can tack on 28609e7bcd65Smrg # massive amounts of additional arguments before passing them to the 28619e7bcd65Smrg # linker. It appears as though 1/2 is a usable value. 28629e7bcd65Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 28639e7bcd65Smrg fi 28649e7bcd65Smrg ;; 28659e7bcd65Smrg esac 2866bdf0f55dSmrg]) 28679e7bcd65Smrgif test -n $lt_cv_sys_max_cmd_len ; then 28689e7bcd65Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 28699e7bcd65Smrgelse 28709e7bcd65Smrg AC_MSG_RESULT(none) 28719e7bcd65Smrgfi 28729e7bcd65Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 28739e7bcd65Smrg_LT_DECL([], [max_cmd_len], [0], 28749e7bcd65Smrg [What is the maximum length of a command?]) 28759e7bcd65Smrg])# LT_CMD_MAX_LEN 28769e7bcd65Smrg 28779e7bcd65Smrg# Old name: 28789e7bcd65SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 28799e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 28809e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 28819e7bcd65Smrg 28829e7bcd65Smrg 28839e7bcd65Smrg# _LT_HEADER_DLFCN 28849e7bcd65Smrg# ---------------- 28859e7bcd65Smrgm4_defun([_LT_HEADER_DLFCN], 28869e7bcd65Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 28879e7bcd65Smrg])# _LT_HEADER_DLFCN 28889e7bcd65Smrg 28899e7bcd65Smrg 28909e7bcd65Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 28919e7bcd65Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 28929e7bcd65Smrg# ---------------------------------------------------------------- 28939e7bcd65Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 28949e7bcd65Smrg[m4_require([_LT_HEADER_DLFCN])dnl 28959e7bcd65Smrgif test "$cross_compiling" = yes; then : 28969e7bcd65Smrg [$4] 28979e7bcd65Smrgelse 28989e7bcd65Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 28999e7bcd65Smrg lt_status=$lt_dlunknown 29009e7bcd65Smrg cat > conftest.$ac_ext <<_LT_EOF 29019e7bcd65Smrg[#line $LINENO "configure" 29029e7bcd65Smrg#include "confdefs.h" 29039e7bcd65Smrg 29049e7bcd65Smrg#if HAVE_DLFCN_H 29059e7bcd65Smrg#include <dlfcn.h> 29069e7bcd65Smrg#endif 29079e7bcd65Smrg 29089e7bcd65Smrg#include <stdio.h> 29099e7bcd65Smrg 29109e7bcd65Smrg#ifdef RTLD_GLOBAL 29119e7bcd65Smrg# define LT_DLGLOBAL RTLD_GLOBAL 29129e7bcd65Smrg#else 29139e7bcd65Smrg# ifdef DL_GLOBAL 29149e7bcd65Smrg# define LT_DLGLOBAL DL_GLOBAL 29159e7bcd65Smrg# else 29169e7bcd65Smrg# define LT_DLGLOBAL 0 29179e7bcd65Smrg# endif 29189e7bcd65Smrg#endif 29199e7bcd65Smrg 29209e7bcd65Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 29219e7bcd65Smrg find out it does not work in some platform. */ 29229e7bcd65Smrg#ifndef LT_DLLAZY_OR_NOW 29239e7bcd65Smrg# ifdef RTLD_LAZY 29249e7bcd65Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 29259e7bcd65Smrg# else 29269e7bcd65Smrg# ifdef DL_LAZY 29279e7bcd65Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 29289e7bcd65Smrg# else 29299e7bcd65Smrg# ifdef RTLD_NOW 29309e7bcd65Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 29319e7bcd65Smrg# else 29329e7bcd65Smrg# ifdef DL_NOW 29339e7bcd65Smrg# define LT_DLLAZY_OR_NOW DL_NOW 29349e7bcd65Smrg# else 29359e7bcd65Smrg# define LT_DLLAZY_OR_NOW 0 29369e7bcd65Smrg# endif 29379e7bcd65Smrg# endif 29389e7bcd65Smrg# endif 29399e7bcd65Smrg# endif 29409e7bcd65Smrg#endif 29419e7bcd65Smrg 29429e7bcd65Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 29439e7bcd65Smrg correspondingly for the symbols needed. */ 29449e7bcd65Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 29459e7bcd65Smrgint fnord () __attribute__((visibility("default"))); 29469e7bcd65Smrg#endif 29479e7bcd65Smrg 29489e7bcd65Smrgint fnord () { return 42; } 29499e7bcd65Smrgint main () 29509e7bcd65Smrg{ 29519e7bcd65Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 29529e7bcd65Smrg int status = $lt_dlunknown; 29539e7bcd65Smrg 29549e7bcd65Smrg if (self) 29559e7bcd65Smrg { 29569e7bcd65Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 29579e7bcd65Smrg else 29589e7bcd65Smrg { 29599e7bcd65Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 29609e7bcd65Smrg else puts (dlerror ()); 29619e7bcd65Smrg } 29629e7bcd65Smrg /* dlclose (self); */ 29639e7bcd65Smrg } 29649e7bcd65Smrg else 29659e7bcd65Smrg puts (dlerror ()); 29669e7bcd65Smrg 29679e7bcd65Smrg return status; 29689e7bcd65Smrg}] 29699e7bcd65Smrg_LT_EOF 29709e7bcd65Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 29719e7bcd65Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 29729e7bcd65Smrg lt_status=$? 29739e7bcd65Smrg case x$lt_status in 29749e7bcd65Smrg x$lt_dlno_uscore) $1 ;; 29759e7bcd65Smrg x$lt_dlneed_uscore) $2 ;; 29769e7bcd65Smrg x$lt_dlunknown|x*) $3 ;; 29779e7bcd65Smrg esac 29789e7bcd65Smrg else : 29799e7bcd65Smrg # compilation failed 29809e7bcd65Smrg $3 29819e7bcd65Smrg fi 29829e7bcd65Smrgfi 29839e7bcd65Smrgrm -fr conftest* 29849e7bcd65Smrg])# _LT_TRY_DLOPEN_SELF 29859e7bcd65Smrg 29869e7bcd65Smrg 29879e7bcd65Smrg# LT_SYS_DLOPEN_SELF 29889e7bcd65Smrg# ------------------ 29899e7bcd65SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 29909e7bcd65Smrg[m4_require([_LT_HEADER_DLFCN])dnl 29919e7bcd65Smrgif test "x$enable_dlopen" != xyes; then 29929e7bcd65Smrg enable_dlopen=unknown 29939e7bcd65Smrg enable_dlopen_self=unknown 29949e7bcd65Smrg enable_dlopen_self_static=unknown 29959e7bcd65Smrgelse 29969e7bcd65Smrg lt_cv_dlopen=no 29979e7bcd65Smrg lt_cv_dlopen_libs= 29989e7bcd65Smrg 29999e7bcd65Smrg case $host_os in 30009e7bcd65Smrg beos*) 30019e7bcd65Smrg lt_cv_dlopen="load_add_on" 30029e7bcd65Smrg lt_cv_dlopen_libs= 30039e7bcd65Smrg lt_cv_dlopen_self=yes 30049e7bcd65Smrg ;; 30059e7bcd65Smrg 30069e7bcd65Smrg mingw* | pw32* | cegcc*) 30079e7bcd65Smrg lt_cv_dlopen="LoadLibrary" 30089e7bcd65Smrg lt_cv_dlopen_libs= 30099e7bcd65Smrg ;; 30109e7bcd65Smrg 30119e7bcd65Smrg cygwin*) 30129e7bcd65Smrg lt_cv_dlopen="dlopen" 30139e7bcd65Smrg lt_cv_dlopen_libs= 30149e7bcd65Smrg ;; 30159e7bcd65Smrg 30169e7bcd65Smrg darwin*) 30179e7bcd65Smrg # if libdl is installed we need to link against it 30189e7bcd65Smrg AC_CHECK_LIB([dl], [dlopen], 30199e7bcd65Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 30209e7bcd65Smrg lt_cv_dlopen="dyld" 30219e7bcd65Smrg lt_cv_dlopen_libs= 30229e7bcd65Smrg lt_cv_dlopen_self=yes 30239e7bcd65Smrg ]) 30249e7bcd65Smrg ;; 30259e7bcd65Smrg 30269e7bcd65Smrg *) 30279e7bcd65Smrg AC_CHECK_FUNC([shl_load], 30289e7bcd65Smrg [lt_cv_dlopen="shl_load"], 30299e7bcd65Smrg [AC_CHECK_LIB([dld], [shl_load], 30309e7bcd65Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 30319e7bcd65Smrg [AC_CHECK_FUNC([dlopen], 30329e7bcd65Smrg [lt_cv_dlopen="dlopen"], 30339e7bcd65Smrg [AC_CHECK_LIB([dl], [dlopen], 30349e7bcd65Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 30359e7bcd65Smrg [AC_CHECK_LIB([svld], [dlopen], 30369e7bcd65Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 30379e7bcd65Smrg [AC_CHECK_LIB([dld], [dld_link], 30389e7bcd65Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 30399e7bcd65Smrg ]) 30409e7bcd65Smrg ]) 30419e7bcd65Smrg ]) 30429e7bcd65Smrg ]) 30439e7bcd65Smrg ]) 30449e7bcd65Smrg ;; 30459e7bcd65Smrg esac 30469e7bcd65Smrg 30479e7bcd65Smrg if test "x$lt_cv_dlopen" != xno; then 30489e7bcd65Smrg enable_dlopen=yes 30499e7bcd65Smrg else 30509e7bcd65Smrg enable_dlopen=no 30519e7bcd65Smrg fi 30529e7bcd65Smrg 30539e7bcd65Smrg case $lt_cv_dlopen in 30549e7bcd65Smrg dlopen) 30559e7bcd65Smrg save_CPPFLAGS="$CPPFLAGS" 30569e7bcd65Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 30579e7bcd65Smrg 30589e7bcd65Smrg save_LDFLAGS="$LDFLAGS" 30599e7bcd65Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 30609e7bcd65Smrg 30619e7bcd65Smrg save_LIBS="$LIBS" 30629e7bcd65Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 30639e7bcd65Smrg 30649e7bcd65Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 30659e7bcd65Smrg lt_cv_dlopen_self, [dnl 30669e7bcd65Smrg _LT_TRY_DLOPEN_SELF( 30679e7bcd65Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 30689e7bcd65Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 30699e7bcd65Smrg ]) 30709e7bcd65Smrg 30719e7bcd65Smrg if test "x$lt_cv_dlopen_self" = xyes; then 30729e7bcd65Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 30739e7bcd65Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 30749e7bcd65Smrg lt_cv_dlopen_self_static, [dnl 30759e7bcd65Smrg _LT_TRY_DLOPEN_SELF( 30769e7bcd65Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 30779e7bcd65Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 30789e7bcd65Smrg ]) 30799e7bcd65Smrg fi 30809e7bcd65Smrg 30819e7bcd65Smrg CPPFLAGS="$save_CPPFLAGS" 30829e7bcd65Smrg LDFLAGS="$save_LDFLAGS" 30839e7bcd65Smrg LIBS="$save_LIBS" 30849e7bcd65Smrg ;; 30859e7bcd65Smrg esac 30869e7bcd65Smrg 30879e7bcd65Smrg case $lt_cv_dlopen_self in 30889e7bcd65Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 30899e7bcd65Smrg *) enable_dlopen_self=unknown ;; 30909e7bcd65Smrg esac 30919e7bcd65Smrg 30929e7bcd65Smrg case $lt_cv_dlopen_self_static in 30939e7bcd65Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 30949e7bcd65Smrg *) enable_dlopen_self_static=unknown ;; 30959e7bcd65Smrg esac 30969e7bcd65Smrgfi 30979e7bcd65Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 30989e7bcd65Smrg [Whether dlopen is supported]) 30999e7bcd65Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 31009e7bcd65Smrg [Whether dlopen of programs is supported]) 31019e7bcd65Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 31029e7bcd65Smrg [Whether dlopen of statically linked programs is supported]) 31039e7bcd65Smrg])# LT_SYS_DLOPEN_SELF 31049e7bcd65Smrg 31059e7bcd65Smrg# Old name: 31069e7bcd65SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 31079e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 31089e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 31099e7bcd65Smrg 31109e7bcd65Smrg 31119e7bcd65Smrg# _LT_COMPILER_C_O([TAGNAME]) 31129e7bcd65Smrg# --------------------------- 31139e7bcd65Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 31149e7bcd65Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 31159e7bcd65Smrgm4_defun([_LT_COMPILER_C_O], 31169e7bcd65Smrg[m4_require([_LT_DECL_SED])dnl 31179e7bcd65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31189e7bcd65Smrgm4_require([_LT_TAG_COMPILER])dnl 31199e7bcd65SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 31209e7bcd65Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 31219e7bcd65Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 31229e7bcd65Smrg $RM -r conftest 2>/dev/null 31239e7bcd65Smrg mkdir conftest 31249e7bcd65Smrg cd conftest 31259e7bcd65Smrg mkdir out 31269e7bcd65Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 31279e7bcd65Smrg 31289e7bcd65Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 31299e7bcd65Smrg # Insert the option either (1) after the last *FLAGS variable, or 31309e7bcd65Smrg # (2) before a word containing "conftest.", or (3) at the end. 31319e7bcd65Smrg # Note that $ac_compile itself does not contain backslashes and begins 31329e7bcd65Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 31339e7bcd65Smrg lt_compile=`echo "$ac_compile" | $SED \ 31349e7bcd65Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 31359e7bcd65Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 31369e7bcd65Smrg -e 's:$: $lt_compiler_flag:'` 31379e7bcd65Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 31389e7bcd65Smrg (eval "$lt_compile" 2>out/conftest.err) 31399e7bcd65Smrg ac_status=$? 31409e7bcd65Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 31419e7bcd65Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 31429e7bcd65Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 31439e7bcd65Smrg then 31449e7bcd65Smrg # The compiler can only warn and ignore the option if not recognized 31459e7bcd65Smrg # So say no if there are warnings 31469e7bcd65Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 31479e7bcd65Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 31489e7bcd65Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 31499e7bcd65Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 31509e7bcd65Smrg fi 31519e7bcd65Smrg fi 31529e7bcd65Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 31539e7bcd65Smrg $RM conftest* 31549e7bcd65Smrg # SGI C++ compiler will create directory out/ii_files/ for 31559e7bcd65Smrg # template instantiation 31569e7bcd65Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 31579e7bcd65Smrg $RM out/* && rmdir out 31589e7bcd65Smrg cd .. 31599e7bcd65Smrg $RM -r conftest 31609e7bcd65Smrg $RM conftest* 31619e7bcd65Smrg]) 31629e7bcd65Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 31639e7bcd65Smrg [Does compiler simultaneously support -c and -o options?]) 31649e7bcd65Smrg])# _LT_COMPILER_C_O 31659e7bcd65Smrg 31669e7bcd65Smrg 31679e7bcd65Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 31689e7bcd65Smrg# ---------------------------------- 31699e7bcd65Smrg# Check to see if we can do hard links to lock some files if needed 31709e7bcd65Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 31719e7bcd65Smrg[m4_require([_LT_ENABLE_LOCK])dnl 31729e7bcd65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31739e7bcd65Smrg_LT_COMPILER_C_O([$1]) 31749e7bcd65Smrg 31759e7bcd65Smrghard_links="nottested" 31769e7bcd65Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 31779e7bcd65Smrg # do not overwrite the value of need_locks provided by the user 31789e7bcd65Smrg AC_MSG_CHECKING([if we can lock with hard links]) 31799e7bcd65Smrg hard_links=yes 31809e7bcd65Smrg $RM conftest* 31819e7bcd65Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31829e7bcd65Smrg touch conftest.a 31839e7bcd65Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 31849e7bcd65Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31859e7bcd65Smrg AC_MSG_RESULT([$hard_links]) 31869e7bcd65Smrg if test "$hard_links" = no; then 31879e7bcd65Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 31889e7bcd65Smrg need_locks=warn 31899e7bcd65Smrg fi 31909e7bcd65Smrgelse 31919e7bcd65Smrg need_locks=no 31929e7bcd65Smrgfi 31939e7bcd65Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 31949e7bcd65Smrg])# _LT_COMPILER_FILE_LOCKS 31959e7bcd65Smrg 31969e7bcd65Smrg 31979e7bcd65Smrg# _LT_CHECK_OBJDIR 31989e7bcd65Smrg# ---------------- 31999e7bcd65Smrgm4_defun([_LT_CHECK_OBJDIR], 32009e7bcd65Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 32019e7bcd65Smrg[rm -f .libs 2>/dev/null 32029e7bcd65Smrgmkdir .libs 2>/dev/null 32039e7bcd65Smrgif test -d .libs; then 32049e7bcd65Smrg lt_cv_objdir=.libs 32059e7bcd65Smrgelse 32069e7bcd65Smrg # MS-DOS does not allow filenames that begin with a dot. 32079e7bcd65Smrg lt_cv_objdir=_libs 32089e7bcd65Smrgfi 32099e7bcd65Smrgrmdir .libs 2>/dev/null]) 32109e7bcd65Smrgobjdir=$lt_cv_objdir 32119e7bcd65Smrg_LT_DECL([], [objdir], [0], 32129e7bcd65Smrg [The name of the directory that contains temporary libtool files])dnl 32139e7bcd65Smrgm4_pattern_allow([LT_OBJDIR])dnl 32149e7bcd65SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 32159e7bcd65Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 32169e7bcd65Smrg])# _LT_CHECK_OBJDIR 32179e7bcd65Smrg 32189e7bcd65Smrg 32199e7bcd65Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 32209e7bcd65Smrg# -------------------------------------- 32219e7bcd65Smrg# Check hardcoding attributes. 32229e7bcd65Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 32239e7bcd65Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 32249e7bcd65Smrg_LT_TAGVAR(hardcode_action, $1)= 32259e7bcd65Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 32269e7bcd65Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 32279e7bcd65Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 32289e7bcd65Smrg 32299e7bcd65Smrg # We can hardcode non-existent directories. 32309e7bcd65Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 32319e7bcd65Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 32329e7bcd65Smrg # have to relink, otherwise we might link with an installed library 32339e7bcd65Smrg # when we should be linking with a yet-to-be-installed one 32349e7bcd65Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 32359e7bcd65Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 32369e7bcd65Smrg # Linking always hardcodes the temporary library directory. 32379e7bcd65Smrg _LT_TAGVAR(hardcode_action, $1)=relink 32389e7bcd65Smrg else 32399e7bcd65Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 32409e7bcd65Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 32419e7bcd65Smrg fi 32429e7bcd65Smrgelse 32439e7bcd65Smrg # We cannot hardcode anything, or else we can only hardcode existing 32449e7bcd65Smrg # directories. 32459e7bcd65Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 32469e7bcd65Smrgfi 32479e7bcd65SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 32489e7bcd65Smrg 32499e7bcd65Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 32509e7bcd65Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 32519e7bcd65Smrg # Fast installation is not supported 32529e7bcd65Smrg enable_fast_install=no 32539e7bcd65Smrgelif test "$shlibpath_overrides_runpath" = yes || 32549e7bcd65Smrg test "$enable_shared" = no; then 32559e7bcd65Smrg # Fast installation is not necessary 32569e7bcd65Smrg enable_fast_install=needless 32579e7bcd65Smrgfi 32589e7bcd65Smrg_LT_TAGDECL([], [hardcode_action], [0], 32599e7bcd65Smrg [How to hardcode a shared library path into an executable]) 32609e7bcd65Smrg])# _LT_LINKER_HARDCODE_LIBPATH 32619e7bcd65Smrg 32629e7bcd65Smrg 32639e7bcd65Smrg# _LT_CMD_STRIPLIB 32649e7bcd65Smrg# ---------------- 32659e7bcd65Smrgm4_defun([_LT_CMD_STRIPLIB], 32669e7bcd65Smrg[m4_require([_LT_DECL_EGREP]) 32679e7bcd65Smrgstriplib= 32689e7bcd65Smrgold_striplib= 32699e7bcd65SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 32709e7bcd65Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 32719e7bcd65Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 32729e7bcd65Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 32739e7bcd65Smrg AC_MSG_RESULT([yes]) 32749e7bcd65Smrgelse 32759e7bcd65Smrg# FIXME - insert some real tests, host_os isn't really good enough 32769e7bcd65Smrg case $host_os in 32779e7bcd65Smrg darwin*) 32789e7bcd65Smrg if test -n "$STRIP" ; then 32799e7bcd65Smrg striplib="$STRIP -x" 32809e7bcd65Smrg old_striplib="$STRIP -S" 32819e7bcd65Smrg AC_MSG_RESULT([yes]) 32829e7bcd65Smrg else 32839e7bcd65Smrg AC_MSG_RESULT([no]) 32849e7bcd65Smrg fi 32859e7bcd65Smrg ;; 32869e7bcd65Smrg *) 32879e7bcd65Smrg AC_MSG_RESULT([no]) 32889e7bcd65Smrg ;; 32899e7bcd65Smrg esac 32909e7bcd65Smrgfi 32919e7bcd65Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 32929e7bcd65Smrg_LT_DECL([], [striplib], [1]) 32939e7bcd65Smrg])# _LT_CMD_STRIPLIB 32949e7bcd65Smrg 32959e7bcd65Smrg 32969e7bcd65Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 32979e7bcd65Smrg# ----------------------------- 32989e7bcd65Smrg# PORTME Fill in your ld.so characteristics 32999e7bcd65Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 33009e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 33019e7bcd65Smrgm4_require([_LT_DECL_EGREP])dnl 33029e7bcd65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 33039e7bcd65Smrgm4_require([_LT_DECL_OBJDUMP])dnl 33049e7bcd65Smrgm4_require([_LT_DECL_SED])dnl 33059e7bcd65Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 33069e7bcd65SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 33079e7bcd65Smrgm4_if([$1], 33089e7bcd65Smrg [], [ 33099e7bcd65Smrgif test "$GCC" = yes; then 33109e7bcd65Smrg case $host_os in 33119e7bcd65Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 33129e7bcd65Smrg *) lt_awk_arg="/^libraries:/" ;; 33139e7bcd65Smrg esac 33149e7bcd65Smrg case $host_os in 33159e7bcd65Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 33169e7bcd65Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 33179e7bcd65Smrg esac 33189e7bcd65Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 33199e7bcd65Smrg case $lt_search_path_spec in 33209e7bcd65Smrg *\;*) 33219e7bcd65Smrg # if the path contains ";" then we assume it to be the separator 33229e7bcd65Smrg # otherwise default to the standard path separator (i.e. ":") - it is 33239e7bcd65Smrg # assumed that no part of a normal pathname contains ";" but that should 33249e7bcd65Smrg # okay in the real world where ";" in dirpaths is itself problematic. 33259e7bcd65Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 33269e7bcd65Smrg ;; 33279e7bcd65Smrg *) 33289e7bcd65Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 33299e7bcd65Smrg ;; 33309e7bcd65Smrg esac 33319e7bcd65Smrg # Ok, now we have the path, separated by spaces, we can step through it 33329e7bcd65Smrg # and add multilib dir if necessary. 33339e7bcd65Smrg lt_tmp_lt_search_path_spec= 33349e7bcd65Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 33359e7bcd65Smrg for lt_sys_path in $lt_search_path_spec; do 33369e7bcd65Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 33379e7bcd65Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 33389e7bcd65Smrg else 33399e7bcd65Smrg test -d "$lt_sys_path" && \ 33409e7bcd65Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 33419e7bcd65Smrg fi 33429e7bcd65Smrg done 33439e7bcd65Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 33449e7bcd65SmrgBEGIN {RS=" "; FS="/|\n";} { 33459e7bcd65Smrg lt_foo=""; 33469e7bcd65Smrg lt_count=0; 33479e7bcd65Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 33489e7bcd65Smrg if ($lt_i != "" && $lt_i != ".") { 33499e7bcd65Smrg if ($lt_i == "..") { 33509e7bcd65Smrg lt_count++; 33519e7bcd65Smrg } else { 33529e7bcd65Smrg if (lt_count == 0) { 33539e7bcd65Smrg lt_foo="/" $lt_i lt_foo; 33549e7bcd65Smrg } else { 33559e7bcd65Smrg lt_count--; 33569e7bcd65Smrg } 33579e7bcd65Smrg } 33589e7bcd65Smrg } 33599e7bcd65Smrg } 33609e7bcd65Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 33619e7bcd65Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 33629e7bcd65Smrg}'` 33639e7bcd65Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 33649e7bcd65Smrg # for these hosts. 33659e7bcd65Smrg case $host_os in 33669e7bcd65Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 33679e7bcd65Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 33689e7bcd65Smrg esac 33699e7bcd65Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 33709e7bcd65Smrgelse 33719e7bcd65Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 33729e7bcd65Smrgfi]) 33739e7bcd65Smrglibrary_names_spec= 33749e7bcd65Smrglibname_spec='lib$name' 33759e7bcd65Smrgsoname_spec= 33769e7bcd65Smrgshrext_cmds=".so" 33779e7bcd65Smrgpostinstall_cmds= 33789e7bcd65Smrgpostuninstall_cmds= 33799e7bcd65Smrgfinish_cmds= 33809e7bcd65Smrgfinish_eval= 33819e7bcd65Smrgshlibpath_var= 33829e7bcd65Smrgshlibpath_overrides_runpath=unknown 33839e7bcd65Smrgversion_type=none 33849e7bcd65Smrgdynamic_linker="$host_os ld.so" 33859e7bcd65Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 33869e7bcd65Smrgneed_lib_prefix=unknown 33879e7bcd65Smrghardcode_into_libs=no 33889e7bcd65Smrg 33899e7bcd65Smrg# when you set need_version to no, make sure it does not cause -set_version 33909e7bcd65Smrg# flags to be left without arguments 33919e7bcd65Smrgneed_version=unknown 33929e7bcd65Smrg 33939e7bcd65Smrgcase $host_os in 33949e7bcd65Smrgaix3*) 33959e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 33969e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 33979e7bcd65Smrg shlibpath_var=LIBPATH 33989e7bcd65Smrg 33999e7bcd65Smrg # AIX 3 has no versioning support, so we append a major version to the name. 34009e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 34019e7bcd65Smrg ;; 34029e7bcd65Smrg 34039e7bcd65Smrgaix[[4-9]]*) 34049e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 34059e7bcd65Smrg need_lib_prefix=no 34069e7bcd65Smrg need_version=no 34079e7bcd65Smrg hardcode_into_libs=yes 34089e7bcd65Smrg if test "$host_cpu" = ia64; then 34099e7bcd65Smrg # AIX 5 supports IA64 34109e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 34119e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 34129e7bcd65Smrg else 34139e7bcd65Smrg # With GCC up to 2.95.x, collect2 would create an import file 34149e7bcd65Smrg # for dependence libraries. The import file would start with 34159e7bcd65Smrg # the line `#! .'. This would cause the generated library to 34169e7bcd65Smrg # depend on `.', always an invalid library. This was fixed in 34179e7bcd65Smrg # development snapshots of GCC prior to 3.0. 34189e7bcd65Smrg case $host_os in 34199e7bcd65Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 34209e7bcd65Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 34219e7bcd65Smrg echo ' yes ' 34229e7bcd65Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 34239e7bcd65Smrg : 34249e7bcd65Smrg else 34259e7bcd65Smrg can_build_shared=no 34269e7bcd65Smrg fi 34279e7bcd65Smrg ;; 34289e7bcd65Smrg esac 34299e7bcd65Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 34309e7bcd65Smrg # soname into executable. Probably we can add versioning support to 34319e7bcd65Smrg # collect2, so additional links can be useful in future. 34329e7bcd65Smrg if test "$aix_use_runtimelinking" = yes; then 34339e7bcd65Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 34349e7bcd65Smrg # instead of lib<name>.a to let people know that these are not 34359e7bcd65Smrg # typical AIX shared libraries. 34369e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34379e7bcd65Smrg else 34389e7bcd65Smrg # We preserve .a as extension for shared libraries through AIX4.2 34399e7bcd65Smrg # and later when we are not doing run time linking. 34409e7bcd65Smrg library_names_spec='${libname}${release}.a $libname.a' 34419e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 34429e7bcd65Smrg fi 34439e7bcd65Smrg shlibpath_var=LIBPATH 34449e7bcd65Smrg fi 34459e7bcd65Smrg ;; 34469e7bcd65Smrg 34479e7bcd65Smrgamigaos*) 34489e7bcd65Smrg case $host_cpu in 34499e7bcd65Smrg powerpc) 34509e7bcd65Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 34519e7bcd65Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 34529e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34539e7bcd65Smrg ;; 34549e7bcd65Smrg m68k) 34559e7bcd65Smrg library_names_spec='$libname.ixlibrary $libname.a' 34569e7bcd65Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 34579e7bcd65Smrg 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' 34589e7bcd65Smrg ;; 34599e7bcd65Smrg esac 34609e7bcd65Smrg ;; 34619e7bcd65Smrg 34629e7bcd65Smrgbeos*) 34639e7bcd65Smrg library_names_spec='${libname}${shared_ext}' 34649e7bcd65Smrg dynamic_linker="$host_os ld.so" 34659e7bcd65Smrg shlibpath_var=LIBRARY_PATH 34669e7bcd65Smrg ;; 34679e7bcd65Smrg 34689e7bcd65Smrgbsdi[[45]]*) 34699e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 34709e7bcd65Smrg need_version=no 34719e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34729e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 34739e7bcd65Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 34749e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 34759e7bcd65Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 34769e7bcd65Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 34779e7bcd65Smrg # the default ld.so.conf also contains /usr/contrib/lib and 34789e7bcd65Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 34799e7bcd65Smrg # libtool to hard-code these into programs 34809e7bcd65Smrg ;; 34819e7bcd65Smrg 34829e7bcd65Smrgcygwin* | mingw* | pw32* | cegcc*) 34839e7bcd65Smrg version_type=windows 34849e7bcd65Smrg shrext_cmds=".dll" 34859e7bcd65Smrg need_version=no 34869e7bcd65Smrg need_lib_prefix=no 34879e7bcd65Smrg 34889e7bcd65Smrg case $GCC,$cc_basename in 34899e7bcd65Smrg yes,*) 34909e7bcd65Smrg # gcc 34919e7bcd65Smrg library_names_spec='$libname.dll.a' 34929e7bcd65Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 34939e7bcd65Smrg postinstall_cmds='base_file=`basename \${file}`~ 34949e7bcd65Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 34959e7bcd65Smrg dldir=$destdir/`dirname \$dlpath`~ 34969e7bcd65Smrg test -d \$dldir || mkdir -p \$dldir~ 34979e7bcd65Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 34989e7bcd65Smrg chmod a+x \$dldir/$dlname~ 34999e7bcd65Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 35009e7bcd65Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 35019e7bcd65Smrg fi' 35029e7bcd65Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 35039e7bcd65Smrg dlpath=$dir/\$dldll~ 35049e7bcd65Smrg $RM \$dlpath' 35059e7bcd65Smrg shlibpath_overrides_runpath=yes 35069e7bcd65Smrg 35079e7bcd65Smrg case $host_os in 35089e7bcd65Smrg cygwin*) 35099e7bcd65Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 35109e7bcd65Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35119e7bcd65Smrgm4_if([$1], [],[ 35129e7bcd65Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 35139e7bcd65Smrg ;; 35149e7bcd65Smrg mingw* | cegcc*) 35159e7bcd65Smrg # MinGW DLLs use traditional 'lib' prefix 35169e7bcd65Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35179e7bcd65Smrg ;; 35189e7bcd65Smrg pw32*) 35199e7bcd65Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 35209e7bcd65Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35219e7bcd65Smrg ;; 35229e7bcd65Smrg esac 35239e7bcd65Smrg dynamic_linker='Win32 ld.exe' 35249e7bcd65Smrg ;; 35259e7bcd65Smrg 35269e7bcd65Smrg *,cl*) 35279e7bcd65Smrg # Native MSVC 35289e7bcd65Smrg libname_spec='$name' 35299e7bcd65Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35309e7bcd65Smrg library_names_spec='${libname}.dll.lib' 35319e7bcd65Smrg 35329e7bcd65Smrg case $build_os in 35339e7bcd65Smrg mingw*) 35349e7bcd65Smrg sys_lib_search_path_spec= 35359e7bcd65Smrg lt_save_ifs=$IFS 35369e7bcd65Smrg IFS=';' 35379e7bcd65Smrg for lt_path in $LIB 35389e7bcd65Smrg do 35399e7bcd65Smrg IFS=$lt_save_ifs 35409e7bcd65Smrg # Let DOS variable expansion print the short 8.3 style file name. 35419e7bcd65Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 35429e7bcd65Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 35439e7bcd65Smrg done 35449e7bcd65Smrg IFS=$lt_save_ifs 35459e7bcd65Smrg # Convert to MSYS style. 35469e7bcd65Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 35479e7bcd65Smrg ;; 35489e7bcd65Smrg cygwin*) 35499e7bcd65Smrg # Convert to unix form, then to dos form, then back to unix form 35509e7bcd65Smrg # but this time dos style (no spaces!) so that the unix form looks 35519e7bcd65Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 35529e7bcd65Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 35539e7bcd65Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 35549e7bcd65Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35559e7bcd65Smrg ;; 35569e7bcd65Smrg *) 35579e7bcd65Smrg sys_lib_search_path_spec="$LIB" 35589e7bcd65Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 35599e7bcd65Smrg # It is most probably a Windows format PATH. 35609e7bcd65Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 35619e7bcd65Smrg else 35629e7bcd65Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35639e7bcd65Smrg fi 35649e7bcd65Smrg # FIXME: find the short name or the path components, as spaces are 35659e7bcd65Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 35669e7bcd65Smrg ;; 35679e7bcd65Smrg esac 35689e7bcd65Smrg 35699e7bcd65Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 35709e7bcd65Smrg postinstall_cmds='base_file=`basename \${file}`~ 35719e7bcd65Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 35729e7bcd65Smrg dldir=$destdir/`dirname \$dlpath`~ 35739e7bcd65Smrg test -d \$dldir || mkdir -p \$dldir~ 35749e7bcd65Smrg $install_prog $dir/$dlname \$dldir/$dlname' 35759e7bcd65Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 35769e7bcd65Smrg dlpath=$dir/\$dldll~ 35779e7bcd65Smrg $RM \$dlpath' 35789e7bcd65Smrg shlibpath_overrides_runpath=yes 35799e7bcd65Smrg dynamic_linker='Win32 link.exe' 35809e7bcd65Smrg ;; 35819e7bcd65Smrg 35829e7bcd65Smrg *) 35839e7bcd65Smrg # Assume MSVC wrapper 35849e7bcd65Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 35859e7bcd65Smrg dynamic_linker='Win32 ld.exe' 35869e7bcd65Smrg ;; 35879e7bcd65Smrg esac 35889e7bcd65Smrg # FIXME: first we should search . and the directory the executable is in 35899e7bcd65Smrg shlibpath_var=PATH 35909e7bcd65Smrg ;; 35919e7bcd65Smrg 35929e7bcd65Smrgdarwin* | rhapsody*) 35939e7bcd65Smrg dynamic_linker="$host_os dyld" 35949e7bcd65Smrg version_type=darwin 35959e7bcd65Smrg need_lib_prefix=no 35969e7bcd65Smrg need_version=no 35979e7bcd65Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 35989e7bcd65Smrg soname_spec='${libname}${release}${major}$shared_ext' 35999e7bcd65Smrg shlibpath_overrides_runpath=yes 36009e7bcd65Smrg shlibpath_var=DYLD_LIBRARY_PATH 36019e7bcd65Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 36029e7bcd65Smrgm4_if([$1], [],[ 36039e7bcd65Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 36049e7bcd65Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 36059e7bcd65Smrg ;; 36069e7bcd65Smrg 36079e7bcd65Smrgdgux*) 36089e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 36099e7bcd65Smrg need_lib_prefix=no 36109e7bcd65Smrg need_version=no 36119e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 36129e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 36139e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 36149e7bcd65Smrg ;; 36159e7bcd65Smrg 36169e7bcd65Smrgfreebsd* | dragonfly*) 36179e7bcd65Smrg # DragonFly does not have aout. When/if they implement a new 36189e7bcd65Smrg # versioning mechanism, adjust this. 36199e7bcd65Smrg if test -x /usr/bin/objformat; then 36209e7bcd65Smrg objformat=`/usr/bin/objformat` 36219e7bcd65Smrg else 36229e7bcd65Smrg case $host_os in 36239e7bcd65Smrg freebsd[[23]].*) objformat=aout ;; 36249e7bcd65Smrg *) objformat=elf ;; 36259e7bcd65Smrg esac 36269e7bcd65Smrg fi 36279e7bcd65Smrg version_type=freebsd-$objformat 36289e7bcd65Smrg case $version_type in 36299e7bcd65Smrg freebsd-elf*) 36309e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 36319e7bcd65Smrg need_version=no 36329e7bcd65Smrg need_lib_prefix=no 36339e7bcd65Smrg ;; 36349e7bcd65Smrg freebsd-*) 36359e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 36369e7bcd65Smrg need_version=yes 36379e7bcd65Smrg ;; 36389e7bcd65Smrg esac 36399e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 36409e7bcd65Smrg case $host_os in 36419e7bcd65Smrg freebsd2.*) 36429e7bcd65Smrg shlibpath_overrides_runpath=yes 36439e7bcd65Smrg ;; 36449e7bcd65Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 36459e7bcd65Smrg shlibpath_overrides_runpath=yes 36469e7bcd65Smrg hardcode_into_libs=yes 36479e7bcd65Smrg ;; 36489e7bcd65Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 36499e7bcd65Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 36509e7bcd65Smrg shlibpath_overrides_runpath=no 36519e7bcd65Smrg hardcode_into_libs=yes 36529e7bcd65Smrg ;; 36539e7bcd65Smrg *) # from 4.6 on, and DragonFly 36549e7bcd65Smrg shlibpath_overrides_runpath=yes 36559e7bcd65Smrg hardcode_into_libs=yes 36569e7bcd65Smrg ;; 36579e7bcd65Smrg esac 36589e7bcd65Smrg ;; 36599e7bcd65Smrg 36609e7bcd65Smrggnu*) 36619e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 36629e7bcd65Smrg need_lib_prefix=no 36639e7bcd65Smrg need_version=no 36649e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36659e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 36669e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 36679e7bcd65Smrg shlibpath_overrides_runpath=no 36689e7bcd65Smrg hardcode_into_libs=yes 36699e7bcd65Smrg ;; 36709e7bcd65Smrg 36719e7bcd65Smrghaiku*) 36729e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 36739e7bcd65Smrg need_lib_prefix=no 36749e7bcd65Smrg need_version=no 36759e7bcd65Smrg dynamic_linker="$host_os runtime_loader" 36769e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36779e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 36789e7bcd65Smrg shlibpath_var=LIBRARY_PATH 36799e7bcd65Smrg shlibpath_overrides_runpath=yes 36809e7bcd65Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 36819e7bcd65Smrg hardcode_into_libs=yes 36829e7bcd65Smrg ;; 36839e7bcd65Smrg 36849e7bcd65Smrghpux9* | hpux10* | hpux11*) 36859e7bcd65Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 36869e7bcd65Smrg # link against other versions. 36879e7bcd65Smrg version_type=sunos 36889e7bcd65Smrg need_lib_prefix=no 36899e7bcd65Smrg need_version=no 36909e7bcd65Smrg case $host_cpu in 36919e7bcd65Smrg ia64*) 36929e7bcd65Smrg shrext_cmds='.so' 36939e7bcd65Smrg hardcode_into_libs=yes 36949e7bcd65Smrg dynamic_linker="$host_os dld.so" 36959e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 36969e7bcd65Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 36979e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36989e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 36999e7bcd65Smrg if test "X$HPUX_IA64_MODE" = X32; then 37009e7bcd65Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 37019e7bcd65Smrg else 37029e7bcd65Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 37039e7bcd65Smrg fi 37049e7bcd65Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 37059e7bcd65Smrg ;; 37069e7bcd65Smrg hppa*64*) 37079e7bcd65Smrg shrext_cmds='.sl' 37089e7bcd65Smrg hardcode_into_libs=yes 37099e7bcd65Smrg dynamic_linker="$host_os dld.sl" 37109e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 37119e7bcd65Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 37129e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37139e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 37149e7bcd65Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 37159e7bcd65Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 37169e7bcd65Smrg ;; 37179e7bcd65Smrg *) 37189e7bcd65Smrg shrext_cmds='.sl' 37199e7bcd65Smrg dynamic_linker="$host_os dld.sl" 37209e7bcd65Smrg shlibpath_var=SHLIB_PATH 37219e7bcd65Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 37229e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37239e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 37249e7bcd65Smrg ;; 37259e7bcd65Smrg esac 37269e7bcd65Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 37279e7bcd65Smrg postinstall_cmds='chmod 555 $lib' 37289e7bcd65Smrg # or fails outright, so override atomically: 37299e7bcd65Smrg install_override_mode=555 37309e7bcd65Smrg ;; 37319e7bcd65Smrg 37329e7bcd65Smrginterix[[3-9]]*) 37339e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 37349e7bcd65Smrg need_lib_prefix=no 37359e7bcd65Smrg need_version=no 37369e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 37379e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 37389e7bcd65Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 37399e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 37409e7bcd65Smrg shlibpath_overrides_runpath=no 37419e7bcd65Smrg hardcode_into_libs=yes 37429e7bcd65Smrg ;; 37439e7bcd65Smrg 37449e7bcd65Smrgirix5* | irix6* | nonstopux*) 37459e7bcd65Smrg case $host_os in 37469e7bcd65Smrg nonstopux*) version_type=nonstopux ;; 37479e7bcd65Smrg *) 37489e7bcd65Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 37499e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 37509e7bcd65Smrg else 37519e7bcd65Smrg version_type=irix 37529e7bcd65Smrg fi ;; 37539e7bcd65Smrg esac 37549e7bcd65Smrg need_lib_prefix=no 37559e7bcd65Smrg need_version=no 37569e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 37579e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 37589e7bcd65Smrg case $host_os in 37599e7bcd65Smrg irix5* | nonstopux*) 37609e7bcd65Smrg libsuff= shlibsuff= 37619e7bcd65Smrg ;; 37629e7bcd65Smrg *) 37639e7bcd65Smrg case $LD in # libtool.m4 will add one of these switches to LD 37649e7bcd65Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 37659e7bcd65Smrg libsuff= shlibsuff= libmagic=32-bit;; 37669e7bcd65Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 37679e7bcd65Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 37689e7bcd65Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 37699e7bcd65Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 37709e7bcd65Smrg *) libsuff= shlibsuff= libmagic=never-match;; 37719e7bcd65Smrg esac 37729e7bcd65Smrg ;; 37739e7bcd65Smrg esac 37749e7bcd65Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 37759e7bcd65Smrg shlibpath_overrides_runpath=no 37769e7bcd65Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 37779e7bcd65Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 37789e7bcd65Smrg hardcode_into_libs=yes 37799e7bcd65Smrg ;; 37809e7bcd65Smrg 37819e7bcd65Smrg# No shared lib support for Linux oldld, aout, or coff. 37829e7bcd65Smrglinux*oldld* | linux*aout* | linux*coff*) 37839e7bcd65Smrg dynamic_linker=no 37849e7bcd65Smrg ;; 37859e7bcd65Smrg 37869e7bcd65Smrg# This must be glibc/ELF. 37879e7bcd65Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 37889e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 37899e7bcd65Smrg need_lib_prefix=no 37909e7bcd65Smrg need_version=no 37919e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37929e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 37939e7bcd65Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 37949e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 37959e7bcd65Smrg shlibpath_overrides_runpath=no 37969e7bcd65Smrg 37979e7bcd65Smrg # Some binutils ld are patched to set DT_RUNPATH 37989e7bcd65Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 37999e7bcd65Smrg [lt_cv_shlibpath_overrides_runpath=no 38009e7bcd65Smrg save_LDFLAGS=$LDFLAGS 38019e7bcd65Smrg save_libdir=$libdir 38029e7bcd65Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 38039e7bcd65Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 38049e7bcd65Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 38059e7bcd65Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 38069e7bcd65Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 38079e7bcd65Smrg LDFLAGS=$save_LDFLAGS 38089e7bcd65Smrg libdir=$save_libdir 38099e7bcd65Smrg ]) 38109e7bcd65Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 38119e7bcd65Smrg 38129e7bcd65Smrg # This implies no fast_install, which is unacceptable. 38139e7bcd65Smrg # Some rework will be needed to allow for fast_install 38149e7bcd65Smrg # before this can be enabled. 38159e7bcd65Smrg hardcode_into_libs=yes 38169e7bcd65Smrg 38179e7bcd65Smrg # Append ld.so.conf contents to the search path 38189e7bcd65Smrg if test -f /etc/ld.so.conf; then 38199e7bcd65Smrg 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' ' '` 38209e7bcd65Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 38219e7bcd65Smrg fi 38229e7bcd65Smrg 38239e7bcd65Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 38249e7bcd65Smrg # powerpc, because MkLinux only supported shared libraries with the 38259e7bcd65Smrg # GNU dynamic linker. Since this was broken with cross compilers, 38269e7bcd65Smrg # most powerpc-linux boxes support dynamic linking these days and 38279e7bcd65Smrg # people can always --disable-shared, the test was removed, and we 38289e7bcd65Smrg # assume the GNU/Linux dynamic linker is in use. 38299e7bcd65Smrg dynamic_linker='GNU/Linux ld.so' 38309e7bcd65Smrg ;; 38319e7bcd65Smrg 38329e7bcd65Smrgnetbsd*) 38339e7bcd65Smrg version_type=sunos 38349e7bcd65Smrg need_lib_prefix=no 38359e7bcd65Smrg need_version=no 38369e7bcd65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 38379e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38389e7bcd65Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38399e7bcd65Smrg dynamic_linker='NetBSD (a.out) ld.so' 38409e7bcd65Smrg else 38419e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 38429e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 38439e7bcd65Smrg dynamic_linker='NetBSD ld.elf_so' 38449e7bcd65Smrg fi 38459e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 38469e7bcd65Smrg shlibpath_overrides_runpath=yes 38479e7bcd65Smrg hardcode_into_libs=yes 38489e7bcd65Smrg ;; 38499e7bcd65Smrg 38509e7bcd65Smrgnewsos6) 38519e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 38529e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38539e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 38549e7bcd65Smrg shlibpath_overrides_runpath=yes 38559e7bcd65Smrg ;; 38569e7bcd65Smrg 38579e7bcd65Smrg*nto* | *qnx*) 38589e7bcd65Smrg version_type=qnx 38599e7bcd65Smrg need_lib_prefix=no 38609e7bcd65Smrg need_version=no 38619e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38629e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 38639e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 38649e7bcd65Smrg shlibpath_overrides_runpath=no 38659e7bcd65Smrg hardcode_into_libs=yes 38669e7bcd65Smrg dynamic_linker='ldqnx.so' 38679e7bcd65Smrg ;; 38689e7bcd65Smrg 38699e7bcd65Smrgopenbsd*) 38709e7bcd65Smrg version_type=sunos 38719e7bcd65Smrg sys_lib_dlsearch_path_spec="/usr/lib" 38729e7bcd65Smrg need_lib_prefix=no 38739e7bcd65Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 38749e7bcd65Smrg case $host_os in 38759e7bcd65Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 38769e7bcd65Smrg *) need_version=no ;; 38779e7bcd65Smrg esac 38789e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38799e7bcd65Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38809e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 38819e7bcd65Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 38829e7bcd65Smrg case $host_os in 38839e7bcd65Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 38849e7bcd65Smrg shlibpath_overrides_runpath=no 38859e7bcd65Smrg ;; 38869e7bcd65Smrg *) 38879e7bcd65Smrg shlibpath_overrides_runpath=yes 38889e7bcd65Smrg ;; 38899e7bcd65Smrg esac 38909e7bcd65Smrg else 38919e7bcd65Smrg shlibpath_overrides_runpath=yes 38929e7bcd65Smrg fi 38939e7bcd65Smrg ;; 38949e7bcd65Smrg 38959e7bcd65Smrgos2*) 38969e7bcd65Smrg libname_spec='$name' 38979e7bcd65Smrg shrext_cmds=".dll" 38989e7bcd65Smrg need_lib_prefix=no 38999e7bcd65Smrg library_names_spec='$libname${shared_ext} $libname.a' 39009e7bcd65Smrg dynamic_linker='OS/2 ld.exe' 39019e7bcd65Smrg shlibpath_var=LIBPATH 39029e7bcd65Smrg ;; 39039e7bcd65Smrg 39049e7bcd65Smrgosf3* | osf4* | osf5*) 39059e7bcd65Smrg version_type=osf 39069e7bcd65Smrg need_lib_prefix=no 39079e7bcd65Smrg need_version=no 39089e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 39099e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39109e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 39119e7bcd65Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 39129e7bcd65Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 39139e7bcd65Smrg ;; 39149e7bcd65Smrg 39159e7bcd65Smrgrdos*) 39169e7bcd65Smrg dynamic_linker=no 39179e7bcd65Smrg ;; 39189e7bcd65Smrg 39199e7bcd65Smrgsolaris*) 39209e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 39219e7bcd65Smrg need_lib_prefix=no 39229e7bcd65Smrg need_version=no 39239e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39249e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 39259e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 39269e7bcd65Smrg shlibpath_overrides_runpath=yes 39279e7bcd65Smrg hardcode_into_libs=yes 39289e7bcd65Smrg # ldd complains unless libraries are executable 39299e7bcd65Smrg postinstall_cmds='chmod +x $lib' 39309e7bcd65Smrg ;; 39319e7bcd65Smrg 39329e7bcd65Smrgsunos4*) 39339e7bcd65Smrg version_type=sunos 39349e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 39359e7bcd65Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 39369e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 39379e7bcd65Smrg shlibpath_overrides_runpath=yes 39389e7bcd65Smrg if test "$with_gnu_ld" = yes; then 39399e7bcd65Smrg need_lib_prefix=no 39409e7bcd65Smrg fi 39419e7bcd65Smrg need_version=yes 39429e7bcd65Smrg ;; 39439e7bcd65Smrg 39449e7bcd65Smrgsysv4 | sysv4.3*) 39459e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 39469e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39479e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 39489e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 39499e7bcd65Smrg case $host_vendor in 39509e7bcd65Smrg sni) 39519e7bcd65Smrg shlibpath_overrides_runpath=no 39529e7bcd65Smrg need_lib_prefix=no 39539e7bcd65Smrg runpath_var=LD_RUN_PATH 39549e7bcd65Smrg ;; 39559e7bcd65Smrg siemens) 39569e7bcd65Smrg need_lib_prefix=no 39579e7bcd65Smrg ;; 39589e7bcd65Smrg motorola) 39599e7bcd65Smrg need_lib_prefix=no 39609e7bcd65Smrg need_version=no 39619e7bcd65Smrg shlibpath_overrides_runpath=no 39629e7bcd65Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 39639e7bcd65Smrg ;; 39649e7bcd65Smrg esac 39659e7bcd65Smrg ;; 39669e7bcd65Smrg 39679e7bcd65Smrgsysv4*MP*) 39689e7bcd65Smrg if test -d /usr/nec ;then 39699e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 39709e7bcd65Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 39719e7bcd65Smrg soname_spec='$libname${shared_ext}.$major' 39729e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 39739e7bcd65Smrg fi 39749e7bcd65Smrg ;; 39759e7bcd65Smrg 39769e7bcd65Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 39779e7bcd65Smrg version_type=freebsd-elf 39789e7bcd65Smrg need_lib_prefix=no 39799e7bcd65Smrg need_version=no 39809e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 39819e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 39829e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 39839e7bcd65Smrg shlibpath_overrides_runpath=yes 39849e7bcd65Smrg hardcode_into_libs=yes 39859e7bcd65Smrg if test "$with_gnu_ld" = yes; then 39869e7bcd65Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 39879e7bcd65Smrg else 39889e7bcd65Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 39899e7bcd65Smrg case $host_os in 39909e7bcd65Smrg sco3.2v5*) 39919e7bcd65Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 39929e7bcd65Smrg ;; 39939e7bcd65Smrg esac 39949e7bcd65Smrg fi 39959e7bcd65Smrg sys_lib_dlsearch_path_spec='/usr/lib' 39969e7bcd65Smrg ;; 39979e7bcd65Smrg 39989e7bcd65Smrgtpf*) 39999e7bcd65Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 40009e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 40019e7bcd65Smrg need_lib_prefix=no 40029e7bcd65Smrg need_version=no 40039e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 40049e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 40059e7bcd65Smrg shlibpath_overrides_runpath=no 40069e7bcd65Smrg hardcode_into_libs=yes 40079e7bcd65Smrg ;; 40089e7bcd65Smrg 40099e7bcd65Smrguts4*) 40109e7bcd65Smrg version_type=linux # correct to gnu/linux during the next big refactor 40119e7bcd65Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 40129e7bcd65Smrg soname_spec='${libname}${release}${shared_ext}$major' 40139e7bcd65Smrg shlibpath_var=LD_LIBRARY_PATH 40149e7bcd65Smrg ;; 40159e7bcd65Smrg 40169e7bcd65Smrg*) 40179e7bcd65Smrg dynamic_linker=no 40189e7bcd65Smrg ;; 40199e7bcd65Smrgesac 40209e7bcd65SmrgAC_MSG_RESULT([$dynamic_linker]) 40219e7bcd65Smrgtest "$dynamic_linker" = no && can_build_shared=no 40229e7bcd65Smrg 40239e7bcd65Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 40249e7bcd65Smrgif test "$GCC" = yes; then 40259e7bcd65Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 40269e7bcd65Smrgfi 40279e7bcd65Smrg 40289e7bcd65Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 40299e7bcd65Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 40309e7bcd65Smrgfi 40319e7bcd65Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 40329e7bcd65Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 40339e7bcd65Smrgfi 40349e7bcd65Smrg 40359e7bcd65Smrg_LT_DECL([], [variables_saved_for_relink], [1], 40369e7bcd65Smrg [Variables whose values should be saved in libtool wrapper scripts and 40379e7bcd65Smrg restored at link time]) 40389e7bcd65Smrg_LT_DECL([], [need_lib_prefix], [0], 40399e7bcd65Smrg [Do we need the "lib" prefix for modules?]) 40409e7bcd65Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 40419e7bcd65Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 40429e7bcd65Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 40439e7bcd65Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 40449e7bcd65Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 40459e7bcd65Smrg [Is shlibpath searched before the hard-coded library search path?]) 40469e7bcd65Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 40479e7bcd65Smrg_LT_DECL([], [library_names_spec], [1], 40489e7bcd65Smrg [[List of archive names. First name is the real one, the rest are links. 40499e7bcd65Smrg The last name is the one that the linker finds with -lNAME]]) 40509e7bcd65Smrg_LT_DECL([], [soname_spec], [1], 40519e7bcd65Smrg [[The coded name of the library, if different from the real name]]) 40529e7bcd65Smrg_LT_DECL([], [install_override_mode], [1], 40539e7bcd65Smrg [Permission mode override for installation of shared libraries]) 40549e7bcd65Smrg_LT_DECL([], [postinstall_cmds], [2], 40559e7bcd65Smrg [Command to use after installation of a shared archive]) 40569e7bcd65Smrg_LT_DECL([], [postuninstall_cmds], [2], 40579e7bcd65Smrg [Command to use after uninstallation of a shared archive]) 40589e7bcd65Smrg_LT_DECL([], [finish_cmds], [2], 40599e7bcd65Smrg [Commands used to finish a libtool library installation in a directory]) 40609e7bcd65Smrg_LT_DECL([], [finish_eval], [1], 40619e7bcd65Smrg [[As "finish_cmds", except a single script fragment to be evaled but 40629e7bcd65Smrg not shown]]) 40639e7bcd65Smrg_LT_DECL([], [hardcode_into_libs], [0], 40649e7bcd65Smrg [Whether we should hardcode library paths into libraries]) 40659e7bcd65Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 40669e7bcd65Smrg [Compile-time system search path for libraries]) 40679e7bcd65Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 40689e7bcd65Smrg [Run-time system search path for libraries]) 40699e7bcd65Smrg])# _LT_SYS_DYNAMIC_LINKER 40709e7bcd65Smrg 40719e7bcd65Smrg 40729e7bcd65Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 40739e7bcd65Smrg# -------------------------- 40749e7bcd65Smrg# find a file program which can recognize shared library 40759e7bcd65SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 40769e7bcd65Smrg[m4_require([_LT_DECL_EGREP])dnl 40779e7bcd65SmrgAC_MSG_CHECKING([for $1]) 40789e7bcd65SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 40799e7bcd65Smrg[case $MAGIC_CMD in 40809e7bcd65Smrg[[\\/*] | ?:[\\/]*]) 40819e7bcd65Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 40829e7bcd65Smrg ;; 40839e7bcd65Smrg*) 40849e7bcd65Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 40859e7bcd65Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40869e7bcd65Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 40879e7bcd65Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 40889e7bcd65Smrgdnl not every word. This closes a longstanding sh security hole. 40899e7bcd65Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 40909e7bcd65Smrg for ac_dir in $ac_dummy; do 40919e7bcd65Smrg IFS="$lt_save_ifs" 40929e7bcd65Smrg test -z "$ac_dir" && ac_dir=. 40939e7bcd65Smrg if test -f $ac_dir/$1; then 40949e7bcd65Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 40959e7bcd65Smrg if test -n "$file_magic_test_file"; then 40969e7bcd65Smrg case $deplibs_check_method in 40979e7bcd65Smrg "file_magic "*) 40989e7bcd65Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 40999e7bcd65Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 41009e7bcd65Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 41019e7bcd65Smrg $EGREP "$file_magic_regex" > /dev/null; then 41029e7bcd65Smrg : 41039e7bcd65Smrg else 41049e7bcd65Smrg cat <<_LT_EOF 1>&2 41059e7bcd65Smrg 41069e7bcd65Smrg*** Warning: the command libtool uses to detect shared libraries, 41079e7bcd65Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 41089e7bcd65Smrg*** The result is that libtool may fail to recognize shared libraries 41099e7bcd65Smrg*** as such. This will affect the creation of libtool libraries that 41109e7bcd65Smrg*** depend on shared libraries, but programs linked with such libtool 41119e7bcd65Smrg*** libraries will work regardless of this problem. Nevertheless, you 41129e7bcd65Smrg*** may want to report the problem to your system manager and/or to 41139e7bcd65Smrg*** bug-libtool@gnu.org 41149e7bcd65Smrg 41159e7bcd65Smrg_LT_EOF 41169e7bcd65Smrg fi ;; 41179e7bcd65Smrg esac 41189e7bcd65Smrg fi 41199e7bcd65Smrg break 41209e7bcd65Smrg fi 41219e7bcd65Smrg done 41229e7bcd65Smrg IFS="$lt_save_ifs" 41239e7bcd65Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 41249e7bcd65Smrg ;; 41259e7bcd65Smrgesac]) 41269e7bcd65SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 41279e7bcd65Smrgif test -n "$MAGIC_CMD"; then 41289e7bcd65Smrg AC_MSG_RESULT($MAGIC_CMD) 41299e7bcd65Smrgelse 41309e7bcd65Smrg AC_MSG_RESULT(no) 41319e7bcd65Smrgfi 41329e7bcd65Smrg_LT_DECL([], [MAGIC_CMD], [0], 41339e7bcd65Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 41349e7bcd65Smrg])# _LT_PATH_TOOL_PREFIX 41359e7bcd65Smrg 41369e7bcd65Smrg# Old name: 41379e7bcd65SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 41389e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 41399e7bcd65Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 41409e7bcd65Smrg 41419e7bcd65Smrg 41429e7bcd65Smrg# _LT_PATH_MAGIC 41439e7bcd65Smrg# -------------- 41449e7bcd65Smrg# find a file program which can recognize a shared library 41459e7bcd65Smrgm4_defun([_LT_PATH_MAGIC], 41469e7bcd65Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 41479e7bcd65Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 41489e7bcd65Smrg if test -n "$ac_tool_prefix"; then 41499e7bcd65Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 41509e7bcd65Smrg else 41519e7bcd65Smrg MAGIC_CMD=: 41529e7bcd65Smrg fi 41539e7bcd65Smrgfi 41549e7bcd65Smrg])# _LT_PATH_MAGIC 41559e7bcd65Smrg 41569e7bcd65Smrg 41579e7bcd65Smrg# LT_PATH_LD 41589e7bcd65Smrg# ---------- 41599e7bcd65Smrg# find the pathname to the GNU or non-GNU linker 41609e7bcd65SmrgAC_DEFUN([LT_PATH_LD], 41619e7bcd65Smrg[AC_REQUIRE([AC_PROG_CC])dnl 41629e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 41639e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 41649e7bcd65Smrgm4_require([_LT_DECL_SED])dnl 41659e7bcd65Smrgm4_require([_LT_DECL_EGREP])dnl 41669e7bcd65Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 41679e7bcd65Smrg 41689e7bcd65SmrgAC_ARG_WITH([gnu-ld], 41699e7bcd65Smrg [AS_HELP_STRING([--with-gnu-ld], 41709e7bcd65Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 41719e7bcd65Smrg [test "$withval" = no || with_gnu_ld=yes], 41729e7bcd65Smrg [with_gnu_ld=no])dnl 41739e7bcd65Smrg 41749e7bcd65Smrgac_prog=ld 41759e7bcd65Smrgif test "$GCC" = yes; then 41769e7bcd65Smrg # Check if gcc -print-prog-name=ld gives a path. 41779e7bcd65Smrg AC_MSG_CHECKING([for ld used by $CC]) 41789e7bcd65Smrg case $host in 41799e7bcd65Smrg *-*-mingw*) 41809e7bcd65Smrg # gcc leaves a trailing carriage return which upsets mingw 41819e7bcd65Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 41829e7bcd65Smrg *) 41839e7bcd65Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 41849e7bcd65Smrg esac 41859e7bcd65Smrg case $ac_prog in 41869e7bcd65Smrg # Accept absolute paths. 41879e7bcd65Smrg [[\\/]]* | ?:[[\\/]]*) 41889e7bcd65Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 41899e7bcd65Smrg # Canonicalize the pathname of ld 41909e7bcd65Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 41919e7bcd65Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 41929e7bcd65Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 41939e7bcd65Smrg done 41949e7bcd65Smrg test -z "$LD" && LD="$ac_prog" 41959e7bcd65Smrg ;; 41969e7bcd65Smrg "") 41979e7bcd65Smrg # If it fails, then pretend we aren't using GCC. 41989e7bcd65Smrg ac_prog=ld 41999e7bcd65Smrg ;; 42009e7bcd65Smrg *) 42019e7bcd65Smrg # If it is relative, then search for the first ld in PATH. 42029e7bcd65Smrg with_gnu_ld=unknown 42039e7bcd65Smrg ;; 42049e7bcd65Smrg esac 42059e7bcd65Smrgelif test "$with_gnu_ld" = yes; then 42069e7bcd65Smrg AC_MSG_CHECKING([for GNU ld]) 42079e7bcd65Smrgelse 42089e7bcd65Smrg AC_MSG_CHECKING([for non-GNU ld]) 42099e7bcd65Smrgfi 42109e7bcd65SmrgAC_CACHE_VAL(lt_cv_path_LD, 42119e7bcd65Smrg[if test -z "$LD"; then 42129e7bcd65Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 42139e7bcd65Smrg for ac_dir in $PATH; do 42149e7bcd65Smrg IFS="$lt_save_ifs" 42159e7bcd65Smrg test -z "$ac_dir" && ac_dir=. 42169e7bcd65Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 42179e7bcd65Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 42189e7bcd65Smrg # Check to see if the program is GNU ld. I'd rather use --version, 42199e7bcd65Smrg # but apparently some variants of GNU ld only accept -v. 42209e7bcd65Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 42219e7bcd65Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 42229e7bcd65Smrg *GNU* | *'with BFD'*) 42239e7bcd65Smrg test "$with_gnu_ld" != no && break 42249e7bcd65Smrg ;; 42259e7bcd65Smrg *) 42269e7bcd65Smrg test "$with_gnu_ld" != yes && break 42279e7bcd65Smrg ;; 42289e7bcd65Smrg esac 42299e7bcd65Smrg fi 42309e7bcd65Smrg done 42319e7bcd65Smrg IFS="$lt_save_ifs" 42329e7bcd65Smrgelse 42339e7bcd65Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 42349e7bcd65Smrgfi]) 42359e7bcd65SmrgLD="$lt_cv_path_LD" 42369e7bcd65Smrgif test -n "$LD"; then 42379e7bcd65Smrg AC_MSG_RESULT($LD) 42389e7bcd65Smrgelse 42399e7bcd65Smrg AC_MSG_RESULT(no) 42409e7bcd65Smrgfi 42419e7bcd65Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 42429e7bcd65Smrg_LT_PATH_LD_GNU 42439e7bcd65SmrgAC_SUBST([LD]) 42449e7bcd65Smrg 42459e7bcd65Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 42469e7bcd65Smrg])# LT_PATH_LD 42479e7bcd65Smrg 42489e7bcd65Smrg# Old names: 42499e7bcd65SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 42509e7bcd65SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 42519e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 42529e7bcd65Smrgdnl AC_DEFUN([AM_PROG_LD], []) 42539e7bcd65Smrgdnl AC_DEFUN([AC_PROG_LD], []) 42549e7bcd65Smrg 42559e7bcd65Smrg 42569e7bcd65Smrg# _LT_PATH_LD_GNU 42579e7bcd65Smrg#- -------------- 42589e7bcd65Smrgm4_defun([_LT_PATH_LD_GNU], 42599e7bcd65Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 42609e7bcd65Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 42619e7bcd65Smrgcase `$LD -v 2>&1 </dev/null` in 42629e7bcd65Smrg*GNU* | *'with BFD'*) 42639e7bcd65Smrg lt_cv_prog_gnu_ld=yes 42649e7bcd65Smrg ;; 42659e7bcd65Smrg*) 42669e7bcd65Smrg lt_cv_prog_gnu_ld=no 42679e7bcd65Smrg ;; 42689e7bcd65Smrgesac]) 42699e7bcd65Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 42709e7bcd65Smrg])# _LT_PATH_LD_GNU 42719e7bcd65Smrg 42729e7bcd65Smrg 42739e7bcd65Smrg# _LT_CMD_RELOAD 42749e7bcd65Smrg# -------------- 42759e7bcd65Smrg# find reload flag for linker 42769e7bcd65Smrg# -- PORTME Some linkers may need a different reload flag. 42779e7bcd65Smrgm4_defun([_LT_CMD_RELOAD], 42789e7bcd65Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 42799e7bcd65Smrg lt_cv_ld_reload_flag, 42809e7bcd65Smrg [lt_cv_ld_reload_flag='-r']) 42819e7bcd65Smrgreload_flag=$lt_cv_ld_reload_flag 42829e7bcd65Smrgcase $reload_flag in 42839e7bcd65Smrg"" | " "*) ;; 42849e7bcd65Smrg*) reload_flag=" $reload_flag" ;; 42859e7bcd65Smrgesac 42869e7bcd65Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 42879e7bcd65Smrgcase $host_os in 42889e7bcd65Smrg cygwin* | mingw* | pw32* | cegcc*) 42899e7bcd65Smrg if test "$GCC" != yes; then 42909e7bcd65Smrg reload_cmds=false 42919e7bcd65Smrg fi 42929e7bcd65Smrg ;; 42939e7bcd65Smrg darwin*) 42949e7bcd65Smrg if test "$GCC" = yes; then 42959e7bcd65Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 42969e7bcd65Smrg else 42979e7bcd65Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 42989e7bcd65Smrg fi 42999e7bcd65Smrg ;; 43009e7bcd65Smrgesac 43019e7bcd65Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 43029e7bcd65Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 43039e7bcd65Smrg])# _LT_CMD_RELOAD 43049e7bcd65Smrg 43059e7bcd65Smrg 43069e7bcd65Smrg# _LT_CHECK_MAGIC_METHOD 43079e7bcd65Smrg# ---------------------- 43089e7bcd65Smrg# how to check for library dependencies 43099e7bcd65Smrg# -- PORTME fill in with the dynamic library characteristics 43109e7bcd65Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 43119e7bcd65Smrg[m4_require([_LT_DECL_EGREP]) 43129e7bcd65Smrgm4_require([_LT_DECL_OBJDUMP]) 43139e7bcd65SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 43149e7bcd65Smrglt_cv_deplibs_check_method, 43159e7bcd65Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 43169e7bcd65Smrglt_cv_file_magic_test_file= 43179e7bcd65Smrglt_cv_deplibs_check_method='unknown' 43189e7bcd65Smrg# Need to set the preceding variable on all platforms that support 43199e7bcd65Smrg# interlibrary dependencies. 43209e7bcd65Smrg# 'none' -- dependencies not supported. 43219e7bcd65Smrg# `unknown' -- same as none, but documents that we really don't know. 43229e7bcd65Smrg# 'pass_all' -- all dependencies passed with no checks. 43239e7bcd65Smrg# 'test_compile' -- check by making test program. 43249e7bcd65Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 43259e7bcd65Smrg# which responds to the $file_magic_cmd with a given extended regex. 43269e7bcd65Smrg# If you have `file' or equivalent on your system and you're not sure 43279e7bcd65Smrg# whether `pass_all' will *always* work, you probably want this one. 43289e7bcd65Smrg 43299e7bcd65Smrgcase $host_os in 43309e7bcd65Smrgaix[[4-9]]*) 43319e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 43329e7bcd65Smrg ;; 43339e7bcd65Smrg 43349e7bcd65Smrgbeos*) 43359e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 43369e7bcd65Smrg ;; 43379e7bcd65Smrg 43389e7bcd65Smrgbsdi[[45]]*) 43399e7bcd65Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 43409e7bcd65Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 43419e7bcd65Smrg lt_cv_file_magic_test_file=/shlib/libc.so 43429e7bcd65Smrg ;; 43439e7bcd65Smrg 43449e7bcd65Smrgcygwin*) 43459e7bcd65Smrg # func_win32_libid is a shell function defined in ltmain.sh 43469e7bcd65Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43479e7bcd65Smrg lt_cv_file_magic_cmd='func_win32_libid' 43489e7bcd65Smrg ;; 43499e7bcd65Smrg 43509e7bcd65Smrgmingw* | pw32*) 43519e7bcd65Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 43529e7bcd65Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 43539e7bcd65Smrg # unless we find 'file', for example because we are cross-compiling. 43549e7bcd65Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 43559e7bcd65Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 43569e7bcd65Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43579e7bcd65Smrg lt_cv_file_magic_cmd='func_win32_libid' 43589e7bcd65Smrg else 43599e7bcd65Smrg # Keep this pattern in sync with the one in func_win32_libid. 43609e7bcd65Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 43619e7bcd65Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43629e7bcd65Smrg fi 43639e7bcd65Smrg ;; 43649e7bcd65Smrg 43659e7bcd65Smrgcegcc*) 43669e7bcd65Smrg # use the weaker test based on 'objdump'. See mingw*. 43679e7bcd65Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 43689e7bcd65Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43699e7bcd65Smrg ;; 43709e7bcd65Smrg 43719e7bcd65Smrgdarwin* | rhapsody*) 43729e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 43739e7bcd65Smrg ;; 43749e7bcd65Smrg 43759e7bcd65Smrgfreebsd* | dragonfly*) 43769e7bcd65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 43779e7bcd65Smrg case $host_cpu in 43789e7bcd65Smrg i*86 ) 43799e7bcd65Smrg # Not sure whether the presence of OpenBSD here was a mistake. 43809e7bcd65Smrg # Let's accept both of them until this is cleared up. 43819e7bcd65Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 43829e7bcd65Smrg lt_cv_file_magic_cmd=/usr/bin/file 43839e7bcd65Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 43849e7bcd65Smrg ;; 43859e7bcd65Smrg esac 43869e7bcd65Smrg else 43879e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 43889e7bcd65Smrg fi 43899e7bcd65Smrg ;; 43909e7bcd65Smrg 43919e7bcd65Smrggnu*) 43929e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 43939e7bcd65Smrg ;; 43949e7bcd65Smrg 43959e7bcd65Smrghaiku*) 43969e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 43979e7bcd65Smrg ;; 43989e7bcd65Smrg 43999e7bcd65Smrghpux10.20* | hpux11*) 44009e7bcd65Smrg lt_cv_file_magic_cmd=/usr/bin/file 44019e7bcd65Smrg case $host_cpu in 44029e7bcd65Smrg ia64*) 44039e7bcd65Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 44049e7bcd65Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 44059e7bcd65Smrg ;; 44069e7bcd65Smrg hppa*64*) 44079e7bcd65Smrg [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]'] 44089e7bcd65Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 44099e7bcd65Smrg ;; 44109e7bcd65Smrg *) 44119e7bcd65Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 44129e7bcd65Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 44139e7bcd65Smrg ;; 44149e7bcd65Smrg esac 44159e7bcd65Smrg ;; 44169e7bcd65Smrg 44179e7bcd65Smrginterix[[3-9]]*) 44189e7bcd65Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 44199e7bcd65Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 44209e7bcd65Smrg ;; 44219e7bcd65Smrg 44229e7bcd65Smrgirix5* | irix6* | nonstopux*) 44239e7bcd65Smrg case $LD in 44249e7bcd65Smrg *-32|*"-32 ") libmagic=32-bit;; 44259e7bcd65Smrg *-n32|*"-n32 ") libmagic=N32;; 44269e7bcd65Smrg *-64|*"-64 ") libmagic=64-bit;; 44279e7bcd65Smrg *) libmagic=never-match;; 44289e7bcd65Smrg esac 44299e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 44309e7bcd65Smrg ;; 44319e7bcd65Smrg 44329e7bcd65Smrg# This must be glibc/ELF. 44339e7bcd65Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 44349e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 44359e7bcd65Smrg ;; 44369e7bcd65Smrg 44379e7bcd65Smrgnetbsd*) 44389e7bcd65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 44399e7bcd65Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44409e7bcd65Smrg else 44419e7bcd65Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 44429e7bcd65Smrg fi 44439e7bcd65Smrg ;; 44449e7bcd65Smrg 44459e7bcd65Smrgnewos6*) 44469e7bcd65Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 44479e7bcd65Smrg lt_cv_file_magic_cmd=/usr/bin/file 44489e7bcd65Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 44499e7bcd65Smrg ;; 44509e7bcd65Smrg 44519e7bcd65Smrg*nto* | *qnx*) 44529e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 44539e7bcd65Smrg ;; 44549e7bcd65Smrg 44559e7bcd65Smrgopenbsd*) 44569e7bcd65Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 44579e7bcd65Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 44589e7bcd65Smrg else 44599e7bcd65Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44609e7bcd65Smrg fi 44619e7bcd65Smrg ;; 44629e7bcd65Smrg 44639e7bcd65Smrgosf3* | osf4* | osf5*) 44649e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 44659e7bcd65Smrg ;; 44669e7bcd65Smrg 44679e7bcd65Smrgrdos*) 44689e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 44699e7bcd65Smrg ;; 44709e7bcd65Smrg 44719e7bcd65Smrgsolaris*) 44729e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 44739e7bcd65Smrg ;; 44749e7bcd65Smrg 44759e7bcd65Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 44769e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 44779e7bcd65Smrg ;; 44789e7bcd65Smrg 44799e7bcd65Smrgsysv4 | sysv4.3*) 44809e7bcd65Smrg case $host_vendor in 44819e7bcd65Smrg motorola) 44829e7bcd65Smrg 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]]' 44839e7bcd65Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 44849e7bcd65Smrg ;; 44859e7bcd65Smrg ncr) 44869e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 44879e7bcd65Smrg ;; 44889e7bcd65Smrg sequent) 44899e7bcd65Smrg lt_cv_file_magic_cmd='/bin/file' 44909e7bcd65Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 44919e7bcd65Smrg ;; 44929e7bcd65Smrg sni) 44939e7bcd65Smrg lt_cv_file_magic_cmd='/bin/file' 44949e7bcd65Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 44959e7bcd65Smrg lt_cv_file_magic_test_file=/lib/libc.so 44969e7bcd65Smrg ;; 44979e7bcd65Smrg siemens) 44989e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 44999e7bcd65Smrg ;; 45009e7bcd65Smrg pc) 45019e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 45029e7bcd65Smrg ;; 45039e7bcd65Smrg esac 45049e7bcd65Smrg ;; 45059e7bcd65Smrg 45069e7bcd65Smrgtpf*) 45079e7bcd65Smrg lt_cv_deplibs_check_method=pass_all 45089e7bcd65Smrg ;; 45099e7bcd65Smrgesac 45109e7bcd65Smrg]) 45119e7bcd65Smrg 45129e7bcd65Smrgfile_magic_glob= 45139e7bcd65Smrgwant_nocaseglob=no 45149e7bcd65Smrgif test "$build" = "$host"; then 45159e7bcd65Smrg case $host_os in 45169e7bcd65Smrg mingw* | pw32*) 45179e7bcd65Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 45189e7bcd65Smrg want_nocaseglob=yes 45199e7bcd65Smrg else 45209e7bcd65Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 45219e7bcd65Smrg fi 45229e7bcd65Smrg ;; 45239e7bcd65Smrg esac 45249e7bcd65Smrgfi 45259e7bcd65Smrg 45269e7bcd65Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 45279e7bcd65Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 45289e7bcd65Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 45299e7bcd65Smrg 45309e7bcd65Smrg_LT_DECL([], [deplibs_check_method], [1], 45319e7bcd65Smrg [Method to check whether dependent libraries are shared objects]) 45329e7bcd65Smrg_LT_DECL([], [file_magic_cmd], [1], 45339e7bcd65Smrg [Command to use when deplibs_check_method = "file_magic"]) 45349e7bcd65Smrg_LT_DECL([], [file_magic_glob], [1], 45359e7bcd65Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 45369e7bcd65Smrg_LT_DECL([], [want_nocaseglob], [1], 45379e7bcd65Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 45389e7bcd65Smrg])# _LT_CHECK_MAGIC_METHOD 45399e7bcd65Smrg 45409e7bcd65Smrg 45419e7bcd65Smrg# LT_PATH_NM 45429e7bcd65Smrg# ---------- 45439e7bcd65Smrg# find the pathname to a BSD- or MS-compatible name lister 45449e7bcd65SmrgAC_DEFUN([LT_PATH_NM], 45459e7bcd65Smrg[AC_REQUIRE([AC_PROG_CC])dnl 45469e7bcd65SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 45479e7bcd65Smrg[if test -n "$NM"; then 45489e7bcd65Smrg # Let the user override the test. 45499e7bcd65Smrg lt_cv_path_NM="$NM" 45509e7bcd65Smrgelse 45519e7bcd65Smrg lt_nm_to_check="${ac_tool_prefix}nm" 45529e7bcd65Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 45539e7bcd65Smrg lt_nm_to_check="$lt_nm_to_check nm" 45549e7bcd65Smrg fi 45559e7bcd65Smrg for lt_tmp_nm in $lt_nm_to_check; do 45569e7bcd65Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 45579e7bcd65Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 45589e7bcd65Smrg IFS="$lt_save_ifs" 45599e7bcd65Smrg test -z "$ac_dir" && ac_dir=. 45609e7bcd65Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 45619e7bcd65Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 45629e7bcd65Smrg # Check to see if the nm accepts a BSD-compat flag. 45639e7bcd65Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 45649e7bcd65Smrg # nm: unknown option "B" ignored 45659e7bcd65Smrg # Tru64's nm complains that /dev/null is an invalid object file 45669e7bcd65Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 45679e7bcd65Smrg */dev/null* | *'Invalid file or object type'*) 45689e7bcd65Smrg lt_cv_path_NM="$tmp_nm -B" 45699e7bcd65Smrg break 45709e7bcd65Smrg ;; 45719e7bcd65Smrg *) 45729e7bcd65Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 45739e7bcd65Smrg */dev/null*) 45749e7bcd65Smrg lt_cv_path_NM="$tmp_nm -p" 45759e7bcd65Smrg break 45769e7bcd65Smrg ;; 45779e7bcd65Smrg *) 45789e7bcd65Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 45799e7bcd65Smrg continue # so that we can try to find one that supports BSD flags 45809e7bcd65Smrg ;; 45819e7bcd65Smrg esac 45829e7bcd65Smrg ;; 45839e7bcd65Smrg esac 45849e7bcd65Smrg fi 45859e7bcd65Smrg done 45869e7bcd65Smrg IFS="$lt_save_ifs" 45879e7bcd65Smrg done 45889e7bcd65Smrg : ${lt_cv_path_NM=no} 45899e7bcd65Smrgfi]) 45909e7bcd65Smrgif test "$lt_cv_path_NM" != "no"; then 45919e7bcd65Smrg NM="$lt_cv_path_NM" 45929e7bcd65Smrgelse 45939e7bcd65Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 45949e7bcd65Smrg if test -n "$DUMPBIN"; then : 45959e7bcd65Smrg # Let the user override the test. 45969e7bcd65Smrg else 45979e7bcd65Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 45989e7bcd65Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 45999e7bcd65Smrg *COFF*) 46009e7bcd65Smrg DUMPBIN="$DUMPBIN -symbols" 46019e7bcd65Smrg ;; 46029e7bcd65Smrg *) 46039e7bcd65Smrg DUMPBIN=: 46049e7bcd65Smrg ;; 46059e7bcd65Smrg esac 46069e7bcd65Smrg fi 46079e7bcd65Smrg AC_SUBST([DUMPBIN]) 46089e7bcd65Smrg if test "$DUMPBIN" != ":"; then 46099e7bcd65Smrg NM="$DUMPBIN" 46109e7bcd65Smrg fi 46119e7bcd65Smrgfi 46129e7bcd65Smrgtest -z "$NM" && NM=nm 46139e7bcd65SmrgAC_SUBST([NM]) 46149e7bcd65Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 46159e7bcd65Smrg 46169e7bcd65SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 46179e7bcd65Smrg [lt_cv_nm_interface="BSD nm" 46189e7bcd65Smrg echo "int some_variable = 0;" > conftest.$ac_ext 46199e7bcd65Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 46209e7bcd65Smrg (eval "$ac_compile" 2>conftest.err) 46219e7bcd65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46229e7bcd65Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 46239e7bcd65Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 46249e7bcd65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46259e7bcd65Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 46269e7bcd65Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 46279e7bcd65Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 46289e7bcd65Smrg lt_cv_nm_interface="MS dumpbin" 46299e7bcd65Smrg fi 46309e7bcd65Smrg rm -f conftest*]) 46319e7bcd65Smrg])# LT_PATH_NM 46329e7bcd65Smrg 46339e7bcd65Smrg# Old names: 46349e7bcd65SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 46359e7bcd65SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 46369e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 46379e7bcd65Smrgdnl AC_DEFUN([AM_PROG_NM], []) 46389e7bcd65Smrgdnl AC_DEFUN([AC_PROG_NM], []) 46399e7bcd65Smrg 46409e7bcd65Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 46419e7bcd65Smrg# -------------------------------- 46429e7bcd65Smrg# how to determine the name of the shared library 46439e7bcd65Smrg# associated with a specific link library. 46449e7bcd65Smrg# -- PORTME fill in with the dynamic library characteristics 46459e7bcd65Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 46469e7bcd65Smrg[m4_require([_LT_DECL_EGREP]) 46479e7bcd65Smrgm4_require([_LT_DECL_OBJDUMP]) 46489e7bcd65Smrgm4_require([_LT_DECL_DLLTOOL]) 46499e7bcd65SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 46509e7bcd65Smrglt_cv_sharedlib_from_linklib_cmd, 46519e7bcd65Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 46529e7bcd65Smrg 46539e7bcd65Smrgcase $host_os in 46549e7bcd65Smrgcygwin* | mingw* | pw32* | cegcc*) 46559e7bcd65Smrg # two different shell functions defined in ltmain.sh 46569e7bcd65Smrg # decide which to use based on capabilities of $DLLTOOL 46579e7bcd65Smrg case `$DLLTOOL --help 2>&1` in 46589e7bcd65Smrg *--identify-strict*) 46599e7bcd65Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 46609e7bcd65Smrg ;; 46619e7bcd65Smrg *) 46629e7bcd65Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 46639e7bcd65Smrg ;; 46649e7bcd65Smrg esac 46659e7bcd65Smrg ;; 46669e7bcd65Smrg*) 46679e7bcd65Smrg # fallback: assume linklib IS sharedlib 46689e7bcd65Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 46699e7bcd65Smrg ;; 46709e7bcd65Smrgesac 46719e7bcd65Smrg]) 46729e7bcd65Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 46739e7bcd65Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 46749e7bcd65Smrg 46759e7bcd65Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 46769e7bcd65Smrg [Command to associate shared and link libraries]) 46779e7bcd65Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 46789e7bcd65Smrg 46799e7bcd65Smrg 46809e7bcd65Smrg# _LT_PATH_MANIFEST_TOOL 46819e7bcd65Smrg# ---------------------- 46829e7bcd65Smrg# locate the manifest tool 46839e7bcd65Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 46849e7bcd65Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 46859e7bcd65Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 46869e7bcd65SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 46879e7bcd65Smrg [lt_cv_path_mainfest_tool=no 46889e7bcd65Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 46899e7bcd65Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 46909e7bcd65Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46919e7bcd65Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 46929e7bcd65Smrg lt_cv_path_mainfest_tool=yes 46939e7bcd65Smrg fi 46949e7bcd65Smrg rm -f conftest*]) 46959e7bcd65Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 46969e7bcd65Smrg MANIFEST_TOOL=: 46979e7bcd65Smrgfi 46989e7bcd65Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 46999e7bcd65Smrg])# _LT_PATH_MANIFEST_TOOL 47009e7bcd65Smrg 47019e7bcd65Smrg 47029e7bcd65Smrg# LT_LIB_M 47039e7bcd65Smrg# -------- 47049e7bcd65Smrg# check for math library 47059e7bcd65SmrgAC_DEFUN([LT_LIB_M], 47069e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47079e7bcd65SmrgLIBM= 47089e7bcd65Smrgcase $host in 47099e7bcd65Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 47109e7bcd65Smrg # These system don't have libm, or don't need it 47119e7bcd65Smrg ;; 47129e7bcd65Smrg*-ncr-sysv4.3*) 47139e7bcd65Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 47149e7bcd65Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 47159e7bcd65Smrg ;; 47169e7bcd65Smrg*) 47179e7bcd65Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 47189e7bcd65Smrg ;; 47199e7bcd65Smrgesac 47209e7bcd65SmrgAC_SUBST([LIBM]) 47219e7bcd65Smrg])# LT_LIB_M 47229e7bcd65Smrg 47239e7bcd65Smrg# Old name: 47249e7bcd65SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 47259e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 47269e7bcd65Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 47279e7bcd65Smrg 47289e7bcd65Smrg 47299e7bcd65Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 47309e7bcd65Smrg# ------------------------------- 47319e7bcd65Smrgm4_defun([_LT_COMPILER_NO_RTTI], 47329e7bcd65Smrg[m4_require([_LT_TAG_COMPILER])dnl 47339e7bcd65Smrg 47349e7bcd65Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 47359e7bcd65Smrg 47369e7bcd65Smrgif test "$GCC" = yes; then 47379e7bcd65Smrg case $cc_basename in 47389e7bcd65Smrg nvcc*) 47399e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 47409e7bcd65Smrg *) 47419e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 47429e7bcd65Smrg esac 47439e7bcd65Smrg 47449e7bcd65Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47459e7bcd65Smrg lt_cv_prog_compiler_rtti_exceptions, 47469e7bcd65Smrg [-fno-rtti -fno-exceptions], [], 47479e7bcd65Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 47489e7bcd65Smrgfi 47499e7bcd65Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 47509e7bcd65Smrg [Compiler flag to turn off builtin functions]) 47519e7bcd65Smrg])# _LT_COMPILER_NO_RTTI 47529e7bcd65Smrg 47539e7bcd65Smrg 47549e7bcd65Smrg# _LT_CMD_GLOBAL_SYMBOLS 47559e7bcd65Smrg# ---------------------- 47569e7bcd65Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 47579e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47589e7bcd65SmrgAC_REQUIRE([AC_PROG_CC])dnl 47599e7bcd65SmrgAC_REQUIRE([AC_PROG_AWK])dnl 47609e7bcd65SmrgAC_REQUIRE([LT_PATH_NM])dnl 47619e7bcd65SmrgAC_REQUIRE([LT_PATH_LD])dnl 47629e7bcd65Smrgm4_require([_LT_DECL_SED])dnl 47639e7bcd65Smrgm4_require([_LT_DECL_EGREP])dnl 47649e7bcd65Smrgm4_require([_LT_TAG_COMPILER])dnl 47659e7bcd65Smrg 47669e7bcd65Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 47679e7bcd65SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 47689e7bcd65SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 47699e7bcd65Smrg[ 47709e7bcd65Smrg# These are sane defaults that work on at least a few old systems. 47719e7bcd65Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 47729e7bcd65Smrg 47739e7bcd65Smrg# Character class describing NM global symbol codes. 47749e7bcd65Smrgsymcode='[[BCDEGRST]]' 47759e7bcd65Smrg 47769e7bcd65Smrg# Regexp to match symbols that can be accessed directly from C. 47779e7bcd65Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 47789e7bcd65Smrg 47799e7bcd65Smrg# Define system-specific variables. 47809e7bcd65Smrgcase $host_os in 47819e7bcd65Smrgaix*) 47829e7bcd65Smrg symcode='[[BCDT]]' 47839e7bcd65Smrg ;; 47849e7bcd65Smrgcygwin* | mingw* | pw32* | cegcc*) 47859e7bcd65Smrg symcode='[[ABCDGISTW]]' 47869e7bcd65Smrg ;; 47879e7bcd65Smrghpux*) 47889e7bcd65Smrg if test "$host_cpu" = ia64; then 47899e7bcd65Smrg symcode='[[ABCDEGRST]]' 47909e7bcd65Smrg fi 47919e7bcd65Smrg ;; 47929e7bcd65Smrgirix* | nonstopux*) 47939e7bcd65Smrg symcode='[[BCDEGRST]]' 47949e7bcd65Smrg ;; 47959e7bcd65Smrgosf*) 47969e7bcd65Smrg symcode='[[BCDEGQRST]]' 47979e7bcd65Smrg ;; 47989e7bcd65Smrgsolaris*) 47999e7bcd65Smrg symcode='[[BDRT]]' 48009e7bcd65Smrg ;; 48019e7bcd65Smrgsco3.2v5*) 48029e7bcd65Smrg symcode='[[DT]]' 48039e7bcd65Smrg ;; 48049e7bcd65Smrgsysv4.2uw2*) 48059e7bcd65Smrg symcode='[[DT]]' 48069e7bcd65Smrg ;; 48079e7bcd65Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 48089e7bcd65Smrg symcode='[[ABDT]]' 48099e7bcd65Smrg ;; 48109e7bcd65Smrgsysv4) 48119e7bcd65Smrg symcode='[[DFNSTU]]' 48129e7bcd65Smrg ;; 48139e7bcd65Smrgesac 48149e7bcd65Smrg 48159e7bcd65Smrg# If we're using GNU nm, then use its standard symbol codes. 48169e7bcd65Smrgcase `$NM -V 2>&1` in 48179e7bcd65Smrg*GNU* | *'with BFD'*) 48189e7bcd65Smrg symcode='[[ABCDGIRSTW]]' ;; 48199e7bcd65Smrgesac 48209e7bcd65Smrg 48219e7bcd65Smrg# Transform an extracted symbol line into a proper C declaration. 48229e7bcd65Smrg# Some systems (esp. on ia64) link data and code symbols differently, 48239e7bcd65Smrg# so use this general approach. 48249e7bcd65Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 48259e7bcd65Smrg 48269e7bcd65Smrg# Transform an extracted symbol line into symbol name and symbol address 48279e7bcd65Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 48289e7bcd65Smrglt_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'" 48299e7bcd65Smrg 48309e7bcd65Smrg# Handle CRLF in mingw tool chain 48319e7bcd65Smrgopt_cr= 48329e7bcd65Smrgcase $build_os in 48339e7bcd65Smrgmingw*) 48349e7bcd65Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48359e7bcd65Smrg ;; 48369e7bcd65Smrgesac 48379e7bcd65Smrg 48389e7bcd65Smrg# Try without a prefix underscore, then with it. 48399e7bcd65Smrgfor ac_symprfx in "" "_"; do 48409e7bcd65Smrg 48419e7bcd65Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48429e7bcd65Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 48439e7bcd65Smrg 48449e7bcd65Smrg # Write the raw and C identifiers. 48459e7bcd65Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 48469e7bcd65Smrg # Fake it for dumpbin and say T for any non-static function 48479e7bcd65Smrg # and D for any global variable. 48489e7bcd65Smrg # Also find C++ and __fastcall symbols from MSVC++, 48499e7bcd65Smrg # which start with @ or ?. 48509e7bcd65Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 48519e7bcd65Smrg" {last_section=section; section=\$ 3};"\ 48529e7bcd65Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 48539e7bcd65Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 48549e7bcd65Smrg" \$ 0!~/External *\|/{next};"\ 48559e7bcd65Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 48569e7bcd65Smrg" {if(hide[section]) next};"\ 48579e7bcd65Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 48589e7bcd65Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 48599e7bcd65Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 48609e7bcd65Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 48619e7bcd65Smrg" ' prfx=^$ac_symprfx]" 48629e7bcd65Smrg else 48639e7bcd65Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48649e7bcd65Smrg fi 48659e7bcd65Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 48669e7bcd65Smrg 48679e7bcd65Smrg # Check to see that the pipe works correctly. 48689e7bcd65Smrg pipe_works=no 48699e7bcd65Smrg 48709e7bcd65Smrg rm -f conftest* 48719e7bcd65Smrg cat > conftest.$ac_ext <<_LT_EOF 48729e7bcd65Smrg#ifdef __cplusplus 48739e7bcd65Smrgextern "C" { 48749e7bcd65Smrg#endif 48759e7bcd65Smrgchar nm_test_var; 48769e7bcd65Smrgvoid nm_test_func(void); 48779e7bcd65Smrgvoid nm_test_func(void){} 48789e7bcd65Smrg#ifdef __cplusplus 48799e7bcd65Smrg} 48809e7bcd65Smrg#endif 48819e7bcd65Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 48829e7bcd65Smrg_LT_EOF 48839e7bcd65Smrg 48849e7bcd65Smrg if AC_TRY_EVAL(ac_compile); then 48859e7bcd65Smrg # Now try to grab the symbols. 48869e7bcd65Smrg nlist=conftest.nm 48879e7bcd65Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 48889e7bcd65Smrg # Try sorting and uniquifying the output. 48899e7bcd65Smrg if sort "$nlist" | uniq > "$nlist"T; then 48909e7bcd65Smrg mv -f "$nlist"T "$nlist" 48919e7bcd65Smrg else 48929e7bcd65Smrg rm -f "$nlist"T 48939e7bcd65Smrg fi 48949e7bcd65Smrg 48959e7bcd65Smrg # Make sure that we snagged all the symbols we need. 48969e7bcd65Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 48979e7bcd65Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 48989e7bcd65Smrg cat <<_LT_EOF > conftest.$ac_ext 48999e7bcd65Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 49009e7bcd65Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 49019e7bcd65Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 49029e7bcd65Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 49039e7bcd65Smrg# define LT@&t@_DLSYM_CONST 49049e7bcd65Smrg#elif defined(__osf__) 49059e7bcd65Smrg/* This system does not cope well with relocations in const data. */ 49069e7bcd65Smrg# define LT@&t@_DLSYM_CONST 49079e7bcd65Smrg#else 49089e7bcd65Smrg# define LT@&t@_DLSYM_CONST const 49099e7bcd65Smrg#endif 49109e7bcd65Smrg 49119e7bcd65Smrg#ifdef __cplusplus 49129e7bcd65Smrgextern "C" { 49139e7bcd65Smrg#endif 49149e7bcd65Smrg 49159e7bcd65Smrg_LT_EOF 49169e7bcd65Smrg # Now generate the symbol file. 49179e7bcd65Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 49189e7bcd65Smrg 49199e7bcd65Smrg cat <<_LT_EOF >> conftest.$ac_ext 49209e7bcd65Smrg 49219e7bcd65Smrg/* The mapping between symbol names and symbols. */ 49229e7bcd65SmrgLT@&t@_DLSYM_CONST struct { 49239e7bcd65Smrg const char *name; 49249e7bcd65Smrg void *address; 49259e7bcd65Smrg} 49269e7bcd65Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 49279e7bcd65Smrg{ 49289e7bcd65Smrg { "@PROGRAM@", (void *) 0 }, 49299e7bcd65Smrg_LT_EOF 49309e7bcd65Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 49319e7bcd65Smrg cat <<\_LT_EOF >> conftest.$ac_ext 49329e7bcd65Smrg {0, (void *) 0} 49339e7bcd65Smrg}; 49349e7bcd65Smrg 49359e7bcd65Smrg/* This works around a problem in FreeBSD linker */ 49369e7bcd65Smrg#ifdef FREEBSD_WORKAROUND 49379e7bcd65Smrgstatic const void *lt_preloaded_setup() { 49389e7bcd65Smrg return lt__PROGRAM__LTX_preloaded_symbols; 49399e7bcd65Smrg} 49409e7bcd65Smrg#endif 49419e7bcd65Smrg 49429e7bcd65Smrg#ifdef __cplusplus 49439e7bcd65Smrg} 49449e7bcd65Smrg#endif 49459e7bcd65Smrg_LT_EOF 49469e7bcd65Smrg # Now try linking the two files. 49479e7bcd65Smrg mv conftest.$ac_objext conftstm.$ac_objext 49489e7bcd65Smrg lt_globsym_save_LIBS=$LIBS 49499e7bcd65Smrg lt_globsym_save_CFLAGS=$CFLAGS 49509e7bcd65Smrg LIBS="conftstm.$ac_objext" 49519e7bcd65Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49529e7bcd65Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49539e7bcd65Smrg pipe_works=yes 49549e7bcd65Smrg fi 49559e7bcd65Smrg LIBS=$lt_globsym_save_LIBS 49569e7bcd65Smrg CFLAGS=$lt_globsym_save_CFLAGS 49579e7bcd65Smrg else 49589e7bcd65Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49599e7bcd65Smrg fi 49609e7bcd65Smrg else 49619e7bcd65Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49629e7bcd65Smrg fi 49639e7bcd65Smrg else 49649e7bcd65Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 49659e7bcd65Smrg fi 49669e7bcd65Smrg else 49679e7bcd65Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49689e7bcd65Smrg cat conftest.$ac_ext >&5 49699e7bcd65Smrg fi 49709e7bcd65Smrg rm -rf conftest* conftst* 49719e7bcd65Smrg 49729e7bcd65Smrg # Do not use the global_symbol_pipe unless it works. 49739e7bcd65Smrg if test "$pipe_works" = yes; then 49749e7bcd65Smrg break 49759e7bcd65Smrg else 49769e7bcd65Smrg lt_cv_sys_global_symbol_pipe= 49779e7bcd65Smrg fi 49789e7bcd65Smrgdone 49799e7bcd65Smrg]) 49809e7bcd65Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49819e7bcd65Smrg lt_cv_sys_global_symbol_to_cdecl= 49829e7bcd65Smrgfi 49839e7bcd65Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49849e7bcd65Smrg AC_MSG_RESULT(failed) 49859e7bcd65Smrgelse 49869e7bcd65Smrg AC_MSG_RESULT(ok) 49879e7bcd65Smrgfi 49889e7bcd65Smrg 49899e7bcd65Smrg# Response file support. 49909e7bcd65Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 49919e7bcd65Smrg nm_file_list_spec='@' 49929e7bcd65Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 49939e7bcd65Smrg nm_file_list_spec='@' 49949e7bcd65Smrgfi 49959e7bcd65Smrg 49969e7bcd65Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 49979e7bcd65Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 49989e7bcd65Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 49999e7bcd65Smrg [Transform the output of nm in a proper C declaration]) 50009e7bcd65Smrg_LT_DECL([global_symbol_to_c_name_address], 50019e7bcd65Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 50029e7bcd65Smrg [Transform the output of nm in a C name address pair]) 50039e7bcd65Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 50049e7bcd65Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 50059e7bcd65Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 50069e7bcd65Smrg_LT_DECL([], [nm_file_list_spec], [1], 50079e7bcd65Smrg [Specify filename containing input files for $NM]) 50089e7bcd65Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 50099e7bcd65Smrg 50109e7bcd65Smrg 50119e7bcd65Smrg# _LT_COMPILER_PIC([TAGNAME]) 50129e7bcd65Smrg# --------------------------- 50139e7bcd65Smrgm4_defun([_LT_COMPILER_PIC], 50149e7bcd65Smrg[m4_require([_LT_TAG_COMPILER])dnl 50159e7bcd65Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 50169e7bcd65Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 50179e7bcd65Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 50189e7bcd65Smrg 50199e7bcd65Smrgm4_if([$1], [CXX], [ 50209e7bcd65Smrg # C++ specific cases for pic, static, wl, etc. 50219e7bcd65Smrg if test "$GXX" = yes; then 50229e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50239e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 50249e7bcd65Smrg 50259e7bcd65Smrg case $host_os in 50269e7bcd65Smrg aix*) 50279e7bcd65Smrg # All AIX code is PIC. 50289e7bcd65Smrg if test "$host_cpu" = ia64; then 50299e7bcd65Smrg # AIX 5 now supports IA64 processor 50309e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50319e7bcd65Smrg fi 50329e7bcd65Smrg ;; 50339e7bcd65Smrg 50349e7bcd65Smrg amigaos*) 50359e7bcd65Smrg case $host_cpu in 50369e7bcd65Smrg powerpc) 50379e7bcd65Smrg # see comment about AmigaOS4 .so support 50389e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50399e7bcd65Smrg ;; 50409e7bcd65Smrg m68k) 50419e7bcd65Smrg # FIXME: we need at least 68020 code to build shared libraries, but 50429e7bcd65Smrg # adding the `-m68020' flag to GCC prevents building anything better, 50439e7bcd65Smrg # like `-m68040'. 50449e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50459e7bcd65Smrg ;; 50469e7bcd65Smrg esac 50479e7bcd65Smrg ;; 50489e7bcd65Smrg 50499e7bcd65Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50509e7bcd65Smrg # PIC is the default for these OSes. 50519e7bcd65Smrg ;; 50529e7bcd65Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50539e7bcd65Smrg # This hack is so that the source file can tell whether it is being 50549e7bcd65Smrg # built for inclusion in a dll (and should export symbols for example). 50559e7bcd65Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50569e7bcd65Smrg # (--disable-auto-import) libraries 50579e7bcd65Smrg m4_if([$1], [GCJ], [], 50589e7bcd65Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50599e7bcd65Smrg ;; 50609e7bcd65Smrg darwin* | rhapsody*) 50619e7bcd65Smrg # PIC is the default on this platform 50629e7bcd65Smrg # Common symbols not allowed in MH_DYLIB files 50639e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50649e7bcd65Smrg ;; 50659e7bcd65Smrg *djgpp*) 50669e7bcd65Smrg # DJGPP does not support shared libraries at all 50679e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 50689e7bcd65Smrg ;; 50699e7bcd65Smrg haiku*) 50709e7bcd65Smrg # PIC is the default for Haiku. 50719e7bcd65Smrg # The "-static" flag exists, but is broken. 50729e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 50739e7bcd65Smrg ;; 50749e7bcd65Smrg interix[[3-9]]*) 50759e7bcd65Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50769e7bcd65Smrg # Instead, we relocate shared libraries at runtime. 50779e7bcd65Smrg ;; 50789e7bcd65Smrg sysv4*MP*) 50799e7bcd65Smrg if test -d /usr/nec; then 50809e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50819e7bcd65Smrg fi 50829e7bcd65Smrg ;; 50839e7bcd65Smrg hpux*) 50849e7bcd65Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 50859e7bcd65Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 50869e7bcd65Smrg # sets the default TLS model and affects inlining. 50879e7bcd65Smrg case $host_cpu in 50889e7bcd65Smrg hppa*64*) 50899e7bcd65Smrg ;; 50909e7bcd65Smrg *) 50919e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50929e7bcd65Smrg ;; 50939e7bcd65Smrg esac 50949e7bcd65Smrg ;; 50959e7bcd65Smrg *qnx* | *nto*) 50969e7bcd65Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 50979e7bcd65Smrg # it will coredump. 50989e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 50999e7bcd65Smrg ;; 51009e7bcd65Smrg *) 51019e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51029e7bcd65Smrg ;; 51039e7bcd65Smrg esac 51049e7bcd65Smrg else 51059e7bcd65Smrg case $host_os in 51069e7bcd65Smrg aix[[4-9]]*) 51079e7bcd65Smrg # All AIX code is PIC. 51089e7bcd65Smrg if test "$host_cpu" = ia64; then 51099e7bcd65Smrg # AIX 5 now supports IA64 processor 51109e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51119e7bcd65Smrg else 51129e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 51139e7bcd65Smrg fi 51149e7bcd65Smrg ;; 51159e7bcd65Smrg chorus*) 51169e7bcd65Smrg case $cc_basename in 51179e7bcd65Smrg cxch68*) 51189e7bcd65Smrg # Green Hills C++ Compiler 51199e7bcd65Smrg # _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" 51209e7bcd65Smrg ;; 51219e7bcd65Smrg esac 51229e7bcd65Smrg ;; 51239e7bcd65Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 51249e7bcd65Smrg # This hack is so that the source file can tell whether it is being 51259e7bcd65Smrg # built for inclusion in a dll (and should export symbols for example). 51269e7bcd65Smrg m4_if([$1], [GCJ], [], 51279e7bcd65Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 51289e7bcd65Smrg ;; 51299e7bcd65Smrg dgux*) 51309e7bcd65Smrg case $cc_basename in 51319e7bcd65Smrg ec++*) 51329e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51339e7bcd65Smrg ;; 51349e7bcd65Smrg ghcx*) 51359e7bcd65Smrg # Green Hills C++ Compiler 51369e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51379e7bcd65Smrg ;; 51389e7bcd65Smrg *) 51399e7bcd65Smrg ;; 51409e7bcd65Smrg esac 51419e7bcd65Smrg ;; 51429e7bcd65Smrg freebsd* | dragonfly*) 51439e7bcd65Smrg # FreeBSD uses GNU C++ 51449e7bcd65Smrg ;; 51459e7bcd65Smrg hpux9* | hpux10* | hpux11*) 51469e7bcd65Smrg case $cc_basename in 51479e7bcd65Smrg CC*) 51489e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51499e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51509e7bcd65Smrg if test "$host_cpu" != ia64; then 51519e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51529e7bcd65Smrg fi 51539e7bcd65Smrg ;; 51549e7bcd65Smrg aCC*) 51559e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51569e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51579e7bcd65Smrg case $host_cpu in 51589e7bcd65Smrg hppa*64*|ia64*) 51599e7bcd65Smrg # +Z the default 51609e7bcd65Smrg ;; 51619e7bcd65Smrg *) 51629e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51639e7bcd65Smrg ;; 51649e7bcd65Smrg esac 51659e7bcd65Smrg ;; 51669e7bcd65Smrg *) 51679e7bcd65Smrg ;; 51689e7bcd65Smrg esac 51699e7bcd65Smrg ;; 51709e7bcd65Smrg interix*) 51719e7bcd65Smrg # This is c89, which is MS Visual C++ (no shared libs) 51729e7bcd65Smrg # Anyone wants to do a port? 51739e7bcd65Smrg ;; 51749e7bcd65Smrg irix5* | irix6* | nonstopux*) 51759e7bcd65Smrg case $cc_basename in 51769e7bcd65Smrg CC*) 51779e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51789e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51799e7bcd65Smrg # CC pic flag -KPIC is the default. 51809e7bcd65Smrg ;; 51819e7bcd65Smrg *) 51829e7bcd65Smrg ;; 51839e7bcd65Smrg esac 51849e7bcd65Smrg ;; 51859e7bcd65Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 51869e7bcd65Smrg case $cc_basename in 51879e7bcd65Smrg KCC*) 51889e7bcd65Smrg # KAI C++ Compiler 51899e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51909e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51919e7bcd65Smrg ;; 51929e7bcd65Smrg ecpc* ) 51939e7bcd65Smrg # old Intel C++ for x86_64 which still supported -KPIC. 51949e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51959e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51969e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 51979e7bcd65Smrg ;; 51989e7bcd65Smrg icpc* ) 51999e7bcd65Smrg # Intel C++, used to be incompatible with GCC. 52009e7bcd65Smrg # ICC 10 doesn't accept -KPIC any more. 52019e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52029e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 52039e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 52049e7bcd65Smrg ;; 52059e7bcd65Smrg pgCC* | pgcpp*) 52069e7bcd65Smrg # Portland Group C++ compiler 52079e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52089e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 52099e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52109e7bcd65Smrg ;; 52119e7bcd65Smrg cxx*) 52129e7bcd65Smrg # Compaq C++ 52139e7bcd65Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52149e7bcd65Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52159e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52169e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52179e7bcd65Smrg ;; 52189e7bcd65Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 52199e7bcd65Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 52209e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52219e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 52229e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 52239e7bcd65Smrg ;; 52249e7bcd65Smrg *) 52259e7bcd65Smrg case `$CC -V 2>&1 | sed 5q` in 52269e7bcd65Smrg *Sun\ C*) 52279e7bcd65Smrg # Sun C++ 5.9 52289e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52299e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52309e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52319e7bcd65Smrg ;; 52329e7bcd65Smrg esac 52339e7bcd65Smrg ;; 52349e7bcd65Smrg esac 52359e7bcd65Smrg ;; 52369e7bcd65Smrg lynxos*) 52379e7bcd65Smrg ;; 52389e7bcd65Smrg m88k*) 52399e7bcd65Smrg ;; 52409e7bcd65Smrg mvs*) 52419e7bcd65Smrg case $cc_basename in 52429e7bcd65Smrg cxx*) 52439e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52449e7bcd65Smrg ;; 52459e7bcd65Smrg *) 52469e7bcd65Smrg ;; 52479e7bcd65Smrg esac 52489e7bcd65Smrg ;; 52499e7bcd65Smrg netbsd*) 52509e7bcd65Smrg ;; 52519e7bcd65Smrg *qnx* | *nto*) 52529e7bcd65Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 52539e7bcd65Smrg # it will coredump. 52549e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 52559e7bcd65Smrg ;; 52569e7bcd65Smrg osf3* | osf4* | osf5*) 52579e7bcd65Smrg case $cc_basename in 52589e7bcd65Smrg KCC*) 52599e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52609e7bcd65Smrg ;; 52619e7bcd65Smrg RCC*) 52629e7bcd65Smrg # Rational C++ 2.4.1 52639e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52649e7bcd65Smrg ;; 52659e7bcd65Smrg cxx*) 52669e7bcd65Smrg # Digital/Compaq C++ 52679e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52689e7bcd65Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52699e7bcd65Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52709e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52719e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52729e7bcd65Smrg ;; 52739e7bcd65Smrg *) 52749e7bcd65Smrg ;; 52759e7bcd65Smrg esac 52769e7bcd65Smrg ;; 52779e7bcd65Smrg psos*) 52789e7bcd65Smrg ;; 52799e7bcd65Smrg solaris*) 52809e7bcd65Smrg case $cc_basename in 52819e7bcd65Smrg CC* | sunCC*) 52829e7bcd65Smrg # Sun C++ 4.2, 5.x and Centerline C++ 52839e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52849e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52859e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52869e7bcd65Smrg ;; 52879e7bcd65Smrg gcx*) 52889e7bcd65Smrg # Green Hills C++ Compiler 52899e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52909e7bcd65Smrg ;; 52919e7bcd65Smrg *) 52929e7bcd65Smrg ;; 52939e7bcd65Smrg esac 52949e7bcd65Smrg ;; 52959e7bcd65Smrg sunos4*) 52969e7bcd65Smrg case $cc_basename in 52979e7bcd65Smrg CC*) 52989e7bcd65Smrg # Sun C++ 4.x 52999e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 53009e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53019e7bcd65Smrg ;; 53029e7bcd65Smrg lcc*) 53039e7bcd65Smrg # Lucid 53049e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 53059e7bcd65Smrg ;; 53069e7bcd65Smrg *) 53079e7bcd65Smrg ;; 53089e7bcd65Smrg esac 53099e7bcd65Smrg ;; 53109e7bcd65Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 53119e7bcd65Smrg case $cc_basename in 53129e7bcd65Smrg CC*) 53139e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53149e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53159e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53169e7bcd65Smrg ;; 53179e7bcd65Smrg esac 53189e7bcd65Smrg ;; 53199e7bcd65Smrg tandem*) 53209e7bcd65Smrg case $cc_basename in 53219e7bcd65Smrg NCC*) 53229e7bcd65Smrg # NonStop-UX NCC 3.20 53239e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53249e7bcd65Smrg ;; 53259e7bcd65Smrg *) 53269e7bcd65Smrg ;; 53279e7bcd65Smrg esac 53289e7bcd65Smrg ;; 53299e7bcd65Smrg vxworks*) 53309e7bcd65Smrg ;; 53319e7bcd65Smrg *) 53329e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53339e7bcd65Smrg ;; 53349e7bcd65Smrg esac 53359e7bcd65Smrg fi 53369e7bcd65Smrg], 53379e7bcd65Smrg[ 53389e7bcd65Smrg if test "$GCC" = yes; then 53399e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53409e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 53419e7bcd65Smrg 53429e7bcd65Smrg case $host_os in 53439e7bcd65Smrg aix*) 53449e7bcd65Smrg # All AIX code is PIC. 53459e7bcd65Smrg if test "$host_cpu" = ia64; then 53469e7bcd65Smrg # AIX 5 now supports IA64 processor 53479e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53489e7bcd65Smrg fi 53499e7bcd65Smrg ;; 53509e7bcd65Smrg 53519e7bcd65Smrg amigaos*) 53529e7bcd65Smrg case $host_cpu in 53539e7bcd65Smrg powerpc) 53549e7bcd65Smrg # see comment about AmigaOS4 .so support 53559e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53569e7bcd65Smrg ;; 53579e7bcd65Smrg m68k) 53589e7bcd65Smrg # FIXME: we need at least 68020 code to build shared libraries, but 53599e7bcd65Smrg # adding the `-m68020' flag to GCC prevents building anything better, 53609e7bcd65Smrg # like `-m68040'. 53619e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53629e7bcd65Smrg ;; 53639e7bcd65Smrg esac 53649e7bcd65Smrg ;; 53659e7bcd65Smrg 53669e7bcd65Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53679e7bcd65Smrg # PIC is the default for these OSes. 53689e7bcd65Smrg ;; 53699e7bcd65Smrg 53709e7bcd65Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 53719e7bcd65Smrg # This hack is so that the source file can tell whether it is being 53729e7bcd65Smrg # built for inclusion in a dll (and should export symbols for example). 53739e7bcd65Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53749e7bcd65Smrg # (--disable-auto-import) libraries 53759e7bcd65Smrg m4_if([$1], [GCJ], [], 53769e7bcd65Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53779e7bcd65Smrg ;; 53789e7bcd65Smrg 53799e7bcd65Smrg darwin* | rhapsody*) 53809e7bcd65Smrg # PIC is the default on this platform 53819e7bcd65Smrg # Common symbols not allowed in MH_DYLIB files 53829e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53839e7bcd65Smrg ;; 53849e7bcd65Smrg 53859e7bcd65Smrg haiku*) 53869e7bcd65Smrg # PIC is the default for Haiku. 53879e7bcd65Smrg # The "-static" flag exists, but is broken. 53889e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 53899e7bcd65Smrg ;; 53909e7bcd65Smrg 53919e7bcd65Smrg hpux*) 53929e7bcd65Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 53939e7bcd65Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 53949e7bcd65Smrg # sets the default TLS model and affects inlining. 53959e7bcd65Smrg case $host_cpu in 53969e7bcd65Smrg hppa*64*) 53979e7bcd65Smrg # +Z the default 53989e7bcd65Smrg ;; 53999e7bcd65Smrg *) 54009e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54019e7bcd65Smrg ;; 54029e7bcd65Smrg esac 54039e7bcd65Smrg ;; 54049e7bcd65Smrg 54059e7bcd65Smrg interix[[3-9]]*) 54069e7bcd65Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 54079e7bcd65Smrg # Instead, we relocate shared libraries at runtime. 54089e7bcd65Smrg ;; 54099e7bcd65Smrg 54109e7bcd65Smrg msdosdjgpp*) 54119e7bcd65Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 54129e7bcd65Smrg # on systems that don't support them. 54139e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 54149e7bcd65Smrg enable_shared=no 54159e7bcd65Smrg ;; 54169e7bcd65Smrg 54179e7bcd65Smrg *nto* | *qnx*) 54189e7bcd65Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 54199e7bcd65Smrg # it will coredump. 54209e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 54219e7bcd65Smrg ;; 54229e7bcd65Smrg 54239e7bcd65Smrg sysv4*MP*) 54249e7bcd65Smrg if test -d /usr/nec; then 54259e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 54269e7bcd65Smrg fi 54279e7bcd65Smrg ;; 54289e7bcd65Smrg 54299e7bcd65Smrg *) 54309e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54319e7bcd65Smrg ;; 54329e7bcd65Smrg esac 54339e7bcd65Smrg 54349e7bcd65Smrg case $cc_basename in 54359e7bcd65Smrg nvcc*) # Cuda Compiler Driver 2.2 54369e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 54379e7bcd65Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 54389e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 54399e7bcd65Smrg fi 54409e7bcd65Smrg ;; 54419e7bcd65Smrg esac 54429e7bcd65Smrg else 54439e7bcd65Smrg # PORTME Check for flag to pass linker flags through the system compiler. 54449e7bcd65Smrg case $host_os in 54459e7bcd65Smrg aix*) 54469e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54479e7bcd65Smrg if test "$host_cpu" = ia64; then 54489e7bcd65Smrg # AIX 5 now supports IA64 processor 54499e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54509e7bcd65Smrg else 54519e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 54529e7bcd65Smrg fi 54539e7bcd65Smrg ;; 54549e7bcd65Smrg 54559e7bcd65Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 54569e7bcd65Smrg # This hack is so that the source file can tell whether it is being 54579e7bcd65Smrg # built for inclusion in a dll (and should export symbols for example). 54589e7bcd65Smrg m4_if([$1], [GCJ], [], 54599e7bcd65Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 54609e7bcd65Smrg ;; 54619e7bcd65Smrg 54629e7bcd65Smrg hpux9* | hpux10* | hpux11*) 54639e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54649e7bcd65Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54659e7bcd65Smrg # not for PA HP-UX. 54669e7bcd65Smrg case $host_cpu in 54679e7bcd65Smrg hppa*64*|ia64*) 54689e7bcd65Smrg # +Z the default 54699e7bcd65Smrg ;; 54709e7bcd65Smrg *) 54719e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 54729e7bcd65Smrg ;; 54739e7bcd65Smrg esac 54749e7bcd65Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54759e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54769e7bcd65Smrg ;; 54779e7bcd65Smrg 54789e7bcd65Smrg irix5* | irix6* | nonstopux*) 54799e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54809e7bcd65Smrg # PIC (with -KPIC) is the default. 54819e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54829e7bcd65Smrg ;; 54839e7bcd65Smrg 54849e7bcd65Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 54859e7bcd65Smrg case $cc_basename in 54869e7bcd65Smrg # old Intel for x86_64 which still supported -KPIC. 54879e7bcd65Smrg ecc*) 54889e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54899e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54909e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54919e7bcd65Smrg ;; 54929e7bcd65Smrg # icc used to be incompatible with GCC. 54939e7bcd65Smrg # ICC 10 doesn't accept -KPIC any more. 54949e7bcd65Smrg icc* | ifort*) 54959e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54969e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54979e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54989e7bcd65Smrg ;; 54999e7bcd65Smrg # Lahey Fortran 8.1. 55009e7bcd65Smrg lf95*) 55019e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55029e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 55039e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 55049e7bcd65Smrg ;; 55059e7bcd65Smrg nagfor*) 55069e7bcd65Smrg # NAG Fortran compiler 55079e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 55089e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55099e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55109e7bcd65Smrg ;; 55119e7bcd65Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 55129e7bcd65Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 55139e7bcd65Smrg # which looks to be a dead project) 55149e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55159e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 55169e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55179e7bcd65Smrg ;; 55189e7bcd65Smrg ccc*) 55199e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55209e7bcd65Smrg # All Alpha code is PIC. 55219e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55229e7bcd65Smrg ;; 55239e7bcd65Smrg xl* | bgxl* | bgf* | mpixl*) 55249e7bcd65Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 55259e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55269e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 55279e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 55289e7bcd65Smrg ;; 55299e7bcd65Smrg *) 55309e7bcd65Smrg case `$CC -V 2>&1 | sed 5q` in 55319e7bcd65Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 55329e7bcd65Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 55339e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55349e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55359e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 55369e7bcd65Smrg ;; 55379e7bcd65Smrg *Sun\ F* | *Sun*Fortran*) 55389e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55399e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55409e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 55419e7bcd65Smrg ;; 55429e7bcd65Smrg *Sun\ C*) 55439e7bcd65Smrg # Sun C 5.9 55449e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55459e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55469e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55479e7bcd65Smrg ;; 55489e7bcd65Smrg *Intel*\ [[CF]]*Compiler*) 55499e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55509e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 55519e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 55529e7bcd65Smrg ;; 55539e7bcd65Smrg *Portland\ Group*) 55549e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55559e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 55569e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55579e7bcd65Smrg ;; 55589e7bcd65Smrg esac 55599e7bcd65Smrg ;; 55609e7bcd65Smrg esac 55619e7bcd65Smrg ;; 55629e7bcd65Smrg 55639e7bcd65Smrg newsos6) 55649e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55659e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55669e7bcd65Smrg ;; 55679e7bcd65Smrg 55689e7bcd65Smrg *nto* | *qnx*) 55699e7bcd65Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 55709e7bcd65Smrg # it will coredump. 55719e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 55729e7bcd65Smrg ;; 55739e7bcd65Smrg 55749e7bcd65Smrg osf3* | osf4* | osf5*) 55759e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55769e7bcd65Smrg # All OSF/1 code is PIC. 55779e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55789e7bcd65Smrg ;; 55799e7bcd65Smrg 55809e7bcd65Smrg rdos*) 55819e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55829e7bcd65Smrg ;; 55839e7bcd65Smrg 55849e7bcd65Smrg solaris*) 55859e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55869e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55879e7bcd65Smrg case $cc_basename in 55889e7bcd65Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 55899e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 55909e7bcd65Smrg *) 55919e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 55929e7bcd65Smrg esac 55939e7bcd65Smrg ;; 55949e7bcd65Smrg 55959e7bcd65Smrg sunos4*) 55969e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 55979e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55989e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55999e7bcd65Smrg ;; 56009e7bcd65Smrg 56019e7bcd65Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 56029e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56039e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 56049e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56059e7bcd65Smrg ;; 56069e7bcd65Smrg 56079e7bcd65Smrg sysv4*MP*) 56089e7bcd65Smrg if test -d /usr/nec ;then 56099e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 56109e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56119e7bcd65Smrg fi 56129e7bcd65Smrg ;; 56139e7bcd65Smrg 56149e7bcd65Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 56159e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56169e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 56179e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56189e7bcd65Smrg ;; 56199e7bcd65Smrg 56209e7bcd65Smrg unicos*) 56219e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56229e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 56239e7bcd65Smrg ;; 56249e7bcd65Smrg 56259e7bcd65Smrg uts4*) 56269e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 56279e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56289e7bcd65Smrg ;; 56299e7bcd65Smrg 56309e7bcd65Smrg *) 56319e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 56329e7bcd65Smrg ;; 56339e7bcd65Smrg esac 56349e7bcd65Smrg fi 56359e7bcd65Smrg]) 56369e7bcd65Smrgcase $host_os in 56379e7bcd65Smrg # For platforms which do not support PIC, -DPIC is meaningless: 56389e7bcd65Smrg *djgpp*) 56399e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 56409e7bcd65Smrg ;; 56419e7bcd65Smrg *) 56429e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 56439e7bcd65Smrg ;; 56449e7bcd65Smrgesac 56459e7bcd65Smrg 56469e7bcd65SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 56479e7bcd65Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 56489e7bcd65Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 56499e7bcd65Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 56509e7bcd65Smrg 56519e7bcd65Smrg# 56529e7bcd65Smrg# Check to make sure the PIC flag actually works. 56539e7bcd65Smrg# 56549e7bcd65Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 56559e7bcd65Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 56569e7bcd65Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 56579e7bcd65Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 56589e7bcd65Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 56599e7bcd65Smrg "" | " "*) ;; 56609e7bcd65Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 56619e7bcd65Smrg esac], 56629e7bcd65Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 56639e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 56649e7bcd65Smrgfi 56659e7bcd65Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 56669e7bcd65Smrg [Additional compiler flags for building library objects]) 56679e7bcd65Smrg 56689e7bcd65Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 56699e7bcd65Smrg [How to pass a linker flag through the compiler]) 56709e7bcd65Smrg# 56719e7bcd65Smrg# Check to make sure the static flag actually works. 56729e7bcd65Smrg# 56739e7bcd65Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 56749e7bcd65Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 56759e7bcd65Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 56769e7bcd65Smrg $lt_tmp_static_flag, 56779e7bcd65Smrg [], 56789e7bcd65Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 56799e7bcd65Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 56809e7bcd65Smrg [Compiler flag to prevent dynamic linking]) 56819e7bcd65Smrg])# _LT_COMPILER_PIC 56829e7bcd65Smrg 56839e7bcd65Smrg 56849e7bcd65Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 56859e7bcd65Smrg# ---------------------------- 56869e7bcd65Smrg# See if the linker supports building shared libraries. 56879e7bcd65Smrgm4_defun([_LT_LINKER_SHLIBS], 56889e7bcd65Smrg[AC_REQUIRE([LT_PATH_LD])dnl 56899e7bcd65SmrgAC_REQUIRE([LT_PATH_NM])dnl 56909e7bcd65Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 56919e7bcd65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 56929e7bcd65Smrgm4_require([_LT_DECL_EGREP])dnl 56939e7bcd65Smrgm4_require([_LT_DECL_SED])dnl 56949e7bcd65Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 56959e7bcd65Smrgm4_require([_LT_TAG_COMPILER])dnl 56969e7bcd65SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 56979e7bcd65Smrgm4_if([$1], [CXX], [ 56989e7bcd65Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56999e7bcd65Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 57009e7bcd65Smrg case $host_os in 57019e7bcd65Smrg aix[[4-9]]*) 57029e7bcd65Smrg # If we're using GNU nm, then we don't want the "-C" option. 57039e7bcd65Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 57049e7bcd65Smrg # Also, AIX nm treats weak defined symbols like other global defined 57059e7bcd65Smrg # symbols, whereas GNU nm marks them as "W". 57069e7bcd65Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 57079e7bcd65Smrg _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' 57089e7bcd65Smrg else 57099e7bcd65Smrg _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' 57109e7bcd65Smrg fi 57119e7bcd65Smrg ;; 57129e7bcd65Smrg pw32*) 57139e7bcd65Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 57149e7bcd65Smrg ;; 57159e7bcd65Smrg cygwin* | mingw* | cegcc*) 57169e7bcd65Smrg case $cc_basename in 57179e7bcd65Smrg cl*) 57189e7bcd65Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 57199e7bcd65Smrg ;; 57209e7bcd65Smrg *) 57219e7bcd65Smrg _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' 57229e7bcd65Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 57239e7bcd65Smrg ;; 57249e7bcd65Smrg esac 57259e7bcd65Smrg ;; 57269e7bcd65Smrg *) 57279e7bcd65Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 57289e7bcd65Smrg ;; 57299e7bcd65Smrg esac 57309e7bcd65Smrg], [ 57319e7bcd65Smrg runpath_var= 57329e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 57339e7bcd65Smrg _LT_TAGVAR(always_export_symbols, $1)=no 57349e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)= 57359e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 57369e7bcd65Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 57379e7bcd65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 57389e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 57399e7bcd65Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 57409e7bcd65Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 57419e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57429e7bcd65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 57439e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 57449e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 57459e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 57469e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 57479e7bcd65Smrg _LT_TAGVAR(inherit_rpath, $1)=no 57489e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 57499e7bcd65Smrg _LT_TAGVAR(module_cmds, $1)= 57509e7bcd65Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 57519e7bcd65Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 57529e7bcd65Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 57539e7bcd65Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 57549e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57559e7bcd65Smrg # include_expsyms should be a list of space-separated symbols to be *always* 57569e7bcd65Smrg # included in the symbol list 57579e7bcd65Smrg _LT_TAGVAR(include_expsyms, $1)= 57589e7bcd65Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 57599e7bcd65Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 57609e7bcd65Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 57619e7bcd65Smrg # as well as any symbol that contains `d'. 57629e7bcd65Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 57639e7bcd65Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 57649e7bcd65Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 57659e7bcd65Smrg # the symbol is explicitly referenced. Since portable code cannot 57669e7bcd65Smrg # rely on this symbol name, it's probably fine to never include it in 57679e7bcd65Smrg # preloaded symbol tables. 57689e7bcd65Smrg # Exclude shared library initialization/finalization symbols. 57699e7bcd65Smrgdnl Note also adjust exclude_expsyms for C++ above. 57709e7bcd65Smrg extract_expsyms_cmds= 57719e7bcd65Smrg 57729e7bcd65Smrg case $host_os in 57739e7bcd65Smrg cygwin* | mingw* | pw32* | cegcc*) 57749e7bcd65Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 57759e7bcd65Smrg # When not using gcc, we currently assume that we are using 57769e7bcd65Smrg # Microsoft Visual C++. 57779e7bcd65Smrg if test "$GCC" != yes; then 57789e7bcd65Smrg with_gnu_ld=no 57799e7bcd65Smrg fi 57809e7bcd65Smrg ;; 57819e7bcd65Smrg interix*) 57829e7bcd65Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 57839e7bcd65Smrg with_gnu_ld=yes 57849e7bcd65Smrg ;; 57859e7bcd65Smrg openbsd*) 57869e7bcd65Smrg with_gnu_ld=no 57879e7bcd65Smrg ;; 57889e7bcd65Smrg esac 57899e7bcd65Smrg 57909e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 57919e7bcd65Smrg 57929e7bcd65Smrg # On some targets, GNU ld is compatible enough with the native linker 57939e7bcd65Smrg # that we're better off using the native interface for both. 57949e7bcd65Smrg lt_use_gnu_ld_interface=no 57959e7bcd65Smrg if test "$with_gnu_ld" = yes; then 57969e7bcd65Smrg case $host_os in 57979e7bcd65Smrg aix*) 57989e7bcd65Smrg # The AIX port of GNU ld has always aspired to compatibility 57999e7bcd65Smrg # with the native linker. However, as the warning in the GNU ld 58009e7bcd65Smrg # block says, versions before 2.19.5* couldn't really create working 58019e7bcd65Smrg # shared libraries, regardless of the interface used. 58029e7bcd65Smrg case `$LD -v 2>&1` in 58039e7bcd65Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 58049e7bcd65Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 58059e7bcd65Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 58069e7bcd65Smrg *) 58079e7bcd65Smrg lt_use_gnu_ld_interface=yes 58089e7bcd65Smrg ;; 58099e7bcd65Smrg esac 58109e7bcd65Smrg ;; 58119e7bcd65Smrg *) 58129e7bcd65Smrg lt_use_gnu_ld_interface=yes 58139e7bcd65Smrg ;; 58149e7bcd65Smrg esac 58159e7bcd65Smrg fi 58169e7bcd65Smrg 58179e7bcd65Smrg if test "$lt_use_gnu_ld_interface" = yes; then 58189e7bcd65Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 58199e7bcd65Smrg wlarc='${wl}' 58209e7bcd65Smrg 58219e7bcd65Smrg # Set some defaults for GNU ld with shared library support. These 58229e7bcd65Smrg # are reset later if shared libraries are not supported. Putting them 58239e7bcd65Smrg # here allows them to be overridden if necessary. 58249e7bcd65Smrg runpath_var=LD_RUN_PATH 58259e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58269e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 58279e7bcd65Smrg # ancient GNU ld didn't support --whole-archive et. al. 58289e7bcd65Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 58299e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 58309e7bcd65Smrg else 58319e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 58329e7bcd65Smrg fi 58339e7bcd65Smrg supports_anon_versioning=no 58349e7bcd65Smrg case `$LD -v 2>&1` in 58359e7bcd65Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 58369e7bcd65Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 58379e7bcd65Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 58389e7bcd65Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 58399e7bcd65Smrg *\ 2.11.*) ;; # other 2.11 versions 58409e7bcd65Smrg *) supports_anon_versioning=yes ;; 58419e7bcd65Smrg esac 58429e7bcd65Smrg 58439e7bcd65Smrg # See if GNU ld supports shared libraries. 58449e7bcd65Smrg case $host_os in 58459e7bcd65Smrg aix[[3-9]]*) 58469e7bcd65Smrg # On AIX/PPC, the GNU linker is very broken 58479e7bcd65Smrg if test "$host_cpu" != ia64; then 58489e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58499e7bcd65Smrg cat <<_LT_EOF 1>&2 58509e7bcd65Smrg 58519e7bcd65Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 58529e7bcd65Smrg*** to be unable to reliably create shared libraries on AIX. 58539e7bcd65Smrg*** Therefore, libtool is disabling shared libraries support. If you 58549e7bcd65Smrg*** really care for shared libraries, you may want to install binutils 58559e7bcd65Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 58569e7bcd65Smrg*** You will then need to restart the configuration process. 58579e7bcd65Smrg 58589e7bcd65Smrg_LT_EOF 58599e7bcd65Smrg fi 58609e7bcd65Smrg ;; 58619e7bcd65Smrg 58629e7bcd65Smrg amigaos*) 58639e7bcd65Smrg case $host_cpu in 58649e7bcd65Smrg powerpc) 58659e7bcd65Smrg # see comment about AmigaOS4 .so support 58669e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58679e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 58689e7bcd65Smrg ;; 58699e7bcd65Smrg m68k) 58709e7bcd65Smrg _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)' 58719e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58729e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58739e7bcd65Smrg ;; 58749e7bcd65Smrg esac 58759e7bcd65Smrg ;; 58769e7bcd65Smrg 58779e7bcd65Smrg beos*) 58789e7bcd65Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 58799e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58809e7bcd65Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 58819e7bcd65Smrg # support --undefined. This deserves some investigation. FIXME 58829e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58839e7bcd65Smrg else 58849e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58859e7bcd65Smrg fi 58869e7bcd65Smrg ;; 58879e7bcd65Smrg 58889e7bcd65Smrg cygwin* | mingw* | pw32* | cegcc*) 58899e7bcd65Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 58909e7bcd65Smrg # as there is no search path for DLLs. 58919e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58929e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 58939e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58949e7bcd65Smrg _LT_TAGVAR(always_export_symbols, $1)=no 58959e7bcd65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58969e7bcd65Smrg _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' 58979e7bcd65Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 58989e7bcd65Smrg 58999e7bcd65Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 59009e7bcd65Smrg _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' 59019e7bcd65Smrg # If the export-symbols file already is a .def file (1st line 59029e7bcd65Smrg # is EXPORTS), use it as is; otherwise, prepend... 59039e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 59049e7bcd65Smrg cp $export_symbols $output_objdir/$soname.def; 59059e7bcd65Smrg else 59069e7bcd65Smrg echo EXPORTS > $output_objdir/$soname.def; 59079e7bcd65Smrg cat $export_symbols >> $output_objdir/$soname.def; 59089e7bcd65Smrg fi~ 59099e7bcd65Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 59109e7bcd65Smrg else 59119e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59129e7bcd65Smrg fi 59139e7bcd65Smrg ;; 59149e7bcd65Smrg 59159e7bcd65Smrg haiku*) 59169e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59179e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59189e7bcd65Smrg ;; 59199e7bcd65Smrg 59209e7bcd65Smrg interix[[3-9]]*) 59219e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 59229e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59239e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 59249e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 59259e7bcd65Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 59269e7bcd65Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 59279e7bcd65Smrg # default) and relocated if they conflict, which is a slow very memory 59289e7bcd65Smrg # consuming and fragmenting process. To avoid this, we pick a random, 59299e7bcd65Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 59309e7bcd65Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 59319e7bcd65Smrg _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' 59329e7bcd65Smrg _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' 59339e7bcd65Smrg ;; 59349e7bcd65Smrg 59359e7bcd65Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 59369e7bcd65Smrg tmp_diet=no 59379e7bcd65Smrg if test "$host_os" = linux-dietlibc; then 59389e7bcd65Smrg case $cc_basename in 59399e7bcd65Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 59409e7bcd65Smrg esac 59419e7bcd65Smrg fi 59429e7bcd65Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 59439e7bcd65Smrg && test "$tmp_diet" = no 59449e7bcd65Smrg then 59459e7bcd65Smrg tmp_addflag=' $pic_flag' 59469e7bcd65Smrg tmp_sharedflag='-shared' 59479e7bcd65Smrg case $cc_basename,$host_cpu in 59489e7bcd65Smrg pgcc*) # Portland Group C compiler 59499e7bcd65Smrg _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' 59509e7bcd65Smrg tmp_addflag=' $pic_flag' 59519e7bcd65Smrg ;; 59529e7bcd65Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 59539e7bcd65Smrg # Portland Group f77 and f90 compilers 59549e7bcd65Smrg _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' 59559e7bcd65Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 59569e7bcd65Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 59579e7bcd65Smrg tmp_addflag=' -i_dynamic' ;; 59589e7bcd65Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 59599e7bcd65Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 59609e7bcd65Smrg ifc* | ifort*) # Intel Fortran compiler 59619e7bcd65Smrg tmp_addflag=' -nofor_main' ;; 59629e7bcd65Smrg lf95*) # Lahey Fortran 8.1 59639e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59649e7bcd65Smrg tmp_sharedflag='--shared' ;; 59659e7bcd65Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 59669e7bcd65Smrg tmp_sharedflag='-qmkshrobj' 59679e7bcd65Smrg tmp_addflag= ;; 59689e7bcd65Smrg nvcc*) # Cuda Compiler Driver 2.2 59699e7bcd65Smrg _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' 59709e7bcd65Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59719e7bcd65Smrg ;; 59729e7bcd65Smrg esac 59739e7bcd65Smrg case `$CC -V 2>&1 | sed 5q` in 59749e7bcd65Smrg *Sun\ C*) # Sun C 5.9 59759e7bcd65Smrg _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' 59769e7bcd65Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59779e7bcd65Smrg tmp_sharedflag='-G' ;; 59789e7bcd65Smrg *Sun\ F*) # Sun Fortran 8.3 59799e7bcd65Smrg tmp_sharedflag='-G' ;; 59809e7bcd65Smrg esac 59819e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59829e7bcd65Smrg 59839e7bcd65Smrg if test "x$supports_anon_versioning" = xyes; then 59849e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59859e7bcd65Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59869e7bcd65Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59879e7bcd65Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59889e7bcd65Smrg fi 59899e7bcd65Smrg 59909e7bcd65Smrg case $cc_basename in 59919e7bcd65Smrg xlf* | bgf* | bgxlf* | mpixlf*) 59929e7bcd65Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 59939e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 59949e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59959e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 59969e7bcd65Smrg if test "x$supports_anon_versioning" = xyes; then 59979e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59989e7bcd65Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59999e7bcd65Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 60009e7bcd65Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 60019e7bcd65Smrg fi 60029e7bcd65Smrg ;; 60039e7bcd65Smrg esac 60049e7bcd65Smrg else 60059e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60069e7bcd65Smrg fi 60079e7bcd65Smrg ;; 60089e7bcd65Smrg 60099e7bcd65Smrg netbsd*) 60109e7bcd65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 60119e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 60129e7bcd65Smrg wlarc= 60139e7bcd65Smrg else 60149e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60159e7bcd65Smrg _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' 60169e7bcd65Smrg fi 60179e7bcd65Smrg ;; 60189e7bcd65Smrg 60199e7bcd65Smrg solaris*) 60209e7bcd65Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 60219e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60229e7bcd65Smrg cat <<_LT_EOF 1>&2 60239e7bcd65Smrg 60249e7bcd65Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 60259e7bcd65Smrg*** create shared libraries on Solaris systems. Therefore, libtool 60269e7bcd65Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 60279e7bcd65Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 60289e7bcd65Smrg*** your PATH or compiler configuration so that the native linker is 60299e7bcd65Smrg*** used, and then restart. 60309e7bcd65Smrg 60319e7bcd65Smrg_LT_EOF 60329e7bcd65Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60339e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60349e7bcd65Smrg _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' 60359e7bcd65Smrg else 60369e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60379e7bcd65Smrg fi 60389e7bcd65Smrg ;; 60399e7bcd65Smrg 60409e7bcd65Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 60419e7bcd65Smrg case `$LD -v 2>&1` in 60429e7bcd65Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 60439e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60449e7bcd65Smrg cat <<_LT_EOF 1>&2 60459e7bcd65Smrg 60469e7bcd65Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 60479e7bcd65Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 60489e7bcd65Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 60499e7bcd65Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 60509e7bcd65Smrg*** your PATH or compiler configuration so that the native linker is 60519e7bcd65Smrg*** used, and then restart. 60529e7bcd65Smrg 60539e7bcd65Smrg_LT_EOF 60549e7bcd65Smrg ;; 60559e7bcd65Smrg *) 60569e7bcd65Smrg # For security reasons, it is highly recommended that you always 60579e7bcd65Smrg # use absolute paths for naming shared libraries, and exclude the 60589e7bcd65Smrg # DT_RUNPATH tag from executables and libraries. But doing so 60599e7bcd65Smrg # requires that you compile everything twice, which is a pain. 60609e7bcd65Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60619e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 60629e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60639e7bcd65Smrg _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' 60649e7bcd65Smrg else 60659e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60669e7bcd65Smrg fi 60679e7bcd65Smrg ;; 60689e7bcd65Smrg esac 60699e7bcd65Smrg ;; 60709e7bcd65Smrg 60719e7bcd65Smrg sunos4*) 60729e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 60739e7bcd65Smrg wlarc= 60749e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60759e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60769e7bcd65Smrg ;; 60779e7bcd65Smrg 60789e7bcd65Smrg *) 60799e7bcd65Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60809e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60819e7bcd65Smrg _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' 60829e7bcd65Smrg else 60839e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60849e7bcd65Smrg fi 60859e7bcd65Smrg ;; 60869e7bcd65Smrg esac 60879e7bcd65Smrg 60889e7bcd65Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 60899e7bcd65Smrg runpath_var= 60909e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 60919e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 60929e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 60939e7bcd65Smrg fi 60949e7bcd65Smrg else 60959e7bcd65Smrg # PORTME fill in a description of your system's linker (not GNU ld) 60969e7bcd65Smrg case $host_os in 60979e7bcd65Smrg aix3*) 60989e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 60999e7bcd65Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 61009e7bcd65Smrg _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' 61019e7bcd65Smrg # Note: this linker hardcodes the directories in LIBPATH if there 61029e7bcd65Smrg # are no directories specified by -L. 61039e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61049e7bcd65Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 61059e7bcd65Smrg # Neither direct hardcoding nor static linking is supported with a 61069e7bcd65Smrg # broken collect2. 61079e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61089e7bcd65Smrg fi 61099e7bcd65Smrg ;; 61109e7bcd65Smrg 61119e7bcd65Smrg aix[[4-9]]*) 61129e7bcd65Smrg if test "$host_cpu" = ia64; then 61139e7bcd65Smrg # On IA64, the linker does run time linking by default, so we don't 61149e7bcd65Smrg # have to do anything special. 61159e7bcd65Smrg aix_use_runtimelinking=no 61169e7bcd65Smrg exp_sym_flag='-Bexport' 61179e7bcd65Smrg no_entry_flag="" 61189e7bcd65Smrg else 61199e7bcd65Smrg # If we're using GNU nm, then we don't want the "-C" option. 61209e7bcd65Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 61219e7bcd65Smrg # Also, AIX nm treats weak defined symbols like other global 61229e7bcd65Smrg # defined symbols, whereas GNU nm marks them as "W". 61239e7bcd65Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 61249e7bcd65Smrg _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' 61259e7bcd65Smrg else 61269e7bcd65Smrg _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' 61279e7bcd65Smrg fi 61289e7bcd65Smrg aix_use_runtimelinking=no 61299e7bcd65Smrg 61309e7bcd65Smrg # Test if we are trying to use run time linking or normal 61319e7bcd65Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 61329e7bcd65Smrg # need to do runtime linking. 61339e7bcd65Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 61349e7bcd65Smrg for ld_flag in $LDFLAGS; do 61359e7bcd65Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 61369e7bcd65Smrg aix_use_runtimelinking=yes 61379e7bcd65Smrg break 61389e7bcd65Smrg fi 61399e7bcd65Smrg done 61409e7bcd65Smrg ;; 61419e7bcd65Smrg esac 61429e7bcd65Smrg 61439e7bcd65Smrg exp_sym_flag='-bexport' 61449e7bcd65Smrg no_entry_flag='-bnoentry' 61459e7bcd65Smrg fi 61469e7bcd65Smrg 61479e7bcd65Smrg # When large executables or shared objects are built, AIX ld can 61489e7bcd65Smrg # have problems creating the table of contents. If linking a library 61499e7bcd65Smrg # or program results in "error TOC overflow" add -mminimal-toc to 61509e7bcd65Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 61519e7bcd65Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 61529e7bcd65Smrg 61539e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='' 61549e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 61559e7bcd65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 61569e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 61579e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 61589e7bcd65Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 61599e7bcd65Smrg 61609e7bcd65Smrg if test "$GCC" = yes; then 61619e7bcd65Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 61629e7bcd65Smrg # We only want to do this on AIX 4.2 and lower, the check 61639e7bcd65Smrg # below for broken collect2 doesn't work under 4.3+ 61649e7bcd65Smrg collect2name=`${CC} -print-prog-name=collect2` 61659e7bcd65Smrg if test -f "$collect2name" && 61669e7bcd65Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 61679e7bcd65Smrg then 61689e7bcd65Smrg # We have reworked collect2 61699e7bcd65Smrg : 61709e7bcd65Smrg else 61719e7bcd65Smrg # We have old collect2 61729e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61739e7bcd65Smrg # It fails to find uninstalled libraries when the uninstalled 61749e7bcd65Smrg # path is not listed in the libpath. Setting hardcode_minus_L 61759e7bcd65Smrg # to unsupported forces relinking 61769e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61779e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61789e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 61799e7bcd65Smrg fi 61809e7bcd65Smrg ;; 61819e7bcd65Smrg esac 61829e7bcd65Smrg shared_flag='-shared' 61839e7bcd65Smrg if test "$aix_use_runtimelinking" = yes; then 61849e7bcd65Smrg shared_flag="$shared_flag "'${wl}-G' 61859e7bcd65Smrg fi 61869e7bcd65Smrg else 61879e7bcd65Smrg # not using gcc 61889e7bcd65Smrg if test "$host_cpu" = ia64; then 61899e7bcd65Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 61909e7bcd65Smrg # chokes on -Wl,-G. The following line is correct: 61919e7bcd65Smrg shared_flag='-G' 61929e7bcd65Smrg else 61939e7bcd65Smrg if test "$aix_use_runtimelinking" = yes; then 61949e7bcd65Smrg shared_flag='${wl}-G' 61959e7bcd65Smrg else 61969e7bcd65Smrg shared_flag='${wl}-bM:SRE' 61979e7bcd65Smrg fi 61989e7bcd65Smrg fi 61999e7bcd65Smrg fi 62009e7bcd65Smrg 62019e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 62029e7bcd65Smrg # It seems that -bexpall does not export symbols beginning with 62039e7bcd65Smrg # underscore (_), so it is better to generate a list of symbols to export. 62049e7bcd65Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 62059e7bcd65Smrg if test "$aix_use_runtimelinking" = yes; then 62069e7bcd65Smrg # Warning - without using the other runtime loading flags (-brtl), 62079e7bcd65Smrg # -berok will link without error, but may produce a broken library. 62089e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 62099e7bcd65Smrg # Determine the default libpath from the value encoded in an 62109e7bcd65Smrg # empty executable. 62119e7bcd65Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 62129e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 62139e7bcd65Smrg _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" 62149e7bcd65Smrg else 62159e7bcd65Smrg if test "$host_cpu" = ia64; then 62169e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 62179e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 62189e7bcd65Smrg _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" 62199e7bcd65Smrg else 62209e7bcd65Smrg # Determine the default libpath from the value encoded in an 62219e7bcd65Smrg # empty executable. 62229e7bcd65Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 62239e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 62249e7bcd65Smrg # Warning - without using the other run time loading flags, 62259e7bcd65Smrg # -berok will link without error, but may produce a broken library. 62269e7bcd65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 62279e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 62289e7bcd65Smrg if test "$with_gnu_ld" = yes; then 62299e7bcd65Smrg # We only use this code for GNU lds that support --whole-archive. 62309e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 62319e7bcd65Smrg else 62329e7bcd65Smrg # Exported symbols can be pulled into shared objects from archives 62339e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 62349e7bcd65Smrg fi 62359e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 62369e7bcd65Smrg # This is similar to how AIX traditionally builds its shared libraries. 62379e7bcd65Smrg _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' 62389e7bcd65Smrg fi 62399e7bcd65Smrg fi 62409e7bcd65Smrg ;; 62419e7bcd65Smrg 62429e7bcd65Smrg amigaos*) 62439e7bcd65Smrg case $host_cpu in 62449e7bcd65Smrg powerpc) 62459e7bcd65Smrg # see comment about AmigaOS4 .so support 62469e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 62479e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 62489e7bcd65Smrg ;; 62499e7bcd65Smrg m68k) 62509e7bcd65Smrg _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)' 62519e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62529e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62539e7bcd65Smrg ;; 62549e7bcd65Smrg esac 62559e7bcd65Smrg ;; 62569e7bcd65Smrg 62579e7bcd65Smrg bsdi[[45]]*) 62589e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 62599e7bcd65Smrg ;; 62609e7bcd65Smrg 62619e7bcd65Smrg cygwin* | mingw* | pw32* | cegcc*) 62629e7bcd65Smrg # When not using gcc, we currently assume that we are using 62639e7bcd65Smrg # Microsoft Visual C++. 62649e7bcd65Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 62659e7bcd65Smrg # no search path for DLLs. 62669e7bcd65Smrg case $cc_basename in 62679e7bcd65Smrg cl*) 62689e7bcd65Smrg # Native MSVC 62699e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 62709e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 62719e7bcd65Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 62729e7bcd65Smrg _LT_TAGVAR(file_list_spec, $1)='@' 62739e7bcd65Smrg # Tell ltmain to make .lib files, not .a files. 62749e7bcd65Smrg libext=lib 62759e7bcd65Smrg # Tell ltmain to make .dll files, not .so files. 62769e7bcd65Smrg shrext_cmds=".dll" 62779e7bcd65Smrg # FIXME: Setting linknames here is a bad hack. 62789e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 62799e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 62809e7bcd65Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 62819e7bcd65Smrg else 62829e7bcd65Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 62839e7bcd65Smrg fi~ 62849e7bcd65Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 62859e7bcd65Smrg linknames=' 62869e7bcd65Smrg # The linker will not automatically build a static lib if we build a DLL. 62879e7bcd65Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62889e7bcd65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 62899e7bcd65Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 62909e7bcd65Smrg _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' 62919e7bcd65Smrg # Don't use ranlib 62929e7bcd65Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 62939e7bcd65Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 62949e7bcd65Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 62959e7bcd65Smrg case $lt_outputfile in 62969e7bcd65Smrg *.exe|*.EXE) ;; 62979e7bcd65Smrg *) 62989e7bcd65Smrg lt_outputfile="$lt_outputfile.exe" 62999e7bcd65Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 63009e7bcd65Smrg ;; 63019e7bcd65Smrg esac~ 63029e7bcd65Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 63039e7bcd65Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 63049e7bcd65Smrg $RM "$lt_outputfile.manifest"; 63059e7bcd65Smrg fi' 63069e7bcd65Smrg ;; 63079e7bcd65Smrg *) 63089e7bcd65Smrg # Assume MSVC wrapper 63099e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 63109e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 63119e7bcd65Smrg # Tell ltmain to make .lib files, not .a files. 63129e7bcd65Smrg libext=lib 63139e7bcd65Smrg # Tell ltmain to make .dll files, not .so files. 63149e7bcd65Smrg shrext_cmds=".dll" 63159e7bcd65Smrg # FIXME: Setting linknames here is a bad hack. 63169e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 63179e7bcd65Smrg # The linker will automatically build a .lib file if we build a DLL. 63189e7bcd65Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 63199e7bcd65Smrg # FIXME: Should let the user specify the lib program. 63209e7bcd65Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 63219e7bcd65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 63229e7bcd65Smrg ;; 63239e7bcd65Smrg esac 63249e7bcd65Smrg ;; 63259e7bcd65Smrg 63269e7bcd65Smrg darwin* | rhapsody*) 63279e7bcd65Smrg _LT_DARWIN_LINKER_FEATURES($1) 63289e7bcd65Smrg ;; 63299e7bcd65Smrg 63309e7bcd65Smrg dgux*) 63319e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63329e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 63339e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63349e7bcd65Smrg ;; 63359e7bcd65Smrg 63369e7bcd65Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 63379e7bcd65Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 63389e7bcd65Smrg # does not break anything, and helps significantly (at the cost of a little 63399e7bcd65Smrg # extra space). 63409e7bcd65Smrg freebsd2.2*) 63419e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 63429e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63439e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63449e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63459e7bcd65Smrg ;; 63469e7bcd65Smrg 63479e7bcd65Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 63489e7bcd65Smrg freebsd2.*) 63499e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 63509e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63519e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63529e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63539e7bcd65Smrg ;; 63549e7bcd65Smrg 63559e7bcd65Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 63569e7bcd65Smrg freebsd* | dragonfly*) 63579e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 63589e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63599e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63609e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63619e7bcd65Smrg ;; 63629e7bcd65Smrg 63639e7bcd65Smrg hpux9*) 63649e7bcd65Smrg if test "$GCC" = yes; then 63659e7bcd65Smrg _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' 63669e7bcd65Smrg else 63679e7bcd65Smrg _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' 63689e7bcd65Smrg fi 63699e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63709e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63719e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63729e7bcd65Smrg 63739e7bcd65Smrg # hardcode_minus_L: Not really in the search PATH, 63749e7bcd65Smrg # but as the default location of the library. 63759e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63769e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63779e7bcd65Smrg ;; 63789e7bcd65Smrg 63799e7bcd65Smrg hpux10*) 63809e7bcd65Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63819e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 63829e7bcd65Smrg else 63839e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 63849e7bcd65Smrg fi 63859e7bcd65Smrg if test "$with_gnu_ld" = no; then 63869e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63879e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63889e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63899e7bcd65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63909e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63919e7bcd65Smrg # hardcode_minus_L: Not really in the search PATH, 63929e7bcd65Smrg # but as the default location of the library. 63939e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63949e7bcd65Smrg fi 63959e7bcd65Smrg ;; 63969e7bcd65Smrg 63979e7bcd65Smrg hpux11*) 63989e7bcd65Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63999e7bcd65Smrg case $host_cpu in 64009e7bcd65Smrg hppa*64*) 64019e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64029e7bcd65Smrg ;; 64039e7bcd65Smrg ia64*) 64049e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64059e7bcd65Smrg ;; 64069e7bcd65Smrg *) 64079e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 64089e7bcd65Smrg ;; 64099e7bcd65Smrg esac 64109e7bcd65Smrg else 64119e7bcd65Smrg case $host_cpu in 64129e7bcd65Smrg hppa*64*) 64139e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64149e7bcd65Smrg ;; 64159e7bcd65Smrg ia64*) 64169e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64179e7bcd65Smrg ;; 64189e7bcd65Smrg *) 64199e7bcd65Smrg m4_if($1, [], [ 64209e7bcd65Smrg # Older versions of the 11.00 compiler do not understand -b yet 64219e7bcd65Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 64229e7bcd65Smrg _LT_LINKER_OPTION([if $CC understands -b], 64239e7bcd65Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 64249e7bcd65Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 64259e7bcd65Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 64269e7bcd65Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 64279e7bcd65Smrg ;; 64289e7bcd65Smrg esac 64299e7bcd65Smrg fi 64309e7bcd65Smrg if test "$with_gnu_ld" = no; then 64319e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 64329e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64339e7bcd65Smrg 64349e7bcd65Smrg case $host_cpu in 64359e7bcd65Smrg hppa*64*|ia64*) 64369e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 64379e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64389e7bcd65Smrg ;; 64399e7bcd65Smrg *) 64409e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64419e7bcd65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64429e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 64439e7bcd65Smrg 64449e7bcd65Smrg # hardcode_minus_L: Not really in the search PATH, 64459e7bcd65Smrg # but as the default location of the library. 64469e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64479e7bcd65Smrg ;; 64489e7bcd65Smrg esac 64499e7bcd65Smrg fi 64509e7bcd65Smrg ;; 64519e7bcd65Smrg 64529e7bcd65Smrg irix5* | irix6* | nonstopux*) 64539e7bcd65Smrg if test "$GCC" = yes; then 64549e7bcd65Smrg _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' 64559e7bcd65Smrg # Try to use the -exported_symbol ld option, if it does not 64569e7bcd65Smrg # work, assume that -exports_file does not work either and 64579e7bcd65Smrg # implicitly export all symbols. 64589e7bcd65Smrg # This should be the same for all languages, so no per-tag cache variable. 64599e7bcd65Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 64609e7bcd65Smrg [lt_cv_irix_exported_symbol], 64619e7bcd65Smrg [save_LDFLAGS="$LDFLAGS" 64629e7bcd65Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 64639e7bcd65Smrg AC_LINK_IFELSE( 64649e7bcd65Smrg [AC_LANG_SOURCE( 64659e7bcd65Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 64669e7bcd65Smrg [C++], [[int foo (void) { return 0; }]], 64679e7bcd65Smrg [Fortran 77], [[ 64689e7bcd65Smrg subroutine foo 64699e7bcd65Smrg end]], 64709e7bcd65Smrg [Fortran], [[ 64719e7bcd65Smrg subroutine foo 64729e7bcd65Smrg end]])])], 64739e7bcd65Smrg [lt_cv_irix_exported_symbol=yes], 64749e7bcd65Smrg [lt_cv_irix_exported_symbol=no]) 64759e7bcd65Smrg LDFLAGS="$save_LDFLAGS"]) 64769e7bcd65Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 64779e7bcd65Smrg _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' 64789e7bcd65Smrg fi 64799e7bcd65Smrg else 64809e7bcd65Smrg _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' 64819e7bcd65Smrg _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' 64829e7bcd65Smrg fi 64839e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64849e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64859e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64869e7bcd65Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64879e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64889e7bcd65Smrg ;; 64899e7bcd65Smrg 64909e7bcd65Smrg netbsd*) 64919e7bcd65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 64929e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 64939e7bcd65Smrg else 64949e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 64959e7bcd65Smrg fi 64969e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64979e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64989e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64999e7bcd65Smrg ;; 65009e7bcd65Smrg 65019e7bcd65Smrg newsos6) 65029e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65039e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65049e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65059e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65069e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65079e7bcd65Smrg ;; 65089e7bcd65Smrg 65099e7bcd65Smrg *nto* | *qnx*) 65109e7bcd65Smrg ;; 65119e7bcd65Smrg 65129e7bcd65Smrg openbsd*) 65139e7bcd65Smrg if test -f /usr/libexec/ld.so; then 65149e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65159e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65169e7bcd65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65179e7bcd65Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 65189e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65199e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 65209e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65219e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 65229e7bcd65Smrg else 65239e7bcd65Smrg case $host_os in 65249e7bcd65Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 65259e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 65269e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65279e7bcd65Smrg ;; 65289e7bcd65Smrg *) 65299e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65309e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65319e7bcd65Smrg ;; 65329e7bcd65Smrg esac 65339e7bcd65Smrg fi 65349e7bcd65Smrg else 65359e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65369e7bcd65Smrg fi 65379e7bcd65Smrg ;; 65389e7bcd65Smrg 65399e7bcd65Smrg os2*) 65409e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65419e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65429e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 65439e7bcd65Smrg _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' 65449e7bcd65Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 65459e7bcd65Smrg ;; 65469e7bcd65Smrg 65479e7bcd65Smrg osf3*) 65489e7bcd65Smrg if test "$GCC" = yes; then 65499e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65509e7bcd65Smrg _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' 65519e7bcd65Smrg else 65529e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65539e7bcd65Smrg _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' 65549e7bcd65Smrg fi 65559e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65569e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65579e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65589e7bcd65Smrg ;; 65599e7bcd65Smrg 65609e7bcd65Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 65619e7bcd65Smrg if test "$GCC" = yes; then 65629e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65639e7bcd65Smrg _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' 65649e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65659e7bcd65Smrg else 65669e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65679e7bcd65Smrg _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' 65689e7bcd65Smrg _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~ 65699e7bcd65Smrg $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' 65709e7bcd65Smrg 65719e7bcd65Smrg # Both c and cxx compiler support -rpath directly 65729e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65739e7bcd65Smrg fi 65749e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65759e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65769e7bcd65Smrg ;; 65779e7bcd65Smrg 65789e7bcd65Smrg solaris*) 65799e7bcd65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 65809e7bcd65Smrg if test "$GCC" = yes; then 65819e7bcd65Smrg wlarc='${wl}' 65829e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 65839e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65849e7bcd65Smrg $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' 65859e7bcd65Smrg else 65869e7bcd65Smrg case `$CC -V 2>&1` in 65879e7bcd65Smrg *"Compilers 5.0"*) 65889e7bcd65Smrg wlarc='' 65899e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 65909e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65919e7bcd65Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 65929e7bcd65Smrg ;; 65939e7bcd65Smrg *) 65949e7bcd65Smrg wlarc='${wl}' 65959e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 65969e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65979e7bcd65Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 65989e7bcd65Smrg ;; 65999e7bcd65Smrg esac 66009e7bcd65Smrg fi 66019e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 66029e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66039e7bcd65Smrg case $host_os in 66049e7bcd65Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 66059e7bcd65Smrg *) 66069e7bcd65Smrg # The compiler driver will combine and reorder linker options, 66079e7bcd65Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 66089e7bcd65Smrg # but is careful enough not to reorder. 66099e7bcd65Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 66109e7bcd65Smrg if test "$GCC" = yes; then 66119e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 66129e7bcd65Smrg else 66139e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 66149e7bcd65Smrg fi 66159e7bcd65Smrg ;; 66169e7bcd65Smrg esac 66179e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66189e7bcd65Smrg ;; 66199e7bcd65Smrg 66209e7bcd65Smrg sunos4*) 66219e7bcd65Smrg if test "x$host_vendor" = xsequent; then 66229e7bcd65Smrg # Use $CC to link under sequent, because it throws in some extra .o 66239e7bcd65Smrg # files that make .init and .fini sections work. 66249e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 66259e7bcd65Smrg else 66269e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 66279e7bcd65Smrg fi 66289e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66299e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 66309e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 66319e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66329e7bcd65Smrg ;; 66339e7bcd65Smrg 66349e7bcd65Smrg sysv4) 66359e7bcd65Smrg case $host_vendor in 66369e7bcd65Smrg sni) 66379e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66389e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 66399e7bcd65Smrg ;; 66409e7bcd65Smrg siemens) 66419e7bcd65Smrg ## LD is ld it makes a PLAMLIB 66429e7bcd65Smrg ## CC just makes a GrossModule. 66439e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 66449e7bcd65Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 66459e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 66469e7bcd65Smrg ;; 66479e7bcd65Smrg motorola) 66489e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66499e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 66509e7bcd65Smrg ;; 66519e7bcd65Smrg esac 66529e7bcd65Smrg runpath_var='LD_RUN_PATH' 66539e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66549e7bcd65Smrg ;; 66559e7bcd65Smrg 66569e7bcd65Smrg sysv4.3*) 66579e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66589e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66599e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 66609e7bcd65Smrg ;; 66619e7bcd65Smrg 66629e7bcd65Smrg sysv4*MP*) 66639e7bcd65Smrg if test -d /usr/nec; then 66649e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66659e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66669e7bcd65Smrg runpath_var=LD_RUN_PATH 66679e7bcd65Smrg hardcode_runpath_var=yes 66689e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 66699e7bcd65Smrg fi 66709e7bcd65Smrg ;; 66719e7bcd65Smrg 66729e7bcd65Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 66739e7bcd65Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66749e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66759e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66769e7bcd65Smrg runpath_var='LD_RUN_PATH' 66779e7bcd65Smrg 66789e7bcd65Smrg if test "$GCC" = yes; then 66799e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66809e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66819e7bcd65Smrg else 66829e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66839e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66849e7bcd65Smrg fi 66859e7bcd65Smrg ;; 66869e7bcd65Smrg 66879e7bcd65Smrg sysv5* | sco3.2v5* | sco5v6*) 66889e7bcd65Smrg # Note: We can NOT use -z defs as we might desire, because we do not 66899e7bcd65Smrg # link with -lc, and that would cause any symbols used from libc to 66909e7bcd65Smrg # always be unresolved, which means just about no library would 66919e7bcd65Smrg # ever link correctly. If we're not using GNU ld we use -z text 66929e7bcd65Smrg # though, which does catch some bad symbols but isn't as heavy-handed 66939e7bcd65Smrg # as -z defs. 66949e7bcd65Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66959e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 66969e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66979e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66989e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 66999e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 67009e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67019e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 67029e7bcd65Smrg runpath_var='LD_RUN_PATH' 67039e7bcd65Smrg 67049e7bcd65Smrg if test "$GCC" = yes; then 67059e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67069e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67079e7bcd65Smrg else 67089e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67099e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67109e7bcd65Smrg fi 67119e7bcd65Smrg ;; 67129e7bcd65Smrg 67139e7bcd65Smrg uts4*) 67149e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 67159e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67169e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67179e7bcd65Smrg ;; 67189e7bcd65Smrg 67199e7bcd65Smrg *) 67209e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67219e7bcd65Smrg ;; 67229e7bcd65Smrg esac 67239e7bcd65Smrg 67249e7bcd65Smrg if test x$host_vendor = xsni; then 67259e7bcd65Smrg case $host in 67269e7bcd65Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 67279e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 67289e7bcd65Smrg ;; 67299e7bcd65Smrg esac 67309e7bcd65Smrg fi 67319e7bcd65Smrg fi 67329e7bcd65Smrg]) 67339e7bcd65SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 67349e7bcd65Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 67359e7bcd65Smrg 67369e7bcd65Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 67379e7bcd65Smrg 67389e7bcd65Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 67399e7bcd65Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 67409e7bcd65Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 67419e7bcd65Smrg [The commands to extract the exported symbol list from a shared archive]) 67429e7bcd65Smrg 67439e7bcd65Smrg# 67449e7bcd65Smrg# Do we need to explicitly link libc? 67459e7bcd65Smrg# 67469e7bcd65Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 67479e7bcd65Smrgx|xyes) 67489e7bcd65Smrg # Assume -lc should be added 67499e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67509e7bcd65Smrg 67519e7bcd65Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 67529e7bcd65Smrg case $_LT_TAGVAR(archive_cmds, $1) in 67539e7bcd65Smrg *'~'*) 67549e7bcd65Smrg # FIXME: we may have to deal with multi-command sequences. 67559e7bcd65Smrg ;; 67569e7bcd65Smrg '$CC '*) 67579e7bcd65Smrg # Test whether the compiler implicitly links with -lc since on some 67589e7bcd65Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 67599e7bcd65Smrg # to ld, don't add -lc before -lgcc. 67609e7bcd65Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 67619e7bcd65Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 67629e7bcd65Smrg [$RM conftest* 67639e7bcd65Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 67649e7bcd65Smrg 67659e7bcd65Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 67669e7bcd65Smrg soname=conftest 67679e7bcd65Smrg lib=conftest 67689e7bcd65Smrg libobjs=conftest.$ac_objext 67699e7bcd65Smrg deplibs= 67709e7bcd65Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 67719e7bcd65Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 67729e7bcd65Smrg compiler_flags=-v 67739e7bcd65Smrg linker_flags=-v 67749e7bcd65Smrg verstring= 67759e7bcd65Smrg output_objdir=. 67769e7bcd65Smrg libname=conftest 67779e7bcd65Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 67789e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 67799e7bcd65Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 67809e7bcd65Smrg then 67819e7bcd65Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67829e7bcd65Smrg else 67839e7bcd65Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67849e7bcd65Smrg fi 67859e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 67869e7bcd65Smrg else 67879e7bcd65Smrg cat conftest.err 1>&5 67889e7bcd65Smrg fi 67899e7bcd65Smrg $RM conftest* 67909e7bcd65Smrg ]) 67919e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 67929e7bcd65Smrg ;; 67939e7bcd65Smrg esac 67949e7bcd65Smrg fi 67959e7bcd65Smrg ;; 67969e7bcd65Smrgesac 67979e7bcd65Smrg 67989e7bcd65Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 67999e7bcd65Smrg [Whether or not to add -lc for building shared libraries]) 68009e7bcd65Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 68019e7bcd65Smrg [enable_shared_with_static_runtimes], [0], 68029e7bcd65Smrg [Whether or not to disallow shared libs when runtime libs are static]) 68039e7bcd65Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 68049e7bcd65Smrg [Compiler flag to allow reflexive dlopens]) 68059e7bcd65Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 68069e7bcd65Smrg [Compiler flag to generate shared objects directly from archives]) 68079e7bcd65Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 68089e7bcd65Smrg [Whether the compiler copes with passing no objects directly]) 68099e7bcd65Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 68109e7bcd65Smrg [Create an old-style archive from a shared archive]) 68119e7bcd65Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 68129e7bcd65Smrg [Create a temporary old-style archive to link instead of a shared archive]) 68139e7bcd65Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 68149e7bcd65Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 68159e7bcd65Smrg_LT_TAGDECL([], [module_cmds], [2], 68169e7bcd65Smrg [Commands used to build a loadable module if different from building 68179e7bcd65Smrg a shared archive.]) 68189e7bcd65Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 68199e7bcd65Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 68209e7bcd65Smrg [Whether we are building with GNU ld or not]) 68219e7bcd65Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 68229e7bcd65Smrg [Flag that allows shared libraries with undefined symbols to be built]) 68239e7bcd65Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 68249e7bcd65Smrg [Flag that enforces no undefined symbols]) 68259e7bcd65Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 68269e7bcd65Smrg [Flag to hardcode $libdir into a binary during linking. 68279e7bcd65Smrg This must work even if $libdir does not exist]) 68289e7bcd65Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 68299e7bcd65Smrg [Whether we need a single "-rpath" flag with a separated argument]) 68309e7bcd65Smrg_LT_TAGDECL([], [hardcode_direct], [0], 68319e7bcd65Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68329e7bcd65Smrg DIR into the resulting binary]) 68339e7bcd65Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 68349e7bcd65Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68359e7bcd65Smrg DIR into the resulting binary and the resulting library dependency is 68369e7bcd65Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 68379e7bcd65Smrg library is relocated]) 68389e7bcd65Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 68399e7bcd65Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 68409e7bcd65Smrg into the resulting binary]) 68419e7bcd65Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 68429e7bcd65Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 68439e7bcd65Smrg into the resulting binary]) 68449e7bcd65Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 68459e7bcd65Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 68469e7bcd65Smrg into the library and all subsequent libraries and executables linked 68479e7bcd65Smrg against it]) 68489e7bcd65Smrg_LT_TAGDECL([], [inherit_rpath], [0], 68499e7bcd65Smrg [Set to yes if linker adds runtime paths of dependent libraries 68509e7bcd65Smrg to runtime path list]) 68519e7bcd65Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 68529e7bcd65Smrg [Whether libtool must link a program against all its dependency libraries]) 68539e7bcd65Smrg_LT_TAGDECL([], [always_export_symbols], [0], 68549e7bcd65Smrg [Set to "yes" if exported symbols are required]) 68559e7bcd65Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 68569e7bcd65Smrg [The commands to list exported symbols]) 68579e7bcd65Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 68589e7bcd65Smrg [Symbols that should not be listed in the preloaded symbols]) 68599e7bcd65Smrg_LT_TAGDECL([], [include_expsyms], [1], 68609e7bcd65Smrg [Symbols that must always be exported]) 68619e7bcd65Smrg_LT_TAGDECL([], [prelink_cmds], [2], 68629e7bcd65Smrg [Commands necessary for linking programs (against libraries) with templates]) 68639e7bcd65Smrg_LT_TAGDECL([], [postlink_cmds], [2], 68649e7bcd65Smrg [Commands necessary for finishing linking programs]) 68659e7bcd65Smrg_LT_TAGDECL([], [file_list_spec], [1], 68669e7bcd65Smrg [Specify filename containing input files]) 68679e7bcd65Smrgdnl FIXME: Not yet implemented 68689e7bcd65Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 68699e7bcd65Smrgdnl [Compiler flag to generate thread safe objects]) 68709e7bcd65Smrg])# _LT_LINKER_SHLIBS 68719e7bcd65Smrg 68729e7bcd65Smrg 68739e7bcd65Smrg# _LT_LANG_C_CONFIG([TAG]) 68749e7bcd65Smrg# ------------------------ 68759e7bcd65Smrg# Ensure that the configuration variables for a C compiler are suitably 68769e7bcd65Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 68779e7bcd65Smrg# the compiler configuration to `libtool'. 68789e7bcd65Smrgm4_defun([_LT_LANG_C_CONFIG], 68799e7bcd65Smrg[m4_require([_LT_DECL_EGREP])dnl 68809e7bcd65Smrglt_save_CC="$CC" 68819e7bcd65SmrgAC_LANG_PUSH(C) 68829e7bcd65Smrg 68839e7bcd65Smrg# Source file extension for C test sources. 68849e7bcd65Smrgac_ext=c 68859e7bcd65Smrg 68869e7bcd65Smrg# Object file extension for compiled C test sources. 68879e7bcd65Smrgobjext=o 68889e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext 68899e7bcd65Smrg 68909e7bcd65Smrg# Code to be used in simple compile tests 68919e7bcd65Smrglt_simple_compile_test_code="int some_variable = 0;" 68929e7bcd65Smrg 68939e7bcd65Smrg# Code to be used in simple link tests 68949e7bcd65Smrglt_simple_link_test_code='int main(){return(0);}' 68959e7bcd65Smrg 68969e7bcd65Smrg_LT_TAG_COMPILER 68979e7bcd65Smrg# Save the default compiler, since it gets overwritten when the other 68989e7bcd65Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 68999e7bcd65Smrgcompiler_DEFAULT=$CC 69009e7bcd65Smrg 69019e7bcd65Smrg# save warnings/boilerplate of simple test code 69029e7bcd65Smrg_LT_COMPILER_BOILERPLATE 69039e7bcd65Smrg_LT_LINKER_BOILERPLATE 69049e7bcd65Smrg 69059e7bcd65Smrgif test -n "$compiler"; then 69069e7bcd65Smrg _LT_COMPILER_NO_RTTI($1) 69079e7bcd65Smrg _LT_COMPILER_PIC($1) 69089e7bcd65Smrg _LT_COMPILER_C_O($1) 69099e7bcd65Smrg _LT_COMPILER_FILE_LOCKS($1) 69109e7bcd65Smrg _LT_LINKER_SHLIBS($1) 69119e7bcd65Smrg _LT_SYS_DYNAMIC_LINKER($1) 69129e7bcd65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 69139e7bcd65Smrg LT_SYS_DLOPEN_SELF 69149e7bcd65Smrg _LT_CMD_STRIPLIB 69159e7bcd65Smrg 69169e7bcd65Smrg # Report which library types will actually be built 69179e7bcd65Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 69189e7bcd65Smrg AC_MSG_RESULT([$can_build_shared]) 69199e7bcd65Smrg 69209e7bcd65Smrg AC_MSG_CHECKING([whether to build shared libraries]) 69219e7bcd65Smrg test "$can_build_shared" = "no" && enable_shared=no 69229e7bcd65Smrg 69239e7bcd65Smrg # On AIX, shared libraries and static libraries use the same namespace, and 69249e7bcd65Smrg # are all built from PIC. 69259e7bcd65Smrg case $host_os in 69269e7bcd65Smrg aix3*) 69279e7bcd65Smrg test "$enable_shared" = yes && enable_static=no 69289e7bcd65Smrg if test -n "$RANLIB"; then 69299e7bcd65Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 69309e7bcd65Smrg postinstall_cmds='$RANLIB $lib' 69319e7bcd65Smrg fi 69329e7bcd65Smrg ;; 69339e7bcd65Smrg 69349e7bcd65Smrg aix[[4-9]]*) 69359e7bcd65Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 69369e7bcd65Smrg test "$enable_shared" = yes && enable_static=no 69379e7bcd65Smrg fi 69389e7bcd65Smrg ;; 69399e7bcd65Smrg esac 69409e7bcd65Smrg AC_MSG_RESULT([$enable_shared]) 69419e7bcd65Smrg 69429e7bcd65Smrg AC_MSG_CHECKING([whether to build static libraries]) 69439e7bcd65Smrg # Make sure either enable_shared or enable_static is yes. 69449e7bcd65Smrg test "$enable_shared" = yes || enable_static=yes 69459e7bcd65Smrg AC_MSG_RESULT([$enable_static]) 69469e7bcd65Smrg 69479e7bcd65Smrg _LT_CONFIG($1) 69489e7bcd65Smrgfi 69499e7bcd65SmrgAC_LANG_POP 69509e7bcd65SmrgCC="$lt_save_CC" 69519e7bcd65Smrg])# _LT_LANG_C_CONFIG 69529e7bcd65Smrg 69539e7bcd65Smrg 69549e7bcd65Smrg# _LT_LANG_CXX_CONFIG([TAG]) 69559e7bcd65Smrg# -------------------------- 69569e7bcd65Smrg# Ensure that the configuration variables for a C++ compiler are suitably 69579e7bcd65Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 69589e7bcd65Smrg# the compiler configuration to `libtool'. 69599e7bcd65Smrgm4_defun([_LT_LANG_CXX_CONFIG], 69609e7bcd65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69619e7bcd65Smrgm4_require([_LT_DECL_EGREP])dnl 69629e7bcd65Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 69639e7bcd65Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 69649e7bcd65Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 69659e7bcd65Smrg (test "X$CXX" != "Xg++"))) ; then 69669e7bcd65Smrg AC_PROG_CXXCPP 69679e7bcd65Smrgelse 69689e7bcd65Smrg _lt_caught_CXX_error=yes 69699e7bcd65Smrgfi 69709e7bcd65Smrg 69719e7bcd65SmrgAC_LANG_PUSH(C++) 69729e7bcd65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 69739e7bcd65Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 69749e7bcd65Smrg_LT_TAGVAR(always_export_symbols, $1)=no 69759e7bcd65Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 69769e7bcd65Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 69779e7bcd65Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 69789e7bcd65Smrg_LT_TAGVAR(hardcode_direct, $1)=no 69799e7bcd65Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 69809e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 69819e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 69829e7bcd65Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 69839e7bcd65Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 69849e7bcd65Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 69859e7bcd65Smrg_LT_TAGVAR(inherit_rpath, $1)=no 69869e7bcd65Smrg_LT_TAGVAR(module_cmds, $1)= 69879e7bcd65Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 69889e7bcd65Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 69899e7bcd65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 69909e7bcd65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 69919e7bcd65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 69929e7bcd65Smrg_LT_TAGVAR(no_undefined_flag, $1)= 69939e7bcd65Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 69949e7bcd65Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 69959e7bcd65Smrg 69969e7bcd65Smrg# Source file extension for C++ test sources. 69979e7bcd65Smrgac_ext=cpp 69989e7bcd65Smrg 69999e7bcd65Smrg# Object file extension for compiled C++ test sources. 70009e7bcd65Smrgobjext=o 70019e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext 70029e7bcd65Smrg 70039e7bcd65Smrg# No sense in running all these tests if we already determined that 70049e7bcd65Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 70059e7bcd65Smrg# are currently assumed to apply to all compilers on this platform, 70069e7bcd65Smrg# and will be corrupted by setting them based on a non-working compiler. 70079e7bcd65Smrgif test "$_lt_caught_CXX_error" != yes; then 70089e7bcd65Smrg # Code to be used in simple compile tests 70099e7bcd65Smrg lt_simple_compile_test_code="int some_variable = 0;" 70109e7bcd65Smrg 70119e7bcd65Smrg # Code to be used in simple link tests 70129e7bcd65Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 70139e7bcd65Smrg 70149e7bcd65Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 70159e7bcd65Smrg _LT_TAG_COMPILER 70169e7bcd65Smrg 70179e7bcd65Smrg # save warnings/boilerplate of simple test code 70189e7bcd65Smrg _LT_COMPILER_BOILERPLATE 70199e7bcd65Smrg _LT_LINKER_BOILERPLATE 70209e7bcd65Smrg 70219e7bcd65Smrg # Allow CC to be a program name with arguments. 70229e7bcd65Smrg lt_save_CC=$CC 70239e7bcd65Smrg lt_save_CFLAGS=$CFLAGS 70249e7bcd65Smrg lt_save_LD=$LD 70259e7bcd65Smrg lt_save_GCC=$GCC 70269e7bcd65Smrg GCC=$GXX 70279e7bcd65Smrg lt_save_with_gnu_ld=$with_gnu_ld 70289e7bcd65Smrg lt_save_path_LD=$lt_cv_path_LD 70299e7bcd65Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 70309e7bcd65Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 70319e7bcd65Smrg else 70329e7bcd65Smrg $as_unset lt_cv_prog_gnu_ld 70339e7bcd65Smrg fi 70349e7bcd65Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 70359e7bcd65Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 70369e7bcd65Smrg else 70379e7bcd65Smrg $as_unset lt_cv_path_LD 70389e7bcd65Smrg fi 70399e7bcd65Smrg test -z "${LDCXX+set}" || LD=$LDCXX 70409e7bcd65Smrg CC=${CXX-"c++"} 70419e7bcd65Smrg CFLAGS=$CXXFLAGS 70429e7bcd65Smrg compiler=$CC 70439e7bcd65Smrg _LT_TAGVAR(compiler, $1)=$CC 70449e7bcd65Smrg _LT_CC_BASENAME([$compiler]) 70459e7bcd65Smrg 70469e7bcd65Smrg if test -n "$compiler"; then 70479e7bcd65Smrg # We don't want -fno-exception when compiling C++ code, so set the 70489e7bcd65Smrg # no_builtin_flag separately 70499e7bcd65Smrg if test "$GXX" = yes; then 70509e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 70519e7bcd65Smrg else 70529e7bcd65Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 70539e7bcd65Smrg fi 70549e7bcd65Smrg 70559e7bcd65Smrg if test "$GXX" = yes; then 70569e7bcd65Smrg # Set up default GNU C++ configuration 70579e7bcd65Smrg 70589e7bcd65Smrg LT_PATH_LD 70599e7bcd65Smrg 70609e7bcd65Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 70619e7bcd65Smrg # archiving commands below assume that GNU ld is being used. 70629e7bcd65Smrg if test "$with_gnu_ld" = yes; then 70639e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 70649e7bcd65Smrg _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' 70659e7bcd65Smrg 70669e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 70679e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 70689e7bcd65Smrg 70699e7bcd65Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 70709e7bcd65Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 70719e7bcd65Smrg # investigate it a little bit more. (MM) 70729e7bcd65Smrg wlarc='${wl}' 70739e7bcd65Smrg 70749e7bcd65Smrg # ancient GNU ld didn't support --whole-archive et. al. 70759e7bcd65Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 70769e7bcd65Smrg $GREP 'no-whole-archive' > /dev/null; then 70779e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 70789e7bcd65Smrg else 70799e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 70809e7bcd65Smrg fi 70819e7bcd65Smrg else 70829e7bcd65Smrg with_gnu_ld=no 70839e7bcd65Smrg wlarc= 70849e7bcd65Smrg 70859e7bcd65Smrg # A generic and very simple default shared library creation 70869e7bcd65Smrg # command for GNU C++ for the case where it uses the native 70879e7bcd65Smrg # linker, instead of GNU ld. If possible, this setting should 70889e7bcd65Smrg # overridden to take advantage of the native linker features on 70899e7bcd65Smrg # the platform it is being used on. 70909e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 70919e7bcd65Smrg fi 70929e7bcd65Smrg 70939e7bcd65Smrg # Commands to make compiler produce verbose output that lists 70949e7bcd65Smrg # what "hidden" libraries, object files and flags are used when 70959e7bcd65Smrg # linking a shared library. 70969e7bcd65Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 70979e7bcd65Smrg 70989e7bcd65Smrg else 70999e7bcd65Smrg GXX=no 71009e7bcd65Smrg with_gnu_ld=no 71019e7bcd65Smrg wlarc= 71029e7bcd65Smrg fi 71039e7bcd65Smrg 71049e7bcd65Smrg # PORTME: fill in a description of your system's C++ link characteristics 71059e7bcd65Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 71069e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71079e7bcd65Smrg case $host_os in 71089e7bcd65Smrg aix3*) 71099e7bcd65Smrg # FIXME: insert proper C++ library support 71109e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71119e7bcd65Smrg ;; 71129e7bcd65Smrg aix[[4-9]]*) 71139e7bcd65Smrg if test "$host_cpu" = ia64; then 71149e7bcd65Smrg # On IA64, the linker does run time linking by default, so we don't 71159e7bcd65Smrg # have to do anything special. 71169e7bcd65Smrg aix_use_runtimelinking=no 71179e7bcd65Smrg exp_sym_flag='-Bexport' 71189e7bcd65Smrg no_entry_flag="" 71199e7bcd65Smrg else 71209e7bcd65Smrg aix_use_runtimelinking=no 71219e7bcd65Smrg 71229e7bcd65Smrg # Test if we are trying to use run time linking or normal 71239e7bcd65Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 71249e7bcd65Smrg # need to do runtime linking. 71259e7bcd65Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 71269e7bcd65Smrg for ld_flag in $LDFLAGS; do 71279e7bcd65Smrg case $ld_flag in 71289e7bcd65Smrg *-brtl*) 71299e7bcd65Smrg aix_use_runtimelinking=yes 71309e7bcd65Smrg break 71319e7bcd65Smrg ;; 71329e7bcd65Smrg esac 71339e7bcd65Smrg done 71349e7bcd65Smrg ;; 71359e7bcd65Smrg esac 71369e7bcd65Smrg 71379e7bcd65Smrg exp_sym_flag='-bexport' 71389e7bcd65Smrg no_entry_flag='-bnoentry' 71399e7bcd65Smrg fi 71409e7bcd65Smrg 71419e7bcd65Smrg # When large executables or shared objects are built, AIX ld can 71429e7bcd65Smrg # have problems creating the table of contents. If linking a library 71439e7bcd65Smrg # or program results in "error TOC overflow" add -mminimal-toc to 71449e7bcd65Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 71459e7bcd65Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 71469e7bcd65Smrg 71479e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='' 71489e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71499e7bcd65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71509e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 71519e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 71529e7bcd65Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 71539e7bcd65Smrg 71549e7bcd65Smrg if test "$GXX" = yes; then 71559e7bcd65Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 71569e7bcd65Smrg # We only want to do this on AIX 4.2 and lower, the check 71579e7bcd65Smrg # below for broken collect2 doesn't work under 4.3+ 71589e7bcd65Smrg collect2name=`${CC} -print-prog-name=collect2` 71599e7bcd65Smrg if test -f "$collect2name" && 71609e7bcd65Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 71619e7bcd65Smrg then 71629e7bcd65Smrg # We have reworked collect2 71639e7bcd65Smrg : 71649e7bcd65Smrg else 71659e7bcd65Smrg # We have old collect2 71669e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 71679e7bcd65Smrg # It fails to find uninstalled libraries when the uninstalled 71689e7bcd65Smrg # path is not listed in the libpath. Setting hardcode_minus_L 71699e7bcd65Smrg # to unsupported forces relinking 71709e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 71719e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71729e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 71739e7bcd65Smrg fi 71749e7bcd65Smrg esac 71759e7bcd65Smrg shared_flag='-shared' 71769e7bcd65Smrg if test "$aix_use_runtimelinking" = yes; then 71779e7bcd65Smrg shared_flag="$shared_flag "'${wl}-G' 71789e7bcd65Smrg fi 71799e7bcd65Smrg else 71809e7bcd65Smrg # not using gcc 71819e7bcd65Smrg if test "$host_cpu" = ia64; then 71829e7bcd65Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 71839e7bcd65Smrg # chokes on -Wl,-G. The following line is correct: 71849e7bcd65Smrg shared_flag='-G' 71859e7bcd65Smrg else 71869e7bcd65Smrg if test "$aix_use_runtimelinking" = yes; then 71879e7bcd65Smrg shared_flag='${wl}-G' 71889e7bcd65Smrg else 71899e7bcd65Smrg shared_flag='${wl}-bM:SRE' 71909e7bcd65Smrg fi 71919e7bcd65Smrg fi 71929e7bcd65Smrg fi 71939e7bcd65Smrg 71949e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 71959e7bcd65Smrg # It seems that -bexpall does not export symbols beginning with 71969e7bcd65Smrg # underscore (_), so it is better to generate a list of symbols to 71979e7bcd65Smrg # export. 71989e7bcd65Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 71999e7bcd65Smrg if test "$aix_use_runtimelinking" = yes; then 72009e7bcd65Smrg # Warning - without using the other runtime loading flags (-brtl), 72019e7bcd65Smrg # -berok will link without error, but may produce a broken library. 72029e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 72039e7bcd65Smrg # Determine the default libpath from the value encoded in an empty 72049e7bcd65Smrg # executable. 72059e7bcd65Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 72069e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72079e7bcd65Smrg 72089e7bcd65Smrg _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" 72099e7bcd65Smrg else 72109e7bcd65Smrg if test "$host_cpu" = ia64; then 72119e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 72129e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 72139e7bcd65Smrg _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" 72149e7bcd65Smrg else 72159e7bcd65Smrg # Determine the default libpath from the value encoded in an 72169e7bcd65Smrg # empty executable. 72179e7bcd65Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 72189e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72199e7bcd65Smrg # Warning - without using the other run time loading flags, 72209e7bcd65Smrg # -berok will link without error, but may produce a broken library. 72219e7bcd65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 72229e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 72239e7bcd65Smrg if test "$with_gnu_ld" = yes; then 72249e7bcd65Smrg # We only use this code for GNU lds that support --whole-archive. 72259e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 72269e7bcd65Smrg else 72279e7bcd65Smrg # Exported symbols can be pulled into shared objects from archives 72289e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 72299e7bcd65Smrg fi 72309e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 72319e7bcd65Smrg # This is similar to how AIX traditionally builds its shared 72329e7bcd65Smrg # libraries. 72339e7bcd65Smrg _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' 72349e7bcd65Smrg fi 72359e7bcd65Smrg fi 72369e7bcd65Smrg ;; 72379e7bcd65Smrg 72389e7bcd65Smrg beos*) 72399e7bcd65Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 72409e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72419e7bcd65Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 72429e7bcd65Smrg # support --undefined. This deserves some investigation. FIXME 72439e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72449e7bcd65Smrg else 72459e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72469e7bcd65Smrg fi 72479e7bcd65Smrg ;; 72489e7bcd65Smrg 72499e7bcd65Smrg chorus*) 72509e7bcd65Smrg case $cc_basename in 72519e7bcd65Smrg *) 72529e7bcd65Smrg # FIXME: insert proper C++ library support 72539e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72549e7bcd65Smrg ;; 72559e7bcd65Smrg esac 72569e7bcd65Smrg ;; 72579e7bcd65Smrg 72589e7bcd65Smrg cygwin* | mingw* | pw32* | cegcc*) 72599e7bcd65Smrg case $GXX,$cc_basename in 72609e7bcd65Smrg ,cl* | no,cl*) 72619e7bcd65Smrg # Native MSVC 72629e7bcd65Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 72639e7bcd65Smrg # no search path for DLLs. 72649e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 72659e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72669e7bcd65Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 72679e7bcd65Smrg _LT_TAGVAR(file_list_spec, $1)='@' 72689e7bcd65Smrg # Tell ltmain to make .lib files, not .a files. 72699e7bcd65Smrg libext=lib 72709e7bcd65Smrg # Tell ltmain to make .dll files, not .so files. 72719e7bcd65Smrg shrext_cmds=".dll" 72729e7bcd65Smrg # FIXME: Setting linknames here is a bad hack. 72739e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 72749e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72759e7bcd65Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 72769e7bcd65Smrg else 72779e7bcd65Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 72789e7bcd65Smrg fi~ 72799e7bcd65Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 72809e7bcd65Smrg linknames=' 72819e7bcd65Smrg # The linker will not automatically build a static lib if we build a DLL. 72829e7bcd65Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 72839e7bcd65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 72849e7bcd65Smrg # Don't use ranlib 72859e7bcd65Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 72869e7bcd65Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 72879e7bcd65Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 72889e7bcd65Smrg case $lt_outputfile in 72899e7bcd65Smrg *.exe|*.EXE) ;; 72909e7bcd65Smrg *) 72919e7bcd65Smrg lt_outputfile="$lt_outputfile.exe" 72929e7bcd65Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 72939e7bcd65Smrg ;; 72949e7bcd65Smrg esac~ 72959e7bcd65Smrg func_to_tool_file "$lt_outputfile"~ 72969e7bcd65Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 72979e7bcd65Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 72989e7bcd65Smrg $RM "$lt_outputfile.manifest"; 72999e7bcd65Smrg fi' 73009e7bcd65Smrg ;; 73019e7bcd65Smrg *) 73029e7bcd65Smrg # g++ 73039e7bcd65Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 73049e7bcd65Smrg # as there is no search path for DLLs. 73059e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 73069e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 73079e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 73089e7bcd65Smrg _LT_TAGVAR(always_export_symbols, $1)=no 73099e7bcd65Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 73109e7bcd65Smrg 73119e7bcd65Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 73129e7bcd65Smrg _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' 73139e7bcd65Smrg # If the export-symbols file already is a .def file (1st line 73149e7bcd65Smrg # is EXPORTS), use it as is; otherwise, prepend... 73159e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 73169e7bcd65Smrg cp $export_symbols $output_objdir/$soname.def; 73179e7bcd65Smrg else 73189e7bcd65Smrg echo EXPORTS > $output_objdir/$soname.def; 73199e7bcd65Smrg cat $export_symbols >> $output_objdir/$soname.def; 73209e7bcd65Smrg fi~ 73219e7bcd65Smrg $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' 73229e7bcd65Smrg else 73239e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73249e7bcd65Smrg fi 73259e7bcd65Smrg ;; 73269e7bcd65Smrg esac 73279e7bcd65Smrg ;; 73289e7bcd65Smrg darwin* | rhapsody*) 73299e7bcd65Smrg _LT_DARWIN_LINKER_FEATURES($1) 73309e7bcd65Smrg ;; 73319e7bcd65Smrg 73329e7bcd65Smrg dgux*) 73339e7bcd65Smrg case $cc_basename in 73349e7bcd65Smrg ec++*) 73359e7bcd65Smrg # FIXME: insert proper C++ library support 73369e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73379e7bcd65Smrg ;; 73389e7bcd65Smrg ghcx*) 73399e7bcd65Smrg # Green Hills C++ Compiler 73409e7bcd65Smrg # FIXME: insert proper C++ library support 73419e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73429e7bcd65Smrg ;; 73439e7bcd65Smrg *) 73449e7bcd65Smrg # FIXME: insert proper C++ library support 73459e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73469e7bcd65Smrg ;; 73479e7bcd65Smrg esac 73489e7bcd65Smrg ;; 73499e7bcd65Smrg 73509e7bcd65Smrg freebsd2.*) 73519e7bcd65Smrg # C++ shared libraries reported to be fairly broken before 73529e7bcd65Smrg # switch to ELF 73539e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73549e7bcd65Smrg ;; 73559e7bcd65Smrg 73569e7bcd65Smrg freebsd-elf*) 73579e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73589e7bcd65Smrg ;; 73599e7bcd65Smrg 73609e7bcd65Smrg freebsd* | dragonfly*) 73619e7bcd65Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 73629e7bcd65Smrg # conventions 73639e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 73649e7bcd65Smrg ;; 73659e7bcd65Smrg 73669e7bcd65Smrg gnu*) 73679e7bcd65Smrg ;; 73689e7bcd65Smrg 73699e7bcd65Smrg haiku*) 73709e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 73719e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73729e7bcd65Smrg ;; 73739e7bcd65Smrg 73749e7bcd65Smrg hpux9*) 73759e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73769e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73779e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73789e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 73799e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73809e7bcd65Smrg # but as the default 73819e7bcd65Smrg # location of the library. 73829e7bcd65Smrg 73839e7bcd65Smrg case $cc_basename in 73849e7bcd65Smrg CC*) 73859e7bcd65Smrg # FIXME: insert proper C++ library support 73869e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73879e7bcd65Smrg ;; 73889e7bcd65Smrg aCC*) 73899e7bcd65Smrg _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' 73909e7bcd65Smrg # Commands to make compiler produce verbose output that lists 73919e7bcd65Smrg # what "hidden" libraries, object files and flags are used when 73929e7bcd65Smrg # linking a shared library. 73939e7bcd65Smrg # 73949e7bcd65Smrg # There doesn't appear to be a way to prevent this compiler from 73959e7bcd65Smrg # explicitly linking system object files so we need to strip them 73969e7bcd65Smrg # from the output so that they don't get included in the library 73979e7bcd65Smrg # dependencies. 73989e7bcd65Smrg 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"' 73999e7bcd65Smrg ;; 74009e7bcd65Smrg *) 74019e7bcd65Smrg if test "$GXX" = yes; then 74029e7bcd65Smrg _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' 74039e7bcd65Smrg else 74049e7bcd65Smrg # FIXME: insert proper C++ library support 74059e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74069e7bcd65Smrg fi 74079e7bcd65Smrg ;; 74089e7bcd65Smrg esac 74099e7bcd65Smrg ;; 74109e7bcd65Smrg 74119e7bcd65Smrg hpux10*|hpux11*) 74129e7bcd65Smrg if test $with_gnu_ld = no; then 74139e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 74149e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74159e7bcd65Smrg 74169e7bcd65Smrg case $host_cpu in 74179e7bcd65Smrg hppa*64*|ia64*) 74189e7bcd65Smrg ;; 74199e7bcd65Smrg *) 74209e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74219e7bcd65Smrg ;; 74229e7bcd65Smrg esac 74239e7bcd65Smrg fi 74249e7bcd65Smrg case $host_cpu in 74259e7bcd65Smrg hppa*64*|ia64*) 74269e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74279e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74289e7bcd65Smrg ;; 74299e7bcd65Smrg *) 74309e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 74319e7bcd65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 74329e7bcd65Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 74339e7bcd65Smrg # but as the default 74349e7bcd65Smrg # location of the library. 74359e7bcd65Smrg ;; 74369e7bcd65Smrg esac 74379e7bcd65Smrg 74389e7bcd65Smrg case $cc_basename in 74399e7bcd65Smrg CC*) 74409e7bcd65Smrg # FIXME: insert proper C++ library support 74419e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74429e7bcd65Smrg ;; 74439e7bcd65Smrg aCC*) 74449e7bcd65Smrg case $host_cpu in 74459e7bcd65Smrg hppa*64*) 74469e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74479e7bcd65Smrg ;; 74489e7bcd65Smrg ia64*) 74499e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74509e7bcd65Smrg ;; 74519e7bcd65Smrg *) 74529e7bcd65Smrg _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' 74539e7bcd65Smrg ;; 74549e7bcd65Smrg esac 74559e7bcd65Smrg # Commands to make compiler produce verbose output that lists 74569e7bcd65Smrg # what "hidden" libraries, object files and flags are used when 74579e7bcd65Smrg # linking a shared library. 74589e7bcd65Smrg # 74599e7bcd65Smrg # There doesn't appear to be a way to prevent this compiler from 74609e7bcd65Smrg # explicitly linking system object files so we need to strip them 74619e7bcd65Smrg # from the output so that they don't get included in the library 74629e7bcd65Smrg # dependencies. 74639e7bcd65Smrg 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"' 74649e7bcd65Smrg ;; 74659e7bcd65Smrg *) 74669e7bcd65Smrg if test "$GXX" = yes; then 74679e7bcd65Smrg if test $with_gnu_ld = no; then 74689e7bcd65Smrg case $host_cpu in 74699e7bcd65Smrg hppa*64*) 74709e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74719e7bcd65Smrg ;; 74729e7bcd65Smrg ia64*) 74739e7bcd65Smrg _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' 74749e7bcd65Smrg ;; 74759e7bcd65Smrg *) 74769e7bcd65Smrg _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' 74779e7bcd65Smrg ;; 74789e7bcd65Smrg esac 74799e7bcd65Smrg fi 74809e7bcd65Smrg else 74819e7bcd65Smrg # FIXME: insert proper C++ library support 74829e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74839e7bcd65Smrg fi 74849e7bcd65Smrg ;; 74859e7bcd65Smrg esac 74869e7bcd65Smrg ;; 74879e7bcd65Smrg 74889e7bcd65Smrg interix[[3-9]]*) 74899e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74909e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74919e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74929e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74939e7bcd65Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 74949e7bcd65Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 74959e7bcd65Smrg # default) and relocated if they conflict, which is a slow very memory 74969e7bcd65Smrg # consuming and fragmenting process. To avoid this, we pick a random, 74979e7bcd65Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 74989e7bcd65Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 74999e7bcd65Smrg _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' 75009e7bcd65Smrg _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' 75019e7bcd65Smrg ;; 75029e7bcd65Smrg irix5* | irix6*) 75039e7bcd65Smrg case $cc_basename in 75049e7bcd65Smrg CC*) 75059e7bcd65Smrg # SGI C++ 75069e7bcd65Smrg _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' 75079e7bcd65Smrg 75089e7bcd65Smrg # Archives containing C++ object files must be created using 75099e7bcd65Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 75109e7bcd65Smrg # necessary to make sure instantiated templates are included 75119e7bcd65Smrg # in the archive. 75129e7bcd65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 75139e7bcd65Smrg ;; 75149e7bcd65Smrg *) 75159e7bcd65Smrg if test "$GXX" = yes; then 75169e7bcd65Smrg if test "$with_gnu_ld" = no; then 75179e7bcd65Smrg _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' 75189e7bcd65Smrg else 75199e7bcd65Smrg _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' 75209e7bcd65Smrg fi 75219e7bcd65Smrg fi 75229e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 75239e7bcd65Smrg ;; 75249e7bcd65Smrg esac 75259e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75269e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 75279e7bcd65Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 75289e7bcd65Smrg ;; 75299e7bcd65Smrg 75309e7bcd65Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 75319e7bcd65Smrg case $cc_basename in 75329e7bcd65Smrg KCC*) 75339e7bcd65Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 75349e7bcd65Smrg 75359e7bcd65Smrg # KCC will only create a shared library if the output file 75369e7bcd65Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 75379e7bcd65Smrg # to its proper name (with version) after linking. 75389e7bcd65Smrg _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' 75399e7bcd65Smrg _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' 75409e7bcd65Smrg # Commands to make compiler produce verbose output that lists 75419e7bcd65Smrg # what "hidden" libraries, object files and flags are used when 75429e7bcd65Smrg # linking a shared library. 75439e7bcd65Smrg # 75449e7bcd65Smrg # There doesn't appear to be a way to prevent this compiler from 75459e7bcd65Smrg # explicitly linking system object files so we need to strip them 75469e7bcd65Smrg # from the output so that they don't get included in the library 75479e7bcd65Smrg # dependencies. 75489e7bcd65Smrg 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"' 75499e7bcd65Smrg 75509e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75519e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75529e7bcd65Smrg 75539e7bcd65Smrg # Archives containing C++ object files must be created using 75549e7bcd65Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 75559e7bcd65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 75569e7bcd65Smrg ;; 75579e7bcd65Smrg icpc* | ecpc* ) 75589e7bcd65Smrg # Intel C++ 75599e7bcd65Smrg with_gnu_ld=yes 75609e7bcd65Smrg # version 8.0 and above of icpc choke on multiply defined symbols 75619e7bcd65Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 75629e7bcd65Smrg # earlier do not add the objects themselves. 75639e7bcd65Smrg case `$CC -V 2>&1` in 75649e7bcd65Smrg *"Version 7."*) 75659e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75669e7bcd65Smrg _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' 75679e7bcd65Smrg ;; 75689e7bcd65Smrg *) # Version 8.0 or newer 75699e7bcd65Smrg tmp_idyn= 75709e7bcd65Smrg case $host_cpu in 75719e7bcd65Smrg ia64*) tmp_idyn=' -i_dynamic';; 75729e7bcd65Smrg esac 75739e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75749e7bcd65Smrg _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' 75759e7bcd65Smrg ;; 75769e7bcd65Smrg esac 75779e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 75789e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75799e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75809e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 75819e7bcd65Smrg ;; 75829e7bcd65Smrg pgCC* | pgcpp*) 75839e7bcd65Smrg # Portland Group C++ compiler 75849e7bcd65Smrg case `$CC -V` in 75859e7bcd65Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 75869e7bcd65Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 75879e7bcd65Smrg rm -rf $tpldir~ 75889e7bcd65Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 75899e7bcd65Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 75909e7bcd65Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 75919e7bcd65Smrg rm -rf $tpldir~ 75929e7bcd65Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 75939e7bcd65Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 75949e7bcd65Smrg $RANLIB $oldlib' 75959e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 75969e7bcd65Smrg rm -rf $tpldir~ 75979e7bcd65Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75989e7bcd65Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 75999e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 76009e7bcd65Smrg rm -rf $tpldir~ 76019e7bcd65Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 76029e7bcd65Smrg $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' 76039e7bcd65Smrg ;; 76049e7bcd65Smrg *) # Version 6 and above use weak symbols 76059e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 76069e7bcd65Smrg _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' 76079e7bcd65Smrg ;; 76089e7bcd65Smrg esac 76099e7bcd65Smrg 76109e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 76119e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76129e7bcd65Smrg _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' 76139e7bcd65Smrg ;; 76149e7bcd65Smrg cxx*) 76159e7bcd65Smrg # Compaq C++ 76169e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 76179e7bcd65Smrg _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' 76189e7bcd65Smrg 76199e7bcd65Smrg runpath_var=LD_RUN_PATH 76209e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 76219e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 76229e7bcd65Smrg 76239e7bcd65Smrg # Commands to make compiler produce verbose output that lists 76249e7bcd65Smrg # what "hidden" libraries, object files and flags are used when 76259e7bcd65Smrg # linking a shared library. 76269e7bcd65Smrg # 76279e7bcd65Smrg # There doesn't appear to be a way to prevent this compiler from 76289e7bcd65Smrg # explicitly linking system object files so we need to strip them 76299e7bcd65Smrg # from the output so that they don't get included in the library 76309e7bcd65Smrg # dependencies. 76319e7bcd65Smrg 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' 76329e7bcd65Smrg ;; 76339e7bcd65Smrg xl* | mpixl* | bgxl*) 76349e7bcd65Smrg # IBM XL 8.0 on PPC, with GNU ld 76359e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76369e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76379e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 76389e7bcd65Smrg if test "x$supports_anon_versioning" = xyes; then 76399e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 76409e7bcd65Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 76419e7bcd65Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 76429e7bcd65Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 76439e7bcd65Smrg fi 76449e7bcd65Smrg ;; 76459e7bcd65Smrg *) 76469e7bcd65Smrg case `$CC -V 2>&1 | sed 5q` in 76479e7bcd65Smrg *Sun\ C*) 76489e7bcd65Smrg # Sun C++ 5.9 76499e7bcd65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 76509e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 76519e7bcd65Smrg _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' 76529e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76539e7bcd65Smrg _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' 76549e7bcd65Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 76559e7bcd65Smrg 76569e7bcd65Smrg # Not sure whether something based on 76579e7bcd65Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 76589e7bcd65Smrg # would be better. 76599e7bcd65Smrg output_verbose_link_cmd='func_echo_all' 76609e7bcd65Smrg 76619e7bcd65Smrg # Archives containing C++ object files must be created using 76629e7bcd65Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 76639e7bcd65Smrg # necessary to make sure instantiated templates are included 76649e7bcd65Smrg # in the archive. 76659e7bcd65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 76669e7bcd65Smrg ;; 76679e7bcd65Smrg esac 76689e7bcd65Smrg ;; 76699e7bcd65Smrg esac 76709e7bcd65Smrg ;; 76719e7bcd65Smrg 76729e7bcd65Smrg lynxos*) 76739e7bcd65Smrg # FIXME: insert proper C++ library support 76749e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76759e7bcd65Smrg ;; 76769e7bcd65Smrg 76779e7bcd65Smrg m88k*) 76789e7bcd65Smrg # FIXME: insert proper C++ library support 76799e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76809e7bcd65Smrg ;; 76819e7bcd65Smrg 76829e7bcd65Smrg mvs*) 76839e7bcd65Smrg case $cc_basename in 76849e7bcd65Smrg cxx*) 76859e7bcd65Smrg # FIXME: insert proper C++ library support 76869e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76879e7bcd65Smrg ;; 76889e7bcd65Smrg *) 76899e7bcd65Smrg # FIXME: insert proper C++ library support 76909e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76919e7bcd65Smrg ;; 76929e7bcd65Smrg esac 76939e7bcd65Smrg ;; 76949e7bcd65Smrg 76959e7bcd65Smrg netbsd*) 76969e7bcd65Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 76979e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 76989e7bcd65Smrg wlarc= 76999e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 77009e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 77019e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 77029e7bcd65Smrg fi 77039e7bcd65Smrg # Workaround some broken pre-1.5 toolchains 77049e7bcd65Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 77059e7bcd65Smrg ;; 77069e7bcd65Smrg 77079e7bcd65Smrg *nto* | *qnx*) 77089e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 77099e7bcd65Smrg ;; 77109e7bcd65Smrg 77119e7bcd65Smrg openbsd2*) 77129e7bcd65Smrg # C++ shared libraries are fairly broken 77139e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77149e7bcd65Smrg ;; 77159e7bcd65Smrg 77169e7bcd65Smrg openbsd*) 77179e7bcd65Smrg if test -f /usr/libexec/ld.so; then 77189e7bcd65Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 77199e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 77209e7bcd65Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 77219e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 77229e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 77239e7bcd65Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 77249e7bcd65Smrg _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' 77259e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 77269e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 77279e7bcd65Smrg fi 77289e7bcd65Smrg output_verbose_link_cmd=func_echo_all 77299e7bcd65Smrg else 77309e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77319e7bcd65Smrg fi 77329e7bcd65Smrg ;; 77339e7bcd65Smrg 77349e7bcd65Smrg osf3* | osf4* | osf5*) 77359e7bcd65Smrg case $cc_basename in 77369e7bcd65Smrg KCC*) 77379e7bcd65Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 77389e7bcd65Smrg 77399e7bcd65Smrg # KCC will only create a shared library if the output file 77409e7bcd65Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 77419e7bcd65Smrg # to its proper name (with version) after linking. 77429e7bcd65Smrg _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' 77439e7bcd65Smrg 77449e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 77459e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77469e7bcd65Smrg 77479e7bcd65Smrg # Archives containing C++ object files must be created using 77489e7bcd65Smrg # the KAI C++ compiler. 77499e7bcd65Smrg case $host in 77509e7bcd65Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 77519e7bcd65Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 77529e7bcd65Smrg esac 77539e7bcd65Smrg ;; 77549e7bcd65Smrg RCC*) 77559e7bcd65Smrg # Rational C++ 2.4.1 77569e7bcd65Smrg # FIXME: insert proper C++ library support 77579e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77589e7bcd65Smrg ;; 77599e7bcd65Smrg cxx*) 77609e7bcd65Smrg case $host in 77619e7bcd65Smrg osf3*) 77629e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77639e7bcd65Smrg _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' 77649e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 77659e7bcd65Smrg ;; 77669e7bcd65Smrg *) 77679e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 77689e7bcd65Smrg _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' 77699e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 77709e7bcd65Smrg echo "-hidden">> $lib.exp~ 77719e7bcd65Smrg $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~ 77729e7bcd65Smrg $RM $lib.exp' 77739e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 77749e7bcd65Smrg ;; 77759e7bcd65Smrg esac 77769e7bcd65Smrg 77779e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77789e7bcd65Smrg 77799e7bcd65Smrg # Commands to make compiler produce verbose output that lists 77809e7bcd65Smrg # what "hidden" libraries, object files and flags are used when 77819e7bcd65Smrg # linking a shared library. 77829e7bcd65Smrg # 77839e7bcd65Smrg # There doesn't appear to be a way to prevent this compiler from 77849e7bcd65Smrg # explicitly linking system object files so we need to strip them 77859e7bcd65Smrg # from the output so that they don't get included in the library 77869e7bcd65Smrg # dependencies. 77879e7bcd65Smrg 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"' 77889e7bcd65Smrg ;; 77899e7bcd65Smrg *) 77909e7bcd65Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 77919e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77929e7bcd65Smrg case $host in 77939e7bcd65Smrg osf3*) 77949e7bcd65Smrg _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' 77959e7bcd65Smrg ;; 77969e7bcd65Smrg *) 77979e7bcd65Smrg _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' 77989e7bcd65Smrg ;; 77999e7bcd65Smrg esac 78009e7bcd65Smrg 78019e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 78029e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 78039e7bcd65Smrg 78049e7bcd65Smrg # Commands to make compiler produce verbose output that lists 78059e7bcd65Smrg # what "hidden" libraries, object files and flags are used when 78069e7bcd65Smrg # linking a shared library. 78079e7bcd65Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78089e7bcd65Smrg 78099e7bcd65Smrg else 78109e7bcd65Smrg # FIXME: insert proper C++ library support 78119e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78129e7bcd65Smrg fi 78139e7bcd65Smrg ;; 78149e7bcd65Smrg esac 78159e7bcd65Smrg ;; 78169e7bcd65Smrg 78179e7bcd65Smrg psos*) 78189e7bcd65Smrg # FIXME: insert proper C++ library support 78199e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78209e7bcd65Smrg ;; 78219e7bcd65Smrg 78229e7bcd65Smrg sunos4*) 78239e7bcd65Smrg case $cc_basename in 78249e7bcd65Smrg CC*) 78259e7bcd65Smrg # Sun C++ 4.x 78269e7bcd65Smrg # FIXME: insert proper C++ library support 78279e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78289e7bcd65Smrg ;; 78299e7bcd65Smrg lcc*) 78309e7bcd65Smrg # Lucid 78319e7bcd65Smrg # FIXME: insert proper C++ library support 78329e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78339e7bcd65Smrg ;; 78349e7bcd65Smrg *) 78359e7bcd65Smrg # FIXME: insert proper C++ library support 78369e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78379e7bcd65Smrg ;; 78389e7bcd65Smrg esac 78399e7bcd65Smrg ;; 78409e7bcd65Smrg 78419e7bcd65Smrg solaris*) 78429e7bcd65Smrg case $cc_basename in 78439e7bcd65Smrg CC* | sunCC*) 78449e7bcd65Smrg # Sun C++ 4.2, 5.x and Centerline C++ 78459e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 78469e7bcd65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 78479e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 78489e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78499e7bcd65Smrg $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' 78509e7bcd65Smrg 78519e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 78529e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78539e7bcd65Smrg case $host_os in 78549e7bcd65Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 78559e7bcd65Smrg *) 78569e7bcd65Smrg # The compiler driver will combine and reorder linker options, 78579e7bcd65Smrg # but understands `-z linker_flag'. 78589e7bcd65Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 78599e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 78609e7bcd65Smrg ;; 78619e7bcd65Smrg esac 78629e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 78639e7bcd65Smrg 78649e7bcd65Smrg output_verbose_link_cmd='func_echo_all' 78659e7bcd65Smrg 78669e7bcd65Smrg # Archives containing C++ object files must be created using 78679e7bcd65Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 78689e7bcd65Smrg # necessary to make sure instantiated templates are included 78699e7bcd65Smrg # in the archive. 78709e7bcd65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 78719e7bcd65Smrg ;; 78729e7bcd65Smrg gcx*) 78739e7bcd65Smrg # Green Hills C++ Compiler 78749e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78759e7bcd65Smrg 78769e7bcd65Smrg # The C++ compiler must be used to create the archive. 78779e7bcd65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 78789e7bcd65Smrg ;; 78799e7bcd65Smrg *) 78809e7bcd65Smrg # GNU C++ compiler with Solaris linker 78819e7bcd65Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 78829e7bcd65Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 78839e7bcd65Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 78849e7bcd65Smrg _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' 78859e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78869e7bcd65Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 78879e7bcd65Smrg 78889e7bcd65Smrg # Commands to make compiler produce verbose output that lists 78899e7bcd65Smrg # what "hidden" libraries, object files and flags are used when 78909e7bcd65Smrg # linking a shared library. 78919e7bcd65Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78929e7bcd65Smrg else 78939e7bcd65Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 78949e7bcd65Smrg # platform. 78959e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78969e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78979e7bcd65Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 78989e7bcd65Smrg 78999e7bcd65Smrg # Commands to make compiler produce verbose output that lists 79009e7bcd65Smrg # what "hidden" libraries, object files and flags are used when 79019e7bcd65Smrg # linking a shared library. 79029e7bcd65Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 79039e7bcd65Smrg fi 79049e7bcd65Smrg 79059e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 79069e7bcd65Smrg case $host_os in 79079e7bcd65Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 79089e7bcd65Smrg *) 79099e7bcd65Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 79109e7bcd65Smrg ;; 79119e7bcd65Smrg esac 79129e7bcd65Smrg fi 79139e7bcd65Smrg ;; 79149e7bcd65Smrg esac 79159e7bcd65Smrg ;; 79169e7bcd65Smrg 79179e7bcd65Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 79189e7bcd65Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 79199e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 79209e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 79219e7bcd65Smrg runpath_var='LD_RUN_PATH' 79229e7bcd65Smrg 79239e7bcd65Smrg case $cc_basename in 79249e7bcd65Smrg CC*) 79259e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79269e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79279e7bcd65Smrg ;; 79289e7bcd65Smrg *) 79299e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79309e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79319e7bcd65Smrg ;; 79329e7bcd65Smrg esac 79339e7bcd65Smrg ;; 79349e7bcd65Smrg 79359e7bcd65Smrg sysv5* | sco3.2v5* | sco5v6*) 79369e7bcd65Smrg # Note: We can NOT use -z defs as we might desire, because we do not 79379e7bcd65Smrg # link with -lc, and that would cause any symbols used from libc to 79389e7bcd65Smrg # always be unresolved, which means just about no library would 79399e7bcd65Smrg # ever link correctly. If we're not using GNU ld we use -z text 79409e7bcd65Smrg # though, which does catch some bad symbols but isn't as heavy-handed 79419e7bcd65Smrg # as -z defs. 79429e7bcd65Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 79439e7bcd65Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 79449e7bcd65Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 79459e7bcd65Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 79469e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 79479e7bcd65Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 79489e7bcd65Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 79499e7bcd65Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 79509e7bcd65Smrg runpath_var='LD_RUN_PATH' 79519e7bcd65Smrg 79529e7bcd65Smrg case $cc_basename in 79539e7bcd65Smrg CC*) 79549e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79559e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79569e7bcd65Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 79579e7bcd65Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 79589e7bcd65Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 79599e7bcd65Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 79609e7bcd65Smrg ;; 79619e7bcd65Smrg *) 79629e7bcd65Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79639e7bcd65Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79649e7bcd65Smrg ;; 79659e7bcd65Smrg esac 79669e7bcd65Smrg ;; 79679e7bcd65Smrg 79689e7bcd65Smrg tandem*) 79699e7bcd65Smrg case $cc_basename in 79709e7bcd65Smrg NCC*) 79719e7bcd65Smrg # NonStop-UX NCC 3.20 79729e7bcd65Smrg # FIXME: insert proper C++ library support 79739e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79749e7bcd65Smrg ;; 79759e7bcd65Smrg *) 79769e7bcd65Smrg # FIXME: insert proper C++ library support 79779e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79789e7bcd65Smrg ;; 79799e7bcd65Smrg esac 79809e7bcd65Smrg ;; 79819e7bcd65Smrg 79829e7bcd65Smrg vxworks*) 79839e7bcd65Smrg # FIXME: insert proper C++ library support 79849e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79859e7bcd65Smrg ;; 79869e7bcd65Smrg 79879e7bcd65Smrg *) 79889e7bcd65Smrg # FIXME: insert proper C++ library support 79899e7bcd65Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79909e7bcd65Smrg ;; 79919e7bcd65Smrg esac 79929e7bcd65Smrg 79939e7bcd65Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 79949e7bcd65Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 79959e7bcd65Smrg 79969e7bcd65Smrg _LT_TAGVAR(GCC, $1)="$GXX" 79979e7bcd65Smrg _LT_TAGVAR(LD, $1)="$LD" 79989e7bcd65Smrg 79999e7bcd65Smrg ## CAVEAT EMPTOR: 80009e7bcd65Smrg ## There is no encapsulation within the following macros, do not change 80019e7bcd65Smrg ## the running order or otherwise move them around unless you know exactly 80029e7bcd65Smrg ## what you are doing... 80039e7bcd65Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 80049e7bcd65Smrg _LT_COMPILER_PIC($1) 80059e7bcd65Smrg _LT_COMPILER_C_O($1) 80069e7bcd65Smrg _LT_COMPILER_FILE_LOCKS($1) 80079e7bcd65Smrg _LT_LINKER_SHLIBS($1) 80089e7bcd65Smrg _LT_SYS_DYNAMIC_LINKER($1) 80099e7bcd65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80109e7bcd65Smrg 80119e7bcd65Smrg _LT_CONFIG($1) 80129e7bcd65Smrg fi # test -n "$compiler" 80139e7bcd65Smrg 80149e7bcd65Smrg CC=$lt_save_CC 80159e7bcd65Smrg CFLAGS=$lt_save_CFLAGS 80169e7bcd65Smrg LDCXX=$LD 80179e7bcd65Smrg LD=$lt_save_LD 80189e7bcd65Smrg GCC=$lt_save_GCC 80199e7bcd65Smrg with_gnu_ld=$lt_save_with_gnu_ld 80209e7bcd65Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 80219e7bcd65Smrg lt_cv_path_LD=$lt_save_path_LD 80229e7bcd65Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 80239e7bcd65Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 80249e7bcd65Smrgfi # test "$_lt_caught_CXX_error" != yes 80259e7bcd65Smrg 80269e7bcd65SmrgAC_LANG_POP 80279e7bcd65Smrg])# _LT_LANG_CXX_CONFIG 80289e7bcd65Smrg 80299e7bcd65Smrg 80309e7bcd65Smrg# _LT_FUNC_STRIPNAME_CNF 80319e7bcd65Smrg# ---------------------- 80329e7bcd65Smrg# func_stripname_cnf prefix suffix name 80339e7bcd65Smrg# strip PREFIX and SUFFIX off of NAME. 80349e7bcd65Smrg# PREFIX and SUFFIX must not contain globbing or regex special 80359e7bcd65Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 80369e7bcd65Smrg# dot (in which case that matches only a dot). 80379e7bcd65Smrg# 80389e7bcd65Smrg# This function is identical to the (non-XSI) version of func_stripname, 80399e7bcd65Smrg# except this one can be used by m4 code that may be executed by configure, 80409e7bcd65Smrg# rather than the libtool script. 80419e7bcd65Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 80429e7bcd65SmrgAC_REQUIRE([_LT_DECL_SED]) 80439e7bcd65SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 80449e7bcd65Smrgfunc_stripname_cnf () 80459e7bcd65Smrg{ 80469e7bcd65Smrg case ${2} in 80479e7bcd65Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 80489e7bcd65Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 80499e7bcd65Smrg esac 80509e7bcd65Smrg} # func_stripname_cnf 80519e7bcd65Smrg])# _LT_FUNC_STRIPNAME_CNF 80529e7bcd65Smrg 80539e7bcd65Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 80549e7bcd65Smrg# --------------------------------- 80559e7bcd65Smrg# Figure out "hidden" library dependencies from verbose 80569e7bcd65Smrg# compiler output when linking a shared library. 80579e7bcd65Smrg# Parse the compiler output and extract the necessary 80589e7bcd65Smrg# objects, libraries and library flags. 80599e7bcd65Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 80609e7bcd65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 80619e7bcd65SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 80629e7bcd65Smrg# Dependencies to place before and after the object being linked: 80639e7bcd65Smrg_LT_TAGVAR(predep_objects, $1)= 80649e7bcd65Smrg_LT_TAGVAR(postdep_objects, $1)= 80659e7bcd65Smrg_LT_TAGVAR(predeps, $1)= 80669e7bcd65Smrg_LT_TAGVAR(postdeps, $1)= 80679e7bcd65Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 80689e7bcd65Smrg 80699e7bcd65Smrgdnl we can't use the lt_simple_compile_test_code here, 80709e7bcd65Smrgdnl because it contains code intended for an executable, 80719e7bcd65Smrgdnl not a library. It's possible we should let each 80729e7bcd65Smrgdnl tag define a new lt_????_link_test_code variable, 80739e7bcd65Smrgdnl but it's only used here... 80749e7bcd65Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 80759e7bcd65Smrgint a; 80769e7bcd65Smrgvoid foo (void) { a = 0; } 80779e7bcd65Smrg_LT_EOF 80789e7bcd65Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 80799e7bcd65Smrgclass Foo 80809e7bcd65Smrg{ 80819e7bcd65Smrgpublic: 80829e7bcd65Smrg Foo (void) { a = 0; } 80839e7bcd65Smrgprivate: 80849e7bcd65Smrg int a; 80859e7bcd65Smrg}; 80869e7bcd65Smrg_LT_EOF 80879e7bcd65Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 80889e7bcd65Smrg subroutine foo 80899e7bcd65Smrg implicit none 80909e7bcd65Smrg integer*4 a 80919e7bcd65Smrg a=0 80929e7bcd65Smrg return 80939e7bcd65Smrg end 80949e7bcd65Smrg_LT_EOF 80959e7bcd65Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 80969e7bcd65Smrg subroutine foo 80979e7bcd65Smrg implicit none 80989e7bcd65Smrg integer a 80999e7bcd65Smrg a=0 81009e7bcd65Smrg return 81019e7bcd65Smrg end 81029e7bcd65Smrg_LT_EOF 81039e7bcd65Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 81049e7bcd65Smrgpublic class foo { 81059e7bcd65Smrg private int a; 81069e7bcd65Smrg public void bar (void) { 81079e7bcd65Smrg a = 0; 81089e7bcd65Smrg } 81099e7bcd65Smrg}; 81109e7bcd65Smrg_LT_EOF 81119e7bcd65Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 81129e7bcd65Smrgpackage foo 81139e7bcd65Smrgfunc foo() { 81149e7bcd65Smrg} 81159e7bcd65Smrg_LT_EOF 81169e7bcd65Smrg]) 81179e7bcd65Smrg 81189e7bcd65Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 81199e7bcd65Smrgcase "$CC $CFLAGS " in #( 81209e7bcd65Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 81219e7bcd65Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 81229e7bcd65Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 81239e7bcd65Smrgesac 81249e7bcd65Smrg 81259e7bcd65Smrgdnl Parse the compiler output and extract the necessary 81269e7bcd65Smrgdnl objects, libraries and library flags. 81279e7bcd65Smrgif AC_TRY_EVAL(ac_compile); then 81289e7bcd65Smrg # Parse the compiler output and extract the necessary 81299e7bcd65Smrg # objects, libraries and library flags. 81309e7bcd65Smrg 81319e7bcd65Smrg # Sentinel used to keep track of whether or not we are before 81329e7bcd65Smrg # the conftest object file. 81339e7bcd65Smrg pre_test_object_deps_done=no 81349e7bcd65Smrg 81359e7bcd65Smrg for p in `eval "$output_verbose_link_cmd"`; do 81369e7bcd65Smrg case ${prev}${p} in 81379e7bcd65Smrg 81389e7bcd65Smrg -L* | -R* | -l*) 81399e7bcd65Smrg # Some compilers place space between "-{L,R}" and the path. 81409e7bcd65Smrg # Remove the space. 81419e7bcd65Smrg if test $p = "-L" || 81429e7bcd65Smrg test $p = "-R"; then 81439e7bcd65Smrg prev=$p 81449e7bcd65Smrg continue 81459e7bcd65Smrg fi 81469e7bcd65Smrg 81479e7bcd65Smrg # Expand the sysroot to ease extracting the directories later. 81489e7bcd65Smrg if test -z "$prev"; then 81499e7bcd65Smrg case $p in 81509e7bcd65Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 81519e7bcd65Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 81529e7bcd65Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 81539e7bcd65Smrg esac 81549e7bcd65Smrg fi 81559e7bcd65Smrg case $p in 81569e7bcd65Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 81579e7bcd65Smrg esac 81589e7bcd65Smrg if test "$pre_test_object_deps_done" = no; then 81599e7bcd65Smrg case ${prev} in 81609e7bcd65Smrg -L | -R) 81619e7bcd65Smrg # Internal compiler library paths should come after those 81629e7bcd65Smrg # provided the user. The postdeps already come after the 81639e7bcd65Smrg # user supplied libs so there is no need to process them. 81649e7bcd65Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 81659e7bcd65Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 81669e7bcd65Smrg else 81679e7bcd65Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 81689e7bcd65Smrg fi 81699e7bcd65Smrg ;; 81709e7bcd65Smrg # The "-l" case would never come before the object being 81719e7bcd65Smrg # linked, so don't bother handling this case. 81729e7bcd65Smrg esac 81739e7bcd65Smrg else 81749e7bcd65Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 81759e7bcd65Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 81769e7bcd65Smrg else 81779e7bcd65Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 81789e7bcd65Smrg fi 81799e7bcd65Smrg fi 81809e7bcd65Smrg prev= 81819e7bcd65Smrg ;; 81829e7bcd65Smrg 81839e7bcd65Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 81849e7bcd65Smrg *.$objext) 81859e7bcd65Smrg # This assumes that the test object file only shows up 81869e7bcd65Smrg # once in the compiler output. 81879e7bcd65Smrg if test "$p" = "conftest.$objext"; then 81889e7bcd65Smrg pre_test_object_deps_done=yes 81899e7bcd65Smrg continue 81909e7bcd65Smrg fi 81919e7bcd65Smrg 81929e7bcd65Smrg if test "$pre_test_object_deps_done" = no; then 81939e7bcd65Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 81949e7bcd65Smrg _LT_TAGVAR(predep_objects, $1)="$p" 81959e7bcd65Smrg else 81969e7bcd65Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 81979e7bcd65Smrg fi 81989e7bcd65Smrg else 81999e7bcd65Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 82009e7bcd65Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 82019e7bcd65Smrg else 82029e7bcd65Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 82039e7bcd65Smrg fi 82049e7bcd65Smrg fi 82059e7bcd65Smrg ;; 82069e7bcd65Smrg 82079e7bcd65Smrg *) ;; # Ignore the rest. 82089e7bcd65Smrg 82099e7bcd65Smrg esac 82109e7bcd65Smrg done 82119e7bcd65Smrg 82129e7bcd65Smrg # Clean up. 82139e7bcd65Smrg rm -f a.out a.exe 82149e7bcd65Smrgelse 82159e7bcd65Smrg echo "libtool.m4: error: problem compiling $1 test program" 82169e7bcd65Smrgfi 82179e7bcd65Smrg 82189e7bcd65Smrg$RM -f confest.$objext 82199e7bcd65SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 82209e7bcd65Smrg 82219e7bcd65Smrg# PORTME: override above test on systems where it is broken 82229e7bcd65Smrgm4_if([$1], [CXX], 82239e7bcd65Smrg[case $host_os in 82249e7bcd65Smrginterix[[3-9]]*) 82259e7bcd65Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 82269e7bcd65Smrg # hack all around it, let's just trust "g++" to DTRT. 82279e7bcd65Smrg _LT_TAGVAR(predep_objects,$1)= 82289e7bcd65Smrg _LT_TAGVAR(postdep_objects,$1)= 82299e7bcd65Smrg _LT_TAGVAR(postdeps,$1)= 82309e7bcd65Smrg ;; 82319e7bcd65Smrg 82329e7bcd65Smrglinux*) 82339e7bcd65Smrg case `$CC -V 2>&1 | sed 5q` in 82349e7bcd65Smrg *Sun\ C*) 82359e7bcd65Smrg # Sun C++ 5.9 82369e7bcd65Smrg 82379e7bcd65Smrg # The more standards-conforming stlport4 library is 82389e7bcd65Smrg # incompatible with the Cstd library. Avoid specifying 82399e7bcd65Smrg # it if it's in CXXFLAGS. Ignore libCrun as 82409e7bcd65Smrg # -library=stlport4 depends on it. 82419e7bcd65Smrg case " $CXX $CXXFLAGS " in 82429e7bcd65Smrg *" -library=stlport4 "*) 82439e7bcd65Smrg solaris_use_stlport4=yes 82449e7bcd65Smrg ;; 82459e7bcd65Smrg esac 82469e7bcd65Smrg 82479e7bcd65Smrg if test "$solaris_use_stlport4" != yes; then 82489e7bcd65Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 82499e7bcd65Smrg fi 82509e7bcd65Smrg ;; 82519e7bcd65Smrg esac 82529e7bcd65Smrg ;; 82539e7bcd65Smrg 82549e7bcd65Smrgsolaris*) 82559e7bcd65Smrg case $cc_basename in 82569e7bcd65Smrg CC* | sunCC*) 82579e7bcd65Smrg # The more standards-conforming stlport4 library is 82589e7bcd65Smrg # incompatible with the Cstd library. Avoid specifying 82599e7bcd65Smrg # it if it's in CXXFLAGS. Ignore libCrun as 82609e7bcd65Smrg # -library=stlport4 depends on it. 82619e7bcd65Smrg case " $CXX $CXXFLAGS " in 82629e7bcd65Smrg *" -library=stlport4 "*) 82639e7bcd65Smrg solaris_use_stlport4=yes 82649e7bcd65Smrg ;; 82659e7bcd65Smrg esac 82669e7bcd65Smrg 82679e7bcd65Smrg # Adding this requires a known-good setup of shared libraries for 82689e7bcd65Smrg # Sun compiler versions before 5.6, else PIC objects from an old 82699e7bcd65Smrg # archive will be linked into the output, leading to subtle bugs. 82709e7bcd65Smrg if test "$solaris_use_stlport4" != yes; then 82719e7bcd65Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 82729e7bcd65Smrg fi 82739e7bcd65Smrg ;; 82749e7bcd65Smrg esac 82759e7bcd65Smrg ;; 82769e7bcd65Smrgesac 82779e7bcd65Smrg]) 82789e7bcd65Smrg 82799e7bcd65Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 82809e7bcd65Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 82819e7bcd65Smrgesac 82829e7bcd65Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 82839e7bcd65Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 82849e7bcd65Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 82859e7bcd65Smrgfi 82869e7bcd65Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 82879e7bcd65Smrg [The directories searched by this compiler when creating a shared library]) 82889e7bcd65Smrg_LT_TAGDECL([], [predep_objects], [1], 82899e7bcd65Smrg [Dependencies to place before and after the objects being linked to 82909e7bcd65Smrg create a shared library]) 82919e7bcd65Smrg_LT_TAGDECL([], [postdep_objects], [1]) 82929e7bcd65Smrg_LT_TAGDECL([], [predeps], [1]) 82939e7bcd65Smrg_LT_TAGDECL([], [postdeps], [1]) 82949e7bcd65Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 82959e7bcd65Smrg [The library search path used internally by the compiler when linking 82969e7bcd65Smrg a shared library]) 82979e7bcd65Smrg])# _LT_SYS_HIDDEN_LIBDEPS 82989e7bcd65Smrg 82999e7bcd65Smrg 83009e7bcd65Smrg# _LT_LANG_F77_CONFIG([TAG]) 83019e7bcd65Smrg# -------------------------- 83029e7bcd65Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 83039e7bcd65Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 83049e7bcd65Smrg# to write the compiler configuration to `libtool'. 83059e7bcd65Smrgm4_defun([_LT_LANG_F77_CONFIG], 83069e7bcd65Smrg[AC_LANG_PUSH(Fortran 77) 83079e7bcd65Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 83089e7bcd65Smrg _lt_disable_F77=yes 83099e7bcd65Smrgfi 83109e7bcd65Smrg 83119e7bcd65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 83129e7bcd65Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 83139e7bcd65Smrg_LT_TAGVAR(always_export_symbols, $1)=no 83149e7bcd65Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 83159e7bcd65Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 83169e7bcd65Smrg_LT_TAGVAR(hardcode_direct, $1)=no 83179e7bcd65Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 83189e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 83199e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 83209e7bcd65Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 83219e7bcd65Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 83229e7bcd65Smrg_LT_TAGVAR(inherit_rpath, $1)=no 83239e7bcd65Smrg_LT_TAGVAR(module_cmds, $1)= 83249e7bcd65Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 83259e7bcd65Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 83269e7bcd65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 83279e7bcd65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 83289e7bcd65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 83299e7bcd65Smrg_LT_TAGVAR(no_undefined_flag, $1)= 83309e7bcd65Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 83319e7bcd65Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 83329e7bcd65Smrg 83339e7bcd65Smrg# Source file extension for f77 test sources. 83349e7bcd65Smrgac_ext=f 83359e7bcd65Smrg 83369e7bcd65Smrg# Object file extension for compiled f77 test sources. 83379e7bcd65Smrgobjext=o 83389e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext 83399e7bcd65Smrg 83409e7bcd65Smrg# No sense in running all these tests if we already determined that 83419e7bcd65Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 83429e7bcd65Smrg# are currently assumed to apply to all compilers on this platform, 83439e7bcd65Smrg# and will be corrupted by setting them based on a non-working compiler. 83449e7bcd65Smrgif test "$_lt_disable_F77" != yes; then 83459e7bcd65Smrg # Code to be used in simple compile tests 83469e7bcd65Smrg lt_simple_compile_test_code="\ 83479e7bcd65Smrg subroutine t 83489e7bcd65Smrg return 83499e7bcd65Smrg end 83509e7bcd65Smrg" 83519e7bcd65Smrg 83529e7bcd65Smrg # Code to be used in simple link tests 83539e7bcd65Smrg lt_simple_link_test_code="\ 83549e7bcd65Smrg program t 83559e7bcd65Smrg end 83569e7bcd65Smrg" 83579e7bcd65Smrg 83589e7bcd65Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 83599e7bcd65Smrg _LT_TAG_COMPILER 83609e7bcd65Smrg 83619e7bcd65Smrg # save warnings/boilerplate of simple test code 83629e7bcd65Smrg _LT_COMPILER_BOILERPLATE 83639e7bcd65Smrg _LT_LINKER_BOILERPLATE 83649e7bcd65Smrg 83659e7bcd65Smrg # Allow CC to be a program name with arguments. 83669e7bcd65Smrg lt_save_CC="$CC" 83679e7bcd65Smrg lt_save_GCC=$GCC 83689e7bcd65Smrg lt_save_CFLAGS=$CFLAGS 83699e7bcd65Smrg CC=${F77-"f77"} 83709e7bcd65Smrg CFLAGS=$FFLAGS 83719e7bcd65Smrg compiler=$CC 83729e7bcd65Smrg _LT_TAGVAR(compiler, $1)=$CC 83739e7bcd65Smrg _LT_CC_BASENAME([$compiler]) 83749e7bcd65Smrg GCC=$G77 83759e7bcd65Smrg if test -n "$compiler"; then 83769e7bcd65Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 83779e7bcd65Smrg AC_MSG_RESULT([$can_build_shared]) 83789e7bcd65Smrg 83799e7bcd65Smrg AC_MSG_CHECKING([whether to build shared libraries]) 83809e7bcd65Smrg test "$can_build_shared" = "no" && enable_shared=no 83819e7bcd65Smrg 83829e7bcd65Smrg # On AIX, shared libraries and static libraries use the same namespace, and 83839e7bcd65Smrg # are all built from PIC. 83849e7bcd65Smrg case $host_os in 83859e7bcd65Smrg aix3*) 83869e7bcd65Smrg test "$enable_shared" = yes && enable_static=no 83879e7bcd65Smrg if test -n "$RANLIB"; then 83889e7bcd65Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 83899e7bcd65Smrg postinstall_cmds='$RANLIB $lib' 83909e7bcd65Smrg fi 83919e7bcd65Smrg ;; 83929e7bcd65Smrg aix[[4-9]]*) 83939e7bcd65Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 83949e7bcd65Smrg test "$enable_shared" = yes && enable_static=no 83959e7bcd65Smrg fi 83969e7bcd65Smrg ;; 83979e7bcd65Smrg esac 83989e7bcd65Smrg AC_MSG_RESULT([$enable_shared]) 83999e7bcd65Smrg 84009e7bcd65Smrg AC_MSG_CHECKING([whether to build static libraries]) 84019e7bcd65Smrg # Make sure either enable_shared or enable_static is yes. 84029e7bcd65Smrg test "$enable_shared" = yes || enable_static=yes 84039e7bcd65Smrg AC_MSG_RESULT([$enable_static]) 84049e7bcd65Smrg 84059e7bcd65Smrg _LT_TAGVAR(GCC, $1)="$G77" 84069e7bcd65Smrg _LT_TAGVAR(LD, $1)="$LD" 84079e7bcd65Smrg 84089e7bcd65Smrg ## CAVEAT EMPTOR: 84099e7bcd65Smrg ## There is no encapsulation within the following macros, do not change 84109e7bcd65Smrg ## the running order or otherwise move them around unless you know exactly 84119e7bcd65Smrg ## what you are doing... 84129e7bcd65Smrg _LT_COMPILER_PIC($1) 84139e7bcd65Smrg _LT_COMPILER_C_O($1) 84149e7bcd65Smrg _LT_COMPILER_FILE_LOCKS($1) 84159e7bcd65Smrg _LT_LINKER_SHLIBS($1) 84169e7bcd65Smrg _LT_SYS_DYNAMIC_LINKER($1) 84179e7bcd65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 84189e7bcd65Smrg 84199e7bcd65Smrg _LT_CONFIG($1) 84209e7bcd65Smrg fi # test -n "$compiler" 84219e7bcd65Smrg 84229e7bcd65Smrg GCC=$lt_save_GCC 84239e7bcd65Smrg CC="$lt_save_CC" 84249e7bcd65Smrg CFLAGS="$lt_save_CFLAGS" 84259e7bcd65Smrgfi # test "$_lt_disable_F77" != yes 84269e7bcd65Smrg 84279e7bcd65SmrgAC_LANG_POP 84289e7bcd65Smrg])# _LT_LANG_F77_CONFIG 84299e7bcd65Smrg 84309e7bcd65Smrg 84319e7bcd65Smrg# _LT_LANG_FC_CONFIG([TAG]) 84329e7bcd65Smrg# ------------------------- 84339e7bcd65Smrg# Ensure that the configuration variables for a Fortran compiler are 84349e7bcd65Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 84359e7bcd65Smrg# to write the compiler configuration to `libtool'. 84369e7bcd65Smrgm4_defun([_LT_LANG_FC_CONFIG], 84379e7bcd65Smrg[AC_LANG_PUSH(Fortran) 84389e7bcd65Smrg 84399e7bcd65Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 84409e7bcd65Smrg _lt_disable_FC=yes 84419e7bcd65Smrgfi 84429e7bcd65Smrg 84439e7bcd65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 84449e7bcd65Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 84459e7bcd65Smrg_LT_TAGVAR(always_export_symbols, $1)=no 84469e7bcd65Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 84479e7bcd65Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 84489e7bcd65Smrg_LT_TAGVAR(hardcode_direct, $1)=no 84499e7bcd65Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 84509e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 84519e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 84529e7bcd65Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 84539e7bcd65Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 84549e7bcd65Smrg_LT_TAGVAR(inherit_rpath, $1)=no 84559e7bcd65Smrg_LT_TAGVAR(module_cmds, $1)= 84569e7bcd65Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 84579e7bcd65Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 84589e7bcd65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 84599e7bcd65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 84609e7bcd65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 84619e7bcd65Smrg_LT_TAGVAR(no_undefined_flag, $1)= 84629e7bcd65Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 84639e7bcd65Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 84649e7bcd65Smrg 84659e7bcd65Smrg# Source file extension for fc test sources. 84669e7bcd65Smrgac_ext=${ac_fc_srcext-f} 84679e7bcd65Smrg 84689e7bcd65Smrg# Object file extension for compiled fc test sources. 84699e7bcd65Smrgobjext=o 84709e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext 84719e7bcd65Smrg 84729e7bcd65Smrg# No sense in running all these tests if we already determined that 84739e7bcd65Smrg# the FC compiler isn't working. Some variables (like enable_shared) 84749e7bcd65Smrg# are currently assumed to apply to all compilers on this platform, 84759e7bcd65Smrg# and will be corrupted by setting them based on a non-working compiler. 84769e7bcd65Smrgif test "$_lt_disable_FC" != yes; then 84779e7bcd65Smrg # Code to be used in simple compile tests 84789e7bcd65Smrg lt_simple_compile_test_code="\ 84799e7bcd65Smrg subroutine t 84809e7bcd65Smrg return 84819e7bcd65Smrg end 84829e7bcd65Smrg" 84839e7bcd65Smrg 84849e7bcd65Smrg # Code to be used in simple link tests 84859e7bcd65Smrg lt_simple_link_test_code="\ 84869e7bcd65Smrg program t 84879e7bcd65Smrg end 84889e7bcd65Smrg" 84899e7bcd65Smrg 84909e7bcd65Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 84919e7bcd65Smrg _LT_TAG_COMPILER 84929e7bcd65Smrg 84939e7bcd65Smrg # save warnings/boilerplate of simple test code 84949e7bcd65Smrg _LT_COMPILER_BOILERPLATE 84959e7bcd65Smrg _LT_LINKER_BOILERPLATE 84969e7bcd65Smrg 84979e7bcd65Smrg # Allow CC to be a program name with arguments. 84989e7bcd65Smrg lt_save_CC="$CC" 84999e7bcd65Smrg lt_save_GCC=$GCC 85009e7bcd65Smrg lt_save_CFLAGS=$CFLAGS 85019e7bcd65Smrg CC=${FC-"f95"} 85029e7bcd65Smrg CFLAGS=$FCFLAGS 85039e7bcd65Smrg compiler=$CC 85049e7bcd65Smrg GCC=$ac_cv_fc_compiler_gnu 85059e7bcd65Smrg 85069e7bcd65Smrg _LT_TAGVAR(compiler, $1)=$CC 85079e7bcd65Smrg _LT_CC_BASENAME([$compiler]) 85089e7bcd65Smrg 85099e7bcd65Smrg if test -n "$compiler"; then 85109e7bcd65Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 85119e7bcd65Smrg AC_MSG_RESULT([$can_build_shared]) 85129e7bcd65Smrg 85139e7bcd65Smrg AC_MSG_CHECKING([whether to build shared libraries]) 85149e7bcd65Smrg test "$can_build_shared" = "no" && enable_shared=no 85159e7bcd65Smrg 85169e7bcd65Smrg # On AIX, shared libraries and static libraries use the same namespace, and 85179e7bcd65Smrg # are all built from PIC. 85189e7bcd65Smrg case $host_os in 85199e7bcd65Smrg aix3*) 85209e7bcd65Smrg test "$enable_shared" = yes && enable_static=no 85219e7bcd65Smrg if test -n "$RANLIB"; then 85229e7bcd65Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 85239e7bcd65Smrg postinstall_cmds='$RANLIB $lib' 85249e7bcd65Smrg fi 85259e7bcd65Smrg ;; 85269e7bcd65Smrg aix[[4-9]]*) 85279e7bcd65Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 85289e7bcd65Smrg test "$enable_shared" = yes && enable_static=no 85299e7bcd65Smrg fi 85309e7bcd65Smrg ;; 85319e7bcd65Smrg esac 85329e7bcd65Smrg AC_MSG_RESULT([$enable_shared]) 85339e7bcd65Smrg 85349e7bcd65Smrg AC_MSG_CHECKING([whether to build static libraries]) 85359e7bcd65Smrg # Make sure either enable_shared or enable_static is yes. 85369e7bcd65Smrg test "$enable_shared" = yes || enable_static=yes 85379e7bcd65Smrg AC_MSG_RESULT([$enable_static]) 85389e7bcd65Smrg 85399e7bcd65Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 85409e7bcd65Smrg _LT_TAGVAR(LD, $1)="$LD" 85419e7bcd65Smrg 85429e7bcd65Smrg ## CAVEAT EMPTOR: 85439e7bcd65Smrg ## There is no encapsulation within the following macros, do not change 85449e7bcd65Smrg ## the running order or otherwise move them around unless you know exactly 85459e7bcd65Smrg ## what you are doing... 85469e7bcd65Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 85479e7bcd65Smrg _LT_COMPILER_PIC($1) 85489e7bcd65Smrg _LT_COMPILER_C_O($1) 85499e7bcd65Smrg _LT_COMPILER_FILE_LOCKS($1) 85509e7bcd65Smrg _LT_LINKER_SHLIBS($1) 85519e7bcd65Smrg _LT_SYS_DYNAMIC_LINKER($1) 85529e7bcd65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 85539e7bcd65Smrg 85549e7bcd65Smrg _LT_CONFIG($1) 85559e7bcd65Smrg fi # test -n "$compiler" 85569e7bcd65Smrg 85579e7bcd65Smrg GCC=$lt_save_GCC 85589e7bcd65Smrg CC=$lt_save_CC 85599e7bcd65Smrg CFLAGS=$lt_save_CFLAGS 85609e7bcd65Smrgfi # test "$_lt_disable_FC" != yes 85619e7bcd65Smrg 85629e7bcd65SmrgAC_LANG_POP 85639e7bcd65Smrg])# _LT_LANG_FC_CONFIG 85649e7bcd65Smrg 85659e7bcd65Smrg 85669e7bcd65Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 85679e7bcd65Smrg# -------------------------- 85689e7bcd65Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 85699e7bcd65Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85709e7bcd65Smrg# to write the compiler configuration to `libtool'. 85719e7bcd65Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 85729e7bcd65Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 85739e7bcd65SmrgAC_LANG_SAVE 85749e7bcd65Smrg 85759e7bcd65Smrg# Source file extension for Java test sources. 85769e7bcd65Smrgac_ext=java 85779e7bcd65Smrg 85789e7bcd65Smrg# Object file extension for compiled Java test sources. 85799e7bcd65Smrgobjext=o 85809e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext 85819e7bcd65Smrg 85829e7bcd65Smrg# Code to be used in simple compile tests 85839e7bcd65Smrglt_simple_compile_test_code="class foo {}" 85849e7bcd65Smrg 85859e7bcd65Smrg# Code to be used in simple link tests 85869e7bcd65Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 85879e7bcd65Smrg 85889e7bcd65Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 85899e7bcd65Smrg_LT_TAG_COMPILER 85909e7bcd65Smrg 85919e7bcd65Smrg# save warnings/boilerplate of simple test code 85929e7bcd65Smrg_LT_COMPILER_BOILERPLATE 85939e7bcd65Smrg_LT_LINKER_BOILERPLATE 85949e7bcd65Smrg 85959e7bcd65Smrg# Allow CC to be a program name with arguments. 85969e7bcd65Smrglt_save_CC=$CC 85979e7bcd65Smrglt_save_CFLAGS=$CFLAGS 85989e7bcd65Smrglt_save_GCC=$GCC 85999e7bcd65SmrgGCC=yes 86009e7bcd65SmrgCC=${GCJ-"gcj"} 86019e7bcd65SmrgCFLAGS=$GCJFLAGS 86029e7bcd65Smrgcompiler=$CC 86039e7bcd65Smrg_LT_TAGVAR(compiler, $1)=$CC 86049e7bcd65Smrg_LT_TAGVAR(LD, $1)="$LD" 86059e7bcd65Smrg_LT_CC_BASENAME([$compiler]) 86069e7bcd65Smrg 86079e7bcd65Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 86089e7bcd65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 86099e7bcd65Smrg 86109e7bcd65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 86119e7bcd65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 86129e7bcd65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 86139e7bcd65Smrg 86149e7bcd65Smrgif test -n "$compiler"; then 86159e7bcd65Smrg _LT_COMPILER_NO_RTTI($1) 86169e7bcd65Smrg _LT_COMPILER_PIC($1) 86179e7bcd65Smrg _LT_COMPILER_C_O($1) 86189e7bcd65Smrg _LT_COMPILER_FILE_LOCKS($1) 86199e7bcd65Smrg _LT_LINKER_SHLIBS($1) 86209e7bcd65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 86219e7bcd65Smrg 86229e7bcd65Smrg _LT_CONFIG($1) 86239e7bcd65Smrgfi 86249e7bcd65Smrg 86259e7bcd65SmrgAC_LANG_RESTORE 86269e7bcd65Smrg 86279e7bcd65SmrgGCC=$lt_save_GCC 86289e7bcd65SmrgCC=$lt_save_CC 86299e7bcd65SmrgCFLAGS=$lt_save_CFLAGS 86309e7bcd65Smrg])# _LT_LANG_GCJ_CONFIG 86319e7bcd65Smrg 86329e7bcd65Smrg 86339e7bcd65Smrg# _LT_LANG_GO_CONFIG([TAG]) 86349e7bcd65Smrg# -------------------------- 86359e7bcd65Smrg# Ensure that the configuration variables for the GNU Go compiler 86369e7bcd65Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 86379e7bcd65Smrg# to write the compiler configuration to `libtool'. 86389e7bcd65Smrgm4_defun([_LT_LANG_GO_CONFIG], 86399e7bcd65Smrg[AC_REQUIRE([LT_PROG_GO])dnl 86409e7bcd65SmrgAC_LANG_SAVE 86419e7bcd65Smrg 86429e7bcd65Smrg# Source file extension for Go test sources. 86439e7bcd65Smrgac_ext=go 86449e7bcd65Smrg 86459e7bcd65Smrg# Object file extension for compiled Go test sources. 86469e7bcd65Smrgobjext=o 86479e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext 86489e7bcd65Smrg 86499e7bcd65Smrg# Code to be used in simple compile tests 86509e7bcd65Smrglt_simple_compile_test_code="package main; func main() { }" 86519e7bcd65Smrg 86529e7bcd65Smrg# Code to be used in simple link tests 86539e7bcd65Smrglt_simple_link_test_code='package main; func main() { }' 86549e7bcd65Smrg 86559e7bcd65Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 86569e7bcd65Smrg_LT_TAG_COMPILER 86579e7bcd65Smrg 86589e7bcd65Smrg# save warnings/boilerplate of simple test code 86599e7bcd65Smrg_LT_COMPILER_BOILERPLATE 86609e7bcd65Smrg_LT_LINKER_BOILERPLATE 86619e7bcd65Smrg 86629e7bcd65Smrg# Allow CC to be a program name with arguments. 86639e7bcd65Smrglt_save_CC=$CC 86649e7bcd65Smrglt_save_CFLAGS=$CFLAGS 86659e7bcd65Smrglt_save_GCC=$GCC 86669e7bcd65SmrgGCC=yes 86679e7bcd65SmrgCC=${GOC-"gccgo"} 86689e7bcd65SmrgCFLAGS=$GOFLAGS 86699e7bcd65Smrgcompiler=$CC 86709e7bcd65Smrg_LT_TAGVAR(compiler, $1)=$CC 86719e7bcd65Smrg_LT_TAGVAR(LD, $1)="$LD" 86729e7bcd65Smrg_LT_CC_BASENAME([$compiler]) 86739e7bcd65Smrg 86749e7bcd65Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 86759e7bcd65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 86769e7bcd65Smrg 86779e7bcd65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 86789e7bcd65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 86799e7bcd65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 86809e7bcd65Smrg 86819e7bcd65Smrgif test -n "$compiler"; then 86829e7bcd65Smrg _LT_COMPILER_NO_RTTI($1) 86839e7bcd65Smrg _LT_COMPILER_PIC($1) 86849e7bcd65Smrg _LT_COMPILER_C_O($1) 86859e7bcd65Smrg _LT_COMPILER_FILE_LOCKS($1) 86869e7bcd65Smrg _LT_LINKER_SHLIBS($1) 86879e7bcd65Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 86889e7bcd65Smrg 86899e7bcd65Smrg _LT_CONFIG($1) 86909e7bcd65Smrgfi 86919e7bcd65Smrg 86929e7bcd65SmrgAC_LANG_RESTORE 86939e7bcd65Smrg 86949e7bcd65SmrgGCC=$lt_save_GCC 86959e7bcd65SmrgCC=$lt_save_CC 86969e7bcd65SmrgCFLAGS=$lt_save_CFLAGS 86979e7bcd65Smrg])# _LT_LANG_GO_CONFIG 86989e7bcd65Smrg 86999e7bcd65Smrg 87009e7bcd65Smrg# _LT_LANG_RC_CONFIG([TAG]) 87019e7bcd65Smrg# ------------------------- 87029e7bcd65Smrg# Ensure that the configuration variables for the Windows resource compiler 87039e7bcd65Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 87049e7bcd65Smrg# to write the compiler configuration to `libtool'. 87059e7bcd65Smrgm4_defun([_LT_LANG_RC_CONFIG], 87069e7bcd65Smrg[AC_REQUIRE([LT_PROG_RC])dnl 87079e7bcd65SmrgAC_LANG_SAVE 87089e7bcd65Smrg 87099e7bcd65Smrg# Source file extension for RC test sources. 87109e7bcd65Smrgac_ext=rc 87119e7bcd65Smrg 87129e7bcd65Smrg# Object file extension for compiled RC test sources. 87139e7bcd65Smrgobjext=o 87149e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext 87159e7bcd65Smrg 87169e7bcd65Smrg# Code to be used in simple compile tests 87179e7bcd65Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 87189e7bcd65Smrg 87199e7bcd65Smrg# Code to be used in simple link tests 87209e7bcd65Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 87219e7bcd65Smrg 87229e7bcd65Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 87239e7bcd65Smrg_LT_TAG_COMPILER 87249e7bcd65Smrg 87259e7bcd65Smrg# save warnings/boilerplate of simple test code 87269e7bcd65Smrg_LT_COMPILER_BOILERPLATE 87279e7bcd65Smrg_LT_LINKER_BOILERPLATE 87289e7bcd65Smrg 87299e7bcd65Smrg# Allow CC to be a program name with arguments. 87309e7bcd65Smrglt_save_CC="$CC" 87319e7bcd65Smrglt_save_CFLAGS=$CFLAGS 87329e7bcd65Smrglt_save_GCC=$GCC 87339e7bcd65SmrgGCC= 87349e7bcd65SmrgCC=${RC-"windres"} 87359e7bcd65SmrgCFLAGS= 87369e7bcd65Smrgcompiler=$CC 87379e7bcd65Smrg_LT_TAGVAR(compiler, $1)=$CC 87389e7bcd65Smrg_LT_CC_BASENAME([$compiler]) 87399e7bcd65Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 87409e7bcd65Smrg 87419e7bcd65Smrgif test -n "$compiler"; then 87429e7bcd65Smrg : 87439e7bcd65Smrg _LT_CONFIG($1) 87449e7bcd65Smrgfi 87459e7bcd65Smrg 87469e7bcd65SmrgGCC=$lt_save_GCC 87479e7bcd65SmrgAC_LANG_RESTORE 87489e7bcd65SmrgCC=$lt_save_CC 87499e7bcd65SmrgCFLAGS=$lt_save_CFLAGS 87509e7bcd65Smrg])# _LT_LANG_RC_CONFIG 87519e7bcd65Smrg 87529e7bcd65Smrg 87539e7bcd65Smrg# LT_PROG_GCJ 87549e7bcd65Smrg# ----------- 87559e7bcd65SmrgAC_DEFUN([LT_PROG_GCJ], 87569e7bcd65Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 87579e7bcd65Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 87589e7bcd65Smrg [AC_CHECK_TOOL(GCJ, gcj,) 87599e7bcd65Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 87609e7bcd65Smrg AC_SUBST(GCJFLAGS)])])[]dnl 87619e7bcd65Smrg]) 87629e7bcd65Smrg 87639e7bcd65Smrg# Old name: 87649e7bcd65SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 87659e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 87669e7bcd65Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 87679e7bcd65Smrg 87689e7bcd65Smrg 87699e7bcd65Smrg# LT_PROG_GO 87709e7bcd65Smrg# ---------- 87719e7bcd65SmrgAC_DEFUN([LT_PROG_GO], 87729e7bcd65Smrg[AC_CHECK_TOOL(GOC, gccgo,) 87739e7bcd65Smrg]) 87749e7bcd65Smrg 87759e7bcd65Smrg 87769e7bcd65Smrg# LT_PROG_RC 87779e7bcd65Smrg# ---------- 87789e7bcd65SmrgAC_DEFUN([LT_PROG_RC], 87799e7bcd65Smrg[AC_CHECK_TOOL(RC, windres,) 87809e7bcd65Smrg]) 87819e7bcd65Smrg 87829e7bcd65Smrg# Old name: 87839e7bcd65SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 87849e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 87859e7bcd65Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 87869e7bcd65Smrg 87879e7bcd65Smrg 87889e7bcd65Smrg# _LT_DECL_EGREP 87899e7bcd65Smrg# -------------- 87909e7bcd65Smrg# If we don't have a new enough Autoconf to choose the best grep 87919e7bcd65Smrg# available, choose the one first in the user's PATH. 87929e7bcd65Smrgm4_defun([_LT_DECL_EGREP], 87939e7bcd65Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 87949e7bcd65SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 87959e7bcd65Smrgtest -z "$GREP" && GREP=grep 87969e7bcd65Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 87979e7bcd65Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 87989e7bcd65Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 87999e7bcd65Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 88009e7bcd65SmrgAC_SUBST([GREP]) 88019e7bcd65Smrg]) 88029e7bcd65Smrg 88039e7bcd65Smrg 88049e7bcd65Smrg# _LT_DECL_OBJDUMP 88059e7bcd65Smrg# -------------- 88069e7bcd65Smrg# If we don't have a new enough Autoconf to choose the best objdump 88079e7bcd65Smrg# available, choose the one first in the user's PATH. 88089e7bcd65Smrgm4_defun([_LT_DECL_OBJDUMP], 88099e7bcd65Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 88109e7bcd65Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 88119e7bcd65Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 88129e7bcd65SmrgAC_SUBST([OBJDUMP]) 88139e7bcd65Smrg]) 88149e7bcd65Smrg 88159e7bcd65Smrg# _LT_DECL_DLLTOOL 88169e7bcd65Smrg# ---------------- 88179e7bcd65Smrg# Ensure DLLTOOL variable is set. 88189e7bcd65Smrgm4_defun([_LT_DECL_DLLTOOL], 88199e7bcd65Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 88209e7bcd65Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 88219e7bcd65Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 88229e7bcd65SmrgAC_SUBST([DLLTOOL]) 88239e7bcd65Smrg]) 88249e7bcd65Smrg 88259e7bcd65Smrg# _LT_DECL_SED 88269e7bcd65Smrg# ------------ 88279e7bcd65Smrg# Check for a fully-functional sed program, that truncates 88289e7bcd65Smrg# as few characters as possible. Prefer GNU sed if found. 88299e7bcd65Smrgm4_defun([_LT_DECL_SED], 88309e7bcd65Smrg[AC_PROG_SED 88319e7bcd65Smrgtest -z "$SED" && SED=sed 88329e7bcd65SmrgXsed="$SED -e 1s/^X//" 88339e7bcd65Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 88349e7bcd65Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 88359e7bcd65Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 88369e7bcd65Smrg])# _LT_DECL_SED 88379e7bcd65Smrg 88389e7bcd65Smrgm4_ifndef([AC_PROG_SED], [ 88399e7bcd65Smrg# NOTE: This macro has been submitted for inclusion into # 88409e7bcd65Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 88419e7bcd65Smrg# a released version of Autoconf we should remove this # 88429e7bcd65Smrg# macro and use it instead. # 88439e7bcd65Smrg 88449e7bcd65Smrgm4_defun([AC_PROG_SED], 88459e7bcd65Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 88469e7bcd65SmrgAC_CACHE_VAL(lt_cv_path_SED, 88479e7bcd65Smrg[# Loop through the user's path and test for sed and gsed. 88489e7bcd65Smrg# Then use that list of sed's as ones to test for truncation. 88499e7bcd65Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 88509e7bcd65Smrgfor as_dir in $PATH 88519e7bcd65Smrgdo 88529e7bcd65Smrg IFS=$as_save_IFS 88539e7bcd65Smrg test -z "$as_dir" && as_dir=. 88549e7bcd65Smrg for lt_ac_prog in sed gsed; do 88559e7bcd65Smrg for ac_exec_ext in '' $ac_executable_extensions; do 88569e7bcd65Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 88579e7bcd65Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 88589e7bcd65Smrg fi 88599e7bcd65Smrg done 88609e7bcd65Smrg done 88619e7bcd65Smrgdone 88629e7bcd65SmrgIFS=$as_save_IFS 88639e7bcd65Smrglt_ac_max=0 88649e7bcd65Smrglt_ac_count=0 88659e7bcd65Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 88669e7bcd65Smrg# along with /bin/sed that truncates output. 88679e7bcd65Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 88689e7bcd65Smrg test ! -f $lt_ac_sed && continue 88699e7bcd65Smrg cat /dev/null > conftest.in 88709e7bcd65Smrg lt_ac_count=0 88719e7bcd65Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 88729e7bcd65Smrg # Check for GNU sed and select it if it is found. 88739e7bcd65Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 88749e7bcd65Smrg lt_cv_path_SED=$lt_ac_sed 88759e7bcd65Smrg break 88769e7bcd65Smrg fi 88779e7bcd65Smrg while true; do 88789e7bcd65Smrg cat conftest.in conftest.in >conftest.tmp 88799e7bcd65Smrg mv conftest.tmp conftest.in 88809e7bcd65Smrg cp conftest.in conftest.nl 88819e7bcd65Smrg echo >>conftest.nl 88829e7bcd65Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 88839e7bcd65Smrg cmp -s conftest.out conftest.nl || break 88849e7bcd65Smrg # 10000 chars as input seems more than enough 88859e7bcd65Smrg test $lt_ac_count -gt 10 && break 88869e7bcd65Smrg lt_ac_count=`expr $lt_ac_count + 1` 88879e7bcd65Smrg if test $lt_ac_count -gt $lt_ac_max; then 88889e7bcd65Smrg lt_ac_max=$lt_ac_count 88899e7bcd65Smrg lt_cv_path_SED=$lt_ac_sed 88909e7bcd65Smrg fi 88919e7bcd65Smrg done 88929e7bcd65Smrgdone 88939e7bcd65Smrg]) 88949e7bcd65SmrgSED=$lt_cv_path_SED 88959e7bcd65SmrgAC_SUBST([SED]) 88969e7bcd65SmrgAC_MSG_RESULT([$SED]) 88979e7bcd65Smrg])#AC_PROG_SED 88989e7bcd65Smrg])#m4_ifndef 88999e7bcd65Smrg 89009e7bcd65Smrg# Old name: 89019e7bcd65SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 89029e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 89039e7bcd65Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 89049e7bcd65Smrg 89059e7bcd65Smrg 89069e7bcd65Smrg# _LT_CHECK_SHELL_FEATURES 89079e7bcd65Smrg# ------------------------ 89089e7bcd65Smrg# Find out whether the shell is Bourne or XSI compatible, 89099e7bcd65Smrg# or has some other useful features. 89109e7bcd65Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 89119e7bcd65Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 89129e7bcd65Smrg# Try some XSI features 89139e7bcd65Smrgxsi_shell=no 89149e7bcd65Smrg( _lt_dummy="a/b/c" 89159e7bcd65Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 89169e7bcd65Smrg = c,a/b,b/c, \ 89179e7bcd65Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 89189e7bcd65Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 89199e7bcd65Smrg && xsi_shell=yes 89209e7bcd65SmrgAC_MSG_RESULT([$xsi_shell]) 89219e7bcd65Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 89229e7bcd65Smrg 89239e7bcd65SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 89249e7bcd65Smrglt_shell_append=no 89259e7bcd65Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 89269e7bcd65Smrg >/dev/null 2>&1 \ 89279e7bcd65Smrg && lt_shell_append=yes 89289e7bcd65SmrgAC_MSG_RESULT([$lt_shell_append]) 89299e7bcd65Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 89309e7bcd65Smrg 89319e7bcd65Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 89329e7bcd65Smrg lt_unset=unset 89339e7bcd65Smrgelse 89349e7bcd65Smrg lt_unset=false 89359e7bcd65Smrgfi 89369e7bcd65Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 89379e7bcd65Smrg 89389e7bcd65Smrg# test EBCDIC or ASCII 89399e7bcd65Smrgcase `echo X|tr X '\101'` in 89409e7bcd65Smrg A) # ASCII based system 89419e7bcd65Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 89429e7bcd65Smrg lt_SP2NL='tr \040 \012' 89439e7bcd65Smrg lt_NL2SP='tr \015\012 \040\040' 89449e7bcd65Smrg ;; 89459e7bcd65Smrg *) # EBCDIC based system 89469e7bcd65Smrg lt_SP2NL='tr \100 \n' 89479e7bcd65Smrg lt_NL2SP='tr \r\n \100\100' 89489e7bcd65Smrg ;; 89499e7bcd65Smrgesac 89509e7bcd65Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 89519e7bcd65Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 89529e7bcd65Smrg])# _LT_CHECK_SHELL_FEATURES 89539e7bcd65Smrg 89549e7bcd65Smrg 89559e7bcd65Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 89569e7bcd65Smrg# ------------------------------------------------------ 89579e7bcd65Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 89589e7bcd65Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 89599e7bcd65Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 89609e7bcd65Smrg[dnl { 89619e7bcd65Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 89629e7bcd65Smrg$1 ()\ 89639e7bcd65Smrg{\ 89649e7bcd65Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 89659e7bcd65Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 89669e7bcd65Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89679e7bcd65Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89689e7bcd65Smrgtest 0 -eq $? || _lt_function_replace_fail=: 89699e7bcd65Smrg]) 89709e7bcd65Smrg 89719e7bcd65Smrg 89729e7bcd65Smrg# _LT_PROG_REPLACE_SHELLFNS 89739e7bcd65Smrg# ------------------------- 89749e7bcd65Smrg# Replace existing portable implementations of several shell functions with 89759e7bcd65Smrg# equivalent extended shell implementations where those features are available.. 89769e7bcd65Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 89779e7bcd65Smrg[if test x"$xsi_shell" = xyes; then 89789e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 89799e7bcd65Smrg case ${1} in 89809e7bcd65Smrg */*) func_dirname_result="${1%/*}${2}" ;; 89819e7bcd65Smrg * ) func_dirname_result="${3}" ;; 89829e7bcd65Smrg esac]) 89839e7bcd65Smrg 89849e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 89859e7bcd65Smrg func_basename_result="${1##*/}"]) 89869e7bcd65Smrg 89879e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 89889e7bcd65Smrg case ${1} in 89899e7bcd65Smrg */*) func_dirname_result="${1%/*}${2}" ;; 89909e7bcd65Smrg * ) func_dirname_result="${3}" ;; 89919e7bcd65Smrg esac 89929e7bcd65Smrg func_basename_result="${1##*/}"]) 89939e7bcd65Smrg 89949e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 89959e7bcd65Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 89969e7bcd65Smrg # positional parameters, so assign one to ordinary parameter first. 89979e7bcd65Smrg func_stripname_result=${3} 89989e7bcd65Smrg func_stripname_result=${func_stripname_result#"${1}"} 89999e7bcd65Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 90009e7bcd65Smrg 90019e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 90029e7bcd65Smrg func_split_long_opt_name=${1%%=*} 90039e7bcd65Smrg func_split_long_opt_arg=${1#*=}]) 90049e7bcd65Smrg 90059e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 90069e7bcd65Smrg func_split_short_opt_arg=${1#??} 90079e7bcd65Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 90089e7bcd65Smrg 90099e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 90109e7bcd65Smrg case ${1} in 90119e7bcd65Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 90129e7bcd65Smrg *) func_lo2o_result=${1} ;; 90139e7bcd65Smrg esac]) 90149e7bcd65Smrg 90159e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 90169e7bcd65Smrg 90179e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 90189e7bcd65Smrg 90199e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 90209e7bcd65Smrgfi 90219e7bcd65Smrg 90229e7bcd65Smrgif test x"$lt_shell_append" = xyes; then 90239e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 90249e7bcd65Smrg 90259e7bcd65Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 90269e7bcd65Smrg func_quote_for_eval "${2}" 90279e7bcd65Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 90289e7bcd65Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 90299e7bcd65Smrg 90309e7bcd65Smrg # Save a `func_append' function call where possible by direct use of '+=' 90319e7bcd65Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 90329e7bcd65Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 90339e7bcd65Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 90349e7bcd65Smrg test 0 -eq $? || _lt_function_replace_fail=: 90359e7bcd65Smrgelse 90369e7bcd65Smrg # Save a `func_append' function call even when '+=' is not available 90379e7bcd65Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 90389e7bcd65Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 90399e7bcd65Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 90409e7bcd65Smrg test 0 -eq $? || _lt_function_replace_fail=: 90419e7bcd65Smrgfi 90429e7bcd65Smrg 90439e7bcd65Smrgif test x"$_lt_function_replace_fail" = x":"; then 90449e7bcd65Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 90459e7bcd65Smrgfi 90469e7bcd65Smrg]) 90479e7bcd65Smrg 90489e7bcd65Smrg# _LT_PATH_CONVERSION_FUNCTIONS 90499e7bcd65Smrg# ----------------------------- 90509e7bcd65Smrg# Determine which file name conversion functions should be used by 90519e7bcd65Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 90529e7bcd65Smrg# for certain cross-compile configurations and native mingw. 90539e7bcd65Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 90549e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 90559e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 90569e7bcd65SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 90579e7bcd65SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 90589e7bcd65Smrg[case $host in 90599e7bcd65Smrg *-*-mingw* ) 90609e7bcd65Smrg case $build in 90619e7bcd65Smrg *-*-mingw* ) # actually msys 90629e7bcd65Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 90639e7bcd65Smrg ;; 90649e7bcd65Smrg *-*-cygwin* ) 90659e7bcd65Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 90669e7bcd65Smrg ;; 90679e7bcd65Smrg * ) # otherwise, assume *nix 90689e7bcd65Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 90699e7bcd65Smrg ;; 90709e7bcd65Smrg esac 90719e7bcd65Smrg ;; 90729e7bcd65Smrg *-*-cygwin* ) 90739e7bcd65Smrg case $build in 90749e7bcd65Smrg *-*-mingw* ) # actually msys 90759e7bcd65Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 90769e7bcd65Smrg ;; 90779e7bcd65Smrg *-*-cygwin* ) 90789e7bcd65Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 90799e7bcd65Smrg ;; 90809e7bcd65Smrg * ) # otherwise, assume *nix 90819e7bcd65Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 90829e7bcd65Smrg ;; 90839e7bcd65Smrg esac 90849e7bcd65Smrg ;; 90859e7bcd65Smrg * ) # unhandled hosts (and "normal" native builds) 90869e7bcd65Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 90879e7bcd65Smrg ;; 90889e7bcd65Smrgesac 90899e7bcd65Smrg]) 90909e7bcd65Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 90919e7bcd65SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 90929e7bcd65Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 90939e7bcd65Smrg [0], [convert $build file names to $host format])dnl 90949e7bcd65Smrg 90959e7bcd65SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 90969e7bcd65SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 90979e7bcd65Smrg[#assume ordinary cross tools, or native build. 90989e7bcd65Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 90999e7bcd65Smrgcase $host in 91009e7bcd65Smrg *-*-mingw* ) 91019e7bcd65Smrg case $build in 91029e7bcd65Smrg *-*-mingw* ) # actually msys 91039e7bcd65Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 91049e7bcd65Smrg ;; 91059e7bcd65Smrg esac 91069e7bcd65Smrg ;; 91079e7bcd65Smrgesac 91089e7bcd65Smrg]) 91099e7bcd65Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 91109e7bcd65SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 91119e7bcd65Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 91129e7bcd65Smrg [0], [convert $build files to toolchain format])dnl 91139e7bcd65Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 91149e7bcd65Smrg 91159e7bcd65Smrg# Helper functions for option handling. -*- Autoconf -*- 91169e7bcd65Smrg# 91179e7bcd65Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 91189e7bcd65Smrg# Inc. 91199e7bcd65Smrg# Written by Gary V. Vaughan, 2004 91209e7bcd65Smrg# 91219e7bcd65Smrg# This file is free software; the Free Software Foundation gives 91229e7bcd65Smrg# unlimited permission to copy and/or distribute it, with or without 91239e7bcd65Smrg# modifications, as long as this notice is preserved. 91249e7bcd65Smrg 91259e7bcd65Smrg# serial 7 ltoptions.m4 91269e7bcd65Smrg 91279e7bcd65Smrg# This is to help aclocal find these macros, as it can't see m4_define. 91289e7bcd65SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 91299e7bcd65Smrg 91309e7bcd65Smrg 91319e7bcd65Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 91329e7bcd65Smrg# ------------------------------------------ 91339e7bcd65Smrgm4_define([_LT_MANGLE_OPTION], 91349e7bcd65Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 91359e7bcd65Smrg 91369e7bcd65Smrg 91379e7bcd65Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 91389e7bcd65Smrg# --------------------------------------- 91399e7bcd65Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 91409e7bcd65Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 91419e7bcd65Smrg# saved as a flag. 91429e7bcd65Smrgm4_define([_LT_SET_OPTION], 91439e7bcd65Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 91449e7bcd65Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 91459e7bcd65Smrg _LT_MANGLE_DEFUN([$1], [$2]), 91469e7bcd65Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 91479e7bcd65Smrg]) 91489e7bcd65Smrg 91499e7bcd65Smrg 91509e7bcd65Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 91519e7bcd65Smrg# ------------------------------------------------------------ 91529e7bcd65Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 91539e7bcd65Smrgm4_define([_LT_IF_OPTION], 91549e7bcd65Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 91559e7bcd65Smrg 91569e7bcd65Smrg 91579e7bcd65Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 91589e7bcd65Smrg# ------------------------------------------------------- 91599e7bcd65Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 91609e7bcd65Smrg# are set. 91619e7bcd65Smrgm4_define([_LT_UNLESS_OPTIONS], 91629e7bcd65Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 91639e7bcd65Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 91649e7bcd65Smrg [m4_define([$0_found])])])[]dnl 91659e7bcd65Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 91669e7bcd65Smrg])[]dnl 91679e7bcd65Smrg]) 91689e7bcd65Smrg 91699e7bcd65Smrg 91709e7bcd65Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 91719e7bcd65Smrg# ---------------------------------------- 91729e7bcd65Smrg# OPTION-LIST is a space-separated list of Libtool options associated 91739e7bcd65Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 91749e7bcd65Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 91759e7bcd65Smrg# the unknown option and exit. 91769e7bcd65Smrgm4_defun([_LT_SET_OPTIONS], 91779e7bcd65Smrg[# Set options 91789e7bcd65Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 91799e7bcd65Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 91809e7bcd65Smrg 91819e7bcd65Smrgm4_if([$1],[LT_INIT],[ 91829e7bcd65Smrg dnl 91839e7bcd65Smrg dnl Simply set some default values (i.e off) if boolean options were not 91849e7bcd65Smrg dnl specified: 91859e7bcd65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 91869e7bcd65Smrg ]) 91879e7bcd65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 91889e7bcd65Smrg ]) 91899e7bcd65Smrg dnl 91909e7bcd65Smrg dnl If no reference was made to various pairs of opposing options, then 91919e7bcd65Smrg dnl we run the default mode handler for the pair. For example, if neither 91929e7bcd65Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 91939e7bcd65Smrg dnl archives by default: 91949e7bcd65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 91959e7bcd65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 91969e7bcd65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 91979e7bcd65Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 91989e7bcd65Smrg [_LT_ENABLE_FAST_INSTALL]) 91999e7bcd65Smrg ]) 92009e7bcd65Smrg])# _LT_SET_OPTIONS 92019e7bcd65Smrg 92029e7bcd65Smrg 92039e7bcd65Smrg 92049e7bcd65Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 92059e7bcd65Smrg# ----------------------------------------- 92069e7bcd65Smrgm4_define([_LT_MANGLE_DEFUN], 92079e7bcd65Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 92089e7bcd65Smrg 92099e7bcd65Smrg 92109e7bcd65Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 92119e7bcd65Smrg# ----------------------------------------------- 92129e7bcd65Smrgm4_define([LT_OPTION_DEFINE], 92139e7bcd65Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 92149e7bcd65Smrg])# LT_OPTION_DEFINE 92159e7bcd65Smrg 92169e7bcd65Smrg 92179e7bcd65Smrg# dlopen 92189e7bcd65Smrg# ------ 92199e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 92209e7bcd65Smrg]) 92219e7bcd65Smrg 92229e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 92239e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 92249e7bcd65SmrgAC_DIAGNOSE([obsolete], 92259e7bcd65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 92269e7bcd65Smrgput the `dlopen' option into LT_INIT's first parameter.]) 92279e7bcd65Smrg]) 92289e7bcd65Smrg 92299e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 92309e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 92319e7bcd65Smrg 92329e7bcd65Smrg 92339e7bcd65Smrg# win32-dll 92349e7bcd65Smrg# --------- 92359e7bcd65Smrg# Declare package support for building win32 dll's. 92369e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 92379e7bcd65Smrg[enable_win32_dll=yes 92389e7bcd65Smrg 92399e7bcd65Smrgcase $host in 92409e7bcd65Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 92419e7bcd65Smrg AC_CHECK_TOOL(AS, as, false) 92429e7bcd65Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 92439e7bcd65Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 92449e7bcd65Smrg ;; 92459e7bcd65Smrgesac 92469e7bcd65Smrg 92479e7bcd65Smrgtest -z "$AS" && AS=as 92489e7bcd65Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 92499e7bcd65Smrg 92509e7bcd65Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 92519e7bcd65Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 92529e7bcd65Smrg 92539e7bcd65Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 92549e7bcd65Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 92559e7bcd65Smrg])# win32-dll 92569e7bcd65Smrg 92579e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 92589e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 92599e7bcd65Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 92609e7bcd65SmrgAC_DIAGNOSE([obsolete], 92619e7bcd65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 92629e7bcd65Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 92639e7bcd65Smrg]) 92649e7bcd65Smrg 92659e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 92669e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 92679e7bcd65Smrg 92689e7bcd65Smrg 92699e7bcd65Smrg# _LT_ENABLE_SHARED([DEFAULT]) 92709e7bcd65Smrg# ---------------------------- 92719e7bcd65Smrg# implement the --enable-shared flag, and supports the `shared' and 92729e7bcd65Smrg# `disable-shared' LT_INIT options. 92739e7bcd65Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92749e7bcd65Smrgm4_define([_LT_ENABLE_SHARED], 92759e7bcd65Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 92769e7bcd65SmrgAC_ARG_ENABLE([shared], 92779e7bcd65Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 92789e7bcd65Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 92799e7bcd65Smrg [p=${PACKAGE-default} 92809e7bcd65Smrg case $enableval in 92819e7bcd65Smrg yes) enable_shared=yes ;; 92829e7bcd65Smrg no) enable_shared=no ;; 92839e7bcd65Smrg *) 92849e7bcd65Smrg enable_shared=no 92859e7bcd65Smrg # Look at the argument we got. We use all the common list separators. 92869e7bcd65Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92879e7bcd65Smrg for pkg in $enableval; do 92889e7bcd65Smrg IFS="$lt_save_ifs" 92899e7bcd65Smrg if test "X$pkg" = "X$p"; then 92909e7bcd65Smrg enable_shared=yes 92919e7bcd65Smrg fi 92929e7bcd65Smrg done 92939e7bcd65Smrg IFS="$lt_save_ifs" 92949e7bcd65Smrg ;; 92959e7bcd65Smrg esac], 92969e7bcd65Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 92979e7bcd65Smrg 92989e7bcd65Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 92999e7bcd65Smrg [Whether or not to build shared libraries]) 93009e7bcd65Smrg])# _LT_ENABLE_SHARED 93019e7bcd65Smrg 93029e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 93039e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 93049e7bcd65Smrg 93059e7bcd65Smrg# Old names: 93069e7bcd65SmrgAC_DEFUN([AC_ENABLE_SHARED], 93079e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 93089e7bcd65Smrg]) 93099e7bcd65Smrg 93109e7bcd65SmrgAC_DEFUN([AC_DISABLE_SHARED], 93119e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 93129e7bcd65Smrg]) 93139e7bcd65Smrg 93149e7bcd65SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 93159e7bcd65SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 93169e7bcd65Smrg 93179e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 93189e7bcd65Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 93199e7bcd65Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 93209e7bcd65Smrg 93219e7bcd65Smrg 93229e7bcd65Smrg 93239e7bcd65Smrg# _LT_ENABLE_STATIC([DEFAULT]) 93249e7bcd65Smrg# ---------------------------- 93259e7bcd65Smrg# implement the --enable-static flag, and support the `static' and 93269e7bcd65Smrg# `disable-static' LT_INIT options. 93279e7bcd65Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 93289e7bcd65Smrgm4_define([_LT_ENABLE_STATIC], 93299e7bcd65Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 93309e7bcd65SmrgAC_ARG_ENABLE([static], 93319e7bcd65Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 93329e7bcd65Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 93339e7bcd65Smrg [p=${PACKAGE-default} 93349e7bcd65Smrg case $enableval in 93359e7bcd65Smrg yes) enable_static=yes ;; 93369e7bcd65Smrg no) enable_static=no ;; 93379e7bcd65Smrg *) 93389e7bcd65Smrg enable_static=no 93399e7bcd65Smrg # Look at the argument we got. We use all the common list separators. 93409e7bcd65Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93419e7bcd65Smrg for pkg in $enableval; do 93429e7bcd65Smrg IFS="$lt_save_ifs" 93439e7bcd65Smrg if test "X$pkg" = "X$p"; then 93449e7bcd65Smrg enable_static=yes 93459e7bcd65Smrg fi 93469e7bcd65Smrg done 93479e7bcd65Smrg IFS="$lt_save_ifs" 93489e7bcd65Smrg ;; 93499e7bcd65Smrg esac], 93509e7bcd65Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 93519e7bcd65Smrg 93529e7bcd65Smrg _LT_DECL([build_old_libs], [enable_static], [0], 93539e7bcd65Smrg [Whether or not to build static libraries]) 93549e7bcd65Smrg])# _LT_ENABLE_STATIC 93559e7bcd65Smrg 93569e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 93579e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 93589e7bcd65Smrg 93599e7bcd65Smrg# Old names: 93609e7bcd65SmrgAC_DEFUN([AC_ENABLE_STATIC], 93619e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 93629e7bcd65Smrg]) 93639e7bcd65Smrg 93649e7bcd65SmrgAC_DEFUN([AC_DISABLE_STATIC], 93659e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 93669e7bcd65Smrg]) 93679e7bcd65Smrg 93689e7bcd65SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 93699e7bcd65SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 93709e7bcd65Smrg 93719e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 93729e7bcd65Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 93739e7bcd65Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 93749e7bcd65Smrg 93759e7bcd65Smrg 93769e7bcd65Smrg 93779e7bcd65Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 93789e7bcd65Smrg# ---------------------------------- 93799e7bcd65Smrg# implement the --enable-fast-install flag, and support the `fast-install' 93809e7bcd65Smrg# and `disable-fast-install' LT_INIT options. 93819e7bcd65Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 93829e7bcd65Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 93839e7bcd65Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 93849e7bcd65SmrgAC_ARG_ENABLE([fast-install], 93859e7bcd65Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 93869e7bcd65Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 93879e7bcd65Smrg [p=${PACKAGE-default} 93889e7bcd65Smrg case $enableval in 93899e7bcd65Smrg yes) enable_fast_install=yes ;; 93909e7bcd65Smrg no) enable_fast_install=no ;; 93919e7bcd65Smrg *) 93929e7bcd65Smrg enable_fast_install=no 93939e7bcd65Smrg # Look at the argument we got. We use all the common list separators. 93949e7bcd65Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93959e7bcd65Smrg for pkg in $enableval; do 93969e7bcd65Smrg IFS="$lt_save_ifs" 93979e7bcd65Smrg if test "X$pkg" = "X$p"; then 93989e7bcd65Smrg enable_fast_install=yes 93999e7bcd65Smrg fi 94009e7bcd65Smrg done 94019e7bcd65Smrg IFS="$lt_save_ifs" 94029e7bcd65Smrg ;; 94039e7bcd65Smrg esac], 94049e7bcd65Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 94059e7bcd65Smrg 94069e7bcd65Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 94079e7bcd65Smrg [Whether or not to optimize for fast installation])dnl 94089e7bcd65Smrg])# _LT_ENABLE_FAST_INSTALL 94099e7bcd65Smrg 94109e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 94119e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 94129e7bcd65Smrg 94139e7bcd65Smrg# Old names: 94149e7bcd65SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 94159e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 94169e7bcd65SmrgAC_DIAGNOSE([obsolete], 94179e7bcd65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 94189e7bcd65Smrgthe `fast-install' option into LT_INIT's first parameter.]) 94199e7bcd65Smrg]) 94209e7bcd65Smrg 94219e7bcd65SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 94229e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 94239e7bcd65SmrgAC_DIAGNOSE([obsolete], 94249e7bcd65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 94259e7bcd65Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 94269e7bcd65Smrg]) 94279e7bcd65Smrg 94289e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 94299e7bcd65Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 94309e7bcd65Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 94319e7bcd65Smrg 94329e7bcd65Smrg 94339e7bcd65Smrg# _LT_WITH_PIC([MODE]) 94349e7bcd65Smrg# -------------------- 94359e7bcd65Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 94369e7bcd65Smrg# LT_INIT options. 94379e7bcd65Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 94389e7bcd65Smrgm4_define([_LT_WITH_PIC], 94399e7bcd65Smrg[AC_ARG_WITH([pic], 94409e7bcd65Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 94419e7bcd65Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 94429e7bcd65Smrg [lt_p=${PACKAGE-default} 94439e7bcd65Smrg case $withval in 94449e7bcd65Smrg yes|no) pic_mode=$withval ;; 94459e7bcd65Smrg *) 94469e7bcd65Smrg pic_mode=default 94479e7bcd65Smrg # Look at the argument we got. We use all the common list separators. 94489e7bcd65Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 94499e7bcd65Smrg for lt_pkg in $withval; do 94509e7bcd65Smrg IFS="$lt_save_ifs" 94519e7bcd65Smrg if test "X$lt_pkg" = "X$lt_p"; then 94529e7bcd65Smrg pic_mode=yes 94539e7bcd65Smrg fi 94549e7bcd65Smrg done 94559e7bcd65Smrg IFS="$lt_save_ifs" 94569e7bcd65Smrg ;; 94579e7bcd65Smrg esac], 94589e7bcd65Smrg [pic_mode=default]) 94599e7bcd65Smrg 94609e7bcd65Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 94619e7bcd65Smrg 94629e7bcd65Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 94639e7bcd65Smrg])# _LT_WITH_PIC 94649e7bcd65Smrg 94659e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 94669e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 94679e7bcd65Smrg 94689e7bcd65Smrg# Old name: 94699e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 94709e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 94719e7bcd65SmrgAC_DIAGNOSE([obsolete], 94729e7bcd65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 94739e7bcd65Smrgput the `pic-only' option into LT_INIT's first parameter.]) 94749e7bcd65Smrg]) 94759e7bcd65Smrg 94769e7bcd65Smrgdnl aclocal-1.4 backwards compatibility: 94779e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 94789e7bcd65Smrg 94799e7bcd65Smrg 94809e7bcd65Smrgm4_define([_LTDL_MODE], []) 94819e7bcd65SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 94829e7bcd65Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 94839e7bcd65SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 94849e7bcd65Smrg [m4_define([_LTDL_MODE], [recursive])]) 94859e7bcd65SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 94869e7bcd65Smrg [m4_define([_LTDL_MODE], [subproject])]) 94879e7bcd65Smrg 94889e7bcd65Smrgm4_define([_LTDL_TYPE], []) 94899e7bcd65SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 94909e7bcd65Smrg [m4_define([_LTDL_TYPE], [installable])]) 94919e7bcd65SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 94929e7bcd65Smrg [m4_define([_LTDL_TYPE], [convenience])]) 94939e7bcd65Smrg 94949e7bcd65Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 94959e7bcd65Smrg# 94969e7bcd65Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 94979e7bcd65Smrg# Written by Gary V. Vaughan, 2004 94989e7bcd65Smrg# 94999e7bcd65Smrg# This file is free software; the Free Software Foundation gives 95009e7bcd65Smrg# unlimited permission to copy and/or distribute it, with or without 95019e7bcd65Smrg# modifications, as long as this notice is preserved. 95029e7bcd65Smrg 95039e7bcd65Smrg# serial 6 ltsugar.m4 95049e7bcd65Smrg 95059e7bcd65Smrg# This is to help aclocal find these macros, as it can't see m4_define. 95069e7bcd65SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 95079e7bcd65Smrg 95089e7bcd65Smrg 95099e7bcd65Smrg# lt_join(SEP, ARG1, [ARG2...]) 95109e7bcd65Smrg# ----------------------------- 95119e7bcd65Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 95129e7bcd65Smrg# associated separator. 95139e7bcd65Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 95149e7bcd65Smrg# versions in m4sugar had bugs. 95159e7bcd65Smrgm4_define([lt_join], 95169e7bcd65Smrg[m4_if([$#], [1], [], 95179e7bcd65Smrg [$#], [2], [[$2]], 95189e7bcd65Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 95199e7bcd65Smrgm4_define([_lt_join], 95209e7bcd65Smrg[m4_if([$#$2], [2], [], 95219e7bcd65Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 95229e7bcd65Smrg 95239e7bcd65Smrg 95249e7bcd65Smrg# lt_car(LIST) 95259e7bcd65Smrg# lt_cdr(LIST) 95269e7bcd65Smrg# ------------ 95279e7bcd65Smrg# Manipulate m4 lists. 95289e7bcd65Smrg# These macros are necessary as long as will still need to support 95299e7bcd65Smrg# Autoconf-2.59 which quotes differently. 95309e7bcd65Smrgm4_define([lt_car], [[$1]]) 95319e7bcd65Smrgm4_define([lt_cdr], 95329e7bcd65Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 95339e7bcd65Smrg [$#], 1, [], 95349e7bcd65Smrg [m4_dquote(m4_shift($@))])]) 95359e7bcd65Smrgm4_define([lt_unquote], $1) 95369e7bcd65Smrg 95379e7bcd65Smrg 95389e7bcd65Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 95399e7bcd65Smrg# ------------------------------------------ 95409e7bcd65Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 95419e7bcd65Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 95429e7bcd65Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 95439e7bcd65Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 95449e7bcd65Smrg# than defined and empty). 95459e7bcd65Smrg# 95469e7bcd65Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 95479e7bcd65Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 95489e7bcd65Smrgm4_define([lt_append], 95499e7bcd65Smrg[m4_define([$1], 95509e7bcd65Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 95519e7bcd65Smrg 95529e7bcd65Smrg 95539e7bcd65Smrg 95549e7bcd65Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 95559e7bcd65Smrg# ---------------------------------------------------------- 95569e7bcd65Smrg# Produce a SEP delimited list of all paired combinations of elements of 95579e7bcd65Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 95589e7bcd65Smrg# has the form PREFIXmINFIXSUFFIXn. 95599e7bcd65Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 95609e7bcd65Smrgm4_define([lt_combine], 95619e7bcd65Smrg[m4_if(m4_eval([$# > 3]), [1], 95629e7bcd65Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 95639e7bcd65Smrg[[m4_foreach([_Lt_prefix], [$2], 95649e7bcd65Smrg [m4_foreach([_Lt_suffix], 95659e7bcd65Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 95669e7bcd65Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 95679e7bcd65Smrg 95689e7bcd65Smrg 95699e7bcd65Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 95709e7bcd65Smrg# ----------------------------------------------------------------------- 95719e7bcd65Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 95729e7bcd65Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 95739e7bcd65Smrgm4_define([lt_if_append_uniq], 95749e7bcd65Smrg[m4_ifdef([$1], 95759e7bcd65Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 95769e7bcd65Smrg [lt_append([$1], [$2], [$3])$4], 95779e7bcd65Smrg [$5])], 95789e7bcd65Smrg [lt_append([$1], [$2], [$3])$4])]) 95799e7bcd65Smrg 95809e7bcd65Smrg 95819e7bcd65Smrg# lt_dict_add(DICT, KEY, VALUE) 95829e7bcd65Smrg# ----------------------------- 95839e7bcd65Smrgm4_define([lt_dict_add], 95849e7bcd65Smrg[m4_define([$1($2)], [$3])]) 95859e7bcd65Smrg 95869e7bcd65Smrg 95879e7bcd65Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 95889e7bcd65Smrg# -------------------------------------------- 95899e7bcd65Smrgm4_define([lt_dict_add_subkey], 95909e7bcd65Smrg[m4_define([$1($2:$3)], [$4])]) 95919e7bcd65Smrg 95929e7bcd65Smrg 95939e7bcd65Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 95949e7bcd65Smrg# ---------------------------------- 95959e7bcd65Smrgm4_define([lt_dict_fetch], 95969e7bcd65Smrg[m4_ifval([$3], 95979e7bcd65Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 95989e7bcd65Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 95999e7bcd65Smrg 96009e7bcd65Smrg 96019e7bcd65Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 96029e7bcd65Smrg# ----------------------------------------------------------------- 96039e7bcd65Smrgm4_define([lt_if_dict_fetch], 96049e7bcd65Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 96059e7bcd65Smrg [$5], 96069e7bcd65Smrg [$6])]) 96079e7bcd65Smrg 96089e7bcd65Smrg 96099e7bcd65Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 96109e7bcd65Smrg# -------------------------------------------------------------- 96119e7bcd65Smrgm4_define([lt_dict_filter], 96129e7bcd65Smrg[m4_if([$5], [], [], 96139e7bcd65Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 96149e7bcd65Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 96159e7bcd65Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 96169e7bcd65Smrg]) 96179e7bcd65Smrg 96189e7bcd65Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 96199e7bcd65Smrg# 96209e7bcd65Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 96219e7bcd65Smrg# Written by Scott James Remnant, 2004 96229e7bcd65Smrg# 96239e7bcd65Smrg# This file is free software; the Free Software Foundation gives 96249e7bcd65Smrg# unlimited permission to copy and/or distribute it, with or without 96259e7bcd65Smrg# modifications, as long as this notice is preserved. 96269e7bcd65Smrg 96279e7bcd65Smrg# @configure_input@ 96289e7bcd65Smrg 96299e7bcd65Smrg# serial 3337 ltversion.m4 96309e7bcd65Smrg# This file is part of GNU Libtool 96319e7bcd65Smrg 96329e7bcd65Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 96339e7bcd65Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 96349e7bcd65Smrg 96359e7bcd65SmrgAC_DEFUN([LTVERSION_VERSION], 96369e7bcd65Smrg[macro_version='2.4.2' 96379e7bcd65Smrgmacro_revision='1.3337' 96389e7bcd65Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 96399e7bcd65Smrg_LT_DECL(, macro_revision, 0) 96409e7bcd65Smrg]) 96419e7bcd65Smrg 96429e7bcd65Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 96439e7bcd65Smrg# 96449e7bcd65Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 96459e7bcd65Smrg# Written by Scott James Remnant, 2004. 96469e7bcd65Smrg# 96479e7bcd65Smrg# This file is free software; the Free Software Foundation gives 96489e7bcd65Smrg# unlimited permission to copy and/or distribute it, with or without 96499e7bcd65Smrg# modifications, as long as this notice is preserved. 96509e7bcd65Smrg 96519e7bcd65Smrg# serial 5 lt~obsolete.m4 96529e7bcd65Smrg 96539e7bcd65Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 96549e7bcd65Smrg# 96559e7bcd65Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 96569e7bcd65Smrg# which have later been changed to m4_define as they aren't part of the 96579e7bcd65Smrg# exported API, or moved to Autoconf or Automake where they belong. 96589e7bcd65Smrg# 96599e7bcd65Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 96609e7bcd65Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 96619e7bcd65Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 96629e7bcd65Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 96639e7bcd65Smrg# and doesn't know about Autoconf macros at all.) 96649e7bcd65Smrg# 96659e7bcd65Smrg# So we provide this file, which has a silly filename so it's always 96669e7bcd65Smrg# included after everything else. This provides aclocal with the 96679e7bcd65Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 96689e7bcd65Smrg# because those macros already exist, or will be overwritten later. 96699e7bcd65Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 96709e7bcd65Smrg# 96719e7bcd65Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 96729e7bcd65Smrg# Yes, that means every name once taken will need to remain here until 96739e7bcd65Smrg# we give up compatibility with versions before 1.7, at which point 96749e7bcd65Smrg# we need to keep only those names which we still refer to. 96759e7bcd65Smrg 96769e7bcd65Smrg# This is to help aclocal find these macros, as it can't see m4_define. 96779e7bcd65SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 96789e7bcd65Smrg 96799e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 96809e7bcd65Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 96819e7bcd65Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 96829e7bcd65Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 96839e7bcd65Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 96849e7bcd65Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 96859e7bcd65Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 96869e7bcd65Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 96879e7bcd65Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 96889e7bcd65Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 96899e7bcd65Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 96909e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 96919e7bcd65Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 96929e7bcd65Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 96939e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 96949e7bcd65Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 96959e7bcd65Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 96969e7bcd65Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 96979e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 96989e7bcd65Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 96999e7bcd65Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 97009e7bcd65Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 97019e7bcd65Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 97029e7bcd65Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 97039e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 97049e7bcd65Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 97059e7bcd65Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 97069e7bcd65Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 97079e7bcd65Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 97089e7bcd65Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 97099e7bcd65Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 97109e7bcd65Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 97119e7bcd65Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 97129e7bcd65Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 97139e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 97149e7bcd65Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 97159e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 97169e7bcd65Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 97179e7bcd65Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 97189e7bcd65Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 97199e7bcd65Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 97209e7bcd65Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 97219e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 97229e7bcd65Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 97239e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 97249e7bcd65Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 97259e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 97269e7bcd65Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 97279e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 97289e7bcd65Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 97299e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 97309e7bcd65Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 97319e7bcd65Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 97329e7bcd65Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 97339e7bcd65Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 97349e7bcd65Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 97359e7bcd65Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 97369e7bcd65Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 97379e7bcd65Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 97389e7bcd65Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 97399e7bcd65Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 97409e7bcd65Smrg 97419e7bcd65Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 97429e7bcd65Smrg# 97439e7bcd65Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 97449e7bcd65Smrg# 97459e7bcd65Smrg# This program is free software; you can redistribute it and/or modify 97469e7bcd65Smrg# it under the terms of the GNU General Public License as published by 97479e7bcd65Smrg# the Free Software Foundation; either version 2 of the License, or 97489e7bcd65Smrg# (at your option) any later version. 97499e7bcd65Smrg# 97509e7bcd65Smrg# This program is distributed in the hope that it will be useful, but 97519e7bcd65Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 97529e7bcd65Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 97539e7bcd65Smrg# General Public License for more details. 97549e7bcd65Smrg# 97559e7bcd65Smrg# You should have received a copy of the GNU General Public License 97569e7bcd65Smrg# along with this program; if not, write to the Free Software 97579e7bcd65Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 97589e7bcd65Smrg# 97599e7bcd65Smrg# As a special exception to the GNU General Public License, if you 97609e7bcd65Smrg# distribute this file as part of a program that contains a 97619e7bcd65Smrg# configuration script generated by Autoconf, you may include it under 97629e7bcd65Smrg# the same distribution terms that you use for the rest of that program. 97639e7bcd65Smrg 97649e7bcd65Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 97659e7bcd65Smrg# ---------------------------------- 97669e7bcd65SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 97679e7bcd65Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 97689e7bcd65Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 97699e7bcd65SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 97709e7bcd65Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 97719e7bcd65Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 97729e7bcd65Smrgfi 97739e7bcd65Smrgif test -n "$PKG_CONFIG"; then 97749e7bcd65Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 97759e7bcd65Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 97769e7bcd65Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 97779e7bcd65Smrg AC_MSG_RESULT([yes]) 97789e7bcd65Smrg else 97799e7bcd65Smrg AC_MSG_RESULT([no]) 97809e7bcd65Smrg PKG_CONFIG="" 97819e7bcd65Smrg fi 97829e7bcd65Smrg 97839e7bcd65Smrgfi[]dnl 97849e7bcd65Smrg])# PKG_PROG_PKG_CONFIG 97859e7bcd65Smrg 97869e7bcd65Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 97879e7bcd65Smrg# 97889e7bcd65Smrg# Check to see whether a particular set of modules exists. Similar 97899e7bcd65Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 97909e7bcd65Smrg# 97919e7bcd65Smrg# 97929e7bcd65Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 97939e7bcd65Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 97949e7bcd65Smrg# PKG_CHECK_EXISTS manually 97959e7bcd65Smrg# -------------------------------------------------------------- 97969e7bcd65SmrgAC_DEFUN([PKG_CHECK_EXISTS], 97979e7bcd65Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 97989e7bcd65Smrgif test -n "$PKG_CONFIG" && \ 97999e7bcd65Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 98009e7bcd65Smrg m4_ifval([$2], [$2], [:]) 98019e7bcd65Smrgm4_ifvaln([$3], [else 98029e7bcd65Smrg $3])dnl 98039e7bcd65Smrgfi]) 98049e7bcd65Smrg 98059e7bcd65Smrg 98069e7bcd65Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 98079e7bcd65Smrg# --------------------------------------------- 98089e7bcd65Smrgm4_define([_PKG_CONFIG], 98099e7bcd65Smrg[if test -n "$$1"; then 98109e7bcd65Smrg pkg_cv_[]$1="$$1" 98119e7bcd65Smrg elif test -n "$PKG_CONFIG"; then 98129e7bcd65Smrg PKG_CHECK_EXISTS([$3], 98139e7bcd65Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 98149e7bcd65Smrg [pkg_failed=yes]) 98159e7bcd65Smrg else 98169e7bcd65Smrg pkg_failed=untried 98179e7bcd65Smrgfi[]dnl 98189e7bcd65Smrg])# _PKG_CONFIG 98199e7bcd65Smrg 98209e7bcd65Smrg# _PKG_SHORT_ERRORS_SUPPORTED 98219e7bcd65Smrg# ----------------------------- 98229e7bcd65SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 98239e7bcd65Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 98249e7bcd65Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 98259e7bcd65Smrg _pkg_short_errors_supported=yes 98269e7bcd65Smrgelse 98279e7bcd65Smrg _pkg_short_errors_supported=no 98289e7bcd65Smrgfi[]dnl 98299e7bcd65Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 98309e7bcd65Smrg 98319e7bcd65Smrg 98329e7bcd65Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 98339e7bcd65Smrg# [ACTION-IF-NOT-FOUND]) 98349e7bcd65Smrg# 98359e7bcd65Smrg# 98369e7bcd65Smrg# Note that if there is a possibility the first call to 98379e7bcd65Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 98389e7bcd65Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 98399e7bcd65Smrg# 98409e7bcd65Smrg# 98419e7bcd65Smrg# -------------------------------------------------------------- 98429e7bcd65SmrgAC_DEFUN([PKG_CHECK_MODULES], 98439e7bcd65Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 98449e7bcd65SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 98459e7bcd65SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 98469e7bcd65Smrg 98479e7bcd65Smrgpkg_failed=no 98489e7bcd65SmrgAC_MSG_CHECKING([for $1]) 98499e7bcd65Smrg 98509e7bcd65Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 98519e7bcd65Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 98529e7bcd65Smrg 98539e7bcd65Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 98549e7bcd65Smrgand $1[]_LIBS to avoid the need to call pkg-config. 98559e7bcd65SmrgSee the pkg-config man page for more details.]) 98569e7bcd65Smrg 98579e7bcd65Smrgif test $pkg_failed = yes; then 98589e7bcd65Smrg _PKG_SHORT_ERRORS_SUPPORTED 98599e7bcd65Smrg if test $_pkg_short_errors_supported = yes; then 98609e7bcd65Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 98619e7bcd65Smrg else 98629e7bcd65Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 98639e7bcd65Smrg fi 98649e7bcd65Smrg # Put the nasty error message in config.log where it belongs 98659e7bcd65Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 98669e7bcd65Smrg 98679e7bcd65Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 98689e7bcd65Smrg[Package requirements ($2) were not met: 98699e7bcd65Smrg 98709e7bcd65Smrg$$1_PKG_ERRORS 98719e7bcd65Smrg 98729e7bcd65SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 98739e7bcd65Smrginstalled software in a non-standard prefix. 98749e7bcd65Smrg 98759e7bcd65Smrg_PKG_TEXT 98769e7bcd65Smrg])], 98779e7bcd65Smrg [AC_MSG_RESULT([no]) 98789e7bcd65Smrg $4]) 98799e7bcd65Smrgelif test $pkg_failed = untried; then 98809e7bcd65Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 98819e7bcd65Smrg[The pkg-config script could not be found or is too old. Make sure it 98829e7bcd65Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 98839e7bcd65Smrgpath to pkg-config. 98849e7bcd65Smrg 98859e7bcd65Smrg_PKG_TEXT 98869e7bcd65Smrg 98879e7bcd65SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 98889e7bcd65Smrg [$4]) 98899e7bcd65Smrgelse 98909e7bcd65Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 98919e7bcd65Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 98929e7bcd65Smrg AC_MSG_RESULT([yes]) 98939e7bcd65Smrg ifelse([$3], , :, [$3]) 98949e7bcd65Smrgfi[]dnl 98959e7bcd65Smrg])# PKG_CHECK_MODULES 98969e7bcd65Smrg 98979e7bcd65Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 98989e7bcd65Smrgdnl 98999e7bcd65Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9900339a7c43Smrgdnl 99019e7bcd65Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 99029e7bcd65Smrgdnl copy of this software and associated documentation files (the "Software"), 99039e7bcd65Smrgdnl to deal in the Software without restriction, including without limitation 99049e7bcd65Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 99059e7bcd65Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 99069e7bcd65Smrgdnl Software is furnished to do so, subject to the following conditions: 99079e7bcd65Smrgdnl 99089e7bcd65Smrgdnl The above copyright notice and this permission notice (including the next 99099e7bcd65Smrgdnl paragraph) shall be included in all copies or substantial portions of the 99109e7bcd65Smrgdnl Software. 99119e7bcd65Smrgdnl 99129e7bcd65Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 99139e7bcd65Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 99149e7bcd65Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 99159e7bcd65Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 99169e7bcd65Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 99179e7bcd65Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 99189e7bcd65Smrgdnl DEALINGS IN THE SOFTWARE. 99199e7bcd65Smrg 99209e7bcd65Smrg# XORG_MACROS_VERSION(required-version) 99219e7bcd65Smrg# ------------------------------------- 99229e7bcd65Smrg# Minimum version: 1.1.0 99239e7bcd65Smrg# 99249e7bcd65Smrg# If you're using a macro added in Version 1.1 or newer, include this in 99259e7bcd65Smrg# your configure.ac with the minimum required version, such as: 99269e7bcd65Smrg# XORG_MACROS_VERSION(1.1) 99279e7bcd65Smrg# 99289e7bcd65Smrg# To ensure that this macro is defined, also add: 99299e7bcd65Smrg# m4_ifndef([XORG_MACROS_VERSION], 99309e7bcd65Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 99319e7bcd65Smrg# 99329e7bcd65Smrg# 9933339a7c43Smrg# See the "minimum version" comment for each macro you use to see what 99349e7bcd65Smrg# version you require. 99359e7bcd65Smrgm4_defun([XORG_MACROS_VERSION],[ 9936339a7c43Smrgm4_define([vers_have], [1.19.0]) 99379e7bcd65Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 99389e7bcd65Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 99399e7bcd65Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 99409e7bcd65Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 99419e7bcd65Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 99429e7bcd65Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 99439e7bcd65Smrgm4_undefine([vers_have]) 99449e7bcd65Smrgm4_undefine([maj_have]) 99459e7bcd65Smrgm4_undefine([maj_needed]) 99469e7bcd65Smrg]) # XORG_MACROS_VERSION 99479e7bcd65Smrg 99489e7bcd65Smrg# XORG_PROG_RAWCPP() 99499e7bcd65Smrg# ------------------ 99509e7bcd65Smrg# Minimum version: 1.0.0 99519e7bcd65Smrg# 99529e7bcd65Smrg# Find cpp program and necessary flags for use in pre-processing text files 99539e7bcd65Smrg# such as man pages and config files 99549e7bcd65SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 99559e7bcd65SmrgAC_REQUIRE([AC_PROG_CPP]) 9956339a7c43SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 99579e7bcd65Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 99589e7bcd65Smrg 99599e7bcd65Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 99609e7bcd65Smrg# which is not the best choice for supporting other OS'es, but covers most 99619e7bcd65Smrg# of the ones we need for now. 99629e7bcd65SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 99639e7bcd65SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 99649e7bcd65Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99659e7bcd65Smrg AC_MSG_RESULT([no]) 99669e7bcd65Smrgelse 99679e7bcd65Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99689e7bcd65Smrg RAWCPPFLAGS=-undef 99699e7bcd65Smrg AC_MSG_RESULT([yes]) 99709e7bcd65Smrg # under Cygwin unix is still defined even with -undef 99719e7bcd65Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99729e7bcd65Smrg RAWCPPFLAGS="-undef -ansi" 99739e7bcd65Smrg AC_MSG_RESULT([yes, with -ansi]) 99749e7bcd65Smrg else 99759e7bcd65Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 99769e7bcd65Smrg fi 99779e7bcd65Smrgfi 99789e7bcd65Smrgrm -f conftest.$ac_ext 99799e7bcd65Smrg 99809e7bcd65SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 99819e7bcd65SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 99829e7bcd65Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 99839e7bcd65Smrg AC_MSG_RESULT([no]) 99849e7bcd65Smrgelse 99859e7bcd65Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9986339a7c43Smrg TRADITIONALCPPFLAGS="-traditional" 99879e7bcd65Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 99889e7bcd65Smrg AC_MSG_RESULT([yes]) 99899e7bcd65Smrg else 99909e7bcd65Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 99919e7bcd65Smrg fi 99929e7bcd65Smrgfi 99939e7bcd65Smrgrm -f conftest.$ac_ext 99949e7bcd65SmrgAC_SUBST(RAWCPPFLAGS) 9995339a7c43SmrgAC_SUBST(TRADITIONALCPPFLAGS) 99969e7bcd65Smrg]) # XORG_PROG_RAWCPP 99979e7bcd65Smrg 99989e7bcd65Smrg# XORG_MANPAGE_SECTIONS() 99999e7bcd65Smrg# ----------------------- 100009e7bcd65Smrg# Minimum version: 1.0.0 100019e7bcd65Smrg# 100029e7bcd65Smrg# Determine which sections man pages go in for the different man page types 100039e7bcd65Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 100049e7bcd65Smrg# Not sure if there's any better way than just hardcoding by OS name. 100059e7bcd65Smrg# Override default settings by setting environment variables 100069e7bcd65Smrg# Added MAN_SUBSTS in version 1.8 100079e7bcd65Smrg# Added AC_PROG_SED in version 1.8 100089e7bcd65Smrg 100099e7bcd65SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 100109e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 100119e7bcd65SmrgAC_REQUIRE([AC_PROG_SED]) 100129e7bcd65Smrg 100139e7bcd65Smrgif test x$APP_MAN_SUFFIX = x ; then 100149e7bcd65Smrg APP_MAN_SUFFIX=1 100159e7bcd65Smrgfi 100169e7bcd65Smrgif test x$APP_MAN_DIR = x ; then 100179e7bcd65Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 100189e7bcd65Smrgfi 100199e7bcd65Smrg 100209e7bcd65Smrgif test x$LIB_MAN_SUFFIX = x ; then 100219e7bcd65Smrg LIB_MAN_SUFFIX=3 100229e7bcd65Smrgfi 100239e7bcd65Smrgif test x$LIB_MAN_DIR = x ; then 100249e7bcd65Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 100259e7bcd65Smrgfi 100269e7bcd65Smrg 100279e7bcd65Smrgif test x$FILE_MAN_SUFFIX = x ; then 100289e7bcd65Smrg case $host_os in 100299e7bcd65Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 100309e7bcd65Smrg *) FILE_MAN_SUFFIX=5 ;; 100319e7bcd65Smrg esac 100329e7bcd65Smrgfi 100339e7bcd65Smrgif test x$FILE_MAN_DIR = x ; then 100349e7bcd65Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 100359e7bcd65Smrgfi 100369e7bcd65Smrg 100379e7bcd65Smrgif test x$MISC_MAN_SUFFIX = x ; then 100389e7bcd65Smrg case $host_os in 100399e7bcd65Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 100409e7bcd65Smrg *) MISC_MAN_SUFFIX=7 ;; 100419e7bcd65Smrg esac 100429e7bcd65Smrgfi 100439e7bcd65Smrgif test x$MISC_MAN_DIR = x ; then 100449e7bcd65Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 100459e7bcd65Smrgfi 100469e7bcd65Smrg 100479e7bcd65Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 100489e7bcd65Smrg case $host_os in 100499e7bcd65Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 100509e7bcd65Smrg *) DRIVER_MAN_SUFFIX=4 ;; 100519e7bcd65Smrg esac 100529e7bcd65Smrgfi 100539e7bcd65Smrgif test x$DRIVER_MAN_DIR = x ; then 100549e7bcd65Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 100559e7bcd65Smrgfi 100569e7bcd65Smrg 100579e7bcd65Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 100589e7bcd65Smrg case $host_os in 100599e7bcd65Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 100609e7bcd65Smrg *) ADMIN_MAN_SUFFIX=8 ;; 100619e7bcd65Smrg esac 100629e7bcd65Smrgfi 100639e7bcd65Smrgif test x$ADMIN_MAN_DIR = x ; then 100649e7bcd65Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 100659e7bcd65Smrgfi 100669e7bcd65Smrg 100679e7bcd65Smrg 100689e7bcd65SmrgAC_SUBST([APP_MAN_SUFFIX]) 100699e7bcd65SmrgAC_SUBST([LIB_MAN_SUFFIX]) 100709e7bcd65SmrgAC_SUBST([FILE_MAN_SUFFIX]) 100719e7bcd65SmrgAC_SUBST([MISC_MAN_SUFFIX]) 100729e7bcd65SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 100739e7bcd65SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 100749e7bcd65SmrgAC_SUBST([APP_MAN_DIR]) 100759e7bcd65SmrgAC_SUBST([LIB_MAN_DIR]) 100769e7bcd65SmrgAC_SUBST([FILE_MAN_DIR]) 100779e7bcd65SmrgAC_SUBST([MISC_MAN_DIR]) 100789e7bcd65SmrgAC_SUBST([DRIVER_MAN_DIR]) 100799e7bcd65SmrgAC_SUBST([ADMIN_MAN_DIR]) 100809e7bcd65Smrg 100819e7bcd65SmrgXORG_MAN_PAGE="X Version 11" 100829e7bcd65SmrgAC_SUBST([XORG_MAN_PAGE]) 100839e7bcd65SmrgMAN_SUBSTS="\ 100849e7bcd65Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100859e7bcd65Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100869e7bcd65Smrg -e 's|__xservername__|Xorg|g' \ 100879e7bcd65Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 100889e7bcd65Smrg -e 's|__projectroot__|\$(prefix)|g' \ 100899e7bcd65Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 100909e7bcd65Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 100919e7bcd65Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 100929e7bcd65Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 100939e7bcd65Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 100949e7bcd65Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 100959e7bcd65Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 100969e7bcd65SmrgAC_SUBST([MAN_SUBSTS]) 100979e7bcd65Smrg 100989e7bcd65Smrg]) # XORG_MANPAGE_SECTIONS 100999e7bcd65Smrg 101009e7bcd65Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 101019e7bcd65Smrg# ------------------------ 101029e7bcd65Smrg# Minimum version: 1.7.0 101039e7bcd65Smrg# 101049e7bcd65Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 101059e7bcd65Smrg# provided by xorg-sgml-doctools, if installed. 101069e7bcd65SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 101079e7bcd65SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 101089e7bcd65SmrgXORG_SGML_PATH= 101099e7bcd65SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 101109e7bcd65Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 101119e7bcd65Smrg [m4_ifval([$1],[:], 101129e7bcd65Smrg [if test x"$cross_compiling" != x"yes" ; then 101139e7bcd65Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 101149e7bcd65Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 101159e7bcd65Smrg fi]) 101169e7bcd65Smrg ]) 101179e7bcd65Smrg 101189e7bcd65Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 101199e7bcd65Smrg# the path and the name of the doc stylesheet 101209e7bcd65Smrgif test "x$XORG_SGML_PATH" != "x" ; then 101219e7bcd65Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 101229e7bcd65Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 101239e7bcd65Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 101249e7bcd65Smrgelse 101259e7bcd65Smrg AC_MSG_RESULT([no]) 101269e7bcd65Smrgfi 101279e7bcd65Smrg 101289e7bcd65SmrgAC_SUBST(XORG_SGML_PATH) 101299e7bcd65SmrgAC_SUBST(STYLESHEET_SRCDIR) 101309e7bcd65SmrgAC_SUBST(XSL_STYLESHEET) 101319e7bcd65SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 101329e7bcd65Smrg]) # XORG_CHECK_SGML_DOCTOOLS 101339e7bcd65Smrg 101349e7bcd65Smrg# XORG_CHECK_LINUXDOC 101359e7bcd65Smrg# ------------------- 101369e7bcd65Smrg# Minimum version: 1.0.0 101379e7bcd65Smrg# 101389e7bcd65Smrg# Defines the variable MAKE_TEXT if the necessary tools and 101399e7bcd65Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 101409e7bcd65Smrg# Whether or not the necessary tools and files are found can be checked 101419e7bcd65Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 101429e7bcd65SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 101439e7bcd65SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101449e7bcd65SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 101459e7bcd65Smrg 101469e7bcd65SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 101479e7bcd65Smrg 101489e7bcd65SmrgAC_MSG_CHECKING([whether to build documentation]) 101499e7bcd65Smrg 101509e7bcd65Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 101519e7bcd65Smrg BUILDDOC=yes 101529e7bcd65Smrgelse 101539e7bcd65Smrg BUILDDOC=no 101549e7bcd65Smrgfi 101559e7bcd65Smrg 101569e7bcd65SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 101579e7bcd65Smrg 101589e7bcd65SmrgAC_MSG_RESULT([$BUILDDOC]) 101599e7bcd65Smrg 101609e7bcd65SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 101619e7bcd65Smrg 101629e7bcd65Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 101639e7bcd65Smrg BUILDPDFDOC=yes 101649e7bcd65Smrgelse 101659e7bcd65Smrg BUILDPDFDOC=no 101669e7bcd65Smrgfi 101679e7bcd65Smrg 101689e7bcd65SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 101699e7bcd65Smrg 101709e7bcd65SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 101719e7bcd65Smrg 101729e7bcd65SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 101739e7bcd65SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 101749e7bcd65SmrgMAKE_PDF="$PS2PDF" 101759e7bcd65SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 101769e7bcd65Smrg 101779e7bcd65SmrgAC_SUBST(MAKE_TEXT) 101789e7bcd65SmrgAC_SUBST(MAKE_PS) 101799e7bcd65SmrgAC_SUBST(MAKE_PDF) 101809e7bcd65SmrgAC_SUBST(MAKE_HTML) 101819e7bcd65Smrg]) # XORG_CHECK_LINUXDOC 101829e7bcd65Smrg 101839e7bcd65Smrg# XORG_CHECK_DOCBOOK 101849e7bcd65Smrg# ------------------- 101859e7bcd65Smrg# Minimum version: 1.0.0 101869e7bcd65Smrg# 101879e7bcd65Smrg# Checks for the ability to build output formats from SGML DocBook source. 101889e7bcd65Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 101899e7bcd65Smrg# indicates whether the necessary tools and files are found and, if set, 101909e7bcd65Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 101919e7bcd65SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 101929e7bcd65SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101939e7bcd65Smrg 101949e7bcd65SmrgBUILDTXTDOC=no 101959e7bcd65SmrgBUILDPDFDOC=no 101969e7bcd65SmrgBUILDPSDOC=no 101979e7bcd65SmrgBUILDHTMLDOC=no 101989e7bcd65Smrg 101999e7bcd65SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 102009e7bcd65SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 102019e7bcd65SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 102029e7bcd65SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 102039e7bcd65Smrg 102049e7bcd65SmrgAC_MSG_CHECKING([whether to build text documentation]) 102059e7bcd65Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 102069e7bcd65Smrg test x$BUILD_TXTDOC != xno; then 102079e7bcd65Smrg BUILDTXTDOC=yes 102089e7bcd65Smrgfi 102099e7bcd65SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 102109e7bcd65SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 102119e7bcd65Smrg 102129e7bcd65SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 102139e7bcd65Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 102149e7bcd65Smrg test x$BUILD_PDFDOC != xno; then 102159e7bcd65Smrg BUILDPDFDOC=yes 102169e7bcd65Smrgfi 102179e7bcd65SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 102189e7bcd65SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 102199e7bcd65Smrg 102209e7bcd65SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 102219e7bcd65Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 102229e7bcd65Smrg test x$BUILD_PSDOC != xno; then 102239e7bcd65Smrg BUILDPSDOC=yes 102249e7bcd65Smrgfi 102259e7bcd65SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 102269e7bcd65SmrgAC_MSG_RESULT([$BUILDPSDOC]) 102279e7bcd65Smrg 102289e7bcd65SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 102299e7bcd65Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 102309e7bcd65Smrg test x$BUILD_HTMLDOC != xno; then 102319e7bcd65Smrg BUILDHTMLDOC=yes 102329e7bcd65Smrgfi 102339e7bcd65SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 102349e7bcd65SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 102359e7bcd65Smrg 102369e7bcd65SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 102379e7bcd65SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 102389e7bcd65SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 102399e7bcd65SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 102409e7bcd65Smrg 102419e7bcd65SmrgAC_SUBST(MAKE_TEXT) 102429e7bcd65SmrgAC_SUBST(MAKE_PS) 102439e7bcd65SmrgAC_SUBST(MAKE_PDF) 102449e7bcd65SmrgAC_SUBST(MAKE_HTML) 102459e7bcd65Smrg]) # XORG_CHECK_DOCBOOK 102469e7bcd65Smrg 102479e7bcd65Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 102489e7bcd65Smrg# ---------------- 102499e7bcd65Smrg# Minimum version: 1.5.0 102509e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0 102519e7bcd65Smrg# 102529e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes 102539e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the 102549e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 102559e7bcd65Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 102569e7bcd65Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 102579e7bcd65Smrg# --with-xmlto assumes 'auto'. 102589e7bcd65Smrg# 102599e7bcd65Smrg# Interface to module: 102609e7bcd65Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 102619e7bcd65Smrg# XMLTO: returns the path of the xmlto program found 102629e7bcd65Smrg# returns the path set by the user in the environment 102639e7bcd65Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 102649e7bcd65Smrg# 'no' user instructs the module not to use xmlto 102659e7bcd65Smrg# 102669e7bcd65Smrg# Added in version 1.10.0 102679e7bcd65Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 102689e7bcd65Smrg# xmlto for text output requires either lynx, links, or w3m browsers 102699e7bcd65Smrg# 102709e7bcd65Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 102719e7bcd65Smrg# 102729e7bcd65SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 102739e7bcd65SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 102749e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto])) 102759e7bcd65SmrgAC_ARG_WITH(xmlto, 102769e7bcd65Smrg AS_HELP_STRING([--with-xmlto], 102779e7bcd65Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 102789e7bcd65Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 102799e7bcd65Smrgm4_undefine([_defopt]) 102809e7bcd65Smrg 102819e7bcd65Smrgif test "x$use_xmlto" = x"auto"; then 102829e7bcd65Smrg AC_PATH_PROG([XMLTO], [xmlto]) 102839e7bcd65Smrg if test "x$XMLTO" = "x"; then 102849e7bcd65Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 102859e7bcd65Smrg have_xmlto=no 102869e7bcd65Smrg else 102879e7bcd65Smrg have_xmlto=yes 102889e7bcd65Smrg fi 102899e7bcd65Smrgelif test "x$use_xmlto" = x"yes" ; then 102909e7bcd65Smrg AC_PATH_PROG([XMLTO], [xmlto]) 102919e7bcd65Smrg if test "x$XMLTO" = "x"; then 102929e7bcd65Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 102939e7bcd65Smrg fi 102949e7bcd65Smrg have_xmlto=yes 102959e7bcd65Smrgelif test "x$use_xmlto" = x"no" ; then 102969e7bcd65Smrg if test "x$XMLTO" != "x"; then 102979e7bcd65Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 102989e7bcd65Smrg fi 102999e7bcd65Smrg have_xmlto=no 103009e7bcd65Smrgelse 103019e7bcd65Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 103029e7bcd65Smrgfi 103039e7bcd65Smrg 103049e7bcd65Smrg# Test for a minimum version of xmlto, if provided. 103059e7bcd65Smrgm4_ifval([$1], 103069e7bcd65Smrg[if test "$have_xmlto" = yes; then 103079e7bcd65Smrg # scrape the xmlto version 103089e7bcd65Smrg AC_MSG_CHECKING([the xmlto version]) 103099e7bcd65Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 103109e7bcd65Smrg AC_MSG_RESULT([$xmlto_version]) 103119e7bcd65Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 103129e7bcd65Smrg [if test "x$use_xmlto" = xauto; then 103139e7bcd65Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 103149e7bcd65Smrg have_xmlto=no 103159e7bcd65Smrg else 103169e7bcd65Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 103179e7bcd65Smrg fi]) 103189e7bcd65Smrgfi]) 103199e7bcd65Smrg 103209e7bcd65Smrg# Test for the ability of xmlto to generate a text target 103219e7bcd65Smrghave_xmlto_text=no 103229e7bcd65Smrgcat > conftest.xml << "EOF" 103239e7bcd65SmrgEOF 103249e7bcd65SmrgAS_IF([test "$have_xmlto" = yes], 103259e7bcd65Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 103269e7bcd65Smrg [have_xmlto_text=yes], 103279e7bcd65Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 103289e7bcd65Smrgrm -f conftest.xml 103299e7bcd65SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 103309e7bcd65SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 103319e7bcd65Smrg]) # XORG_WITH_XMLTO 103329e7bcd65Smrg 103339e7bcd65Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 103349e7bcd65Smrg# -------------------------------------------- 103359e7bcd65Smrg# Minimum version: 1.12.0 103369e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.12.0 103379e7bcd65Smrg# 103389e7bcd65Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 103399e7bcd65Smrg# XML-based language used for the transformation of XML documents. 103409e7bcd65Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 103419e7bcd65Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 103429e7bcd65Smrg# The XSLT processor is often used as a standalone tool for transformations. 103439e7bcd65Smrg# It should not be assumed that this tool is used only to work with documnetation. 103449e7bcd65Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 103459e7bcd65Smrg# 103469e7bcd65Smrg# Interface to module: 103479e7bcd65Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 103489e7bcd65Smrg# XSLTPROC: returns the path of the xsltproc program found 103499e7bcd65Smrg# returns the path set by the user in the environment 103509e7bcd65Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 103519e7bcd65Smrg# 'no' user instructs the module not to use xsltproc 103529e7bcd65Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 103539e7bcd65Smrg# 103549e7bcd65Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 103559e7bcd65Smrg# 103569e7bcd65SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 103579e7bcd65SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 103589e7bcd65Smrg# Preserves the interface, should it be implemented later 103599e7bcd65Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 103609e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto])) 103619e7bcd65SmrgAC_ARG_WITH(xsltproc, 103629e7bcd65Smrg AS_HELP_STRING([--with-xsltproc], 103639e7bcd65Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 103649e7bcd65Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 103659e7bcd65Smrgm4_undefine([_defopt]) 103669e7bcd65Smrg 103679e7bcd65Smrgif test "x$use_xsltproc" = x"auto"; then 103689e7bcd65Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103699e7bcd65Smrg if test "x$XSLTPROC" = "x"; then 103709e7bcd65Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 103719e7bcd65Smrg have_xsltproc=no 103729e7bcd65Smrg else 103739e7bcd65Smrg have_xsltproc=yes 103749e7bcd65Smrg fi 103759e7bcd65Smrgelif test "x$use_xsltproc" = x"yes" ; then 103769e7bcd65Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103779e7bcd65Smrg if test "x$XSLTPROC" = "x"; then 103789e7bcd65Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 103799e7bcd65Smrg fi 103809e7bcd65Smrg have_xsltproc=yes 103819e7bcd65Smrgelif test "x$use_xsltproc" = x"no" ; then 103829e7bcd65Smrg if test "x$XSLTPROC" != "x"; then 103839e7bcd65Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 103849e7bcd65Smrg fi 103859e7bcd65Smrg have_xsltproc=no 103869e7bcd65Smrgelse 103879e7bcd65Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 103889e7bcd65Smrgfi 103899e7bcd65Smrg 103909e7bcd65SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 103919e7bcd65Smrg]) # XORG_WITH_XSLTPROC 103929e7bcd65Smrg 103939e7bcd65Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 103949e7bcd65Smrg# ---------------------------------------- 103959e7bcd65Smrg# Minimum version: 1.15.0 103969e7bcd65Smrg# 103979e7bcd65Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 103989e7bcd65Smrg# scanning arbitrary text files, extracting information from those text files, 103999e7bcd65Smrg# and printing reports based on that information. 104009e7bcd65Smrg# 104019e7bcd65Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 104029e7bcd65Smrg# 104039e7bcd65Smrg# Interface to module: 104049e7bcd65Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 104059e7bcd65Smrg# PERL: returns the path of the perl program found 104069e7bcd65Smrg# returns the path set by the user in the environment 104079e7bcd65Smrg# --with-perl: 'yes' user instructs the module to use perl 104089e7bcd65Smrg# 'no' user instructs the module not to use perl 104099e7bcd65Smrg# have_perl: returns yes if perl found in PATH or no 104109e7bcd65Smrg# 104119e7bcd65Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 104129e7bcd65Smrg# 104139e7bcd65SmrgAC_DEFUN([XORG_WITH_PERL],[ 104149e7bcd65SmrgAC_ARG_VAR([PERL], [Path to perl command]) 104159e7bcd65Smrg# Preserves the interface, should it be implemented later 104169e7bcd65Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 104179e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto])) 104189e7bcd65SmrgAC_ARG_WITH(perl, 104199e7bcd65Smrg AS_HELP_STRING([--with-perl], 104209e7bcd65Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 104219e7bcd65Smrg [use_perl=$withval], [use_perl=]_defopt) 104229e7bcd65Smrgm4_undefine([_defopt]) 104239e7bcd65Smrg 104249e7bcd65Smrgif test "x$use_perl" = x"auto"; then 104259e7bcd65Smrg AC_PATH_PROG([PERL], [perl]) 104269e7bcd65Smrg if test "x$PERL" = "x"; then 104279e7bcd65Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 104289e7bcd65Smrg have_perl=no 104299e7bcd65Smrg else 104309e7bcd65Smrg have_perl=yes 104319e7bcd65Smrg fi 104329e7bcd65Smrgelif test "x$use_perl" = x"yes" ; then 104339e7bcd65Smrg AC_PATH_PROG([PERL], [perl]) 104349e7bcd65Smrg if test "x$PERL" = "x"; then 104359e7bcd65Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 104369e7bcd65Smrg fi 104379e7bcd65Smrg have_perl=yes 104389e7bcd65Smrgelif test "x$use_perl" = x"no" ; then 104399e7bcd65Smrg if test "x$PERL" != "x"; then 104409e7bcd65Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 104419e7bcd65Smrg fi 104429e7bcd65Smrg have_perl=no 104439e7bcd65Smrgelse 104449e7bcd65Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 104459e7bcd65Smrgfi 104469e7bcd65Smrg 104479e7bcd65SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 104489e7bcd65Smrg]) # XORG_WITH_PERL 104499e7bcd65Smrg 104509e7bcd65Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 104519e7bcd65Smrg# ---------------- 104529e7bcd65Smrg# Minimum version: 1.5.0 104539e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0 104549e7bcd65Smrg# 104559e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes 104569e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the 104579e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 104589e7bcd65Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 104599e7bcd65Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 104609e7bcd65Smrg# --with-asciidoc assumes 'auto'. 104619e7bcd65Smrg# 104629e7bcd65Smrg# Interface to module: 104639e7bcd65Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 104649e7bcd65Smrg# ASCIIDOC: returns the path of the asciidoc program found 104659e7bcd65Smrg# returns the path set by the user in the environment 104669e7bcd65Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 104679e7bcd65Smrg# 'no' user instructs the module not to use asciidoc 104689e7bcd65Smrg# 104699e7bcd65Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 104709e7bcd65Smrg# 104719e7bcd65SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 104729e7bcd65SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 104739e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto])) 104749e7bcd65SmrgAC_ARG_WITH(asciidoc, 104759e7bcd65Smrg AS_HELP_STRING([--with-asciidoc], 104769e7bcd65Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 104779e7bcd65Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 104789e7bcd65Smrgm4_undefine([_defopt]) 104799e7bcd65Smrg 104809e7bcd65Smrgif test "x$use_asciidoc" = x"auto"; then 104819e7bcd65Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104829e7bcd65Smrg if test "x$ASCIIDOC" = "x"; then 104839e7bcd65Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 104849e7bcd65Smrg have_asciidoc=no 104859e7bcd65Smrg else 104869e7bcd65Smrg have_asciidoc=yes 104879e7bcd65Smrg fi 104889e7bcd65Smrgelif test "x$use_asciidoc" = x"yes" ; then 104899e7bcd65Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104909e7bcd65Smrg if test "x$ASCIIDOC" = "x"; then 104919e7bcd65Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 104929e7bcd65Smrg fi 104939e7bcd65Smrg have_asciidoc=yes 104949e7bcd65Smrgelif test "x$use_asciidoc" = x"no" ; then 104959e7bcd65Smrg if test "x$ASCIIDOC" != "x"; then 104969e7bcd65Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 104979e7bcd65Smrg fi 104989e7bcd65Smrg have_asciidoc=no 104999e7bcd65Smrgelse 105009e7bcd65Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 105019e7bcd65Smrgfi 105029e7bcd65Smrgm4_ifval([$1], 105039e7bcd65Smrg[if test "$have_asciidoc" = yes; then 105049e7bcd65Smrg # scrape the asciidoc version 105059e7bcd65Smrg AC_MSG_CHECKING([the asciidoc version]) 105069e7bcd65Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 105079e7bcd65Smrg AC_MSG_RESULT([$asciidoc_version]) 105089e7bcd65Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 105099e7bcd65Smrg [if test "x$use_asciidoc" = xauto; then 105109e7bcd65Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 105119e7bcd65Smrg have_asciidoc=no 105129e7bcd65Smrg else 105139e7bcd65Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 105149e7bcd65Smrg fi]) 105159e7bcd65Smrgfi]) 105169e7bcd65SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 105179e7bcd65Smrg]) # XORG_WITH_ASCIIDOC 105189e7bcd65Smrg 105199e7bcd65Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10520339a7c43Smrg# ------------------------------------------- 105219e7bcd65Smrg# Minimum version: 1.5.0 105229e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10523339a7c43Smrg# Minimum version for optional DOT checking: 1.18.0 105249e7bcd65Smrg# 105259e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes 105269e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the 105279e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 105289e7bcd65Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 105299e7bcd65Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 105309e7bcd65Smrg# --with-doxygen assumes 'auto'. 105319e7bcd65Smrg# 105329e7bcd65Smrg# Interface to module: 105339e7bcd65Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 105349e7bcd65Smrg# DOXYGEN: returns the path of the doxygen program found 105359e7bcd65Smrg# returns the path set by the user in the environment 105369e7bcd65Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 105379e7bcd65Smrg# 'no' user instructs the module not to use doxygen 105389e7bcd65Smrg# 105399e7bcd65Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 105409e7bcd65Smrg# 105419e7bcd65SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 105429e7bcd65SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10543339a7c43SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 105449e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto])) 105459e7bcd65SmrgAC_ARG_WITH(doxygen, 105469e7bcd65Smrg AS_HELP_STRING([--with-doxygen], 105479e7bcd65Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 105489e7bcd65Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 105499e7bcd65Smrgm4_undefine([_defopt]) 105509e7bcd65Smrg 105519e7bcd65Smrgif test "x$use_doxygen" = x"auto"; then 105529e7bcd65Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105539e7bcd65Smrg if test "x$DOXYGEN" = "x"; then 105549e7bcd65Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 105559e7bcd65Smrg have_doxygen=no 105569e7bcd65Smrg else 105579e7bcd65Smrg have_doxygen=yes 105589e7bcd65Smrg fi 105599e7bcd65Smrgelif test "x$use_doxygen" = x"yes" ; then 105609e7bcd65Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105619e7bcd65Smrg if test "x$DOXYGEN" = "x"; then 105629e7bcd65Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 105639e7bcd65Smrg fi 105649e7bcd65Smrg have_doxygen=yes 105659e7bcd65Smrgelif test "x$use_doxygen" = x"no" ; then 105669e7bcd65Smrg if test "x$DOXYGEN" != "x"; then 105679e7bcd65Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 105689e7bcd65Smrg fi 105699e7bcd65Smrg have_doxygen=no 105709e7bcd65Smrgelse 105719e7bcd65Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 105729e7bcd65Smrgfi 105739e7bcd65Smrgm4_ifval([$1], 105749e7bcd65Smrg[if test "$have_doxygen" = yes; then 105759e7bcd65Smrg # scrape the doxygen version 105769e7bcd65Smrg AC_MSG_CHECKING([the doxygen version]) 105779e7bcd65Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 105789e7bcd65Smrg AC_MSG_RESULT([$doxygen_version]) 105799e7bcd65Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 105809e7bcd65Smrg [if test "x$use_doxygen" = xauto; then 105819e7bcd65Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 105829e7bcd65Smrg have_doxygen=no 105839e7bcd65Smrg else 105849e7bcd65Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 105859e7bcd65Smrg fi]) 105869e7bcd65Smrgfi]) 10587339a7c43Smrg 10588339a7c43Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10589339a7c43Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10590339a7c43Smrgdnl HAVE_DOT = @HAVE_DOT@ 10591339a7c43SmrgHAVE_DOT=no 10592339a7c43Smrgif test "x$have_doxygen" = "xyes"; then 10593339a7c43Smrg AC_PATH_PROG([DOT], [dot]) 10594339a7c43Smrg if test "x$DOT" != "x"; then 10595339a7c43Smrg HAVE_DOT=yes 10596339a7c43Smrg fi 10597339a7c43Smrgfi 10598339a7c43Smrg 10599339a7c43SmrgAC_SUBST([HAVE_DOT]) 10600339a7c43SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 106019e7bcd65SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 106029e7bcd65Smrg]) # XORG_WITH_DOXYGEN 106039e7bcd65Smrg 106049e7bcd65Smrg# XORG_WITH_GROFF([DEFAULT]) 106059e7bcd65Smrg# ---------------- 106069e7bcd65Smrg# Minimum version: 1.6.0 106079e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0 106089e7bcd65Smrg# 106099e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes 106109e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the 106119e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 106129e7bcd65Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 106139e7bcd65Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 106149e7bcd65Smrg# --with-groff assumes 'auto'. 106159e7bcd65Smrg# 106169e7bcd65Smrg# Interface to module: 106179e7bcd65Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 106189e7bcd65Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 106199e7bcd65Smrg# HAVE_GROFF_MS: the -ms macros package 106209e7bcd65Smrg# GROFF: returns the path of the groff program found 106219e7bcd65Smrg# returns the path set by the user in the environment 106229e7bcd65Smrg# --with-groff: 'yes' user instructs the module to use groff 106239e7bcd65Smrg# 'no' user instructs the module not to use groff 106249e7bcd65Smrg# 106259e7bcd65Smrg# Added in version 1.9.0: 106269e7bcd65Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 106279e7bcd65Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 106289e7bcd65Smrg# psselect from the psutils package. 106299e7bcd65Smrg# the ghostcript package. Refer to the grohtml man pages 106309e7bcd65Smrg# 106319e7bcd65Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 106329e7bcd65Smrg# 106339e7bcd65Smrg# OS and distros often splits groff in a basic and full package, the former 106349e7bcd65Smrg# having the groff program and the later having devices, fonts and macros 106359e7bcd65Smrg# Checking for the groff executable is not enough. 106369e7bcd65Smrg# 106379e7bcd65Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 106389e7bcd65Smrg# unset HAVE_GROFF or GROFF env variables. 106399e7bcd65Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 106409e7bcd65Smrg# 106419e7bcd65SmrgAC_DEFUN([XORG_WITH_GROFF],[ 106429e7bcd65SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 106439e7bcd65Smrgm4_define([_defopt], m4_default([$1], [auto])) 106449e7bcd65SmrgAC_ARG_WITH(groff, 106459e7bcd65Smrg AS_HELP_STRING([--with-groff], 106469e7bcd65Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 106479e7bcd65Smrg [use_groff=$withval], [use_groff=]_defopt) 106489e7bcd65Smrgm4_undefine([_defopt]) 106499e7bcd65Smrg 106509e7bcd65Smrgif test "x$use_groff" = x"auto"; then 106519e7bcd65Smrg AC_PATH_PROG([GROFF], [groff]) 106529e7bcd65Smrg if test "x$GROFF" = "x"; then 106539e7bcd65Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 106549e7bcd65Smrg have_groff=no 106559e7bcd65Smrg else 106569e7bcd65Smrg have_groff=yes 106579e7bcd65Smrg fi 106589e7bcd65Smrgelif test "x$use_groff" = x"yes" ; then 106599e7bcd65Smrg AC_PATH_PROG([GROFF], [groff]) 106609e7bcd65Smrg if test "x$GROFF" = "x"; then 106619e7bcd65Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 106629e7bcd65Smrg fi 106639e7bcd65Smrg have_groff=yes 106649e7bcd65Smrgelif test "x$use_groff" = x"no" ; then 106659e7bcd65Smrg if test "x$GROFF" != "x"; then 106669e7bcd65Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 106679e7bcd65Smrg fi 106689e7bcd65Smrg have_groff=no 106699e7bcd65Smrgelse 106709e7bcd65Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 106719e7bcd65Smrgfi 106729e7bcd65Smrg 106739e7bcd65Smrg# We have groff, test for the presence of the macro packages 106749e7bcd65Smrgif test "x$have_groff" = x"yes"; then 106759e7bcd65Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 106769e7bcd65Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 106779e7bcd65Smrg groff_ms_works=yes 106789e7bcd65Smrg else 106799e7bcd65Smrg groff_ms_works=no 106809e7bcd65Smrg fi 106819e7bcd65Smrg AC_MSG_RESULT([$groff_ms_works]) 106829e7bcd65Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 106839e7bcd65Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 106849e7bcd65Smrg groff_mm_works=yes 106859e7bcd65Smrg else 106869e7bcd65Smrg groff_mm_works=no 106879e7bcd65Smrg fi 106889e7bcd65Smrg AC_MSG_RESULT([$groff_mm_works]) 106899e7bcd65Smrgfi 106909e7bcd65Smrg 106919e7bcd65Smrg# We have groff, test for HTML dependencies, one command per package 106929e7bcd65Smrgif test "x$have_groff" = x"yes"; then 106939e7bcd65Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 106949e7bcd65Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 106959e7bcd65Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 106969e7bcd65Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 106979e7bcd65Smrg have_groff_html=yes 106989e7bcd65Smrg else 106999e7bcd65Smrg have_groff_html=no 107009e7bcd65Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 107019e7bcd65Smrg fi 107029e7bcd65Smrgfi 107039e7bcd65Smrg 107049e7bcd65Smrg# Set Automake conditionals for Makefiles 107059e7bcd65SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 107069e7bcd65SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 107079e7bcd65SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 107089e7bcd65SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 107099e7bcd65Smrg]) # XORG_WITH_GROFF 107109e7bcd65Smrg 107119e7bcd65Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 107129e7bcd65Smrg# --------------------------------------- 107139e7bcd65Smrg# Minimum version: 1.6.0 107149e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0 107159e7bcd65Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 107169e7bcd65Smrg# 107179e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes 107189e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the 107199e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 107209e7bcd65Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 107219e7bcd65Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 107229e7bcd65Smrg# --with-fop assumes 'auto'. 107239e7bcd65Smrg# 107249e7bcd65Smrg# Interface to module: 107259e7bcd65Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 107269e7bcd65Smrg# FOP: returns the path of the fop program found 107279e7bcd65Smrg# returns the path set by the user in the environment 107289e7bcd65Smrg# --with-fop: 'yes' user instructs the module to use fop 107299e7bcd65Smrg# 'no' user instructs the module not to use fop 107309e7bcd65Smrg# 107319e7bcd65Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 107329e7bcd65Smrg# 107339e7bcd65SmrgAC_DEFUN([XORG_WITH_FOP],[ 107349e7bcd65SmrgAC_ARG_VAR([FOP], [Path to fop command]) 107359e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto])) 107369e7bcd65SmrgAC_ARG_WITH(fop, 107379e7bcd65Smrg AS_HELP_STRING([--with-fop], 107389e7bcd65Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 107399e7bcd65Smrg [use_fop=$withval], [use_fop=]_defopt) 107409e7bcd65Smrgm4_undefine([_defopt]) 107419e7bcd65Smrg 107429e7bcd65Smrgif test "x$use_fop" = x"auto"; then 107439e7bcd65Smrg AC_PATH_PROG([FOP], [fop]) 107449e7bcd65Smrg if test "x$FOP" = "x"; then 107459e7bcd65Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 107469e7bcd65Smrg have_fop=no 107479e7bcd65Smrg else 107489e7bcd65Smrg have_fop=yes 107499e7bcd65Smrg fi 107509e7bcd65Smrgelif test "x$use_fop" = x"yes" ; then 107519e7bcd65Smrg AC_PATH_PROG([FOP], [fop]) 107529e7bcd65Smrg if test "x$FOP" = "x"; then 107539e7bcd65Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 107549e7bcd65Smrg fi 107559e7bcd65Smrg have_fop=yes 107569e7bcd65Smrgelif test "x$use_fop" = x"no" ; then 107579e7bcd65Smrg if test "x$FOP" != "x"; then 107589e7bcd65Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 107599e7bcd65Smrg fi 107609e7bcd65Smrg have_fop=no 107619e7bcd65Smrgelse 107629e7bcd65Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 107639e7bcd65Smrgfi 107649e7bcd65Smrg 107659e7bcd65Smrg# Test for a minimum version of fop, if provided. 107669e7bcd65Smrgm4_ifval([$1], 107679e7bcd65Smrg[if test "$have_fop" = yes; then 107689e7bcd65Smrg # scrape the fop version 107699e7bcd65Smrg AC_MSG_CHECKING([for fop minimum version]) 107709e7bcd65Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 107719e7bcd65Smrg AC_MSG_RESULT([$fop_version]) 107729e7bcd65Smrg AS_VERSION_COMPARE([$fop_version], [$1], 107739e7bcd65Smrg [if test "x$use_fop" = xauto; then 107749e7bcd65Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 107759e7bcd65Smrg have_fop=no 107769e7bcd65Smrg else 107779e7bcd65Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 107789e7bcd65Smrg fi]) 107799e7bcd65Smrgfi]) 107809e7bcd65SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 107819e7bcd65Smrg]) # XORG_WITH_FOP 107829e7bcd65Smrg 10783339a7c43Smrg# XORG_WITH_M4([MIN-VERSION]) 10784339a7c43Smrg# --------------------------- 10785339a7c43Smrg# Minimum version: 1.19.0 10786339a7c43Smrg# 10787339a7c43Smrg# This macro attempts to locate an m4 macro processor which supports 10788339a7c43Smrg# -I option and is only useful for modules relying on M4 in order to 10789339a7c43Smrg# expand macros in source code files. 10790339a7c43Smrg# 10791339a7c43Smrg# Interface to module: 10792339a7c43Smrg# M4: returns the path of the m4 program found 10793339a7c43Smrg# returns the path set by the user in the environment 10794339a7c43Smrg# 10795339a7c43SmrgAC_DEFUN([XORG_WITH_M4], [ 10796339a7c43SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10797339a7c43Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10798339a7c43Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10799339a7c43Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10800339a7c43Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 10801339a7c43Smrg [$PATH:/usr/gnu/bin])]) 10802339a7c43Smrg 10803339a7c43SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 10804339a7c43Smrg]) # XORG_WITH_M4 10805339a7c43Smrg 108069e7bcd65Smrg# XORG_WITH_PS2PDF([DEFAULT]) 108079e7bcd65Smrg# ---------------- 108089e7bcd65Smrg# Minimum version: 1.6.0 108099e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0 108109e7bcd65Smrg# 108119e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes 108129e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the 108139e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 108149e7bcd65Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 108159e7bcd65Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 108169e7bcd65Smrg# --with-ps2pdf assumes 'auto'. 108179e7bcd65Smrg# 108189e7bcd65Smrg# Interface to module: 108199e7bcd65Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 108209e7bcd65Smrg# PS2PDF: returns the path of the ps2pdf program found 108219e7bcd65Smrg# returns the path set by the user in the environment 108229e7bcd65Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 108239e7bcd65Smrg# 'no' user instructs the module not to use ps2pdf 108249e7bcd65Smrg# 108259e7bcd65Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 108269e7bcd65Smrg# 108279e7bcd65SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 108289e7bcd65SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 108299e7bcd65Smrgm4_define([_defopt], m4_default([$1], [auto])) 108309e7bcd65SmrgAC_ARG_WITH(ps2pdf, 108319e7bcd65Smrg AS_HELP_STRING([--with-ps2pdf], 108329e7bcd65Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 108339e7bcd65Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 108349e7bcd65Smrgm4_undefine([_defopt]) 10835444c061aSmrg 108369e7bcd65Smrgif test "x$use_ps2pdf" = x"auto"; then 108379e7bcd65Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 108389e7bcd65Smrg if test "x$PS2PDF" = "x"; then 108399e7bcd65Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 108409e7bcd65Smrg have_ps2pdf=no 108419e7bcd65Smrg else 108429e7bcd65Smrg have_ps2pdf=yes 108439e7bcd65Smrg fi 108449e7bcd65Smrgelif test "x$use_ps2pdf" = x"yes" ; then 108459e7bcd65Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 108469e7bcd65Smrg if test "x$PS2PDF" = "x"; then 108479e7bcd65Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 108489e7bcd65Smrg fi 108499e7bcd65Smrg have_ps2pdf=yes 108509e7bcd65Smrgelif test "x$use_ps2pdf" = x"no" ; then 108519e7bcd65Smrg if test "x$PS2PDF" != "x"; then 108529e7bcd65Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 108539e7bcd65Smrg fi 108549e7bcd65Smrg have_ps2pdf=no 108559e7bcd65Smrgelse 108569e7bcd65Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 108579e7bcd65Smrgfi 108589e7bcd65SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 108599e7bcd65Smrg]) # XORG_WITH_PS2PDF 10860444c061aSmrg 108619e7bcd65Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 108629e7bcd65Smrg# ---------------- 108639e7bcd65Smrg# Minimum version: 1.6.0 10864bdf0f55dSmrg# 108659e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes 108669e7bcd65Smrg# not at the appropriate level. This macro enables a builder to skip all 108679e7bcd65Smrg# documentation targets except traditional man pages. 108689e7bcd65Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108699e7bcd65Smrg# maximum flexibilty in controlling documentation building. 108709e7bcd65Smrg# Refer to: 108719e7bcd65Smrg# XORG_WITH_XMLTO --with-xmlto 108729e7bcd65Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 108739e7bcd65Smrg# XORG_WITH_DOXYGEN --with-doxygen 108749e7bcd65Smrg# XORG_WITH_FOP --with-fop 108759e7bcd65Smrg# XORG_WITH_GROFF --with-groff 108769e7bcd65Smrg# XORG_WITH_PS2PDF --with-ps2pdf 108779e7bcd65Smrg# 108789e7bcd65Smrg# Interface to module: 108799e7bcd65Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 108809e7bcd65Smrg# --enable-docs: 'yes' user instructs the module to generate docs 108819e7bcd65Smrg# 'no' user instructs the module not to generate docs 108829e7bcd65Smrg# parm1: specify the default value, yes or no. 108839e7bcd65Smrg# 108849e7bcd65SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 108859e7bcd65Smrgm4_define([docs_default], m4_default([$1], [yes])) 108869e7bcd65SmrgAC_ARG_ENABLE(docs, 108879e7bcd65Smrg AS_HELP_STRING([--enable-docs], 108889e7bcd65Smrg [Enable building the documentation (default: ]docs_default[)]), 108899e7bcd65Smrg [build_docs=$enableval], [build_docs=]docs_default) 108909e7bcd65Smrgm4_undefine([docs_default]) 108919e7bcd65SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 108929e7bcd65SmrgAC_MSG_CHECKING([whether to build documentation]) 108939e7bcd65SmrgAC_MSG_RESULT([$build_docs]) 108949e7bcd65Smrg]) # XORG_ENABLE_DOCS 108951477040fSmrg 108969e7bcd65Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 108979e7bcd65Smrg# ---------------- 108989e7bcd65Smrg# Minimum version: 1.6.0 108999e7bcd65Smrg# 109009e7bcd65Smrg# This macro enables a builder to skip all developer documentation. 109019e7bcd65Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 109029e7bcd65Smrg# maximum flexibilty in controlling documentation building. 109039e7bcd65Smrg# Refer to: 109049e7bcd65Smrg# XORG_WITH_XMLTO --with-xmlto 109059e7bcd65Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 109069e7bcd65Smrg# XORG_WITH_DOXYGEN --with-doxygen 109079e7bcd65Smrg# XORG_WITH_FOP --with-fop 109089e7bcd65Smrg# XORG_WITH_GROFF --with-groff 109099e7bcd65Smrg# XORG_WITH_PS2PDF --with-ps2pdf 109109e7bcd65Smrg# 109119e7bcd65Smrg# Interface to module: 109129e7bcd65Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 109139e7bcd65Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 109149e7bcd65Smrg# 'no' user instructs the module not to generate developer docs 109159e7bcd65Smrg# parm1: specify the default value, yes or no. 109169e7bcd65Smrg# 109179e7bcd65SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 109189e7bcd65Smrgm4_define([devel_default], m4_default([$1], [yes])) 109199e7bcd65SmrgAC_ARG_ENABLE(devel-docs, 109209e7bcd65Smrg AS_HELP_STRING([--enable-devel-docs], 109219e7bcd65Smrg [Enable building the developer documentation (default: ]devel_default[)]), 109229e7bcd65Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 109239e7bcd65Smrgm4_undefine([devel_default]) 109249e7bcd65SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 109259e7bcd65SmrgAC_MSG_CHECKING([whether to build developer documentation]) 109269e7bcd65SmrgAC_MSG_RESULT([$build_devel_docs]) 109279e7bcd65Smrg]) # XORG_ENABLE_DEVEL_DOCS 10928444c061aSmrg 109299e7bcd65Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 109309e7bcd65Smrg# ---------------- 109319e7bcd65Smrg# Minimum version: 1.6.0 109329e7bcd65Smrg# 109339e7bcd65Smrg# This macro enables a builder to skip all functional specification targets. 109349e7bcd65Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 109359e7bcd65Smrg# maximum flexibilty in controlling documentation building. 109369e7bcd65Smrg# Refer to: 109379e7bcd65Smrg# XORG_WITH_XMLTO --with-xmlto 109389e7bcd65Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 109399e7bcd65Smrg# XORG_WITH_DOXYGEN --with-doxygen 109409e7bcd65Smrg# XORG_WITH_FOP --with-fop 109419e7bcd65Smrg# XORG_WITH_GROFF --with-groff 109429e7bcd65Smrg# XORG_WITH_PS2PDF --with-ps2pdf 109439e7bcd65Smrg# 109449e7bcd65Smrg# Interface to module: 109459e7bcd65Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 109469e7bcd65Smrg# --enable-specs: 'yes' user instructs the module to generate specs 109479e7bcd65Smrg# 'no' user instructs the module not to generate specs 109489e7bcd65Smrg# parm1: specify the default value, yes or no. 109499e7bcd65Smrg# 109509e7bcd65SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 109519e7bcd65Smrgm4_define([spec_default], m4_default([$1], [yes])) 109529e7bcd65SmrgAC_ARG_ENABLE(specs, 109539e7bcd65Smrg AS_HELP_STRING([--enable-specs], 109549e7bcd65Smrg [Enable building the specs (default: ]spec_default[)]), 109559e7bcd65Smrg [build_specs=$enableval], [build_specs=]spec_default) 109569e7bcd65Smrgm4_undefine([spec_default]) 109579e7bcd65SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 109589e7bcd65SmrgAC_MSG_CHECKING([whether to build functional specifications]) 109599e7bcd65SmrgAC_MSG_RESULT([$build_specs]) 109609e7bcd65Smrg]) # XORG_ENABLE_SPECS 10961444c061aSmrg 109629e7bcd65Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 109639e7bcd65Smrg# ---------------------------------------------- 109649e7bcd65Smrg# Minimum version: 1.13.0 109659e7bcd65Smrg# 109669e7bcd65Smrg# This macro enables a builder to enable/disable unit testing 109679e7bcd65Smrg# It makes no assumption about the test cases implementation 109689e7bcd65Smrg# Test cases may or may not use Automake "Support for test suites" 109699e7bcd65Smrg# They may or may not use the software utility library GLib 109709e7bcd65Smrg# 109719e7bcd65Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 109729e7bcd65Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 109739e7bcd65Smrg# The variable enable_unit_tests is used by other macros in this file. 109749e7bcd65Smrg# 109759e7bcd65Smrg# Interface to module: 109769e7bcd65Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 109779e7bcd65Smrg# enable_unit_tests: used in configure.ac for additional configuration 109789e7bcd65Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 109799e7bcd65Smrg# 'no' user instructs the module not to build tests 109809e7bcd65Smrg# parm1: specify the default value, yes or no. 109819e7bcd65Smrg# 109829e7bcd65SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 109839e7bcd65SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 109849e7bcd65SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 109859e7bcd65SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 109869e7bcd65Smrgm4_define([_defopt], m4_default([$1], [auto])) 109879e7bcd65SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 109889e7bcd65Smrg [Enable building unit test cases (default: ]_defopt[)]), 109899e7bcd65Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 109909e7bcd65Smrgm4_undefine([_defopt]) 109919e7bcd65SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 109929e7bcd65SmrgAC_MSG_CHECKING([whether to build unit test cases]) 109939e7bcd65SmrgAC_MSG_RESULT([$enable_unit_tests]) 109949e7bcd65Smrg]) # XORG_ENABLE_UNIT_TESTS 109959e7bcd65Smrg 109969e7bcd65Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 109979e7bcd65Smrg# ------------------------------------------------------ 109989e7bcd65Smrg# Minimum version: 1.17.0 109999e7bcd65Smrg# 110009e7bcd65Smrg# This macro enables a builder to enable/disable integration testing 110019e7bcd65Smrg# It makes no assumption about the test cases' implementation 110029e7bcd65Smrg# Test cases may or may not use Automake "Support for test suites" 110039e7bcd65Smrg# 110049e7bcd65Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 110059e7bcd65Smrg# usually requires less dependencies and may be built and run under less 110069e7bcd65Smrg# stringent environments than integration tests. 110079e7bcd65Smrg# 110089e7bcd65Smrg# Interface to module: 110099e7bcd65Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 110109e7bcd65Smrg# enable_integration_tests: used in configure.ac for additional configuration 110119e7bcd65Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 110129e7bcd65Smrg# 'no' user instructs the module not to build tests 110139e7bcd65Smrg# parm1: specify the default value, yes or no. 110149e7bcd65Smrg# 110159e7bcd65SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 110169e7bcd65SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 110179e7bcd65Smrgm4_define([_defopt], m4_default([$1], [auto])) 110189e7bcd65SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 110199e7bcd65Smrg [Enable building integration test cases (default: ]_defopt[)]), 110209e7bcd65Smrg [enable_integration_tests=$enableval], 110219e7bcd65Smrg [enable_integration_tests=]_defopt) 110229e7bcd65Smrgm4_undefine([_defopt]) 110239e7bcd65SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 110249e7bcd65Smrg [test "x$enable_integration_tests" != xno]) 110259e7bcd65SmrgAC_MSG_CHECKING([whether to build unit test cases]) 110269e7bcd65SmrgAC_MSG_RESULT([$enable_integration_tests]) 110279e7bcd65Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 110289e7bcd65Smrg 110299e7bcd65Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 110309e7bcd65Smrg# ---------------------------------------- 110319e7bcd65Smrg# Minimum version: 1.13.0 110329e7bcd65Smrg# 110339e7bcd65Smrg# GLib is a library which provides advanced data structures and functions. 110349e7bcd65Smrg# This macro enables a module to test for the presence of Glib. 110359e7bcd65Smrg# 110369e7bcd65Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 110379e7bcd65Smrg# Otherwise the value of $enable_unit_tests is blank. 110389e7bcd65Smrg# 110399e7bcd65Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 110409e7bcd65Smrg# test support usually requires less dependencies and may be built and run under 110419e7bcd65Smrg# less stringent environments than integration tests. 110429e7bcd65Smrg# 110439e7bcd65Smrg# Interface to module: 110449e7bcd65Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 110459e7bcd65Smrg# with_glib: used in configure.ac to know if GLib has been found 110469e7bcd65Smrg# --with-glib: 'yes' user instructs the module to use glib 110479e7bcd65Smrg# 'no' user instructs the module not to use glib 110489e7bcd65Smrg# 110499e7bcd65SmrgAC_DEFUN([XORG_WITH_GLIB],[ 110509e7bcd65SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110519e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto])) 110529e7bcd65SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 110539e7bcd65Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 110549e7bcd65Smrg [with_glib=$withval], [with_glib=]_defopt) 110559e7bcd65Smrgm4_undefine([_defopt]) 110569e7bcd65Smrg 110579e7bcd65Smrghave_glib=no 110589e7bcd65Smrg# Do not probe GLib if user explicitly disabled unit testing 110599e7bcd65Smrgif test "x$enable_unit_tests" != x"no"; then 110609e7bcd65Smrg # Do not probe GLib if user explicitly disabled it 110619e7bcd65Smrg if test "x$with_glib" != x"no"; then 110629e7bcd65Smrg m4_ifval( 110639e7bcd65Smrg [$1], 110649e7bcd65Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 110659e7bcd65Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 110669e7bcd65Smrg ) 11067bdf0f55dSmrg fi 11068bdf0f55dSmrgfi 11069444c061aSmrg 110709e7bcd65Smrg# Not having GLib when unit testing has been explicitly requested is an error 110719e7bcd65Smrgif test "x$enable_unit_tests" = x"yes"; then 110729e7bcd65Smrg if test "x$have_glib" = x"no"; then 110739e7bcd65Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11074249c3046Smrg fi 11075bdf0f55dSmrgfi 110762ae83157Smrg 110779e7bcd65Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 110789e7bcd65Smrgif test "x$enable_unit_tests" = x"no"; then 110799e7bcd65Smrg if test "x$with_glib" = x"yes"; then 110809e7bcd65Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 110819e7bcd65Smrg fi 110829e7bcd65Smrgfi 110832ae83157Smrg 110849e7bcd65Smrg# Not having GLib when it has been explicitly requested is an error 110859e7bcd65Smrgif test "x$with_glib" = x"yes"; then 110869e7bcd65Smrg if test "x$have_glib" = x"no"; then 110879e7bcd65Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 110889e7bcd65Smrg fi 110899e7bcd65Smrgfi 110902ae83157Smrg 110919e7bcd65SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 110929e7bcd65Smrg]) # XORG_WITH_GLIB 11093444c061aSmrg 110949e7bcd65Smrg# XORG_LD_WRAP([required|optional]) 110959e7bcd65Smrg# --------------------------------- 110969e7bcd65Smrg# Minimum version: 1.13.0 11097bdf0f55dSmrg# 110989e7bcd65Smrg# Check if linker supports -wrap, passed via compiler flags 11099249c3046Smrg# 111009e7bcd65Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 111019e7bcd65Smrg# Otherwise the value of $enable_unit_tests is blank. 111029e7bcd65Smrg# 111039e7bcd65Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 111049e7bcd65Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 111059e7bcd65Smrg# available, an argument of "optional" allows use when some unit tests require 111069e7bcd65Smrg# ld -wrap and others do not. 111079e7bcd65Smrg# 111089e7bcd65SmrgAC_DEFUN([XORG_LD_WRAP],[ 111099e7bcd65SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 111109e7bcd65Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 111119e7bcd65Smrg void __wrap_exit(int status) { return; }], 111129e7bcd65Smrg [exit(0);])]) 111139e7bcd65Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 111149e7bcd65Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 111159e7bcd65Smrg if test "x$have_ld_wrap" = x"no"; then 111169e7bcd65Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 111179e7bcd65Smrg fi 111189e7bcd65Smrgfi 111199e7bcd65SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 111209e7bcd65Smrg# 111219e7bcd65Smrg]) # XORG_LD_WRAP 11122444c061aSmrg 111239e7bcd65Smrg# XORG_CHECK_LINKER_FLAGS 111249e7bcd65Smrg# ----------------------- 111259e7bcd65Smrg# SYNOPSIS 111269e7bcd65Smrg# 111279e7bcd65Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 111289e7bcd65Smrg# 111299e7bcd65Smrg# DESCRIPTION 111309e7bcd65Smrg# 111319e7bcd65Smrg# Check whether the given linker FLAGS work with the current language's 111329e7bcd65Smrg# linker, or whether they give an error. 111339e7bcd65Smrg# 111349e7bcd65Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 111359e7bcd65Smrg# success/failure. 111369e7bcd65Smrg# 111379e7bcd65Smrg# PROGRAM-SOURCE is the program source to link with, if needed 111389e7bcd65Smrg# 111399e7bcd65Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 111409e7bcd65Smrg# 111419e7bcd65Smrg# LICENSE 111429e7bcd65Smrg# 111439e7bcd65Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 111449e7bcd65Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 111459e7bcd65Smrg# Copyright (c) 2009 Matteo Frigo 111469e7bcd65Smrg# 111479e7bcd65Smrg# This program is free software: you can redistribute it and/or modify it 111489e7bcd65Smrg# under the terms of the GNU General Public License as published by the 111499e7bcd65Smrg# Free Software Foundation, either version 3 of the License, or (at your 111509e7bcd65Smrg# option) any later version. 111519e7bcd65Smrg# 111529e7bcd65Smrg# This program is distributed in the hope that it will be useful, but 111539e7bcd65Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 111549e7bcd65Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 111559e7bcd65Smrg# Public License for more details. 111569e7bcd65Smrg# 111579e7bcd65Smrg# You should have received a copy of the GNU General Public License along 111589e7bcd65Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 111599e7bcd65Smrg# 111609e7bcd65Smrg# As a special exception, the respective Autoconf Macro's copyright owner 111619e7bcd65Smrg# gives unlimited permission to copy, distribute and modify the configure 111629e7bcd65Smrg# scripts that are the output of Autoconf when processing the Macro. You 111639e7bcd65Smrg# need not follow the terms of the GNU General Public License when using 111649e7bcd65Smrg# or distributing such scripts, even though portions of the text of the 111659e7bcd65Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 111669e7bcd65Smrg# all other use of the material that constitutes the Autoconf Macro. 111679e7bcd65Smrg# 111689e7bcd65Smrg# This special exception to the GPL applies to versions of the Autoconf 111699e7bcd65Smrg# Macro released by the Autoconf Archive. When you make and distribute a 111709e7bcd65Smrg# modified version of the Autoconf Macro, you may extend this special 111719e7bcd65Smrg# exception to the GPL to apply to your modified version as well.# 111729e7bcd65SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 111739e7bcd65Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 111749e7bcd65Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 111759e7bcd65SmrgAS_LITERAL_IF([$1], 111769e7bcd65Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 111779e7bcd65Smrg ax_save_FLAGS=$LDFLAGS 111789e7bcd65Smrg LDFLAGS="$1" 111799e7bcd65Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 111809e7bcd65Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 111819e7bcd65Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 111829e7bcd65Smrg LDFLAGS=$ax_save_FLAGS])], 111839e7bcd65Smrg [ax_save_FLAGS=$LDFLAGS 111849e7bcd65Smrg LDFLAGS="$1" 111859e7bcd65Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 111869e7bcd65Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 111879e7bcd65Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 111889e7bcd65Smrg LDFLAGS=$ax_save_FLAGS]) 111899e7bcd65Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 111909e7bcd65SmrgAC_MSG_RESULT($xorg_check_linker_flags) 111919e7bcd65Smrgif test "x$xorg_check_linker_flags" = xyes; then 111929e7bcd65Smrg m4_default([$2], :) 11193bdf0f55dSmrgelse 111949e7bcd65Smrg m4_default([$3], :) 11195bdf0f55dSmrgfi 111969e7bcd65Smrg]) # XORG_CHECK_LINKER_FLAGS 11197444c061aSmrg 111989e7bcd65Smrg# XORG_MEMORY_CHECK_FLAGS 111999e7bcd65Smrg# ----------------------- 112009e7bcd65Smrg# Minimum version: 1.16.0 11201bdf0f55dSmrg# 112029e7bcd65Smrg# This macro attempts to find appropriate memory checking functionality 112039e7bcd65Smrg# for various platforms which unit testing code may use to catch various 112049e7bcd65Smrg# forms of memory allocation and access errors in testing. 112059e7bcd65Smrg# 112069e7bcd65Smrg# Interface to module: 112079e7bcd65Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 112089e7bcd65Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 112099e7bcd65Smrg# 112109e7bcd65Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 112119e7bcd65Smrg# 112129e7bcd65SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11213444c061aSmrg 112149e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 112159e7bcd65SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 112169e7bcd65Smrg [Environment variables to enable memory checking in tests]) 11217444c061aSmrg 112189e7bcd65Smrg# Check for different types of support on different platforms 112199e7bcd65Smrgcase $host_os in 112209e7bcd65Smrg solaris*) 112219e7bcd65Smrg AC_CHECK_LIB([umem], [umem_alloc], 112229e7bcd65Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 112239e7bcd65Smrg ;; 112249e7bcd65Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 112259e7bcd65Smrg # both directly and inverted, so should not be 0 or 255. 112269e7bcd65Smrg malloc_debug_env='MALLOC_PERTURB_=15' 112279e7bcd65Smrg ;; 112289e7bcd65Smrg darwin*) 112299e7bcd65Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 112309e7bcd65Smrg ;; 112319e7bcd65Smrg *bsd*) 112329e7bcd65Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 112339e7bcd65Smrg ;; 112349e7bcd65Smrgesac 11235444c061aSmrg 112369e7bcd65Smrg# User supplied flags override default flags 112379e7bcd65Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 112389e7bcd65Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 112399e7bcd65Smrgfi 11240444c061aSmrg 112419e7bcd65SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 112429e7bcd65Smrg]) # XORG_WITH_LINT 112432ae83157Smrg 112449e7bcd65Smrg# XORG_CHECK_MALLOC_ZERO 112459e7bcd65Smrg# ---------------------- 112469e7bcd65Smrg# Minimum version: 1.0.0 11247bdf0f55dSmrg# 112489e7bcd65Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 112499e7bcd65Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 112509e7bcd65Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 112519e7bcd65SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 112529e7bcd65SmrgAC_ARG_ENABLE(malloc0returnsnull, 112539e7bcd65Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 112549e7bcd65Smrg [malloc(0) returns NULL (default: auto)]), 112559e7bcd65Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 112569e7bcd65Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 112572ae83157Smrg 112589e7bcd65SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 112599e7bcd65Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11260339a7c43SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 11261339a7c43Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 112629e7bcd65Smrg#include <stdlib.h> 112639e7bcd65Smrg],[ 112649e7bcd65Smrg char *m0, *r0, *c0, *p; 112659e7bcd65Smrg m0 = malloc(0); 112669e7bcd65Smrg p = malloc(10); 112679e7bcd65Smrg r0 = realloc(p,0); 112689e7bcd65Smrg c0 = calloc(0,10); 112699e7bcd65Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 112709e7bcd65Smrg])], 11271339a7c43Smrg [xorg_cv_malloc0_returns_null=yes], 11272339a7c43Smrg [xorg_cv_malloc0_returns_null=no])]) 11273339a7c43SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 112749e7bcd65Smrgfi 112759e7bcd65SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11276444c061aSmrg 112779e7bcd65Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 112789e7bcd65Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 112799e7bcd65Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 112809e7bcd65Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 112819e7bcd65Smrgelse 112829e7bcd65Smrg MALLOC_ZERO_CFLAGS="" 112839e7bcd65Smrg XMALLOC_ZERO_CFLAGS="" 112849e7bcd65Smrg XTMALLOC_ZERO_CFLAGS="" 11285bdf0f55dSmrgfi 112862ae83157Smrg 112879e7bcd65SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 112889e7bcd65SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 112899e7bcd65SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 112909e7bcd65Smrg]) # XORG_CHECK_MALLOC_ZERO 11291444c061aSmrg 112929e7bcd65Smrg# XORG_WITH_LINT() 112939e7bcd65Smrg# ---------------- 112949e7bcd65Smrg# Minimum version: 1.1.0 11295bdf0f55dSmrg# 112969e7bcd65Smrg# This macro enables the use of a tool that flags some suspicious and 112979e7bcd65Smrg# non-portable constructs (likely to be bugs) in C language source code. 112989e7bcd65Smrg# It will attempt to locate the tool and use appropriate options. 112999e7bcd65Smrg# There are various lint type tools on different platforms. 113009e7bcd65Smrg# 113019e7bcd65Smrg# Interface to module: 113029e7bcd65Smrg# LINT: returns the path to the tool found on the platform 113039e7bcd65Smrg# or the value set to LINT on the configure cmd line 113049e7bcd65Smrg# also an Automake conditional 113059e7bcd65Smrg# LINT_FLAGS: an Automake variable with appropriate flags 113069e7bcd65Smrg# 113079e7bcd65Smrg# --with-lint: 'yes' user instructs the module to use lint 113089e7bcd65Smrg# 'no' user instructs the module not to use lint (default) 113099e7bcd65Smrg# 113109e7bcd65Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 113119e7bcd65Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 113129e7bcd65Smrg# 113139e7bcd65SmrgAC_DEFUN([XORG_WITH_LINT],[ 11314249c3046Smrg 113159e7bcd65SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 113169e7bcd65SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 113179e7bcd65SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 113189e7bcd65Smrg [Use a lint-style source code checker (default: disabled)])], 113199e7bcd65Smrg [use_lint=$withval], [use_lint=no]) 11320249c3046Smrg 113219e7bcd65Smrg# Obtain platform specific info like program name and options 113229e7bcd65Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 113239e7bcd65Smrgcase $host_os in 113249e7bcd65Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 113259e7bcd65Smrg lint_name=splint 113269e7bcd65Smrg lint_options="-badflag" 113279e7bcd65Smrg ;; 113289e7bcd65Smrg *freebsd* | *netbsd*) 113299e7bcd65Smrg lint_name=lint 113309e7bcd65Smrg lint_options="-u -b" 113319e7bcd65Smrg ;; 113329e7bcd65Smrg *solaris*) 113339e7bcd65Smrg lint_name=lint 113349e7bcd65Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 113359e7bcd65Smrg ;; 113369e7bcd65Smrgesac 11337444c061aSmrg 113389e7bcd65Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 113399e7bcd65Smrgif test "x$use_lint" = x"yes" ; then 113409e7bcd65Smrg AC_PATH_PROG([LINT], [$lint_name]) 113419e7bcd65Smrg if test "x$LINT" = "x"; then 113429e7bcd65Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 113439e7bcd65Smrg fi 113449e7bcd65Smrgelif test "x$use_lint" = x"no" ; then 113459e7bcd65Smrg if test "x$LINT" != "x"; then 113469e7bcd65Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 113479e7bcd65Smrg fi 11348bdf0f55dSmrgelse 113499e7bcd65Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11350bdf0f55dSmrgfi 11351444c061aSmrg 113529e7bcd65Smrg# User supplied flags override default flags 113539e7bcd65Smrgif test "x$LINT_FLAGS" != "x"; then 113549e7bcd65Smrg lint_options=$LINT_FLAGS 113559e7bcd65Smrgfi 11356249c3046Smrg 113579e7bcd65SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 113589e7bcd65SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11359444c061aSmrg 113609e7bcd65Smrg]) # XORG_WITH_LINT 113612ae83157Smrg 113629e7bcd65Smrg# XORG_LINT_LIBRARY(LIBNAME) 113639e7bcd65Smrg# -------------------------- 113649e7bcd65Smrg# Minimum version: 1.1.0 11365bdf0f55dSmrg# 113669e7bcd65Smrg# Sets up flags for building lint libraries for checking programs that call 113679e7bcd65Smrg# functions in the library. 113689e7bcd65Smrg# 113699e7bcd65Smrg# Interface to module: 113709e7bcd65Smrg# LINTLIB - Automake variable with the name of lint library file to make 113719e7bcd65Smrg# MAKE_LINT_LIB - Automake conditional 113729e7bcd65Smrg# 113739e7bcd65Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 113749e7bcd65Smrg# - 'no' user instructs the module not to create a lint library (default) 11375249c3046Smrg 113769e7bcd65SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 113779e7bcd65SmrgAC_REQUIRE([XORG_WITH_LINT]) 113789e7bcd65SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 113799e7bcd65Smrg [Create lint library (default: disabled)])], 113809e7bcd65Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 113812265a131Smrg 113829e7bcd65Smrgif test "x$make_lint_lib" = x"yes" ; then 113839e7bcd65Smrg LINTLIB=llib-l$1.ln 113849e7bcd65Smrg if test "x$LINT" = "x"; then 113859e7bcd65Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 113869e7bcd65Smrg fi 113879e7bcd65Smrgelif test "x$make_lint_lib" != x"no" ; then 113889e7bcd65Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 113899e7bcd65Smrgfi 11390444c061aSmrg 113919e7bcd65SmrgAC_SUBST(LINTLIB) 113929e7bcd65SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11393444c061aSmrg 113949e7bcd65Smrg]) # XORG_LINT_LIBRARY 113952265a131Smrg 113969e7bcd65Smrg# XORG_COMPILER_BRAND 113979e7bcd65Smrg# ------------------- 113989e7bcd65Smrg# Minimum version: 1.14.0 113991477040fSmrg# 114009e7bcd65Smrg# Checks for various brands of compilers and sets flags as appropriate: 114019e7bcd65Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 114029e7bcd65Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 114039e7bcd65Smrg# clang compiler - sets CLANGCC to "yes" 114049e7bcd65Smrg# Intel compiler - sets INTELCC to "yes" 114059e7bcd65Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 114069e7bcd65Smrg# 114079e7bcd65SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 114089e7bcd65SmrgAC_LANG_CASE( 114099e7bcd65Smrg [C], [ 114109e7bcd65Smrg AC_REQUIRE([AC_PROG_CC_C99]) 114119e7bcd65Smrg ], 114129e7bcd65Smrg [C++], [ 114139e7bcd65Smrg AC_REQUIRE([AC_PROG_CXX]) 114149e7bcd65Smrg ] 114159e7bcd65Smrg) 114169e7bcd65SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 114179e7bcd65SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 114189e7bcd65SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 114199e7bcd65Smrg]) # XORG_COMPILER_BRAND 11420249c3046Smrg 114219e7bcd65Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11422bdf0f55dSmrg# --------------- 114239e7bcd65Smrg# Minimum version: 1.16.0 114249e7bcd65Smrg# 114259e7bcd65Smrg# Test if the compiler works when passed the given flag as a command line argument. 114269e7bcd65Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 114279e7bcd65Smrg# next flag in the list until there are no more options. 114289e7bcd65Smrg# 114299e7bcd65Smrg# Note that this does not guarantee that the compiler supports the flag as some 114309e7bcd65Smrg# compilers will simply ignore arguments that they do not understand, but we do 114319e7bcd65Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 114329e7bcd65Smrg# -Werror=unused-command-line-argument 114339e7bcd65Smrg# 114349e7bcd65SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 114359e7bcd65Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 114369e7bcd65Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 114379e7bcd65Smrg 114389e7bcd65SmrgAC_LANG_COMPILER_REQUIRE 114399e7bcd65Smrg 114409e7bcd65SmrgAC_LANG_CASE( 114419e7bcd65Smrg [C], [ 114429e7bcd65Smrg AC_REQUIRE([AC_PROG_CC_C99]) 114439e7bcd65Smrg define([PREFIX], [C]) 114449e7bcd65Smrg define([CACHE_PREFIX], [cc]) 114459e7bcd65Smrg define([COMPILER], [$CC]) 114469e7bcd65Smrg ], 114479e7bcd65Smrg [C++], [ 114489e7bcd65Smrg define([PREFIX], [CXX]) 114499e7bcd65Smrg define([CACHE_PREFIX], [cxx]) 114509e7bcd65Smrg define([COMPILER], [$CXX]) 114519e7bcd65Smrg ] 114529e7bcd65Smrg) 11453249c3046Smrg 114549e7bcd65Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 114559e7bcd65Smrg 114569e7bcd65Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 114579e7bcd65Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114589e7bcd65Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 114599e7bcd65Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 114609e7bcd65Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 114619e7bcd65Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 114629e7bcd65Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 114639e7bcd65Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 114649e7bcd65Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11465bdf0f55dSmrgfi 114662265a131Smrg 114679e7bcd65Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 114689e7bcd65Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 114699e7bcd65Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114709e7bcd65Smrg fi 114719e7bcd65Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 114729e7bcd65Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 114739e7bcd65Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 114749e7bcd65Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 114759e7bcd65Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 114769e7bcd65Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 114779e7bcd65Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 114789e7bcd65Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114799e7bcd65Smrgfi 11480444c061aSmrg 114819e7bcd65Smrgfound="no" 114829e7bcd65Smrgm4_foreach([flag], m4_cdr($@), [ 114839e7bcd65Smrg if test $found = "no" ; then 11484339a7c43Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 114859e7bcd65Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114869e7bcd65Smrg fi 114879e7bcd65Smrg 11488339a7c43Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 114899e7bcd65Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 114909e7bcd65Smrg fi 114919e7bcd65Smrg 114929e7bcd65Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 114939e7bcd65Smrg 114949e7bcd65Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 114959e7bcd65Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 114969e7bcd65Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 114979e7bcd65Smrg AC_CACHE_VAL($cacheid, 114989e7bcd65Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 114999e7bcd65Smrg [eval $cacheid=yes], 115009e7bcd65Smrg [eval $cacheid=no])]) 115019e7bcd65Smrg 115029e7bcd65Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 115039e7bcd65Smrg 115049e7bcd65Smrg eval supported=\$$cacheid 115059e7bcd65Smrg AC_MSG_RESULT([$supported]) 115069e7bcd65Smrg if test "$supported" = "yes" ; then 115079e7bcd65Smrg $1="$$1 ]flag[" 115089e7bcd65Smrg found="yes" 115099e7bcd65Smrg fi 115109e7bcd65Smrg fi 11511249c3046Smrg]) 115129e7bcd65Smrg]) # XORG_TESTSET_CFLAG 115132ae83157Smrg 115149e7bcd65Smrg# XORG_COMPILER_FLAGS 115159e7bcd65Smrg# --------------- 115169e7bcd65Smrg# Minimum version: 1.16.0 115172ae83157Smrg# 115189e7bcd65Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 115199e7bcd65Smrg# arguments supported by the selected compiler which do NOT alter the generated 115209e7bcd65Smrg# code. These arguments will cause the compiler to print various warnings 115219e7bcd65Smrg# during compilation AND turn a conservative set of warnings into errors. 115229e7bcd65Smrg# 115239e7bcd65Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 115249e7bcd65Smrg# future versions of util-macros as options are added to new compilers. 115259e7bcd65Smrg# 115269e7bcd65SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 115279e7bcd65SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 115289e7bcd65Smrg 115299e7bcd65SmrgAC_ARG_ENABLE(selective-werror, 115309e7bcd65Smrg AS_HELP_STRING([--disable-selective-werror], 115319e7bcd65Smrg [Turn off selective compiler errors. (default: enabled)]), 115329e7bcd65Smrg [SELECTIVE_WERROR=$enableval], 115339e7bcd65Smrg [SELECTIVE_WERROR=yes]) 115349e7bcd65Smrg 115359e7bcd65SmrgAC_LANG_CASE( 115369e7bcd65Smrg [C], [ 115379e7bcd65Smrg define([PREFIX], [C]) 115389e7bcd65Smrg ], 115399e7bcd65Smrg [C++], [ 115409e7bcd65Smrg define([PREFIX], [CXX]) 115419e7bcd65Smrg ] 115429e7bcd65Smrg) 115439e7bcd65Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 115449e7bcd65Smrgif test "x$SUNCC" = "xyes"; then 115459e7bcd65Smrg [BASE_]PREFIX[FLAGS]="-v" 115469e7bcd65Smrgelse 115479e7bcd65Smrg [BASE_]PREFIX[FLAGS]="" 115489e7bcd65Smrgfi 11549bdf0f55dSmrg 115509e7bcd65Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 115519e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 115529e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 115539e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 115549e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 115559e7bcd65Smrg 115569e7bcd65SmrgAC_LANG_CASE( 115579e7bcd65Smrg [C], [ 115589e7bcd65Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 115599e7bcd65Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 115609e7bcd65Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 115619e7bcd65Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11562339a7c43Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 115639e7bcd65Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 115649e7bcd65Smrg ] 115659e7bcd65Smrg) 115669e7bcd65Smrg 115679e7bcd65Smrg# This chunk adds additional warnings that could catch undesired effects. 115689e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 115699e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 115709e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 115719e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 115729e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 115739e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11574339a7c43SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 115759e7bcd65Smrg 115769e7bcd65Smrg# These are currently disabled because they are noisy. They will be enabled 115779e7bcd65Smrg# in the future once the codebase is sufficiently modernized to silence 115789e7bcd65Smrg# them. For now, I don't want them to drown out the other warnings. 115799e7bcd65Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 115809e7bcd65Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11581339a7c43Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 115829e7bcd65Smrg 115839e7bcd65Smrg# Turn some warnings into errors, so we don't accidently get successful builds 115849e7bcd65Smrg# when there are problems that should be fixed. 115859e7bcd65Smrg 115869e7bcd65Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 115879e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 115889e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 115899e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 115909e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 115919e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 115929e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 115939e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 115949e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 115959e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 115969e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 115979e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 115989e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 115999e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 116009e7bcd65Smrgelse 116019e7bcd65SmrgAC_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]) 116029e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 116039e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 116049e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 116059e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 116069e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 116079e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 116089e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 116099e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 116109e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 116119e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 116129e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 116139e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 116149e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11615bdf0f55dSmrgfi 11616bdf0f55dSmrg 116179e7bcd65SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 116189e7bcd65Smrg]) # XORG_COMPILER_FLAGS 116199e7bcd65Smrg 116209e7bcd65Smrg# XORG_CWARNFLAGS 116219e7bcd65Smrg# --------------- 116229e7bcd65Smrg# Minimum version: 1.2.0 116239e7bcd65Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11624249c3046Smrg# 116259e7bcd65Smrg# Defines CWARNFLAGS to enable C compiler warnings. 116269e7bcd65Smrg# 116279e7bcd65Smrg# This function is deprecated because it defines -fno-strict-aliasing 116289e7bcd65Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 116299e7bcd65Smrg# is needed, then it should be added explicitly in the module when 116309e7bcd65Smrg# it is updated to use BASE_CFLAGS. 116319e7bcd65Smrg# 116329e7bcd65SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 116339e7bcd65SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 116349e7bcd65SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 116359e7bcd65SmrgAC_LANG_CASE( 116369e7bcd65Smrg [C], [ 116379e7bcd65Smrg CWARNFLAGS="$BASE_CFLAGS" 116389e7bcd65Smrg if test "x$GCC" = xyes ; then 116399e7bcd65Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 116409e7bcd65Smrg fi 116419e7bcd65Smrg AC_SUBST(CWARNFLAGS) 116429e7bcd65Smrg ] 116439e7bcd65Smrg) 116449e7bcd65Smrg]) # XORG_CWARNFLAGS 116452265a131Smrg 116469e7bcd65Smrg# XORG_STRICT_OPTION 116479e7bcd65Smrg# ----------------------- 116489e7bcd65Smrg# Minimum version: 1.3.0 116499e7bcd65Smrg# 116509e7bcd65Smrg# Add configure option to enable strict compilation flags, such as treating 116519e7bcd65Smrg# warnings as fatal errors. 116529e7bcd65Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 116539e7bcd65Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 116549e7bcd65Smrg# 116559e7bcd65Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 116569e7bcd65Smrg# when strict compilation is unconditionally desired. 116579e7bcd65SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 116589e7bcd65SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 116599e7bcd65SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 116602265a131Smrg 116619e7bcd65SmrgAC_ARG_ENABLE(strict-compilation, 116629e7bcd65Smrg AS_HELP_STRING([--enable-strict-compilation], 116639e7bcd65Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 116649e7bcd65Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11665444c061aSmrg 116669e7bcd65SmrgAC_LANG_CASE( 116679e7bcd65Smrg [C], [ 116689e7bcd65Smrg define([PREFIX], [C]) 116699e7bcd65Smrg ], 116709e7bcd65Smrg [C++], [ 116719e7bcd65Smrg define([PREFIX], [CXX]) 116729e7bcd65Smrg ] 116739e7bcd65Smrg) 11674444c061aSmrg 116759e7bcd65Smrg[STRICT_]PREFIX[FLAGS]="" 116769e7bcd65SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 116779e7bcd65SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11678444c061aSmrg 116799e7bcd65Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 116809e7bcd65Smrg# activate it with -Werror, so we add it here explicitly. 116819e7bcd65SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11682444c061aSmrg 116839e7bcd65Smrgif test "x$STRICT_COMPILE" = "xyes"; then 116849e7bcd65Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 116859e7bcd65Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 116869e7bcd65Smrgfi 116879e7bcd65SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 116889e7bcd65SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 116899e7bcd65SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 116909e7bcd65Smrg]) # XORG_STRICT_OPTION 11691444c061aSmrg 116929e7bcd65Smrg# XORG_DEFAULT_OPTIONS 11693bdf0f55dSmrg# -------------------- 116949e7bcd65Smrg# Minimum version: 1.3.0 11695249c3046Smrg# 116969e7bcd65Smrg# Defines default options for X.Org modules. 11697249c3046Smrg# 116989e7bcd65SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 116999e7bcd65SmrgAC_REQUIRE([AC_PROG_INSTALL]) 117009e7bcd65SmrgXORG_COMPILER_FLAGS 117019e7bcd65SmrgXORG_CWARNFLAGS 117029e7bcd65SmrgXORG_STRICT_OPTION 117039e7bcd65SmrgXORG_RELEASE_VERSION 117049e7bcd65SmrgXORG_CHANGELOG 117059e7bcd65SmrgXORG_INSTALL 117069e7bcd65SmrgXORG_MANPAGE_SECTIONS 117079e7bcd65Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 117089e7bcd65Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 117099e7bcd65Smrg]) # XORG_DEFAULT_OPTIONS 11710bdf0f55dSmrg 117119e7bcd65Smrg# XORG_INSTALL() 117129e7bcd65Smrg# ---------------- 117139e7bcd65Smrg# Minimum version: 1.4.0 117149e7bcd65Smrg# 117159e7bcd65Smrg# Defines the variable INSTALL_CMD as the command to copy 117169e7bcd65Smrg# INSTALL from $prefix/share/util-macros. 117179e7bcd65Smrg# 117189e7bcd65SmrgAC_DEFUN([XORG_INSTALL], [ 117199e7bcd65SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 117209e7bcd65Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 117219e7bcd65SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 117229e7bcd65Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 117239e7bcd65Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 117249e7bcd65Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 117259e7bcd65SmrgAC_SUBST([INSTALL_CMD]) 117269e7bcd65Smrg]) # XORG_INSTALL 117279e7bcd65Smrgdnl Copyright 2005 Red Hat, Inc 117289e7bcd65Smrgdnl 117299e7bcd65Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 117309e7bcd65Smrgdnl documentation for any purpose is hereby granted without fee, provided that 117319e7bcd65Smrgdnl the above copyright notice appear in all copies and that both that 117329e7bcd65Smrgdnl copyright notice and this permission notice appear in supporting 117339e7bcd65Smrgdnl documentation. 117349e7bcd65Smrgdnl 117359e7bcd65Smrgdnl The above copyright notice and this permission notice shall be included 117369e7bcd65Smrgdnl in all copies or substantial portions of the Software. 117379e7bcd65Smrgdnl 117389e7bcd65Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 117399e7bcd65Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 117409e7bcd65Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 117419e7bcd65Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 117429e7bcd65Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 117439e7bcd65Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 117449e7bcd65Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 117459e7bcd65Smrgdnl 117469e7bcd65Smrgdnl Except as contained in this notice, the name of the copyright holders shall 117479e7bcd65Smrgdnl not be used in advertising or otherwise to promote the sale, use or 117489e7bcd65Smrgdnl other dealings in this Software without prior written authorization 117499e7bcd65Smrgdnl from the copyright holders. 117509e7bcd65Smrgdnl 11751bdf0f55dSmrg 117529e7bcd65Smrg# XORG_RELEASE_VERSION 117539e7bcd65Smrg# -------------------- 117549e7bcd65Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11755339a7c43Smrg 117569e7bcd65SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 117579e7bcd65Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 117589e7bcd65Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 117599e7bcd65Smrg [Major version of this package]) 117609e7bcd65Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 117619e7bcd65Smrg if test "x$PVM" = "x"; then 117629e7bcd65Smrg PVM="0" 117639e7bcd65Smrg fi 117649e7bcd65Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 117659e7bcd65Smrg [$PVM], 117669e7bcd65Smrg [Minor version of this package]) 117679e7bcd65Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 117689e7bcd65Smrg if test "x$PVP" = "x"; then 117699e7bcd65Smrg PVP="0" 117709e7bcd65Smrg fi 117719e7bcd65Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 117729e7bcd65Smrg [$PVP], 117739e7bcd65Smrg [Patch version of this package]) 117749e7bcd65Smrg]) 11775bdf0f55dSmrg 117769e7bcd65Smrg# XORG_CHANGELOG() 117779e7bcd65Smrg# ---------------- 117789e7bcd65Smrg# Minimum version: 1.2.0 117799e7bcd65Smrg# 117809e7bcd65Smrg# Defines the variable CHANGELOG_CMD as the command to generate 117819e7bcd65Smrg# ChangeLog from git. 117829e7bcd65Smrg# 117839e7bcd65Smrg# 117849e7bcd65SmrgAC_DEFUN([XORG_CHANGELOG], [ 117859e7bcd65SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 117869e7bcd65Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 117879e7bcd65Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 117889e7bcd65Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 117899e7bcd65SmrgAC_SUBST([CHANGELOG_CMD]) 117909e7bcd65Smrg]) # XORG_CHANGELOG 11791444c061aSmrg 11792