aclocal.m4 revision 26b1ff4e
126b1ff4eSmrg# generated automatically by aclocal 1.13.4 -*- Autoconf -*- 23e72ca8cSmrg 326b1ff4eSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4ee3138f1Smrg 5ee3138f1Smrg# This file is free software; the Free Software Foundation 6ee3138f1Smrg# gives unlimited permission to copy and/or distribute it, 7ee3138f1Smrg# with or without modifications, as long as this notice is preserved. 8ee3138f1Smrg 9ee3138f1Smrg# This program is distributed in the hope that it will be useful, 10ee3138f1Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ee3138f1Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ee3138f1Smrg# PARTICULAR PURPOSE. 13ee3138f1Smrg 1426b1ff4eSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15ee3138f1Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16ee3138f1Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 173e72ca8cSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 183e72ca8cSmrg[m4_warning([this file was generated for autoconf 2.69. 19ee3138f1SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20ee3138f1SmrgIf you have problems, you may need to regenerate the build system entirely. 213e72ca8cSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22ee3138f1Smrg 2326b1ff4eSmrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 2434977a2fSmrg# 253e72ca8cSmrg# This file is free software; the Free Software Foundation 263e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 273e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 283e72ca8cSmrg 293e72ca8cSmrg# AM_AUTOMAKE_VERSION(VERSION) 303e72ca8cSmrg# ---------------------------- 313e72ca8cSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 323e72ca8cSmrg# generated from the m4 files accompanying Automake X.Y. 333e72ca8cSmrg# (This private macro should not be called outside this file.) 343e72ca8cSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3526b1ff4eSmrg[am__api_version='1.13' 363e72ca8cSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 373e72ca8cSmrgdnl require some minimum version. Point them to the right macro. 3826b1ff4eSmrgm4_if([$1], [1.13.4], [], 393e72ca8cSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 403e72ca8cSmrg]) 413e72ca8cSmrg 423e72ca8cSmrg# _AM_AUTOCONF_VERSION(VERSION) 433e72ca8cSmrg# ----------------------------- 443e72ca8cSmrg# aclocal traces this macro to find the Autoconf version. 453e72ca8cSmrg# This is a private macro too. Using m4_define simplifies 463e72ca8cSmrg# the logic in aclocal, which can simply ignore this definition. 473e72ca8cSmrgm4_define([_AM_AUTOCONF_VERSION], []) 483e72ca8cSmrg 493e72ca8cSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 503e72ca8cSmrg# ------------------------------- 513e72ca8cSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 523e72ca8cSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 533e72ca8cSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5426b1ff4eSmrg[AM_AUTOMAKE_VERSION([1.13.4])dnl 553e72ca8cSmrgm4_ifndef([AC_AUTOCONF_VERSION], 563e72ca8cSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 573e72ca8cSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 583e72ca8cSmrg 593e72ca8cSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 603e72ca8cSmrg 6126b1ff4eSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 6234977a2fSmrg# 633e72ca8cSmrg# This file is free software; the Free Software Foundation 643e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 653e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 6634977a2fSmrg 673e72ca8cSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 683e72ca8cSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 693e72ca8cSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 7034977a2fSmrg# 713e72ca8cSmrg# Of course, Automake must honor this variable whenever it calls a 723e72ca8cSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 733e72ca8cSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 743e72ca8cSmrg# depending on how configure is run. This is pretty annoying, since 753e72ca8cSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 763e72ca8cSmrg# source directory, any form will work fine, but in subdirectories a 773e72ca8cSmrg# relative path needs to be adjusted first. 7834977a2fSmrg# 793e72ca8cSmrg# $ac_aux_dir/missing 803e72ca8cSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 813e72ca8cSmrg# $top_srcdir/$ac_aux_dir/missing 823e72ca8cSmrg# fails if $ac_aux_dir is absolute, 833e72ca8cSmrg# fails when called from a subdirectory in a VPATH build with 843e72ca8cSmrg# a relative $ac_aux_dir 8534977a2fSmrg# 863e72ca8cSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 873e72ca8cSmrg# are both prefixed by $srcdir. In an in-source build this is usually 883e72ca8cSmrg# harmless because $srcdir is '.', but things will broke when you 893e72ca8cSmrg# start a VPATH build or use an absolute $srcdir. 9034977a2fSmrg# 913e72ca8cSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 923e72ca8cSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 933e72ca8cSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 943e72ca8cSmrg# and then we would define $MISSING as 953e72ca8cSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 963e72ca8cSmrg# This will work as long as MISSING is not called from configure, because 973e72ca8cSmrg# unfortunately $(top_srcdir) has no meaning in configure. 983e72ca8cSmrg# However there are other variables, like CC, which are often used in 993e72ca8cSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10034977a2fSmrg# 1013e72ca8cSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1023e72ca8cSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1033e72ca8cSmrg# configured tree to be moved without reconfiguration. 104ee3138f1Smrg 1053e72ca8cSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1063e72ca8cSmrg[dnl Rely on autoconf to set up CDPATH properly. 1073e72ca8cSmrgAC_PREREQ([2.50])dnl 1083e72ca8cSmrg# expand $ac_aux_dir to an absolute path 1093e72ca8cSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 110a1ed278cSmrg]) 11134977a2fSmrg 1123e72ca8cSmrg# AM_CONDITIONAL -*- Autoconf -*- 11334977a2fSmrg 11426b1ff4eSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 1153e72ca8cSmrg# 1163e72ca8cSmrg# This file is free software; the Free Software Foundation 1173e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 1183e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 11934977a2fSmrg 1203e72ca8cSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1213e72ca8cSmrg# ------------------------------------- 1223e72ca8cSmrg# Define a conditional. 1233e72ca8cSmrgAC_DEFUN([AM_CONDITIONAL], 1243e72ca8cSmrg[AC_PREREQ([2.52])dnl 1253e72ca8cSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1263e72ca8cSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1273e72ca8cSmrgAC_SUBST([$1_TRUE])dnl 1283e72ca8cSmrgAC_SUBST([$1_FALSE])dnl 1293e72ca8cSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1303e72ca8cSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1313e72ca8cSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1323e72ca8cSmrgif $2; then 1333e72ca8cSmrg $1_TRUE= 1343e72ca8cSmrg $1_FALSE='#' 1353e72ca8cSmrgelse 1363e72ca8cSmrg $1_TRUE='#' 1373e72ca8cSmrg $1_FALSE= 1383e72ca8cSmrgfi 1393e72ca8cSmrgAC_CONFIG_COMMANDS_PRE( 1403e72ca8cSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1413e72ca8cSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1423e72ca8cSmrgUsually this means the macro was only invoked conditionally.]]) 1433e72ca8cSmrgfi])]) 14434977a2fSmrg 14526b1ff4eSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 1463e72ca8cSmrg# 1473e72ca8cSmrg# This file is free software; the Free Software Foundation 1483e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 1493e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 15034977a2fSmrg 151ee3138f1Smrg 1523e72ca8cSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1533e72ca8cSmrg# written in clear, in which case automake, when reading aclocal.m4, 1543e72ca8cSmrg# will think it sees a *use*, and therefore will trigger all it's 1553e72ca8cSmrg# C support machinery. Also note that it means that autoscan, seeing 1563e72ca8cSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 157ee3138f1Smrg 158ee3138f1Smrg 1593e72ca8cSmrg# _AM_DEPENDENCIES(NAME) 1603e72ca8cSmrg# ---------------------- 1613e72ca8cSmrg# See how the compiler implements dependency checking. 1623e72ca8cSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1633e72ca8cSmrg# We try a few techniques and use that to set a single cache variable. 1643e72ca8cSmrg# 1653e72ca8cSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1663e72ca8cSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1673e72ca8cSmrg# dependency, and given that the user is not expected to run this macro, 1683e72ca8cSmrg# just rely on AC_PROG_CC. 1693e72ca8cSmrgAC_DEFUN([_AM_DEPENDENCIES], 1703e72ca8cSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1713e72ca8cSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1723e72ca8cSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1733e72ca8cSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 17479a8a9c6Smrg 1753e72ca8cSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1763e72ca8cSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1773e72ca8cSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1783e72ca8cSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1793e72ca8cSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1803e72ca8cSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1813e72ca8cSmrg [depcc="$$1" am_compiler_list=]) 182ee3138f1Smrg 1833e72ca8cSmrgAC_CACHE_CHECK([dependency style of $depcc], 1843e72ca8cSmrg [am_cv_$1_dependencies_compiler_type], 1853e72ca8cSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1863e72ca8cSmrg # We make a subdir and do the tests there. Otherwise we can end up 1873e72ca8cSmrg # making bogus files that we don't know about and never remove. For 1883e72ca8cSmrg # instance it was reported that on HP-UX the gcc test will end up 1893e72ca8cSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 1903e72ca8cSmrg # in D". 1913e72ca8cSmrg rm -rf conftest.dir 1923e72ca8cSmrg mkdir conftest.dir 1933e72ca8cSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 1943e72ca8cSmrg # using a relative directory. 1953e72ca8cSmrg cp "$am_depcomp" conftest.dir 1963e72ca8cSmrg cd conftest.dir 1973e72ca8cSmrg # We will build objects and dependencies in a subdirectory because 1983e72ca8cSmrg # it helps to detect inapplicable dependency modes. For instance 1993e72ca8cSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 2003e72ca8cSmrg # side effect of compilation, but ICC will put the dependencies in 2013e72ca8cSmrg # the current directory while Tru64 will put them in the object 2023e72ca8cSmrg # directory. 2033e72ca8cSmrg mkdir sub 204ee3138f1Smrg 2053e72ca8cSmrg am_cv_$1_dependencies_compiler_type=none 2063e72ca8cSmrg if test "$am_compiler_list" = ""; then 2073e72ca8cSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2083e72ca8cSmrg fi 2093e72ca8cSmrg am__universal=false 2103e72ca8cSmrg m4_case([$1], [CC], 2113e72ca8cSmrg [case " $depcc " in #( 2123e72ca8cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2133e72ca8cSmrg esac], 2143e72ca8cSmrg [CXX], 2153e72ca8cSmrg [case " $depcc " in #( 2163e72ca8cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2173e72ca8cSmrg esac]) 218ee3138f1Smrg 2193e72ca8cSmrg for depmode in $am_compiler_list; do 2203e72ca8cSmrg # Setup a source with many dependencies, because some compilers 2213e72ca8cSmrg # like to wrap large dependency lists on column 80 (with \), and 2223e72ca8cSmrg # we should not choose a depcomp mode which is confused by this. 2233e72ca8cSmrg # 2243e72ca8cSmrg # We need to recreate these files for each test, as the compiler may 2253e72ca8cSmrg # overwrite some of them when testing with obscure command lines. 2263e72ca8cSmrg # This happens at least with the AIX C compiler. 2273e72ca8cSmrg : > sub/conftest.c 2283e72ca8cSmrg for i in 1 2 3 4 5 6; do 2293e72ca8cSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2303e72ca8cSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2313e72ca8cSmrg # Solaris 10 /bin/sh. 2323e72ca8cSmrg echo '/* dummy */' > sub/conftst$i.h 2333e72ca8cSmrg done 2343e72ca8cSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 23534977a2fSmrg 2363e72ca8cSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 2373e72ca8cSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2383e72ca8cSmrg # handle '-M -o', and we need to detect this. Also, some Intel 2393e72ca8cSmrg # versions had trouble with output in subdirs. 2403e72ca8cSmrg am__obj=sub/conftest.${OBJEXT-o} 2413e72ca8cSmrg am__minus_obj="-o $am__obj" 2423e72ca8cSmrg case $depmode in 2433e72ca8cSmrg gcc) 2443e72ca8cSmrg # This depmode causes a compiler race in universal mode. 2453e72ca8cSmrg test "$am__universal" = false || continue 2463e72ca8cSmrg ;; 2473e72ca8cSmrg nosideeffect) 2483e72ca8cSmrg # After this tag, mechanisms are not by side-effect, so they'll 2493e72ca8cSmrg # only be used when explicitly requested. 2503e72ca8cSmrg if test "x$enable_dependency_tracking" = xyes; then 2513e72ca8cSmrg continue 2523e72ca8cSmrg else 2533e72ca8cSmrg break 2543e72ca8cSmrg fi 2553e72ca8cSmrg ;; 2563e72ca8cSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2573e72ca8cSmrg # This compiler won't grok '-c -o', but also, the minuso test has 2583e72ca8cSmrg # not run yet. These depmodes are late enough in the game, and 2593e72ca8cSmrg # so weak that their functioning should not be impacted. 2603e72ca8cSmrg am__obj=conftest.${OBJEXT-o} 2613e72ca8cSmrg am__minus_obj= 2623e72ca8cSmrg ;; 2633e72ca8cSmrg none) break ;; 2643e72ca8cSmrg esac 2653e72ca8cSmrg if depmode=$depmode \ 2663e72ca8cSmrg source=sub/conftest.c object=$am__obj \ 2673e72ca8cSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2683e72ca8cSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2693e72ca8cSmrg >/dev/null 2>conftest.err && 2703e72ca8cSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2713e72ca8cSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2723e72ca8cSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2733e72ca8cSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2743e72ca8cSmrg # icc doesn't choke on unknown options, it will just issue warnings 2753e72ca8cSmrg # or remarks (even with -Werror). So we grep stderr for any message 2763e72ca8cSmrg # that says an option was ignored or not supported. 2773e72ca8cSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2783e72ca8cSmrg # icc: Command line warning: ignoring option '-M'; no argument required 2793e72ca8cSmrg # The diagnosis changed in icc 8.0: 2803e72ca8cSmrg # icc: Command line remark: option '-MP' not supported 2813e72ca8cSmrg if (grep 'ignoring option' conftest.err || 2823e72ca8cSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2833e72ca8cSmrg am_cv_$1_dependencies_compiler_type=$depmode 2843e72ca8cSmrg break 2853e72ca8cSmrg fi 2863e72ca8cSmrg fi 2873e72ca8cSmrg done 28834977a2fSmrg 2893e72ca8cSmrg cd .. 2903e72ca8cSmrg rm -rf conftest.dir 2913e72ca8cSmrgelse 2923e72ca8cSmrg am_cv_$1_dependencies_compiler_type=none 2933e72ca8cSmrgfi 2943e72ca8cSmrg]) 2953e72ca8cSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2963e72ca8cSmrgAM_CONDITIONAL([am__fastdep$1], [ 2973e72ca8cSmrg test "x$enable_dependency_tracking" != xno \ 2983e72ca8cSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 2993e72ca8cSmrg]) 30034977a2fSmrg 30134977a2fSmrg 3023e72ca8cSmrg# AM_SET_DEPDIR 3033e72ca8cSmrg# ------------- 3043e72ca8cSmrg# Choose a directory name for dependency files. 3053e72ca8cSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3063e72ca8cSmrgAC_DEFUN([AM_SET_DEPDIR], 3073e72ca8cSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3083e72ca8cSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 309b425557eSmrg]) 31034977a2fSmrg 31134977a2fSmrg 3123e72ca8cSmrg# AM_DEP_TRACK 3133e72ca8cSmrg# ------------ 3143e72ca8cSmrgAC_DEFUN([AM_DEP_TRACK], 3153e72ca8cSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3163e72ca8cSmrgAS_HELP_STRING( 3173e72ca8cSmrg [--enable-dependency-tracking], 3183e72ca8cSmrg [do not reject slow dependency extractors]) 3193e72ca8cSmrgAS_HELP_STRING( 3203e72ca8cSmrg [--disable-dependency-tracking], 3213e72ca8cSmrg [speeds up one-time build])]) 3223e72ca8cSmrgif test "x$enable_dependency_tracking" != xno; then 3233e72ca8cSmrg am_depcomp="$ac_aux_dir/depcomp" 3243e72ca8cSmrg AMDEPBACKSLASH='\' 3253e72ca8cSmrg am__nodep='_no' 3263e72ca8cSmrgfi 3273e72ca8cSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3283e72ca8cSmrgAC_SUBST([AMDEPBACKSLASH])dnl 3293e72ca8cSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3303e72ca8cSmrgAC_SUBST([am__nodep])dnl 3313e72ca8cSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 3323e72ca8cSmrg]) 33334977a2fSmrg 3343e72ca8cSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 33534977a2fSmrg 33626b1ff4eSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 3373e72ca8cSmrg# 3383e72ca8cSmrg# This file is free software; the Free Software Foundation 3393e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 3403e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 34134977a2fSmrg 34234977a2fSmrg 3433e72ca8cSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3443e72ca8cSmrg# ------------------------------ 3453e72ca8cSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3463e72ca8cSmrg[{ 34726b1ff4eSmrg # Older Autoconf quotes --file arguments for eval, but not when files 3483e72ca8cSmrg # are listed without --file. Let's play safe and only enable the eval 3493e72ca8cSmrg # if we detect the quoting. 3503e72ca8cSmrg case $CONFIG_FILES in 3513e72ca8cSmrg *\'*) eval set x "$CONFIG_FILES" ;; 3523e72ca8cSmrg *) set x $CONFIG_FILES ;; 3533e72ca8cSmrg esac 3543e72ca8cSmrg shift 3553e72ca8cSmrg for mf 3563e72ca8cSmrg do 3573e72ca8cSmrg # Strip MF so we end up with the name of the file. 3583e72ca8cSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3593e72ca8cSmrg # Check whether this is an Automake generated Makefile or not. 3603e72ca8cSmrg # We used to match only the files named 'Makefile.in', but 3613e72ca8cSmrg # some people rename them; so instead we look at the file content. 3623e72ca8cSmrg # Grep'ing the first line is not enough: some people post-process 3633e72ca8cSmrg # each Makefile.in and add a new line on top of each file to say so. 3643e72ca8cSmrg # Grep'ing the whole file is not good either: AIX grep has a line 3653e72ca8cSmrg # limit of 2048, but all sed's we know have understand at least 4000. 3663e72ca8cSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3673e72ca8cSmrg dirpart=`AS_DIRNAME("$mf")` 3683e72ca8cSmrg else 3693e72ca8cSmrg continue 3703e72ca8cSmrg fi 3713e72ca8cSmrg # Extract the definition of DEPDIR, am__include, and am__quote 3723e72ca8cSmrg # from the Makefile without running 'make'. 3733e72ca8cSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3743e72ca8cSmrg test -z "$DEPDIR" && continue 3753e72ca8cSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37626b1ff4eSmrg test -z "$am__include" && continue 3773e72ca8cSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3783e72ca8cSmrg # Find all dependency output files, they are included files with 3793e72ca8cSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3803e72ca8cSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 3813e72ca8cSmrg # expansion. 3823e72ca8cSmrg for file in `sed -n " 3833e72ca8cSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3843e72ca8cSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 3853e72ca8cSmrg # Make sure the directory exists. 3863e72ca8cSmrg test -f "$dirpart/$file" && continue 3873e72ca8cSmrg fdir=`AS_DIRNAME(["$file"])` 3883e72ca8cSmrg AS_MKDIR_P([$dirpart/$fdir]) 3893e72ca8cSmrg # echo "creating $dirpart/$file" 3903e72ca8cSmrg echo '# dummy' > "$dirpart/$file" 3913e72ca8cSmrg done 3923e72ca8cSmrg done 3933e72ca8cSmrg} 3943e72ca8cSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 395a1ed278cSmrg 396a1ed278cSmrg 3973e72ca8cSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3983e72ca8cSmrg# ----------------------------- 3993e72ca8cSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 4003e72ca8cSmrg# 4013e72ca8cSmrg# This code is only required when automatic dependency tracking 4023e72ca8cSmrg# is enabled. FIXME. This creates each '.P' file that we will 4033e72ca8cSmrg# need in order to bootstrap the dependency handling code. 4043e72ca8cSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4053e72ca8cSmrg[AC_CONFIG_COMMANDS([depfiles], 4063e72ca8cSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4073e72ca8cSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4083e72ca8cSmrg]) 409a1ed278cSmrg 4103e72ca8cSmrg# Do all the work for Automake. -*- Autoconf -*- 411a1ed278cSmrg 41226b1ff4eSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4133e72ca8cSmrg# 4143e72ca8cSmrg# This file is free software; the Free Software Foundation 4153e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 4163e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 41734977a2fSmrg 4183e72ca8cSmrg# This macro actually does too much. Some checks are only needed if 4193e72ca8cSmrg# your package does certain things. But this isn't really a big deal. 42034977a2fSmrg 4213e72ca8cSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4223e72ca8cSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 4233e72ca8cSmrg# ----------------------------------------------- 4243e72ca8cSmrg# The call with PACKAGE and VERSION arguments is the old style 4253e72ca8cSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4263e72ca8cSmrg# and VERSION should now be passed to AC_INIT and removed from 4273e72ca8cSmrg# the call to AM_INIT_AUTOMAKE. 4283e72ca8cSmrg# We support both call styles for the transition. After 4293e72ca8cSmrg# the next Automake release, Autoconf can make the AC_INIT 4303e72ca8cSmrg# arguments mandatory, and then we can depend on a new Autoconf 4313e72ca8cSmrg# release and drop the old call support. 4323e72ca8cSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 43326b1ff4eSmrg[AC_PREREQ([2.65])dnl 4343e72ca8cSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4353e72ca8cSmrgdnl the ones we care about. 4363e72ca8cSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4373e72ca8cSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4383e72ca8cSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4393e72ca8cSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4403e72ca8cSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4413e72ca8cSmrg # is not polluted with repeated "-I." 4423e72ca8cSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4433e72ca8cSmrg # test to see if srcdir already configured 4443e72ca8cSmrg if test -f $srcdir/config.status; then 4453e72ca8cSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4463e72ca8cSmrg fi 4473e72ca8cSmrgfi 44834977a2fSmrg 4493e72ca8cSmrg# test whether we have cygpath 4503e72ca8cSmrgif test -z "$CYGPATH_W"; then 4513e72ca8cSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 4523e72ca8cSmrg CYGPATH_W='cygpath -w' 4533e72ca8cSmrg else 4543e72ca8cSmrg CYGPATH_W=echo 4553e72ca8cSmrg fi 4563e72ca8cSmrgfi 4573e72ca8cSmrgAC_SUBST([CYGPATH_W]) 45834977a2fSmrg 4593e72ca8cSmrg# Define the identity of the package. 4603e72ca8cSmrgdnl Distinguish between old-style and new-style calls. 4613e72ca8cSmrgm4_ifval([$2], 4623e72ca8cSmrg[AC_DIAGNOSE([obsolete], 46326b1ff4eSmrg [$0: two- and three-arguments forms are deprecated.]) 4643e72ca8cSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4653e72ca8cSmrg AC_SUBST([PACKAGE], [$1])dnl 4663e72ca8cSmrg AC_SUBST([VERSION], [$2])], 4673e72ca8cSmrg[_AM_SET_OPTIONS([$1])dnl 4683e72ca8cSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4693e72ca8cSmrgm4_if( 4703e72ca8cSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 4713e72ca8cSmrg [ok:ok],, 4723e72ca8cSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4733e72ca8cSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4743e72ca8cSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 47534977a2fSmrg 4763e72ca8cSmrg_AM_IF_OPTION([no-define],, 4773e72ca8cSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4783e72ca8cSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 47934977a2fSmrg 4803e72ca8cSmrg# Some tools Automake needs. 4813e72ca8cSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4823e72ca8cSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4833e72ca8cSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4843e72ca8cSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4853e72ca8cSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4863e72ca8cSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4873e72ca8cSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 4883e72ca8cSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4893e72ca8cSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4903e72ca8cSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4913e72ca8cSmrg# For better backward compatibility. To be removed once Automake 1.9.x 4923e72ca8cSmrg# dies out for good. For more background, see: 4933e72ca8cSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 4943e72ca8cSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 4953e72ca8cSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 4963e72ca8cSmrg# We need awk for the "check" target. The system "awk" is bad on 4973e72ca8cSmrg# some platforms. 4983e72ca8cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 4993e72ca8cSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5003e72ca8cSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5013e72ca8cSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5023e72ca8cSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5033e72ca8cSmrg [_AM_PROG_TAR([v7])])]) 5043e72ca8cSmrg_AM_IF_OPTION([no-dependencies],, 5053e72ca8cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5063e72ca8cSmrg [_AM_DEPENDENCIES([CC])], 5073e72ca8cSmrg [m4_define([AC_PROG_CC], 5083e72ca8cSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 5093e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5103e72ca8cSmrg [_AM_DEPENDENCIES([CXX])], 5113e72ca8cSmrg [m4_define([AC_PROG_CXX], 5123e72ca8cSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 5133e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5143e72ca8cSmrg [_AM_DEPENDENCIES([OBJC])], 5153e72ca8cSmrg [m4_define([AC_PROG_OBJC], 5163e72ca8cSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 51726b1ff4eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5183e72ca8cSmrg [_AM_DEPENDENCIES([OBJCXX])], 5193e72ca8cSmrg [m4_define([AC_PROG_OBJCXX], 52026b1ff4eSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 5213e72ca8cSmrg]) 52226b1ff4eSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 52326b1ff4eSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 52426b1ff4eSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 52526b1ff4eSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 5263e72ca8cSmrgAC_CONFIG_COMMANDS_PRE(dnl 5273e72ca8cSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5283e72ca8cSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 529a1ed278cSmrg]) 53034977a2fSmrg 5313e72ca8cSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5323e72ca8cSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5333e72ca8cSmrgdnl mangled by Autoconf and run in a shell conditional statement. 5343e72ca8cSmrgm4_define([_AC_COMPILER_EXEEXT], 5353e72ca8cSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 53634977a2fSmrg 53734977a2fSmrg 5383e72ca8cSmrg# When config.status generates a header, we must update the stamp-h file. 5393e72ca8cSmrg# This file resides in the same directory as the config header 5403e72ca8cSmrg# that is generated. The stamp files are numbered to have different names. 541ee3138f1Smrg 5423e72ca8cSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5433e72ca8cSmrg# loop where config.status creates the headers, so we can generate 5443e72ca8cSmrg# our stamp files there. 5453e72ca8cSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5463e72ca8cSmrg[# Compute $1's index in $config_headers. 5473e72ca8cSmrg_am_arg=$1 5483e72ca8cSmrg_am_stamp_count=1 5493e72ca8cSmrgfor _am_header in $config_headers :; do 5503e72ca8cSmrg case $_am_header in 5513e72ca8cSmrg $_am_arg | $_am_arg:* ) 5523e72ca8cSmrg break ;; 5533e72ca8cSmrg * ) 5543e72ca8cSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5553e72ca8cSmrg esac 5563e72ca8cSmrgdone 5573e72ca8cSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 558ee3138f1Smrg 55926b1ff4eSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 5603e72ca8cSmrg# 5613e72ca8cSmrg# This file is free software; the Free Software Foundation 5623e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 5633e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 56434977a2fSmrg 5653e72ca8cSmrg# AM_PROG_INSTALL_SH 5663e72ca8cSmrg# ------------------ 5673e72ca8cSmrg# Define $install_sh. 5683e72ca8cSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 5693e72ca8cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 5703e72ca8cSmrgif test x"${install_sh}" != xset; then 5713e72ca8cSmrg case $am_aux_dir in 5723e72ca8cSmrg *\ * | *\ *) 5733e72ca8cSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 5743e72ca8cSmrg *) 5753e72ca8cSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 5763e72ca8cSmrg esac 5773e72ca8cSmrgfi 5783e72ca8cSmrgAC_SUBST([install_sh])]) 57934977a2fSmrg 58026b1ff4eSmrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 5813e72ca8cSmrg# 5823e72ca8cSmrg# This file is free software; the Free Software Foundation 5833e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 5843e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 58534977a2fSmrg 5863e72ca8cSmrg# Check whether the underlying file-system supports filenames 5873e72ca8cSmrg# with a leading dot. For instance MS-DOS doesn't. 5883e72ca8cSmrgAC_DEFUN([AM_SET_LEADING_DOT], 5893e72ca8cSmrg[rm -rf .tst 2>/dev/null 5903e72ca8cSmrgmkdir .tst 2>/dev/null 5913e72ca8cSmrgif test -d .tst; then 5923e72ca8cSmrg am__leading_dot=. 5933e72ca8cSmrgelse 5943e72ca8cSmrg am__leading_dot=_ 5953e72ca8cSmrgfi 5963e72ca8cSmrgrmdir .tst 2>/dev/null 5973e72ca8cSmrgAC_SUBST([am__leading_dot])]) 59834977a2fSmrg 5993e72ca8cSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 60034977a2fSmrg 60126b1ff4eSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 6023e72ca8cSmrg# 6033e72ca8cSmrg# This file is free software; the Free Software Foundation 6043e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 6053e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 60634977a2fSmrg 6073e72ca8cSmrg# AM_MAKE_INCLUDE() 6083e72ca8cSmrg# ----------------- 6093e72ca8cSmrg# Check to see how make treats includes. 6103e72ca8cSmrgAC_DEFUN([AM_MAKE_INCLUDE], 6113e72ca8cSmrg[am_make=${MAKE-make} 6123e72ca8cSmrgcat > confinc << 'END' 6133e72ca8cSmrgam__doit: 6143e72ca8cSmrg @echo this is the am__doit target 6153e72ca8cSmrg.PHONY: am__doit 6163e72ca8cSmrgEND 6173e72ca8cSmrg# If we don't find an include directive, just comment out the code. 6183e72ca8cSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6193e72ca8cSmrgam__include="#" 6203e72ca8cSmrgam__quote= 6213e72ca8cSmrg_am_result=none 6223e72ca8cSmrg# First try GNU make style include. 6233e72ca8cSmrgecho "include confinc" > confmf 6243e72ca8cSmrg# Ignore all kinds of additional output from 'make'. 6253e72ca8cSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6263e72ca8cSmrg*the\ am__doit\ target*) 6273e72ca8cSmrg am__include=include 6283e72ca8cSmrg am__quote= 6293e72ca8cSmrg _am_result=GNU 6303e72ca8cSmrg ;; 6313e72ca8cSmrgesac 6323e72ca8cSmrg# Now try BSD make style include. 6333e72ca8cSmrgif test "$am__include" = "#"; then 6343e72ca8cSmrg echo '.include "confinc"' > confmf 6353e72ca8cSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 6363e72ca8cSmrg *the\ am__doit\ target*) 6373e72ca8cSmrg am__include=.include 6383e72ca8cSmrg am__quote="\"" 6393e72ca8cSmrg _am_result=BSD 6403e72ca8cSmrg ;; 6413e72ca8cSmrg esac 6423e72ca8cSmrgfi 6433e72ca8cSmrgAC_SUBST([am__include]) 6443e72ca8cSmrgAC_SUBST([am__quote]) 6453e72ca8cSmrgAC_MSG_RESULT([$_am_result]) 6463e72ca8cSmrgrm -f confinc confmf 6473e72ca8cSmrg]) 64834977a2fSmrg 6493e72ca8cSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 65034977a2fSmrg 65126b1ff4eSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 6523e72ca8cSmrg# 6533e72ca8cSmrg# This file is free software; the Free Software Foundation 6543e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 6553e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 65634977a2fSmrg 6573e72ca8cSmrg# AM_MISSING_PROG(NAME, PROGRAM) 6583e72ca8cSmrg# ------------------------------ 6593e72ca8cSmrgAC_DEFUN([AM_MISSING_PROG], 6603e72ca8cSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 6613e72ca8cSmrg$1=${$1-"${am_missing_run}$2"} 6623e72ca8cSmrgAC_SUBST($1)]) 66334977a2fSmrg 6643e72ca8cSmrg# AM_MISSING_HAS_RUN 6653e72ca8cSmrg# ------------------ 66626b1ff4eSmrg# Define MISSING if not defined so far and test if it is modern enough. 66726b1ff4eSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 6683e72ca8cSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 6693e72ca8cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6703e72ca8cSmrgAC_REQUIRE_AUX_FILE([missing])dnl 6713e72ca8cSmrgif test x"${MISSING+set}" != xset; then 6723e72ca8cSmrg case $am_aux_dir in 6733e72ca8cSmrg *\ * | *\ *) 6743e72ca8cSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 6753e72ca8cSmrg *) 6763e72ca8cSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 6773e72ca8cSmrg esac 6783e72ca8cSmrgfi 6793e72ca8cSmrg# Use eval to expand $SHELL 68026b1ff4eSmrgif eval "$MISSING --is-lightweight"; then 68126b1ff4eSmrg am_missing_run="$MISSING " 6823e72ca8cSmrgelse 6833e72ca8cSmrg am_missing_run= 6843e72ca8cSmrg AC_MSG_WARN(['missing' script is too old or missing]) 6853e72ca8cSmrgfi 68634977a2fSmrg]) 68734977a2fSmrg 6883e72ca8cSmrg# Helper functions for option handling. -*- Autoconf -*- 68934977a2fSmrg 69026b1ff4eSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 6913e72ca8cSmrg# 6923e72ca8cSmrg# This file is free software; the Free Software Foundation 6933e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 6943e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 69534977a2fSmrg 6963e72ca8cSmrg# _AM_MANGLE_OPTION(NAME) 6973e72ca8cSmrg# ----------------------- 6983e72ca8cSmrgAC_DEFUN([_AM_MANGLE_OPTION], 6993e72ca8cSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 70034977a2fSmrg 7013e72ca8cSmrg# _AM_SET_OPTION(NAME) 7023e72ca8cSmrg# -------------------- 7033e72ca8cSmrg# Set option NAME. Presently that only means defining a flag for this option. 7043e72ca8cSmrgAC_DEFUN([_AM_SET_OPTION], 7053e72ca8cSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 70634977a2fSmrg 7073e72ca8cSmrg# _AM_SET_OPTIONS(OPTIONS) 7083e72ca8cSmrg# ------------------------ 7093e72ca8cSmrg# OPTIONS is a space-separated list of Automake options. 7103e72ca8cSmrgAC_DEFUN([_AM_SET_OPTIONS], 7113e72ca8cSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 71234977a2fSmrg 7133e72ca8cSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7143e72ca8cSmrg# ------------------------------------------- 7153e72ca8cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7163e72ca8cSmrgAC_DEFUN([_AM_IF_OPTION], 7173e72ca8cSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 71834977a2fSmrg 7193e72ca8cSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 72034977a2fSmrg 72126b1ff4eSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 7223e72ca8cSmrg# 7233e72ca8cSmrg# This file is free software; the Free Software Foundation 7243e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 7253e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 72634977a2fSmrg 7273e72ca8cSmrg# AM_SANITY_CHECK 7283e72ca8cSmrg# --------------- 7293e72ca8cSmrgAC_DEFUN([AM_SANITY_CHECK], 7303e72ca8cSmrg[AC_MSG_CHECKING([whether build environment is sane]) 7313e72ca8cSmrg# Reject unsafe characters in $srcdir or the absolute working directory 7323e72ca8cSmrg# name. Accept space and tab only in the latter. 7333e72ca8cSmrgam_lf=' 7343e72ca8cSmrg' 7353e72ca8cSmrgcase `pwd` in 7363e72ca8cSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 7373e72ca8cSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 7383e72ca8cSmrgesac 7393e72ca8cSmrgcase $srcdir in 7403e72ca8cSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 7413e72ca8cSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 7423e72ca8cSmrgesac 74334977a2fSmrg 7443e72ca8cSmrg# Do 'set' in a subshell so we don't clobber the current shell's 7453e72ca8cSmrg# arguments. Must try -L first in case configure is actually a 7463e72ca8cSmrg# symlink; some systems play weird games with the mod time of symlinks 7473e72ca8cSmrg# (eg FreeBSD returns the mod time of the symlink's containing 7483e72ca8cSmrg# directory). 7493e72ca8cSmrgif ( 7503e72ca8cSmrg am_has_slept=no 7513e72ca8cSmrg for am_try in 1 2; do 7523e72ca8cSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 7533e72ca8cSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 7543e72ca8cSmrg if test "$[*]" = "X"; then 7553e72ca8cSmrg # -L didn't work. 7563e72ca8cSmrg set X `ls -t "$srcdir/configure" conftest.file` 7573e72ca8cSmrg fi 7583e72ca8cSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 7593e72ca8cSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 7603e72ca8cSmrg 7613e72ca8cSmrg # If neither matched, then we have a broken ls. This can happen 7623e72ca8cSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 7633e72ca8cSmrg # broken ls alias from the environment. This has actually 7643e72ca8cSmrg # happened. Such a system could not be considered "sane". 7653e72ca8cSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 7663e72ca8cSmrg alias in your environment]) 7673e72ca8cSmrg fi 7683e72ca8cSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 7693e72ca8cSmrg break 7703e72ca8cSmrg fi 7713e72ca8cSmrg # Just in case. 7723e72ca8cSmrg sleep 1 7733e72ca8cSmrg am_has_slept=yes 7743e72ca8cSmrg done 7753e72ca8cSmrg test "$[2]" = conftest.file 7763e72ca8cSmrg ) 7773e72ca8cSmrgthen 7783e72ca8cSmrg # Ok. 7793e72ca8cSmrg : 7803e72ca8cSmrgelse 7813e72ca8cSmrg AC_MSG_ERROR([newly created file is older than distributed files! 7823e72ca8cSmrgCheck your system clock]) 7833e72ca8cSmrgfi 7843e72ca8cSmrgAC_MSG_RESULT([yes]) 7853e72ca8cSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 7863e72ca8cSmrg# generated files are strictly newer. 7873e72ca8cSmrgam_sleep_pid= 7883e72ca8cSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 7893e72ca8cSmrg ( sleep 1 ) & 7903e72ca8cSmrg am_sleep_pid=$! 7913e72ca8cSmrgfi 7923e72ca8cSmrgAC_CONFIG_COMMANDS_PRE( 7933e72ca8cSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 7943e72ca8cSmrg if test -n "$am_sleep_pid"; then 7953e72ca8cSmrg # Hide warnings about reused PIDs. 7963e72ca8cSmrg wait $am_sleep_pid 2>/dev/null 7973e72ca8cSmrg fi 7983e72ca8cSmrg AC_MSG_RESULT([done])]) 7993e72ca8cSmrgrm -f conftest.file 8003e72ca8cSmrg]) 80134977a2fSmrg 80226b1ff4eSmrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 8033e72ca8cSmrg# 8043e72ca8cSmrg# This file is free software; the Free Software Foundation 8053e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 8063e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 80734977a2fSmrg 8083e72ca8cSmrg# AM_SILENT_RULES([DEFAULT]) 8093e72ca8cSmrg# -------------------------- 8103e72ca8cSmrg# Enable less verbose build rules; with the default set to DEFAULT 8113e72ca8cSmrg# ("yes" being less verbose, "no" or empty being verbose). 8123e72ca8cSmrgAC_DEFUN([AM_SILENT_RULES], 8133e72ca8cSmrg[AC_ARG_ENABLE([silent-rules], [dnl 8143e72ca8cSmrgAS_HELP_STRING( 8153e72ca8cSmrg [--enable-silent-rules], 8163e72ca8cSmrg [less verbose build output (undo: "make V=1")]) 8173e72ca8cSmrgAS_HELP_STRING( 8183e72ca8cSmrg [--disable-silent-rules], 8193e72ca8cSmrg [verbose build output (undo: "make V=0")])dnl 820a1ed278cSmrg]) 8213e72ca8cSmrgcase $enable_silent_rules in @%:@ ((( 8223e72ca8cSmrg yes) AM_DEFAULT_VERBOSITY=0;; 8233e72ca8cSmrg no) AM_DEFAULT_VERBOSITY=1;; 8243e72ca8cSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8253e72ca8cSmrgesac 8263e72ca8cSmrgdnl 8273e72ca8cSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 8283e72ca8cSmrgdnl do not support nested variable expansions. 8293e72ca8cSmrgdnl See automake bug#9928 and bug#10237. 8303e72ca8cSmrgam_make=${MAKE-make} 8313e72ca8cSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 8323e72ca8cSmrg [am_cv_make_support_nested_variables], 8333e72ca8cSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 8343e72ca8cSmrgBAR0=false 8353e72ca8cSmrgBAR1=true 8363e72ca8cSmrgV=1 8373e72ca8cSmrgam__doit: 8383e72ca8cSmrg @$(TRUE) 8393e72ca8cSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 8403e72ca8cSmrg am_cv_make_support_nested_variables=yes 8413e72ca8cSmrgelse 8423e72ca8cSmrg am_cv_make_support_nested_variables=no 8433e72ca8cSmrgfi]) 8443e72ca8cSmrgif test $am_cv_make_support_nested_variables = yes; then 8453e72ca8cSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 8463e72ca8cSmrg AM_V='$(V)' 8473e72ca8cSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 8483e72ca8cSmrgelse 8493e72ca8cSmrg AM_V=$AM_DEFAULT_VERBOSITY 8503e72ca8cSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 8513e72ca8cSmrgfi 8523e72ca8cSmrgAC_SUBST([AM_V])dnl 8533e72ca8cSmrgAM_SUBST_NOTMAKE([AM_V])dnl 8543e72ca8cSmrgAC_SUBST([AM_DEFAULT_V])dnl 8553e72ca8cSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 8563e72ca8cSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8573e72ca8cSmrgAM_BACKSLASH='\' 8583e72ca8cSmrgAC_SUBST([AM_BACKSLASH])dnl 8593e72ca8cSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 860a1ed278cSmrg]) 86134977a2fSmrg 86226b1ff4eSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 8633e72ca8cSmrg# 8643e72ca8cSmrg# This file is free software; the Free Software Foundation 8653e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 8663e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 86734977a2fSmrg 8683e72ca8cSmrg# AM_PROG_INSTALL_STRIP 8693e72ca8cSmrg# --------------------- 8703e72ca8cSmrg# One issue with vendor 'install' (even GNU) is that you can't 8713e72ca8cSmrg# specify the program used to strip binaries. This is especially 8723e72ca8cSmrg# annoying in cross-compiling environments, where the build's strip 8733e72ca8cSmrg# is unlikely to handle the host's binaries. 8743e72ca8cSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 8753e72ca8cSmrg# always use install-sh in "make install-strip", and initialize 8763e72ca8cSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 8773e72ca8cSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 8783e72ca8cSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 8793e72ca8cSmrg# Installed binaries are usually stripped using 'strip' when the user 8803e72ca8cSmrg# run "make install-strip". However 'strip' might not be the right 8813e72ca8cSmrg# tool to use in cross-compilation environments, therefore Automake 8823e72ca8cSmrg# will honor the 'STRIP' environment variable to overrule this program. 8833e72ca8cSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 8843e72ca8cSmrgif test "$cross_compiling" != no; then 8853e72ca8cSmrg AC_CHECK_TOOL([STRIP], [strip], :) 8863e72ca8cSmrgfi 8873e72ca8cSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 8883e72ca8cSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 88934977a2fSmrg 89026b1ff4eSmrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 89134977a2fSmrg# 8923e72ca8cSmrg# This file is free software; the Free Software Foundation 8933e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 8943e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 89534977a2fSmrg 8963e72ca8cSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 8973e72ca8cSmrg# --------------------------- 8983e72ca8cSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 8993e72ca8cSmrg# This macro is traced by Automake. 9003e72ca8cSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 90134977a2fSmrg 9023e72ca8cSmrg# AM_SUBST_NOTMAKE(VARIABLE) 9033e72ca8cSmrg# -------------------------- 9043e72ca8cSmrg# Public sister of _AM_SUBST_NOTMAKE. 9053e72ca8cSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 90634977a2fSmrg 9073e72ca8cSmrg# Check how to create a tarball. -*- Autoconf -*- 90834977a2fSmrg 90926b1ff4eSmrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 9103e72ca8cSmrg# 9113e72ca8cSmrg# This file is free software; the Free Software Foundation 9123e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 9133e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 91434977a2fSmrg 9153e72ca8cSmrg# _AM_PROG_TAR(FORMAT) 9163e72ca8cSmrg# -------------------- 9173e72ca8cSmrg# Check how to create a tarball in format FORMAT. 9183e72ca8cSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 9193e72ca8cSmrg# 9203e72ca8cSmrg# Substitute a variable $(am__tar) that is a command 9213e72ca8cSmrg# writing to stdout a FORMAT-tarball containing the directory 9223e72ca8cSmrg# $tardir. 9233e72ca8cSmrg# tardir=directory && $(am__tar) > result.tar 9243e72ca8cSmrg# 9253e72ca8cSmrg# Substitute a variable $(am__untar) that extract such 9263e72ca8cSmrg# a tarball read from stdin. 9273e72ca8cSmrg# $(am__untar) < result.tar 92826b1ff4eSmrg# 9293e72ca8cSmrgAC_DEFUN([_AM_PROG_TAR], 9303e72ca8cSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 9313e72ca8cSmrg# in the wild :-( We should find a proper way to deprecate it ... 9323e72ca8cSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 93326b1ff4eSmrg 93426b1ff4eSmrg# We'll loop over all known methods to create a tar archive until one works. 9353e72ca8cSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 93634977a2fSmrg 93726b1ff4eSmrgm4_if([$1], [v7], 93826b1ff4eSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 93926b1ff4eSmrg 94026b1ff4eSmrg [m4_case([$1], 94126b1ff4eSmrg [ustar], 94226b1ff4eSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 94326b1ff4eSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 94426b1ff4eSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 94526b1ff4eSmrg # and bug#13588). 94626b1ff4eSmrg am_max_uid=2097151 # 2^21 - 1 94726b1ff4eSmrg am_max_gid=$am_max_uid 94826b1ff4eSmrg # The $UID and $GID variables are not portable, so we need to resort 94926b1ff4eSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 95026b1ff4eSmrg # below are definitely unexpected, so allow the users to see them 95126b1ff4eSmrg # (that is, avoid stderr redirection). 95226b1ff4eSmrg am_uid=`id -u || echo unknown` 95326b1ff4eSmrg am_gid=`id -g || echo unknown` 95426b1ff4eSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 95526b1ff4eSmrg if test $am_uid -le $am_max_uid; then 95626b1ff4eSmrg AC_MSG_RESULT([yes]) 95726b1ff4eSmrg else 95826b1ff4eSmrg AC_MSG_RESULT([no]) 95926b1ff4eSmrg _am_tools=none 96026b1ff4eSmrg fi 96126b1ff4eSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 96226b1ff4eSmrg if test $am_gid -le $am_max_gid; then 96326b1ff4eSmrg AC_MSG_RESULT([yes]) 96426b1ff4eSmrg else 96526b1ff4eSmrg AC_MSG_RESULT([no]) 96626b1ff4eSmrg _am_tools=none 96726b1ff4eSmrg fi], 96826b1ff4eSmrg 96926b1ff4eSmrg [pax], 97026b1ff4eSmrg [], 97126b1ff4eSmrg 97226b1ff4eSmrg [m4_fatal([Unknown tar format])]) 97326b1ff4eSmrg 97426b1ff4eSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 97526b1ff4eSmrg 97626b1ff4eSmrg # Go ahead even if we have the value already cached. We do so because we 97726b1ff4eSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 97826b1ff4eSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 97926b1ff4eSmrg 98026b1ff4eSmrg for _am_tool in $_am_tools; do 98126b1ff4eSmrg case $_am_tool in 98226b1ff4eSmrg gnutar) 98326b1ff4eSmrg for _am_tar in tar gnutar gtar; do 98426b1ff4eSmrg AM_RUN_LOG([$_am_tar --version]) && break 98526b1ff4eSmrg done 98626b1ff4eSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98726b1ff4eSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98826b1ff4eSmrg am__untar="$_am_tar -xf -" 98926b1ff4eSmrg ;; 99026b1ff4eSmrg plaintar) 99126b1ff4eSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 99226b1ff4eSmrg # ustar tarball either. 99326b1ff4eSmrg (tar --version) >/dev/null 2>&1 && continue 99426b1ff4eSmrg am__tar='tar chf - "$$tardir"' 99526b1ff4eSmrg am__tar_='tar chf - "$tardir"' 99626b1ff4eSmrg am__untar='tar xf -' 99726b1ff4eSmrg ;; 99826b1ff4eSmrg pax) 99926b1ff4eSmrg am__tar='pax -L -x $1 -w "$$tardir"' 100026b1ff4eSmrg am__tar_='pax -L -x $1 -w "$tardir"' 100126b1ff4eSmrg am__untar='pax -r' 100226b1ff4eSmrg ;; 100326b1ff4eSmrg cpio) 100426b1ff4eSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 100526b1ff4eSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 100626b1ff4eSmrg am__untar='cpio -i -H $1 -d' 100726b1ff4eSmrg ;; 100826b1ff4eSmrg none) 100926b1ff4eSmrg am__tar=false 101026b1ff4eSmrg am__tar_=false 101126b1ff4eSmrg am__untar=false 101226b1ff4eSmrg ;; 101326b1ff4eSmrg esac 101434977a2fSmrg 101526b1ff4eSmrg # If the value was cached, stop now. We just wanted to have am__tar 101626b1ff4eSmrg # and am__untar set. 101726b1ff4eSmrg test -n "${am_cv_prog_tar_$1}" && break 101826b1ff4eSmrg 101926b1ff4eSmrg # tar/untar a dummy directory, and stop if the command works. 102026b1ff4eSmrg rm -rf conftest.dir 102126b1ff4eSmrg mkdir conftest.dir 102226b1ff4eSmrg echo GrepMe > conftest.dir/file 102326b1ff4eSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 102426b1ff4eSmrg rm -rf conftest.dir 102526b1ff4eSmrg if test -s conftest.tar; then 102626b1ff4eSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 102726b1ff4eSmrg AM_RUN_LOG([cat conftest.dir/file]) 102826b1ff4eSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102926b1ff4eSmrg fi 103026b1ff4eSmrg done 10313e72ca8cSmrg rm -rf conftest.dir 103234977a2fSmrg 103326b1ff4eSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 103426b1ff4eSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 103526b1ff4eSmrg 10363e72ca8cSmrgAC_SUBST([am__tar]) 10373e72ca8cSmrgAC_SUBST([am__untar]) 10383e72ca8cSmrg]) # _AM_PROG_TAR 103934977a2fSmrg 10403e72ca8cSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 10413e72ca8cSmrg# 10423e72ca8cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 10433e72ca8cSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 10443e72ca8cSmrg# Foundation, Inc. 10453e72ca8cSmrg# Written by Gordon Matzigkeit, 1996 10463e72ca8cSmrg# 10473e72ca8cSmrg# This file is free software; the Free Software Foundation gives 10483e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 10493e72ca8cSmrg# modifications, as long as this notice is preserved. 105034977a2fSmrg 10513e72ca8cSmrgm4_define([_LT_COPYING], [dnl 10523e72ca8cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 10533e72ca8cSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 10543e72ca8cSmrg# Foundation, Inc. 10553e72ca8cSmrg# Written by Gordon Matzigkeit, 1996 10563e72ca8cSmrg# 10573e72ca8cSmrg# This file is part of GNU Libtool. 10583e72ca8cSmrg# 10593e72ca8cSmrg# GNU Libtool is free software; you can redistribute it and/or 10603e72ca8cSmrg# modify it under the terms of the GNU General Public License as 10613e72ca8cSmrg# published by the Free Software Foundation; either version 2 of 10623e72ca8cSmrg# the License, or (at your option) any later version. 10633e72ca8cSmrg# 10643e72ca8cSmrg# As a special exception to the GNU General Public License, 10653e72ca8cSmrg# if you distribute this file as part of a program or library that 10663e72ca8cSmrg# is built using GNU Libtool, you may include this file under the 10673e72ca8cSmrg# same distribution terms that you use for the rest of that program. 10683e72ca8cSmrg# 10693e72ca8cSmrg# GNU Libtool is distributed in the hope that it will be useful, 10703e72ca8cSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 10713e72ca8cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10723e72ca8cSmrg# GNU General Public License for more details. 10733e72ca8cSmrg# 10743e72ca8cSmrg# You should have received a copy of the GNU General Public License 10753e72ca8cSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 10763e72ca8cSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 10773e72ca8cSmrg# obtained by writing to the Free Software Foundation, Inc., 10783e72ca8cSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 10793e72ca8cSmrg]) 108034977a2fSmrg 10813e72ca8cSmrg# serial 57 LT_INIT 1082ee3138f1Smrg 108334977a2fSmrg 10843e72ca8cSmrg# LT_PREREQ(VERSION) 10853e72ca8cSmrg# ------------------ 10863e72ca8cSmrg# Complain and exit if this libtool version is less that VERSION. 10873e72ca8cSmrgm4_defun([LT_PREREQ], 10883e72ca8cSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 10893e72ca8cSmrg [m4_default([$3], 10903e72ca8cSmrg [m4_fatal([Libtool version $1 or higher is required], 10913e72ca8cSmrg 63)])], 10923e72ca8cSmrg [$2])]) 1093ee3138f1Smrg 1094ee3138f1Smrg 10953e72ca8cSmrg# _LT_CHECK_BUILDDIR 10963e72ca8cSmrg# ------------------ 10973e72ca8cSmrg# Complain if the absolute build directory name contains unusual characters 10983e72ca8cSmrgm4_defun([_LT_CHECK_BUILDDIR], 10993e72ca8cSmrg[case `pwd` in 11003e72ca8cSmrg *\ * | *\ *) 11013e72ca8cSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 11023e72ca8cSmrgesac 1103a1ed278cSmrg]) 1104ee3138f1Smrg 1105ee3138f1Smrg 11063e72ca8cSmrg# LT_INIT([OPTIONS]) 11073e72ca8cSmrg# ------------------ 11083e72ca8cSmrgAC_DEFUN([LT_INIT], 11093e72ca8cSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 11103e72ca8cSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11113e72ca8cSmrgAC_BEFORE([$0], [LT_LANG])dnl 11123e72ca8cSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 11133e72ca8cSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 11143e72ca8cSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 1115b425557eSmrg 11163e72ca8cSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 11173e72ca8cSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 11183e72ca8cSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 11193e72ca8cSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 11203e72ca8cSmrgdnl unless we require an AC_DEFUNed macro: 11213e72ca8cSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 11223e72ca8cSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 11233e72ca8cSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 11243e72ca8cSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 11253e72ca8cSmrgm4_require([_LT_PROG_LTMAIN])dnl 1126b425557eSmrg 11273e72ca8cSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1128b425557eSmrg 11293e72ca8cSmrgdnl Parse OPTIONS 11303e72ca8cSmrg_LT_SET_OPTIONS([$0], [$1]) 1131ee3138f1Smrg 11323e72ca8cSmrg# This can be used to rebuild libtool when needed 11333e72ca8cSmrgLIBTOOL_DEPS="$ltmain" 1134ee3138f1Smrg 11353e72ca8cSmrg# Always use our own libtool. 11363e72ca8cSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 11373e72ca8cSmrgAC_SUBST(LIBTOOL)dnl 1138ee3138f1Smrg 11393e72ca8cSmrg_LT_SETUP 114079a8a9c6Smrg 11413e72ca8cSmrg# Only expand once: 11423e72ca8cSmrgm4_define([LT_INIT]) 11433e72ca8cSmrg])# LT_INIT 114434977a2fSmrg 11453e72ca8cSmrg# Old names: 11463e72ca8cSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 11473e72ca8cSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 11483e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 11493e72ca8cSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 11503e72ca8cSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1151ee3138f1Smrg 1152ee3138f1Smrg 11533e72ca8cSmrg# _LT_CC_BASENAME(CC) 11543e72ca8cSmrg# ------------------- 11553e72ca8cSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 11563e72ca8cSmrgm4_defun([_LT_CC_BASENAME], 11573e72ca8cSmrg[for cc_temp in $1""; do 11583e72ca8cSmrg case $cc_temp in 11593e72ca8cSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 11603e72ca8cSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 11613e72ca8cSmrg \-*) ;; 11623e72ca8cSmrg *) break;; 1163a1ed278cSmrg esac 1164a1ed278cSmrgdone 11653e72ca8cSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 11663e72ca8cSmrg]) 1167ee3138f1Smrg 1168ee3138f1Smrg 11693e72ca8cSmrg# _LT_FILEUTILS_DEFAULTS 11703e72ca8cSmrg# ---------------------- 11713e72ca8cSmrg# It is okay to use these file commands and assume they have been set 11723e72ca8cSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 11733e72ca8cSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 11743e72ca8cSmrg[: ${CP="cp -f"} 11753e72ca8cSmrg: ${MV="mv -f"} 11763e72ca8cSmrg: ${RM="rm -f"} 11773e72ca8cSmrg])# _LT_FILEUTILS_DEFAULTS 1178ee3138f1Smrg 1179ee3138f1Smrg 11803e72ca8cSmrg# _LT_SETUP 11813e72ca8cSmrg# --------- 11823e72ca8cSmrgm4_defun([_LT_SETUP], 11833e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11843e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11853e72ca8cSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 11863e72ca8cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1187ee3138f1Smrg 11883e72ca8cSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 11893e72ca8cSmrgdnl 11903e72ca8cSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 11913e72ca8cSmrg_LT_DECL([], [host], [0])dnl 11923e72ca8cSmrg_LT_DECL([], [host_os], [0])dnl 11933e72ca8cSmrgdnl 11943e72ca8cSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 11953e72ca8cSmrg_LT_DECL([], [build], [0])dnl 11963e72ca8cSmrg_LT_DECL([], [build_os], [0])dnl 11973e72ca8cSmrgdnl 11983e72ca8cSmrgAC_REQUIRE([AC_PROG_CC])dnl 11993e72ca8cSmrgAC_REQUIRE([LT_PATH_LD])dnl 12003e72ca8cSmrgAC_REQUIRE([LT_PATH_NM])dnl 12013e72ca8cSmrgdnl 12023e72ca8cSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 12033e72ca8cSmrgtest -z "$LN_S" && LN_S="ln -s" 12043e72ca8cSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 12053e72ca8cSmrgdnl 12063e72ca8cSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 12073e72ca8cSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 12083e72ca8cSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 12093e72ca8cSmrgdnl 12103e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 12113e72ca8cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 12123e72ca8cSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 12133e72ca8cSmrgm4_require([_LT_CMD_RELOAD])dnl 12143e72ca8cSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 12153e72ca8cSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 12163e72ca8cSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 12173e72ca8cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 12183e72ca8cSmrgm4_require([_LT_WITH_SYSROOT])dnl 1219ee3138f1Smrg 12203e72ca8cSmrg_LT_CONFIG_LIBTOOL_INIT([ 12213e72ca8cSmrg# See if we are running on zsh, and set the options which allow our 12223e72ca8cSmrg# commands through without removal of \ escapes INIT. 12233e72ca8cSmrgif test -n "\${ZSH_VERSION+set}" ; then 12243e72ca8cSmrg setopt NO_GLOB_SUBST 12253e72ca8cSmrgfi 12263e72ca8cSmrg]) 12273e72ca8cSmrgif test -n "${ZSH_VERSION+set}" ; then 12283e72ca8cSmrg setopt NO_GLOB_SUBST 12293e72ca8cSmrgfi 1230ee3138f1Smrg 12313e72ca8cSmrg_LT_CHECK_OBJDIR 1232ee3138f1Smrg 12333e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 1234ee3138f1Smrg 12353e72ca8cSmrgcase $host_os in 12363e72ca8cSmrgaix3*) 12373e72ca8cSmrg # AIX sometimes has problems with the GCC collect2 program. For some 12383e72ca8cSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 12393e72ca8cSmrg # vanish in a puff of smoke. 12403e72ca8cSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 12413e72ca8cSmrg COLLECT_NAMES= 12423e72ca8cSmrg export COLLECT_NAMES 12433e72ca8cSmrg fi 12443e72ca8cSmrg ;; 12453e72ca8cSmrgesac 1246ee3138f1Smrg 12473e72ca8cSmrg# Global variables: 12483e72ca8cSmrgofile=libtool 12493e72ca8cSmrgcan_build_shared=yes 1250ee3138f1Smrg 12513e72ca8cSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 12523e72ca8cSmrg# which needs '.lib'). 12533e72ca8cSmrglibext=a 1254ee3138f1Smrg 12553e72ca8cSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1256ee3138f1Smrg 12573e72ca8cSmrgold_CC="$CC" 12583e72ca8cSmrgold_CFLAGS="$CFLAGS" 1259ee3138f1Smrg 12603e72ca8cSmrg# Set sane defaults for various variables 12613e72ca8cSmrgtest -z "$CC" && CC=cc 12623e72ca8cSmrgtest -z "$LTCC" && LTCC=$CC 12633e72ca8cSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 12643e72ca8cSmrgtest -z "$LD" && LD=ld 12653e72ca8cSmrgtest -z "$ac_objext" && ac_objext=o 1266ee3138f1Smrg 12673e72ca8cSmrg_LT_CC_BASENAME([$compiler]) 1268ee3138f1Smrg 12693e72ca8cSmrg# Only perform the check for file, if the check method requires it 12703e72ca8cSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 12713e72ca8cSmrgcase $deplibs_check_method in 12723e72ca8cSmrgfile_magic*) 12733e72ca8cSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 12743e72ca8cSmrg _LT_PATH_MAGIC 12753e72ca8cSmrg fi 12763e72ca8cSmrg ;; 12773e72ca8cSmrgesac 1278b425557eSmrg 12793e72ca8cSmrg# Use C for the default configuration in the libtool script 12803e72ca8cSmrgLT_SUPPORTED_TAG([CC]) 12813e72ca8cSmrg_LT_LANG_C_CONFIG 12823e72ca8cSmrg_LT_LANG_DEFAULT_CONFIG 12833e72ca8cSmrg_LT_CONFIG_COMMANDS 12843e72ca8cSmrg])# _LT_SETUP 128534977a2fSmrg 128634977a2fSmrg 12873e72ca8cSmrg# _LT_PREPARE_SED_QUOTE_VARS 12883e72ca8cSmrg# -------------------------- 12893e72ca8cSmrg# Define a few sed substitution that help us do robust quoting. 12903e72ca8cSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 12913e72ca8cSmrg[# Backslashify metacharacters that are still active within 12923e72ca8cSmrg# double-quoted strings. 12933e72ca8cSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1294b425557eSmrg 12953e72ca8cSmrg# Same as above, but do not quote variable references. 12963e72ca8cSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1297b425557eSmrg 12983e72ca8cSmrg# Sed substitution to delay expansion of an escaped shell variable in a 12993e72ca8cSmrg# double_quote_subst'ed string. 13003e72ca8cSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 130134977a2fSmrg 13023e72ca8cSmrg# Sed substitution to delay expansion of an escaped single quote. 13033e72ca8cSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1304b425557eSmrg 13053e72ca8cSmrg# Sed substitution to avoid accidental globbing in evaled expressions 13063e72ca8cSmrgno_glob_subst='s/\*/\\\*/g' 13073e72ca8cSmrg]) 130834977a2fSmrg 13093e72ca8cSmrg# _LT_PROG_LTMAIN 13103e72ca8cSmrg# --------------- 13113e72ca8cSmrg# Note that this code is called both from `configure', and `config.status' 13123e72ca8cSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 13133e72ca8cSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 13143e72ca8cSmrg# so we pass a copy along to make sure it has a sensible value anyway. 13153e72ca8cSmrgm4_defun([_LT_PROG_LTMAIN], 13163e72ca8cSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 13173e72ca8cSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 13183e72ca8cSmrgltmain="$ac_aux_dir/ltmain.sh" 13193e72ca8cSmrg])# _LT_PROG_LTMAIN 1320b425557eSmrg 132134977a2fSmrg 1322ee3138f1Smrg 13233e72ca8cSmrg# So that we can recreate a full libtool script including additional 13243e72ca8cSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 13253e72ca8cSmrg# in macros and then make a single call at the end using the `libtool' 13263e72ca8cSmrg# label. 1327ee3138f1Smrg 1328ee3138f1Smrg 13293e72ca8cSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 13303e72ca8cSmrg# ---------------------------------------- 13313e72ca8cSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 13323e72ca8cSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 13333e72ca8cSmrg[m4_ifval([$1], 13343e72ca8cSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 13353e72ca8cSmrg [$1 13363e72ca8cSmrg])])]) 1337b425557eSmrg 13383e72ca8cSmrg# Initialize. 13393e72ca8cSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1340ee3138f1Smrg 1341b425557eSmrg 13423e72ca8cSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 13433e72ca8cSmrg# ------------------------------ 13443e72ca8cSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 13453e72ca8cSmrgm4_define([_LT_CONFIG_LIBTOOL], 13463e72ca8cSmrg[m4_ifval([$1], 13473e72ca8cSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 13483e72ca8cSmrg [$1 13493e72ca8cSmrg])])]) 1350ee3138f1Smrg 13513e72ca8cSmrg# Initialize. 13523e72ca8cSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1353a1ed278cSmrg 1354a1ed278cSmrg 13553e72ca8cSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 13563e72ca8cSmrg# ----------------------------------------------------- 13573e72ca8cSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 13583e72ca8cSmrg[_LT_CONFIG_LIBTOOL([$1]) 13593e72ca8cSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 13603e72ca8cSmrg]) 1361ee3138f1Smrg 1362ee3138f1Smrg 13633e72ca8cSmrg# _LT_FORMAT_COMMENT([COMMENT]) 13643e72ca8cSmrg# ----------------------------- 13653e72ca8cSmrg# Add leading comment marks to the start of each line, and a trailing 13663e72ca8cSmrg# full-stop to the whole comment if one is not present already. 13673e72ca8cSmrgm4_define([_LT_FORMAT_COMMENT], 13683e72ca8cSmrg[m4_ifval([$1], [ 13693e72ca8cSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 13703e72ca8cSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 13713e72ca8cSmrg)]) 1372ee3138f1Smrg 1373ee3138f1Smrg 1374ee3138f1Smrg 1375ee3138f1Smrg 1376ee3138f1Smrg 13773e72ca8cSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 13783e72ca8cSmrg# ------------------------------------------------------------------- 13793e72ca8cSmrg# CONFIGNAME is the name given to the value in the libtool script. 13803e72ca8cSmrg# VARNAME is the (base) name used in the configure script. 13813e72ca8cSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 13823e72ca8cSmrg# VARNAME. Any other value will be used directly. 13833e72ca8cSmrgm4_define([_LT_DECL], 13843e72ca8cSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 13853e72ca8cSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 13863e72ca8cSmrg [m4_ifval([$1], [$1], [$2])]) 13873e72ca8cSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 13883e72ca8cSmrg m4_ifval([$4], 13893e72ca8cSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 13903e72ca8cSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 13913e72ca8cSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 13923e72ca8cSmrg]) 1393ee3138f1Smrg 139434977a2fSmrg 13953e72ca8cSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 13963e72ca8cSmrg# -------------------------------------------------------- 13973e72ca8cSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1398ee3138f1Smrg 1399ee3138f1Smrg 14003e72ca8cSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 14013e72ca8cSmrg# ------------------------------------------------ 14023e72ca8cSmrgm4_define([lt_decl_tag_varnames], 14033e72ca8cSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 1404ee3138f1Smrg 14053e72ca8cSmrg 14063e72ca8cSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 14073e72ca8cSmrg# --------------------------------------------------------- 14083e72ca8cSmrgm4_define([_lt_decl_filter], 14093e72ca8cSmrg[m4_case([$#], 14103e72ca8cSmrg [0], [m4_fatal([$0: too few arguments: $#])], 14113e72ca8cSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 14123e72ca8cSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 14133e72ca8cSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 14143e72ca8cSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1415a1ed278cSmrg]) 1416ee3138f1Smrg 1417ee3138f1Smrg 14183e72ca8cSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 14193e72ca8cSmrg# -------------------------------------------------- 14203e72ca8cSmrgm4_define([lt_decl_quote_varnames], 14213e72ca8cSmrg[_lt_decl_filter([value], [1], $@)]) 1422ee3138f1Smrg 1423ee3138f1Smrg 14243e72ca8cSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 14253e72ca8cSmrg# --------------------------------------------------- 14263e72ca8cSmrgm4_define([lt_decl_dquote_varnames], 14273e72ca8cSmrg[_lt_decl_filter([value], [2], $@)]) 1428a1ed278cSmrg 1429a1ed278cSmrg 14303e72ca8cSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 14313e72ca8cSmrg# --------------------------------------------------- 14323e72ca8cSmrgm4_define([lt_decl_varnames_tagged], 14333e72ca8cSmrg[m4_assert([$# <= 2])dnl 14343e72ca8cSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 14353e72ca8cSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 14363e72ca8cSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 14373e72ca8cSmrgm4_define([_lt_decl_varnames_tagged], 14383e72ca8cSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1439ee3138f1Smrg 1440ee3138f1Smrg 14413e72ca8cSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 14423e72ca8cSmrg# ------------------------------------------------ 14433e72ca8cSmrgm4_define([lt_decl_all_varnames], 14443e72ca8cSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 14453e72ca8cSmrg m4_if([$2], [], 14463e72ca8cSmrg m4_quote(lt_decl_varnames), 14473e72ca8cSmrg m4_quote(m4_shift($@))))[]dnl 14483e72ca8cSmrg]) 14493e72ca8cSmrgm4_define([_lt_decl_all_varnames], 14503e72ca8cSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 14513e72ca8cSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 14523e72ca8cSmrg]) 1453ee3138f1Smrg 1454ee3138f1Smrg 14553e72ca8cSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 14563e72ca8cSmrg# ------------------------------------ 14573e72ca8cSmrg# Quote a variable value, and forward it to `config.status' so that its 14583e72ca8cSmrg# declaration there will have the same value as in `configure'. VARNAME 14593e72ca8cSmrg# must have a single quote delimited value for this to work. 14603e72ca8cSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 14613e72ca8cSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1462ee3138f1Smrg 1463ee3138f1Smrg 14643e72ca8cSmrg# _LT_CONFIG_STATUS_DECLARATIONS 14653e72ca8cSmrg# ------------------------------ 14663e72ca8cSmrg# We delimit libtool config variables with single quotes, so when 14673e72ca8cSmrg# we write them to config.status, we have to be sure to quote all 14683e72ca8cSmrg# embedded single quotes properly. In configure, this macro expands 14693e72ca8cSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 14703e72ca8cSmrg# 14713e72ca8cSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 14723e72ca8cSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 14733e72ca8cSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 14743e72ca8cSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1475ee3138f1Smrg 1476ee3138f1Smrg 14773e72ca8cSmrg# _LT_LIBTOOL_TAGS 14783e72ca8cSmrg# ---------------- 14793e72ca8cSmrg# Output comment and list of tags supported by the script 14803e72ca8cSmrgm4_defun([_LT_LIBTOOL_TAGS], 14813e72ca8cSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 14823e72ca8cSmrgavailable_tags="_LT_TAGS"dnl 14833e72ca8cSmrg]) 1484ee3138f1Smrg 1485ee3138f1Smrg 14863e72ca8cSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 14873e72ca8cSmrg# ----------------------------------- 14883e72ca8cSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 14893e72ca8cSmrg# expand to a commented shell variable setting: 14903e72ca8cSmrg# 14913e72ca8cSmrg# # Some comment about what VAR is for. 14923e72ca8cSmrg# visible_name=$lt_internal_name 14933e72ca8cSmrgm4_define([_LT_LIBTOOL_DECLARE], 14943e72ca8cSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 14953e72ca8cSmrg [description])))[]dnl 14963e72ca8cSmrgm4_pushdef([_libtool_name], 14973e72ca8cSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 14983e72ca8cSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 14993e72ca8cSmrg [0], [_libtool_name=[$]$1], 15003e72ca8cSmrg [1], [_libtool_name=$lt_[]$1], 15013e72ca8cSmrg [2], [_libtool_name=$lt_[]$1], 15023e72ca8cSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 15033e72ca8cSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 15043e72ca8cSmrg]) 1505ee3138f1Smrg 1506ee3138f1Smrg 15073e72ca8cSmrg# _LT_LIBTOOL_CONFIG_VARS 15083e72ca8cSmrg# ----------------------- 15093e72ca8cSmrg# Produce commented declarations of non-tagged libtool config variables 15103e72ca8cSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 15113e72ca8cSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 15123e72ca8cSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 15133e72ca8cSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 15143e72ca8cSmrg[m4_foreach([_lt_var], 15153e72ca8cSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 15163e72ca8cSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 151734977a2fSmrg 1518ee3138f1Smrg 15193e72ca8cSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 15203e72ca8cSmrg# ------------------------- 15213e72ca8cSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 15223e72ca8cSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 15233e72ca8cSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1524ee3138f1Smrg 1525ee3138f1Smrg 15263e72ca8cSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 15273e72ca8cSmrg# ------------------------------ 15283e72ca8cSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1529ee3138f1Smrg 1530b425557eSmrg 15313e72ca8cSmrg# _LT_CONFIG_COMMANDS 15323e72ca8cSmrg# ------------------- 15333e72ca8cSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 15343e72ca8cSmrg# variables for single and double quote escaping we saved from calls 15353e72ca8cSmrg# to _LT_DECL, we can put quote escaped variables declarations 15363e72ca8cSmrg# into `config.status', and then the shell code to quote escape them in 15373e72ca8cSmrg# for loops in `config.status'. Finally, any additional code accumulated 15383e72ca8cSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 15393e72ca8cSmrgm4_defun([_LT_CONFIG_COMMANDS], 15403e72ca8cSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 15413e72ca8cSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 15423e72ca8cSmrg dnl instead of duplicating it all over again into config.status, 15433e72ca8cSmrg dnl then we will have config.status run $CONFIG_LT later, so it 15443e72ca8cSmrg dnl needs to know what name is stored there: 15453e72ca8cSmrg [AC_CONFIG_COMMANDS([libtool], 15463e72ca8cSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 15473e72ca8cSmrg dnl If the libtool generation code is destined for config.status, 15483e72ca8cSmrg dnl expand the accumulated commands and init code now: 15493e72ca8cSmrg [AC_CONFIG_COMMANDS([libtool], 15503e72ca8cSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 15513e72ca8cSmrg])#_LT_CONFIG_COMMANDS 1552ee3138f1Smrg 1553ee3138f1Smrg 15543e72ca8cSmrg# Initialize. 15553e72ca8cSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 15563e72ca8cSmrg[ 1557ee3138f1Smrg 15583e72ca8cSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 15593e72ca8cSmrg# if CDPATH is set. 15603e72ca8cSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1561ee3138f1Smrg 15623e72ca8cSmrgsed_quote_subst='$sed_quote_subst' 15633e72ca8cSmrgdouble_quote_subst='$double_quote_subst' 15643e72ca8cSmrgdelay_variable_subst='$delay_variable_subst' 15653e72ca8cSmrg_LT_CONFIG_STATUS_DECLARATIONS 15663e72ca8cSmrgLTCC='$LTCC' 15673e72ca8cSmrgLTCFLAGS='$LTCFLAGS' 15683e72ca8cSmrgcompiler='$compiler_DEFAULT' 1569ee3138f1Smrg 15703e72ca8cSmrg# A function that is used when there is no print builtin or printf. 15713e72ca8cSmrgfunc_fallback_echo () 15723e72ca8cSmrg{ 15733e72ca8cSmrg eval 'cat <<_LTECHO_EOF 15743e72ca8cSmrg\$[]1 15753e72ca8cSmrg_LTECHO_EOF' 15763e72ca8cSmrg} 1577ee3138f1Smrg 15783e72ca8cSmrg# Quote evaled strings. 15793e72ca8cSmrgfor var in lt_decl_all_varnames([[ \ 15803e72ca8cSmrg]], lt_decl_quote_varnames); do 15813e72ca8cSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 15823e72ca8cSmrg *[[\\\\\\\`\\"\\\$]]*) 15833e72ca8cSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 15843e72ca8cSmrg ;; 15853e72ca8cSmrg *) 15863e72ca8cSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 15873e72ca8cSmrg ;; 15883e72ca8cSmrg esac 15893e72ca8cSmrgdone 15903e72ca8cSmrg 15913e72ca8cSmrg# Double-quote double-evaled strings. 15923e72ca8cSmrgfor var in lt_decl_all_varnames([[ \ 15933e72ca8cSmrg]], lt_decl_dquote_varnames); do 15943e72ca8cSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 15953e72ca8cSmrg *[[\\\\\\\`\\"\\\$]]*) 15963e72ca8cSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 15973e72ca8cSmrg ;; 15983e72ca8cSmrg *) 15993e72ca8cSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 16003e72ca8cSmrg ;; 16013e72ca8cSmrg esac 16023e72ca8cSmrgdone 16033e72ca8cSmrg 16043e72ca8cSmrg_LT_OUTPUT_LIBTOOL_INIT 1605b425557eSmrg]) 1606ee3138f1Smrg 16073e72ca8cSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 16083e72ca8cSmrg# ------------------------------------ 16093e72ca8cSmrg# Generate a child script FILE with all initialization necessary to 16103e72ca8cSmrg# reuse the environment learned by the parent script, and make the 16113e72ca8cSmrg# file executable. If COMMENT is supplied, it is inserted after the 16123e72ca8cSmrg# `#!' sequence but before initialization text begins. After this 16133e72ca8cSmrg# macro, additional text can be appended to FILE to form the body of 16143e72ca8cSmrg# the child script. The macro ends with non-zero status if the 16153e72ca8cSmrg# file could not be fully written (such as if the disk is full). 16163e72ca8cSmrgm4_ifdef([AS_INIT_GENERATED], 16173e72ca8cSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 16183e72ca8cSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 16193e72ca8cSmrg[m4_require([AS_PREPARE])]dnl 16203e72ca8cSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 16213e72ca8cSmrg[lt_write_fail=0 16223e72ca8cSmrgcat >$1 <<_ASEOF || lt_write_fail=1 16233e72ca8cSmrg#! $SHELL 16243e72ca8cSmrg# Generated by $as_me. 16253e72ca8cSmrg$2 16263e72ca8cSmrgSHELL=\${CONFIG_SHELL-$SHELL} 16273e72ca8cSmrgexport SHELL 16283e72ca8cSmrg_ASEOF 16293e72ca8cSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 16303e72ca8cSmrgAS_SHELL_SANITIZE 16313e72ca8cSmrg_AS_PREPARE 16323e72ca8cSmrgexec AS_MESSAGE_FD>&1 16333e72ca8cSmrg_ASEOF 16343e72ca8cSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 16353e72ca8cSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1636b425557eSmrg 16373e72ca8cSmrg# LT_OUTPUT 16383e72ca8cSmrg# --------- 16393e72ca8cSmrg# This macro allows early generation of the libtool script (before 16403e72ca8cSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 16413e72ca8cSmrg# tests. 16423e72ca8cSmrgAC_DEFUN([LT_OUTPUT], 16433e72ca8cSmrg[: ${CONFIG_LT=./config.lt} 16443e72ca8cSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 16453e72ca8cSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 16463e72ca8cSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 1647b425557eSmrg 16483e72ca8cSmrgcat >>"$CONFIG_LT" <<\_LTEOF 16493e72ca8cSmrglt_cl_silent=false 16503e72ca8cSmrgexec AS_MESSAGE_LOG_FD>>config.log 16513e72ca8cSmrg{ 16523e72ca8cSmrg echo 16533e72ca8cSmrg AS_BOX([Running $as_me.]) 16543e72ca8cSmrg} >&AS_MESSAGE_LOG_FD 1655b425557eSmrg 16563e72ca8cSmrglt_cl_help="\ 16573e72ca8cSmrg\`$as_me' creates a local libtool stub from the current configuration, 16583e72ca8cSmrgfor use in further configure time tests before the real libtool is 16593e72ca8cSmrggenerated. 1660b425557eSmrg 16613e72ca8cSmrgUsage: $[0] [[OPTIONS]] 1662b425557eSmrg 16633e72ca8cSmrg -h, --help print this help, then exit 16643e72ca8cSmrg -V, --version print version number, then exit 16653e72ca8cSmrg -q, --quiet do not print progress messages 16663e72ca8cSmrg -d, --debug don't remove temporary files 1667b425557eSmrg 16683e72ca8cSmrgReport bugs to <bug-libtool@gnu.org>." 1669b425557eSmrg 16703e72ca8cSmrglt_cl_version="\ 16713e72ca8cSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 16723e72ca8cSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 16733e72ca8cSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1674b425557eSmrg 16753e72ca8cSmrgCopyright (C) 2011 Free Software Foundation, Inc. 16763e72ca8cSmrgThis config.lt script is free software; the Free Software Foundation 16773e72ca8cSmrggives unlimited permision to copy, distribute and modify it." 1678b425557eSmrg 16793e72ca8cSmrgwhile test $[#] != 0 16803e72ca8cSmrgdo 16813e72ca8cSmrg case $[1] in 16823e72ca8cSmrg --version | --v* | -V ) 16833e72ca8cSmrg echo "$lt_cl_version"; exit 0 ;; 16843e72ca8cSmrg --help | --h* | -h ) 16853e72ca8cSmrg echo "$lt_cl_help"; exit 0 ;; 16863e72ca8cSmrg --debug | --d* | -d ) 16873e72ca8cSmrg debug=: ;; 16883e72ca8cSmrg --quiet | --q* | --silent | --s* | -q ) 16893e72ca8cSmrg lt_cl_silent=: ;; 1690b425557eSmrg 16913e72ca8cSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 16923e72ca8cSmrgTry \`$[0] --help' for more information.]) ;; 1693b425557eSmrg 16943e72ca8cSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 16953e72ca8cSmrgTry \`$[0] --help' for more information.]) ;; 1696ee3138f1Smrg esac 16973e72ca8cSmrg shift 16983e72ca8cSmrgdone 1699b425557eSmrg 17003e72ca8cSmrgif $lt_cl_silent; then 17013e72ca8cSmrg exec AS_MESSAGE_FD>/dev/null 17023e72ca8cSmrgfi 17033e72ca8cSmrg_LTEOF 1704b425557eSmrg 17053e72ca8cSmrgcat >>"$CONFIG_LT" <<_LTEOF 17063e72ca8cSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 17073e72ca8cSmrg_LTEOF 1708b425557eSmrg 17093e72ca8cSmrgcat >>"$CONFIG_LT" <<\_LTEOF 17103e72ca8cSmrgAC_MSG_NOTICE([creating $ofile]) 17113e72ca8cSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 17123e72ca8cSmrgAS_EXIT(0) 17133e72ca8cSmrg_LTEOF 17143e72ca8cSmrgchmod +x "$CONFIG_LT" 1715ee3138f1Smrg 17163e72ca8cSmrg# configure is writing to config.log, but config.lt does its own redirection, 17173e72ca8cSmrg# appending to config.log, which fails on DOS, as config.log is still kept 17183e72ca8cSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 17193e72ca8cSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 17203e72ca8cSmrglt_cl_success=: 17213e72ca8cSmrgtest "$silent" = yes && 17223e72ca8cSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 17233e72ca8cSmrgexec AS_MESSAGE_LOG_FD>/dev/null 17243e72ca8cSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 17253e72ca8cSmrgexec AS_MESSAGE_LOG_FD>>config.log 17263e72ca8cSmrg$lt_cl_success || AS_EXIT(1) 17273e72ca8cSmrg])# LT_OUTPUT 1728ee3138f1Smrg 1729ee3138f1Smrg 17303e72ca8cSmrg# _LT_CONFIG(TAG) 17313e72ca8cSmrg# --------------- 17323e72ca8cSmrg# If TAG is the built-in tag, create an initial libtool script with a 17333e72ca8cSmrg# default configuration from the untagged config vars. Otherwise add code 17343e72ca8cSmrg# to config.status for appending the configuration named by TAG from the 17353e72ca8cSmrg# matching tagged config vars. 17363e72ca8cSmrgm4_defun([_LT_CONFIG], 17373e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 17383e72ca8cSmrg_LT_CONFIG_SAVE_COMMANDS([ 17393e72ca8cSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 17403e72ca8cSmrg m4_if(_LT_TAG, [C], [ 17413e72ca8cSmrg # See if we are running on zsh, and set the options which allow our 17423e72ca8cSmrg # commands through without removal of \ escapes. 17433e72ca8cSmrg if test -n "${ZSH_VERSION+set}" ; then 17443e72ca8cSmrg setopt NO_GLOB_SUBST 17453e72ca8cSmrg fi 1746ee3138f1Smrg 17473e72ca8cSmrg cfgfile="${ofile}T" 17483e72ca8cSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 17493e72ca8cSmrg $RM "$cfgfile" 1750ee3138f1Smrg 17513e72ca8cSmrg cat <<_LT_EOF >> "$cfgfile" 17523e72ca8cSmrg#! $SHELL 1753ee3138f1Smrg 17543e72ca8cSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 17553e72ca8cSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 17563e72ca8cSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 17573e72ca8cSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 17583e72ca8cSmrg# 17593e72ca8cSmrg_LT_COPYING 17603e72ca8cSmrg_LT_LIBTOOL_TAGS 1761ee3138f1Smrg 17623e72ca8cSmrg# ### BEGIN LIBTOOL CONFIG 17633e72ca8cSmrg_LT_LIBTOOL_CONFIG_VARS 17643e72ca8cSmrg_LT_LIBTOOL_TAG_VARS 17653e72ca8cSmrg# ### END LIBTOOL CONFIG 1766ee3138f1Smrg 1767a1ed278cSmrg_LT_EOF 17683e72ca8cSmrg 17693e72ca8cSmrg case $host_os in 17703e72ca8cSmrg aix3*) 17713e72ca8cSmrg cat <<\_LT_EOF >> "$cfgfile" 17723e72ca8cSmrg# AIX sometimes has problems with the GCC collect2 program. For some 17733e72ca8cSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 17743e72ca8cSmrg# vanish in a puff of smoke. 17753e72ca8cSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 17763e72ca8cSmrg COLLECT_NAMES= 17773e72ca8cSmrg export COLLECT_NAMES 1778a1ed278cSmrgfi 17793e72ca8cSmrg_LT_EOF 17803e72ca8cSmrg ;; 17813e72ca8cSmrg esac 1782ee3138f1Smrg 17833e72ca8cSmrg _LT_PROG_LTMAIN 1784ee3138f1Smrg 17853e72ca8cSmrg # We use sed instead of cat because bash on DJGPP gets confused if 17863e72ca8cSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 17873e72ca8cSmrg # text mode, it properly converts lines to CR/LF. This bash problem 17883e72ca8cSmrg # is reportedly fixed, but why not run on old versions too? 17893e72ca8cSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 17903e72ca8cSmrg || (rm -f "$cfgfile"; exit 1) 1791ee3138f1Smrg 17923e72ca8cSmrg _LT_PROG_REPLACE_SHELLFNS 1793ee3138f1Smrg 17943e72ca8cSmrg mv -f "$cfgfile" "$ofile" || 17953e72ca8cSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 17963e72ca8cSmrg chmod +x "$ofile" 17973e72ca8cSmrg], 17983e72ca8cSmrg[cat <<_LT_EOF >> "$ofile" 1799ee3138f1Smrg 18003e72ca8cSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 18013e72ca8cSmrgdnl in a comment (ie after a #). 18023e72ca8cSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 18033e72ca8cSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 18043e72ca8cSmrg# ### END LIBTOOL TAG CONFIG: $1 18053e72ca8cSmrg_LT_EOF 18063e72ca8cSmrg])dnl /m4_if 18073e72ca8cSmrg], 18083e72ca8cSmrg[m4_if([$1], [], [ 18093e72ca8cSmrg PACKAGE='$PACKAGE' 18103e72ca8cSmrg VERSION='$VERSION' 18113e72ca8cSmrg TIMESTAMP='$TIMESTAMP' 18123e72ca8cSmrg RM='$RM' 18133e72ca8cSmrg ofile='$ofile'], []) 18143e72ca8cSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 18153e72ca8cSmrg])# _LT_CONFIG 1816ee3138f1Smrg 1817ee3138f1Smrg 18183e72ca8cSmrg# LT_SUPPORTED_TAG(TAG) 18193e72ca8cSmrg# --------------------- 18203e72ca8cSmrg# Trace this macro to discover what tags are supported by the libtool 18213e72ca8cSmrg# --tag option, using: 18223e72ca8cSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 18233e72ca8cSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1824ee3138f1Smrg 1825ee3138f1Smrg 18263e72ca8cSmrg# C support is built-in for now 18273e72ca8cSmrgm4_define([_LT_LANG_C_enabled], []) 18283e72ca8cSmrgm4_define([_LT_TAGS], []) 182934977a2fSmrg 183079a8a9c6Smrg 18313e72ca8cSmrg# LT_LANG(LANG) 18323e72ca8cSmrg# ------------- 18333e72ca8cSmrg# Enable libtool support for the given language if not already enabled. 18343e72ca8cSmrgAC_DEFUN([LT_LANG], 18353e72ca8cSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 18363e72ca8cSmrgm4_case([$1], 18373e72ca8cSmrg [C], [_LT_LANG(C)], 18383e72ca8cSmrg [C++], [_LT_LANG(CXX)], 18393e72ca8cSmrg [Go], [_LT_LANG(GO)], 18403e72ca8cSmrg [Java], [_LT_LANG(GCJ)], 18413e72ca8cSmrg [Fortran 77], [_LT_LANG(F77)], 18423e72ca8cSmrg [Fortran], [_LT_LANG(FC)], 18433e72ca8cSmrg [Windows Resource], [_LT_LANG(RC)], 18443e72ca8cSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 18453e72ca8cSmrg [_LT_LANG($1)], 18463e72ca8cSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 18473e72ca8cSmrg])# LT_LANG 1848ee3138f1Smrg 1849ee3138f1Smrg 18503e72ca8cSmrg# _LT_LANG(LANGNAME) 18513e72ca8cSmrg# ------------------ 18523e72ca8cSmrgm4_defun([_LT_LANG], 18533e72ca8cSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 18543e72ca8cSmrg [LT_SUPPORTED_TAG([$1])dnl 18553e72ca8cSmrg m4_append([_LT_TAGS], [$1 ])dnl 18563e72ca8cSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 18573e72ca8cSmrg _LT_LANG_$1_CONFIG($1)])dnl 18583e72ca8cSmrg])# _LT_LANG 1859ee3138f1Smrg 1860ee3138f1Smrg 18613e72ca8cSmrgm4_ifndef([AC_PROG_GO], [ 18623e72ca8cSmrg# NOTE: This macro has been submitted for inclusion into # 18633e72ca8cSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 18643e72ca8cSmrg# a released version of Autoconf we should remove this # 18653e72ca8cSmrg# macro and use it instead. # 18663e72ca8cSmrgm4_defun([AC_PROG_GO], 18673e72ca8cSmrg[AC_LANG_PUSH(Go)dnl 18683e72ca8cSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 18693e72ca8cSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 18703e72ca8cSmrg_AC_ARG_VAR_LDFLAGS()dnl 18713e72ca8cSmrgAC_CHECK_TOOL(GOC, gccgo) 18723e72ca8cSmrgif test -z "$GOC"; then 18733e72ca8cSmrg if test -n "$ac_tool_prefix"; then 18743e72ca8cSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 18753e72ca8cSmrg fi 1876a1ed278cSmrgfi 18773e72ca8cSmrgif test -z "$GOC"; then 18783e72ca8cSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 18793e72ca8cSmrgfi 18803e72ca8cSmrg])#m4_defun 18813e72ca8cSmrg])#m4_ifndef 1882ee3138f1Smrg 1883ee3138f1Smrg 18843e72ca8cSmrg# _LT_LANG_DEFAULT_CONFIG 18853e72ca8cSmrg# ----------------------- 18863e72ca8cSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 18873e72ca8cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 18883e72ca8cSmrg [LT_LANG(CXX)], 18893e72ca8cSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1890ee3138f1Smrg 18913e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 18923e72ca8cSmrg [LT_LANG(F77)], 18933e72ca8cSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1894ee3138f1Smrg 18953e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 18963e72ca8cSmrg [LT_LANG(FC)], 18973e72ca8cSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1898ee3138f1Smrg 18993e72ca8cSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 19003e72ca8cSmrgdnl pulling things in needlessly. 19013e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 19023e72ca8cSmrg [LT_LANG(GCJ)], 19033e72ca8cSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 19043e72ca8cSmrg [LT_LANG(GCJ)], 19053e72ca8cSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 19063e72ca8cSmrg [LT_LANG(GCJ)], 19073e72ca8cSmrg [m4_ifdef([AC_PROG_GCJ], 19083e72ca8cSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 19093e72ca8cSmrg m4_ifdef([A][M_PROG_GCJ], 19103e72ca8cSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 19113e72ca8cSmrg m4_ifdef([LT_PROG_GCJ], 19123e72ca8cSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1913ee3138f1Smrg 19143e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 19153e72ca8cSmrg [LT_LANG(GO)], 19163e72ca8cSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 1917ee3138f1Smrg 19183e72ca8cSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 19193e72ca8cSmrg [LT_LANG(RC)], 19203e72ca8cSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 19213e72ca8cSmrg])# _LT_LANG_DEFAULT_CONFIG 1922ee3138f1Smrg 19233e72ca8cSmrg# Obsolete macros: 19243e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 19253e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 19263e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 19273e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 19283e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 19293e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 19303e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 19313e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 19323e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 19333e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 19343e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 1935ee3138f1Smrg 193634977a2fSmrg 19373e72ca8cSmrg# _LT_TAG_COMPILER 19383e72ca8cSmrg# ---------------- 19393e72ca8cSmrgm4_defun([_LT_TAG_COMPILER], 19403e72ca8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 1941ee3138f1Smrg 19423e72ca8cSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 19433e72ca8cSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 19443e72ca8cSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 19453e72ca8cSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1946ee3138f1Smrg 19473e72ca8cSmrg# If no C compiler was specified, use CC. 19483e72ca8cSmrgLTCC=${LTCC-"$CC"} 1949ee3138f1Smrg 19503e72ca8cSmrg# If no C compiler flags were specified, use CFLAGS. 19513e72ca8cSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1952ee3138f1Smrg 19533e72ca8cSmrg# Allow CC to be a program name with arguments. 19543e72ca8cSmrgcompiler=$CC 19553e72ca8cSmrg])# _LT_TAG_COMPILER 195634977a2fSmrg 19573e72ca8cSmrg 19583e72ca8cSmrg# _LT_COMPILER_BOILERPLATE 19593e72ca8cSmrg# ------------------------ 19603e72ca8cSmrg# Check for compiler boilerplate output or warnings with 19613e72ca8cSmrg# the simple compiler test code. 19623e72ca8cSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 19633e72ca8cSmrg[m4_require([_LT_DECL_SED])dnl 19643e72ca8cSmrgac_outfile=conftest.$ac_objext 19653e72ca8cSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 19663e72ca8cSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 19673e72ca8cSmrg_lt_compiler_boilerplate=`cat conftest.err` 19683e72ca8cSmrg$RM conftest* 19693e72ca8cSmrg])# _LT_COMPILER_BOILERPLATE 19703e72ca8cSmrg 19713e72ca8cSmrg 19723e72ca8cSmrg# _LT_LINKER_BOILERPLATE 19733e72ca8cSmrg# ---------------------- 19743e72ca8cSmrg# Check for linker boilerplate output or warnings with 19753e72ca8cSmrg# the simple link test code. 19763e72ca8cSmrgm4_defun([_LT_LINKER_BOILERPLATE], 19773e72ca8cSmrg[m4_require([_LT_DECL_SED])dnl 19783e72ca8cSmrgac_outfile=conftest.$ac_objext 19793e72ca8cSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 19803e72ca8cSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 19813e72ca8cSmrg_lt_linker_boilerplate=`cat conftest.err` 19823e72ca8cSmrg$RM -r conftest* 19833e72ca8cSmrg])# _LT_LINKER_BOILERPLATE 19843e72ca8cSmrg 19853e72ca8cSmrg# _LT_REQUIRED_DARWIN_CHECKS 19863e72ca8cSmrg# ------------------------- 19873e72ca8cSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 1988a1ed278cSmrg case $host_os in 19893e72ca8cSmrg rhapsody* | darwin*) 19903e72ca8cSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 19913e72ca8cSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 19923e72ca8cSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 19933e72ca8cSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 19943e72ca8cSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 19953e72ca8cSmrg _LT_DECL([], [DSYMUTIL], [1], 19963e72ca8cSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 19973e72ca8cSmrg _LT_DECL([], [NMEDIT], [1], 19983e72ca8cSmrg [Tool to change global to local symbols on Mac OS X]) 19993e72ca8cSmrg _LT_DECL([], [LIPO], [1], 20003e72ca8cSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 20013e72ca8cSmrg _LT_DECL([], [OTOOL], [1], 20023e72ca8cSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 20033e72ca8cSmrg _LT_DECL([], [OTOOL64], [1], 20043e72ca8cSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 20053e72ca8cSmrg 20063e72ca8cSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 20073e72ca8cSmrg [lt_cv_apple_cc_single_mod=no 20083e72ca8cSmrg if test -z "${LT_MULTI_MODULE}"; then 20093e72ca8cSmrg # By default we will add the -single_module flag. You can override 20103e72ca8cSmrg # by either setting the environment variable LT_MULTI_MODULE 20113e72ca8cSmrg # non-empty at configure time, or by adding -multi_module to the 20123e72ca8cSmrg # link flags. 20133e72ca8cSmrg rm -rf libconftest.dylib* 20143e72ca8cSmrg echo "int foo(void){return 1;}" > conftest.c 20153e72ca8cSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 20163e72ca8cSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 20173e72ca8cSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 20183e72ca8cSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 20193e72ca8cSmrg _lt_result=$? 20203e72ca8cSmrg # If there is a non-empty error log, and "single_module" 20213e72ca8cSmrg # appears in it, assume the flag caused a linker warning 20223e72ca8cSmrg if test -s conftest.err && $GREP single_module conftest.err; then 20233e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20243e72ca8cSmrg # Otherwise, if the output was created with a 0 exit code from 20253e72ca8cSmrg # the compiler, it worked. 20263e72ca8cSmrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 20273e72ca8cSmrg lt_cv_apple_cc_single_mod=yes 20283e72ca8cSmrg else 20293e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20303e72ca8cSmrg fi 20313e72ca8cSmrg rm -rf libconftest.dylib* 20323e72ca8cSmrg rm -f conftest.* 20333e72ca8cSmrg fi]) 20343e72ca8cSmrg 20353e72ca8cSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 20363e72ca8cSmrg [lt_cv_ld_exported_symbols_list], 20373e72ca8cSmrg [lt_cv_ld_exported_symbols_list=no 20383e72ca8cSmrg save_LDFLAGS=$LDFLAGS 20393e72ca8cSmrg echo "_main" > conftest.sym 20403e72ca8cSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 20413e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 20423e72ca8cSmrg [lt_cv_ld_exported_symbols_list=yes], 20433e72ca8cSmrg [lt_cv_ld_exported_symbols_list=no]) 20443e72ca8cSmrg LDFLAGS="$save_LDFLAGS" 20453e72ca8cSmrg ]) 20463e72ca8cSmrg 20473e72ca8cSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 20483e72ca8cSmrg [lt_cv_ld_force_load=no 20493e72ca8cSmrg cat > conftest.c << _LT_EOF 20503e72ca8cSmrgint forced_loaded() { return 2;} 20513e72ca8cSmrg_LT_EOF 20523e72ca8cSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 20533e72ca8cSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 20543e72ca8cSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 20553e72ca8cSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 20563e72ca8cSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 20573e72ca8cSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 20583e72ca8cSmrg cat > conftest.c << _LT_EOF 20593e72ca8cSmrgint main() { return 0;} 20603e72ca8cSmrg_LT_EOF 20613e72ca8cSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 20623e72ca8cSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 20633e72ca8cSmrg _lt_result=$? 20643e72ca8cSmrg if test -s conftest.err && $GREP force_load conftest.err; then 20653e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20663e72ca8cSmrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 20673e72ca8cSmrg lt_cv_ld_force_load=yes 20683e72ca8cSmrg else 20693e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20703e72ca8cSmrg fi 20713e72ca8cSmrg rm -f conftest.err libconftest.a conftest conftest.c 20723e72ca8cSmrg rm -rf conftest.dSYM 20733e72ca8cSmrg ]) 20743e72ca8cSmrg case $host_os in 20753e72ca8cSmrg rhapsody* | darwin1.[[012]]) 20763e72ca8cSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 20773e72ca8cSmrg darwin1.*) 20783e72ca8cSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 20793e72ca8cSmrg darwin*) # darwin 5.x on 20803e72ca8cSmrg # if running on 10.5 or later, the deployment target defaults 20813e72ca8cSmrg # to the OS version, if on x86, and 10.4, the deployment 20823e72ca8cSmrg # target defaults to 10.4. Don't you love it? 20833e72ca8cSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 20843e72ca8cSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 20853e72ca8cSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 20863e72ca8cSmrg 10.[[012]]*) 20873e72ca8cSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 20883e72ca8cSmrg 10.*) 20893e72ca8cSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 20903e72ca8cSmrg esac 20913e72ca8cSmrg ;; 20923e72ca8cSmrg esac 20933e72ca8cSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 20943e72ca8cSmrg _lt_dar_single_mod='$single_module' 20953e72ca8cSmrg fi 20963e72ca8cSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 20973e72ca8cSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2098a1ed278cSmrg else 20993e72ca8cSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 21003e72ca8cSmrg fi 21013e72ca8cSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 21023e72ca8cSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 21033e72ca8cSmrg else 21043e72ca8cSmrg _lt_dsymutil= 2105a1ed278cSmrg fi 2106a1ed278cSmrg ;; 2107a1ed278cSmrg esac 21083e72ca8cSmrg]) 2109ee3138f1Smrg 2110ee3138f1Smrg 21113e72ca8cSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 21123e72ca8cSmrg# --------------------------------- 21133e72ca8cSmrg# Checks for linker and compiler features on darwin 21143e72ca8cSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 21153e72ca8cSmrg[ 21163e72ca8cSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 21173e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 21183e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 21193e72ca8cSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 21203e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 21213e72ca8cSmrg if test "$lt_cv_ld_force_load" = "yes"; then 21223e72ca8cSmrg _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\"`' 21233e72ca8cSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 21243e72ca8cSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 21253e72ca8cSmrg else 21263e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 21273e72ca8cSmrg fi 21283e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 21293e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 21303e72ca8cSmrg case $cc_basename in 21313e72ca8cSmrg ifort*) _lt_dar_can_shared=yes ;; 21323e72ca8cSmrg *) _lt_dar_can_shared=$GCC ;; 2133a1ed278cSmrg esac 21343e72ca8cSmrg if test "$_lt_dar_can_shared" = "yes"; then 21353e72ca8cSmrg output_verbose_link_cmd=func_echo_all 21363e72ca8cSmrg _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}" 21373e72ca8cSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 21383e72ca8cSmrg _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}" 21393e72ca8cSmrg _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}" 21403e72ca8cSmrg m4_if([$1], [CXX], 21413e72ca8cSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 21423e72ca8cSmrg _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}" 21433e72ca8cSmrg _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}" 2144a1ed278cSmrg fi 21453e72ca8cSmrg],[]) 21463e72ca8cSmrg else 21473e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 21483e72ca8cSmrg fi 21493e72ca8cSmrg]) 21503e72ca8cSmrg 21513e72ca8cSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 21523e72ca8cSmrg# ---------------------------------- 21533e72ca8cSmrg# Links a minimal program and checks the executable 21543e72ca8cSmrg# for the system default hardcoded library path. In most cases, 21553e72ca8cSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 21563e72ca8cSmrg# the location of the communication and MPI libs are included too. 21573e72ca8cSmrg# If we don't find anything, use the default library path according 21583e72ca8cSmrg# to the aix ld manual. 21593e72ca8cSmrg# Store the results from the different compilers for each TAGNAME. 21603e72ca8cSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 21613e72ca8cSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 21623e72ca8cSmrg[m4_require([_LT_DECL_SED])dnl 21633e72ca8cSmrgif test "${lt_cv_aix_libpath+set}" = set; then 21643e72ca8cSmrg aix_libpath=$lt_cv_aix_libpath 2165a1ed278cSmrgelse 21663e72ca8cSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 21673e72ca8cSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 21683e72ca8cSmrg lt_aix_libpath_sed='[ 21693e72ca8cSmrg /Import File Strings/,/^$/ { 21703e72ca8cSmrg /^0/ { 21713e72ca8cSmrg s/^0 *\([^ ]*\) *$/\1/ 21723e72ca8cSmrg p 21733e72ca8cSmrg } 21743e72ca8cSmrg }]' 21753e72ca8cSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 21763e72ca8cSmrg # Check for a 64-bit object if we didn't find anything. 21773e72ca8cSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 21783e72ca8cSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 21793e72ca8cSmrg fi],[]) 21803e72ca8cSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 21813e72ca8cSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 21823e72ca8cSmrg fi 21833e72ca8cSmrg ]) 21843e72ca8cSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 21853e72ca8cSmrgfi 21863e72ca8cSmrg])# _LT_SYS_MODULE_PATH_AIX 2187ee3138f1Smrg 218834977a2fSmrg 21893e72ca8cSmrg# _LT_SHELL_INIT(ARG) 21903e72ca8cSmrg# ------------------- 21913e72ca8cSmrgm4_define([_LT_SHELL_INIT], 21923e72ca8cSmrg[m4_divert_text([M4SH-INIT], [$1 21933e72ca8cSmrg])])# _LT_SHELL_INIT 2194ee3138f1Smrg 2195ee3138f1Smrg 219634977a2fSmrg 21973e72ca8cSmrg# _LT_PROG_ECHO_BACKSLASH 21983e72ca8cSmrg# ----------------------- 21993e72ca8cSmrg# Find how we can fake an echo command that does not interpret backslash. 22003e72ca8cSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 22013e72ca8cSmrg# of the generated configure script which will find a shell with a builtin 22023e72ca8cSmrg# printf (which we can use as an echo command). 22033e72ca8cSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 22043e72ca8cSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 22053e72ca8cSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 22063e72ca8cSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 220734977a2fSmrg 22083e72ca8cSmrgAC_MSG_CHECKING([how to print strings]) 22093e72ca8cSmrg# Test print first, because it will be a builtin if present. 22103e72ca8cSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 22113e72ca8cSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 22123e72ca8cSmrg ECHO='print -r --' 22133e72ca8cSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 22143e72ca8cSmrg ECHO='printf %s\n' 22153e72ca8cSmrgelse 22163e72ca8cSmrg # Use this function as a fallback that always works. 22173e72ca8cSmrg func_fallback_echo () 22183e72ca8cSmrg { 22193e72ca8cSmrg eval 'cat <<_LTECHO_EOF 22203e72ca8cSmrg$[]1 22213e72ca8cSmrg_LTECHO_EOF' 22223e72ca8cSmrg } 22233e72ca8cSmrg ECHO='func_fallback_echo' 22243e72ca8cSmrgfi 2225ee3138f1Smrg 22263e72ca8cSmrg# func_echo_all arg... 22273e72ca8cSmrg# Invoke $ECHO with all args, space-separated. 22283e72ca8cSmrgfunc_echo_all () 22293e72ca8cSmrg{ 22303e72ca8cSmrg $ECHO "$*" 22313e72ca8cSmrg} 2232ee3138f1Smrg 22333e72ca8cSmrgcase "$ECHO" in 22343e72ca8cSmrg printf*) AC_MSG_RESULT([printf]) ;; 22353e72ca8cSmrg print*) AC_MSG_RESULT([print -r]) ;; 22363e72ca8cSmrg *) AC_MSG_RESULT([cat]) ;; 22373e72ca8cSmrgesac 223834977a2fSmrg 22393e72ca8cSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 22403e72ca8cSmrg[_AS_DETECT_SUGGESTED([ 22413e72ca8cSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 22423e72ca8cSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 22433e72ca8cSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 22443e72ca8cSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 22453e72ca8cSmrg PATH=/empty FPATH=/empty; export PATH FPATH 22463e72ca8cSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 22473e72ca8cSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2248ee3138f1Smrg 22493e72ca8cSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 22503e72ca8cSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 22513e72ca8cSmrg])# _LT_PROG_ECHO_BACKSLASH 2252ee3138f1Smrg 2253ee3138f1Smrg 22543e72ca8cSmrg# _LT_WITH_SYSROOT 22553e72ca8cSmrg# ---------------- 22563e72ca8cSmrgAC_DEFUN([_LT_WITH_SYSROOT], 22573e72ca8cSmrg[AC_MSG_CHECKING([for sysroot]) 22583e72ca8cSmrgAC_ARG_WITH([sysroot], 22593e72ca8cSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 22603e72ca8cSmrg (or the compiler's sysroot if not specified).], 22613e72ca8cSmrg[], [with_sysroot=no]) 22623e72ca8cSmrg 22633e72ca8cSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 22643e72ca8cSmrgdnl in case the user passed a directory name. 22653e72ca8cSmrglt_sysroot= 22663e72ca8cSmrgcase ${with_sysroot} in #( 22673e72ca8cSmrg yes) 22683e72ca8cSmrg if test "$GCC" = yes; then 22693e72ca8cSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 22703e72ca8cSmrg fi 22713e72ca8cSmrg ;; #( 22723e72ca8cSmrg /*) 22733e72ca8cSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 22743e72ca8cSmrg ;; #( 22753e72ca8cSmrg no|'') 22763e72ca8cSmrg ;; #( 22773e72ca8cSmrg *) 22783e72ca8cSmrg AC_MSG_RESULT([${with_sysroot}]) 22793e72ca8cSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 22803e72ca8cSmrg ;; 22813e72ca8cSmrgesac 2282ee3138f1Smrg 22833e72ca8cSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 22843e72ca8cSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 22853e72ca8cSmrg[dependent libraries, and in which our libraries should be installed.])]) 2286ee3138f1Smrg 22873e72ca8cSmrg# _LT_ENABLE_LOCK 22883e72ca8cSmrg# --------------- 22893e72ca8cSmrgm4_defun([_LT_ENABLE_LOCK], 22903e72ca8cSmrg[AC_ARG_ENABLE([libtool-lock], 22913e72ca8cSmrg [AS_HELP_STRING([--disable-libtool-lock], 22923e72ca8cSmrg [avoid locking (might break parallel builds)])]) 22933e72ca8cSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2294ee3138f1Smrg 22953e72ca8cSmrg# Some flags need to be propagated to the compiler or linker for good 22963e72ca8cSmrg# libtool support. 22973e72ca8cSmrgcase $host in 22983e72ca8cSmrgia64-*-hpux*) 22993e72ca8cSmrg # Find out which ABI we are using. 23003e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 23013e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 23023e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 23033e72ca8cSmrg *ELF-32*) 23043e72ca8cSmrg HPUX_IA64_MODE="32" 23053e72ca8cSmrg ;; 23063e72ca8cSmrg *ELF-64*) 23073e72ca8cSmrg HPUX_IA64_MODE="64" 23083e72ca8cSmrg ;; 2309b425557eSmrg esac 2310a1ed278cSmrg fi 23113e72ca8cSmrg rm -rf conftest* 23123e72ca8cSmrg ;; 23133e72ca8cSmrg*-*-irix6*) 23143e72ca8cSmrg # Find out which ABI we are using. 23153e72ca8cSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 23163e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 23173e72ca8cSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 23183e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 23193e72ca8cSmrg *32-bit*) 23203e72ca8cSmrg LD="${LD-ld} -melf32bsmip" 23213e72ca8cSmrg ;; 23223e72ca8cSmrg *N32*) 23233e72ca8cSmrg LD="${LD-ld} -melf32bmipn32" 23243e72ca8cSmrg ;; 23253e72ca8cSmrg *64-bit*) 23263e72ca8cSmrg LD="${LD-ld} -melf64bmip" 23273e72ca8cSmrg ;; 23283e72ca8cSmrg esac 23293e72ca8cSmrg else 23303e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 23313e72ca8cSmrg *32-bit*) 23323e72ca8cSmrg LD="${LD-ld} -32" 23333e72ca8cSmrg ;; 23343e72ca8cSmrg *N32*) 23353e72ca8cSmrg LD="${LD-ld} -n32" 23363e72ca8cSmrg ;; 23373e72ca8cSmrg *64-bit*) 23383e72ca8cSmrg LD="${LD-ld} -64" 23393e72ca8cSmrg ;; 23403e72ca8cSmrg esac 23413e72ca8cSmrg fi 23423e72ca8cSmrg fi 23433e72ca8cSmrg rm -rf conftest* 2344a1ed278cSmrg ;; 2345ee3138f1Smrg 23463e72ca8cSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 23473e72ca8cSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 23483e72ca8cSmrg # Find out which ABI we are using. 23493e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 23503e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 23513e72ca8cSmrg case `/usr/bin/file conftest.o` in 23523e72ca8cSmrg *32-bit*) 23533e72ca8cSmrg case $host in 23543e72ca8cSmrg x86_64-*kfreebsd*-gnu) 23553e72ca8cSmrg LD="${LD-ld} -m elf_i386_fbsd" 23563e72ca8cSmrg ;; 23573e72ca8cSmrg x86_64-*linux*) 23583e72ca8cSmrg LD="${LD-ld} -m elf_i386" 23593e72ca8cSmrg ;; 23603e72ca8cSmrg ppc64-*linux*|powerpc64-*linux*) 23613e72ca8cSmrg LD="${LD-ld} -m elf32ppclinux" 23623e72ca8cSmrg ;; 23633e72ca8cSmrg s390x-*linux*) 23643e72ca8cSmrg LD="${LD-ld} -m elf_s390" 23653e72ca8cSmrg ;; 23663e72ca8cSmrg sparc64-*linux*) 23673e72ca8cSmrg LD="${LD-ld} -m elf32_sparc" 23683e72ca8cSmrg ;; 23693e72ca8cSmrg esac 23703e72ca8cSmrg ;; 23713e72ca8cSmrg *64-bit*) 23723e72ca8cSmrg case $host in 23733e72ca8cSmrg x86_64-*kfreebsd*-gnu) 23743e72ca8cSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 23753e72ca8cSmrg ;; 23763e72ca8cSmrg x86_64-*linux*) 23773e72ca8cSmrg LD="${LD-ld} -m elf_x86_64" 23783e72ca8cSmrg ;; 23793e72ca8cSmrg ppc*-*linux*|powerpc*-*linux*) 23803e72ca8cSmrg LD="${LD-ld} -m elf64ppc" 23813e72ca8cSmrg ;; 23823e72ca8cSmrg s390*-*linux*|s390*-*tpf*) 23833e72ca8cSmrg LD="${LD-ld} -m elf64_s390" 23843e72ca8cSmrg ;; 23853e72ca8cSmrg sparc*-*linux*) 23863e72ca8cSmrg LD="${LD-ld} -m elf64_sparc" 23873e72ca8cSmrg ;; 23883e72ca8cSmrg esac 23893e72ca8cSmrg ;; 23903e72ca8cSmrg esac 23913e72ca8cSmrg fi 23923e72ca8cSmrg rm -rf conftest* 2393a1ed278cSmrg ;; 2394ee3138f1Smrg 23953e72ca8cSmrg*-*-sco3.2v5*) 23963e72ca8cSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 23973e72ca8cSmrg SAVE_CFLAGS="$CFLAGS" 23983e72ca8cSmrg CFLAGS="$CFLAGS -belf" 23993e72ca8cSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 24003e72ca8cSmrg [AC_LANG_PUSH(C) 24013e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 24023e72ca8cSmrg AC_LANG_POP]) 24033e72ca8cSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 24043e72ca8cSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 24053e72ca8cSmrg CFLAGS="$SAVE_CFLAGS" 24063e72ca8cSmrg fi 24073e72ca8cSmrg ;; 24083e72ca8cSmrg*-*solaris*) 24093e72ca8cSmrg # Find out which ABI we are using. 24103e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 24113e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 24123e72ca8cSmrg case `/usr/bin/file conftest.o` in 24133e72ca8cSmrg *64-bit*) 24143e72ca8cSmrg case $lt_cv_prog_gnu_ld in 24153e72ca8cSmrg yes*) 24163e72ca8cSmrg case $host in 24173e72ca8cSmrg i?86-*-solaris*) 24183e72ca8cSmrg LD="${LD-ld} -m elf_x86_64" 24193e72ca8cSmrg ;; 24203e72ca8cSmrg sparc*-*-solaris*) 24213e72ca8cSmrg LD="${LD-ld} -m elf64_sparc" 24223e72ca8cSmrg ;; 24233e72ca8cSmrg esac 24243e72ca8cSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 24253e72ca8cSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 24263e72ca8cSmrg LD="${LD-ld}_sol2" 24273e72ca8cSmrg fi 24283e72ca8cSmrg ;; 24293e72ca8cSmrg *) 24303e72ca8cSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 24313e72ca8cSmrg LD="${LD-ld} -64" 24323e72ca8cSmrg fi 24333e72ca8cSmrg ;; 24343e72ca8cSmrg esac 24353e72ca8cSmrg ;; 24363e72ca8cSmrg esac 24373e72ca8cSmrg fi 24383e72ca8cSmrg rm -rf conftest* 2439a1ed278cSmrg ;; 24403e72ca8cSmrgesac 2441ee3138f1Smrg 24423e72ca8cSmrgneed_locks="$enable_libtool_lock" 24433e72ca8cSmrg])# _LT_ENABLE_LOCK 2444ee3138f1Smrg 2445ee3138f1Smrg 24463e72ca8cSmrg# _LT_PROG_AR 24473e72ca8cSmrg# ----------- 24483e72ca8cSmrgm4_defun([_LT_PROG_AR], 24493e72ca8cSmrg[AC_CHECK_TOOLS(AR, [ar], false) 24503e72ca8cSmrg: ${AR=ar} 24513e72ca8cSmrg: ${AR_FLAGS=cru} 24523e72ca8cSmrg_LT_DECL([], [AR], [1], [The archiver]) 24533e72ca8cSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 24543e72ca8cSmrg 24553e72ca8cSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 24563e72ca8cSmrg [lt_cv_ar_at_file=no 24573e72ca8cSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 24583e72ca8cSmrg [echo conftest.$ac_objext > conftest.lst 24593e72ca8cSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 24603e72ca8cSmrg AC_TRY_EVAL([lt_ar_try]) 24613e72ca8cSmrg if test "$ac_status" -eq 0; then 24623e72ca8cSmrg # Ensure the archiver fails upon bogus file names. 24633e72ca8cSmrg rm -f conftest.$ac_objext libconftest.a 24643e72ca8cSmrg AC_TRY_EVAL([lt_ar_try]) 24653e72ca8cSmrg if test "$ac_status" -ne 0; then 24663e72ca8cSmrg lt_cv_ar_at_file=@ 24673e72ca8cSmrg fi 24683e72ca8cSmrg fi 24693e72ca8cSmrg rm -f conftest.* libconftest.a 24703e72ca8cSmrg ]) 24713e72ca8cSmrg ]) 24723e72ca8cSmrg 24733e72ca8cSmrgif test "x$lt_cv_ar_at_file" = xno; then 24743e72ca8cSmrg archiver_list_spec= 24753e72ca8cSmrgelse 24763e72ca8cSmrg archiver_list_spec=$lt_cv_ar_at_file 24773e72ca8cSmrgfi 24783e72ca8cSmrg_LT_DECL([], [archiver_list_spec], [1], 24793e72ca8cSmrg [How to feed a file listing to the archiver]) 24803e72ca8cSmrg])# _LT_PROG_AR 24813e72ca8cSmrg 24823e72ca8cSmrg 24833e72ca8cSmrg# _LT_CMD_OLD_ARCHIVE 24843e72ca8cSmrg# ------------------- 24853e72ca8cSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 24863e72ca8cSmrg[_LT_PROG_AR 24873e72ca8cSmrg 24883e72ca8cSmrgAC_CHECK_TOOL(STRIP, strip, :) 24893e72ca8cSmrgtest -z "$STRIP" && STRIP=: 24903e72ca8cSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 24913e72ca8cSmrg 24923e72ca8cSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 24933e72ca8cSmrgtest -z "$RANLIB" && RANLIB=: 24943e72ca8cSmrg_LT_DECL([], [RANLIB], [1], 24953e72ca8cSmrg [Commands used to install an old-style archive]) 24963e72ca8cSmrg 24973e72ca8cSmrg# Determine commands to create old-style static archives. 24983e72ca8cSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 24993e72ca8cSmrgold_postinstall_cmds='chmod 644 $oldlib' 25003e72ca8cSmrgold_postuninstall_cmds= 25013e72ca8cSmrg 25023e72ca8cSmrgif test -n "$RANLIB"; then 2503a1ed278cSmrg case $host_os in 25043e72ca8cSmrg openbsd*) 25053e72ca8cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2506a1ed278cSmrg ;; 2507a1ed278cSmrg *) 25083e72ca8cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2509a1ed278cSmrg ;; 2510a1ed278cSmrg esac 25113e72ca8cSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 25123e72ca8cSmrgfi 2513ee3138f1Smrg 25143e72ca8cSmrgcase $host_os in 25153e72ca8cSmrg darwin*) 25163e72ca8cSmrg lock_old_archive_extraction=yes ;; 25173e72ca8cSmrg *) 25183e72ca8cSmrg lock_old_archive_extraction=no ;; 25193e72ca8cSmrgesac 25203e72ca8cSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 25213e72ca8cSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 25223e72ca8cSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 25233e72ca8cSmrg [Commands used to build an old-style archive]) 25243e72ca8cSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 25253e72ca8cSmrg [Whether to use a lock for old archive extraction]) 25263e72ca8cSmrg])# _LT_CMD_OLD_ARCHIVE 2527ee3138f1Smrg 252834977a2fSmrg 25293e72ca8cSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 25303e72ca8cSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 25313e72ca8cSmrg# ---------------------------------------------------------------- 25323e72ca8cSmrg# Check whether the given compiler option works 25333e72ca8cSmrgAC_DEFUN([_LT_COMPILER_OPTION], 25343e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 25353e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 25363e72ca8cSmrgAC_CACHE_CHECK([$1], [$2], 25373e72ca8cSmrg [$2=no 25383e72ca8cSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 25393e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 25403e72ca8cSmrg lt_compiler_flag="$3" 25413e72ca8cSmrg # Insert the option either (1) after the last *FLAGS variable, or 25423e72ca8cSmrg # (2) before a word containing "conftest.", or (3) at the end. 25433e72ca8cSmrg # Note that $ac_compile itself does not contain backslashes and begins 25443e72ca8cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 25453e72ca8cSmrg # The option is referenced via a variable to avoid confusing sed. 25463e72ca8cSmrg lt_compile=`echo "$ac_compile" | $SED \ 25473e72ca8cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 25483e72ca8cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 25493e72ca8cSmrg -e 's:$: $lt_compiler_flag:'` 25503e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 25513e72ca8cSmrg (eval "$lt_compile" 2>conftest.err) 25523e72ca8cSmrg ac_status=$? 25533e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 25543e72ca8cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 25553e72ca8cSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 25563e72ca8cSmrg # The compiler can only warn and ignore the option if not recognized 25573e72ca8cSmrg # So say no if there are warnings other than the usual output. 25583e72ca8cSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 25593e72ca8cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 25603e72ca8cSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 25613e72ca8cSmrg $2=yes 25623e72ca8cSmrg fi 25633e72ca8cSmrg fi 25643e72ca8cSmrg $RM conftest* 25653e72ca8cSmrg]) 2566ee3138f1Smrg 25673e72ca8cSmrgif test x"[$]$2" = xyes; then 25683e72ca8cSmrg m4_if([$5], , :, [$5]) 25693e72ca8cSmrgelse 25703e72ca8cSmrg m4_if([$6], , :, [$6]) 25713e72ca8cSmrgfi 25723e72ca8cSmrg])# _LT_COMPILER_OPTION 2573ee3138f1Smrg 25743e72ca8cSmrg# Old name: 25753e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 25763e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 25773e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2578b425557eSmrg 2579ee3138f1Smrg 25803e72ca8cSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 25813e72ca8cSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 25823e72ca8cSmrg# ---------------------------------------------------- 25833e72ca8cSmrg# Check whether the given linker option works 25843e72ca8cSmrgAC_DEFUN([_LT_LINKER_OPTION], 25853e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 25863e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 25873e72ca8cSmrgAC_CACHE_CHECK([$1], [$2], 25883e72ca8cSmrg [$2=no 25893e72ca8cSmrg save_LDFLAGS="$LDFLAGS" 25903e72ca8cSmrg LDFLAGS="$LDFLAGS $3" 25913e72ca8cSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 25923e72ca8cSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 25933e72ca8cSmrg # The linker can only warn and ignore the option if not recognized 25943e72ca8cSmrg # So say no if there are warnings 25953e72ca8cSmrg if test -s conftest.err; then 25963e72ca8cSmrg # Append any errors to the config.log. 25973e72ca8cSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 25983e72ca8cSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 25993e72ca8cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26003e72ca8cSmrg if diff conftest.exp conftest.er2 >/dev/null; then 26013e72ca8cSmrg $2=yes 26023e72ca8cSmrg fi 26033e72ca8cSmrg else 26043e72ca8cSmrg $2=yes 26053e72ca8cSmrg fi 26063e72ca8cSmrg fi 26073e72ca8cSmrg $RM -r conftest* 26083e72ca8cSmrg LDFLAGS="$save_LDFLAGS" 26093e72ca8cSmrg]) 261034977a2fSmrg 26113e72ca8cSmrgif test x"[$]$2" = xyes; then 26123e72ca8cSmrg m4_if([$4], , :, [$4]) 26133e72ca8cSmrgelse 26143e72ca8cSmrg m4_if([$5], , :, [$5]) 26153e72ca8cSmrgfi 26163e72ca8cSmrg])# _LT_LINKER_OPTION 2617b425557eSmrg 26183e72ca8cSmrg# Old name: 26193e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 26203e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 26213e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 262234977a2fSmrg 262334977a2fSmrg 26243e72ca8cSmrg# LT_CMD_MAX_LEN 26253e72ca8cSmrg#--------------- 26263e72ca8cSmrgAC_DEFUN([LT_CMD_MAX_LEN], 26273e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 26283e72ca8cSmrg# find the maximum length of command line arguments 26293e72ca8cSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 26303e72ca8cSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 26313e72ca8cSmrg i=0 26323e72ca8cSmrg teststring="ABCD" 2633ee3138f1Smrg 26343e72ca8cSmrg case $build_os in 26353e72ca8cSmrg msdosdjgpp*) 26363e72ca8cSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 26373e72ca8cSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 26383e72ca8cSmrg # during glob expansion). Even if it were fixed, the result of this 26393e72ca8cSmrg # check would be larger than it should be. 26403e72ca8cSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 26413e72ca8cSmrg ;; 2642ee3138f1Smrg 26433e72ca8cSmrg gnu*) 26443e72ca8cSmrg # Under GNU Hurd, this test is not required because there is 26453e72ca8cSmrg # no limit to the length of command line arguments. 26463e72ca8cSmrg # Libtool will interpret -1 as no limit whatsoever 26473e72ca8cSmrg lt_cv_sys_max_cmd_len=-1; 26483e72ca8cSmrg ;; 2649ee3138f1Smrg 26503e72ca8cSmrg cygwin* | mingw* | cegcc*) 26513e72ca8cSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 26523e72ca8cSmrg # about 5 minutes as the teststring grows exponentially. 26533e72ca8cSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 26543e72ca8cSmrg # you end up with a "frozen" computer, even though with patience 26553e72ca8cSmrg # the test eventually succeeds (with a max line length of 256k). 26563e72ca8cSmrg # Instead, let's just punt: use the minimum linelength reported by 26573e72ca8cSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 26583e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 26593e72ca8cSmrg ;; 2660ee3138f1Smrg 26613e72ca8cSmrg mint*) 26623e72ca8cSmrg # On MiNT this can take a long time and run out of memory. 26633e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 26643e72ca8cSmrg ;; 2665ee3138f1Smrg 26663e72ca8cSmrg amigaos*) 26673e72ca8cSmrg # On AmigaOS with pdksh, this test takes hours, literally. 26683e72ca8cSmrg # So we just punt and use a minimum line length of 8192. 26693e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 26703e72ca8cSmrg ;; 2671ee3138f1Smrg 26723e72ca8cSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 26733e72ca8cSmrg # This has been around since 386BSD, at least. Likely further. 26743e72ca8cSmrg if test -x /sbin/sysctl; then 26753e72ca8cSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 26763e72ca8cSmrg elif test -x /usr/sbin/sysctl; then 26773e72ca8cSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 26783e72ca8cSmrg else 26793e72ca8cSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 26803e72ca8cSmrg fi 26813e72ca8cSmrg # And add a safety zone 26823e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 26833e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 26843e72ca8cSmrg ;; 2685b425557eSmrg 26863e72ca8cSmrg interix*) 26873e72ca8cSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 26883e72ca8cSmrg lt_cv_sys_max_cmd_len=196608 26893e72ca8cSmrg ;; 26903e72ca8cSmrg 26913e72ca8cSmrg os2*) 26923e72ca8cSmrg # The test takes a long time on OS/2. 26933e72ca8cSmrg lt_cv_sys_max_cmd_len=8192 26943e72ca8cSmrg ;; 26953e72ca8cSmrg 26963e72ca8cSmrg osf*) 26973e72ca8cSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 26983e72ca8cSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 26993e72ca8cSmrg # nice to cause kernel panics so lets avoid the loop below. 27003e72ca8cSmrg # First set a reasonable default. 27013e72ca8cSmrg lt_cv_sys_max_cmd_len=16384 27023e72ca8cSmrg # 27033e72ca8cSmrg if test -x /sbin/sysconfig; then 27043e72ca8cSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 27053e72ca8cSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 27063e72ca8cSmrg esac 27073e72ca8cSmrg fi 27083e72ca8cSmrg ;; 27093e72ca8cSmrg sco3.2v5*) 27103e72ca8cSmrg lt_cv_sys_max_cmd_len=102400 27113e72ca8cSmrg ;; 27123e72ca8cSmrg sysv5* | sco5v6* | sysv4.2uw2*) 27133e72ca8cSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 27143e72ca8cSmrg if test -n "$kargmax"; then 27153e72ca8cSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 27163e72ca8cSmrg else 27173e72ca8cSmrg lt_cv_sys_max_cmd_len=32768 27183e72ca8cSmrg fi 27193e72ca8cSmrg ;; 27203e72ca8cSmrg *) 27213e72ca8cSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 27223e72ca8cSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 27233e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27243e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27253e72ca8cSmrg else 27263e72ca8cSmrg # Make teststring a little bigger before we do anything with it. 27273e72ca8cSmrg # a 1K string should be a reasonable start. 27283e72ca8cSmrg for i in 1 2 3 4 5 6 7 8 ; do 27293e72ca8cSmrg teststring=$teststring$teststring 27303e72ca8cSmrg done 27313e72ca8cSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 27323e72ca8cSmrg # If test is not a shell built-in, we'll probably end up computing a 27333e72ca8cSmrg # maximum length that is only half of the actual maximum length, but 27343e72ca8cSmrg # we can't tell. 27353e72ca8cSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 27363e72ca8cSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 27373e72ca8cSmrg test $i != 17 # 1/2 MB should be enough 27383e72ca8cSmrg do 27393e72ca8cSmrg i=`expr $i + 1` 27403e72ca8cSmrg teststring=$teststring$teststring 27413e72ca8cSmrg done 27423e72ca8cSmrg # Only check the string length outside the loop. 27433e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 27443e72ca8cSmrg teststring= 27453e72ca8cSmrg # Add a significant safety factor because C++ compilers can tack on 27463e72ca8cSmrg # massive amounts of additional arguments before passing them to the 27473e72ca8cSmrg # linker. It appears as though 1/2 is a usable value. 27483e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 27493e72ca8cSmrg fi 27503e72ca8cSmrg ;; 2751b425557eSmrg esac 27523e72ca8cSmrg]) 27533e72ca8cSmrgif test -n $lt_cv_sys_max_cmd_len ; then 27543e72ca8cSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 27553e72ca8cSmrgelse 27563e72ca8cSmrg AC_MSG_RESULT(none) 27573e72ca8cSmrgfi 27583e72ca8cSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 27593e72ca8cSmrg_LT_DECL([], [max_cmd_len], [0], 27603e72ca8cSmrg [What is the maximum length of a command?]) 27613e72ca8cSmrg])# LT_CMD_MAX_LEN 2762ee3138f1Smrg 27633e72ca8cSmrg# Old name: 27643e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 27653e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 27663e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2767ee3138f1Smrg 2768ee3138f1Smrg 27693e72ca8cSmrg# _LT_HEADER_DLFCN 27703e72ca8cSmrg# ---------------- 27713e72ca8cSmrgm4_defun([_LT_HEADER_DLFCN], 27723e72ca8cSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 27733e72ca8cSmrg])# _LT_HEADER_DLFCN 2774ee3138f1Smrg 2775ee3138f1Smrg 27763e72ca8cSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 27773e72ca8cSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 27783e72ca8cSmrg# ---------------------------------------------------------------- 27793e72ca8cSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 27803e72ca8cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 27813e72ca8cSmrgif test "$cross_compiling" = yes; then : 27823e72ca8cSmrg [$4] 27833e72ca8cSmrgelse 27843e72ca8cSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 27853e72ca8cSmrg lt_status=$lt_dlunknown 27863e72ca8cSmrg cat > conftest.$ac_ext <<_LT_EOF 27873e72ca8cSmrg[#line $LINENO "configure" 27883e72ca8cSmrg#include "confdefs.h" 2789ee3138f1Smrg 27903e72ca8cSmrg#if HAVE_DLFCN_H 27913e72ca8cSmrg#include <dlfcn.h> 27923e72ca8cSmrg#endif 2793ee3138f1Smrg 27943e72ca8cSmrg#include <stdio.h> 2795ee3138f1Smrg 27963e72ca8cSmrg#ifdef RTLD_GLOBAL 27973e72ca8cSmrg# define LT_DLGLOBAL RTLD_GLOBAL 27983e72ca8cSmrg#else 27993e72ca8cSmrg# ifdef DL_GLOBAL 28003e72ca8cSmrg# define LT_DLGLOBAL DL_GLOBAL 28013e72ca8cSmrg# else 28023e72ca8cSmrg# define LT_DLGLOBAL 0 28033e72ca8cSmrg# endif 28043e72ca8cSmrg#endif 2805ee3138f1Smrg 28063e72ca8cSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 28073e72ca8cSmrg find out it does not work in some platform. */ 28083e72ca8cSmrg#ifndef LT_DLLAZY_OR_NOW 28093e72ca8cSmrg# ifdef RTLD_LAZY 28103e72ca8cSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 28113e72ca8cSmrg# else 28123e72ca8cSmrg# ifdef DL_LAZY 28133e72ca8cSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 28143e72ca8cSmrg# else 28153e72ca8cSmrg# ifdef RTLD_NOW 28163e72ca8cSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 28173e72ca8cSmrg# else 28183e72ca8cSmrg# ifdef DL_NOW 28193e72ca8cSmrg# define LT_DLLAZY_OR_NOW DL_NOW 28203e72ca8cSmrg# else 28213e72ca8cSmrg# define LT_DLLAZY_OR_NOW 0 28223e72ca8cSmrg# endif 28233e72ca8cSmrg# endif 28243e72ca8cSmrg# endif 28253e72ca8cSmrg# endif 28263e72ca8cSmrg#endif 2827ee3138f1Smrg 28283e72ca8cSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 28293e72ca8cSmrg correspondingly for the symbols needed. */ 28303e72ca8cSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 28313e72ca8cSmrgint fnord () __attribute__((visibility("default"))); 28323e72ca8cSmrg#endif 2833b425557eSmrg 28343e72ca8cSmrgint fnord () { return 42; } 28353e72ca8cSmrgint main () 28363e72ca8cSmrg{ 28373e72ca8cSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 28383e72ca8cSmrg int status = $lt_dlunknown; 2839b425557eSmrg 28403e72ca8cSmrg if (self) 28413e72ca8cSmrg { 28423e72ca8cSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 28433e72ca8cSmrg else 28443e72ca8cSmrg { 28453e72ca8cSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 28463e72ca8cSmrg else puts (dlerror ()); 28473e72ca8cSmrg } 28483e72ca8cSmrg /* dlclose (self); */ 28493e72ca8cSmrg } 2850a1ed278cSmrg else 28513e72ca8cSmrg puts (dlerror ()); 28523e72ca8cSmrg 28533e72ca8cSmrg return status; 28543e72ca8cSmrg}] 28553e72ca8cSmrg_LT_EOF 28563e72ca8cSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 28573e72ca8cSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 28583e72ca8cSmrg lt_status=$? 28593e72ca8cSmrg case x$lt_status in 28603e72ca8cSmrg x$lt_dlno_uscore) $1 ;; 28613e72ca8cSmrg x$lt_dlneed_uscore) $2 ;; 28623e72ca8cSmrg x$lt_dlunknown|x*) $3 ;; 28633e72ca8cSmrg esac 28643e72ca8cSmrg else : 28653e72ca8cSmrg # compilation failed 28663e72ca8cSmrg $3 2867a1ed278cSmrg fi 2868a1ed278cSmrgfi 28693e72ca8cSmrgrm -fr conftest* 28703e72ca8cSmrg])# _LT_TRY_DLOPEN_SELF 2871b425557eSmrg 2872b425557eSmrg 28733e72ca8cSmrg# LT_SYS_DLOPEN_SELF 28743e72ca8cSmrg# ------------------ 28753e72ca8cSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 28763e72ca8cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 28773e72ca8cSmrgif test "x$enable_dlopen" != xyes; then 28783e72ca8cSmrg enable_dlopen=unknown 28793e72ca8cSmrg enable_dlopen_self=unknown 28803e72ca8cSmrg enable_dlopen_self_static=unknown 28813e72ca8cSmrgelse 28823e72ca8cSmrg lt_cv_dlopen=no 28833e72ca8cSmrg lt_cv_dlopen_libs= 2884b425557eSmrg 28853e72ca8cSmrg case $host_os in 28863e72ca8cSmrg beos*) 28873e72ca8cSmrg lt_cv_dlopen="load_add_on" 28883e72ca8cSmrg lt_cv_dlopen_libs= 28893e72ca8cSmrg lt_cv_dlopen_self=yes 28903e72ca8cSmrg ;; 2891b425557eSmrg 28923e72ca8cSmrg mingw* | pw32* | cegcc*) 28933e72ca8cSmrg lt_cv_dlopen="LoadLibrary" 28943e72ca8cSmrg lt_cv_dlopen_libs= 28953e72ca8cSmrg ;; 28963e72ca8cSmrg 28973e72ca8cSmrg cygwin*) 28983e72ca8cSmrg lt_cv_dlopen="dlopen" 28993e72ca8cSmrg lt_cv_dlopen_libs= 29003e72ca8cSmrg ;; 29013e72ca8cSmrg 29023e72ca8cSmrg darwin*) 29033e72ca8cSmrg # if libdl is installed we need to link against it 29043e72ca8cSmrg AC_CHECK_LIB([dl], [dlopen], 29053e72ca8cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 29063e72ca8cSmrg lt_cv_dlopen="dyld" 29073e72ca8cSmrg lt_cv_dlopen_libs= 29083e72ca8cSmrg lt_cv_dlopen_self=yes 29093e72ca8cSmrg ]) 2910a1ed278cSmrg ;; 29113e72ca8cSmrg 2912a1ed278cSmrg *) 29133e72ca8cSmrg AC_CHECK_FUNC([shl_load], 29143e72ca8cSmrg [lt_cv_dlopen="shl_load"], 29153e72ca8cSmrg [AC_CHECK_LIB([dld], [shl_load], 29163e72ca8cSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 29173e72ca8cSmrg [AC_CHECK_FUNC([dlopen], 29183e72ca8cSmrg [lt_cv_dlopen="dlopen"], 29193e72ca8cSmrg [AC_CHECK_LIB([dl], [dlopen], 29203e72ca8cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 29213e72ca8cSmrg [AC_CHECK_LIB([svld], [dlopen], 29223e72ca8cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 29233e72ca8cSmrg [AC_CHECK_LIB([dld], [dld_link], 29243e72ca8cSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 29253e72ca8cSmrg ]) 29263e72ca8cSmrg ]) 29273e72ca8cSmrg ]) 29283e72ca8cSmrg ]) 29293e72ca8cSmrg ]) 2930b425557eSmrg ;; 2931b425557eSmrg esac 2932ee3138f1Smrg 29333e72ca8cSmrg if test "x$lt_cv_dlopen" != xno; then 29343e72ca8cSmrg enable_dlopen=yes 29353e72ca8cSmrg else 29363e72ca8cSmrg enable_dlopen=no 29373e72ca8cSmrg fi 2938ee3138f1Smrg 29393e72ca8cSmrg case $lt_cv_dlopen in 29403e72ca8cSmrg dlopen) 29413e72ca8cSmrg save_CPPFLAGS="$CPPFLAGS" 29423e72ca8cSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2943ee3138f1Smrg 29443e72ca8cSmrg save_LDFLAGS="$LDFLAGS" 29453e72ca8cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2946ee3138f1Smrg 29473e72ca8cSmrg save_LIBS="$LIBS" 29483e72ca8cSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2949ee3138f1Smrg 29503e72ca8cSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 29513e72ca8cSmrg lt_cv_dlopen_self, [dnl 29523e72ca8cSmrg _LT_TRY_DLOPEN_SELF( 29533e72ca8cSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 29543e72ca8cSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 29553e72ca8cSmrg ]) 2956b425557eSmrg 29573e72ca8cSmrg if test "x$lt_cv_dlopen_self" = xyes; then 29583e72ca8cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 29593e72ca8cSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 29603e72ca8cSmrg lt_cv_dlopen_self_static, [dnl 29613e72ca8cSmrg _LT_TRY_DLOPEN_SELF( 29623e72ca8cSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 29633e72ca8cSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 29643e72ca8cSmrg ]) 2965a1ed278cSmrg fi 29663e72ca8cSmrg 29673e72ca8cSmrg CPPFLAGS="$save_CPPFLAGS" 29683e72ca8cSmrg LDFLAGS="$save_LDFLAGS" 29693e72ca8cSmrg LIBS="$save_LIBS" 2970a1ed278cSmrg ;; 29713e72ca8cSmrg esac 2972b425557eSmrg 29733e72ca8cSmrg case $lt_cv_dlopen_self in 29743e72ca8cSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 29753e72ca8cSmrg *) enable_dlopen_self=unknown ;; 29763e72ca8cSmrg esac 2977b425557eSmrg 29783e72ca8cSmrg case $lt_cv_dlopen_self_static in 29793e72ca8cSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 29803e72ca8cSmrg *) enable_dlopen_self_static=unknown ;; 29813e72ca8cSmrg esac 29823e72ca8cSmrgfi 29833e72ca8cSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 29843e72ca8cSmrg [Whether dlopen is supported]) 29853e72ca8cSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 29863e72ca8cSmrg [Whether dlopen of programs is supported]) 29873e72ca8cSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 29883e72ca8cSmrg [Whether dlopen of statically linked programs is supported]) 29893e72ca8cSmrg])# LT_SYS_DLOPEN_SELF 2990b425557eSmrg 29913e72ca8cSmrg# Old name: 29923e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 29933e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 29943e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2995b425557eSmrg 2996b425557eSmrg 29973e72ca8cSmrg# _LT_COMPILER_C_O([TAGNAME]) 29983e72ca8cSmrg# --------------------------- 29993e72ca8cSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 30003e72ca8cSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 30013e72ca8cSmrgm4_defun([_LT_COMPILER_C_O], 30023e72ca8cSmrg[m4_require([_LT_DECL_SED])dnl 30033e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 30043e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 30053e72ca8cSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 30063e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 30073e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 30083e72ca8cSmrg $RM -r conftest 2>/dev/null 30093e72ca8cSmrg mkdir conftest 30103e72ca8cSmrg cd conftest 30113e72ca8cSmrg mkdir out 30123e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3013a1ed278cSmrg 30143e72ca8cSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 30153e72ca8cSmrg # Insert the option either (1) after the last *FLAGS variable, or 30163e72ca8cSmrg # (2) before a word containing "conftest.", or (3) at the end. 30173e72ca8cSmrg # Note that $ac_compile itself does not contain backslashes and begins 30183e72ca8cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 30193e72ca8cSmrg lt_compile=`echo "$ac_compile" | $SED \ 30203e72ca8cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 30213e72ca8cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 30223e72ca8cSmrg -e 's:$: $lt_compiler_flag:'` 30233e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 30243e72ca8cSmrg (eval "$lt_compile" 2>out/conftest.err) 30253e72ca8cSmrg ac_status=$? 30263e72ca8cSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 30273e72ca8cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 30283e72ca8cSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 30293e72ca8cSmrg then 30303e72ca8cSmrg # The compiler can only warn and ignore the option if not recognized 30313e72ca8cSmrg # So say no if there are warnings 30323e72ca8cSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 30333e72ca8cSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 30343e72ca8cSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 30353e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 30363e72ca8cSmrg fi 30373e72ca8cSmrg fi 30383e72ca8cSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 30393e72ca8cSmrg $RM conftest* 30403e72ca8cSmrg # SGI C++ compiler will create directory out/ii_files/ for 30413e72ca8cSmrg # template instantiation 30423e72ca8cSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 30433e72ca8cSmrg $RM out/* && rmdir out 30443e72ca8cSmrg cd .. 30453e72ca8cSmrg $RM -r conftest 30463e72ca8cSmrg $RM conftest* 30473e72ca8cSmrg]) 30483e72ca8cSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 30493e72ca8cSmrg [Does compiler simultaneously support -c and -o options?]) 30503e72ca8cSmrg])# _LT_COMPILER_C_O 3051a1ed278cSmrg 30523e72ca8cSmrg 30533e72ca8cSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 30543e72ca8cSmrg# ---------------------------------- 30553e72ca8cSmrg# Check to see if we can do hard links to lock some files if needed 30563e72ca8cSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 30573e72ca8cSmrg[m4_require([_LT_ENABLE_LOCK])dnl 30583e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 30593e72ca8cSmrg_LT_COMPILER_C_O([$1]) 30603e72ca8cSmrg 30613e72ca8cSmrghard_links="nottested" 30623e72ca8cSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 30633e72ca8cSmrg # do not overwrite the value of need_locks provided by the user 30643e72ca8cSmrg AC_MSG_CHECKING([if we can lock with hard links]) 30653e72ca8cSmrg hard_links=yes 30663e72ca8cSmrg $RM conftest* 30673e72ca8cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 30683e72ca8cSmrg touch conftest.a 30693e72ca8cSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 30703e72ca8cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 30713e72ca8cSmrg AC_MSG_RESULT([$hard_links]) 30723e72ca8cSmrg if test "$hard_links" = no; then 30733e72ca8cSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 30743e72ca8cSmrg need_locks=warn 3075b425557eSmrg fi 30763e72ca8cSmrgelse 30773e72ca8cSmrg need_locks=no 30783e72ca8cSmrgfi 30793e72ca8cSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 30803e72ca8cSmrg])# _LT_COMPILER_FILE_LOCKS 3081b425557eSmrg 3082a1ed278cSmrg 30833e72ca8cSmrg# _LT_CHECK_OBJDIR 30843e72ca8cSmrg# ---------------- 30853e72ca8cSmrgm4_defun([_LT_CHECK_OBJDIR], 30863e72ca8cSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 30873e72ca8cSmrg[rm -f .libs 2>/dev/null 30883e72ca8cSmrgmkdir .libs 2>/dev/null 30893e72ca8cSmrgif test -d .libs; then 30903e72ca8cSmrg lt_cv_objdir=.libs 30913e72ca8cSmrgelse 30923e72ca8cSmrg # MS-DOS does not allow filenames that begin with a dot. 30933e72ca8cSmrg lt_cv_objdir=_libs 30943e72ca8cSmrgfi 30953e72ca8cSmrgrmdir .libs 2>/dev/null]) 30963e72ca8cSmrgobjdir=$lt_cv_objdir 30973e72ca8cSmrg_LT_DECL([], [objdir], [0], 30983e72ca8cSmrg [The name of the directory that contains temporary libtool files])dnl 30993e72ca8cSmrgm4_pattern_allow([LT_OBJDIR])dnl 31003e72ca8cSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 31013e72ca8cSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 31023e72ca8cSmrg])# _LT_CHECK_OBJDIR 3103a1ed278cSmrg 31043e72ca8cSmrg 31053e72ca8cSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 31063e72ca8cSmrg# -------------------------------------- 31073e72ca8cSmrg# Check hardcoding attributes. 31083e72ca8cSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 31093e72ca8cSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 31103e72ca8cSmrg_LT_TAGVAR(hardcode_action, $1)= 31113e72ca8cSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 31123e72ca8cSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 31133e72ca8cSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 31143e72ca8cSmrg 31153e72ca8cSmrg # We can hardcode non-existent directories. 31163e72ca8cSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 31173e72ca8cSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 31183e72ca8cSmrg # have to relink, otherwise we might link with an installed library 31193e72ca8cSmrg # when we should be linking with a yet-to-be-installed one 31203e72ca8cSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 31213e72ca8cSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 31223e72ca8cSmrg # Linking always hardcodes the temporary library directory. 31233e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=relink 3124a1ed278cSmrg else 31253e72ca8cSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 31263e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 312734977a2fSmrg fi 31283e72ca8cSmrgelse 31293e72ca8cSmrg # We cannot hardcode anything, or else we can only hardcode existing 31303e72ca8cSmrg # directories. 31313e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 31323e72ca8cSmrgfi 31333e72ca8cSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 313434977a2fSmrg 31353e72ca8cSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 31363e72ca8cSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 31373e72ca8cSmrg # Fast installation is not supported 31383e72ca8cSmrg enable_fast_install=no 31393e72ca8cSmrgelif test "$shlibpath_overrides_runpath" = yes || 31403e72ca8cSmrg test "$enable_shared" = no; then 31413e72ca8cSmrg # Fast installation is not necessary 31423e72ca8cSmrg enable_fast_install=needless 31433e72ca8cSmrgfi 31443e72ca8cSmrg_LT_TAGDECL([], [hardcode_action], [0], 31453e72ca8cSmrg [How to hardcode a shared library path into an executable]) 31463e72ca8cSmrg])# _LT_LINKER_HARDCODE_LIBPATH 314734977a2fSmrg 314834977a2fSmrg 31493e72ca8cSmrg# _LT_CMD_STRIPLIB 31503e72ca8cSmrg# ---------------- 31513e72ca8cSmrgm4_defun([_LT_CMD_STRIPLIB], 31523e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 31533e72ca8cSmrgstriplib= 31543e72ca8cSmrgold_striplib= 31553e72ca8cSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 31563e72ca8cSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 31573e72ca8cSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 31583e72ca8cSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 31593e72ca8cSmrg AC_MSG_RESULT([yes]) 31603e72ca8cSmrgelse 31613e72ca8cSmrg# FIXME - insert some real tests, host_os isn't really good enough 31623e72ca8cSmrg case $host_os in 31633e72ca8cSmrg darwin*) 31643e72ca8cSmrg if test -n "$STRIP" ; then 31653e72ca8cSmrg striplib="$STRIP -x" 31663e72ca8cSmrg old_striplib="$STRIP -S" 31673e72ca8cSmrg AC_MSG_RESULT([yes]) 31683e72ca8cSmrg else 31693e72ca8cSmrg AC_MSG_RESULT([no]) 31703e72ca8cSmrg fi 3171b425557eSmrg ;; 3172b425557eSmrg *) 31733e72ca8cSmrg AC_MSG_RESULT([no]) 3174b425557eSmrg ;; 3175b425557eSmrg esac 31763e72ca8cSmrgfi 31773e72ca8cSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 31783e72ca8cSmrg_LT_DECL([], [striplib], [1]) 31793e72ca8cSmrg])# _LT_CMD_STRIPLIB 318034977a2fSmrg 3181ee3138f1Smrg 31823e72ca8cSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 31833e72ca8cSmrg# ----------------------------- 31843e72ca8cSmrg# PORTME Fill in your ld.so characteristics 31853e72ca8cSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 31863e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 31873e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 31883e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31893e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP])dnl 31903e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 31913e72ca8cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 31923e72ca8cSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 31933e72ca8cSmrgm4_if([$1], 31943e72ca8cSmrg [], [ 31953e72ca8cSmrgif test "$GCC" = yes; then 31963e72ca8cSmrg case $host_os in 31973e72ca8cSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 31983e72ca8cSmrg *) lt_awk_arg="/^libraries:/" ;; 3199a1ed278cSmrg esac 32003e72ca8cSmrg case $host_os in 32013e72ca8cSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 32023e72ca8cSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 32033e72ca8cSmrg esac 32043e72ca8cSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 32053e72ca8cSmrg case $lt_search_path_spec in 32063e72ca8cSmrg *\;*) 32073e72ca8cSmrg # if the path contains ";" then we assume it to be the separator 32083e72ca8cSmrg # otherwise default to the standard path separator (i.e. ":") - it is 32093e72ca8cSmrg # assumed that no part of a normal pathname contains ";" but that should 32103e72ca8cSmrg # okay in the real world where ";" in dirpaths is itself problematic. 32113e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 32123e72ca8cSmrg ;; 32133e72ca8cSmrg *) 32143e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 32153e72ca8cSmrg ;; 32163e72ca8cSmrg esac 32173e72ca8cSmrg # Ok, now we have the path, separated by spaces, we can step through it 32183e72ca8cSmrg # and add multilib dir if necessary. 32193e72ca8cSmrg lt_tmp_lt_search_path_spec= 32203e72ca8cSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 32213e72ca8cSmrg for lt_sys_path in $lt_search_path_spec; do 32223e72ca8cSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 32233e72ca8cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 32243e72ca8cSmrg else 32253e72ca8cSmrg test -d "$lt_sys_path" && \ 32263e72ca8cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 32273e72ca8cSmrg fi 32283e72ca8cSmrg done 32293e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 32303e72ca8cSmrgBEGIN {RS=" "; FS="/|\n";} { 32313e72ca8cSmrg lt_foo=""; 32323e72ca8cSmrg lt_count=0; 32333e72ca8cSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 32343e72ca8cSmrg if ($lt_i != "" && $lt_i != ".") { 32353e72ca8cSmrg if ($lt_i == "..") { 32363e72ca8cSmrg lt_count++; 32373e72ca8cSmrg } else { 32383e72ca8cSmrg if (lt_count == 0) { 32393e72ca8cSmrg lt_foo="/" $lt_i lt_foo; 32403e72ca8cSmrg } else { 32413e72ca8cSmrg lt_count--; 32423e72ca8cSmrg } 32433e72ca8cSmrg } 32443e72ca8cSmrg } 32453e72ca8cSmrg } 32463e72ca8cSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 32473e72ca8cSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 32483e72ca8cSmrg}'` 32493e72ca8cSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 32503e72ca8cSmrg # for these hosts. 32513e72ca8cSmrg case $host_os in 32523e72ca8cSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 32533e72ca8cSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 32543e72ca8cSmrg esac 32553e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 32563e72ca8cSmrgelse 32573e72ca8cSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 32583e72ca8cSmrgfi]) 32593e72ca8cSmrglibrary_names_spec= 32603e72ca8cSmrglibname_spec='lib$name' 32613e72ca8cSmrgsoname_spec= 32623e72ca8cSmrgshrext_cmds=".so" 32633e72ca8cSmrgpostinstall_cmds= 32643e72ca8cSmrgpostuninstall_cmds= 32653e72ca8cSmrgfinish_cmds= 32663e72ca8cSmrgfinish_eval= 32673e72ca8cSmrgshlibpath_var= 32683e72ca8cSmrgshlibpath_overrides_runpath=unknown 32693e72ca8cSmrgversion_type=none 32703e72ca8cSmrgdynamic_linker="$host_os ld.so" 32713e72ca8cSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 32723e72ca8cSmrgneed_lib_prefix=unknown 32733e72ca8cSmrghardcode_into_libs=no 3274ee3138f1Smrg 32753e72ca8cSmrg# when you set need_version to no, make sure it does not cause -set_version 32763e72ca8cSmrg# flags to be left without arguments 32773e72ca8cSmrgneed_version=unknown 3278ee3138f1Smrg 32793e72ca8cSmrgcase $host_os in 32803e72ca8cSmrgaix3*) 32813e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 32823e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 32833e72ca8cSmrg shlibpath_var=LIBPATH 3284ee3138f1Smrg 32853e72ca8cSmrg # AIX 3 has no versioning support, so we append a major version to the name. 32863e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 3287a1ed278cSmrg ;; 3288ee3138f1Smrg 32893e72ca8cSmrgaix[[4-9]]*) 32903e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 32913e72ca8cSmrg need_lib_prefix=no 32923e72ca8cSmrg need_version=no 32933e72ca8cSmrg hardcode_into_libs=yes 32943e72ca8cSmrg if test "$host_cpu" = ia64; then 32953e72ca8cSmrg # AIX 5 supports IA64 32963e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 32973e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 3298a1ed278cSmrg else 32993e72ca8cSmrg # With GCC up to 2.95.x, collect2 would create an import file 33003e72ca8cSmrg # for dependence libraries. The import file would start with 33013e72ca8cSmrg # the line `#! .'. This would cause the generated library to 33023e72ca8cSmrg # depend on `.', always an invalid library. This was fixed in 33033e72ca8cSmrg # development snapshots of GCC prior to 3.0. 33043e72ca8cSmrg case $host_os in 33053e72ca8cSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 33063e72ca8cSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 33073e72ca8cSmrg echo ' yes ' 33083e72ca8cSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 33093e72ca8cSmrg : 33103e72ca8cSmrg else 33113e72ca8cSmrg can_build_shared=no 33123e72ca8cSmrg fi 33133e72ca8cSmrg ;; 33143e72ca8cSmrg esac 33153e72ca8cSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 33163e72ca8cSmrg # soname into executable. Probably we can add versioning support to 33173e72ca8cSmrg # collect2, so additional links can be useful in future. 33183e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 33193e72ca8cSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 33203e72ca8cSmrg # instead of lib<name>.a to let people know that these are not 33213e72ca8cSmrg # typical AIX shared libraries. 33223e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33233e72ca8cSmrg else 33243e72ca8cSmrg # We preserve .a as extension for shared libraries through AIX4.2 33253e72ca8cSmrg # and later when we are not doing run time linking. 33263e72ca8cSmrg library_names_spec='${libname}${release}.a $libname.a' 33273e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 33283e72ca8cSmrg fi 33293e72ca8cSmrg shlibpath_var=LIBPATH 3330a1ed278cSmrg fi 3331a1ed278cSmrg ;; 3332ee3138f1Smrg 33333e72ca8cSmrgamigaos*) 33343e72ca8cSmrg case $host_cpu in 33353e72ca8cSmrg powerpc) 33363e72ca8cSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 33373e72ca8cSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 33383e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33393e72ca8cSmrg ;; 33403e72ca8cSmrg m68k) 33413e72ca8cSmrg library_names_spec='$libname.ixlibrary $libname.a' 33423e72ca8cSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 33433e72ca8cSmrg 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' 33443e72ca8cSmrg ;; 33453e72ca8cSmrg esac 3346a1ed278cSmrg ;; 3347ee3138f1Smrg 33483e72ca8cSmrgbeos*) 33493e72ca8cSmrg library_names_spec='${libname}${shared_ext}' 33503e72ca8cSmrg dynamic_linker="$host_os ld.so" 33513e72ca8cSmrg shlibpath_var=LIBRARY_PATH 3352a1ed278cSmrg ;; 3353ee3138f1Smrg 33543e72ca8cSmrgbsdi[[45]]*) 33553e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 33563e72ca8cSmrg need_version=no 33573e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33583e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 33593e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 33603e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 33613e72ca8cSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 33623e72ca8cSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 33633e72ca8cSmrg # the default ld.so.conf also contains /usr/contrib/lib and 33643e72ca8cSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 33653e72ca8cSmrg # libtool to hard-code these into programs 3366a1ed278cSmrg ;; 3367ee3138f1Smrg 33683e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 33693e72ca8cSmrg version_type=windows 33703e72ca8cSmrg shrext_cmds=".dll" 33713e72ca8cSmrg need_version=no 33723e72ca8cSmrg need_lib_prefix=no 3373ee3138f1Smrg 33743e72ca8cSmrg case $GCC,$cc_basename in 33753e72ca8cSmrg yes,*) 33763e72ca8cSmrg # gcc 33773e72ca8cSmrg library_names_spec='$libname.dll.a' 33783e72ca8cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 33793e72ca8cSmrg postinstall_cmds='base_file=`basename \${file}`~ 33803e72ca8cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 33813e72ca8cSmrg dldir=$destdir/`dirname \$dlpath`~ 33823e72ca8cSmrg test -d \$dldir || mkdir -p \$dldir~ 33833e72ca8cSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 33843e72ca8cSmrg chmod a+x \$dldir/$dlname~ 33853e72ca8cSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 33863e72ca8cSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 33873e72ca8cSmrg fi' 33883e72ca8cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 33893e72ca8cSmrg dlpath=$dir/\$dldll~ 33903e72ca8cSmrg $RM \$dlpath' 33913e72ca8cSmrg shlibpath_overrides_runpath=yes 33923e72ca8cSmrg 33933e72ca8cSmrg case $host_os in 33943e72ca8cSmrg cygwin*) 33953e72ca8cSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 33963e72ca8cSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 33973e72ca8cSmrgm4_if([$1], [],[ 33983e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 33993e72ca8cSmrg ;; 34003e72ca8cSmrg mingw* | cegcc*) 34013e72ca8cSmrg # MinGW DLLs use traditional 'lib' prefix 34023e72ca8cSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34033e72ca8cSmrg ;; 34043e72ca8cSmrg pw32*) 34053e72ca8cSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 34063e72ca8cSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34073e72ca8cSmrg ;; 34083e72ca8cSmrg esac 34093e72ca8cSmrg dynamic_linker='Win32 ld.exe' 3410b425557eSmrg ;; 34113e72ca8cSmrg 34123e72ca8cSmrg *,cl*) 34133e72ca8cSmrg # Native MSVC 34143e72ca8cSmrg libname_spec='$name' 34153e72ca8cSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34163e72ca8cSmrg library_names_spec='${libname}.dll.lib' 34173e72ca8cSmrg 34183e72ca8cSmrg case $build_os in 34193e72ca8cSmrg mingw*) 34203e72ca8cSmrg sys_lib_search_path_spec= 34213e72ca8cSmrg lt_save_ifs=$IFS 34223e72ca8cSmrg IFS=';' 34233e72ca8cSmrg for lt_path in $LIB 34243e72ca8cSmrg do 34253e72ca8cSmrg IFS=$lt_save_ifs 34263e72ca8cSmrg # Let DOS variable expansion print the short 8.3 style file name. 34273e72ca8cSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 34283e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 34293e72ca8cSmrg done 34303e72ca8cSmrg IFS=$lt_save_ifs 34313e72ca8cSmrg # Convert to MSYS style. 34323e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 34333e72ca8cSmrg ;; 34343e72ca8cSmrg cygwin*) 34353e72ca8cSmrg # Convert to unix form, then to dos form, then back to unix form 34363e72ca8cSmrg # but this time dos style (no spaces!) so that the unix form looks 34373e72ca8cSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 34383e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 34393e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 34403e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 34413e72ca8cSmrg ;; 34423e72ca8cSmrg *) 34433e72ca8cSmrg sys_lib_search_path_spec="$LIB" 34443e72ca8cSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 34453e72ca8cSmrg # It is most probably a Windows format PATH. 34463e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 34473e72ca8cSmrg else 34483e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 34493e72ca8cSmrg fi 34503e72ca8cSmrg # FIXME: find the short name or the path components, as spaces are 34513e72ca8cSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 34523e72ca8cSmrg ;; 34533e72ca8cSmrg esac 34543e72ca8cSmrg 34553e72ca8cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 34563e72ca8cSmrg postinstall_cmds='base_file=`basename \${file}`~ 34573e72ca8cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 34583e72ca8cSmrg dldir=$destdir/`dirname \$dlpath`~ 34593e72ca8cSmrg test -d \$dldir || mkdir -p \$dldir~ 34603e72ca8cSmrg $install_prog $dir/$dlname \$dldir/$dlname' 34613e72ca8cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 34623e72ca8cSmrg dlpath=$dir/\$dldll~ 34633e72ca8cSmrg $RM \$dlpath' 34643e72ca8cSmrg shlibpath_overrides_runpath=yes 34653e72ca8cSmrg dynamic_linker='Win32 link.exe' 3466b425557eSmrg ;; 34673e72ca8cSmrg 34683e72ca8cSmrg *) 34693e72ca8cSmrg # Assume MSVC wrapper 34703e72ca8cSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 34713e72ca8cSmrg dynamic_linker='Win32 ld.exe' 347234977a2fSmrg ;; 3473ee3138f1Smrg esac 34743e72ca8cSmrg # FIXME: first we should search . and the directory the executable is in 34753e72ca8cSmrg shlibpath_var=PATH 3476a1ed278cSmrg ;; 3477ee3138f1Smrg 34783e72ca8cSmrgdarwin* | rhapsody*) 34793e72ca8cSmrg dynamic_linker="$host_os dyld" 34803e72ca8cSmrg version_type=darwin 34813e72ca8cSmrg need_lib_prefix=no 34823e72ca8cSmrg need_version=no 34833e72ca8cSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 34843e72ca8cSmrg soname_spec='${libname}${release}${major}$shared_ext' 34853e72ca8cSmrg shlibpath_overrides_runpath=yes 34863e72ca8cSmrg shlibpath_var=DYLD_LIBRARY_PATH 34873e72ca8cSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 34883e72ca8cSmrgm4_if([$1], [],[ 34893e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 34903e72ca8cSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3491a1ed278cSmrg ;; 3492ee3138f1Smrg 34933e72ca8cSmrgdgux*) 34943e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 34953e72ca8cSmrg need_lib_prefix=no 34963e72ca8cSmrg need_version=no 34973e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 34983e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 34993e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 35003e72ca8cSmrg ;; 3501ee3138f1Smrg 35023e72ca8cSmrgfreebsd* | dragonfly*) 35033e72ca8cSmrg # DragonFly does not have aout. When/if they implement a new 35043e72ca8cSmrg # versioning mechanism, adjust this. 35053e72ca8cSmrg if test -x /usr/bin/objformat; then 35063e72ca8cSmrg objformat=`/usr/bin/objformat` 3507a1ed278cSmrg else 35083e72ca8cSmrg case $host_os in 35093e72ca8cSmrg freebsd[[23]].*) objformat=aout ;; 35103e72ca8cSmrg *) objformat=elf ;; 3511a1ed278cSmrg esac 3512a1ed278cSmrg fi 35133e72ca8cSmrg version_type=freebsd-$objformat 35143e72ca8cSmrg case $version_type in 35153e72ca8cSmrg freebsd-elf*) 35163e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 35173e72ca8cSmrg need_version=no 35183e72ca8cSmrg need_lib_prefix=no 35193e72ca8cSmrg ;; 35203e72ca8cSmrg freebsd-*) 35213e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 35223e72ca8cSmrg need_version=yes 35233e72ca8cSmrg ;; 35243e72ca8cSmrg esac 35253e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 35263e72ca8cSmrg case $host_os in 35273e72ca8cSmrg freebsd2.*) 35283e72ca8cSmrg shlibpath_overrides_runpath=yes 35293e72ca8cSmrg ;; 35303e72ca8cSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 35313e72ca8cSmrg shlibpath_overrides_runpath=yes 35323e72ca8cSmrg hardcode_into_libs=yes 35333e72ca8cSmrg ;; 35343e72ca8cSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 35353e72ca8cSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 35363e72ca8cSmrg shlibpath_overrides_runpath=no 35373e72ca8cSmrg hardcode_into_libs=yes 35383e72ca8cSmrg ;; 35393e72ca8cSmrg *) # from 4.6 on, and DragonFly 35403e72ca8cSmrg shlibpath_overrides_runpath=yes 35413e72ca8cSmrg hardcode_into_libs=yes 35423e72ca8cSmrg ;; 3543a1ed278cSmrg esac 35443e72ca8cSmrg ;; 3545ee3138f1Smrg 35463e72ca8cSmrggnu*) 35473e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 35483e72ca8cSmrg need_lib_prefix=no 35493e72ca8cSmrg need_version=no 35503e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 35513e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 35523e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 35533e72ca8cSmrg shlibpath_overrides_runpath=no 35543e72ca8cSmrg hardcode_into_libs=yes 35553e72ca8cSmrg ;; 3556ee3138f1Smrg 35573e72ca8cSmrghaiku*) 35583e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 35593e72ca8cSmrg need_lib_prefix=no 35603e72ca8cSmrg need_version=no 35613e72ca8cSmrg dynamic_linker="$host_os runtime_loader" 35623e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 35633e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 35643e72ca8cSmrg shlibpath_var=LIBRARY_PATH 35653e72ca8cSmrg shlibpath_overrides_runpath=yes 35663e72ca8cSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 35673e72ca8cSmrg hardcode_into_libs=yes 35683e72ca8cSmrg ;; 3569ee3138f1Smrg 35703e72ca8cSmrghpux9* | hpux10* | hpux11*) 35713e72ca8cSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 35723e72ca8cSmrg # link against other versions. 35733e72ca8cSmrg version_type=sunos 35743e72ca8cSmrg need_lib_prefix=no 35753e72ca8cSmrg need_version=no 35763e72ca8cSmrg case $host_cpu in 35773e72ca8cSmrg ia64*) 35783e72ca8cSmrg shrext_cmds='.so' 35793e72ca8cSmrg hardcode_into_libs=yes 35803e72ca8cSmrg dynamic_linker="$host_os dld.so" 35813e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 35823e72ca8cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 35833e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35843e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 35853e72ca8cSmrg if test "X$HPUX_IA64_MODE" = X32; then 35863e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 35873e72ca8cSmrg else 35883e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 35893e72ca8cSmrg fi 35903e72ca8cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 35913e72ca8cSmrg ;; 35923e72ca8cSmrg hppa*64*) 35933e72ca8cSmrg shrext_cmds='.sl' 35943e72ca8cSmrg hardcode_into_libs=yes 35953e72ca8cSmrg dynamic_linker="$host_os dld.sl" 35963e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 35973e72ca8cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 35983e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35993e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 36003e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 36013e72ca8cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 36023e72ca8cSmrg ;; 36033e72ca8cSmrg *) 36043e72ca8cSmrg shrext_cmds='.sl' 36053e72ca8cSmrg dynamic_linker="$host_os dld.sl" 36063e72ca8cSmrg shlibpath_var=SHLIB_PATH 36073e72ca8cSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 36083e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36093e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 36103e72ca8cSmrg ;; 36113e72ca8cSmrg esac 36123e72ca8cSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 36133e72ca8cSmrg postinstall_cmds='chmod 555 $lib' 36143e72ca8cSmrg # or fails outright, so override atomically: 36153e72ca8cSmrg install_override_mode=555 3616a1ed278cSmrg ;; 36173e72ca8cSmrg 36183e72ca8cSmrginterix[[3-9]]*) 36193e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 36203e72ca8cSmrg need_lib_prefix=no 36213e72ca8cSmrg need_version=no 36223e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 36233e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 36243e72ca8cSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 36253e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 36263e72ca8cSmrg shlibpath_overrides_runpath=no 36273e72ca8cSmrg hardcode_into_libs=yes 3628a1ed278cSmrg ;; 36293e72ca8cSmrg 36303e72ca8cSmrgirix5* | irix6* | nonstopux*) 36313e72ca8cSmrg case $host_os in 36323e72ca8cSmrg nonstopux*) version_type=nonstopux ;; 36333e72ca8cSmrg *) 36343e72ca8cSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 36353e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 36363e72ca8cSmrg else 36373e72ca8cSmrg version_type=irix 36383e72ca8cSmrg fi ;; 36393e72ca8cSmrg esac 36403e72ca8cSmrg need_lib_prefix=no 36413e72ca8cSmrg need_version=no 36423e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 36433e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 36443e72ca8cSmrg case $host_os in 36453e72ca8cSmrg irix5* | nonstopux*) 36463e72ca8cSmrg libsuff= shlibsuff= 36473e72ca8cSmrg ;; 36483e72ca8cSmrg *) 36493e72ca8cSmrg case $LD in # libtool.m4 will add one of these switches to LD 36503e72ca8cSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 36513e72ca8cSmrg libsuff= shlibsuff= libmagic=32-bit;; 36523e72ca8cSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 36533e72ca8cSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 36543e72ca8cSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 36553e72ca8cSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 36563e72ca8cSmrg *) libsuff= shlibsuff= libmagic=never-match;; 36573e72ca8cSmrg esac 36583e72ca8cSmrg ;; 36593e72ca8cSmrg esac 36603e72ca8cSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 36613e72ca8cSmrg shlibpath_overrides_runpath=no 36623e72ca8cSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 36633e72ca8cSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 36643e72ca8cSmrg hardcode_into_libs=yes 3665a1ed278cSmrg ;; 36663e72ca8cSmrg 36673e72ca8cSmrg# No shared lib support for Linux oldld, aout, or coff. 36683e72ca8cSmrglinux*oldld* | linux*aout* | linux*coff*) 36693e72ca8cSmrg dynamic_linker=no 3670a1ed278cSmrg ;; 3671ee3138f1Smrg 36723e72ca8cSmrg# This must be glibc/ELF. 36733e72ca8cSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 36743e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 36753e72ca8cSmrg need_lib_prefix=no 36763e72ca8cSmrg need_version=no 36773e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36783e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 36793e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 36803e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 36813e72ca8cSmrg shlibpath_overrides_runpath=no 3682ee3138f1Smrg 36833e72ca8cSmrg # Some binutils ld are patched to set DT_RUNPATH 36843e72ca8cSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 36853e72ca8cSmrg [lt_cv_shlibpath_overrides_runpath=no 36863e72ca8cSmrg save_LDFLAGS=$LDFLAGS 36873e72ca8cSmrg save_libdir=$libdir 36883e72ca8cSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 36893e72ca8cSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 36903e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 36913e72ca8cSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 36923e72ca8cSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 36933e72ca8cSmrg LDFLAGS=$save_LDFLAGS 36943e72ca8cSmrg libdir=$save_libdir 36953e72ca8cSmrg ]) 36963e72ca8cSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 369734977a2fSmrg 36983e72ca8cSmrg # This implies no fast_install, which is unacceptable. 36993e72ca8cSmrg # Some rework will be needed to allow for fast_install 37003e72ca8cSmrg # before this can be enabled. 37013e72ca8cSmrg hardcode_into_libs=yes 3702ee3138f1Smrg 37033e72ca8cSmrg # Add ABI-specific directories to the system library path. 37043e72ca8cSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 3705ee3138f1Smrg 37063e72ca8cSmrg # Append ld.so.conf contents to the search path 37073e72ca8cSmrg if test -f /etc/ld.so.conf; then 37083e72ca8cSmrg 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' ' '` 37093e72ca8cSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 3710ee3138f1Smrg 37113e72ca8cSmrg fi 3712ee3138f1Smrg 37133e72ca8cSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 37143e72ca8cSmrg # powerpc, because MkLinux only supported shared libraries with the 37153e72ca8cSmrg # GNU dynamic linker. Since this was broken with cross compilers, 37163e72ca8cSmrg # most powerpc-linux boxes support dynamic linking these days and 37173e72ca8cSmrg # people can always --disable-shared, the test was removed, and we 37183e72ca8cSmrg # assume the GNU/Linux dynamic linker is in use. 37193e72ca8cSmrg dynamic_linker='GNU/Linux ld.so' 37203e72ca8cSmrg ;; 37213e72ca8cSmrg 37223e72ca8cSmrgnetbsd*) 37233e72ca8cSmrg version_type=sunos 37243e72ca8cSmrg need_lib_prefix=no 37253e72ca8cSmrg need_version=no 37263e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 37273e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 37283e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 37293e72ca8cSmrg dynamic_linker='NetBSD (a.out) ld.so' 3730a1ed278cSmrg else 37313e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 37323e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 37333e72ca8cSmrg dynamic_linker='NetBSD ld.elf_so' 3734a1ed278cSmrg fi 37353e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 37363e72ca8cSmrg shlibpath_overrides_runpath=yes 37373e72ca8cSmrg hardcode_into_libs=yes 37383e72ca8cSmrg ;; 3739ee3138f1Smrg 37403e72ca8cSmrgnewsos6) 37413e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 37423e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37433e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 37443e72ca8cSmrg shlibpath_overrides_runpath=yes 37453e72ca8cSmrg ;; 3746ee3138f1Smrg 37473e72ca8cSmrg*nto* | *qnx*) 37483e72ca8cSmrg version_type=qnx 37493e72ca8cSmrg need_lib_prefix=no 37503e72ca8cSmrg need_version=no 37513e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37523e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 37533e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 37543e72ca8cSmrg shlibpath_overrides_runpath=no 37553e72ca8cSmrg hardcode_into_libs=yes 37563e72ca8cSmrg dynamic_linker='ldqnx.so' 37573e72ca8cSmrg ;; 3758ee3138f1Smrg 37593e72ca8cSmrgopenbsd*) 37603e72ca8cSmrg version_type=sunos 37613e72ca8cSmrg sys_lib_dlsearch_path_spec="/usr/lib" 37623e72ca8cSmrg need_lib_prefix=no 37633e72ca8cSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 37643e72ca8cSmrg case $host_os in 37653e72ca8cSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 37663e72ca8cSmrg *) need_version=no ;; 37673e72ca8cSmrg esac 37683e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 37693e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 37703e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 37713e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 37723e72ca8cSmrg case $host_os in 37733e72ca8cSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 37743e72ca8cSmrg shlibpath_overrides_runpath=no 37753e72ca8cSmrg ;; 37763e72ca8cSmrg *) 37773e72ca8cSmrg shlibpath_overrides_runpath=yes 37783e72ca8cSmrg ;; 37793e72ca8cSmrg esac 37803e72ca8cSmrg else 37813e72ca8cSmrg shlibpath_overrides_runpath=yes 37823e72ca8cSmrg fi 37833e72ca8cSmrg ;; 3784ee3138f1Smrg 37853e72ca8cSmrgos2*) 37863e72ca8cSmrg libname_spec='$name' 37873e72ca8cSmrg shrext_cmds=".dll" 37883e72ca8cSmrg need_lib_prefix=no 37893e72ca8cSmrg library_names_spec='$libname${shared_ext} $libname.a' 37903e72ca8cSmrg dynamic_linker='OS/2 ld.exe' 37913e72ca8cSmrg shlibpath_var=LIBPATH 37923e72ca8cSmrg ;; 3793ee3138f1Smrg 37943e72ca8cSmrgosf3* | osf4* | osf5*) 37953e72ca8cSmrg version_type=osf 37963e72ca8cSmrg need_lib_prefix=no 37973e72ca8cSmrg need_version=no 37983e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 37993e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38003e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38013e72ca8cSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 38023e72ca8cSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 38033e72ca8cSmrg ;; 3804ee3138f1Smrg 38053e72ca8cSmrgrdos*) 38063e72ca8cSmrg dynamic_linker=no 38073e72ca8cSmrg ;; 3808ee3138f1Smrg 38093e72ca8cSmrgsolaris*) 38103e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 38113e72ca8cSmrg need_lib_prefix=no 38123e72ca8cSmrg need_version=no 38133e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38143e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 38153e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38163e72ca8cSmrg shlibpath_overrides_runpath=yes 38173e72ca8cSmrg hardcode_into_libs=yes 38183e72ca8cSmrg # ldd complains unless libraries are executable 38193e72ca8cSmrg postinstall_cmds='chmod +x $lib' 38203e72ca8cSmrg ;; 3821a1ed278cSmrg 38223e72ca8cSmrgsunos4*) 38233e72ca8cSmrg version_type=sunos 38243e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38253e72ca8cSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 38263e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38273e72ca8cSmrg shlibpath_overrides_runpath=yes 38283e72ca8cSmrg if test "$with_gnu_ld" = yes; then 38293e72ca8cSmrg need_lib_prefix=no 38303e72ca8cSmrg fi 38313e72ca8cSmrg need_version=yes 38323e72ca8cSmrg ;; 3833a1ed278cSmrg 38343e72ca8cSmrgsysv4 | sysv4.3*) 38353e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 38363e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38373e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 38383e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38393e72ca8cSmrg case $host_vendor in 38403e72ca8cSmrg sni) 38413e72ca8cSmrg shlibpath_overrides_runpath=no 38423e72ca8cSmrg need_lib_prefix=no 38433e72ca8cSmrg runpath_var=LD_RUN_PATH 38443e72ca8cSmrg ;; 38453e72ca8cSmrg siemens) 38463e72ca8cSmrg need_lib_prefix=no 38473e72ca8cSmrg ;; 38483e72ca8cSmrg motorola) 38493e72ca8cSmrg need_lib_prefix=no 38503e72ca8cSmrg need_version=no 38513e72ca8cSmrg shlibpath_overrides_runpath=no 38523e72ca8cSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 38533e72ca8cSmrg ;; 38543e72ca8cSmrg esac 38553e72ca8cSmrg ;; 38563e72ca8cSmrg 38573e72ca8cSmrgsysv4*MP*) 38583e72ca8cSmrg if test -d /usr/nec ;then 38593e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 38603e72ca8cSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 38613e72ca8cSmrg soname_spec='$libname${shared_ext}.$major' 38623e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 3863a1ed278cSmrg fi 38643e72ca8cSmrg ;; 3865a1ed278cSmrg 38663e72ca8cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 38673e72ca8cSmrg version_type=freebsd-elf 38683e72ca8cSmrg need_lib_prefix=no 38693e72ca8cSmrg need_version=no 38703e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 38713e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 38723e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38733e72ca8cSmrg shlibpath_overrides_runpath=yes 38743e72ca8cSmrg hardcode_into_libs=yes 38753e72ca8cSmrg if test "$with_gnu_ld" = yes; then 38763e72ca8cSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3877a1ed278cSmrg else 38783e72ca8cSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 38793e72ca8cSmrg case $host_os in 38803e72ca8cSmrg sco3.2v5*) 38813e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 38823e72ca8cSmrg ;; 38833e72ca8cSmrg esac 3884b425557eSmrg fi 38853e72ca8cSmrg sys_lib_dlsearch_path_spec='/usr/lib' 38863e72ca8cSmrg ;; 3887ee3138f1Smrg 38883e72ca8cSmrgtpf*) 38893e72ca8cSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 38903e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 38913e72ca8cSmrg need_lib_prefix=no 38923e72ca8cSmrg need_version=no 38933e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38943e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38953e72ca8cSmrg shlibpath_overrides_runpath=no 38963e72ca8cSmrg hardcode_into_libs=yes 38973e72ca8cSmrg ;; 3898ee3138f1Smrg 38993e72ca8cSmrguts4*) 39003e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 39013e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39023e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 39033e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 39043e72ca8cSmrg ;; 3905ee3138f1Smrg 39063e72ca8cSmrg*) 39073e72ca8cSmrg dynamic_linker=no 39083e72ca8cSmrg ;; 39093e72ca8cSmrgesac 39103e72ca8cSmrgAC_MSG_RESULT([$dynamic_linker]) 39113e72ca8cSmrgtest "$dynamic_linker" = no && can_build_shared=no 3912b425557eSmrg 39133e72ca8cSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 39143e72ca8cSmrgif test "$GCC" = yes; then 39153e72ca8cSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 39163e72ca8cSmrgfi 3917b425557eSmrg 39183e72ca8cSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 39193e72ca8cSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 39203e72ca8cSmrgfi 39213e72ca8cSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 39223e72ca8cSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 3923a1ed278cSmrgfi 3924ee3138f1Smrg 39253e72ca8cSmrg_LT_DECL([], [variables_saved_for_relink], [1], 39263e72ca8cSmrg [Variables whose values should be saved in libtool wrapper scripts and 39273e72ca8cSmrg restored at link time]) 39283e72ca8cSmrg_LT_DECL([], [need_lib_prefix], [0], 39293e72ca8cSmrg [Do we need the "lib" prefix for modules?]) 39303e72ca8cSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 39313e72ca8cSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 39323e72ca8cSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 39333e72ca8cSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 39343e72ca8cSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 39353e72ca8cSmrg [Is shlibpath searched before the hard-coded library search path?]) 39363e72ca8cSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 39373e72ca8cSmrg_LT_DECL([], [library_names_spec], [1], 39383e72ca8cSmrg [[List of archive names. First name is the real one, the rest are links. 39393e72ca8cSmrg The last name is the one that the linker finds with -lNAME]]) 39403e72ca8cSmrg_LT_DECL([], [soname_spec], [1], 39413e72ca8cSmrg [[The coded name of the library, if different from the real name]]) 39423e72ca8cSmrg_LT_DECL([], [install_override_mode], [1], 39433e72ca8cSmrg [Permission mode override for installation of shared libraries]) 39443e72ca8cSmrg_LT_DECL([], [postinstall_cmds], [2], 39453e72ca8cSmrg [Command to use after installation of a shared archive]) 39463e72ca8cSmrg_LT_DECL([], [postuninstall_cmds], [2], 39473e72ca8cSmrg [Command to use after uninstallation of a shared archive]) 39483e72ca8cSmrg_LT_DECL([], [finish_cmds], [2], 39493e72ca8cSmrg [Commands used to finish a libtool library installation in a directory]) 39503e72ca8cSmrg_LT_DECL([], [finish_eval], [1], 39513e72ca8cSmrg [[As "finish_cmds", except a single script fragment to be evaled but 39523e72ca8cSmrg not shown]]) 39533e72ca8cSmrg_LT_DECL([], [hardcode_into_libs], [0], 39543e72ca8cSmrg [Whether we should hardcode library paths into libraries]) 39553e72ca8cSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 39563e72ca8cSmrg [Compile-time system search path for libraries]) 39573e72ca8cSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 39583e72ca8cSmrg [Run-time system search path for libraries]) 39593e72ca8cSmrg])# _LT_SYS_DYNAMIC_LINKER 3960ee3138f1Smrg 3961ee3138f1Smrg 39623e72ca8cSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 39633e72ca8cSmrg# -------------------------- 39643e72ca8cSmrg# find a file program which can recognize shared library 39653e72ca8cSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 39663e72ca8cSmrg[m4_require([_LT_DECL_EGREP])dnl 39673e72ca8cSmrgAC_MSG_CHECKING([for $1]) 39683e72ca8cSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 39693e72ca8cSmrg[case $MAGIC_CMD in 39703e72ca8cSmrg[[\\/*] | ?:[\\/]*]) 39713e72ca8cSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 3972a1ed278cSmrg ;; 39733e72ca8cSmrg*) 39743e72ca8cSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 39753e72ca8cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 39763e72ca8cSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 39773e72ca8cSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 39783e72ca8cSmrgdnl not every word. This closes a longstanding sh security hole. 39793e72ca8cSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 39803e72ca8cSmrg for ac_dir in $ac_dummy; do 39813e72ca8cSmrg IFS="$lt_save_ifs" 39823e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 39833e72ca8cSmrg if test -f $ac_dir/$1; then 39843e72ca8cSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 39853e72ca8cSmrg if test -n "$file_magic_test_file"; then 39863e72ca8cSmrg case $deplibs_check_method in 39873e72ca8cSmrg "file_magic "*) 39883e72ca8cSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 39893e72ca8cSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 39903e72ca8cSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 39913e72ca8cSmrg $EGREP "$file_magic_regex" > /dev/null; then 39923e72ca8cSmrg : 39933e72ca8cSmrg else 39943e72ca8cSmrg cat <<_LT_EOF 1>&2 3995ee3138f1Smrg 39963e72ca8cSmrg*** Warning: the command libtool uses to detect shared libraries, 39973e72ca8cSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 39983e72ca8cSmrg*** The result is that libtool may fail to recognize shared libraries 39993e72ca8cSmrg*** as such. This will affect the creation of libtool libraries that 40003e72ca8cSmrg*** depend on shared libraries, but programs linked with such libtool 40013e72ca8cSmrg*** libraries will work regardless of this problem. Nevertheless, you 40023e72ca8cSmrg*** may want to report the problem to your system manager and/or to 40033e72ca8cSmrg*** bug-libtool@gnu.org 4004ee3138f1Smrg 40053e72ca8cSmrg_LT_EOF 40063e72ca8cSmrg fi ;; 4007a1ed278cSmrg esac 40083e72ca8cSmrg fi 40093e72ca8cSmrg break 4010a1ed278cSmrg fi 40113e72ca8cSmrg done 40123e72ca8cSmrg IFS="$lt_save_ifs" 40133e72ca8cSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 40143e72ca8cSmrg ;; 40153e72ca8cSmrgesac]) 40163e72ca8cSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40173e72ca8cSmrgif test -n "$MAGIC_CMD"; then 40183e72ca8cSmrg AC_MSG_RESULT($MAGIC_CMD) 40193e72ca8cSmrgelse 40203e72ca8cSmrg AC_MSG_RESULT(no) 40213e72ca8cSmrgfi 40223e72ca8cSmrg_LT_DECL([], [MAGIC_CMD], [0], 40233e72ca8cSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 40243e72ca8cSmrg])# _LT_PATH_TOOL_PREFIX 4025ee3138f1Smrg 40263e72ca8cSmrg# Old name: 40273e72ca8cSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 40283e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 40293e72ca8cSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 403034977a2fSmrg 4031ee3138f1Smrg 40323e72ca8cSmrg# _LT_PATH_MAGIC 40333e72ca8cSmrg# -------------- 40343e72ca8cSmrg# find a file program which can recognize a shared library 40353e72ca8cSmrgm4_defun([_LT_PATH_MAGIC], 40363e72ca8cSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 40373e72ca8cSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 40383e72ca8cSmrg if test -n "$ac_tool_prefix"; then 40393e72ca8cSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 40403e72ca8cSmrg else 40413e72ca8cSmrg MAGIC_CMD=: 40423e72ca8cSmrg fi 40433e72ca8cSmrgfi 40443e72ca8cSmrg])# _LT_PATH_MAGIC 40453e72ca8cSmrg 4046ee3138f1Smrg 40473e72ca8cSmrg# LT_PATH_LD 40483e72ca8cSmrg# ---------- 40493e72ca8cSmrg# find the pathname to the GNU or non-GNU linker 40503e72ca8cSmrgAC_DEFUN([LT_PATH_LD], 40513e72ca8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 40523e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 40533e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 40543e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 40553e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 40563e72ca8cSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 405734977a2fSmrg 40583e72ca8cSmrgAC_ARG_WITH([gnu-ld], 40593e72ca8cSmrg [AS_HELP_STRING([--with-gnu-ld], 40603e72ca8cSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 40613e72ca8cSmrg [test "$withval" = no || with_gnu_ld=yes], 40623e72ca8cSmrg [with_gnu_ld=no])dnl 40633e72ca8cSmrg 40643e72ca8cSmrgac_prog=ld 40653e72ca8cSmrgif test "$GCC" = yes; then 40663e72ca8cSmrg # Check if gcc -print-prog-name=ld gives a path. 40673e72ca8cSmrg AC_MSG_CHECKING([for ld used by $CC]) 40683e72ca8cSmrg case $host in 40693e72ca8cSmrg *-*-mingw*) 40703e72ca8cSmrg # gcc leaves a trailing carriage return which upsets mingw 40713e72ca8cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 40723e72ca8cSmrg *) 40733e72ca8cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 40743e72ca8cSmrg esac 40753e72ca8cSmrg case $ac_prog in 40763e72ca8cSmrg # Accept absolute paths. 40773e72ca8cSmrg [[\\/]]* | ?:[[\\/]]*) 40783e72ca8cSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 40793e72ca8cSmrg # Canonicalize the pathname of ld 40803e72ca8cSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 40813e72ca8cSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 40823e72ca8cSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 40833e72ca8cSmrg done 40843e72ca8cSmrg test -z "$LD" && LD="$ac_prog" 4085a1ed278cSmrg ;; 40863e72ca8cSmrg "") 40873e72ca8cSmrg # If it fails, then pretend we aren't using GCC. 40883e72ca8cSmrg ac_prog=ld 40893e72ca8cSmrg ;; 40903e72ca8cSmrg *) 40913e72ca8cSmrg # If it is relative, then search for the first ld in PATH. 40923e72ca8cSmrg with_gnu_ld=unknown 40933e72ca8cSmrg ;; 40943e72ca8cSmrg esac 40953e72ca8cSmrgelif test "$with_gnu_ld" = yes; then 40963e72ca8cSmrg AC_MSG_CHECKING([for GNU ld]) 40973e72ca8cSmrgelse 40983e72ca8cSmrg AC_MSG_CHECKING([for non-GNU ld]) 40993e72ca8cSmrgfi 41003e72ca8cSmrgAC_CACHE_VAL(lt_cv_path_LD, 41013e72ca8cSmrg[if test -z "$LD"; then 41023e72ca8cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 41033e72ca8cSmrg for ac_dir in $PATH; do 41043e72ca8cSmrg IFS="$lt_save_ifs" 41053e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 41063e72ca8cSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 41073e72ca8cSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 41083e72ca8cSmrg # Check to see if the program is GNU ld. I'd rather use --version, 41093e72ca8cSmrg # but apparently some variants of GNU ld only accept -v. 41103e72ca8cSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 41113e72ca8cSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 41123e72ca8cSmrg *GNU* | *'with BFD'*) 41133e72ca8cSmrg test "$with_gnu_ld" != no && break 41143e72ca8cSmrg ;; 41153e72ca8cSmrg *) 41163e72ca8cSmrg test "$with_gnu_ld" != yes && break 41173e72ca8cSmrg ;; 41183e72ca8cSmrg esac 41193e72ca8cSmrg fi 41203e72ca8cSmrg done 41213e72ca8cSmrg IFS="$lt_save_ifs" 41223e72ca8cSmrgelse 41233e72ca8cSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 41243e72ca8cSmrgfi]) 41253e72ca8cSmrgLD="$lt_cv_path_LD" 41263e72ca8cSmrgif test -n "$LD"; then 41273e72ca8cSmrg AC_MSG_RESULT($LD) 41283e72ca8cSmrgelse 41293e72ca8cSmrg AC_MSG_RESULT(no) 41303e72ca8cSmrgfi 41313e72ca8cSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 41323e72ca8cSmrg_LT_PATH_LD_GNU 41333e72ca8cSmrgAC_SUBST([LD]) 413434977a2fSmrg 41353e72ca8cSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 41363e72ca8cSmrg])# LT_PATH_LD 413734977a2fSmrg 41383e72ca8cSmrg# Old names: 41393e72ca8cSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 41403e72ca8cSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 41413e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 41423e72ca8cSmrgdnl AC_DEFUN([AM_PROG_LD], []) 41433e72ca8cSmrgdnl AC_DEFUN([AC_PROG_LD], []) 414434977a2fSmrg 414534977a2fSmrg 41463e72ca8cSmrg# _LT_PATH_LD_GNU 41473e72ca8cSmrg#- -------------- 41483e72ca8cSmrgm4_defun([_LT_PATH_LD_GNU], 41493e72ca8cSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 41503e72ca8cSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 41513e72ca8cSmrgcase `$LD -v 2>&1 </dev/null` in 41523e72ca8cSmrg*GNU* | *'with BFD'*) 41533e72ca8cSmrg lt_cv_prog_gnu_ld=yes 41543e72ca8cSmrg ;; 41553e72ca8cSmrg*) 41563e72ca8cSmrg lt_cv_prog_gnu_ld=no 41573e72ca8cSmrg ;; 41583e72ca8cSmrgesac]) 41593e72ca8cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 41603e72ca8cSmrg])# _LT_PATH_LD_GNU 4161ee3138f1Smrg 4162ee3138f1Smrg 41633e72ca8cSmrg# _LT_CMD_RELOAD 41643e72ca8cSmrg# -------------- 41653e72ca8cSmrg# find reload flag for linker 41663e72ca8cSmrg# -- PORTME Some linkers may need a different reload flag. 41673e72ca8cSmrgm4_defun([_LT_CMD_RELOAD], 41683e72ca8cSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 41693e72ca8cSmrg lt_cv_ld_reload_flag, 41703e72ca8cSmrg [lt_cv_ld_reload_flag='-r']) 41713e72ca8cSmrgreload_flag=$lt_cv_ld_reload_flag 41723e72ca8cSmrgcase $reload_flag in 41733e72ca8cSmrg"" | " "*) ;; 41743e72ca8cSmrg*) reload_flag=" $reload_flag" ;; 41753e72ca8cSmrgesac 41763e72ca8cSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 41773e72ca8cSmrgcase $host_os in 41783e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 41793e72ca8cSmrg if test "$GCC" != yes; then 41803e72ca8cSmrg reload_cmds=false 41813e72ca8cSmrg fi 41823e72ca8cSmrg ;; 41833e72ca8cSmrg darwin*) 41843e72ca8cSmrg if test "$GCC" = yes; then 41853e72ca8cSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 41863e72ca8cSmrg else 41873e72ca8cSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 41883e72ca8cSmrg fi 41893e72ca8cSmrg ;; 41903e72ca8cSmrgesac 41913e72ca8cSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 41923e72ca8cSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 41933e72ca8cSmrg])# _LT_CMD_RELOAD 4194ee3138f1Smrg 4195ee3138f1Smrg 41963e72ca8cSmrg# _LT_CHECK_MAGIC_METHOD 41973e72ca8cSmrg# ---------------------- 41983e72ca8cSmrg# how to check for library dependencies 41993e72ca8cSmrg# -- PORTME fill in with the dynamic library characteristics 42003e72ca8cSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 42013e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 42023e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP]) 42033e72ca8cSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 42043e72ca8cSmrglt_cv_deplibs_check_method, 42053e72ca8cSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 42063e72ca8cSmrglt_cv_file_magic_test_file= 42073e72ca8cSmrglt_cv_deplibs_check_method='unknown' 42083e72ca8cSmrg# Need to set the preceding variable on all platforms that support 42093e72ca8cSmrg# interlibrary dependencies. 42103e72ca8cSmrg# 'none' -- dependencies not supported. 42113e72ca8cSmrg# `unknown' -- same as none, but documents that we really don't know. 42123e72ca8cSmrg# 'pass_all' -- all dependencies passed with no checks. 42133e72ca8cSmrg# 'test_compile' -- check by making test program. 42143e72ca8cSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 42153e72ca8cSmrg# which responds to the $file_magic_cmd with a given extended regex. 42163e72ca8cSmrg# If you have `file' or equivalent on your system and you're not sure 42173e72ca8cSmrg# whether `pass_all' will *always* work, you probably want this one. 4218ee3138f1Smrg 42193e72ca8cSmrgcase $host_os in 42203e72ca8cSmrgaix[[4-9]]*) 42213e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42223e72ca8cSmrg ;; 4223ee3138f1Smrg 42243e72ca8cSmrgbeos*) 42253e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42263e72ca8cSmrg ;; 4227b425557eSmrg 42283e72ca8cSmrgbsdi[[45]]*) 42293e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 42303e72ca8cSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 42313e72ca8cSmrg lt_cv_file_magic_test_file=/shlib/libc.so 42323e72ca8cSmrg ;; 4233b425557eSmrg 42343e72ca8cSmrgcygwin*) 42353e72ca8cSmrg # func_win32_libid is a shell function defined in ltmain.sh 42363e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 42373e72ca8cSmrg lt_cv_file_magic_cmd='func_win32_libid' 42383e72ca8cSmrg ;; 4239a1ed278cSmrg 42403e72ca8cSmrgmingw* | pw32*) 42413e72ca8cSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 42423e72ca8cSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 42433e72ca8cSmrg # unless we find 'file', for example because we are cross-compiling. 42443e72ca8cSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 42453e72ca8cSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 42463e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 42473e72ca8cSmrg lt_cv_file_magic_cmd='func_win32_libid' 42483e72ca8cSmrg else 42493e72ca8cSmrg # Keep this pattern in sync with the one in func_win32_libid. 42503e72ca8cSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 42513e72ca8cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 42523e72ca8cSmrg fi 42533e72ca8cSmrg ;; 4254ee3138f1Smrg 42553e72ca8cSmrgcegcc*) 42563e72ca8cSmrg # use the weaker test based on 'objdump'. See mingw*. 42573e72ca8cSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 42583e72ca8cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 42593e72ca8cSmrg ;; 4260a1ed278cSmrg 42613e72ca8cSmrgdarwin* | rhapsody*) 42623e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42633e72ca8cSmrg ;; 4264a1ed278cSmrg 42653e72ca8cSmrgfreebsd* | dragonfly*) 42663e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 42673e72ca8cSmrg case $host_cpu in 42683e72ca8cSmrg i*86 ) 42693e72ca8cSmrg # Not sure whether the presence of OpenBSD here was a mistake. 42703e72ca8cSmrg # Let's accept both of them until this is cleared up. 42713e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 42723e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 42733e72ca8cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4274a1ed278cSmrg ;; 4275a1ed278cSmrg esac 42763e72ca8cSmrg else 42773e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42783e72ca8cSmrg fi 42793e72ca8cSmrg ;; 4280a1ed278cSmrg 42813e72ca8cSmrggnu*) 42823e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42833e72ca8cSmrg ;; 42843e72ca8cSmrg 42853e72ca8cSmrghaiku*) 42863e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42873e72ca8cSmrg ;; 42883e72ca8cSmrg 42893e72ca8cSmrghpux10.20* | hpux11*) 42903e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 42913e72ca8cSmrg case $host_cpu in 42923e72ca8cSmrg ia64*) 42933e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 42943e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 42953e72ca8cSmrg ;; 42963e72ca8cSmrg hppa*64*) 42973e72ca8cSmrg [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]'] 42983e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 42993e72ca8cSmrg ;; 43003e72ca8cSmrg *) 43013e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 43023e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 43033e72ca8cSmrg ;; 43043e72ca8cSmrg esac 43053e72ca8cSmrg ;; 43063e72ca8cSmrg 43073e72ca8cSmrginterix[[3-9]]*) 43083e72ca8cSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 43093e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 43103e72ca8cSmrg ;; 43113e72ca8cSmrg 43123e72ca8cSmrgirix5* | irix6* | nonstopux*) 43133e72ca8cSmrg case $LD in 43143e72ca8cSmrg *-32|*"-32 ") libmagic=32-bit;; 43153e72ca8cSmrg *-n32|*"-n32 ") libmagic=N32;; 43163e72ca8cSmrg *-64|*"-64 ") libmagic=64-bit;; 43173e72ca8cSmrg *) libmagic=never-match;; 43183e72ca8cSmrg esac 43193e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43203e72ca8cSmrg ;; 43213e72ca8cSmrg 43223e72ca8cSmrg# This must be glibc/ELF. 43233e72ca8cSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 43243e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43253e72ca8cSmrg ;; 43263e72ca8cSmrg 43273e72ca8cSmrgnetbsd*) 43283e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 43293e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4330b425557eSmrg else 43313e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 43323e72ca8cSmrg fi 43333e72ca8cSmrg ;; 4334ee3138f1Smrg 43353e72ca8cSmrgnewos6*) 43363e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 43373e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 43383e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 43393e72ca8cSmrg ;; 43403e72ca8cSmrg 43413e72ca8cSmrg*nto* | *qnx*) 43423e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43433e72ca8cSmrg ;; 43443e72ca8cSmrg 43453e72ca8cSmrgopenbsd*) 43463e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 43473e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 43483e72ca8cSmrg else 43493e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 43503e72ca8cSmrg fi 43513e72ca8cSmrg ;; 4352ee3138f1Smrg 43533e72ca8cSmrgosf3* | osf4* | osf5*) 43543e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43553e72ca8cSmrg ;; 4356ee3138f1Smrg 43573e72ca8cSmrgrdos*) 43583e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43593e72ca8cSmrg ;; 436034977a2fSmrg 43613e72ca8cSmrgsolaris*) 43623e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43633e72ca8cSmrg ;; 436434977a2fSmrg 43653e72ca8cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 43663e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43673e72ca8cSmrg ;; 4368ee3138f1Smrg 43693e72ca8cSmrgsysv4 | sysv4.3*) 43703e72ca8cSmrg case $host_vendor in 43713e72ca8cSmrg motorola) 43723e72ca8cSmrg 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]]' 43733e72ca8cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 43743e72ca8cSmrg ;; 43753e72ca8cSmrg ncr) 43763e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43773e72ca8cSmrg ;; 43783e72ca8cSmrg sequent) 43793e72ca8cSmrg lt_cv_file_magic_cmd='/bin/file' 43803e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 43813e72ca8cSmrg ;; 43823e72ca8cSmrg sni) 43833e72ca8cSmrg lt_cv_file_magic_cmd='/bin/file' 43843e72ca8cSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 43853e72ca8cSmrg lt_cv_file_magic_test_file=/lib/libc.so 43863e72ca8cSmrg ;; 43873e72ca8cSmrg siemens) 43883e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43893e72ca8cSmrg ;; 43903e72ca8cSmrg pc) 43913e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43923e72ca8cSmrg ;; 43933e72ca8cSmrg esac 43943e72ca8cSmrg ;; 4395a1ed278cSmrg 43963e72ca8cSmrgtpf*) 43973e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43983e72ca8cSmrg ;; 43993e72ca8cSmrgesac 44003e72ca8cSmrg]) 440134977a2fSmrg 44023e72ca8cSmrgfile_magic_glob= 44033e72ca8cSmrgwant_nocaseglob=no 44043e72ca8cSmrgif test "$build" = "$host"; then 44053e72ca8cSmrg case $host_os in 44063e72ca8cSmrg mingw* | pw32*) 44073e72ca8cSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 44083e72ca8cSmrg want_nocaseglob=yes 44093e72ca8cSmrg else 44103e72ca8cSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 44113e72ca8cSmrg fi 44123e72ca8cSmrg ;; 44133e72ca8cSmrg esac 44143e72ca8cSmrgfi 4415ee3138f1Smrg 44163e72ca8cSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 44173e72ca8cSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 44183e72ca8cSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4419a1ed278cSmrg 44203e72ca8cSmrg_LT_DECL([], [deplibs_check_method], [1], 44213e72ca8cSmrg [Method to check whether dependent libraries are shared objects]) 44223e72ca8cSmrg_LT_DECL([], [file_magic_cmd], [1], 44233e72ca8cSmrg [Command to use when deplibs_check_method = "file_magic"]) 44243e72ca8cSmrg_LT_DECL([], [file_magic_glob], [1], 44253e72ca8cSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 44263e72ca8cSmrg_LT_DECL([], [want_nocaseglob], [1], 44273e72ca8cSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 44283e72ca8cSmrg])# _LT_CHECK_MAGIC_METHOD 4429a1ed278cSmrg 4430a1ed278cSmrg 44313e72ca8cSmrg# LT_PATH_NM 44323e72ca8cSmrg# ---------- 44333e72ca8cSmrg# find the pathname to a BSD- or MS-compatible name lister 44343e72ca8cSmrgAC_DEFUN([LT_PATH_NM], 44353e72ca8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 44363e72ca8cSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 44373e72ca8cSmrg[if test -n "$NM"; then 44383e72ca8cSmrg # Let the user override the test. 44393e72ca8cSmrg lt_cv_path_NM="$NM" 44403e72ca8cSmrgelse 44413e72ca8cSmrg lt_nm_to_check="${ac_tool_prefix}nm" 44423e72ca8cSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 44433e72ca8cSmrg lt_nm_to_check="$lt_nm_to_check nm" 44443e72ca8cSmrg fi 44453e72ca8cSmrg for lt_tmp_nm in $lt_nm_to_check; do 44463e72ca8cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 44473e72ca8cSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 44483e72ca8cSmrg IFS="$lt_save_ifs" 44493e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 44503e72ca8cSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 44513e72ca8cSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 44523e72ca8cSmrg # Check to see if the nm accepts a BSD-compat flag. 44533e72ca8cSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 44543e72ca8cSmrg # nm: unknown option "B" ignored 44553e72ca8cSmrg # Tru64's nm complains that /dev/null is an invalid object file 44563e72ca8cSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 44573e72ca8cSmrg */dev/null* | *'Invalid file or object type'*) 44583e72ca8cSmrg lt_cv_path_NM="$tmp_nm -B" 44593e72ca8cSmrg break 44603e72ca8cSmrg ;; 44613e72ca8cSmrg *) 44623e72ca8cSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 44633e72ca8cSmrg */dev/null*) 44643e72ca8cSmrg lt_cv_path_NM="$tmp_nm -p" 44653e72ca8cSmrg break 44663e72ca8cSmrg ;; 44673e72ca8cSmrg *) 44683e72ca8cSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 44693e72ca8cSmrg continue # so that we can try to find one that supports BSD flags 44703e72ca8cSmrg ;; 44713e72ca8cSmrg esac 44723e72ca8cSmrg ;; 44733e72ca8cSmrg esac 44743e72ca8cSmrg fi 44753e72ca8cSmrg done 44763e72ca8cSmrg IFS="$lt_save_ifs" 44773e72ca8cSmrg done 44783e72ca8cSmrg : ${lt_cv_path_NM=no} 44793e72ca8cSmrgfi]) 44803e72ca8cSmrgif test "$lt_cv_path_NM" != "no"; then 44813e72ca8cSmrg NM="$lt_cv_path_NM" 44823e72ca8cSmrgelse 44833e72ca8cSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 44843e72ca8cSmrg if test -n "$DUMPBIN"; then : 44853e72ca8cSmrg # Let the user override the test. 44863e72ca8cSmrg else 44873e72ca8cSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 44883e72ca8cSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 44893e72ca8cSmrg *COFF*) 44903e72ca8cSmrg DUMPBIN="$DUMPBIN -symbols" 4491b425557eSmrg ;; 44923e72ca8cSmrg *) 44933e72ca8cSmrg DUMPBIN=: 4494b425557eSmrg ;; 44953e72ca8cSmrg esac 44963e72ca8cSmrg fi 44973e72ca8cSmrg AC_SUBST([DUMPBIN]) 44983e72ca8cSmrg if test "$DUMPBIN" != ":"; then 44993e72ca8cSmrg NM="$DUMPBIN" 45003e72ca8cSmrg fi 45013e72ca8cSmrgfi 45023e72ca8cSmrgtest -z "$NM" && NM=nm 45033e72ca8cSmrgAC_SUBST([NM]) 45043e72ca8cSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4505a1ed278cSmrg 45063e72ca8cSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 45073e72ca8cSmrg [lt_cv_nm_interface="BSD nm" 45083e72ca8cSmrg echo "int some_variable = 0;" > conftest.$ac_ext 45093e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 45103e72ca8cSmrg (eval "$ac_compile" 2>conftest.err) 45113e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45123e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 45133e72ca8cSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 45143e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45153e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 45163e72ca8cSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 45173e72ca8cSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 45183e72ca8cSmrg lt_cv_nm_interface="MS dumpbin" 45193e72ca8cSmrg fi 45203e72ca8cSmrg rm -f conftest*]) 45213e72ca8cSmrg])# LT_PATH_NM 4522a1ed278cSmrg 45233e72ca8cSmrg# Old names: 45243e72ca8cSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 45253e72ca8cSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 45263e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 45273e72ca8cSmrgdnl AC_DEFUN([AM_PROG_NM], []) 45283e72ca8cSmrgdnl AC_DEFUN([AC_PROG_NM], []) 4529a1ed278cSmrg 45303e72ca8cSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 45313e72ca8cSmrg# -------------------------------- 45323e72ca8cSmrg# how to determine the name of the shared library 45333e72ca8cSmrg# associated with a specific link library. 45343e72ca8cSmrg# -- PORTME fill in with the dynamic library characteristics 45353e72ca8cSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 45363e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 45373e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP]) 45383e72ca8cSmrgm4_require([_LT_DECL_DLLTOOL]) 45393e72ca8cSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 45403e72ca8cSmrglt_cv_sharedlib_from_linklib_cmd, 45413e72ca8cSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4542a1ed278cSmrg 45433e72ca8cSmrgcase $host_os in 45443e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 45453e72ca8cSmrg # two different shell functions defined in ltmain.sh 45463e72ca8cSmrg # decide which to use based on capabilities of $DLLTOOL 45473e72ca8cSmrg case `$DLLTOOL --help 2>&1` in 45483e72ca8cSmrg *--identify-strict*) 45493e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 45503e72ca8cSmrg ;; 45513e72ca8cSmrg *) 45523e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 45533e72ca8cSmrg ;; 45543e72ca8cSmrg esac 45553e72ca8cSmrg ;; 45563e72ca8cSmrg*) 45573e72ca8cSmrg # fallback: assume linklib IS sharedlib 45583e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 45593e72ca8cSmrg ;; 45603e72ca8cSmrgesac 45613e72ca8cSmrg]) 45623e72ca8cSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 45633e72ca8cSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4564a1ed278cSmrg 45653e72ca8cSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 45663e72ca8cSmrg [Command to associate shared and link libraries]) 45673e72ca8cSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4568a1ed278cSmrg 4569a1ed278cSmrg 45703e72ca8cSmrg# _LT_PATH_MANIFEST_TOOL 45713e72ca8cSmrg# ---------------------- 45723e72ca8cSmrg# locate the manifest tool 45733e72ca8cSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 45743e72ca8cSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 45753e72ca8cSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 45763e72ca8cSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 45773e72ca8cSmrg [lt_cv_path_mainfest_tool=no 45783e72ca8cSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 45793e72ca8cSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 45803e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45813e72ca8cSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 45823e72ca8cSmrg lt_cv_path_mainfest_tool=yes 45833e72ca8cSmrg fi 45843e72ca8cSmrg rm -f conftest*]) 45853e72ca8cSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 45863e72ca8cSmrg MANIFEST_TOOL=: 45873e72ca8cSmrgfi 45883e72ca8cSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 45893e72ca8cSmrg])# _LT_PATH_MANIFEST_TOOL 4590a1ed278cSmrg 4591a1ed278cSmrg 45923e72ca8cSmrg# LT_LIB_M 45933e72ca8cSmrg# -------- 45943e72ca8cSmrg# check for math library 45953e72ca8cSmrgAC_DEFUN([LT_LIB_M], 45963e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 45973e72ca8cSmrgLIBM= 45983e72ca8cSmrgcase $host in 45993e72ca8cSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 46003e72ca8cSmrg # These system don't have libm, or don't need it 46013e72ca8cSmrg ;; 46023e72ca8cSmrg*-ncr-sysv4.3*) 46033e72ca8cSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 46043e72ca8cSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 46053e72ca8cSmrg ;; 46063e72ca8cSmrg*) 46073e72ca8cSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 46083e72ca8cSmrg ;; 46093e72ca8cSmrgesac 46103e72ca8cSmrgAC_SUBST([LIBM]) 46113e72ca8cSmrg])# LT_LIB_M 4612a1ed278cSmrg 46133e72ca8cSmrg# Old name: 46143e72ca8cSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 46153e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 46163e72ca8cSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4617a1ed278cSmrg 4618a1ed278cSmrg 46193e72ca8cSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 46203e72ca8cSmrg# ------------------------------- 46213e72ca8cSmrgm4_defun([_LT_COMPILER_NO_RTTI], 46223e72ca8cSmrg[m4_require([_LT_TAG_COMPILER])dnl 4623a1ed278cSmrg 46243e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4625a1ed278cSmrg 46263e72ca8cSmrgif test "$GCC" = yes; then 46273e72ca8cSmrg case $cc_basename in 46283e72ca8cSmrg nvcc*) 46293e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 46303e72ca8cSmrg *) 46313e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 46323e72ca8cSmrg esac 46333e72ca8cSmrg 46343e72ca8cSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 46353e72ca8cSmrg lt_cv_prog_compiler_rtti_exceptions, 46363e72ca8cSmrg [-fno-rtti -fno-exceptions], [], 46373e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 46383e72ca8cSmrgfi 46393e72ca8cSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 46403e72ca8cSmrg [Compiler flag to turn off builtin functions]) 46413e72ca8cSmrg])# _LT_COMPILER_NO_RTTI 4642a1ed278cSmrg 4643a1ed278cSmrg 46443e72ca8cSmrg# _LT_CMD_GLOBAL_SYMBOLS 46453e72ca8cSmrg# ---------------------- 46463e72ca8cSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 46473e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 46483e72ca8cSmrgAC_REQUIRE([AC_PROG_CC])dnl 46493e72ca8cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 46503e72ca8cSmrgAC_REQUIRE([LT_PATH_NM])dnl 46513e72ca8cSmrgAC_REQUIRE([LT_PATH_LD])dnl 46523e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 46533e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 46543e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 4655a1ed278cSmrg 46563e72ca8cSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 46573e72ca8cSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 46583e72ca8cSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 46593e72ca8cSmrg[ 46603e72ca8cSmrg# These are sane defaults that work on at least a few old systems. 46613e72ca8cSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4662a1ed278cSmrg 46633e72ca8cSmrg# Character class describing NM global symbol codes. 46643e72ca8cSmrgsymcode='[[BCDEGRST]]' 4665a1ed278cSmrg 46663e72ca8cSmrg# Regexp to match symbols that can be accessed directly from C. 46673e72ca8cSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4668a1ed278cSmrg 46693e72ca8cSmrg# Define system-specific variables. 46703e72ca8cSmrgcase $host_os in 46713e72ca8cSmrgaix*) 46723e72ca8cSmrg symcode='[[BCDT]]' 46733e72ca8cSmrg ;; 46743e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 46753e72ca8cSmrg symcode='[[ABCDGISTW]]' 46763e72ca8cSmrg ;; 46773e72ca8cSmrghpux*) 46783e72ca8cSmrg if test "$host_cpu" = ia64; then 46793e72ca8cSmrg symcode='[[ABCDEGRST]]' 46803e72ca8cSmrg fi 46813e72ca8cSmrg ;; 46823e72ca8cSmrgirix* | nonstopux*) 46833e72ca8cSmrg symcode='[[BCDEGRST]]' 46843e72ca8cSmrg ;; 46853e72ca8cSmrgosf*) 46863e72ca8cSmrg symcode='[[BCDEGQRST]]' 46873e72ca8cSmrg ;; 46883e72ca8cSmrgsolaris*) 46893e72ca8cSmrg symcode='[[BDRT]]' 46903e72ca8cSmrg ;; 46913e72ca8cSmrgsco3.2v5*) 46923e72ca8cSmrg symcode='[[DT]]' 46933e72ca8cSmrg ;; 46943e72ca8cSmrgsysv4.2uw2*) 46953e72ca8cSmrg symcode='[[DT]]' 46963e72ca8cSmrg ;; 46973e72ca8cSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 46983e72ca8cSmrg symcode='[[ABDT]]' 46993e72ca8cSmrg ;; 47003e72ca8cSmrgsysv4) 47013e72ca8cSmrg symcode='[[DFNSTU]]' 47023e72ca8cSmrg ;; 47033e72ca8cSmrgesac 4704a1ed278cSmrg 47053e72ca8cSmrg# If we're using GNU nm, then use its standard symbol codes. 47063e72ca8cSmrgcase `$NM -V 2>&1` in 47073e72ca8cSmrg*GNU* | *'with BFD'*) 47083e72ca8cSmrg symcode='[[ABCDGIRSTW]]' ;; 47093e72ca8cSmrgesac 4710a1ed278cSmrg 47113e72ca8cSmrg# Transform an extracted symbol line into a proper C declaration. 47123e72ca8cSmrg# Some systems (esp. on ia64) link data and code symbols differently, 47133e72ca8cSmrg# so use this general approach. 47143e72ca8cSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4715a1ed278cSmrg 47163e72ca8cSmrg# Transform an extracted symbol line into symbol name and symbol address 47173e72ca8cSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 47183e72ca8cSmrglt_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'" 4719a1ed278cSmrg 47203e72ca8cSmrg# Handle CRLF in mingw tool chain 47213e72ca8cSmrgopt_cr= 47223e72ca8cSmrgcase $build_os in 47233e72ca8cSmrgmingw*) 47243e72ca8cSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 47253e72ca8cSmrg ;; 47263e72ca8cSmrgesac 4727a1ed278cSmrg 47283e72ca8cSmrg# Try without a prefix underscore, then with it. 47293e72ca8cSmrgfor ac_symprfx in "" "_"; do 4730a1ed278cSmrg 47313e72ca8cSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 47323e72ca8cSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 47333e72ca8cSmrg 47343e72ca8cSmrg # Write the raw and C identifiers. 47353e72ca8cSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 47363e72ca8cSmrg # Fake it for dumpbin and say T for any non-static function 47373e72ca8cSmrg # and D for any global variable. 47383e72ca8cSmrg # Also find C++ and __fastcall symbols from MSVC++, 47393e72ca8cSmrg # which start with @ or ?. 47403e72ca8cSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 47413e72ca8cSmrg" {last_section=section; section=\$ 3};"\ 47423e72ca8cSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 47433e72ca8cSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 47443e72ca8cSmrg" \$ 0!~/External *\|/{next};"\ 47453e72ca8cSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 47463e72ca8cSmrg" {if(hide[section]) next};"\ 47473e72ca8cSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 47483e72ca8cSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 47493e72ca8cSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 47503e72ca8cSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 47513e72ca8cSmrg" ' prfx=^$ac_symprfx]" 47523e72ca8cSmrg else 47533e72ca8cSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 47543e72ca8cSmrg fi 47553e72ca8cSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4756a1ed278cSmrg 47573e72ca8cSmrg # Check to see that the pipe works correctly. 47583e72ca8cSmrg pipe_works=no 47593e72ca8cSmrg 47603e72ca8cSmrg rm -f conftest* 47613e72ca8cSmrg cat > conftest.$ac_ext <<_LT_EOF 47623e72ca8cSmrg#ifdef __cplusplus 47633e72ca8cSmrgextern "C" { 47643e72ca8cSmrg#endif 47653e72ca8cSmrgchar nm_test_var; 47663e72ca8cSmrgvoid nm_test_func(void); 47673e72ca8cSmrgvoid nm_test_func(void){} 47683e72ca8cSmrg#ifdef __cplusplus 47693e72ca8cSmrg} 47703e72ca8cSmrg#endif 47713e72ca8cSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 47723e72ca8cSmrg_LT_EOF 47733e72ca8cSmrg 47743e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 47753e72ca8cSmrg # Now try to grab the symbols. 47763e72ca8cSmrg nlist=conftest.nm 47773e72ca8cSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 47783e72ca8cSmrg # Try sorting and uniquifying the output. 47793e72ca8cSmrg if sort "$nlist" | uniq > "$nlist"T; then 47803e72ca8cSmrg mv -f "$nlist"T "$nlist" 4781a1ed278cSmrg else 47823e72ca8cSmrg rm -f "$nlist"T 4783a1ed278cSmrg fi 4784a1ed278cSmrg 47853e72ca8cSmrg # Make sure that we snagged all the symbols we need. 47863e72ca8cSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 47873e72ca8cSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 47883e72ca8cSmrg cat <<_LT_EOF > conftest.$ac_ext 47893e72ca8cSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 47903e72ca8cSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 47913e72ca8cSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 47923e72ca8cSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 47933e72ca8cSmrg# define LT@&t@_DLSYM_CONST 47943e72ca8cSmrg#elif defined(__osf__) 47953e72ca8cSmrg/* This system does not cope well with relocations in const data. */ 47963e72ca8cSmrg# define LT@&t@_DLSYM_CONST 47973e72ca8cSmrg#else 47983e72ca8cSmrg# define LT@&t@_DLSYM_CONST const 47993e72ca8cSmrg#endif 4800a1ed278cSmrg 48013e72ca8cSmrg#ifdef __cplusplus 48023e72ca8cSmrgextern "C" { 48033e72ca8cSmrg#endif 4804a1ed278cSmrg 48053e72ca8cSmrg_LT_EOF 48063e72ca8cSmrg # Now generate the symbol file. 48073e72ca8cSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4808a1ed278cSmrg 48093e72ca8cSmrg cat <<_LT_EOF >> conftest.$ac_ext 4810a1ed278cSmrg 48113e72ca8cSmrg/* The mapping between symbol names and symbols. */ 48123e72ca8cSmrgLT@&t@_DLSYM_CONST struct { 48133e72ca8cSmrg const char *name; 48143e72ca8cSmrg void *address; 48153e72ca8cSmrg} 48163e72ca8cSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 48173e72ca8cSmrg{ 48183e72ca8cSmrg { "@PROGRAM@", (void *) 0 }, 48193e72ca8cSmrg_LT_EOF 48203e72ca8cSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 48213e72ca8cSmrg cat <<\_LT_EOF >> conftest.$ac_ext 48223e72ca8cSmrg {0, (void *) 0} 48233e72ca8cSmrg}; 4824a1ed278cSmrg 48253e72ca8cSmrg/* This works around a problem in FreeBSD linker */ 48263e72ca8cSmrg#ifdef FREEBSD_WORKAROUND 48273e72ca8cSmrgstatic const void *lt_preloaded_setup() { 48283e72ca8cSmrg return lt__PROGRAM__LTX_preloaded_symbols; 48293e72ca8cSmrg} 48303e72ca8cSmrg#endif 4831a1ed278cSmrg 48323e72ca8cSmrg#ifdef __cplusplus 48333e72ca8cSmrg} 48343e72ca8cSmrg#endif 48353e72ca8cSmrg_LT_EOF 48363e72ca8cSmrg # Now try linking the two files. 48373e72ca8cSmrg mv conftest.$ac_objext conftstm.$ac_objext 48383e72ca8cSmrg lt_globsym_save_LIBS=$LIBS 48393e72ca8cSmrg lt_globsym_save_CFLAGS=$CFLAGS 48403e72ca8cSmrg LIBS="conftstm.$ac_objext" 48413e72ca8cSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 48423e72ca8cSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 48433e72ca8cSmrg pipe_works=yes 4844a1ed278cSmrg fi 48453e72ca8cSmrg LIBS=$lt_globsym_save_LIBS 48463e72ca8cSmrg CFLAGS=$lt_globsym_save_CFLAGS 4847a1ed278cSmrg else 48483e72ca8cSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4849a1ed278cSmrg fi 48503e72ca8cSmrg else 48513e72ca8cSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 48523e72ca8cSmrg fi 48533e72ca8cSmrg else 48543e72ca8cSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 48553e72ca8cSmrg fi 48563e72ca8cSmrg else 48573e72ca8cSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 48583e72ca8cSmrg cat conftest.$ac_ext >&5 4859b425557eSmrg fi 48603e72ca8cSmrg rm -rf conftest* conftst* 486134977a2fSmrg 48623e72ca8cSmrg # Do not use the global_symbol_pipe unless it works. 48633e72ca8cSmrg if test "$pipe_works" = yes; then 48643e72ca8cSmrg break 48653e72ca8cSmrg else 48663e72ca8cSmrg lt_cv_sys_global_symbol_pipe= 48673e72ca8cSmrg fi 48683e72ca8cSmrgdone 48693e72ca8cSmrg]) 48703e72ca8cSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 48713e72ca8cSmrg lt_cv_sys_global_symbol_to_cdecl= 48723e72ca8cSmrgfi 48733e72ca8cSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 48743e72ca8cSmrg AC_MSG_RESULT(failed) 48753e72ca8cSmrgelse 48763e72ca8cSmrg AC_MSG_RESULT(ok) 48773e72ca8cSmrgfi 487834977a2fSmrg 48793e72ca8cSmrg# Response file support. 48803e72ca8cSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 48813e72ca8cSmrg nm_file_list_spec='@' 48823e72ca8cSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 48833e72ca8cSmrg nm_file_list_spec='@' 48843e72ca8cSmrgfi 4885ee3138f1Smrg 48863e72ca8cSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 48873e72ca8cSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 48883e72ca8cSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 48893e72ca8cSmrg [Transform the output of nm in a proper C declaration]) 48903e72ca8cSmrg_LT_DECL([global_symbol_to_c_name_address], 48913e72ca8cSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 48923e72ca8cSmrg [Transform the output of nm in a C name address pair]) 48933e72ca8cSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 48943e72ca8cSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 48953e72ca8cSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 48963e72ca8cSmrg_LT_DECL([], [nm_file_list_spec], [1], 48973e72ca8cSmrg [Specify filename containing input files for $NM]) 48983e72ca8cSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 4899ee3138f1Smrg 4900ee3138f1Smrg 49013e72ca8cSmrg# _LT_COMPILER_PIC([TAGNAME]) 49023e72ca8cSmrg# --------------------------- 49033e72ca8cSmrgm4_defun([_LT_COMPILER_PIC], 49043e72ca8cSmrg[m4_require([_LT_TAG_COMPILER])dnl 49053e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 49063e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 49073e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 490834977a2fSmrg 49093e72ca8cSmrgm4_if([$1], [CXX], [ 49103e72ca8cSmrg # C++ specific cases for pic, static, wl, etc. 49113e72ca8cSmrg if test "$GXX" = yes; then 49123e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49133e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4914ee3138f1Smrg 49153e72ca8cSmrg case $host_os in 49163e72ca8cSmrg aix*) 49173e72ca8cSmrg # All AIX code is PIC. 49183e72ca8cSmrg if test "$host_cpu" = ia64; then 49193e72ca8cSmrg # AIX 5 now supports IA64 processor 49203e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49213e72ca8cSmrg fi 49223e72ca8cSmrg ;; 4923a1ed278cSmrg 49243e72ca8cSmrg amigaos*) 49253e72ca8cSmrg case $host_cpu in 49263e72ca8cSmrg powerpc) 49273e72ca8cSmrg # see comment about AmigaOS4 .so support 49283e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 49293e72ca8cSmrg ;; 49303e72ca8cSmrg m68k) 49313e72ca8cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 49323e72ca8cSmrg # adding the `-m68020' flag to GCC prevents building anything better, 49333e72ca8cSmrg # like `-m68040'. 49343e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 49353e72ca8cSmrg ;; 49363e72ca8cSmrg esac 49373e72ca8cSmrg ;; 4938a1ed278cSmrg 49393e72ca8cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 49403e72ca8cSmrg # PIC is the default for these OSes. 49413e72ca8cSmrg ;; 49423e72ca8cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 49433e72ca8cSmrg # This hack is so that the source file can tell whether it is being 49443e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 49453e72ca8cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 49463e72ca8cSmrg # (--disable-auto-import) libraries 49473e72ca8cSmrg m4_if([$1], [GCJ], [], 49483e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 49493e72ca8cSmrg ;; 49503e72ca8cSmrg darwin* | rhapsody*) 49513e72ca8cSmrg # PIC is the default on this platform 49523e72ca8cSmrg # Common symbols not allowed in MH_DYLIB files 49533e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 49543e72ca8cSmrg ;; 49553e72ca8cSmrg *djgpp*) 49563e72ca8cSmrg # DJGPP does not support shared libraries at all 49573e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 49583e72ca8cSmrg ;; 49593e72ca8cSmrg haiku*) 49603e72ca8cSmrg # PIC is the default for Haiku. 49613e72ca8cSmrg # The "-static" flag exists, but is broken. 49623e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 49633e72ca8cSmrg ;; 49643e72ca8cSmrg interix[[3-9]]*) 49653e72ca8cSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 49663e72ca8cSmrg # Instead, we relocate shared libraries at runtime. 49673e72ca8cSmrg ;; 49683e72ca8cSmrg sysv4*MP*) 49693e72ca8cSmrg if test -d /usr/nec; then 49703e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 49713e72ca8cSmrg fi 49723e72ca8cSmrg ;; 49733e72ca8cSmrg hpux*) 49743e72ca8cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 49753e72ca8cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 49763e72ca8cSmrg # sets the default TLS model and affects inlining. 49773e72ca8cSmrg case $host_cpu in 49783e72ca8cSmrg hppa*64*) 49793e72ca8cSmrg ;; 49803e72ca8cSmrg *) 49813e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 49823e72ca8cSmrg ;; 49833e72ca8cSmrg esac 49843e72ca8cSmrg ;; 49853e72ca8cSmrg *qnx* | *nto*) 49863e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 49873e72ca8cSmrg # it will coredump. 49883e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 49893e72ca8cSmrg ;; 49903e72ca8cSmrg *) 49913e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 49923e72ca8cSmrg ;; 49933e72ca8cSmrg esac 49943e72ca8cSmrg else 49953e72ca8cSmrg case $host_os in 49963e72ca8cSmrg aix[[4-9]]*) 49973e72ca8cSmrg # All AIX code is PIC. 49983e72ca8cSmrg if test "$host_cpu" = ia64; then 49993e72ca8cSmrg # AIX 5 now supports IA64 processor 50003e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50013e72ca8cSmrg else 50023e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 50033e72ca8cSmrg fi 50043e72ca8cSmrg ;; 50053e72ca8cSmrg chorus*) 50063e72ca8cSmrg case $cc_basename in 50073e72ca8cSmrg cxch68*) 50083e72ca8cSmrg # Green Hills C++ Compiler 50093e72ca8cSmrg # _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" 50103e72ca8cSmrg ;; 50113e72ca8cSmrg esac 50123e72ca8cSmrg ;; 50133e72ca8cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50143e72ca8cSmrg # This hack is so that the source file can tell whether it is being 50153e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 50163e72ca8cSmrg m4_if([$1], [GCJ], [], 50173e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50183e72ca8cSmrg ;; 50193e72ca8cSmrg dgux*) 50203e72ca8cSmrg case $cc_basename in 50213e72ca8cSmrg ec++*) 50223e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 50233e72ca8cSmrg ;; 50243e72ca8cSmrg ghcx*) 50253e72ca8cSmrg # Green Hills C++ Compiler 50263e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 50273e72ca8cSmrg ;; 50283e72ca8cSmrg *) 50293e72ca8cSmrg ;; 50303e72ca8cSmrg esac 50313e72ca8cSmrg ;; 50323e72ca8cSmrg freebsd* | dragonfly*) 50333e72ca8cSmrg # FreeBSD uses GNU C++ 50343e72ca8cSmrg ;; 50353e72ca8cSmrg hpux9* | hpux10* | hpux11*) 50363e72ca8cSmrg case $cc_basename in 50373e72ca8cSmrg CC*) 50383e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50393e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 50403e72ca8cSmrg if test "$host_cpu" != ia64; then 50413e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 50423e72ca8cSmrg fi 50433e72ca8cSmrg ;; 50443e72ca8cSmrg aCC*) 50453e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50463e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 50473e72ca8cSmrg case $host_cpu in 50483e72ca8cSmrg hppa*64*|ia64*) 50493e72ca8cSmrg # +Z the default 50503e72ca8cSmrg ;; 50513e72ca8cSmrg *) 50523e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 50533e72ca8cSmrg ;; 50543e72ca8cSmrg esac 50553e72ca8cSmrg ;; 50563e72ca8cSmrg *) 50573e72ca8cSmrg ;; 50583e72ca8cSmrg esac 50593e72ca8cSmrg ;; 50603e72ca8cSmrg interix*) 50613e72ca8cSmrg # This is c89, which is MS Visual C++ (no shared libs) 50623e72ca8cSmrg # Anyone wants to do a port? 50633e72ca8cSmrg ;; 50643e72ca8cSmrg irix5* | irix6* | nonstopux*) 50653e72ca8cSmrg case $cc_basename in 50663e72ca8cSmrg CC*) 50673e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50683e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 50693e72ca8cSmrg # CC pic flag -KPIC is the default. 50703e72ca8cSmrg ;; 50713e72ca8cSmrg *) 50723e72ca8cSmrg ;; 50733e72ca8cSmrg esac 50743e72ca8cSmrg ;; 50753e72ca8cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 50763e72ca8cSmrg case $cc_basename in 50773e72ca8cSmrg KCC*) 50783e72ca8cSmrg # KAI C++ Compiler 50793e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 50803e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50813e72ca8cSmrg ;; 50823e72ca8cSmrg ecpc* ) 50833e72ca8cSmrg # old Intel C++ for x86_64 which still supported -KPIC. 50843e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50853e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 50863e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 50873e72ca8cSmrg ;; 50883e72ca8cSmrg icpc* ) 50893e72ca8cSmrg # Intel C++, used to be incompatible with GCC. 50903e72ca8cSmrg # ICC 10 doesn't accept -KPIC any more. 50913e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50923e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50933e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 50943e72ca8cSmrg ;; 50953e72ca8cSmrg pgCC* | pgcpp*) 50963e72ca8cSmrg # Portland Group C++ compiler 50973e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50983e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 50993e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51003e72ca8cSmrg ;; 51013e72ca8cSmrg cxx*) 51023e72ca8cSmrg # Compaq C++ 51033e72ca8cSmrg # Make sure the PIC flag is empty. It appears that all Alpha 51043e72ca8cSmrg # Linux and Compaq Tru64 Unix objects are PIC. 51053e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 51063e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51073e72ca8cSmrg ;; 51083e72ca8cSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 51093e72ca8cSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 51103e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51113e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 51123e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 51133e72ca8cSmrg ;; 51143e72ca8cSmrg *) 51153e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 51163e72ca8cSmrg *Sun\ C*) 51173e72ca8cSmrg # Sun C++ 5.9 51183e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51193e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51203e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51213e72ca8cSmrg ;; 51223e72ca8cSmrg esac 51233e72ca8cSmrg ;; 51243e72ca8cSmrg esac 51253e72ca8cSmrg ;; 51263e72ca8cSmrg lynxos*) 51273e72ca8cSmrg ;; 51283e72ca8cSmrg m88k*) 51293e72ca8cSmrg ;; 51303e72ca8cSmrg mvs*) 51313e72ca8cSmrg case $cc_basename in 51323e72ca8cSmrg cxx*) 51333e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 51343e72ca8cSmrg ;; 51353e72ca8cSmrg *) 51363e72ca8cSmrg ;; 51373e72ca8cSmrg esac 51383e72ca8cSmrg ;; 51393e72ca8cSmrg netbsd*) 51403e72ca8cSmrg ;; 51413e72ca8cSmrg *qnx* | *nto*) 51423e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 51433e72ca8cSmrg # it will coredump. 51443e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 51453e72ca8cSmrg ;; 51463e72ca8cSmrg osf3* | osf4* | osf5*) 51473e72ca8cSmrg case $cc_basename in 51483e72ca8cSmrg KCC*) 51493e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51503e72ca8cSmrg ;; 51513e72ca8cSmrg RCC*) 51523e72ca8cSmrg # Rational C++ 2.4.1 51533e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51543e72ca8cSmrg ;; 51553e72ca8cSmrg cxx*) 51563e72ca8cSmrg # Digital/Compaq C++ 51573e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51583e72ca8cSmrg # Make sure the PIC flag is empty. It appears that all Alpha 51593e72ca8cSmrg # Linux and Compaq Tru64 Unix objects are PIC. 51603e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 51613e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51623e72ca8cSmrg ;; 51633e72ca8cSmrg *) 51643e72ca8cSmrg ;; 51653e72ca8cSmrg esac 51663e72ca8cSmrg ;; 51673e72ca8cSmrg psos*) 51683e72ca8cSmrg ;; 51693e72ca8cSmrg solaris*) 51703e72ca8cSmrg case $cc_basename in 51713e72ca8cSmrg CC* | sunCC*) 51723e72ca8cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 51733e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51743e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51763e72ca8cSmrg ;; 51773e72ca8cSmrg gcx*) 51783e72ca8cSmrg # Green Hills C++ Compiler 51793e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 51803e72ca8cSmrg ;; 51813e72ca8cSmrg *) 51823e72ca8cSmrg ;; 51833e72ca8cSmrg esac 51843e72ca8cSmrg ;; 51853e72ca8cSmrg sunos4*) 51863e72ca8cSmrg case $cc_basename in 51873e72ca8cSmrg CC*) 51883e72ca8cSmrg # Sun C++ 4.x 51893e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51903e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51913e72ca8cSmrg ;; 51923e72ca8cSmrg lcc*) 51933e72ca8cSmrg # Lucid 51943e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51953e72ca8cSmrg ;; 51963e72ca8cSmrg *) 51973e72ca8cSmrg ;; 51983e72ca8cSmrg esac 51993e72ca8cSmrg ;; 52003e72ca8cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 52013e72ca8cSmrg case $cc_basename in 52023e72ca8cSmrg CC*) 52033e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52043e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52053e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52063e72ca8cSmrg ;; 52073e72ca8cSmrg esac 52083e72ca8cSmrg ;; 52093e72ca8cSmrg tandem*) 52103e72ca8cSmrg case $cc_basename in 52113e72ca8cSmrg NCC*) 52123e72ca8cSmrg # NonStop-UX NCC 3.20 52133e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52143e72ca8cSmrg ;; 52153e72ca8cSmrg *) 52163e72ca8cSmrg ;; 52173e72ca8cSmrg esac 52183e72ca8cSmrg ;; 52193e72ca8cSmrg vxworks*) 52203e72ca8cSmrg ;; 52213e72ca8cSmrg *) 52223e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 52233e72ca8cSmrg ;; 52243e72ca8cSmrg esac 52253e72ca8cSmrg fi 52263e72ca8cSmrg], 52273e72ca8cSmrg[ 52283e72ca8cSmrg if test "$GCC" = yes; then 52293e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52303e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5231a1ed278cSmrg 52323e72ca8cSmrg case $host_os in 52333e72ca8cSmrg aix*) 52343e72ca8cSmrg # All AIX code is PIC. 52353e72ca8cSmrg if test "$host_cpu" = ia64; then 52363e72ca8cSmrg # AIX 5 now supports IA64 processor 52373e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52383e72ca8cSmrg fi 52393e72ca8cSmrg ;; 5240a1ed278cSmrg 52413e72ca8cSmrg amigaos*) 52423e72ca8cSmrg case $host_cpu in 52433e72ca8cSmrg powerpc) 52443e72ca8cSmrg # see comment about AmigaOS4 .so support 52453e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 52463e72ca8cSmrg ;; 52473e72ca8cSmrg m68k) 52483e72ca8cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 52493e72ca8cSmrg # adding the `-m68020' flag to GCC prevents building anything better, 52503e72ca8cSmrg # like `-m68040'. 52513e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 52523e72ca8cSmrg ;; 52533e72ca8cSmrg esac 52543e72ca8cSmrg ;; 5255a1ed278cSmrg 52563e72ca8cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 52573e72ca8cSmrg # PIC is the default for these OSes. 52583e72ca8cSmrg ;; 5259a1ed278cSmrg 52603e72ca8cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 52613e72ca8cSmrg # This hack is so that the source file can tell whether it is being 52623e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 52633e72ca8cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 52643e72ca8cSmrg # (--disable-auto-import) libraries 52653e72ca8cSmrg m4_if([$1], [GCJ], [], 52663e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 52673e72ca8cSmrg ;; 5268a1ed278cSmrg 52693e72ca8cSmrg darwin* | rhapsody*) 52703e72ca8cSmrg # PIC is the default on this platform 52713e72ca8cSmrg # Common symbols not allowed in MH_DYLIB files 52723e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 52733e72ca8cSmrg ;; 5274a1ed278cSmrg 52753e72ca8cSmrg haiku*) 52763e72ca8cSmrg # PIC is the default for Haiku. 52773e72ca8cSmrg # The "-static" flag exists, but is broken. 52783e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 52793e72ca8cSmrg ;; 5280a1ed278cSmrg 52813e72ca8cSmrg hpux*) 52823e72ca8cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 52833e72ca8cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 52843e72ca8cSmrg # sets the default TLS model and affects inlining. 52853e72ca8cSmrg case $host_cpu in 52863e72ca8cSmrg hppa*64*) 52873e72ca8cSmrg # +Z the default 52883e72ca8cSmrg ;; 52893e72ca8cSmrg *) 52903e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 52913e72ca8cSmrg ;; 52923e72ca8cSmrg esac 52933e72ca8cSmrg ;; 5294a1ed278cSmrg 52953e72ca8cSmrg interix[[3-9]]*) 52963e72ca8cSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 52973e72ca8cSmrg # Instead, we relocate shared libraries at runtime. 52983e72ca8cSmrg ;; 5299a1ed278cSmrg 53003e72ca8cSmrg msdosdjgpp*) 53013e72ca8cSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 53023e72ca8cSmrg # on systems that don't support them. 53033e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53043e72ca8cSmrg enable_shared=no 53053e72ca8cSmrg ;; 5306a1ed278cSmrg 53073e72ca8cSmrg *nto* | *qnx*) 53083e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 53093e72ca8cSmrg # it will coredump. 53103e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 53113e72ca8cSmrg ;; 5312a1ed278cSmrg 53133e72ca8cSmrg sysv4*MP*) 53143e72ca8cSmrg if test -d /usr/nec; then 53153e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 53163e72ca8cSmrg fi 53173e72ca8cSmrg ;; 5318a1ed278cSmrg 53193e72ca8cSmrg *) 53203e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53213e72ca8cSmrg ;; 53223e72ca8cSmrg esac 5323a1ed278cSmrg 53243e72ca8cSmrg case $cc_basename in 53253e72ca8cSmrg nvcc*) # Cuda Compiler Driver 2.2 53263e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 53273e72ca8cSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 53283e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 53293e72ca8cSmrg fi 53303e72ca8cSmrg ;; 53313e72ca8cSmrg esac 5332a1ed278cSmrg else 53333e72ca8cSmrg # PORTME Check for flag to pass linker flags through the system compiler. 53343e72ca8cSmrg case $host_os in 53353e72ca8cSmrg aix*) 53363e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53373e72ca8cSmrg if test "$host_cpu" = ia64; then 53383e72ca8cSmrg # AIX 5 now supports IA64 processor 53393e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53403e72ca8cSmrg else 53413e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 53423e72ca8cSmrg fi 53433e72ca8cSmrg ;; 5344ee3138f1Smrg 53453e72ca8cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 53463e72ca8cSmrg # This hack is so that the source file can tell whether it is being 53473e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 53483e72ca8cSmrg m4_if([$1], [GCJ], [], 53493e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53503e72ca8cSmrg ;; 5351ee3138f1Smrg 53523e72ca8cSmrg hpux9* | hpux10* | hpux11*) 53533e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53543e72ca8cSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 53553e72ca8cSmrg # not for PA HP-UX. 53563e72ca8cSmrg case $host_cpu in 53573e72ca8cSmrg hppa*64*|ia64*) 53583e72ca8cSmrg # +Z the default 53593e72ca8cSmrg ;; 53603e72ca8cSmrg *) 53613e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 53623e72ca8cSmrg ;; 53633e72ca8cSmrg esac 53643e72ca8cSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 53653e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 53663e72ca8cSmrg ;; 536734977a2fSmrg 53683e72ca8cSmrg irix5* | irix6* | nonstopux*) 53693e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53703e72ca8cSmrg # PIC (with -KPIC) is the default. 53713e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 53723e72ca8cSmrg ;; 537334977a2fSmrg 53743e72ca8cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 53753e72ca8cSmrg case $cc_basename in 53763e72ca8cSmrg # old Intel for x86_64 which still supported -KPIC. 53773e72ca8cSmrg ecc*) 53783e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53793e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53803e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 53813e72ca8cSmrg ;; 53823e72ca8cSmrg # icc used to be incompatible with GCC. 53833e72ca8cSmrg # ICC 10 doesn't accept -KPIC any more. 53843e72ca8cSmrg icc* | ifort*) 53853e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53863e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53873e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 53883e72ca8cSmrg ;; 53893e72ca8cSmrg # Lahey Fortran 8.1. 53903e72ca8cSmrg lf95*) 53913e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53923e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 53933e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 53943e72ca8cSmrg ;; 53953e72ca8cSmrg nagfor*) 53963e72ca8cSmrg # NAG Fortran compiler 53973e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 53983e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 53993e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54003e72ca8cSmrg ;; 54013e72ca8cSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 54023e72ca8cSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 54033e72ca8cSmrg # which looks to be a dead project) 54043e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54053e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54063e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54073e72ca8cSmrg ;; 54083e72ca8cSmrg ccc*) 54093e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54103e72ca8cSmrg # All Alpha code is PIC. 54113e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54123e72ca8cSmrg ;; 54133e72ca8cSmrg xl* | bgxl* | bgf* | mpixl*) 54143e72ca8cSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 54153e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54163e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 54173e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 54183e72ca8cSmrg ;; 54193e72ca8cSmrg *) 54203e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 54213e72ca8cSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 54223e72ca8cSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 54233e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54243e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54253e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 54263e72ca8cSmrg ;; 54273e72ca8cSmrg *Sun\ F* | *Sun*Fortran*) 54283e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54293e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54303e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54313e72ca8cSmrg ;; 54323e72ca8cSmrg *Sun\ C*) 54333e72ca8cSmrg # Sun C 5.9 54343e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54353e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54363e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54373e72ca8cSmrg ;; 54383e72ca8cSmrg *Intel*\ [[CF]]*Compiler*) 54393e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54403e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54413e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54423e72ca8cSmrg ;; 54433e72ca8cSmrg *Portland\ Group*) 54443e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54453e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54463e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54473e72ca8cSmrg ;; 54483e72ca8cSmrg esac 54493e72ca8cSmrg ;; 54503e72ca8cSmrg esac 54513e72ca8cSmrg ;; 545234977a2fSmrg 54533e72ca8cSmrg newsos6) 54543e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54553e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54563e72ca8cSmrg ;; 5457ee3138f1Smrg 54583e72ca8cSmrg *nto* | *qnx*) 54593e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 54603e72ca8cSmrg # it will coredump. 54613e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 54623e72ca8cSmrg ;; 5463ee3138f1Smrg 54643e72ca8cSmrg osf3* | osf4* | osf5*) 54653e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54663e72ca8cSmrg # All OSF/1 code is PIC. 54673e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54683e72ca8cSmrg ;; 5469ee3138f1Smrg 54703e72ca8cSmrg rdos*) 54713e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54723e72ca8cSmrg ;; 5473ee3138f1Smrg 54743e72ca8cSmrg solaris*) 54753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54763e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54773e72ca8cSmrg case $cc_basename in 54783e72ca8cSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 54793e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 54803e72ca8cSmrg *) 54813e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 54823e72ca8cSmrg esac 54833e72ca8cSmrg ;; 5484ee3138f1Smrg 54853e72ca8cSmrg sunos4*) 54863e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54873e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 54883e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54893e72ca8cSmrg ;; 5490ee3138f1Smrg 54913e72ca8cSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 54923e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54933e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54943e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54953e72ca8cSmrg ;; 54963e72ca8cSmrg 54973e72ca8cSmrg sysv4*MP*) 54983e72ca8cSmrg if test -d /usr/nec ;then 54993e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 55003e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55013e72ca8cSmrg fi 55023e72ca8cSmrg ;; 55033e72ca8cSmrg 55043e72ca8cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 55053e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55063e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55073e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55083e72ca8cSmrg ;; 5509b425557eSmrg 55103e72ca8cSmrg unicos*) 55113e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55123e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55133e72ca8cSmrg ;; 5514b425557eSmrg 55153e72ca8cSmrg uts4*) 55163e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 55173e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55183e72ca8cSmrg ;; 5519b425557eSmrg 55203e72ca8cSmrg *) 55213e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55223e72ca8cSmrg ;; 55233e72ca8cSmrg esac 55243e72ca8cSmrg fi 55253e72ca8cSmrg]) 55263e72ca8cSmrgcase $host_os in 55273e72ca8cSmrg # For platforms which do not support PIC, -DPIC is meaningless: 55283e72ca8cSmrg *djgpp*) 55293e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 55303e72ca8cSmrg ;; 55313e72ca8cSmrg *) 55323e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 55333e72ca8cSmrg ;; 55343e72ca8cSmrgesac 5535b425557eSmrg 55363e72ca8cSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 55373e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 55383e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 55393e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5540b425557eSmrg 55413e72ca8cSmrg# 55423e72ca8cSmrg# Check to make sure the PIC flag actually works. 55433e72ca8cSmrg# 55443e72ca8cSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 55453e72ca8cSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 55463e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 55473e72ca8cSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 55483e72ca8cSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 55493e72ca8cSmrg "" | " "*) ;; 55503e72ca8cSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 55513e72ca8cSmrg esac], 55523e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 55533e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 55543e72ca8cSmrgfi 55553e72ca8cSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 55563e72ca8cSmrg [Additional compiler flags for building library objects]) 5557b425557eSmrg 55583e72ca8cSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 55593e72ca8cSmrg [How to pass a linker flag through the compiler]) 55603e72ca8cSmrg# 55613e72ca8cSmrg# Check to make sure the static flag actually works. 55623e72ca8cSmrg# 55633e72ca8cSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 55643e72ca8cSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 55653e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 55663e72ca8cSmrg $lt_tmp_static_flag, 55673e72ca8cSmrg [], 55683e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 55693e72ca8cSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 55703e72ca8cSmrg [Compiler flag to prevent dynamic linking]) 55713e72ca8cSmrg])# _LT_COMPILER_PIC 5572b425557eSmrg 5573ee3138f1Smrg 55743e72ca8cSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 55753e72ca8cSmrg# ---------------------------- 55763e72ca8cSmrg# See if the linker supports building shared libraries. 55773e72ca8cSmrgm4_defun([_LT_LINKER_SHLIBS], 55783e72ca8cSmrg[AC_REQUIRE([LT_PATH_LD])dnl 55793e72ca8cSmrgAC_REQUIRE([LT_PATH_NM])dnl 55803e72ca8cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 55813e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 55823e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 55833e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 55843e72ca8cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 55853e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 55863e72ca8cSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 55873e72ca8cSmrgm4_if([$1], [CXX], [ 55883e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55893e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 55903e72ca8cSmrg case $host_os in 55913e72ca8cSmrg aix[[4-9]]*) 55923e72ca8cSmrg # If we're using GNU nm, then we don't want the "-C" option. 55933e72ca8cSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 55943e72ca8cSmrg # Also, AIX nm treats weak defined symbols like other global defined 55953e72ca8cSmrg # symbols, whereas GNU nm marks them as "W". 55963e72ca8cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 55973e72ca8cSmrg _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' 55983e72ca8cSmrg else 55993e72ca8cSmrg _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' 56003e72ca8cSmrg fi 56013e72ca8cSmrg ;; 56023e72ca8cSmrg pw32*) 56033e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 56043e72ca8cSmrg ;; 56053e72ca8cSmrg cygwin* | mingw* | cegcc*) 56063e72ca8cSmrg case $cc_basename in 56073e72ca8cSmrg cl*) 56083e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56093e72ca8cSmrg ;; 56103e72ca8cSmrg *) 56113e72ca8cSmrg _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' 56123e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 56133e72ca8cSmrg ;; 56143e72ca8cSmrg esac 56153e72ca8cSmrg ;; 56163e72ca8cSmrg *) 56173e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56183e72ca8cSmrg ;; 56193e72ca8cSmrg esac 56203e72ca8cSmrg], [ 56213e72ca8cSmrg runpath_var= 56223e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 56233e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 56243e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)= 56253e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 56263e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 56273e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 56283e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 56293e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56303e72ca8cSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 56313e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 56323e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 56333e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 56343e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 56353e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 56363e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 56373e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=no 56383e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 56393e72ca8cSmrg _LT_TAGVAR(module_cmds, $1)= 56403e72ca8cSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 56413e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 56423e72ca8cSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 56433e72ca8cSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 56443e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 56453e72ca8cSmrg # include_expsyms should be a list of space-separated symbols to be *always* 56463e72ca8cSmrg # included in the symbol list 56473e72ca8cSmrg _LT_TAGVAR(include_expsyms, $1)= 56483e72ca8cSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 56493e72ca8cSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 56503e72ca8cSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 56513e72ca8cSmrg # as well as any symbol that contains `d'. 56523e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56533e72ca8cSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 56543e72ca8cSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 56553e72ca8cSmrg # the symbol is explicitly referenced. Since portable code cannot 56563e72ca8cSmrg # rely on this symbol name, it's probably fine to never include it in 56573e72ca8cSmrg # preloaded symbol tables. 56583e72ca8cSmrg # Exclude shared library initialization/finalization symbols. 56593e72ca8cSmrgdnl Note also adjust exclude_expsyms for C++ above. 56603e72ca8cSmrg extract_expsyms_cmds= 5661ee3138f1Smrg 56623e72ca8cSmrg case $host_os in 56633e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 56643e72ca8cSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 56653e72ca8cSmrg # When not using gcc, we currently assume that we are using 56663e72ca8cSmrg # Microsoft Visual C++. 56673e72ca8cSmrg if test "$GCC" != yes; then 56683e72ca8cSmrg with_gnu_ld=no 56693e72ca8cSmrg fi 56703e72ca8cSmrg ;; 56713e72ca8cSmrg interix*) 56723e72ca8cSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 56733e72ca8cSmrg with_gnu_ld=yes 56743e72ca8cSmrg ;; 56753e72ca8cSmrg openbsd*) 56763e72ca8cSmrg with_gnu_ld=no 56773e72ca8cSmrg ;; 56783e72ca8cSmrg esac 567934977a2fSmrg 56803e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 568134977a2fSmrg 56823e72ca8cSmrg # On some targets, GNU ld is compatible enough with the native linker 56833e72ca8cSmrg # that we're better off using the native interface for both. 56843e72ca8cSmrg lt_use_gnu_ld_interface=no 56853e72ca8cSmrg if test "$with_gnu_ld" = yes; then 56863e72ca8cSmrg case $host_os in 56873e72ca8cSmrg aix*) 56883e72ca8cSmrg # The AIX port of GNU ld has always aspired to compatibility 56893e72ca8cSmrg # with the native linker. However, as the warning in the GNU ld 56903e72ca8cSmrg # block says, versions before 2.19.5* couldn't really create working 56913e72ca8cSmrg # shared libraries, regardless of the interface used. 56923e72ca8cSmrg case `$LD -v 2>&1` in 56933e72ca8cSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 56943e72ca8cSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 56953e72ca8cSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 56963e72ca8cSmrg *) 56973e72ca8cSmrg lt_use_gnu_ld_interface=yes 5698a1ed278cSmrg ;; 56993e72ca8cSmrg esac 57003e72ca8cSmrg ;; 57013e72ca8cSmrg *) 57023e72ca8cSmrg lt_use_gnu_ld_interface=yes 57033e72ca8cSmrg ;; 57043e72ca8cSmrg esac 57053e72ca8cSmrg fi 5706a1ed278cSmrg 57073e72ca8cSmrg if test "$lt_use_gnu_ld_interface" = yes; then 57083e72ca8cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 57093e72ca8cSmrg wlarc='${wl}' 5710a1ed278cSmrg 57113e72ca8cSmrg # Set some defaults for GNU ld with shared library support. These 57123e72ca8cSmrg # are reset later if shared libraries are not supported. Putting them 57133e72ca8cSmrg # here allows them to be overridden if necessary. 57143e72ca8cSmrg runpath_var=LD_RUN_PATH 57153e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 57163e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 57173e72ca8cSmrg # ancient GNU ld didn't support --whole-archive et. al. 57183e72ca8cSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 57193e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 57203e72ca8cSmrg else 57213e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57223e72ca8cSmrg fi 57233e72ca8cSmrg supports_anon_versioning=no 57243e72ca8cSmrg case `$LD -v 2>&1` in 57253e72ca8cSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 57263e72ca8cSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 57273e72ca8cSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 57283e72ca8cSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 57293e72ca8cSmrg *\ 2.11.*) ;; # other 2.11 versions 57303e72ca8cSmrg *) supports_anon_versioning=yes ;; 57313e72ca8cSmrg esac 5732a1ed278cSmrg 57333e72ca8cSmrg # See if GNU ld supports shared libraries. 57343e72ca8cSmrg case $host_os in 57353e72ca8cSmrg aix[[3-9]]*) 57363e72ca8cSmrg # On AIX/PPC, the GNU linker is very broken 57373e72ca8cSmrg if test "$host_cpu" != ia64; then 57383e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57393e72ca8cSmrg cat <<_LT_EOF 1>&2 5740a1ed278cSmrg 57413e72ca8cSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 57423e72ca8cSmrg*** to be unable to reliably create shared libraries on AIX. 57433e72ca8cSmrg*** Therefore, libtool is disabling shared libraries support. If you 57443e72ca8cSmrg*** really care for shared libraries, you may want to install binutils 57453e72ca8cSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 57463e72ca8cSmrg*** You will then need to restart the configuration process. 5747a1ed278cSmrg 57483e72ca8cSmrg_LT_EOF 57493e72ca8cSmrg fi 57503e72ca8cSmrg ;; 5751ee3138f1Smrg 57523e72ca8cSmrg amigaos*) 57533e72ca8cSmrg case $host_cpu in 57543e72ca8cSmrg powerpc) 57553e72ca8cSmrg # see comment about AmigaOS4 .so support 57563e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57573e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 57583e72ca8cSmrg ;; 57593e72ca8cSmrg m68k) 57603e72ca8cSmrg _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)' 57613e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57623e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57633e72ca8cSmrg ;; 57643e72ca8cSmrg esac 57653e72ca8cSmrg ;; 5766ee3138f1Smrg 57673e72ca8cSmrg beos*) 57683e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 57693e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 57703e72ca8cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 57713e72ca8cSmrg # support --undefined. This deserves some investigation. FIXME 57723e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57733e72ca8cSmrg else 57743e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57753e72ca8cSmrg fi 57763e72ca8cSmrg ;; 5777ee3138f1Smrg 57783e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 57793e72ca8cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 57803e72ca8cSmrg # as there is no search path for DLLs. 57813e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57823e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 57833e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 57843e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 57853e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57863e72ca8cSmrg _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' 57873e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5788ee3138f1Smrg 57893e72ca8cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 57903e72ca8cSmrg _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' 57913e72ca8cSmrg # If the export-symbols file already is a .def file (1st line 57923e72ca8cSmrg # is EXPORTS), use it as is; otherwise, prepend... 57933e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 57943e72ca8cSmrg cp $export_symbols $output_objdir/$soname.def; 57953e72ca8cSmrg else 57963e72ca8cSmrg echo EXPORTS > $output_objdir/$soname.def; 57973e72ca8cSmrg cat $export_symbols >> $output_objdir/$soname.def; 57983e72ca8cSmrg fi~ 57993e72ca8cSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 58003e72ca8cSmrg else 58013e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58023e72ca8cSmrg fi 58033e72ca8cSmrg ;; 5804ee3138f1Smrg 58053e72ca8cSmrg haiku*) 58063e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58073e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58083e72ca8cSmrg ;; 5809ee3138f1Smrg 58103e72ca8cSmrg interix[[3-9]]*) 58113e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 58123e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58133e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58143e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 58153e72ca8cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 58163e72ca8cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 58173e72ca8cSmrg # default) and relocated if they conflict, which is a slow very memory 58183e72ca8cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 58193e72ca8cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 58203e72ca8cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 58213e72ca8cSmrg _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' 58223e72ca8cSmrg _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' 58233e72ca8cSmrg ;; 5824ee3138f1Smrg 58253e72ca8cSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 58263e72ca8cSmrg tmp_diet=no 58273e72ca8cSmrg if test "$host_os" = linux-dietlibc; then 58283e72ca8cSmrg case $cc_basename in 58293e72ca8cSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 58303e72ca8cSmrg esac 58313e72ca8cSmrg fi 58323e72ca8cSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 58333e72ca8cSmrg && test "$tmp_diet" = no 58343e72ca8cSmrg then 58353e72ca8cSmrg tmp_addflag=' $pic_flag' 58363e72ca8cSmrg tmp_sharedflag='-shared' 58373e72ca8cSmrg case $cc_basename,$host_cpu in 58383e72ca8cSmrg pgcc*) # Portland Group C compiler 58393e72ca8cSmrg _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' 58403e72ca8cSmrg tmp_addflag=' $pic_flag' 58413e72ca8cSmrg ;; 58423e72ca8cSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 58433e72ca8cSmrg # Portland Group f77 and f90 compilers 58443e72ca8cSmrg _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' 58453e72ca8cSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 58463e72ca8cSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 58473e72ca8cSmrg tmp_addflag=' -i_dynamic' ;; 58483e72ca8cSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 58493e72ca8cSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 58503e72ca8cSmrg ifc* | ifort*) # Intel Fortran compiler 58513e72ca8cSmrg tmp_addflag=' -nofor_main' ;; 58523e72ca8cSmrg lf95*) # Lahey Fortran 8.1 58533e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 58543e72ca8cSmrg tmp_sharedflag='--shared' ;; 58553e72ca8cSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 58563e72ca8cSmrg tmp_sharedflag='-qmkshrobj' 58573e72ca8cSmrg tmp_addflag= ;; 58583e72ca8cSmrg nvcc*) # Cuda Compiler Driver 2.2 58593e72ca8cSmrg _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' 58603e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 58613e72ca8cSmrg ;; 58623e72ca8cSmrg esac 58633e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 58643e72ca8cSmrg *Sun\ C*) # Sun C 5.9 58653e72ca8cSmrg _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' 58663e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 58673e72ca8cSmrg tmp_sharedflag='-G' ;; 58683e72ca8cSmrg *Sun\ F*) # Sun Fortran 8.3 58693e72ca8cSmrg tmp_sharedflag='-G' ;; 58703e72ca8cSmrg esac 58713e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5872ee3138f1Smrg 58733e72ca8cSmrg if test "x$supports_anon_versioning" = xyes; then 58743e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 58753e72ca8cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 58763e72ca8cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 58773e72ca8cSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 58783e72ca8cSmrg fi 5879ee3138f1Smrg 58803e72ca8cSmrg case $cc_basename in 58813e72ca8cSmrg xlf* | bgf* | bgxlf* | mpixlf*) 58823e72ca8cSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 58833e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 58843e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58853e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 58863e72ca8cSmrg if test "x$supports_anon_versioning" = xyes; then 58873e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 58883e72ca8cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 58893e72ca8cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 58903e72ca8cSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 58913e72ca8cSmrg fi 58923e72ca8cSmrg ;; 5893b425557eSmrg esac 58943e72ca8cSmrg else 58953e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58963e72ca8cSmrg fi 58973e72ca8cSmrg ;; 5898ee3138f1Smrg 58993e72ca8cSmrg netbsd*) 59003e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 59013e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 59023e72ca8cSmrg wlarc= 59033e72ca8cSmrg else 59043e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59053e72ca8cSmrg _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' 59063e72ca8cSmrg fi 59073e72ca8cSmrg ;; 59083e72ca8cSmrg 59093e72ca8cSmrg solaris*) 59103e72ca8cSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5911a1ed278cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59123e72ca8cSmrg cat <<_LT_EOF 1>&2 5913ee3138f1Smrg 59143e72ca8cSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 59153e72ca8cSmrg*** create shared libraries on Solaris systems. Therefore, libtool 59163e72ca8cSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 59173e72ca8cSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 59183e72ca8cSmrg*** your PATH or compiler configuration so that the native linker is 59193e72ca8cSmrg*** used, and then restart. 5920ee3138f1Smrg 59213e72ca8cSmrg_LT_EOF 59223e72ca8cSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59233e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59243e72ca8cSmrg _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' 59253e72ca8cSmrg else 59263e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59273e72ca8cSmrg fi 59283e72ca8cSmrg ;; 5929ee3138f1Smrg 59303e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 59313e72ca8cSmrg case `$LD -v 2>&1` in 59323e72ca8cSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 59333e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59343e72ca8cSmrg cat <<_LT_EOF 1>&2 5935ee3138f1Smrg 59363e72ca8cSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 59373e72ca8cSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 59383e72ca8cSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 59393e72ca8cSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 59403e72ca8cSmrg*** your PATH or compiler configuration so that the native linker is 59413e72ca8cSmrg*** used, and then restart. 594234977a2fSmrg 59433e72ca8cSmrg_LT_EOF 5944a1ed278cSmrg ;; 59453e72ca8cSmrg *) 59463e72ca8cSmrg # For security reasons, it is highly recommended that you always 59473e72ca8cSmrg # use absolute paths for naming shared libraries, and exclude the 59483e72ca8cSmrg # DT_RUNPATH tag from executables and libraries. But doing so 59493e72ca8cSmrg # requires that you compile everything twice, which is a pain. 59503e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59513e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59523e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59533e72ca8cSmrg _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' 59543e72ca8cSmrg else 59553e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5956a1ed278cSmrg fi 5957a1ed278cSmrg ;; 59583e72ca8cSmrg esac 59593e72ca8cSmrg ;; 5960ee3138f1Smrg 59613e72ca8cSmrg sunos4*) 59623e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 59633e72ca8cSmrg wlarc= 59643e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 59653e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59663e72ca8cSmrg ;; 5967a1ed278cSmrg 59683e72ca8cSmrg *) 59693e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59703e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59713e72ca8cSmrg _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' 59723e72ca8cSmrg else 59733e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59743e72ca8cSmrg fi 59753e72ca8cSmrg ;; 59763e72ca8cSmrg esac 5977ee3138f1Smrg 59783e72ca8cSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 59793e72ca8cSmrg runpath_var= 59803e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 59813e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 59823e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59833e72ca8cSmrg fi 59843e72ca8cSmrg else 59853e72ca8cSmrg # PORTME fill in a description of your system's linker (not GNU ld) 59863e72ca8cSmrg case $host_os in 59873e72ca8cSmrg aix3*) 59883e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 59893e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 59903e72ca8cSmrg _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' 59913e72ca8cSmrg # Note: this linker hardcodes the directories in LIBPATH if there 59923e72ca8cSmrg # are no directories specified by -L. 59933e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59943e72ca8cSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 59953e72ca8cSmrg # Neither direct hardcoding nor static linking is supported with a 59963e72ca8cSmrg # broken collect2. 59973e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 59983e72ca8cSmrg fi 59993e72ca8cSmrg ;; 6000a1ed278cSmrg 60013e72ca8cSmrg aix[[4-9]]*) 60023e72ca8cSmrg if test "$host_cpu" = ia64; then 60033e72ca8cSmrg # On IA64, the linker does run time linking by default, so we don't 60043e72ca8cSmrg # have to do anything special. 60053e72ca8cSmrg aix_use_runtimelinking=no 60063e72ca8cSmrg exp_sym_flag='-Bexport' 60073e72ca8cSmrg no_entry_flag="" 60083e72ca8cSmrg else 60093e72ca8cSmrg # If we're using GNU nm, then we don't want the "-C" option. 60103e72ca8cSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 60113e72ca8cSmrg # Also, AIX nm treats weak defined symbols like other global 60123e72ca8cSmrg # defined symbols, whereas GNU nm marks them as "W". 60133e72ca8cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 60143e72ca8cSmrg _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' 60153e72ca8cSmrg else 60163e72ca8cSmrg _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' 60173e72ca8cSmrg fi 60183e72ca8cSmrg aix_use_runtimelinking=no 6019a1ed278cSmrg 60203e72ca8cSmrg # Test if we are trying to use run time linking or normal 60213e72ca8cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60223e72ca8cSmrg # need to do runtime linking. 60233e72ca8cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60243e72ca8cSmrg for ld_flag in $LDFLAGS; do 60253e72ca8cSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 60263e72ca8cSmrg aix_use_runtimelinking=yes 60273e72ca8cSmrg break 60283e72ca8cSmrg fi 60293e72ca8cSmrg done 60303e72ca8cSmrg ;; 60313e72ca8cSmrg esac 6032a1ed278cSmrg 60333e72ca8cSmrg exp_sym_flag='-bexport' 60343e72ca8cSmrg no_entry_flag='-bnoentry' 60353e72ca8cSmrg fi 6036a1ed278cSmrg 60373e72ca8cSmrg # When large executables or shared objects are built, AIX ld can 60383e72ca8cSmrg # have problems creating the table of contents. If linking a library 60393e72ca8cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 60403e72ca8cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60413e72ca8cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6042a1ed278cSmrg 60433e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='' 60443e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60453e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60463e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60473e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60483e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6049a1ed278cSmrg 60503e72ca8cSmrg if test "$GCC" = yes; then 60513e72ca8cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60523e72ca8cSmrg # We only want to do this on AIX 4.2 and lower, the check 60533e72ca8cSmrg # below for broken collect2 doesn't work under 4.3+ 60543e72ca8cSmrg collect2name=`${CC} -print-prog-name=collect2` 60553e72ca8cSmrg if test -f "$collect2name" && 60563e72ca8cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60573e72ca8cSmrg then 60583e72ca8cSmrg # We have reworked collect2 60593e72ca8cSmrg : 60603e72ca8cSmrg else 60613e72ca8cSmrg # We have old collect2 60623e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60633e72ca8cSmrg # It fails to find uninstalled libraries when the uninstalled 60643e72ca8cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 60653e72ca8cSmrg # to unsupported forces relinking 60663e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60673e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60683e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60693e72ca8cSmrg fi 60703e72ca8cSmrg ;; 60713e72ca8cSmrg esac 60723e72ca8cSmrg shared_flag='-shared' 60733e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 60743e72ca8cSmrg shared_flag="$shared_flag "'${wl}-G' 60753e72ca8cSmrg fi 60763e72ca8cSmrg else 60773e72ca8cSmrg # not using gcc 60783e72ca8cSmrg if test "$host_cpu" = ia64; then 60793e72ca8cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60803e72ca8cSmrg # chokes on -Wl,-G. The following line is correct: 60813e72ca8cSmrg shared_flag='-G' 60823e72ca8cSmrg else 60833e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 60843e72ca8cSmrg shared_flag='${wl}-G' 60853e72ca8cSmrg else 60863e72ca8cSmrg shared_flag='${wl}-bM:SRE' 60873e72ca8cSmrg fi 60883e72ca8cSmrg fi 60893e72ca8cSmrg fi 6090a1ed278cSmrg 60913e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60923e72ca8cSmrg # It seems that -bexpall does not export symbols beginning with 60933e72ca8cSmrg # underscore (_), so it is better to generate a list of symbols to export. 60943e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 60953e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 60963e72ca8cSmrg # Warning - without using the other runtime loading flags (-brtl), 60973e72ca8cSmrg # -berok will link without error, but may produce a broken library. 60983e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60993e72ca8cSmrg # Determine the default libpath from the value encoded in an 61003e72ca8cSmrg # empty executable. 61013e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 61023e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61033e72ca8cSmrg _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" 61043e72ca8cSmrg else 61053e72ca8cSmrg if test "$host_cpu" = ia64; then 61063e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 61073e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 61083e72ca8cSmrg _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" 61093e72ca8cSmrg else 61103e72ca8cSmrg # Determine the default libpath from the value encoded in an 61113e72ca8cSmrg # empty executable. 61123e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 61133e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61143e72ca8cSmrg # Warning - without using the other run time loading flags, 61153e72ca8cSmrg # -berok will link without error, but may produce a broken library. 61163e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61173e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 61183e72ca8cSmrg if test "$with_gnu_ld" = yes; then 61193e72ca8cSmrg # We only use this code for GNU lds that support --whole-archive. 61203e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 61213e72ca8cSmrg else 61223e72ca8cSmrg # Exported symbols can be pulled into shared objects from archives 61233e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 61243e72ca8cSmrg fi 61253e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61263e72ca8cSmrg # This is similar to how AIX traditionally builds its shared libraries. 61273e72ca8cSmrg _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' 61283e72ca8cSmrg fi 61293e72ca8cSmrg fi 61303e72ca8cSmrg ;; 6131a1ed278cSmrg 61323e72ca8cSmrg amigaos*) 61333e72ca8cSmrg case $host_cpu in 61343e72ca8cSmrg powerpc) 61353e72ca8cSmrg # see comment about AmigaOS4 .so support 61363e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61373e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 61383e72ca8cSmrg ;; 61393e72ca8cSmrg m68k) 61403e72ca8cSmrg _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)' 61413e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61423e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61433e72ca8cSmrg ;; 61443e72ca8cSmrg esac 61453e72ca8cSmrg ;; 6146ee3138f1Smrg 61473e72ca8cSmrg bsdi[[45]]*) 61483e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 61493e72ca8cSmrg ;; 6150ee3138f1Smrg 61513e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 61523e72ca8cSmrg # When not using gcc, we currently assume that we are using 61533e72ca8cSmrg # Microsoft Visual C++. 61543e72ca8cSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 61553e72ca8cSmrg # no search path for DLLs. 61563e72ca8cSmrg case $cc_basename in 61573e72ca8cSmrg cl*) 61583e72ca8cSmrg # Native MSVC 61593e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61603e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61613e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 61623e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 61633e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 61643e72ca8cSmrg libext=lib 61653e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 61663e72ca8cSmrg shrext_cmds=".dll" 61673e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 61683e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 61693e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61703e72ca8cSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 61713e72ca8cSmrg else 61723e72ca8cSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 61733e72ca8cSmrg fi~ 61743e72ca8cSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 61753e72ca8cSmrg linknames=' 61763e72ca8cSmrg # The linker will not automatically build a static lib if we build a DLL. 61773e72ca8cSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 61783e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61793e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 61803e72ca8cSmrg _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' 61813e72ca8cSmrg # Don't use ranlib 61823e72ca8cSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 61833e72ca8cSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 61843e72ca8cSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 61853e72ca8cSmrg case $lt_outputfile in 61863e72ca8cSmrg *.exe|*.EXE) ;; 61873e72ca8cSmrg *) 61883e72ca8cSmrg lt_outputfile="$lt_outputfile.exe" 61893e72ca8cSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 61903e72ca8cSmrg ;; 61913e72ca8cSmrg esac~ 61923e72ca8cSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 61933e72ca8cSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 61943e72ca8cSmrg $RM "$lt_outputfile.manifest"; 61953e72ca8cSmrg fi' 61963e72ca8cSmrg ;; 61973e72ca8cSmrg *) 61983e72ca8cSmrg # Assume MSVC wrapper 61993e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 62003e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 62013e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 62023e72ca8cSmrg libext=lib 62033e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 62043e72ca8cSmrg shrext_cmds=".dll" 62053e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 62063e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 62073e72ca8cSmrg # The linker will automatically build a .lib file if we build a DLL. 62083e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62093e72ca8cSmrg # FIXME: Should let the user specify the lib program. 62103e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 62113e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 62123e72ca8cSmrg ;; 62133e72ca8cSmrg esac 62143e72ca8cSmrg ;; 6215ee3138f1Smrg 62163e72ca8cSmrg darwin* | rhapsody*) 62173e72ca8cSmrg _LT_DARWIN_LINKER_FEATURES($1) 62183e72ca8cSmrg ;; 621934977a2fSmrg 62203e72ca8cSmrg dgux*) 62213e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62223e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62233e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62243e72ca8cSmrg ;; 6225ee3138f1Smrg 62263e72ca8cSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 62273e72ca8cSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 62283e72ca8cSmrg # does not break anything, and helps significantly (at the cost of a little 62293e72ca8cSmrg # extra space). 62303e72ca8cSmrg freebsd2.2*) 62313e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 62323e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62333e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62343e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62353e72ca8cSmrg ;; 6236ee3138f1Smrg 62373e72ca8cSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 62383e72ca8cSmrg freebsd2.*) 62393e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 62403e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62413e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62423e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62433e72ca8cSmrg ;; 6244ee3138f1Smrg 62453e72ca8cSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 62463e72ca8cSmrg freebsd* | dragonfly*) 62473e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62483e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62493e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6250a1ed278cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62513e72ca8cSmrg ;; 6252ee3138f1Smrg 62533e72ca8cSmrg hpux9*) 62543e72ca8cSmrg if test "$GCC" = yes; then 62553e72ca8cSmrg _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' 62563e72ca8cSmrg else 62573e72ca8cSmrg _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' 62583e72ca8cSmrg fi 62593e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62603e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62613e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62623e72ca8cSmrg 62633e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 62643e72ca8cSmrg # but as the default location of the library. 62653e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62663e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62673e72ca8cSmrg ;; 62683e72ca8cSmrg 62693e72ca8cSmrg hpux10*) 62703e72ca8cSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 62713e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 62723e72ca8cSmrg else 62733e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 62743e72ca8cSmrg fi 62753e72ca8cSmrg if test "$with_gnu_ld" = no; then 62763e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62773e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62783e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62793e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 62803e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62813e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 62823e72ca8cSmrg # but as the default location of the library. 62833e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62843e72ca8cSmrg fi 62853e72ca8cSmrg ;; 62863e72ca8cSmrg 62873e72ca8cSmrg hpux11*) 62883e72ca8cSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 62893e72ca8cSmrg case $host_cpu in 62903e72ca8cSmrg hppa*64*) 62913e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 62923e72ca8cSmrg ;; 62933e72ca8cSmrg ia64*) 62943e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6295b425557eSmrg ;; 6296a1ed278cSmrg *) 62973e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6298a1ed278cSmrg ;; 62993e72ca8cSmrg esac 63003e72ca8cSmrg else 63013e72ca8cSmrg case $host_cpu in 63023e72ca8cSmrg hppa*64*) 63033e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63043e72ca8cSmrg ;; 63053e72ca8cSmrg ia64*) 63063e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 63073e72ca8cSmrg ;; 63083e72ca8cSmrg *) 63093e72ca8cSmrg m4_if($1, [], [ 63103e72ca8cSmrg # Older versions of the 11.00 compiler do not understand -b yet 63113e72ca8cSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 63123e72ca8cSmrg _LT_LINKER_OPTION([if $CC understands -b], 63133e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 63143e72ca8cSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 63153e72ca8cSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 63163e72ca8cSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 63173e72ca8cSmrg ;; 63183e72ca8cSmrg esac 63193e72ca8cSmrg fi 63203e72ca8cSmrg if test "$with_gnu_ld" = no; then 63213e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63223e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6323ee3138f1Smrg 63243e72ca8cSmrg case $host_cpu in 63253e72ca8cSmrg hppa*64*|ia64*) 63263e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63273e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63283e72ca8cSmrg ;; 63293e72ca8cSmrg *) 63303e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63313e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63323e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6333a1ed278cSmrg 63343e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 63353e72ca8cSmrg # but as the default location of the library. 63363e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63373e72ca8cSmrg ;; 6338a1ed278cSmrg esac 63393e72ca8cSmrg fi 6340b425557eSmrg ;; 6341ee3138f1Smrg 63423e72ca8cSmrg irix5* | irix6* | nonstopux*) 63433e72ca8cSmrg if test "$GCC" = yes; then 63443e72ca8cSmrg _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' 63453e72ca8cSmrg # Try to use the -exported_symbol ld option, if it does not 63463e72ca8cSmrg # work, assume that -exports_file does not work either and 63473e72ca8cSmrg # implicitly export all symbols. 63483e72ca8cSmrg # This should be the same for all languages, so no per-tag cache variable. 63493e72ca8cSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 63503e72ca8cSmrg [lt_cv_irix_exported_symbol], 63513e72ca8cSmrg [save_LDFLAGS="$LDFLAGS" 63523e72ca8cSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 63533e72ca8cSmrg AC_LINK_IFELSE( 63543e72ca8cSmrg [AC_LANG_SOURCE( 63553e72ca8cSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 63563e72ca8cSmrg [C++], [[int foo (void) { return 0; }]], 63573e72ca8cSmrg [Fortran 77], [[ 63583e72ca8cSmrg subroutine foo 63593e72ca8cSmrg end]], 63603e72ca8cSmrg [Fortran], [[ 63613e72ca8cSmrg subroutine foo 63623e72ca8cSmrg end]])])], 63633e72ca8cSmrg [lt_cv_irix_exported_symbol=yes], 63643e72ca8cSmrg [lt_cv_irix_exported_symbol=no]) 63653e72ca8cSmrg LDFLAGS="$save_LDFLAGS"]) 63663e72ca8cSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 63673e72ca8cSmrg _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' 63683e72ca8cSmrg fi 63693e72ca8cSmrg else 63703e72ca8cSmrg _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' 63713e72ca8cSmrg _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' 63723e72ca8cSmrg fi 63733e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 63743e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63753e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63763e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 63773e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 63783e72ca8cSmrg ;; 6379a1ed278cSmrg 63803e72ca8cSmrg netbsd*) 63813e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 63823e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 63833e72ca8cSmrg else 63843e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 63853e72ca8cSmrg fi 63863e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63873e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63883e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63893e72ca8cSmrg ;; 6390a1ed278cSmrg 63913e72ca8cSmrg newsos6) 63923e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63933e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63943e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63953e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63963e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63973e72ca8cSmrg ;; 639834977a2fSmrg 63993e72ca8cSmrg *nto* | *qnx*) 64003e72ca8cSmrg ;; 6401ee3138f1Smrg 64023e72ca8cSmrg openbsd*) 64033e72ca8cSmrg if test -f /usr/libexec/ld.so; then 64043e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 64053e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64063e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64073e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 64083e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 64093e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 64103e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64113e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 64123e72ca8cSmrg else 64133e72ca8cSmrg case $host_os in 64143e72ca8cSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 64153e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 64163e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64173e72ca8cSmrg ;; 64183e72ca8cSmrg *) 64193e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 64203e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64213e72ca8cSmrg ;; 64223e72ca8cSmrg esac 64233e72ca8cSmrg fi 64243e72ca8cSmrg else 64253e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 64263e72ca8cSmrg fi 64273e72ca8cSmrg ;; 6428ee3138f1Smrg 64293e72ca8cSmrg os2*) 64303e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 64313e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64323e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 64333e72ca8cSmrg _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' 64343e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 64353e72ca8cSmrg ;; 6436ee3138f1Smrg 64373e72ca8cSmrg osf3*) 64383e72ca8cSmrg if test "$GCC" = yes; then 64393e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 64403e72ca8cSmrg _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' 64413e72ca8cSmrg else 64423e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 64433e72ca8cSmrg _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' 64443e72ca8cSmrg fi 64453e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64463e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64473e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64483e72ca8cSmrg ;; 6449ee3138f1Smrg 64503e72ca8cSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 64513e72ca8cSmrg if test "$GCC" = yes; then 64523e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 64533e72ca8cSmrg _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' 64543e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64553e72ca8cSmrg else 64563e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 64573e72ca8cSmrg _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' 64583e72ca8cSmrg _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~ 64593e72ca8cSmrg $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' 6460ee3138f1Smrg 64613e72ca8cSmrg # Both c and cxx compiler support -rpath directly 64623e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 64633e72ca8cSmrg fi 64643e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64653e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64663e72ca8cSmrg ;; 6467ee3138f1Smrg 64683e72ca8cSmrg solaris*) 64693e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 64703e72ca8cSmrg if test "$GCC" = yes; then 64713e72ca8cSmrg wlarc='${wl}' 64723e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64733e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 64743e72ca8cSmrg $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' 64753e72ca8cSmrg else 64763e72ca8cSmrg case `$CC -V 2>&1` in 64773e72ca8cSmrg *"Compilers 5.0"*) 64783e72ca8cSmrg wlarc='' 64793e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 64803e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 64813e72ca8cSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 64823e72ca8cSmrg ;; 64833e72ca8cSmrg *) 64843e72ca8cSmrg wlarc='${wl}' 64853e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 64863e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 64873e72ca8cSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 64883e72ca8cSmrg ;; 64893e72ca8cSmrg esac 64903e72ca8cSmrg fi 64913e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64923e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64933e72ca8cSmrg case $host_os in 64943e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 64953e72ca8cSmrg *) 64963e72ca8cSmrg # The compiler driver will combine and reorder linker options, 64973e72ca8cSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 64983e72ca8cSmrg # but is careful enough not to reorder. 64993e72ca8cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 65003e72ca8cSmrg if test "$GCC" = yes; then 65013e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 65023e72ca8cSmrg else 65033e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 65043e72ca8cSmrg fi 65053e72ca8cSmrg ;; 65063e72ca8cSmrg esac 65073e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65083e72ca8cSmrg ;; 650934977a2fSmrg 65103e72ca8cSmrg sunos4*) 65113e72ca8cSmrg if test "x$host_vendor" = xsequent; then 65123e72ca8cSmrg # Use $CC to link under sequent, because it throws in some extra .o 65133e72ca8cSmrg # files that make .init and .fini sections work. 65143e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 65153e72ca8cSmrg else 65163e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 65173e72ca8cSmrg fi 65183e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65193e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65203e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65213e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65223e72ca8cSmrg ;; 652334977a2fSmrg 65243e72ca8cSmrg sysv4) 65253e72ca8cSmrg case $host_vendor in 65263e72ca8cSmrg sni) 65273e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65283e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 65293e72ca8cSmrg ;; 65303e72ca8cSmrg siemens) 65313e72ca8cSmrg ## LD is ld it makes a PLAMLIB 65323e72ca8cSmrg ## CC just makes a GrossModule. 65333e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 65343e72ca8cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 65353e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 65363e72ca8cSmrg ;; 65373e72ca8cSmrg motorola) 65383e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65393e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 65403e72ca8cSmrg ;; 65413e72ca8cSmrg esac 65423e72ca8cSmrg runpath_var='LD_RUN_PATH' 65433e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65443e72ca8cSmrg ;; 6545a1ed278cSmrg 65463e72ca8cSmrg sysv4.3*) 65473e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65483e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65493e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 65503e72ca8cSmrg ;; 6551a1ed278cSmrg 65523e72ca8cSmrg sysv4*MP*) 65533e72ca8cSmrg if test -d /usr/nec; then 65543e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65553e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65563e72ca8cSmrg runpath_var=LD_RUN_PATH 65573e72ca8cSmrg hardcode_runpath_var=yes 65583e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 65593e72ca8cSmrg fi 65603e72ca8cSmrg ;; 6561a1ed278cSmrg 65623e72ca8cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 65633e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 65643e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 65653e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65663e72ca8cSmrg runpath_var='LD_RUN_PATH' 6567a1ed278cSmrg 65683e72ca8cSmrg if test "$GCC" = yes; then 65693e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65703e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65713e72ca8cSmrg else 65723e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65733e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65743e72ca8cSmrg fi 65753e72ca8cSmrg ;; 6576a1ed278cSmrg 65773e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6*) 65783e72ca8cSmrg # Note: We can NOT use -z defs as we might desire, because we do not 65793e72ca8cSmrg # link with -lc, and that would cause any symbols used from libc to 65803e72ca8cSmrg # always be unresolved, which means just about no library would 65813e72ca8cSmrg # ever link correctly. If we're not using GNU ld we use -z text 65823e72ca8cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 65833e72ca8cSmrg # as -z defs. 65843e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 65853e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 65863e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 65873e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65883e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 65893e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65903e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65913e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 65923e72ca8cSmrg runpath_var='LD_RUN_PATH' 6593a1ed278cSmrg 65943e72ca8cSmrg if test "$GCC" = yes; then 65953e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65963e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65973e72ca8cSmrg else 65983e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65993e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66003e72ca8cSmrg fi 66013e72ca8cSmrg ;; 660234977a2fSmrg 66033e72ca8cSmrg uts4*) 66043e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66053e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66063e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66073e72ca8cSmrg ;; 660834977a2fSmrg 66093e72ca8cSmrg *) 66103e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66113e72ca8cSmrg ;; 6612a1ed278cSmrg esac 6613ee3138f1Smrg 66143e72ca8cSmrg if test x$host_vendor = xsni; then 66153e72ca8cSmrg case $host in 66163e72ca8cSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 66173e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 66183e72ca8cSmrg ;; 66193e72ca8cSmrg esac 66203e72ca8cSmrg fi 66213e72ca8cSmrg fi 66223e72ca8cSmrg]) 66233e72ca8cSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 66243e72ca8cSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6625ee3138f1Smrg 66263e72ca8cSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6627ee3138f1Smrg 66283e72ca8cSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 66293e72ca8cSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 66303e72ca8cSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 66313e72ca8cSmrg [The commands to extract the exported symbol list from a shared archive]) 6632ee3138f1Smrg 66333e72ca8cSmrg# 66343e72ca8cSmrg# Do we need to explicitly link libc? 66353e72ca8cSmrg# 66363e72ca8cSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 66373e72ca8cSmrgx|xyes) 66383e72ca8cSmrg # Assume -lc should be added 66393e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 664034977a2fSmrg 66413e72ca8cSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 66423e72ca8cSmrg case $_LT_TAGVAR(archive_cmds, $1) in 66433e72ca8cSmrg *'~'*) 66443e72ca8cSmrg # FIXME: we may have to deal with multi-command sequences. 6645b425557eSmrg ;; 66463e72ca8cSmrg '$CC '*) 66473e72ca8cSmrg # Test whether the compiler implicitly links with -lc since on some 66483e72ca8cSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 66493e72ca8cSmrg # to ld, don't add -lc before -lgcc. 66503e72ca8cSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 66513e72ca8cSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 66523e72ca8cSmrg [$RM conftest* 66533e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6654ee3138f1Smrg 66553e72ca8cSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 66563e72ca8cSmrg soname=conftest 66573e72ca8cSmrg lib=conftest 66583e72ca8cSmrg libobjs=conftest.$ac_objext 66593e72ca8cSmrg deplibs= 66603e72ca8cSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 66613e72ca8cSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 66623e72ca8cSmrg compiler_flags=-v 66633e72ca8cSmrg linker_flags=-v 66643e72ca8cSmrg verstring= 66653e72ca8cSmrg output_objdir=. 66663e72ca8cSmrg libname=conftest 66673e72ca8cSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 66683e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 66693e72ca8cSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 66703e72ca8cSmrg then 66713e72ca8cSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 66723e72ca8cSmrg else 66733e72ca8cSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66743e72ca8cSmrg fi 66753e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 66763e72ca8cSmrg else 66773e72ca8cSmrg cat conftest.err 1>&5 66783e72ca8cSmrg fi 66793e72ca8cSmrg $RM conftest* 66803e72ca8cSmrg ]) 66813e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6682b425557eSmrg ;; 6683a1ed278cSmrg esac 66843e72ca8cSmrg fi 6685a1ed278cSmrg ;; 6686a1ed278cSmrgesac 6687a1ed278cSmrg 66883e72ca8cSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 66893e72ca8cSmrg [Whether or not to add -lc for building shared libraries]) 66903e72ca8cSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 66913e72ca8cSmrg [enable_shared_with_static_runtimes], [0], 66923e72ca8cSmrg [Whether or not to disallow shared libs when runtime libs are static]) 66933e72ca8cSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 66943e72ca8cSmrg [Compiler flag to allow reflexive dlopens]) 66953e72ca8cSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 66963e72ca8cSmrg [Compiler flag to generate shared objects directly from archives]) 66973e72ca8cSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 66983e72ca8cSmrg [Whether the compiler copes with passing no objects directly]) 66993e72ca8cSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 67003e72ca8cSmrg [Create an old-style archive from a shared archive]) 67013e72ca8cSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 67023e72ca8cSmrg [Create a temporary old-style archive to link instead of a shared archive]) 67033e72ca8cSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 67043e72ca8cSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 67053e72ca8cSmrg_LT_TAGDECL([], [module_cmds], [2], 67063e72ca8cSmrg [Commands used to build a loadable module if different from building 67073e72ca8cSmrg a shared archive.]) 67083e72ca8cSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 67093e72ca8cSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 67103e72ca8cSmrg [Whether we are building with GNU ld or not]) 67113e72ca8cSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 67123e72ca8cSmrg [Flag that allows shared libraries with undefined symbols to be built]) 67133e72ca8cSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 67143e72ca8cSmrg [Flag that enforces no undefined symbols]) 67153e72ca8cSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 67163e72ca8cSmrg [Flag to hardcode $libdir into a binary during linking. 67173e72ca8cSmrg This must work even if $libdir does not exist]) 67183e72ca8cSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 67193e72ca8cSmrg [Whether we need a single "-rpath" flag with a separated argument]) 67203e72ca8cSmrg_LT_TAGDECL([], [hardcode_direct], [0], 67213e72ca8cSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 67223e72ca8cSmrg DIR into the resulting binary]) 67233e72ca8cSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 67243e72ca8cSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 67253e72ca8cSmrg DIR into the resulting binary and the resulting library dependency is 67263e72ca8cSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 67273e72ca8cSmrg library is relocated]) 67283e72ca8cSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 67293e72ca8cSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 67303e72ca8cSmrg into the resulting binary]) 67313e72ca8cSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 67323e72ca8cSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 67333e72ca8cSmrg into the resulting binary]) 67343e72ca8cSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 67353e72ca8cSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 67363e72ca8cSmrg into the library and all subsequent libraries and executables linked 67373e72ca8cSmrg against it]) 67383e72ca8cSmrg_LT_TAGDECL([], [inherit_rpath], [0], 67393e72ca8cSmrg [Set to yes if linker adds runtime paths of dependent libraries 67403e72ca8cSmrg to runtime path list]) 67413e72ca8cSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 67423e72ca8cSmrg [Whether libtool must link a program against all its dependency libraries]) 67433e72ca8cSmrg_LT_TAGDECL([], [always_export_symbols], [0], 67443e72ca8cSmrg [Set to "yes" if exported symbols are required]) 67453e72ca8cSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 67463e72ca8cSmrg [The commands to list exported symbols]) 67473e72ca8cSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 67483e72ca8cSmrg [Symbols that should not be listed in the preloaded symbols]) 67493e72ca8cSmrg_LT_TAGDECL([], [include_expsyms], [1], 67503e72ca8cSmrg [Symbols that must always be exported]) 67513e72ca8cSmrg_LT_TAGDECL([], [prelink_cmds], [2], 67523e72ca8cSmrg [Commands necessary for linking programs (against libraries) with templates]) 67533e72ca8cSmrg_LT_TAGDECL([], [postlink_cmds], [2], 67543e72ca8cSmrg [Commands necessary for finishing linking programs]) 67553e72ca8cSmrg_LT_TAGDECL([], [file_list_spec], [1], 67563e72ca8cSmrg [Specify filename containing input files]) 67573e72ca8cSmrgdnl FIXME: Not yet implemented 67583e72ca8cSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 67593e72ca8cSmrgdnl [Compiler flag to generate thread safe objects]) 67603e72ca8cSmrg])# _LT_LINKER_SHLIBS 6761a1ed278cSmrg 6762a1ed278cSmrg 67633e72ca8cSmrg# _LT_LANG_C_CONFIG([TAG]) 67643e72ca8cSmrg# ------------------------ 67653e72ca8cSmrg# Ensure that the configuration variables for a C compiler are suitably 67663e72ca8cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 67673e72ca8cSmrg# the compiler configuration to `libtool'. 67683e72ca8cSmrgm4_defun([_LT_LANG_C_CONFIG], 67693e72ca8cSmrg[m4_require([_LT_DECL_EGREP])dnl 67703e72ca8cSmrglt_save_CC="$CC" 67713e72ca8cSmrgAC_LANG_PUSH(C) 6772a1ed278cSmrg 67733e72ca8cSmrg# Source file extension for C test sources. 67743e72ca8cSmrgac_ext=c 677534977a2fSmrg 67763e72ca8cSmrg# Object file extension for compiled C test sources. 6777a1ed278cSmrgobjext=o 6778a1ed278cSmrg_LT_TAGVAR(objext, $1)=$objext 677934977a2fSmrg 67803e72ca8cSmrg# Code to be used in simple compile tests 67813e72ca8cSmrglt_simple_compile_test_code="int some_variable = 0;" 678234977a2fSmrg 67833e72ca8cSmrg# Code to be used in simple link tests 67843e72ca8cSmrglt_simple_link_test_code='int main(){return(0);}' 6785ee3138f1Smrg 67863e72ca8cSmrg_LT_TAG_COMPILER 67873e72ca8cSmrg# Save the default compiler, since it gets overwritten when the other 67883e72ca8cSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 67893e72ca8cSmrgcompiler_DEFAULT=$CC 6790ee3138f1Smrg 67913e72ca8cSmrg# save warnings/boilerplate of simple test code 67923e72ca8cSmrg_LT_COMPILER_BOILERPLATE 67933e72ca8cSmrg_LT_LINKER_BOILERPLATE 6794a1ed278cSmrg 67953e72ca8cSmrgif test -n "$compiler"; then 67963e72ca8cSmrg _LT_COMPILER_NO_RTTI($1) 67973e72ca8cSmrg _LT_COMPILER_PIC($1) 67983e72ca8cSmrg _LT_COMPILER_C_O($1) 67993e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 68003e72ca8cSmrg _LT_LINKER_SHLIBS($1) 68013e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 68023e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 68033e72ca8cSmrg LT_SYS_DLOPEN_SELF 68043e72ca8cSmrg _LT_CMD_STRIPLIB 6805ee3138f1Smrg 68063e72ca8cSmrg # Report which library types will actually be built 68073e72ca8cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 68083e72ca8cSmrg AC_MSG_RESULT([$can_build_shared]) 6809ee3138f1Smrg 68103e72ca8cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 68113e72ca8cSmrg test "$can_build_shared" = "no" && enable_shared=no 6812ee3138f1Smrg 68133e72ca8cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 68143e72ca8cSmrg # are all built from PIC. 68153e72ca8cSmrg case $host_os in 68163e72ca8cSmrg aix3*) 68173e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 68183e72ca8cSmrg if test -n "$RANLIB"; then 68193e72ca8cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 68203e72ca8cSmrg postinstall_cmds='$RANLIB $lib' 68213e72ca8cSmrg fi 68223e72ca8cSmrg ;; 6823ee3138f1Smrg 68243e72ca8cSmrg aix[[4-9]]*) 68253e72ca8cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 68263e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 68273e72ca8cSmrg fi 68283e72ca8cSmrg ;; 68293e72ca8cSmrg esac 68303e72ca8cSmrg AC_MSG_RESULT([$enable_shared]) 6831ee3138f1Smrg 68323e72ca8cSmrg AC_MSG_CHECKING([whether to build static libraries]) 68333e72ca8cSmrg # Make sure either enable_shared or enable_static is yes. 68343e72ca8cSmrg test "$enable_shared" = yes || enable_static=yes 68353e72ca8cSmrg AC_MSG_RESULT([$enable_static]) 6836a1ed278cSmrg 68373e72ca8cSmrg _LT_CONFIG($1) 68383e72ca8cSmrgfi 6839a1ed278cSmrgAC_LANG_POP 68403e72ca8cSmrgCC="$lt_save_CC" 68413e72ca8cSmrg])# _LT_LANG_C_CONFIG 6842a1ed278cSmrg 6843a1ed278cSmrg 68443e72ca8cSmrg# _LT_LANG_CXX_CONFIG([TAG]) 68453e72ca8cSmrg# -------------------------- 68463e72ca8cSmrg# Ensure that the configuration variables for a C++ compiler are suitably 68473e72ca8cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 68483e72ca8cSmrg# the compiler configuration to `libtool'. 68493e72ca8cSmrgm4_defun([_LT_LANG_CXX_CONFIG], 68503e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 68513e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 68523e72ca8cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 68533e72ca8cSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 68543e72ca8cSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 68553e72ca8cSmrg (test "X$CXX" != "Xg++"))) ; then 68563e72ca8cSmrg AC_PROG_CXXCPP 68573e72ca8cSmrgelse 68583e72ca8cSmrg _lt_caught_CXX_error=yes 6859a1ed278cSmrgfi 6860a1ed278cSmrg 68613e72ca8cSmrgAC_LANG_PUSH(C++) 6862a1ed278cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6863a1ed278cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6864a1ed278cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6865a1ed278cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 68663e72ca8cSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 6867a1ed278cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6868a1ed278cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6869a1ed278cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6870a1ed278cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6871a1ed278cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6872a1ed278cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 68733e72ca8cSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6874a1ed278cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6875a1ed278cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6876a1ed278cSmrg_LT_TAGVAR(module_cmds, $1)= 6877a1ed278cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6878a1ed278cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6879a1ed278cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6880a1ed278cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6881a1ed278cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6882a1ed278cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6883a1ed278cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6884a1ed278cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6885ee3138f1Smrg 68863e72ca8cSmrg# Source file extension for C++ test sources. 68873e72ca8cSmrgac_ext=cpp 688834977a2fSmrg 68893e72ca8cSmrg# Object file extension for compiled C++ test sources. 6890a1ed278cSmrgobjext=o 6891a1ed278cSmrg_LT_TAGVAR(objext, $1)=$objext 689234977a2fSmrg 6893a1ed278cSmrg# No sense in running all these tests if we already determined that 68943e72ca8cSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 6895a1ed278cSmrg# are currently assumed to apply to all compilers on this platform, 6896a1ed278cSmrg# and will be corrupted by setting them based on a non-working compiler. 68973e72ca8cSmrgif test "$_lt_caught_CXX_error" != yes; then 6898a1ed278cSmrg # Code to be used in simple compile tests 68993e72ca8cSmrg lt_simple_compile_test_code="int some_variable = 0;" 690034977a2fSmrg 6901a1ed278cSmrg # Code to be used in simple link tests 69023e72ca8cSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 690334977a2fSmrg 6904a1ed278cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6905a1ed278cSmrg _LT_TAG_COMPILER 690634977a2fSmrg 6907a1ed278cSmrg # save warnings/boilerplate of simple test code 6908a1ed278cSmrg _LT_COMPILER_BOILERPLATE 6909a1ed278cSmrg _LT_LINKER_BOILERPLATE 691034977a2fSmrg 6911a1ed278cSmrg # Allow CC to be a program name with arguments. 69123e72ca8cSmrg lt_save_CC=$CC 69133e72ca8cSmrg lt_save_CFLAGS=$CFLAGS 69143e72ca8cSmrg lt_save_LD=$LD 6915a1ed278cSmrg lt_save_GCC=$GCC 69163e72ca8cSmrg GCC=$GXX 69173e72ca8cSmrg lt_save_with_gnu_ld=$with_gnu_ld 69183e72ca8cSmrg lt_save_path_LD=$lt_cv_path_LD 69193e72ca8cSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 69203e72ca8cSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 69213e72ca8cSmrg else 69223e72ca8cSmrg $as_unset lt_cv_prog_gnu_ld 69233e72ca8cSmrg fi 69243e72ca8cSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 69253e72ca8cSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 69263e72ca8cSmrg else 69273e72ca8cSmrg $as_unset lt_cv_path_LD 69283e72ca8cSmrg fi 69293e72ca8cSmrg test -z "${LDCXX+set}" || LD=$LDCXX 69303e72ca8cSmrg CC=${CXX-"c++"} 69313e72ca8cSmrg CFLAGS=$CXXFLAGS 6932a1ed278cSmrg compiler=$CC 6933a1ed278cSmrg _LT_TAGVAR(compiler, $1)=$CC 6934a1ed278cSmrg _LT_CC_BASENAME([$compiler]) 6935b425557eSmrg 6936a1ed278cSmrg if test -n "$compiler"; then 69373e72ca8cSmrg # We don't want -fno-exception when compiling C++ code, so set the 69383e72ca8cSmrg # no_builtin_flag separately 69393e72ca8cSmrg if test "$GXX" = yes; then 69403e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 69413e72ca8cSmrg else 69423e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 69433e72ca8cSmrg fi 69443e72ca8cSmrg 69453e72ca8cSmrg if test "$GXX" = yes; then 69463e72ca8cSmrg # Set up default GNU C++ configuration 69473e72ca8cSmrg 69483e72ca8cSmrg LT_PATH_LD 69493e72ca8cSmrg 69503e72ca8cSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 69513e72ca8cSmrg # archiving commands below assume that GNU ld is being used. 69523e72ca8cSmrg if test "$with_gnu_ld" = yes; then 69533e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 69543e72ca8cSmrg _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' 69553e72ca8cSmrg 69563e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 69573e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 69583e72ca8cSmrg 69593e72ca8cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 69603e72ca8cSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 69613e72ca8cSmrg # investigate it a little bit more. (MM) 69623e72ca8cSmrg wlarc='${wl}' 69633e72ca8cSmrg 69643e72ca8cSmrg # ancient GNU ld didn't support --whole-archive et. al. 69653e72ca8cSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 69663e72ca8cSmrg $GREP 'no-whole-archive' > /dev/null; then 69673e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 69683e72ca8cSmrg else 69693e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 69703e72ca8cSmrg fi 69713e72ca8cSmrg else 69723e72ca8cSmrg with_gnu_ld=no 69733e72ca8cSmrg wlarc= 69743e72ca8cSmrg 69753e72ca8cSmrg # A generic and very simple default shared library creation 69763e72ca8cSmrg # command for GNU C++ for the case where it uses the native 69773e72ca8cSmrg # linker, instead of GNU ld. If possible, this setting should 69783e72ca8cSmrg # overridden to take advantage of the native linker features on 69793e72ca8cSmrg # the platform it is being used on. 69803e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 69813e72ca8cSmrg fi 69823e72ca8cSmrg 69833e72ca8cSmrg # Commands to make compiler produce verbose output that lists 69843e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 69853e72ca8cSmrg # linking a shared library. 69863e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6987a1ed278cSmrg 69883e72ca8cSmrg else 69893e72ca8cSmrg GXX=no 69903e72ca8cSmrg with_gnu_ld=no 69913e72ca8cSmrg wlarc= 69923e72ca8cSmrg fi 6993a1ed278cSmrg 69943e72ca8cSmrg # PORTME: fill in a description of your system's C++ link characteristics 69953e72ca8cSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 69963e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6997a1ed278cSmrg case $host_os in 6998a1ed278cSmrg aix3*) 69993e72ca8cSmrg # FIXME: insert proper C++ library support 70003e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7001a1ed278cSmrg ;; 7002a1ed278cSmrg aix[[4-9]]*) 70033e72ca8cSmrg if test "$host_cpu" = ia64; then 70043e72ca8cSmrg # On IA64, the linker does run time linking by default, so we don't 70053e72ca8cSmrg # have to do anything special. 70063e72ca8cSmrg aix_use_runtimelinking=no 70073e72ca8cSmrg exp_sym_flag='-Bexport' 70083e72ca8cSmrg no_entry_flag="" 70093e72ca8cSmrg else 70103e72ca8cSmrg aix_use_runtimelinking=no 701134977a2fSmrg 70123e72ca8cSmrg # Test if we are trying to use run time linking or normal 70133e72ca8cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 70143e72ca8cSmrg # need to do runtime linking. 70153e72ca8cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 70163e72ca8cSmrg for ld_flag in $LDFLAGS; do 70173e72ca8cSmrg case $ld_flag in 70183e72ca8cSmrg *-brtl*) 70193e72ca8cSmrg aix_use_runtimelinking=yes 70203e72ca8cSmrg break 70213e72ca8cSmrg ;; 70223e72ca8cSmrg esac 70233e72ca8cSmrg done 70243e72ca8cSmrg ;; 70253e72ca8cSmrg esac 7026ee3138f1Smrg 70273e72ca8cSmrg exp_sym_flag='-bexport' 70283e72ca8cSmrg no_entry_flag='-bnoentry' 70293e72ca8cSmrg fi 7030ee3138f1Smrg 70313e72ca8cSmrg # When large executables or shared objects are built, AIX ld can 70323e72ca8cSmrg # have problems creating the table of contents. If linking a library 70333e72ca8cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 70343e72ca8cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 70353e72ca8cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7036a1ed278cSmrg 70373e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='' 70383e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 70393e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 70403e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 70413e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 70423e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7043a1ed278cSmrg 70443e72ca8cSmrg if test "$GXX" = yes; then 70453e72ca8cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 70463e72ca8cSmrg # We only want to do this on AIX 4.2 and lower, the check 70473e72ca8cSmrg # below for broken collect2 doesn't work under 4.3+ 70483e72ca8cSmrg collect2name=`${CC} -print-prog-name=collect2` 70493e72ca8cSmrg if test -f "$collect2name" && 70503e72ca8cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 70513e72ca8cSmrg then 70523e72ca8cSmrg # We have reworked collect2 70533e72ca8cSmrg : 70543e72ca8cSmrg else 70553e72ca8cSmrg # We have old collect2 70563e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 70573e72ca8cSmrg # It fails to find uninstalled libraries when the uninstalled 70583e72ca8cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 70593e72ca8cSmrg # to unsupported forces relinking 70603e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 70613e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 70623e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 70633e72ca8cSmrg fi 70643e72ca8cSmrg esac 70653e72ca8cSmrg shared_flag='-shared' 70663e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 70673e72ca8cSmrg shared_flag="$shared_flag "'${wl}-G' 70683e72ca8cSmrg fi 70693e72ca8cSmrg else 70703e72ca8cSmrg # not using gcc 70713e72ca8cSmrg if test "$host_cpu" = ia64; then 70723e72ca8cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 70733e72ca8cSmrg # chokes on -Wl,-G. The following line is correct: 70743e72ca8cSmrg shared_flag='-G' 70753e72ca8cSmrg else 70763e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 70773e72ca8cSmrg shared_flag='${wl}-G' 70783e72ca8cSmrg else 70793e72ca8cSmrg shared_flag='${wl}-bM:SRE' 70803e72ca8cSmrg fi 70813e72ca8cSmrg fi 70823e72ca8cSmrg fi 7083ee3138f1Smrg 70843e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 70853e72ca8cSmrg # It seems that -bexpall does not export symbols beginning with 70863e72ca8cSmrg # underscore (_), so it is better to generate a list of symbols to 70873e72ca8cSmrg # export. 70883e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 70893e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 70903e72ca8cSmrg # Warning - without using the other runtime loading flags (-brtl), 70913e72ca8cSmrg # -berok will link without error, but may produce a broken library. 70923e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 70933e72ca8cSmrg # Determine the default libpath from the value encoded in an empty 70943e72ca8cSmrg # executable. 70953e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 70963e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7097ee3138f1Smrg 70983e72ca8cSmrg _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" 70993e72ca8cSmrg else 71003e72ca8cSmrg if test "$host_cpu" = ia64; then 71013e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 71023e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 71033e72ca8cSmrg _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" 71043e72ca8cSmrg else 71053e72ca8cSmrg # Determine the default libpath from the value encoded in an 71063e72ca8cSmrg # empty executable. 71073e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 71083e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 71093e72ca8cSmrg # Warning - without using the other run time loading flags, 71103e72ca8cSmrg # -berok will link without error, but may produce a broken library. 71113e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 71123e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 71133e72ca8cSmrg if test "$with_gnu_ld" = yes; then 71143e72ca8cSmrg # We only use this code for GNU lds that support --whole-archive. 71153e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 71163e72ca8cSmrg else 71173e72ca8cSmrg # Exported symbols can be pulled into shared objects from archives 71183e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 71193e72ca8cSmrg fi 71203e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 71213e72ca8cSmrg # This is similar to how AIX traditionally builds its shared 71223e72ca8cSmrg # libraries. 71233e72ca8cSmrg _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' 71243e72ca8cSmrg fi 71253e72ca8cSmrg fi 71263e72ca8cSmrg ;; 7127a1ed278cSmrg 71283e72ca8cSmrg beos*) 71293e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 71303e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71313e72ca8cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 71323e72ca8cSmrg # support --undefined. This deserves some investigation. FIXME 71333e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 71343e72ca8cSmrg else 71353e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71363e72ca8cSmrg fi 71373e72ca8cSmrg ;; 7138a1ed278cSmrg 71393e72ca8cSmrg chorus*) 71403e72ca8cSmrg case $cc_basename in 71413e72ca8cSmrg *) 71423e72ca8cSmrg # FIXME: insert proper C++ library support 71433e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71443e72ca8cSmrg ;; 71453e72ca8cSmrg esac 71463e72ca8cSmrg ;; 7147a1ed278cSmrg 71483e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 71493e72ca8cSmrg case $GXX,$cc_basename in 71503e72ca8cSmrg ,cl* | no,cl*) 71513e72ca8cSmrg # Native MSVC 71523e72ca8cSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 71533e72ca8cSmrg # no search path for DLLs. 71543e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 71553e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71563e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 71573e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 71583e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 71593e72ca8cSmrg libext=lib 71603e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 71613e72ca8cSmrg shrext_cmds=".dll" 71623e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 71633e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 71643e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 71653e72ca8cSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 71663e72ca8cSmrg else 71673e72ca8cSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 71683e72ca8cSmrg fi~ 71693e72ca8cSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 71703e72ca8cSmrg linknames=' 71713e72ca8cSmrg # The linker will not automatically build a static lib if we build a DLL. 71723e72ca8cSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 71733e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 71743e72ca8cSmrg # Don't use ranlib 71753e72ca8cSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 71763e72ca8cSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 71773e72ca8cSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 71783e72ca8cSmrg case $lt_outputfile in 71793e72ca8cSmrg *.exe|*.EXE) ;; 71803e72ca8cSmrg *) 71813e72ca8cSmrg lt_outputfile="$lt_outputfile.exe" 71823e72ca8cSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 71833e72ca8cSmrg ;; 71843e72ca8cSmrg esac~ 71853e72ca8cSmrg func_to_tool_file "$lt_outputfile"~ 71863e72ca8cSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 71873e72ca8cSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 71883e72ca8cSmrg $RM "$lt_outputfile.manifest"; 71893e72ca8cSmrg fi' 71903e72ca8cSmrg ;; 71913e72ca8cSmrg *) 71923e72ca8cSmrg # g++ 71933e72ca8cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 71943e72ca8cSmrg # as there is no search path for DLLs. 71953e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71963e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 71973e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71983e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 71993e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 72003e72ca8cSmrg 72013e72ca8cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 72023e72ca8cSmrg _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' 72033e72ca8cSmrg # If the export-symbols file already is a .def file (1st line 72043e72ca8cSmrg # is EXPORTS), use it as is; otherwise, prepend... 72053e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72063e72ca8cSmrg cp $export_symbols $output_objdir/$soname.def; 72073e72ca8cSmrg else 72083e72ca8cSmrg echo EXPORTS > $output_objdir/$soname.def; 72093e72ca8cSmrg cat $export_symbols >> $output_objdir/$soname.def; 72103e72ca8cSmrg fi~ 72113e72ca8cSmrg $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' 72123e72ca8cSmrg else 72133e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72143e72ca8cSmrg fi 72153e72ca8cSmrg ;; 72163e72ca8cSmrg esac 72173e72ca8cSmrg ;; 72183e72ca8cSmrg darwin* | rhapsody*) 72193e72ca8cSmrg _LT_DARWIN_LINKER_FEATURES($1) 72203e72ca8cSmrg ;; 7221ee3138f1Smrg 72223e72ca8cSmrg dgux*) 72233e72ca8cSmrg case $cc_basename in 72243e72ca8cSmrg ec++*) 72253e72ca8cSmrg # FIXME: insert proper C++ library support 72263e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72273e72ca8cSmrg ;; 72283e72ca8cSmrg ghcx*) 72293e72ca8cSmrg # Green Hills C++ Compiler 72303e72ca8cSmrg # FIXME: insert proper C++ library support 72313e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72323e72ca8cSmrg ;; 72333e72ca8cSmrg *) 72343e72ca8cSmrg # FIXME: insert proper C++ library support 72353e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72363e72ca8cSmrg ;; 72373e72ca8cSmrg esac 72383e72ca8cSmrg ;; 7239ee3138f1Smrg 72403e72ca8cSmrg freebsd2.*) 72413e72ca8cSmrg # C++ shared libraries reported to be fairly broken before 72423e72ca8cSmrg # switch to ELF 72433e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72443e72ca8cSmrg ;; 72453e72ca8cSmrg 72463e72ca8cSmrg freebsd-elf*) 72473e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 72483e72ca8cSmrg ;; 72493e72ca8cSmrg 72503e72ca8cSmrg freebsd* | dragonfly*) 72513e72ca8cSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 72523e72ca8cSmrg # conventions 72533e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 72543e72ca8cSmrg ;; 72553e72ca8cSmrg 72563e72ca8cSmrg gnu*) 72573e72ca8cSmrg ;; 72583e72ca8cSmrg 72593e72ca8cSmrg haiku*) 72603e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72613e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72623e72ca8cSmrg ;; 7263ee3138f1Smrg 72643e72ca8cSmrg hpux9*) 72653e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 72663e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72673e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 72683e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 72693e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 72703e72ca8cSmrg # but as the default 72713e72ca8cSmrg # location of the library. 7272ee3138f1Smrg 72733e72ca8cSmrg case $cc_basename in 72743e72ca8cSmrg CC*) 72753e72ca8cSmrg # FIXME: insert proper C++ library support 72763e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72773e72ca8cSmrg ;; 72783e72ca8cSmrg aCC*) 72793e72ca8cSmrg _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' 72803e72ca8cSmrg # Commands to make compiler produce verbose output that lists 72813e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 72823e72ca8cSmrg # linking a shared library. 72833e72ca8cSmrg # 72843e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 72853e72ca8cSmrg # explicitly linking system object files so we need to strip them 72863e72ca8cSmrg # from the output so that they don't get included in the library 72873e72ca8cSmrg # dependencies. 72883e72ca8cSmrg 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"' 72893e72ca8cSmrg ;; 72903e72ca8cSmrg *) 72913e72ca8cSmrg if test "$GXX" = yes; then 72923e72ca8cSmrg _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' 72933e72ca8cSmrg else 72943e72ca8cSmrg # FIXME: insert proper C++ library support 72953e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72963e72ca8cSmrg fi 72973e72ca8cSmrg ;; 72983e72ca8cSmrg esac 72993e72ca8cSmrg ;; 7300ee3138f1Smrg 73013e72ca8cSmrg hpux10*|hpux11*) 73023e72ca8cSmrg if test $with_gnu_ld = no; then 73033e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73043e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7305a1ed278cSmrg 73063e72ca8cSmrg case $host_cpu in 73073e72ca8cSmrg hppa*64*|ia64*) 73083e72ca8cSmrg ;; 73093e72ca8cSmrg *) 73103e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73113e72ca8cSmrg ;; 73123e72ca8cSmrg esac 73133e72ca8cSmrg fi 73143e72ca8cSmrg case $host_cpu in 73153e72ca8cSmrg hppa*64*|ia64*) 73163e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 73173e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73183e72ca8cSmrg ;; 73193e72ca8cSmrg *) 73203e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 73213e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 73223e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73233e72ca8cSmrg # but as the default 73243e72ca8cSmrg # location of the library. 73253e72ca8cSmrg ;; 73263e72ca8cSmrg esac 7327a1ed278cSmrg 73283e72ca8cSmrg case $cc_basename in 73293e72ca8cSmrg CC*) 73303e72ca8cSmrg # FIXME: insert proper C++ library support 73313e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73323e72ca8cSmrg ;; 73333e72ca8cSmrg aCC*) 73343e72ca8cSmrg case $host_cpu in 73353e72ca8cSmrg hppa*64*) 73363e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 73373e72ca8cSmrg ;; 73383e72ca8cSmrg ia64*) 73393e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 73403e72ca8cSmrg ;; 73413e72ca8cSmrg *) 73423e72ca8cSmrg _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' 73433e72ca8cSmrg ;; 73443e72ca8cSmrg esac 73453e72ca8cSmrg # Commands to make compiler produce verbose output that lists 73463e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 73473e72ca8cSmrg # linking a shared library. 73483e72ca8cSmrg # 73493e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 73503e72ca8cSmrg # explicitly linking system object files so we need to strip them 73513e72ca8cSmrg # from the output so that they don't get included in the library 73523e72ca8cSmrg # dependencies. 73533e72ca8cSmrg 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"' 73543e72ca8cSmrg ;; 73553e72ca8cSmrg *) 73563e72ca8cSmrg if test "$GXX" = yes; then 73573e72ca8cSmrg if test $with_gnu_ld = no; then 73583e72ca8cSmrg case $host_cpu in 73593e72ca8cSmrg hppa*64*) 73603e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 73613e72ca8cSmrg ;; 73623e72ca8cSmrg ia64*) 73633e72ca8cSmrg _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' 73643e72ca8cSmrg ;; 73653e72ca8cSmrg *) 73663e72ca8cSmrg _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' 73673e72ca8cSmrg ;; 73683e72ca8cSmrg esac 73693e72ca8cSmrg fi 73703e72ca8cSmrg else 73713e72ca8cSmrg # FIXME: insert proper C++ library support 73723e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73733e72ca8cSmrg fi 73743e72ca8cSmrg ;; 73753e72ca8cSmrg esac 73763e72ca8cSmrg ;; 7377a1ed278cSmrg 73783e72ca8cSmrg interix[[3-9]]*) 73793e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 73803e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73813e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 73823e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73833e72ca8cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 73843e72ca8cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 73853e72ca8cSmrg # default) and relocated if they conflict, which is a slow very memory 73863e72ca8cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 73873e72ca8cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 73883e72ca8cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 73893e72ca8cSmrg _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' 73903e72ca8cSmrg _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' 73913e72ca8cSmrg ;; 73923e72ca8cSmrg irix5* | irix6*) 73933e72ca8cSmrg case $cc_basename in 73943e72ca8cSmrg CC*) 73953e72ca8cSmrg # SGI C++ 73963e72ca8cSmrg _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' 7397ee3138f1Smrg 73983e72ca8cSmrg # Archives containing C++ object files must be created using 73993e72ca8cSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 74003e72ca8cSmrg # necessary to make sure instantiated templates are included 74013e72ca8cSmrg # in the archive. 74023e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 74033e72ca8cSmrg ;; 74043e72ca8cSmrg *) 74053e72ca8cSmrg if test "$GXX" = yes; then 74063e72ca8cSmrg if test "$with_gnu_ld" = no; then 74073e72ca8cSmrg _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' 74083e72ca8cSmrg else 74093e72ca8cSmrg _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' 74103e72ca8cSmrg fi 74113e72ca8cSmrg fi 74123e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 74133e72ca8cSmrg ;; 74143e72ca8cSmrg esac 74153e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 74163e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74173e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 74183e72ca8cSmrg ;; 741934977a2fSmrg 74203e72ca8cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 74213e72ca8cSmrg case $cc_basename in 74223e72ca8cSmrg KCC*) 74233e72ca8cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 742434977a2fSmrg 74253e72ca8cSmrg # KCC will only create a shared library if the output file 74263e72ca8cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 74273e72ca8cSmrg # to its proper name (with version) after linking. 74283e72ca8cSmrg _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' 74293e72ca8cSmrg _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' 74303e72ca8cSmrg # Commands to make compiler produce verbose output that lists 74313e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 74323e72ca8cSmrg # linking a shared library. 74333e72ca8cSmrg # 74343e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 74353e72ca8cSmrg # explicitly linking system object files so we need to strip them 74363e72ca8cSmrg # from the output so that they don't get included in the library 74373e72ca8cSmrg # dependencies. 74383e72ca8cSmrg 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"' 743934977a2fSmrg 74403e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74413e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7442a1ed278cSmrg 74433e72ca8cSmrg # Archives containing C++ object files must be created using 74443e72ca8cSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 74453e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 74463e72ca8cSmrg ;; 74473e72ca8cSmrg icpc* | ecpc* ) 74483e72ca8cSmrg # Intel C++ 74493e72ca8cSmrg with_gnu_ld=yes 74503e72ca8cSmrg # version 8.0 and above of icpc choke on multiply defined symbols 74513e72ca8cSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 74523e72ca8cSmrg # earlier do not add the objects themselves. 74533e72ca8cSmrg case `$CC -V 2>&1` in 74543e72ca8cSmrg *"Version 7."*) 74553e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 74563e72ca8cSmrg _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' 74573e72ca8cSmrg ;; 74583e72ca8cSmrg *) # Version 8.0 or newer 74593e72ca8cSmrg tmp_idyn= 74603e72ca8cSmrg case $host_cpu in 74613e72ca8cSmrg ia64*) tmp_idyn=' -i_dynamic';; 74623e72ca8cSmrg esac 74633e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 74643e72ca8cSmrg _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' 74653e72ca8cSmrg ;; 74663e72ca8cSmrg esac 74673e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 74683e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74693e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 74703e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 74713e72ca8cSmrg ;; 74723e72ca8cSmrg pgCC* | pgcpp*) 74733e72ca8cSmrg # Portland Group C++ compiler 74743e72ca8cSmrg case `$CC -V` in 74753e72ca8cSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 74763e72ca8cSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 74773e72ca8cSmrg rm -rf $tpldir~ 74783e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 74793e72ca8cSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 74803e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 74813e72ca8cSmrg rm -rf $tpldir~ 74823e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 74833e72ca8cSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 74843e72ca8cSmrg $RANLIB $oldlib' 74853e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 74863e72ca8cSmrg rm -rf $tpldir~ 74873e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 74883e72ca8cSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 74893e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 74903e72ca8cSmrg rm -rf $tpldir~ 74913e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 74923e72ca8cSmrg $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' 74933e72ca8cSmrg ;; 74943e72ca8cSmrg *) # Version 6 and above use weak symbols 74953e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 74963e72ca8cSmrg _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' 74973e72ca8cSmrg ;; 74983e72ca8cSmrg esac 7499a1ed278cSmrg 75003e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 75013e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75023e72ca8cSmrg _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' 75033e72ca8cSmrg ;; 75043e72ca8cSmrg cxx*) 75053e72ca8cSmrg # Compaq C++ 75063e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75073e72ca8cSmrg _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' 7508a1ed278cSmrg 75093e72ca8cSmrg runpath_var=LD_RUN_PATH 75103e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 75113e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7512a1ed278cSmrg 75133e72ca8cSmrg # Commands to make compiler produce verbose output that lists 75143e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 75153e72ca8cSmrg # linking a shared library. 75163e72ca8cSmrg # 75173e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 75183e72ca8cSmrg # explicitly linking system object files so we need to strip them 75193e72ca8cSmrg # from the output so that they don't get included in the library 75203e72ca8cSmrg # dependencies. 75213e72ca8cSmrg 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' 75223e72ca8cSmrg ;; 75233e72ca8cSmrg xl* | mpixl* | bgxl*) 75243e72ca8cSmrg # IBM XL 8.0 on PPC, with GNU ld 75253e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75263e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75273e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75283e72ca8cSmrg if test "x$supports_anon_versioning" = xyes; then 75293e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 75303e72ca8cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 75313e72ca8cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 75323e72ca8cSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 75333e72ca8cSmrg fi 75343e72ca8cSmrg ;; 75353e72ca8cSmrg *) 75363e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 75373e72ca8cSmrg *Sun\ C*) 75383e72ca8cSmrg # Sun C++ 5.9 75393e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 75403e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 75413e72ca8cSmrg _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' 75423e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 75433e72ca8cSmrg _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' 75443e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7545a1ed278cSmrg 75463e72ca8cSmrg # Not sure whether something based on 75473e72ca8cSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 75483e72ca8cSmrg # would be better. 75493e72ca8cSmrg output_verbose_link_cmd='func_echo_all' 7550a1ed278cSmrg 75513e72ca8cSmrg # Archives containing C++ object files must be created using 75523e72ca8cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 75533e72ca8cSmrg # necessary to make sure instantiated templates are included 75543e72ca8cSmrg # in the archive. 75553e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 75563e72ca8cSmrg ;; 75573e72ca8cSmrg esac 75583e72ca8cSmrg ;; 75593e72ca8cSmrg esac 75603e72ca8cSmrg ;; 7561a1ed278cSmrg 75623e72ca8cSmrg lynxos*) 75633e72ca8cSmrg # FIXME: insert proper C++ library support 75643e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75653e72ca8cSmrg ;; 7566a1ed278cSmrg 75673e72ca8cSmrg m88k*) 75683e72ca8cSmrg # FIXME: insert proper C++ library support 75693e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75703e72ca8cSmrg ;; 7571a1ed278cSmrg 75723e72ca8cSmrg mvs*) 75733e72ca8cSmrg case $cc_basename in 75743e72ca8cSmrg cxx*) 75753e72ca8cSmrg # FIXME: insert proper C++ library support 75763e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75773e72ca8cSmrg ;; 75783e72ca8cSmrg *) 75793e72ca8cSmrg # FIXME: insert proper C++ library support 75803e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75813e72ca8cSmrg ;; 75823e72ca8cSmrg esac 75833e72ca8cSmrg ;; 7584a1ed278cSmrg 75853e72ca8cSmrg netbsd*) 75863e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 75873e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 75883e72ca8cSmrg wlarc= 75893e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 75903e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 75913e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 75923e72ca8cSmrg fi 75933e72ca8cSmrg # Workaround some broken pre-1.5 toolchains 75943e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 75953e72ca8cSmrg ;; 7596a1ed278cSmrg 75973e72ca8cSmrg *nto* | *qnx*) 75983e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 75993e72ca8cSmrg ;; 7600a1ed278cSmrg 76013e72ca8cSmrg openbsd2*) 76023e72ca8cSmrg # C++ shared libraries are fairly broken 76033e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76043e72ca8cSmrg ;; 7605a1ed278cSmrg 76063e72ca8cSmrg openbsd*) 76073e72ca8cSmrg if test -f /usr/libexec/ld.so; then 76083e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 76093e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 76103e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 76113e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 76123e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 76133e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 76143e72ca8cSmrg _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' 76153e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 76163e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 76173e72ca8cSmrg fi 76183e72ca8cSmrg output_verbose_link_cmd=func_echo_all 76193e72ca8cSmrg else 76203e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76213e72ca8cSmrg fi 76223e72ca8cSmrg ;; 7623a1ed278cSmrg 76243e72ca8cSmrg osf3* | osf4* | osf5*) 76253e72ca8cSmrg case $cc_basename in 76263e72ca8cSmrg KCC*) 76273e72ca8cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7628a1ed278cSmrg 76293e72ca8cSmrg # KCC will only create a shared library if the output file 76303e72ca8cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 76313e72ca8cSmrg # to its proper name (with version) after linking. 76323e72ca8cSmrg _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' 7633a1ed278cSmrg 76343e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 76353e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7636a1ed278cSmrg 76373e72ca8cSmrg # Archives containing C++ object files must be created using 76383e72ca8cSmrg # the KAI C++ compiler. 76393e72ca8cSmrg case $host in 76403e72ca8cSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 76413e72ca8cSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 76423e72ca8cSmrg esac 76433e72ca8cSmrg ;; 76443e72ca8cSmrg RCC*) 76453e72ca8cSmrg # Rational C++ 2.4.1 76463e72ca8cSmrg # FIXME: insert proper C++ library support 76473e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76483e72ca8cSmrg ;; 76493e72ca8cSmrg cxx*) 76503e72ca8cSmrg case $host in 76513e72ca8cSmrg osf3*) 76523e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 76533e72ca8cSmrg _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' 76543e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76553e72ca8cSmrg ;; 76563e72ca8cSmrg *) 76573e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 76583e72ca8cSmrg _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' 76593e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 76603e72ca8cSmrg echo "-hidden">> $lib.exp~ 76613e72ca8cSmrg $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~ 76623e72ca8cSmrg $RM $lib.exp' 76633e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 76643e72ca8cSmrg ;; 76653e72ca8cSmrg esac 7666a1ed278cSmrg 76673e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7668a1ed278cSmrg 76693e72ca8cSmrg # Commands to make compiler produce verbose output that lists 76703e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 76713e72ca8cSmrg # linking a shared library. 76723e72ca8cSmrg # 76733e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 76743e72ca8cSmrg # explicitly linking system object files so we need to strip them 76753e72ca8cSmrg # from the output so that they don't get included in the library 76763e72ca8cSmrg # dependencies. 76773e72ca8cSmrg 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"' 76783e72ca8cSmrg ;; 76793e72ca8cSmrg *) 76803e72ca8cSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 76813e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 76823e72ca8cSmrg case $host in 76833e72ca8cSmrg osf3*) 76843e72ca8cSmrg _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' 76853e72ca8cSmrg ;; 76863e72ca8cSmrg *) 76873e72ca8cSmrg _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' 76883e72ca8cSmrg ;; 76893e72ca8cSmrg esac 7690a1ed278cSmrg 76913e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76923e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7693a1ed278cSmrg 76943e72ca8cSmrg # Commands to make compiler produce verbose output that lists 76953e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 76963e72ca8cSmrg # linking a shared library. 76973e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7698a1ed278cSmrg 76993e72ca8cSmrg else 77003e72ca8cSmrg # FIXME: insert proper C++ library support 77013e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77023e72ca8cSmrg fi 77033e72ca8cSmrg ;; 77043e72ca8cSmrg esac 77053e72ca8cSmrg ;; 7706a1ed278cSmrg 77073e72ca8cSmrg psos*) 77083e72ca8cSmrg # FIXME: insert proper C++ library support 77093e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77103e72ca8cSmrg ;; 7711a1ed278cSmrg 77123e72ca8cSmrg sunos4*) 77133e72ca8cSmrg case $cc_basename in 77143e72ca8cSmrg CC*) 77153e72ca8cSmrg # Sun C++ 4.x 77163e72ca8cSmrg # FIXME: insert proper C++ library support 77173e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77183e72ca8cSmrg ;; 77193e72ca8cSmrg lcc*) 77203e72ca8cSmrg # Lucid 77213e72ca8cSmrg # FIXME: insert proper C++ library support 77223e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77233e72ca8cSmrg ;; 77243e72ca8cSmrg *) 77253e72ca8cSmrg # FIXME: insert proper C++ library support 77263e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77273e72ca8cSmrg ;; 77283e72ca8cSmrg esac 77293e72ca8cSmrg ;; 7730b425557eSmrg 77313e72ca8cSmrg solaris*) 77323e72ca8cSmrg case $cc_basename in 77333e72ca8cSmrg CC* | sunCC*) 77343e72ca8cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 77353e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 77363e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 77373e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 77383e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 77393e72ca8cSmrg $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' 77403e72ca8cSmrg 77413e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 77423e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 77433e72ca8cSmrg case $host_os in 77443e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 77453e72ca8cSmrg *) 77463e72ca8cSmrg # The compiler driver will combine and reorder linker options, 77473e72ca8cSmrg # but understands `-z linker_flag'. 77483e72ca8cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 77493e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 77503e72ca8cSmrg ;; 77513e72ca8cSmrg esac 77523e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7753ee3138f1Smrg 77543e72ca8cSmrg output_verbose_link_cmd='func_echo_all' 7755ee3138f1Smrg 77563e72ca8cSmrg # Archives containing C++ object files must be created using 77573e72ca8cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 77583e72ca8cSmrg # necessary to make sure instantiated templates are included 77593e72ca8cSmrg # in the archive. 77603e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 77613e72ca8cSmrg ;; 77623e72ca8cSmrg gcx*) 77633e72ca8cSmrg # Green Hills C++ Compiler 77643e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7765ee3138f1Smrg 77663e72ca8cSmrg # The C++ compiler must be used to create the archive. 77673e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 77683e72ca8cSmrg ;; 77693e72ca8cSmrg *) 77703e72ca8cSmrg # GNU C++ compiler with Solaris linker 77713e72ca8cSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 77723e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 77733e72ca8cSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 77743e72ca8cSmrg _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' 77753e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 77763e72ca8cSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7777a1ed278cSmrg 77783e72ca8cSmrg # Commands to make compiler produce verbose output that lists 77793e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 77803e72ca8cSmrg # linking a shared library. 77813e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 77823e72ca8cSmrg else 77833e72ca8cSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 77843e72ca8cSmrg # platform. 77853e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 77863e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 77873e72ca8cSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7788ee3138f1Smrg 77893e72ca8cSmrg # Commands to make compiler produce verbose output that lists 77903e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 77913e72ca8cSmrg # linking a shared library. 77923e72ca8cSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 77933e72ca8cSmrg fi 7794ee3138f1Smrg 77953e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 77963e72ca8cSmrg case $host_os in 77973e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 77983e72ca8cSmrg *) 77993e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 78003e72ca8cSmrg ;; 78013e72ca8cSmrg esac 78023e72ca8cSmrg fi 78033e72ca8cSmrg ;; 78043e72ca8cSmrg esac 78053e72ca8cSmrg ;; 7806ee3138f1Smrg 78073e72ca8cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 78083e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 78093e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 78103e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78113e72ca8cSmrg runpath_var='LD_RUN_PATH' 7812ee3138f1Smrg 78133e72ca8cSmrg case $cc_basename in 78143e72ca8cSmrg CC*) 78153e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78163e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78173e72ca8cSmrg ;; 78183e72ca8cSmrg *) 78193e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78203e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78213e72ca8cSmrg ;; 78223e72ca8cSmrg esac 78233e72ca8cSmrg ;; 78243e72ca8cSmrg 78253e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6*) 78263e72ca8cSmrg # Note: We can NOT use -z defs as we might desire, because we do not 78273e72ca8cSmrg # link with -lc, and that would cause any symbols used from libc to 78283e72ca8cSmrg # always be unresolved, which means just about no library would 78293e72ca8cSmrg # ever link correctly. If we're not using GNU ld we use -z text 78303e72ca8cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 78313e72ca8cSmrg # as -z defs. 78323e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 78333e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 78343e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 78353e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78363e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 78373e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 78383e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 78393e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 78403e72ca8cSmrg runpath_var='LD_RUN_PATH' 7841ee3138f1Smrg 78423e72ca8cSmrg case $cc_basename in 78433e72ca8cSmrg CC*) 78443e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78453e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78463e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 78473e72ca8cSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 78483e72ca8cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 78493e72ca8cSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 78503e72ca8cSmrg ;; 78513e72ca8cSmrg *) 78523e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78533e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78543e72ca8cSmrg ;; 78553e72ca8cSmrg esac 78563e72ca8cSmrg ;; 7857ee3138f1Smrg 78583e72ca8cSmrg tandem*) 78593e72ca8cSmrg case $cc_basename in 78603e72ca8cSmrg NCC*) 78613e72ca8cSmrg # NonStop-UX NCC 3.20 78623e72ca8cSmrg # FIXME: insert proper C++ library support 78633e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78643e72ca8cSmrg ;; 78653e72ca8cSmrg *) 78663e72ca8cSmrg # FIXME: insert proper C++ library support 78673e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78683e72ca8cSmrg ;; 78693e72ca8cSmrg esac 78703e72ca8cSmrg ;; 7871ee3138f1Smrg 78723e72ca8cSmrg vxworks*) 78733e72ca8cSmrg # FIXME: insert proper C++ library support 78743e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78753e72ca8cSmrg ;; 7876ee3138f1Smrg 78773e72ca8cSmrg *) 78783e72ca8cSmrg # FIXME: insert proper C++ library support 78793e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78803e72ca8cSmrg ;; 78813e72ca8cSmrg esac 7882ee3138f1Smrg 78833e72ca8cSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 78843e72ca8cSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7885b425557eSmrg 78863e72ca8cSmrg _LT_TAGVAR(GCC, $1)="$GXX" 78873e72ca8cSmrg _LT_TAGVAR(LD, $1)="$LD" 7888ee3138f1Smrg 78893e72ca8cSmrg ## CAVEAT EMPTOR: 78903e72ca8cSmrg ## There is no encapsulation within the following macros, do not change 78913e72ca8cSmrg ## the running order or otherwise move them around unless you know exactly 78923e72ca8cSmrg ## what you are doing... 78933e72ca8cSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 78943e72ca8cSmrg _LT_COMPILER_PIC($1) 78953e72ca8cSmrg _LT_COMPILER_C_O($1) 78963e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 78973e72ca8cSmrg _LT_LINKER_SHLIBS($1) 78983e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 78993e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7900ee3138f1Smrg 79013e72ca8cSmrg _LT_CONFIG($1) 79023e72ca8cSmrg fi # test -n "$compiler" 7903ee3138f1Smrg 79043e72ca8cSmrg CC=$lt_save_CC 79053e72ca8cSmrg CFLAGS=$lt_save_CFLAGS 79063e72ca8cSmrg LDCXX=$LD 79073e72ca8cSmrg LD=$lt_save_LD 79083e72ca8cSmrg GCC=$lt_save_GCC 79093e72ca8cSmrg with_gnu_ld=$lt_save_with_gnu_ld 79103e72ca8cSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 79113e72ca8cSmrg lt_cv_path_LD=$lt_save_path_LD 79123e72ca8cSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 79133e72ca8cSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 79143e72ca8cSmrgfi # test "$_lt_caught_CXX_error" != yes 7915ee3138f1Smrg 79163e72ca8cSmrgAC_LANG_POP 79173e72ca8cSmrg])# _LT_LANG_CXX_CONFIG 7918ee3138f1Smrg 7919ee3138f1Smrg 79203e72ca8cSmrg# _LT_FUNC_STRIPNAME_CNF 79213e72ca8cSmrg# ---------------------- 79223e72ca8cSmrg# func_stripname_cnf prefix suffix name 7923a1ed278cSmrg# strip PREFIX and SUFFIX off of NAME. 7924a1ed278cSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7925a1ed278cSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7926a1ed278cSmrg# dot (in which case that matches only a dot). 79273e72ca8cSmrg# 79283e72ca8cSmrg# This function is identical to the (non-XSI) version of func_stripname, 79293e72ca8cSmrg# except this one can be used by m4 code that may be executed by configure, 79303e72ca8cSmrg# rather than the libtool script. 79313e72ca8cSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 79323e72ca8cSmrgAC_REQUIRE([_LT_DECL_SED]) 79333e72ca8cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 79343e72ca8cSmrgfunc_stripname_cnf () 7935a1ed278cSmrg{ 7936a1ed278cSmrg case ${2} in 79373e72ca8cSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 79383e72ca8cSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 7939a1ed278cSmrg esac 79403e72ca8cSmrg} # func_stripname_cnf 79413e72ca8cSmrg])# _LT_FUNC_STRIPNAME_CNF 7942ee3138f1Smrg 79433e72ca8cSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 79443e72ca8cSmrg# --------------------------------- 79453e72ca8cSmrg# Figure out "hidden" library dependencies from verbose 79463e72ca8cSmrg# compiler output when linking a shared library. 79473e72ca8cSmrg# Parse the compiler output and extract the necessary 79483e72ca8cSmrg# objects, libraries and library flags. 79493e72ca8cSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 79503e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 79513e72ca8cSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 79523e72ca8cSmrg# Dependencies to place before and after the object being linked: 79533e72ca8cSmrg_LT_TAGVAR(predep_objects, $1)= 79543e72ca8cSmrg_LT_TAGVAR(postdep_objects, $1)= 79553e72ca8cSmrg_LT_TAGVAR(predeps, $1)= 79563e72ca8cSmrg_LT_TAGVAR(postdeps, $1)= 79573e72ca8cSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7958ee3138f1Smrg 79593e72ca8cSmrgdnl we can't use the lt_simple_compile_test_code here, 79603e72ca8cSmrgdnl because it contains code intended for an executable, 79613e72ca8cSmrgdnl not a library. It's possible we should let each 79623e72ca8cSmrgdnl tag define a new lt_????_link_test_code variable, 79633e72ca8cSmrgdnl but it's only used here... 79643e72ca8cSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 79653e72ca8cSmrgint a; 79663e72ca8cSmrgvoid foo (void) { a = 0; } 7967a1ed278cSmrg_LT_EOF 79683e72ca8cSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 79693e72ca8cSmrgclass Foo 7970a1ed278cSmrg{ 79713e72ca8cSmrgpublic: 79723e72ca8cSmrg Foo (void) { a = 0; } 79733e72ca8cSmrgprivate: 79743e72ca8cSmrg int a; 79753e72ca8cSmrg}; 7976a1ed278cSmrg_LT_EOF 79773e72ca8cSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 79783e72ca8cSmrg subroutine foo 79793e72ca8cSmrg implicit none 79803e72ca8cSmrg integer*4 a 79813e72ca8cSmrg a=0 79823e72ca8cSmrg return 79833e72ca8cSmrg end 7984a1ed278cSmrg_LT_EOF 79853e72ca8cSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 79863e72ca8cSmrg subroutine foo 79873e72ca8cSmrg implicit none 79883e72ca8cSmrg integer a 79893e72ca8cSmrg a=0 79903e72ca8cSmrg return 79913e72ca8cSmrg end 79923e72ca8cSmrg_LT_EOF 79933e72ca8cSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 79943e72ca8cSmrgpublic class foo { 79953e72ca8cSmrg private int a; 79963e72ca8cSmrg public void bar (void) { 79973e72ca8cSmrg a = 0; 79983e72ca8cSmrg } 79993e72ca8cSmrg}; 80003e72ca8cSmrg_LT_EOF 80013e72ca8cSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 80023e72ca8cSmrgpackage foo 80033e72ca8cSmrgfunc foo() { 80043e72ca8cSmrg} 80053e72ca8cSmrg_LT_EOF 80063e72ca8cSmrg]) 8007ee3138f1Smrg 80083e72ca8cSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 80093e72ca8cSmrgcase "$CC $CFLAGS " in #( 80103e72ca8cSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 80113e72ca8cSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 80123e72ca8cSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 80133e72ca8cSmrgesac 8014ee3138f1Smrg 80153e72ca8cSmrgdnl Parse the compiler output and extract the necessary 80163e72ca8cSmrgdnl objects, libraries and library flags. 80173e72ca8cSmrgif AC_TRY_EVAL(ac_compile); then 80183e72ca8cSmrg # Parse the compiler output and extract the necessary 80193e72ca8cSmrg # objects, libraries and library flags. 8020ee3138f1Smrg 80213e72ca8cSmrg # Sentinel used to keep track of whether or not we are before 80223e72ca8cSmrg # the conftest object file. 80233e72ca8cSmrg pre_test_object_deps_done=no 8024ee3138f1Smrg 80253e72ca8cSmrg for p in `eval "$output_verbose_link_cmd"`; do 80263e72ca8cSmrg case ${prev}${p} in 8027ee3138f1Smrg 80283e72ca8cSmrg -L* | -R* | -l*) 80293e72ca8cSmrg # Some compilers place space between "-{L,R}" and the path. 80303e72ca8cSmrg # Remove the space. 80313e72ca8cSmrg if test $p = "-L" || 80323e72ca8cSmrg test $p = "-R"; then 80333e72ca8cSmrg prev=$p 80343e72ca8cSmrg continue 80353e72ca8cSmrg fi 8036ee3138f1Smrg 80373e72ca8cSmrg # Expand the sysroot to ease extracting the directories later. 80383e72ca8cSmrg if test -z "$prev"; then 80393e72ca8cSmrg case $p in 80403e72ca8cSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 80413e72ca8cSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 80423e72ca8cSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 80433e72ca8cSmrg esac 80443e72ca8cSmrg fi 80453e72ca8cSmrg case $p in 80463e72ca8cSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 80473e72ca8cSmrg esac 80483e72ca8cSmrg if test "$pre_test_object_deps_done" = no; then 80493e72ca8cSmrg case ${prev} in 80503e72ca8cSmrg -L | -R) 80513e72ca8cSmrg # Internal compiler library paths should come after those 80523e72ca8cSmrg # provided the user. The postdeps already come after the 80533e72ca8cSmrg # user supplied libs so there is no need to process them. 80543e72ca8cSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 80553e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 80563e72ca8cSmrg else 80573e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 80583e72ca8cSmrg fi 80593e72ca8cSmrg ;; 80603e72ca8cSmrg # The "-l" case would never come before the object being 80613e72ca8cSmrg # linked, so don't bother handling this case. 80623e72ca8cSmrg esac 80633e72ca8cSmrg else 80643e72ca8cSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 80653e72ca8cSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 80663e72ca8cSmrg else 80673e72ca8cSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 80683e72ca8cSmrg fi 80693e72ca8cSmrg fi 80703e72ca8cSmrg prev= 80713e72ca8cSmrg ;; 8072ee3138f1Smrg 80733e72ca8cSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 80743e72ca8cSmrg *.$objext) 80753e72ca8cSmrg # This assumes that the test object file only shows up 80763e72ca8cSmrg # once in the compiler output. 80773e72ca8cSmrg if test "$p" = "conftest.$objext"; then 80783e72ca8cSmrg pre_test_object_deps_done=yes 80793e72ca8cSmrg continue 80803e72ca8cSmrg fi 8081ee3138f1Smrg 80823e72ca8cSmrg if test "$pre_test_object_deps_done" = no; then 80833e72ca8cSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 80843e72ca8cSmrg _LT_TAGVAR(predep_objects, $1)="$p" 80853e72ca8cSmrg else 80863e72ca8cSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 80873e72ca8cSmrg fi 80883e72ca8cSmrg else 80893e72ca8cSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 80903e72ca8cSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 80913e72ca8cSmrg else 80923e72ca8cSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 80933e72ca8cSmrg fi 80943e72ca8cSmrg fi 80953e72ca8cSmrg ;; 8096ee3138f1Smrg 80973e72ca8cSmrg *) ;; # Ignore the rest. 80983e72ca8cSmrg 80993e72ca8cSmrg esac 81003e72ca8cSmrg done 8101ee3138f1Smrg 81023e72ca8cSmrg # Clean up. 81033e72ca8cSmrg rm -f a.out a.exe 81043e72ca8cSmrgelse 81053e72ca8cSmrg echo "libtool.m4: error: problem compiling $1 test program" 81063e72ca8cSmrgfi 810734977a2fSmrg 81083e72ca8cSmrg$RM -f confest.$objext 81093e72ca8cSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 811034977a2fSmrg 81113e72ca8cSmrg# PORTME: override above test on systems where it is broken 81123e72ca8cSmrgm4_if([$1], [CXX], 81133e72ca8cSmrg[case $host_os in 81143e72ca8cSmrginterix[[3-9]]*) 81153e72ca8cSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 81163e72ca8cSmrg # hack all around it, let's just trust "g++" to DTRT. 81173e72ca8cSmrg _LT_TAGVAR(predep_objects,$1)= 81183e72ca8cSmrg _LT_TAGVAR(postdep_objects,$1)= 81193e72ca8cSmrg _LT_TAGVAR(postdeps,$1)= 8120a1ed278cSmrg ;; 812134977a2fSmrg 81223e72ca8cSmrglinux*) 81233e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 81243e72ca8cSmrg *Sun\ C*) 81253e72ca8cSmrg # Sun C++ 5.9 8126a1ed278cSmrg 81273e72ca8cSmrg # The more standards-conforming stlport4 library is 81283e72ca8cSmrg # incompatible with the Cstd library. Avoid specifying 81293e72ca8cSmrg # it if it's in CXXFLAGS. Ignore libCrun as 81303e72ca8cSmrg # -library=stlport4 depends on it. 81313e72ca8cSmrg case " $CXX $CXXFLAGS " in 81323e72ca8cSmrg *" -library=stlport4 "*) 81333e72ca8cSmrg solaris_use_stlport4=yes 81343e72ca8cSmrg ;; 81353e72ca8cSmrg esac 813634977a2fSmrg 81373e72ca8cSmrg if test "$solaris_use_stlport4" != yes; then 81383e72ca8cSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 81393e72ca8cSmrg fi 81403e72ca8cSmrg ;; 81413e72ca8cSmrg esac 81423e72ca8cSmrg ;; 814334977a2fSmrg 81443e72ca8cSmrgsolaris*) 81453e72ca8cSmrg case $cc_basename in 81463e72ca8cSmrg CC* | sunCC*) 81473e72ca8cSmrg # The more standards-conforming stlport4 library is 81483e72ca8cSmrg # incompatible with the Cstd library. Avoid specifying 81493e72ca8cSmrg # it if it's in CXXFLAGS. Ignore libCrun as 81503e72ca8cSmrg # -library=stlport4 depends on it. 81513e72ca8cSmrg case " $CXX $CXXFLAGS " in 81523e72ca8cSmrg *" -library=stlport4 "*) 81533e72ca8cSmrg solaris_use_stlport4=yes 81543e72ca8cSmrg ;; 81553e72ca8cSmrg esac 81563e72ca8cSmrg 81573e72ca8cSmrg # Adding this requires a known-good setup of shared libraries for 81583e72ca8cSmrg # Sun compiler versions before 5.6, else PIC objects from an old 81593e72ca8cSmrg # archive will be linked into the output, leading to subtle bugs. 81603e72ca8cSmrg if test "$solaris_use_stlport4" != yes; then 81613e72ca8cSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 81623e72ca8cSmrg fi 81633e72ca8cSmrg ;; 81643e72ca8cSmrg esac 81653e72ca8cSmrg ;; 81663e72ca8cSmrgesac 8167a1ed278cSmrg]) 816834977a2fSmrg 81693e72ca8cSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 81703e72ca8cSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 81713e72ca8cSmrgesac 81723e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 81733e72ca8cSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 81743e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 81753e72ca8cSmrgfi 81763e72ca8cSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 81773e72ca8cSmrg [The directories searched by this compiler when creating a shared library]) 81783e72ca8cSmrg_LT_TAGDECL([], [predep_objects], [1], 81793e72ca8cSmrg [Dependencies to place before and after the objects being linked to 81803e72ca8cSmrg create a shared library]) 81813e72ca8cSmrg_LT_TAGDECL([], [postdep_objects], [1]) 81823e72ca8cSmrg_LT_TAGDECL([], [predeps], [1]) 81833e72ca8cSmrg_LT_TAGDECL([], [postdeps], [1]) 81843e72ca8cSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 81853e72ca8cSmrg [The library search path used internally by the compiler when linking 81863e72ca8cSmrg a shared library]) 81873e72ca8cSmrg])# _LT_SYS_HIDDEN_LIBDEPS 8188ee3138f1Smrg 818934977a2fSmrg 81903e72ca8cSmrg# _LT_LANG_F77_CONFIG([TAG]) 81913e72ca8cSmrg# -------------------------- 81923e72ca8cSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 81933e72ca8cSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 81943e72ca8cSmrg# to write the compiler configuration to `libtool'. 81953e72ca8cSmrgm4_defun([_LT_LANG_F77_CONFIG], 81963e72ca8cSmrg[AC_LANG_PUSH(Fortran 77) 81973e72ca8cSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 81983e72ca8cSmrg _lt_disable_F77=yes 81993e72ca8cSmrgfi 82003e72ca8cSmrg 82013e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 82023e72ca8cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 82033e72ca8cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 82043e72ca8cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 82053e72ca8cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 82063e72ca8cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 82073e72ca8cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 82083e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 82093e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 82103e72ca8cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 82113e72ca8cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 82123e72ca8cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 82133e72ca8cSmrg_LT_TAGVAR(module_cmds, $1)= 82143e72ca8cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 82153e72ca8cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 82163e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 82173e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 82183e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 82193e72ca8cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 82203e72ca8cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 82213e72ca8cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 822234977a2fSmrg 82233e72ca8cSmrg# Source file extension for f77 test sources. 82243e72ca8cSmrgac_ext=f 822534977a2fSmrg 82263e72ca8cSmrg# Object file extension for compiled f77 test sources. 82273e72ca8cSmrgobjext=o 82283e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 822934977a2fSmrg 82303e72ca8cSmrg# No sense in running all these tests if we already determined that 82313e72ca8cSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 82323e72ca8cSmrg# are currently assumed to apply to all compilers on this platform, 82333e72ca8cSmrg# and will be corrupted by setting them based on a non-working compiler. 82343e72ca8cSmrgif test "$_lt_disable_F77" != yes; then 82353e72ca8cSmrg # Code to be used in simple compile tests 82363e72ca8cSmrg lt_simple_compile_test_code="\ 82373e72ca8cSmrg subroutine t 82383e72ca8cSmrg return 82393e72ca8cSmrg end 82403e72ca8cSmrg" 824134977a2fSmrg 82423e72ca8cSmrg # Code to be used in simple link tests 82433e72ca8cSmrg lt_simple_link_test_code="\ 82443e72ca8cSmrg program t 82453e72ca8cSmrg end 82463e72ca8cSmrg" 824734977a2fSmrg 82483e72ca8cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 82493e72ca8cSmrg _LT_TAG_COMPILER 825034977a2fSmrg 82513e72ca8cSmrg # save warnings/boilerplate of simple test code 82523e72ca8cSmrg _LT_COMPILER_BOILERPLATE 82533e72ca8cSmrg _LT_LINKER_BOILERPLATE 825434977a2fSmrg 82553e72ca8cSmrg # Allow CC to be a program name with arguments. 82563e72ca8cSmrg lt_save_CC="$CC" 82573e72ca8cSmrg lt_save_GCC=$GCC 82583e72ca8cSmrg lt_save_CFLAGS=$CFLAGS 82593e72ca8cSmrg CC=${F77-"f77"} 82603e72ca8cSmrg CFLAGS=$FFLAGS 82613e72ca8cSmrg compiler=$CC 82623e72ca8cSmrg _LT_TAGVAR(compiler, $1)=$CC 82633e72ca8cSmrg _LT_CC_BASENAME([$compiler]) 82643e72ca8cSmrg GCC=$G77 82653e72ca8cSmrg if test -n "$compiler"; then 82663e72ca8cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 82673e72ca8cSmrg AC_MSG_RESULT([$can_build_shared]) 8268ee3138f1Smrg 82693e72ca8cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 82703e72ca8cSmrg test "$can_build_shared" = "no" && enable_shared=no 8271ee3138f1Smrg 82723e72ca8cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 82733e72ca8cSmrg # are all built from PIC. 82743e72ca8cSmrg case $host_os in 82753e72ca8cSmrg aix3*) 82763e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 82773e72ca8cSmrg if test -n "$RANLIB"; then 82783e72ca8cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 82793e72ca8cSmrg postinstall_cmds='$RANLIB $lib' 82803e72ca8cSmrg fi 82813e72ca8cSmrg ;; 82823e72ca8cSmrg aix[[4-9]]*) 82833e72ca8cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 82843e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 8285a1ed278cSmrg fi 82863e72ca8cSmrg ;; 82873e72ca8cSmrg esac 82883e72ca8cSmrg AC_MSG_RESULT([$enable_shared]) 8289ee3138f1Smrg 82903e72ca8cSmrg AC_MSG_CHECKING([whether to build static libraries]) 82913e72ca8cSmrg # Make sure either enable_shared or enable_static is yes. 82923e72ca8cSmrg test "$enable_shared" = yes || enable_static=yes 82933e72ca8cSmrg AC_MSG_RESULT([$enable_static]) 8294ee3138f1Smrg 82953e72ca8cSmrg _LT_TAGVAR(GCC, $1)="$G77" 82963e72ca8cSmrg _LT_TAGVAR(LD, $1)="$LD" 8297ee3138f1Smrg 82983e72ca8cSmrg ## CAVEAT EMPTOR: 82993e72ca8cSmrg ## There is no encapsulation within the following macros, do not change 83003e72ca8cSmrg ## the running order or otherwise move them around unless you know exactly 83013e72ca8cSmrg ## what you are doing... 83023e72ca8cSmrg _LT_COMPILER_PIC($1) 83033e72ca8cSmrg _LT_COMPILER_C_O($1) 83043e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 83053e72ca8cSmrg _LT_LINKER_SHLIBS($1) 83063e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 83073e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8308ee3138f1Smrg 83093e72ca8cSmrg _LT_CONFIG($1) 83103e72ca8cSmrg fi # test -n "$compiler" 8311a1ed278cSmrg 83123e72ca8cSmrg GCC=$lt_save_GCC 83133e72ca8cSmrg CC="$lt_save_CC" 83143e72ca8cSmrg CFLAGS="$lt_save_CFLAGS" 83153e72ca8cSmrgfi # test "$_lt_disable_F77" != yes 8316a1ed278cSmrg 83173e72ca8cSmrgAC_LANG_POP 83183e72ca8cSmrg])# _LT_LANG_F77_CONFIG 8319ee3138f1Smrg 8320ee3138f1Smrg 83213e72ca8cSmrg# _LT_LANG_FC_CONFIG([TAG]) 83223e72ca8cSmrg# ------------------------- 83233e72ca8cSmrg# Ensure that the configuration variables for a Fortran compiler are 83243e72ca8cSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 83253e72ca8cSmrg# to write the compiler configuration to `libtool'. 83263e72ca8cSmrgm4_defun([_LT_LANG_FC_CONFIG], 83273e72ca8cSmrg[AC_LANG_PUSH(Fortran) 8328ee3138f1Smrg 83293e72ca8cSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 83303e72ca8cSmrg _lt_disable_FC=yes 83313e72ca8cSmrgfi 833234977a2fSmrg 83333e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 83343e72ca8cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 83353e72ca8cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 83363e72ca8cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 83373e72ca8cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 83383e72ca8cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 83393e72ca8cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 83403e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 83413e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 83423e72ca8cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 83433e72ca8cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 83443e72ca8cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 83453e72ca8cSmrg_LT_TAGVAR(module_cmds, $1)= 83463e72ca8cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 83473e72ca8cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 83483e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 83493e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 83503e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 83513e72ca8cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 83523e72ca8cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 83533e72ca8cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 835434977a2fSmrg 83553e72ca8cSmrg# Source file extension for fc test sources. 83563e72ca8cSmrgac_ext=${ac_fc_srcext-f} 8357ee3138f1Smrg 83583e72ca8cSmrg# Object file extension for compiled fc test sources. 83593e72ca8cSmrgobjext=o 83603e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 8361ee3138f1Smrg 83623e72ca8cSmrg# No sense in running all these tests if we already determined that 83633e72ca8cSmrg# the FC compiler isn't working. Some variables (like enable_shared) 83643e72ca8cSmrg# are currently assumed to apply to all compilers on this platform, 83653e72ca8cSmrg# and will be corrupted by setting them based on a non-working compiler. 83663e72ca8cSmrgif test "$_lt_disable_FC" != yes; then 83673e72ca8cSmrg # Code to be used in simple compile tests 83683e72ca8cSmrg lt_simple_compile_test_code="\ 83693e72ca8cSmrg subroutine t 83703e72ca8cSmrg return 83713e72ca8cSmrg end 83723e72ca8cSmrg" 83733e72ca8cSmrg 83743e72ca8cSmrg # Code to be used in simple link tests 83753e72ca8cSmrg lt_simple_link_test_code="\ 83763e72ca8cSmrg program t 83773e72ca8cSmrg end 83783e72ca8cSmrg" 83793e72ca8cSmrg 83803e72ca8cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 83813e72ca8cSmrg _LT_TAG_COMPILER 83823e72ca8cSmrg 83833e72ca8cSmrg # save warnings/boilerplate of simple test code 83843e72ca8cSmrg _LT_COMPILER_BOILERPLATE 83853e72ca8cSmrg _LT_LINKER_BOILERPLATE 83863e72ca8cSmrg 83873e72ca8cSmrg # Allow CC to be a program name with arguments. 83883e72ca8cSmrg lt_save_CC="$CC" 83893e72ca8cSmrg lt_save_GCC=$GCC 83903e72ca8cSmrg lt_save_CFLAGS=$CFLAGS 83913e72ca8cSmrg CC=${FC-"f95"} 83923e72ca8cSmrg CFLAGS=$FCFLAGS 83933e72ca8cSmrg compiler=$CC 83943e72ca8cSmrg GCC=$ac_cv_fc_compiler_gnu 8395ee3138f1Smrg 83963e72ca8cSmrg _LT_TAGVAR(compiler, $1)=$CC 83973e72ca8cSmrg _LT_CC_BASENAME([$compiler]) 8398ee3138f1Smrg 83993e72ca8cSmrg if test -n "$compiler"; then 84003e72ca8cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 84013e72ca8cSmrg AC_MSG_RESULT([$can_build_shared]) 8402ee3138f1Smrg 84033e72ca8cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 84043e72ca8cSmrg test "$can_build_shared" = "no" && enable_shared=no 840534977a2fSmrg 84063e72ca8cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 84073e72ca8cSmrg # are all built from PIC. 84083e72ca8cSmrg case $host_os in 84093e72ca8cSmrg aix3*) 84103e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 84113e72ca8cSmrg if test -n "$RANLIB"; then 84123e72ca8cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 84133e72ca8cSmrg postinstall_cmds='$RANLIB $lib' 84143e72ca8cSmrg fi 84153e72ca8cSmrg ;; 84163e72ca8cSmrg aix[[4-9]]*) 84173e72ca8cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 84183e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 84193e72ca8cSmrg fi 84203e72ca8cSmrg ;; 84213e72ca8cSmrg esac 84223e72ca8cSmrg AC_MSG_RESULT([$enable_shared]) 842334977a2fSmrg 84243e72ca8cSmrg AC_MSG_CHECKING([whether to build static libraries]) 84253e72ca8cSmrg # Make sure either enable_shared or enable_static is yes. 84263e72ca8cSmrg test "$enable_shared" = yes || enable_static=yes 84273e72ca8cSmrg AC_MSG_RESULT([$enable_static]) 842834977a2fSmrg 84293e72ca8cSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 84303e72ca8cSmrg _LT_TAGVAR(LD, $1)="$LD" 843134977a2fSmrg 84323e72ca8cSmrg ## CAVEAT EMPTOR: 84333e72ca8cSmrg ## There is no encapsulation within the following macros, do not change 84343e72ca8cSmrg ## the running order or otherwise move them around unless you know exactly 84353e72ca8cSmrg ## what you are doing... 84363e72ca8cSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 84373e72ca8cSmrg _LT_COMPILER_PIC($1) 84383e72ca8cSmrg _LT_COMPILER_C_O($1) 84393e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 84403e72ca8cSmrg _LT_LINKER_SHLIBS($1) 84413e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 84423e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 844334977a2fSmrg 84443e72ca8cSmrg _LT_CONFIG($1) 84453e72ca8cSmrg fi # test -n "$compiler" 844634977a2fSmrg 84473e72ca8cSmrg GCC=$lt_save_GCC 84483e72ca8cSmrg CC=$lt_save_CC 84493e72ca8cSmrg CFLAGS=$lt_save_CFLAGS 84503e72ca8cSmrgfi # test "$_lt_disable_FC" != yes 845134977a2fSmrg 84523e72ca8cSmrgAC_LANG_POP 84533e72ca8cSmrg])# _LT_LANG_FC_CONFIG 8454a1ed278cSmrg 845534977a2fSmrg 84563e72ca8cSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 84573e72ca8cSmrg# -------------------------- 84583e72ca8cSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 84593e72ca8cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 84603e72ca8cSmrg# to write the compiler configuration to `libtool'. 84613e72ca8cSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 84623e72ca8cSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 84633e72ca8cSmrgAC_LANG_SAVE 846434977a2fSmrg 84653e72ca8cSmrg# Source file extension for Java test sources. 84663e72ca8cSmrgac_ext=java 846734977a2fSmrg 84683e72ca8cSmrg# Object file extension for compiled Java test sources. 84693e72ca8cSmrgobjext=o 84703e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 84713e72ca8cSmrg 84723e72ca8cSmrg# Code to be used in simple compile tests 84733e72ca8cSmrglt_simple_compile_test_code="class foo {}" 847434977a2fSmrg 84753e72ca8cSmrg# Code to be used in simple link tests 84763e72ca8cSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 847734977a2fSmrg 84783e72ca8cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 84793e72ca8cSmrg_LT_TAG_COMPILER 848034977a2fSmrg 84813e72ca8cSmrg# save warnings/boilerplate of simple test code 84823e72ca8cSmrg_LT_COMPILER_BOILERPLATE 84833e72ca8cSmrg_LT_LINKER_BOILERPLATE 848434977a2fSmrg 84853e72ca8cSmrg# Allow CC to be a program name with arguments. 84863e72ca8cSmrglt_save_CC=$CC 84873e72ca8cSmrglt_save_CFLAGS=$CFLAGS 84883e72ca8cSmrglt_save_GCC=$GCC 84893e72ca8cSmrgGCC=yes 84903e72ca8cSmrgCC=${GCJ-"gcj"} 84913e72ca8cSmrgCFLAGS=$GCJFLAGS 84923e72ca8cSmrgcompiler=$CC 84933e72ca8cSmrg_LT_TAGVAR(compiler, $1)=$CC 84943e72ca8cSmrg_LT_TAGVAR(LD, $1)="$LD" 84953e72ca8cSmrg_LT_CC_BASENAME([$compiler]) 849634977a2fSmrg 84973e72ca8cSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 84983e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8499ee3138f1Smrg 85003e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 85013e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 85023e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8503ee3138f1Smrg 85043e72ca8cSmrgif test -n "$compiler"; then 85053e72ca8cSmrg _LT_COMPILER_NO_RTTI($1) 85063e72ca8cSmrg _LT_COMPILER_PIC($1) 85073e72ca8cSmrg _LT_COMPILER_C_O($1) 85083e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 85093e72ca8cSmrg _LT_LINKER_SHLIBS($1) 85103e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8511ee3138f1Smrg 85123e72ca8cSmrg _LT_CONFIG($1) 85133e72ca8cSmrgfi 8514ee3138f1Smrg 85153e72ca8cSmrgAC_LANG_RESTORE 8516ee3138f1Smrg 85173e72ca8cSmrgGCC=$lt_save_GCC 85183e72ca8cSmrgCC=$lt_save_CC 85193e72ca8cSmrgCFLAGS=$lt_save_CFLAGS 85203e72ca8cSmrg])# _LT_LANG_GCJ_CONFIG 8521ee3138f1Smrg 8522ee3138f1Smrg 85233e72ca8cSmrg# _LT_LANG_GO_CONFIG([TAG]) 85243e72ca8cSmrg# -------------------------- 85253e72ca8cSmrg# Ensure that the configuration variables for the GNU Go compiler 85263e72ca8cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85273e72ca8cSmrg# to write the compiler configuration to `libtool'. 85283e72ca8cSmrgm4_defun([_LT_LANG_GO_CONFIG], 85293e72ca8cSmrg[AC_REQUIRE([LT_PROG_GO])dnl 85303e72ca8cSmrgAC_LANG_SAVE 853134977a2fSmrg 85323e72ca8cSmrg# Source file extension for Go test sources. 85333e72ca8cSmrgac_ext=go 8534a1ed278cSmrg 85353e72ca8cSmrg# Object file extension for compiled Go test sources. 85363e72ca8cSmrgobjext=o 85373e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 8538a1ed278cSmrg 85393e72ca8cSmrg# Code to be used in simple compile tests 85403e72ca8cSmrglt_simple_compile_test_code="package main; func main() { }" 8541a1ed278cSmrg 85423e72ca8cSmrg# Code to be used in simple link tests 85433e72ca8cSmrglt_simple_link_test_code='package main; func main() { }' 8544a1ed278cSmrg 85453e72ca8cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 85463e72ca8cSmrg_LT_TAG_COMPILER 8547a1ed278cSmrg 85483e72ca8cSmrg# save warnings/boilerplate of simple test code 85493e72ca8cSmrg_LT_COMPILER_BOILERPLATE 85503e72ca8cSmrg_LT_LINKER_BOILERPLATE 8551a1ed278cSmrg 85523e72ca8cSmrg# Allow CC to be a program name with arguments. 85533e72ca8cSmrglt_save_CC=$CC 85543e72ca8cSmrglt_save_CFLAGS=$CFLAGS 85553e72ca8cSmrglt_save_GCC=$GCC 85563e72ca8cSmrgGCC=yes 85573e72ca8cSmrgCC=${GOC-"gccgo"} 85583e72ca8cSmrgCFLAGS=$GOFLAGS 85593e72ca8cSmrgcompiler=$CC 85603e72ca8cSmrg_LT_TAGVAR(compiler, $1)=$CC 85613e72ca8cSmrg_LT_TAGVAR(LD, $1)="$LD" 85623e72ca8cSmrg_LT_CC_BASENAME([$compiler]) 8563a1ed278cSmrg 85643e72ca8cSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 85653e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8566a1ed278cSmrg 85673e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 85683e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 85693e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8570ee3138f1Smrg 85713e72ca8cSmrgif test -n "$compiler"; then 85723e72ca8cSmrg _LT_COMPILER_NO_RTTI($1) 85733e72ca8cSmrg _LT_COMPILER_PIC($1) 85743e72ca8cSmrg _LT_COMPILER_C_O($1) 85753e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 85763e72ca8cSmrg _LT_LINKER_SHLIBS($1) 85773e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8578ee3138f1Smrg 85793e72ca8cSmrg _LT_CONFIG($1) 85803e72ca8cSmrgfi 8581ee3138f1Smrg 85823e72ca8cSmrgAC_LANG_RESTORE 8583b425557eSmrg 85843e72ca8cSmrgGCC=$lt_save_GCC 85853e72ca8cSmrgCC=$lt_save_CC 85863e72ca8cSmrgCFLAGS=$lt_save_CFLAGS 85873e72ca8cSmrg])# _LT_LANG_GO_CONFIG 8588ee3138f1Smrg 8589ee3138f1Smrg 85903e72ca8cSmrg# _LT_LANG_RC_CONFIG([TAG]) 85913e72ca8cSmrg# ------------------------- 85923e72ca8cSmrg# Ensure that the configuration variables for the Windows resource compiler 85933e72ca8cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85943e72ca8cSmrg# to write the compiler configuration to `libtool'. 85953e72ca8cSmrgm4_defun([_LT_LANG_RC_CONFIG], 85963e72ca8cSmrg[AC_REQUIRE([LT_PROG_RC])dnl 85973e72ca8cSmrgAC_LANG_SAVE 8598ee3138f1Smrg 85993e72ca8cSmrg# Source file extension for RC test sources. 86003e72ca8cSmrgac_ext=rc 860134977a2fSmrg 86023e72ca8cSmrg# Object file extension for compiled RC test sources. 86033e72ca8cSmrgobjext=o 86043e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 860534977a2fSmrg 86063e72ca8cSmrg# Code to be used in simple compile tests 86073e72ca8cSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 860834977a2fSmrg 86093e72ca8cSmrg# Code to be used in simple link tests 86103e72ca8cSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 861134977a2fSmrg 86123e72ca8cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 86133e72ca8cSmrg_LT_TAG_COMPILER 861434977a2fSmrg 86153e72ca8cSmrg# save warnings/boilerplate of simple test code 86163e72ca8cSmrg_LT_COMPILER_BOILERPLATE 86173e72ca8cSmrg_LT_LINKER_BOILERPLATE 8618ee3138f1Smrg 86193e72ca8cSmrg# Allow CC to be a program name with arguments. 86203e72ca8cSmrglt_save_CC="$CC" 86213e72ca8cSmrglt_save_CFLAGS=$CFLAGS 86223e72ca8cSmrglt_save_GCC=$GCC 86233e72ca8cSmrgGCC= 86243e72ca8cSmrgCC=${RC-"windres"} 86253e72ca8cSmrgCFLAGS= 86263e72ca8cSmrgcompiler=$CC 86273e72ca8cSmrg_LT_TAGVAR(compiler, $1)=$CC 86283e72ca8cSmrg_LT_CC_BASENAME([$compiler]) 86293e72ca8cSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 86303e72ca8cSmrg 86313e72ca8cSmrgif test -n "$compiler"; then 86323e72ca8cSmrg : 86333e72ca8cSmrg _LT_CONFIG($1) 8634a1ed278cSmrgfi 8635ee3138f1Smrg 86363e72ca8cSmrgGCC=$lt_save_GCC 86373e72ca8cSmrgAC_LANG_RESTORE 86383e72ca8cSmrgCC=$lt_save_CC 86393e72ca8cSmrgCFLAGS=$lt_save_CFLAGS 86403e72ca8cSmrg])# _LT_LANG_RC_CONFIG 8641ee3138f1Smrg 8642ee3138f1Smrg 86433e72ca8cSmrg# LT_PROG_GCJ 86443e72ca8cSmrg# ----------- 86453e72ca8cSmrgAC_DEFUN([LT_PROG_GCJ], 86463e72ca8cSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 86473e72ca8cSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 86483e72ca8cSmrg [AC_CHECK_TOOL(GCJ, gcj,) 86493e72ca8cSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 86503e72ca8cSmrg AC_SUBST(GCJFLAGS)])])[]dnl 86513e72ca8cSmrg]) 8652ee3138f1Smrg 86533e72ca8cSmrg# Old name: 86543e72ca8cSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 86553e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 86563e72ca8cSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8657ee3138f1Smrg 8658ee3138f1Smrg 86593e72ca8cSmrg# LT_PROG_GO 86603e72ca8cSmrg# ---------- 86613e72ca8cSmrgAC_DEFUN([LT_PROG_GO], 86623e72ca8cSmrg[AC_CHECK_TOOL(GOC, gccgo,) 86633e72ca8cSmrg]) 8664ee3138f1Smrg 8665ee3138f1Smrg 86663e72ca8cSmrg# LT_PROG_RC 86673e72ca8cSmrg# ---------- 86683e72ca8cSmrgAC_DEFUN([LT_PROG_RC], 86693e72ca8cSmrg[AC_CHECK_TOOL(RC, windres,) 86703e72ca8cSmrg]) 8671ee3138f1Smrg 86723e72ca8cSmrg# Old name: 86733e72ca8cSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 86743e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 86753e72ca8cSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8676ee3138f1Smrg 8677ee3138f1Smrg 86783e72ca8cSmrg# _LT_DECL_EGREP 86793e72ca8cSmrg# -------------- 86803e72ca8cSmrg# If we don't have a new enough Autoconf to choose the best grep 86813e72ca8cSmrg# available, choose the one first in the user's PATH. 86823e72ca8cSmrgm4_defun([_LT_DECL_EGREP], 86833e72ca8cSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 86843e72ca8cSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 86853e72ca8cSmrgtest -z "$GREP" && GREP=grep 86863e72ca8cSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 86873e72ca8cSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 86883e72ca8cSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 86893e72ca8cSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 86903e72ca8cSmrgAC_SUBST([GREP]) 86913e72ca8cSmrg]) 8692ee3138f1Smrg 8693b425557eSmrg 86943e72ca8cSmrg# _LT_DECL_OBJDUMP 86953e72ca8cSmrg# -------------- 86963e72ca8cSmrg# If we don't have a new enough Autoconf to choose the best objdump 86973e72ca8cSmrg# available, choose the one first in the user's PATH. 86983e72ca8cSmrgm4_defun([_LT_DECL_OBJDUMP], 86993e72ca8cSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 87003e72ca8cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 87013e72ca8cSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 87023e72ca8cSmrgAC_SUBST([OBJDUMP]) 87033e72ca8cSmrg]) 8704b425557eSmrg 87053e72ca8cSmrg# _LT_DECL_DLLTOOL 87063e72ca8cSmrg# ---------------- 87073e72ca8cSmrg# Ensure DLLTOOL variable is set. 87083e72ca8cSmrgm4_defun([_LT_DECL_DLLTOOL], 87093e72ca8cSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 87103e72ca8cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 87113e72ca8cSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 87123e72ca8cSmrgAC_SUBST([DLLTOOL]) 87133e72ca8cSmrg]) 8714b425557eSmrg 87153e72ca8cSmrg# _LT_DECL_SED 87163e72ca8cSmrg# ------------ 87173e72ca8cSmrg# Check for a fully-functional sed program, that truncates 87183e72ca8cSmrg# as few characters as possible. Prefer GNU sed if found. 87193e72ca8cSmrgm4_defun([_LT_DECL_SED], 87203e72ca8cSmrg[AC_PROG_SED 87213e72ca8cSmrgtest -z "$SED" && SED=sed 87223e72ca8cSmrgXsed="$SED -e 1s/^X//" 87233e72ca8cSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 87243e72ca8cSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 87253e72ca8cSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 87263e72ca8cSmrg])# _LT_DECL_SED 8727b425557eSmrg 87283e72ca8cSmrgm4_ifndef([AC_PROG_SED], [ 87293e72ca8cSmrg# NOTE: This macro has been submitted for inclusion into # 87303e72ca8cSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 87313e72ca8cSmrg# a released version of Autoconf we should remove this # 87323e72ca8cSmrg# macro and use it instead. # 8733b425557eSmrg 87343e72ca8cSmrgm4_defun([AC_PROG_SED], 87353e72ca8cSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 87363e72ca8cSmrgAC_CACHE_VAL(lt_cv_path_SED, 87373e72ca8cSmrg[# Loop through the user's path and test for sed and gsed. 87383e72ca8cSmrg# Then use that list of sed's as ones to test for truncation. 87393e72ca8cSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 87403e72ca8cSmrgfor as_dir in $PATH 87413e72ca8cSmrgdo 87423e72ca8cSmrg IFS=$as_save_IFS 87433e72ca8cSmrg test -z "$as_dir" && as_dir=. 87443e72ca8cSmrg for lt_ac_prog in sed gsed; do 87453e72ca8cSmrg for ac_exec_ext in '' $ac_executable_extensions; do 87463e72ca8cSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 87473e72ca8cSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 87483e72ca8cSmrg fi 87493e72ca8cSmrg done 87503e72ca8cSmrg done 87513e72ca8cSmrgdone 87523e72ca8cSmrgIFS=$as_save_IFS 87533e72ca8cSmrglt_ac_max=0 87543e72ca8cSmrglt_ac_count=0 87553e72ca8cSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 87563e72ca8cSmrg# along with /bin/sed that truncates output. 87573e72ca8cSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 87583e72ca8cSmrg test ! -f $lt_ac_sed && continue 87593e72ca8cSmrg cat /dev/null > conftest.in 87603e72ca8cSmrg lt_ac_count=0 87613e72ca8cSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 87623e72ca8cSmrg # Check for GNU sed and select it if it is found. 87633e72ca8cSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 87643e72ca8cSmrg lt_cv_path_SED=$lt_ac_sed 87653e72ca8cSmrg break 87663e72ca8cSmrg fi 87673e72ca8cSmrg while true; do 87683e72ca8cSmrg cat conftest.in conftest.in >conftest.tmp 87693e72ca8cSmrg mv conftest.tmp conftest.in 87703e72ca8cSmrg cp conftest.in conftest.nl 87713e72ca8cSmrg echo >>conftest.nl 87723e72ca8cSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 87733e72ca8cSmrg cmp -s conftest.out conftest.nl || break 87743e72ca8cSmrg # 10000 chars as input seems more than enough 87753e72ca8cSmrg test $lt_ac_count -gt 10 && break 87763e72ca8cSmrg lt_ac_count=`expr $lt_ac_count + 1` 87773e72ca8cSmrg if test $lt_ac_count -gt $lt_ac_max; then 87783e72ca8cSmrg lt_ac_max=$lt_ac_count 87793e72ca8cSmrg lt_cv_path_SED=$lt_ac_sed 87803e72ca8cSmrg fi 87813e72ca8cSmrg done 87823e72ca8cSmrgdone 8783a1ed278cSmrg]) 87843e72ca8cSmrgSED=$lt_cv_path_SED 87853e72ca8cSmrgAC_SUBST([SED]) 87863e72ca8cSmrgAC_MSG_RESULT([$SED]) 87873e72ca8cSmrg])#AC_PROG_SED 87883e72ca8cSmrg])#m4_ifndef 8789b425557eSmrg 87903e72ca8cSmrg# Old name: 87913e72ca8cSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 87923e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 87933e72ca8cSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8794b425557eSmrg 8795ee3138f1Smrg 87963e72ca8cSmrg# _LT_CHECK_SHELL_FEATURES 87973e72ca8cSmrg# ------------------------ 87983e72ca8cSmrg# Find out whether the shell is Bourne or XSI compatible, 87993e72ca8cSmrg# or has some other useful features. 88003e72ca8cSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 88013e72ca8cSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 88023e72ca8cSmrg# Try some XSI features 88033e72ca8cSmrgxsi_shell=no 88043e72ca8cSmrg( _lt_dummy="a/b/c" 88053e72ca8cSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 88063e72ca8cSmrg = c,a/b,b/c, \ 88073e72ca8cSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 88083e72ca8cSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 88093e72ca8cSmrg && xsi_shell=yes 88103e72ca8cSmrgAC_MSG_RESULT([$xsi_shell]) 88113e72ca8cSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8812ee3138f1Smrg 88133e72ca8cSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 88143e72ca8cSmrglt_shell_append=no 88153e72ca8cSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 88163e72ca8cSmrg >/dev/null 2>&1 \ 88173e72ca8cSmrg && lt_shell_append=yes 88183e72ca8cSmrgAC_MSG_RESULT([$lt_shell_append]) 88193e72ca8cSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8820ee3138f1Smrg 88213e72ca8cSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 88223e72ca8cSmrg lt_unset=unset 88233e72ca8cSmrgelse 88243e72ca8cSmrg lt_unset=false 88253e72ca8cSmrgfi 88263e72ca8cSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8827ee3138f1Smrg 88283e72ca8cSmrg# test EBCDIC or ASCII 88293e72ca8cSmrgcase `echo X|tr X '\101'` in 88303e72ca8cSmrg A) # ASCII based system 88313e72ca8cSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 88323e72ca8cSmrg lt_SP2NL='tr \040 \012' 88333e72ca8cSmrg lt_NL2SP='tr \015\012 \040\040' 88343e72ca8cSmrg ;; 88353e72ca8cSmrg *) # EBCDIC based system 88363e72ca8cSmrg lt_SP2NL='tr \100 \n' 88373e72ca8cSmrg lt_NL2SP='tr \r\n \100\100' 88383e72ca8cSmrg ;; 88393e72ca8cSmrgesac 88403e72ca8cSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 88413e72ca8cSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 88423e72ca8cSmrg])# _LT_CHECK_SHELL_FEATURES 88433e72ca8cSmrg 88443e72ca8cSmrg 88453e72ca8cSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 88463e72ca8cSmrg# ------------------------------------------------------ 88473e72ca8cSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 88483e72ca8cSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 88493e72ca8cSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 88503e72ca8cSmrg[dnl { 88513e72ca8cSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 88523e72ca8cSmrg$1 ()\ 88533e72ca8cSmrg{\ 88543e72ca8cSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 88553e72ca8cSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 88563e72ca8cSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 88573e72ca8cSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 88583e72ca8cSmrgtest 0 -eq $? || _lt_function_replace_fail=: 8859a1ed278cSmrg]) 886034977a2fSmrg 886134977a2fSmrg 88623e72ca8cSmrg# _LT_PROG_REPLACE_SHELLFNS 88633e72ca8cSmrg# ------------------------- 88643e72ca8cSmrg# Replace existing portable implementations of several shell functions with 88653e72ca8cSmrg# equivalent extended shell implementations where those features are available.. 88663e72ca8cSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 88673e72ca8cSmrg[if test x"$xsi_shell" = xyes; then 88683e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 88693e72ca8cSmrg case ${1} in 88703e72ca8cSmrg */*) func_dirname_result="${1%/*}${2}" ;; 88713e72ca8cSmrg * ) func_dirname_result="${3}" ;; 88723e72ca8cSmrg esac]) 88733e72ca8cSmrg 88743e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 88753e72ca8cSmrg func_basename_result="${1##*/}"]) 88763e72ca8cSmrg 88773e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 88783e72ca8cSmrg case ${1} in 88793e72ca8cSmrg */*) func_dirname_result="${1%/*}${2}" ;; 88803e72ca8cSmrg * ) func_dirname_result="${3}" ;; 88813e72ca8cSmrg esac 88823e72ca8cSmrg func_basename_result="${1##*/}"]) 888334977a2fSmrg 88843e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 88853e72ca8cSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 88863e72ca8cSmrg # positional parameters, so assign one to ordinary parameter first. 88873e72ca8cSmrg func_stripname_result=${3} 88883e72ca8cSmrg func_stripname_result=${func_stripname_result#"${1}"} 88893e72ca8cSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 889034977a2fSmrg 88913e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 88923e72ca8cSmrg func_split_long_opt_name=${1%%=*} 88933e72ca8cSmrg func_split_long_opt_arg=${1#*=}]) 88943e72ca8cSmrg 88953e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 88963e72ca8cSmrg func_split_short_opt_arg=${1#??} 88973e72ca8cSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 88983e72ca8cSmrg 88993e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 89003e72ca8cSmrg case ${1} in 89013e72ca8cSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 89023e72ca8cSmrg *) func_lo2o_result=${1} ;; 89033e72ca8cSmrg esac]) 89043e72ca8cSmrg 89053e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 89063e72ca8cSmrg 89073e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 89083e72ca8cSmrg 89093e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 8910a1ed278cSmrgfi 891134977a2fSmrg 89123e72ca8cSmrgif test x"$lt_shell_append" = xyes; then 89133e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 8914ee3138f1Smrg 89153e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 89163e72ca8cSmrg func_quote_for_eval "${2}" 89173e72ca8cSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 89183e72ca8cSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 8919ee3138f1Smrg 89203e72ca8cSmrg # Save a `func_append' function call where possible by direct use of '+=' 89213e72ca8cSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 89223e72ca8cSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89233e72ca8cSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89243e72ca8cSmrg test 0 -eq $? || _lt_function_replace_fail=: 89253e72ca8cSmrgelse 89263e72ca8cSmrg # Save a `func_append' function call even when '+=' is not available 89273e72ca8cSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 89283e72ca8cSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89293e72ca8cSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89303e72ca8cSmrg test 0 -eq $? || _lt_function_replace_fail=: 89313e72ca8cSmrgfi 8932ee3138f1Smrg 89333e72ca8cSmrgif test x"$_lt_function_replace_fail" = x":"; then 89343e72ca8cSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 89353e72ca8cSmrgfi 89363e72ca8cSmrg]) 8937ee3138f1Smrg 89383e72ca8cSmrg# _LT_PATH_CONVERSION_FUNCTIONS 89393e72ca8cSmrg# ----------------------------- 89403e72ca8cSmrg# Determine which file name conversion functions should be used by 89413e72ca8cSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 89423e72ca8cSmrg# for certain cross-compile configurations and native mingw. 89433e72ca8cSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 89443e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 89453e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 89463e72ca8cSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 89473e72ca8cSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 89483e72ca8cSmrg[case $host in 89493e72ca8cSmrg *-*-mingw* ) 89503e72ca8cSmrg case $build in 89513e72ca8cSmrg *-*-mingw* ) # actually msys 89523e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 89533e72ca8cSmrg ;; 89543e72ca8cSmrg *-*-cygwin* ) 89553e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 89563e72ca8cSmrg ;; 89573e72ca8cSmrg * ) # otherwise, assume *nix 89583e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 89593e72ca8cSmrg ;; 89603e72ca8cSmrg esac 89613e72ca8cSmrg ;; 89623e72ca8cSmrg *-*-cygwin* ) 89633e72ca8cSmrg case $build in 89643e72ca8cSmrg *-*-mingw* ) # actually msys 89653e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 89663e72ca8cSmrg ;; 89673e72ca8cSmrg *-*-cygwin* ) 89683e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 89693e72ca8cSmrg ;; 89703e72ca8cSmrg * ) # otherwise, assume *nix 89713e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 89723e72ca8cSmrg ;; 89733e72ca8cSmrg esac 89743e72ca8cSmrg ;; 89753e72ca8cSmrg * ) # unhandled hosts (and "normal" native builds) 89763e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 89773e72ca8cSmrg ;; 89783e72ca8cSmrgesac 89793e72ca8cSmrg]) 89803e72ca8cSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 89813e72ca8cSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 89823e72ca8cSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 89833e72ca8cSmrg [0], [convert $build file names to $host format])dnl 89843e72ca8cSmrg 89853e72ca8cSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 89863e72ca8cSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 89873e72ca8cSmrg[#assume ordinary cross tools, or native build. 89883e72ca8cSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 89893e72ca8cSmrgcase $host in 89903e72ca8cSmrg *-*-mingw* ) 89913e72ca8cSmrg case $build in 89923e72ca8cSmrg *-*-mingw* ) # actually msys 89933e72ca8cSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 89943e72ca8cSmrg ;; 89953e72ca8cSmrg esac 89963e72ca8cSmrg ;; 89973e72ca8cSmrgesac 89983e72ca8cSmrg]) 89993e72ca8cSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 90003e72ca8cSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 90013e72ca8cSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 90023e72ca8cSmrg [0], [convert $build files to toolchain format])dnl 90033e72ca8cSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 90043e72ca8cSmrg 90053e72ca8cSmrg# Helper functions for option handling. -*- Autoconf -*- 9006a1ed278cSmrg# 90073e72ca8cSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 90083e72ca8cSmrg# Inc. 90093e72ca8cSmrg# Written by Gary V. Vaughan, 2004 90103e72ca8cSmrg# 90113e72ca8cSmrg# This file is free software; the Free Software Foundation gives 90123e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 90133e72ca8cSmrg# modifications, as long as this notice is preserved. 9014ee3138f1Smrg 90153e72ca8cSmrg# serial 7 ltoptions.m4 9016ee3138f1Smrg 90173e72ca8cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 90183e72ca8cSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9019ee3138f1Smrg 9020ee3138f1Smrg 90213e72ca8cSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 90223e72ca8cSmrg# ------------------------------------------ 90233e72ca8cSmrgm4_define([_LT_MANGLE_OPTION], 90243e72ca8cSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9025ee3138f1Smrg 9026ee3138f1Smrg 90273e72ca8cSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 90283e72ca8cSmrg# --------------------------------------- 90293e72ca8cSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 90303e72ca8cSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 90313e72ca8cSmrg# saved as a flag. 90323e72ca8cSmrgm4_define([_LT_SET_OPTION], 90333e72ca8cSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 90343e72ca8cSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 90353e72ca8cSmrg _LT_MANGLE_DEFUN([$1], [$2]), 90363e72ca8cSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9037a1ed278cSmrg]) 90383e72ca8cSmrg 90393e72ca8cSmrg 90403e72ca8cSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 90413e72ca8cSmrg# ------------------------------------------------------------ 90423e72ca8cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 90433e72ca8cSmrgm4_define([_LT_IF_OPTION], 90443e72ca8cSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 90453e72ca8cSmrg 90463e72ca8cSmrg 90473e72ca8cSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 90483e72ca8cSmrg# ------------------------------------------------------- 90493e72ca8cSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 90503e72ca8cSmrg# are set. 90513e72ca8cSmrgm4_define([_LT_UNLESS_OPTIONS], 90523e72ca8cSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 90533e72ca8cSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 90543e72ca8cSmrg [m4_define([$0_found])])])[]dnl 90553e72ca8cSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 90563e72ca8cSmrg])[]dnl 9057a1ed278cSmrg]) 9058ee3138f1Smrg 9059ee3138f1Smrg 90603e72ca8cSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 90613e72ca8cSmrg# ---------------------------------------- 90623e72ca8cSmrg# OPTION-LIST is a space-separated list of Libtool options associated 90633e72ca8cSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 90643e72ca8cSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 90653e72ca8cSmrg# the unknown option and exit. 90663e72ca8cSmrgm4_defun([_LT_SET_OPTIONS], 90673e72ca8cSmrg[# Set options 90683e72ca8cSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 90693e72ca8cSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 90703e72ca8cSmrg 90713e72ca8cSmrgm4_if([$1],[LT_INIT],[ 90723e72ca8cSmrg dnl 90733e72ca8cSmrg dnl Simply set some default values (i.e off) if boolean options were not 90743e72ca8cSmrg dnl specified: 90753e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 90763e72ca8cSmrg ]) 90773e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 90783e72ca8cSmrg ]) 90793e72ca8cSmrg dnl 90803e72ca8cSmrg dnl If no reference was made to various pairs of opposing options, then 90813e72ca8cSmrg dnl we run the default mode handler for the pair. For example, if neither 90823e72ca8cSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 90833e72ca8cSmrg dnl archives by default: 90843e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 90853e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 90863e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 90873e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 90883e72ca8cSmrg [_LT_ENABLE_FAST_INSTALL]) 90893e72ca8cSmrg ]) 90903e72ca8cSmrg])# _LT_SET_OPTIONS 9091ee3138f1Smrg 9092ee3138f1Smrg 9093ee3138f1Smrg 90943e72ca8cSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 90953e72ca8cSmrg# ----------------------------------------- 90963e72ca8cSmrgm4_define([_LT_MANGLE_DEFUN], 90973e72ca8cSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9098b425557eSmrg 9099b425557eSmrg 91003e72ca8cSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 91013e72ca8cSmrg# ----------------------------------------------- 91023e72ca8cSmrgm4_define([LT_OPTION_DEFINE], 91033e72ca8cSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 91043e72ca8cSmrg])# LT_OPTION_DEFINE 9105ee3138f1Smrg 9106ee3138f1Smrg 91073e72ca8cSmrg# dlopen 91083e72ca8cSmrg# ------ 91093e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 91103e72ca8cSmrg]) 9111ee3138f1Smrg 91123e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 91133e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 91143e72ca8cSmrgAC_DIAGNOSE([obsolete], 91153e72ca8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 91163e72ca8cSmrgput the `dlopen' option into LT_INIT's first parameter.]) 9117b425557eSmrg]) 9118ee3138f1Smrg 91193e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 91203e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9121ee3138f1Smrg 9122ee3138f1Smrg 91233e72ca8cSmrg# win32-dll 91243e72ca8cSmrg# --------- 91253e72ca8cSmrg# Declare package support for building win32 dll's. 91263e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 91273e72ca8cSmrg[enable_win32_dll=yes 9128ee3138f1Smrg 91293e72ca8cSmrgcase $host in 91303e72ca8cSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 91313e72ca8cSmrg AC_CHECK_TOOL(AS, as, false) 91323e72ca8cSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 91333e72ca8cSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 91343e72ca8cSmrg ;; 91353e72ca8cSmrgesac 9136b425557eSmrg 91373e72ca8cSmrgtest -z "$AS" && AS=as 91383e72ca8cSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9139ee3138f1Smrg 91403e72ca8cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 91413e72ca8cSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9142a1ed278cSmrg 91433e72ca8cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 91443e72ca8cSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 91453e72ca8cSmrg])# win32-dll 9146a1ed278cSmrg 91473e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 91483e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 91493e72ca8cSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 91503e72ca8cSmrgAC_DIAGNOSE([obsolete], 91513e72ca8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 91523e72ca8cSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 91533e72ca8cSmrg]) 9154a1ed278cSmrg 91553e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 91563e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 91573e72ca8cSmrg 91583e72ca8cSmrg 91593e72ca8cSmrg# _LT_ENABLE_SHARED([DEFAULT]) 91603e72ca8cSmrg# ---------------------------- 91613e72ca8cSmrg# implement the --enable-shared flag, and supports the `shared' and 91623e72ca8cSmrg# `disable-shared' LT_INIT options. 91633e72ca8cSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 91643e72ca8cSmrgm4_define([_LT_ENABLE_SHARED], 91653e72ca8cSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 91663e72ca8cSmrgAC_ARG_ENABLE([shared], 91673e72ca8cSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 91683e72ca8cSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 91693e72ca8cSmrg [p=${PACKAGE-default} 91703e72ca8cSmrg case $enableval in 91713e72ca8cSmrg yes) enable_shared=yes ;; 91723e72ca8cSmrg no) enable_shared=no ;; 91733e72ca8cSmrg *) 91743e72ca8cSmrg enable_shared=no 91753e72ca8cSmrg # Look at the argument we got. We use all the common list separators. 91763e72ca8cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 91773e72ca8cSmrg for pkg in $enableval; do 91783e72ca8cSmrg IFS="$lt_save_ifs" 91793e72ca8cSmrg if test "X$pkg" = "X$p"; then 91803e72ca8cSmrg enable_shared=yes 91813e72ca8cSmrg fi 91823e72ca8cSmrg done 91833e72ca8cSmrg IFS="$lt_save_ifs" 91843e72ca8cSmrg ;; 91853e72ca8cSmrg esac], 91863e72ca8cSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 91873e72ca8cSmrg 91883e72ca8cSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 91893e72ca8cSmrg [Whether or not to build shared libraries]) 91903e72ca8cSmrg])# _LT_ENABLE_SHARED 91913e72ca8cSmrg 91923e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 91933e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 91943e72ca8cSmrg 91953e72ca8cSmrg# Old names: 91963e72ca8cSmrgAC_DEFUN([AC_ENABLE_SHARED], 91973e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9198b425557eSmrg]) 91993e72ca8cSmrg 92003e72ca8cSmrgAC_DEFUN([AC_DISABLE_SHARED], 92013e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9202b425557eSmrg]) 9203ee3138f1Smrg 92043e72ca8cSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 92053e72ca8cSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9206ee3138f1Smrg 92073e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 92083e72ca8cSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 92093e72ca8cSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 921034977a2fSmrg 921134977a2fSmrg 9212ee3138f1Smrg 92133e72ca8cSmrg# _LT_ENABLE_STATIC([DEFAULT]) 92143e72ca8cSmrg# ---------------------------- 92153e72ca8cSmrg# implement the --enable-static flag, and support the `static' and 92163e72ca8cSmrg# `disable-static' LT_INIT options. 92173e72ca8cSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92183e72ca8cSmrgm4_define([_LT_ENABLE_STATIC], 92193e72ca8cSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 92203e72ca8cSmrgAC_ARG_ENABLE([static], 92213e72ca8cSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 92223e72ca8cSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 92233e72ca8cSmrg [p=${PACKAGE-default} 92243e72ca8cSmrg case $enableval in 92253e72ca8cSmrg yes) enable_static=yes ;; 92263e72ca8cSmrg no) enable_static=no ;; 92273e72ca8cSmrg *) 92283e72ca8cSmrg enable_static=no 92293e72ca8cSmrg # Look at the argument we got. We use all the common list separators. 92303e72ca8cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92313e72ca8cSmrg for pkg in $enableval; do 92323e72ca8cSmrg IFS="$lt_save_ifs" 92333e72ca8cSmrg if test "X$pkg" = "X$p"; then 92343e72ca8cSmrg enable_static=yes 92353e72ca8cSmrg fi 92363e72ca8cSmrg done 92373e72ca8cSmrg IFS="$lt_save_ifs" 92383e72ca8cSmrg ;; 92393e72ca8cSmrg esac], 92403e72ca8cSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9241ee3138f1Smrg 92423e72ca8cSmrg _LT_DECL([build_old_libs], [enable_static], [0], 92433e72ca8cSmrg [Whether or not to build static libraries]) 92443e72ca8cSmrg])# _LT_ENABLE_STATIC 9245ee3138f1Smrg 92463e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 92473e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9248ee3138f1Smrg 92493e72ca8cSmrg# Old names: 92503e72ca8cSmrgAC_DEFUN([AC_ENABLE_STATIC], 92513e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 92523e72ca8cSmrg]) 9253ee3138f1Smrg 92543e72ca8cSmrgAC_DEFUN([AC_DISABLE_STATIC], 92553e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 92563e72ca8cSmrg]) 9257ee3138f1Smrg 92583e72ca8cSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 92593e72ca8cSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 92603e72ca8cSmrg 92613e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 92623e72ca8cSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 92633e72ca8cSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9264ee3138f1Smrg 9265ee3138f1Smrg 9266ee3138f1Smrg 92673e72ca8cSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9268a1ed278cSmrg# ---------------------------------- 92693e72ca8cSmrg# implement the --enable-fast-install flag, and support the `fast-install' 92703e72ca8cSmrg# and `disable-fast-install' LT_INIT options. 92713e72ca8cSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92723e72ca8cSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 92733e72ca8cSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 92743e72ca8cSmrgAC_ARG_ENABLE([fast-install], 92753e72ca8cSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 92763e72ca8cSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 92773e72ca8cSmrg [p=${PACKAGE-default} 92783e72ca8cSmrg case $enableval in 92793e72ca8cSmrg yes) enable_fast_install=yes ;; 92803e72ca8cSmrg no) enable_fast_install=no ;; 92813e72ca8cSmrg *) 92823e72ca8cSmrg enable_fast_install=no 92833e72ca8cSmrg # Look at the argument we got. We use all the common list separators. 92843e72ca8cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92853e72ca8cSmrg for pkg in $enableval; do 92863e72ca8cSmrg IFS="$lt_save_ifs" 92873e72ca8cSmrg if test "X$pkg" = "X$p"; then 92883e72ca8cSmrg enable_fast_install=yes 92893e72ca8cSmrg fi 92903e72ca8cSmrg done 92913e72ca8cSmrg IFS="$lt_save_ifs" 92923e72ca8cSmrg ;; 92933e72ca8cSmrg esac], 92943e72ca8cSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9295ee3138f1Smrg 92963e72ca8cSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 92973e72ca8cSmrg [Whether or not to optimize for fast installation])dnl 92983e72ca8cSmrg])# _LT_ENABLE_FAST_INSTALL 929979a8a9c6Smrg 93003e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 93013e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 930279a8a9c6Smrg 93033e72ca8cSmrg# Old names: 93043e72ca8cSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 93053e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 93063e72ca8cSmrgAC_DIAGNOSE([obsolete], 93073e72ca8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 93083e72ca8cSmrgthe `fast-install' option into LT_INIT's first parameter.]) 93093e72ca8cSmrg]) 931079a8a9c6Smrg 93113e72ca8cSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 93123e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 93133e72ca8cSmrgAC_DIAGNOSE([obsolete], 93143e72ca8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 93153e72ca8cSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 93163e72ca8cSmrg]) 931779a8a9c6Smrg 93183e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 93193e72ca8cSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 93203e72ca8cSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 93213e72ca8cSmrg 93223e72ca8cSmrg 93233e72ca8cSmrg# _LT_WITH_PIC([MODE]) 93243e72ca8cSmrg# -------------------- 93253e72ca8cSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 93263e72ca8cSmrg# LT_INIT options. 93273e72ca8cSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 93283e72ca8cSmrgm4_define([_LT_WITH_PIC], 93293e72ca8cSmrg[AC_ARG_WITH([pic], 93303e72ca8cSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 93313e72ca8cSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 93323e72ca8cSmrg [lt_p=${PACKAGE-default} 93333e72ca8cSmrg case $withval in 93343e72ca8cSmrg yes|no) pic_mode=$withval ;; 93353e72ca8cSmrg *) 93363e72ca8cSmrg pic_mode=default 93373e72ca8cSmrg # Look at the argument we got. We use all the common list separators. 93383e72ca8cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93393e72ca8cSmrg for lt_pkg in $withval; do 93403e72ca8cSmrg IFS="$lt_save_ifs" 93413e72ca8cSmrg if test "X$lt_pkg" = "X$lt_p"; then 93423e72ca8cSmrg pic_mode=yes 93433e72ca8cSmrg fi 93443e72ca8cSmrg done 93453e72ca8cSmrg IFS="$lt_save_ifs" 93463e72ca8cSmrg ;; 93473e72ca8cSmrg esac], 93483e72ca8cSmrg [pic_mode=default]) 93493e72ca8cSmrg 93503e72ca8cSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 93513e72ca8cSmrg 93523e72ca8cSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 93533e72ca8cSmrg])# _LT_WITH_PIC 93543e72ca8cSmrg 93553e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 93563e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 93573e72ca8cSmrg 93583e72ca8cSmrg# Old name: 93593e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 93603e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 93613e72ca8cSmrgAC_DIAGNOSE([obsolete], 93623e72ca8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 93633e72ca8cSmrgput the `pic-only' option into LT_INIT's first parameter.]) 9364a1ed278cSmrg]) 9365ee3138f1Smrg 93663e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 93673e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 93683e72ca8cSmrg 93693e72ca8cSmrg 93703e72ca8cSmrgm4_define([_LTDL_MODE], []) 93713e72ca8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 93723e72ca8cSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 93733e72ca8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 93743e72ca8cSmrg [m4_define([_LTDL_MODE], [recursive])]) 93753e72ca8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 93763e72ca8cSmrg [m4_define([_LTDL_MODE], [subproject])]) 9377ee3138f1Smrg 93783e72ca8cSmrgm4_define([_LTDL_TYPE], []) 93793e72ca8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 93803e72ca8cSmrg [m4_define([_LTDL_TYPE], [installable])]) 93813e72ca8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 93823e72ca8cSmrg [m4_define([_LTDL_TYPE], [convenience])]) 93833e72ca8cSmrg 93843e72ca8cSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9385a1ed278cSmrg# 93863e72ca8cSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 93873e72ca8cSmrg# Written by Gary V. Vaughan, 2004 93883e72ca8cSmrg# 93893e72ca8cSmrg# This file is free software; the Free Software Foundation gives 93903e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 93913e72ca8cSmrg# modifications, as long as this notice is preserved. 9392ee3138f1Smrg 93933e72ca8cSmrg# serial 6 ltsugar.m4 9394ee3138f1Smrg 93953e72ca8cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 93963e72ca8cSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9397ee3138f1Smrg 9398ee3138f1Smrg 93993e72ca8cSmrg# lt_join(SEP, ARG1, [ARG2...]) 94003e72ca8cSmrg# ----------------------------- 94013e72ca8cSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 94023e72ca8cSmrg# associated separator. 94033e72ca8cSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 94043e72ca8cSmrg# versions in m4sugar had bugs. 94053e72ca8cSmrgm4_define([lt_join], 94063e72ca8cSmrg[m4_if([$#], [1], [], 94073e72ca8cSmrg [$#], [2], [[$2]], 94083e72ca8cSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 94093e72ca8cSmrgm4_define([_lt_join], 94103e72ca8cSmrg[m4_if([$#$2], [2], [], 94113e72ca8cSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9412b425557eSmrg 941334977a2fSmrg 94143e72ca8cSmrg# lt_car(LIST) 94153e72ca8cSmrg# lt_cdr(LIST) 94163e72ca8cSmrg# ------------ 94173e72ca8cSmrg# Manipulate m4 lists. 94183e72ca8cSmrg# These macros are necessary as long as will still need to support 94193e72ca8cSmrg# Autoconf-2.59 which quotes differently. 94203e72ca8cSmrgm4_define([lt_car], [[$1]]) 94213e72ca8cSmrgm4_define([lt_cdr], 94223e72ca8cSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 94233e72ca8cSmrg [$#], 1, [], 94243e72ca8cSmrg [m4_dquote(m4_shift($@))])]) 94253e72ca8cSmrgm4_define([lt_unquote], $1) 942634977a2fSmrg 942734977a2fSmrg 94283e72ca8cSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 94293e72ca8cSmrg# ------------------------------------------ 94303e72ca8cSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 94313e72ca8cSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 94323e72ca8cSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 94333e72ca8cSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 94343e72ca8cSmrg# than defined and empty). 9435a1ed278cSmrg# 94363e72ca8cSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 94373e72ca8cSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 94383e72ca8cSmrgm4_define([lt_append], 94393e72ca8cSmrg[m4_define([$1], 94403e72ca8cSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 944134977a2fSmrg 944234977a2fSmrg 944334977a2fSmrg 94443e72ca8cSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 94453e72ca8cSmrg# ---------------------------------------------------------- 94463e72ca8cSmrg# Produce a SEP delimited list of all paired combinations of elements of 94473e72ca8cSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 94483e72ca8cSmrg# has the form PREFIXmINFIXSUFFIXn. 94493e72ca8cSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 94503e72ca8cSmrgm4_define([lt_combine], 94513e72ca8cSmrg[m4_if(m4_eval([$# > 3]), [1], 94523e72ca8cSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 94533e72ca8cSmrg[[m4_foreach([_Lt_prefix], [$2], 94543e72ca8cSmrg [m4_foreach([_Lt_suffix], 94553e72ca8cSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 94563e72ca8cSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9457b425557eSmrg 9458b425557eSmrg 94593e72ca8cSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 94603e72ca8cSmrg# ----------------------------------------------------------------------- 94613e72ca8cSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 94623e72ca8cSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 94633e72ca8cSmrgm4_define([lt_if_append_uniq], 94643e72ca8cSmrg[m4_ifdef([$1], 94653e72ca8cSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 94663e72ca8cSmrg [lt_append([$1], [$2], [$3])$4], 94673e72ca8cSmrg [$5])], 94683e72ca8cSmrg [lt_append([$1], [$2], [$3])$4])]) 9469b425557eSmrg 947034977a2fSmrg 94713e72ca8cSmrg# lt_dict_add(DICT, KEY, VALUE) 94723e72ca8cSmrg# ----------------------------- 94733e72ca8cSmrgm4_define([lt_dict_add], 94743e72ca8cSmrg[m4_define([$1($2)], [$3])]) 947534977a2fSmrg 947634977a2fSmrg 94773e72ca8cSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 94783e72ca8cSmrg# -------------------------------------------- 94793e72ca8cSmrgm4_define([lt_dict_add_subkey], 94803e72ca8cSmrg[m4_define([$1($2:$3)], [$4])]) 9481a1ed278cSmrg 948234977a2fSmrg 94833e72ca8cSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 94843e72ca8cSmrg# ---------------------------------- 94853e72ca8cSmrgm4_define([lt_dict_fetch], 94863e72ca8cSmrg[m4_ifval([$3], 94873e72ca8cSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 94883e72ca8cSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 948934977a2fSmrg 949034977a2fSmrg 94913e72ca8cSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 94923e72ca8cSmrg# ----------------------------------------------------------------- 94933e72ca8cSmrgm4_define([lt_if_dict_fetch], 94943e72ca8cSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 94953e72ca8cSmrg [$5], 94963e72ca8cSmrg [$6])]) 9497a1ed278cSmrg 94983e72ca8cSmrg 94993e72ca8cSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 95003e72ca8cSmrg# -------------------------------------------------------------- 95013e72ca8cSmrgm4_define([lt_dict_filter], 95023e72ca8cSmrg[m4_if([$5], [], [], 95033e72ca8cSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 95043e72ca8cSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 95053e72ca8cSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9506b425557eSmrg]) 950734977a2fSmrg 95083e72ca8cSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 9509a1ed278cSmrg# 95103e72ca8cSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 95113e72ca8cSmrg# Written by Scott James Remnant, 2004 95123e72ca8cSmrg# 95133e72ca8cSmrg# This file is free software; the Free Software Foundation gives 95143e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 95153e72ca8cSmrg# modifications, as long as this notice is preserved. 95163e72ca8cSmrg 95173e72ca8cSmrg# @configure_input@ 95183e72ca8cSmrg 95193e72ca8cSmrg# serial 3337 ltversion.m4 95203e72ca8cSmrg# This file is part of GNU Libtool 95213e72ca8cSmrg 95223e72ca8cSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 95233e72ca8cSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 95243e72ca8cSmrg 95253e72ca8cSmrgAC_DEFUN([LTVERSION_VERSION], 95263e72ca8cSmrg[macro_version='2.4.2' 95273e72ca8cSmrgmacro_revision='1.3337' 95283e72ca8cSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 95293e72ca8cSmrg_LT_DECL(, macro_revision, 0) 95303e72ca8cSmrg]) 9531ee3138f1Smrg 95323e72ca8cSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9533a1ed278cSmrg# 95343e72ca8cSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 95353e72ca8cSmrg# Written by Scott James Remnant, 2004. 95363e72ca8cSmrg# 95373e72ca8cSmrg# This file is free software; the Free Software Foundation gives 95383e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 95393e72ca8cSmrg# modifications, as long as this notice is preserved. 9540ee3138f1Smrg 95413e72ca8cSmrg# serial 5 lt~obsolete.m4 9542ee3138f1Smrg 95433e72ca8cSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 95443e72ca8cSmrg# 95453e72ca8cSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 95463e72ca8cSmrg# which have later been changed to m4_define as they aren't part of the 95473e72ca8cSmrg# exported API, or moved to Autoconf or Automake where they belong. 95483e72ca8cSmrg# 95493e72ca8cSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 95503e72ca8cSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 95513e72ca8cSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 95523e72ca8cSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 95533e72ca8cSmrg# and doesn't know about Autoconf macros at all.) 95543e72ca8cSmrg# 95553e72ca8cSmrg# So we provide this file, which has a silly filename so it's always 95563e72ca8cSmrg# included after everything else. This provides aclocal with the 95573e72ca8cSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 95583e72ca8cSmrg# because those macros already exist, or will be overwritten later. 95593e72ca8cSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 95603e72ca8cSmrg# 95613e72ca8cSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 95623e72ca8cSmrg# Yes, that means every name once taken will need to remain here until 95633e72ca8cSmrg# we give up compatibility with versions before 1.7, at which point 95643e72ca8cSmrg# we need to keep only those names which we still refer to. 9565ee3138f1Smrg 95663e72ca8cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 95673e72ca8cSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 956834977a2fSmrg 95693e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 95703e72ca8cSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 95713e72ca8cSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 95723e72ca8cSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 95733e72ca8cSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 95743e72ca8cSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 95753e72ca8cSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 95763e72ca8cSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 95773e72ca8cSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 95783e72ca8cSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 95793e72ca8cSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 95803e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 95813e72ca8cSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 95823e72ca8cSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 95833e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 95843e72ca8cSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 95853e72ca8cSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 95863e72ca8cSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 95873e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 95883e72ca8cSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 95893e72ca8cSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 95903e72ca8cSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 95913e72ca8cSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 95923e72ca8cSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 95933e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 95943e72ca8cSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 95953e72ca8cSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 95963e72ca8cSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 95973e72ca8cSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 95983e72ca8cSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 95993e72ca8cSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 96003e72ca8cSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 96013e72ca8cSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 96023e72ca8cSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 96033e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 96043e72ca8cSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 96053e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 96063e72ca8cSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 96073e72ca8cSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 96083e72ca8cSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 96093e72ca8cSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 96103e72ca8cSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 96113e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 96123e72ca8cSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 96133e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 96143e72ca8cSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 96153e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 96163e72ca8cSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 96173e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 96183e72ca8cSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 96193e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 96203e72ca8cSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 96213e72ca8cSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 96223e72ca8cSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 96233e72ca8cSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 96243e72ca8cSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 96253e72ca8cSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 96263e72ca8cSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 96273e72ca8cSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 96283e72ca8cSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 96293e72ca8cSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9630a1ed278cSmrg 96313e72ca8cSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 96323e72ca8cSmrg# serial 1 (pkg-config-0.24) 96333e72ca8cSmrg# 96343e72ca8cSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9635a1ed278cSmrg# 96363e72ca8cSmrg# This program is free software; you can redistribute it and/or modify 96373e72ca8cSmrg# it under the terms of the GNU General Public License as published by 96383e72ca8cSmrg# the Free Software Foundation; either version 2 of the License, or 96393e72ca8cSmrg# (at your option) any later version. 96403e72ca8cSmrg# 96413e72ca8cSmrg# This program is distributed in the hope that it will be useful, but 96423e72ca8cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 96433e72ca8cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 96443e72ca8cSmrg# General Public License for more details. 96453e72ca8cSmrg# 96463e72ca8cSmrg# You should have received a copy of the GNU General Public License 96473e72ca8cSmrg# along with this program; if not, write to the Free Software 96483e72ca8cSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 96493e72ca8cSmrg# 96503e72ca8cSmrg# As a special exception to the GNU General Public License, if you 96513e72ca8cSmrg# distribute this file as part of a program that contains a 96523e72ca8cSmrg# configuration script generated by Autoconf, you may include it under 96533e72ca8cSmrg# the same distribution terms that you use for the rest of that program. 9654a1ed278cSmrg 96553e72ca8cSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 96563e72ca8cSmrg# ---------------------------------- 96573e72ca8cSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 96583e72ca8cSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 96593e72ca8cSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 96603e72ca8cSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 96613e72ca8cSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 96623e72ca8cSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9663b425557eSmrg 96643e72ca8cSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 96653e72ca8cSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 96663e72ca8cSmrgfi 96673e72ca8cSmrgif test -n "$PKG_CONFIG"; then 96683e72ca8cSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 96693e72ca8cSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 96703e72ca8cSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 96713e72ca8cSmrg AC_MSG_RESULT([yes]) 96723e72ca8cSmrg else 96733e72ca8cSmrg AC_MSG_RESULT([no]) 96743e72ca8cSmrg PKG_CONFIG="" 96753e72ca8cSmrg fi 96763e72ca8cSmrgfi[]dnl 96773e72ca8cSmrg])# PKG_PROG_PKG_CONFIG 96783e72ca8cSmrg 96793e72ca8cSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9680a1ed278cSmrg# 96813e72ca8cSmrg# Check to see whether a particular set of modules exists. Similar 96823e72ca8cSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9683a1ed278cSmrg# 96843e72ca8cSmrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 96853e72ca8cSmrg# only at the first occurence in configure.ac, so if the first place 96863e72ca8cSmrg# it's called might be skipped (such as if it is within an "if", you 96873e72ca8cSmrg# have to call PKG_CHECK_EXISTS manually 96883e72ca8cSmrg# -------------------------------------------------------------- 96893e72ca8cSmrgAC_DEFUN([PKG_CHECK_EXISTS], 96903e72ca8cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 96913e72ca8cSmrgif test -n "$PKG_CONFIG" && \ 96923e72ca8cSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 96933e72ca8cSmrg m4_default([$2], [:]) 96943e72ca8cSmrgm4_ifvaln([$3], [else 96953e72ca8cSmrg $3])dnl 96963e72ca8cSmrgfi]) 96973e72ca8cSmrg 96983e72ca8cSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 96993e72ca8cSmrg# --------------------------------------------- 97003e72ca8cSmrgm4_define([_PKG_CONFIG], 97013e72ca8cSmrg[if test -n "$$1"; then 97023e72ca8cSmrg pkg_cv_[]$1="$$1" 97033e72ca8cSmrg elif test -n "$PKG_CONFIG"; then 97043e72ca8cSmrg PKG_CHECK_EXISTS([$3], 97053e72ca8cSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 97063e72ca8cSmrg [pkg_failed=yes]) 97073e72ca8cSmrg else 97083e72ca8cSmrg pkg_failed=untried 97093e72ca8cSmrgfi[]dnl 97103e72ca8cSmrg])# _PKG_CONFIG 97113e72ca8cSmrg 97123e72ca8cSmrg# _PKG_SHORT_ERRORS_SUPPORTED 97133e72ca8cSmrg# ----------------------------- 97143e72ca8cSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 97153e72ca8cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 97163e72ca8cSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 97173e72ca8cSmrg _pkg_short_errors_supported=yes 97183e72ca8cSmrgelse 97193e72ca8cSmrg _pkg_short_errors_supported=no 97203e72ca8cSmrgfi[]dnl 97213e72ca8cSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 9722b425557eSmrg 9723b425557eSmrg 97243e72ca8cSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 97253e72ca8cSmrg# [ACTION-IF-NOT-FOUND]) 97263e72ca8cSmrg# 97273e72ca8cSmrg# 97283e72ca8cSmrg# Note that if there is a possibility the first call to 97293e72ca8cSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 97303e72ca8cSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 97313e72ca8cSmrg# 97323e72ca8cSmrg# 97333e72ca8cSmrg# -------------------------------------------------------------- 97343e72ca8cSmrgAC_DEFUN([PKG_CHECK_MODULES], 97353e72ca8cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 97363e72ca8cSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 97373e72ca8cSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9738b425557eSmrg 97393e72ca8cSmrgpkg_failed=no 97403e72ca8cSmrgAC_MSG_CHECKING([for $1]) 97413e72ca8cSmrg 97423e72ca8cSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 97433e72ca8cSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 97443e72ca8cSmrg 97453e72ca8cSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 97463e72ca8cSmrgand $1[]_LIBS to avoid the need to call pkg-config. 97473e72ca8cSmrgSee the pkg-config man page for more details.]) 97483e72ca8cSmrg 97493e72ca8cSmrgif test $pkg_failed = yes; then 97503e72ca8cSmrg AC_MSG_RESULT([no]) 97513e72ca8cSmrg _PKG_SHORT_ERRORS_SUPPORTED 97523e72ca8cSmrg if test $_pkg_short_errors_supported = yes; then 97533e72ca8cSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 97543e72ca8cSmrg else 97553e72ca8cSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 97563e72ca8cSmrg fi 97573e72ca8cSmrg # Put the nasty error message in config.log where it belongs 97583e72ca8cSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 97593e72ca8cSmrg 97603e72ca8cSmrg m4_default([$4], [AC_MSG_ERROR( 97613e72ca8cSmrg[Package requirements ($2) were not met: 97623e72ca8cSmrg 97633e72ca8cSmrg$$1_PKG_ERRORS 97643e72ca8cSmrg 97653e72ca8cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 97663e72ca8cSmrginstalled software in a non-standard prefix. 97673e72ca8cSmrg 97683e72ca8cSmrg_PKG_TEXT]) 97693e72ca8cSmrg ]) 97703e72ca8cSmrgelif test $pkg_failed = untried; then 97713e72ca8cSmrg AC_MSG_RESULT([no]) 97723e72ca8cSmrg m4_default([$4], [AC_MSG_FAILURE( 97733e72ca8cSmrg[The pkg-config script could not be found or is too old. Make sure it 97743e72ca8cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 97753e72ca8cSmrgpath to pkg-config. 97763e72ca8cSmrg 97773e72ca8cSmrg_PKG_TEXT 97783e72ca8cSmrg 97793e72ca8cSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 97803e72ca8cSmrg ]) 97813e72ca8cSmrgelse 97823e72ca8cSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 97833e72ca8cSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 97843e72ca8cSmrg AC_MSG_RESULT([yes]) 97853e72ca8cSmrg $3 97863e72ca8cSmrgfi[]dnl 97873e72ca8cSmrg])# PKG_CHECK_MODULES 9788b425557eSmrg 9789a1ed278cSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9790a1ed278cSmrgdnl 9791a1ed278cSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9792a1ed278cSmrgdnl 9793a1ed278cSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9794a1ed278cSmrgdnl copy of this software and associated documentation files (the "Software"), 9795a1ed278cSmrgdnl to deal in the Software without restriction, including without limitation 9796a1ed278cSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9797a1ed278cSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 9798a1ed278cSmrgdnl Software is furnished to do so, subject to the following conditions: 9799a1ed278cSmrgdnl 9800a1ed278cSmrgdnl The above copyright notice and this permission notice (including the next 9801a1ed278cSmrgdnl paragraph) shall be included in all copies or substantial portions of the 9802a1ed278cSmrgdnl Software. 9803a1ed278cSmrgdnl 9804a1ed278cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9805a1ed278cSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9806a1ed278cSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9807a1ed278cSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9808a1ed278cSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9809a1ed278cSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9810a1ed278cSmrgdnl DEALINGS IN THE SOFTWARE. 981134977a2fSmrg 9812a1ed278cSmrg# XORG_MACROS_VERSION(required-version) 9813a1ed278cSmrg# ------------------------------------- 9814a1ed278cSmrg# Minimum version: 1.1.0 9815a1ed278cSmrg# 9816a1ed278cSmrg# If you're using a macro added in Version 1.1 or newer, include this in 9817a1ed278cSmrg# your configure.ac with the minimum required version, such as: 9818a1ed278cSmrg# XORG_MACROS_VERSION(1.1) 9819a1ed278cSmrg# 9820a1ed278cSmrg# To ensure that this macro is defined, also add: 9821a1ed278cSmrg# m4_ifndef([XORG_MACROS_VERSION], 9822a1ed278cSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9823a1ed278cSmrg# 9824a1ed278cSmrg# 9825a1ed278cSmrg# See the "minimum version" comment for each macro you use to see what 9826a1ed278cSmrg# version you require. 9827a1ed278cSmrgm4_defun([XORG_MACROS_VERSION],[ 98283e72ca8cSmrgm4_define([vers_have], [1.17]) 9829a1ed278cSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9830a1ed278cSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9831a1ed278cSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9832a1ed278cSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9833a1ed278cSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9834a1ed278cSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9835a1ed278cSmrgm4_undefine([vers_have]) 9836a1ed278cSmrgm4_undefine([maj_have]) 9837a1ed278cSmrgm4_undefine([maj_needed]) 9838a1ed278cSmrg]) # XORG_MACROS_VERSION 983934977a2fSmrg 9840a1ed278cSmrg# XORG_PROG_RAWCPP() 9841a1ed278cSmrg# ------------------ 9842a1ed278cSmrg# Minimum version: 1.0.0 9843a1ed278cSmrg# 9844a1ed278cSmrg# Find cpp program and necessary flags for use in pre-processing text files 9845a1ed278cSmrg# such as man pages and config files 9846a1ed278cSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9847a1ed278cSmrgAC_REQUIRE([AC_PROG_CPP]) 9848a1ed278cSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9849a1ed278cSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9850ee3138f1Smrg 9851a1ed278cSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9852a1ed278cSmrg# which is not the best choice for supporting other OS'es, but covers most 9853a1ed278cSmrg# of the ones we need for now. 9854a1ed278cSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 98553e72ca8cSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9856a1ed278cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9857a1ed278cSmrg AC_MSG_RESULT([no]) 9858a1ed278cSmrgelse 9859a1ed278cSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9860a1ed278cSmrg RAWCPPFLAGS=-undef 9861a1ed278cSmrg AC_MSG_RESULT([yes]) 9862a1ed278cSmrg # under Cygwin unix is still defined even with -undef 9863a1ed278cSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9864a1ed278cSmrg RAWCPPFLAGS="-undef -ansi" 9865a1ed278cSmrg AC_MSG_RESULT([yes, with -ansi]) 9866a1ed278cSmrg else 9867a1ed278cSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9868a1ed278cSmrg fi 9869a1ed278cSmrgfi 9870a1ed278cSmrgrm -f conftest.$ac_ext 9871ee3138f1Smrg 9872a1ed278cSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 98733e72ca8cSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9874a1ed278cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9875a1ed278cSmrg AC_MSG_RESULT([no]) 9876a1ed278cSmrgelse 9877a1ed278cSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9878a1ed278cSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9879a1ed278cSmrg AC_MSG_RESULT([yes]) 9880a1ed278cSmrg else 9881a1ed278cSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9882a1ed278cSmrg fi 9883a1ed278cSmrgfi 9884a1ed278cSmrgrm -f conftest.$ac_ext 9885a1ed278cSmrgAC_SUBST(RAWCPPFLAGS) 9886a1ed278cSmrg]) # XORG_PROG_RAWCPP 9887ee3138f1Smrg 9888a1ed278cSmrg# XORG_MANPAGE_SECTIONS() 9889a1ed278cSmrg# ----------------------- 9890a1ed278cSmrg# Minimum version: 1.0.0 9891a1ed278cSmrg# 9892a1ed278cSmrg# Determine which sections man pages go in for the different man page types 9893a1ed278cSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9894a1ed278cSmrg# Not sure if there's any better way than just hardcoding by OS name. 9895a1ed278cSmrg# Override default settings by setting environment variables 9896a1ed278cSmrg# Added MAN_SUBSTS in version 1.8 9897a1ed278cSmrg# Added AC_PROG_SED in version 1.8 9898b425557eSmrg 9899a1ed278cSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9900a1ed278cSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9901a1ed278cSmrgAC_REQUIRE([AC_PROG_SED]) 9902b425557eSmrg 9903a1ed278cSmrgif test x$APP_MAN_SUFFIX = x ; then 9904a1ed278cSmrg APP_MAN_SUFFIX=1 9905a1ed278cSmrgfi 9906a1ed278cSmrgif test x$APP_MAN_DIR = x ; then 9907a1ed278cSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9908a1ed278cSmrgfi 9909ee3138f1Smrg 9910a1ed278cSmrgif test x$LIB_MAN_SUFFIX = x ; then 9911a1ed278cSmrg LIB_MAN_SUFFIX=3 9912a1ed278cSmrgfi 9913a1ed278cSmrgif test x$LIB_MAN_DIR = x ; then 9914a1ed278cSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9915a1ed278cSmrgfi 9916ee3138f1Smrg 9917a1ed278cSmrgif test x$FILE_MAN_SUFFIX = x ; then 9918a1ed278cSmrg case $host_os in 9919a1ed278cSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 9920a1ed278cSmrg *) FILE_MAN_SUFFIX=5 ;; 9921a1ed278cSmrg esac 9922a1ed278cSmrgfi 9923a1ed278cSmrgif test x$FILE_MAN_DIR = x ; then 9924a1ed278cSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9925a1ed278cSmrgfi 9926ee3138f1Smrg 9927a1ed278cSmrgif test x$MISC_MAN_SUFFIX = x ; then 9928a1ed278cSmrg case $host_os in 9929a1ed278cSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 9930a1ed278cSmrg *) MISC_MAN_SUFFIX=7 ;; 9931a1ed278cSmrg esac 9932a1ed278cSmrgfi 9933a1ed278cSmrgif test x$MISC_MAN_DIR = x ; then 9934a1ed278cSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9935a1ed278cSmrgfi 9936ee3138f1Smrg 9937a1ed278cSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 9938a1ed278cSmrg case $host_os in 9939a1ed278cSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9940a1ed278cSmrg *) DRIVER_MAN_SUFFIX=4 ;; 9941a1ed278cSmrg esac 9942a1ed278cSmrgfi 9943a1ed278cSmrgif test x$DRIVER_MAN_DIR = x ; then 9944a1ed278cSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9945a1ed278cSmrgfi 9946ee3138f1Smrg 9947a1ed278cSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 9948a1ed278cSmrg case $host_os in 9949a1ed278cSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9950a1ed278cSmrg *) ADMIN_MAN_SUFFIX=8 ;; 9951a1ed278cSmrg esac 9952a1ed278cSmrgfi 9953a1ed278cSmrgif test x$ADMIN_MAN_DIR = x ; then 9954a1ed278cSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9955a1ed278cSmrgfi 9956ee3138f1Smrg 9957ee3138f1Smrg 9958a1ed278cSmrgAC_SUBST([APP_MAN_SUFFIX]) 9959a1ed278cSmrgAC_SUBST([LIB_MAN_SUFFIX]) 9960a1ed278cSmrgAC_SUBST([FILE_MAN_SUFFIX]) 9961a1ed278cSmrgAC_SUBST([MISC_MAN_SUFFIX]) 9962a1ed278cSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9963a1ed278cSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9964a1ed278cSmrgAC_SUBST([APP_MAN_DIR]) 9965a1ed278cSmrgAC_SUBST([LIB_MAN_DIR]) 9966a1ed278cSmrgAC_SUBST([FILE_MAN_DIR]) 9967a1ed278cSmrgAC_SUBST([MISC_MAN_DIR]) 9968a1ed278cSmrgAC_SUBST([DRIVER_MAN_DIR]) 9969a1ed278cSmrgAC_SUBST([ADMIN_MAN_DIR]) 9970ee3138f1Smrg 9971a1ed278cSmrgXORG_MAN_PAGE="X Version 11" 9972a1ed278cSmrgAC_SUBST([XORG_MAN_PAGE]) 9973a1ed278cSmrgMAN_SUBSTS="\ 9974a1ed278cSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9975a1ed278cSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9976a1ed278cSmrg -e 's|__xservername__|Xorg|g' \ 9977a1ed278cSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 99783e72ca8cSmrg -e 's|__xorgconfdir__|xorg.conf.d|g' \ 9979a1ed278cSmrg -e 's|__projectroot__|\$(prefix)|g' \ 9980a1ed278cSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9981a1ed278cSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9982a1ed278cSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9983a1ed278cSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9984a1ed278cSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9985a1ed278cSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9986a1ed278cSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9987a1ed278cSmrgAC_SUBST([MAN_SUBSTS]) 9988ee3138f1Smrg 9989a1ed278cSmrg]) # XORG_MANPAGE_SECTIONS 9990ee3138f1Smrg 9991a1ed278cSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9992a1ed278cSmrg# ------------------------ 9993a1ed278cSmrg# Minimum version: 1.7.0 9994a1ed278cSmrg# 9995a1ed278cSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9996a1ed278cSmrg# provided by xorg-sgml-doctools, if installed. 9997a1ed278cSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9998a1ed278cSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9999a1ed278cSmrgXORG_SGML_PATH= 10000a1ed278cSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 10001a1ed278cSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 10002a1ed278cSmrg [m4_ifval([$1],[:], 10003a1ed278cSmrg [if test x"$cross_compiling" != x"yes" ; then 10004a1ed278cSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10005a1ed278cSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 10006a1ed278cSmrg fi]) 10007a1ed278cSmrg ]) 1000834977a2fSmrg 10009a1ed278cSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10010a1ed278cSmrg# the path and the name of the doc stylesheet 10011a1ed278cSmrgif test "x$XORG_SGML_PATH" != "x" ; then 10012a1ed278cSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 10013a1ed278cSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10014a1ed278cSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10015a1ed278cSmrgelse 10016a1ed278cSmrg AC_MSG_RESULT([no]) 10017a1ed278cSmrgfi 1001834977a2fSmrg 10019a1ed278cSmrgAC_SUBST(XORG_SGML_PATH) 10020a1ed278cSmrgAC_SUBST(STYLESHEET_SRCDIR) 10021a1ed278cSmrgAC_SUBST(XSL_STYLESHEET) 10022a1ed278cSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10023a1ed278cSmrg]) # XORG_CHECK_SGML_DOCTOOLS 10024ee3138f1Smrg 10025a1ed278cSmrg# XORG_CHECK_LINUXDOC 10026a1ed278cSmrg# ------------------- 10027a1ed278cSmrg# Minimum version: 1.0.0 10028a1ed278cSmrg# 10029a1ed278cSmrg# Defines the variable MAKE_TEXT if the necessary tools and 10030a1ed278cSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10031a1ed278cSmrg# Whether or not the necessary tools and files are found can be checked 10032a1ed278cSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10033a1ed278cSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 10034a1ed278cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10035a1ed278cSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10036b425557eSmrg 10037a1ed278cSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10038b425557eSmrg 10039a1ed278cSmrgAC_MSG_CHECKING([whether to build documentation]) 10040b425557eSmrg 10041a1ed278cSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10042a1ed278cSmrg BUILDDOC=yes 10043a1ed278cSmrgelse 10044a1ed278cSmrg BUILDDOC=no 10045a1ed278cSmrgfi 10046ee3138f1Smrg 10047a1ed278cSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10048ee3138f1Smrg 10049a1ed278cSmrgAC_MSG_RESULT([$BUILDDOC]) 10050ee3138f1Smrg 10051a1ed278cSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10052ee3138f1Smrg 10053a1ed278cSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10054a1ed278cSmrg BUILDPDFDOC=yes 10055a1ed278cSmrgelse 10056a1ed278cSmrg BUILDPDFDOC=no 10057a1ed278cSmrgfi 10058ee3138f1Smrg 10059a1ed278cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10060ee3138f1Smrg 10061a1ed278cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10062ee3138f1Smrg 10063a1ed278cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10064a1ed278cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10065a1ed278cSmrgMAKE_PDF="$PS2PDF" 10066a1ed278cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10067ee3138f1Smrg 10068a1ed278cSmrgAC_SUBST(MAKE_TEXT) 10069a1ed278cSmrgAC_SUBST(MAKE_PS) 10070a1ed278cSmrgAC_SUBST(MAKE_PDF) 10071a1ed278cSmrgAC_SUBST(MAKE_HTML) 10072a1ed278cSmrg]) # XORG_CHECK_LINUXDOC 10073ee3138f1Smrg 10074a1ed278cSmrg# XORG_CHECK_DOCBOOK 10075a1ed278cSmrg# ------------------- 10076a1ed278cSmrg# Minimum version: 1.0.0 10077a1ed278cSmrg# 10078a1ed278cSmrg# Checks for the ability to build output formats from SGML DocBook source. 10079a1ed278cSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10080a1ed278cSmrg# indicates whether the necessary tools and files are found and, if set, 10081a1ed278cSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10082a1ed278cSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 10083a1ed278cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10084ee3138f1Smrg 10085a1ed278cSmrgBUILDTXTDOC=no 10086a1ed278cSmrgBUILDPDFDOC=no 10087a1ed278cSmrgBUILDPSDOC=no 10088a1ed278cSmrgBUILDHTMLDOC=no 10089ee3138f1Smrg 10090a1ed278cSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 10091a1ed278cSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10092a1ed278cSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 10093a1ed278cSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10094ee3138f1Smrg 10095a1ed278cSmrgAC_MSG_CHECKING([whether to build text documentation]) 10096a1ed278cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10097a1ed278cSmrg test x$BUILD_TXTDOC != xno; then 10098a1ed278cSmrg BUILDTXTDOC=yes 10099a1ed278cSmrgfi 10100a1ed278cSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10101a1ed278cSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10102ee3138f1Smrg 10103a1ed278cSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 10104a1ed278cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10105a1ed278cSmrg test x$BUILD_PDFDOC != xno; then 10106a1ed278cSmrg BUILDPDFDOC=yes 10107a1ed278cSmrgfi 10108a1ed278cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10109a1ed278cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10110ee3138f1Smrg 10111a1ed278cSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 10112a1ed278cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10113a1ed278cSmrg test x$BUILD_PSDOC != xno; then 10114a1ed278cSmrg BUILDPSDOC=yes 10115a1ed278cSmrgfi 10116a1ed278cSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10117a1ed278cSmrgAC_MSG_RESULT([$BUILDPSDOC]) 10118ee3138f1Smrg 10119a1ed278cSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 10120a1ed278cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10121a1ed278cSmrg test x$BUILD_HTMLDOC != xno; then 10122a1ed278cSmrg BUILDHTMLDOC=yes 10123a1ed278cSmrgfi 10124a1ed278cSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10125a1ed278cSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10126ee3138f1Smrg 10127a1ed278cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10128a1ed278cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10129a1ed278cSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10130a1ed278cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10131ee3138f1Smrg 10132a1ed278cSmrgAC_SUBST(MAKE_TEXT) 10133a1ed278cSmrgAC_SUBST(MAKE_PS) 10134a1ed278cSmrgAC_SUBST(MAKE_PDF) 10135a1ed278cSmrgAC_SUBST(MAKE_HTML) 10136a1ed278cSmrg]) # XORG_CHECK_DOCBOOK 10137ee3138f1Smrg 101383e72ca8cSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10139a1ed278cSmrg# ---------------- 10140a1ed278cSmrg# Minimum version: 1.5.0 101413e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10142a1ed278cSmrg# 10143a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10144a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10145a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10146a1ed278cSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 101473e72ca8cSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 101483e72ca8cSmrg# --with-xmlto assumes 'auto'. 10149a1ed278cSmrg# 10150a1ed278cSmrg# Interface to module: 10151a1ed278cSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10152a1ed278cSmrg# XMLTO: returns the path of the xmlto program found 10153a1ed278cSmrg# returns the path set by the user in the environment 10154a1ed278cSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 10155a1ed278cSmrg# 'no' user instructs the module not to use xmlto 10156a1ed278cSmrg# 10157a1ed278cSmrg# Added in version 1.10.0 10158a1ed278cSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10159a1ed278cSmrg# xmlto for text output requires either lynx, links, or w3m browsers 10160a1ed278cSmrg# 10161a1ed278cSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10162a1ed278cSmrg# 10163a1ed278cSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 10164a1ed278cSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 101653e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 10166a1ed278cSmrgAC_ARG_WITH(xmlto, 10167a1ed278cSmrg AS_HELP_STRING([--with-xmlto], 101683e72ca8cSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 101693e72ca8cSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 101703e72ca8cSmrgm4_undefine([_defopt]) 10171ee3138f1Smrg 10172a1ed278cSmrgif test "x$use_xmlto" = x"auto"; then 10173a1ed278cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 10174a1ed278cSmrg if test "x$XMLTO" = "x"; then 10175a1ed278cSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10176a1ed278cSmrg have_xmlto=no 10177a1ed278cSmrg else 10178a1ed278cSmrg have_xmlto=yes 10179a1ed278cSmrg fi 10180a1ed278cSmrgelif test "x$use_xmlto" = x"yes" ; then 10181a1ed278cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 10182a1ed278cSmrg if test "x$XMLTO" = "x"; then 10183a1ed278cSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10184a1ed278cSmrg fi 10185a1ed278cSmrg have_xmlto=yes 10186a1ed278cSmrgelif test "x$use_xmlto" = x"no" ; then 10187a1ed278cSmrg if test "x$XMLTO" != "x"; then 10188a1ed278cSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10189a1ed278cSmrg fi 10190a1ed278cSmrg have_xmlto=no 10191a1ed278cSmrgelse 10192a1ed278cSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10193a1ed278cSmrgfi 10194ee3138f1Smrg 10195a1ed278cSmrg# Test for a minimum version of xmlto, if provided. 10196a1ed278cSmrgm4_ifval([$1], 10197a1ed278cSmrg[if test "$have_xmlto" = yes; then 10198a1ed278cSmrg # scrape the xmlto version 10199a1ed278cSmrg AC_MSG_CHECKING([the xmlto version]) 10200a1ed278cSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10201a1ed278cSmrg AC_MSG_RESULT([$xmlto_version]) 10202a1ed278cSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 10203a1ed278cSmrg [if test "x$use_xmlto" = xauto; then 10204a1ed278cSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10205a1ed278cSmrg have_xmlto=no 10206a1ed278cSmrg else 10207a1ed278cSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10208a1ed278cSmrg fi]) 10209a1ed278cSmrgfi]) 10210ee3138f1Smrg 10211a1ed278cSmrg# Test for the ability of xmlto to generate a text target 10212a1ed278cSmrghave_xmlto_text=no 10213a1ed278cSmrgcat > conftest.xml << "EOF" 10214a1ed278cSmrgEOF 10215a1ed278cSmrgAS_IF([test "$have_xmlto" = yes], 10216a1ed278cSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10217a1ed278cSmrg [have_xmlto_text=yes], 10218a1ed278cSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10219a1ed278cSmrgrm -f conftest.xml 10220a1ed278cSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10221a1ed278cSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10222a1ed278cSmrg]) # XORG_WITH_XMLTO 10223ee3138f1Smrg 102243e72ca8cSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 102253e72ca8cSmrg# -------------------------------------------- 102263e72ca8cSmrg# Minimum version: 1.12.0 102273e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.12.0 102283e72ca8cSmrg# 102293e72ca8cSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 102303e72ca8cSmrg# XML-based language used for the transformation of XML documents. 102313e72ca8cSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 102323e72ca8cSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 102333e72ca8cSmrg# The XSLT processor is often used as a standalone tool for transformations. 102343e72ca8cSmrg# It should not be assumed that this tool is used only to work with documnetation. 102353e72ca8cSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 102363e72ca8cSmrg# 102373e72ca8cSmrg# Interface to module: 102383e72ca8cSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 102393e72ca8cSmrg# XSLTPROC: returns the path of the xsltproc program found 102403e72ca8cSmrg# returns the path set by the user in the environment 102413e72ca8cSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 102423e72ca8cSmrg# 'no' user instructs the module not to use xsltproc 102433e72ca8cSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 102443e72ca8cSmrg# 102453e72ca8cSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 102463e72ca8cSmrg# 102473e72ca8cSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 102483e72ca8cSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 102493e72ca8cSmrg# Preserves the interface, should it be implemented later 102503e72ca8cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 102513e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 102523e72ca8cSmrgAC_ARG_WITH(xsltproc, 102533e72ca8cSmrg AS_HELP_STRING([--with-xsltproc], 102543e72ca8cSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 102553e72ca8cSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 102563e72ca8cSmrgm4_undefine([_defopt]) 102573e72ca8cSmrg 102583e72ca8cSmrgif test "x$use_xsltproc" = x"auto"; then 102593e72ca8cSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 102603e72ca8cSmrg if test "x$XSLTPROC" = "x"; then 102613e72ca8cSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 102623e72ca8cSmrg have_xsltproc=no 102633e72ca8cSmrg else 102643e72ca8cSmrg have_xsltproc=yes 102653e72ca8cSmrg fi 102663e72ca8cSmrgelif test "x$use_xsltproc" = x"yes" ; then 102673e72ca8cSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 102683e72ca8cSmrg if test "x$XSLTPROC" = "x"; then 102693e72ca8cSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 102703e72ca8cSmrg fi 102713e72ca8cSmrg have_xsltproc=yes 102723e72ca8cSmrgelif test "x$use_xsltproc" = x"no" ; then 102733e72ca8cSmrg if test "x$XSLTPROC" != "x"; then 102743e72ca8cSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 102753e72ca8cSmrg fi 102763e72ca8cSmrg have_xsltproc=no 102773e72ca8cSmrgelse 102783e72ca8cSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 102793e72ca8cSmrgfi 102803e72ca8cSmrg 102813e72ca8cSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 102823e72ca8cSmrg]) # XORG_WITH_XSLTPROC 102833e72ca8cSmrg 102843e72ca8cSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 102853e72ca8cSmrg# ---------------------------------------- 102863e72ca8cSmrg# Minimum version: 1.15.0 102873e72ca8cSmrg# 102883e72ca8cSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 102893e72ca8cSmrg# scanning arbitrary text files, extracting information from those text files, 102903e72ca8cSmrg# and printing reports based on that information. 102913e72ca8cSmrg# 102923e72ca8cSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 102933e72ca8cSmrg# 102943e72ca8cSmrg# Interface to module: 102953e72ca8cSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 102963e72ca8cSmrg# PERL: returns the path of the perl program found 102973e72ca8cSmrg# returns the path set by the user in the environment 102983e72ca8cSmrg# --with-perl: 'yes' user instructs the module to use perl 102993e72ca8cSmrg# 'no' user instructs the module not to use perl 103003e72ca8cSmrg# have_perl: returns yes if perl found in PATH or no 103013e72ca8cSmrg# 103023e72ca8cSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 103033e72ca8cSmrg# 103043e72ca8cSmrgAC_DEFUN([XORG_WITH_PERL],[ 103053e72ca8cSmrgAC_ARG_VAR([PERL], [Path to perl command]) 103063e72ca8cSmrg# Preserves the interface, should it be implemented later 103073e72ca8cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 103083e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 103093e72ca8cSmrgAC_ARG_WITH(perl, 103103e72ca8cSmrg AS_HELP_STRING([--with-perl], 103113e72ca8cSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 103123e72ca8cSmrg [use_perl=$withval], [use_perl=]_defopt) 103133e72ca8cSmrgm4_undefine([_defopt]) 103143e72ca8cSmrg 103153e72ca8cSmrgif test "x$use_perl" = x"auto"; then 103163e72ca8cSmrg AC_PATH_PROG([PERL], [perl]) 103173e72ca8cSmrg if test "x$PERL" = "x"; then 103183e72ca8cSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 103193e72ca8cSmrg have_perl=no 103203e72ca8cSmrg else 103213e72ca8cSmrg have_perl=yes 103223e72ca8cSmrg fi 103233e72ca8cSmrgelif test "x$use_perl" = x"yes" ; then 103243e72ca8cSmrg AC_PATH_PROG([PERL], [perl]) 103253e72ca8cSmrg if test "x$PERL" = "x"; then 103263e72ca8cSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 103273e72ca8cSmrg fi 103283e72ca8cSmrg have_perl=yes 103293e72ca8cSmrgelif test "x$use_perl" = x"no" ; then 103303e72ca8cSmrg if test "x$PERL" != "x"; then 103313e72ca8cSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 103323e72ca8cSmrg fi 103333e72ca8cSmrg have_perl=no 103343e72ca8cSmrgelse 103353e72ca8cSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 103363e72ca8cSmrgfi 103373e72ca8cSmrg 103383e72ca8cSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 103393e72ca8cSmrg]) # XORG_WITH_PERL 103403e72ca8cSmrg 103413e72ca8cSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10342a1ed278cSmrg# ---------------- 10343a1ed278cSmrg# Minimum version: 1.5.0 103443e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10345a1ed278cSmrg# 10346a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10347a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10348a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10349a1ed278cSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 103503e72ca8cSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 103513e72ca8cSmrg# --with-asciidoc assumes 'auto'. 10352a1ed278cSmrg# 10353a1ed278cSmrg# Interface to module: 10354a1ed278cSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10355a1ed278cSmrg# ASCIIDOC: returns the path of the asciidoc program found 10356a1ed278cSmrg# returns the path set by the user in the environment 10357a1ed278cSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10358a1ed278cSmrg# 'no' user instructs the module not to use asciidoc 10359a1ed278cSmrg# 10360a1ed278cSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10361a1ed278cSmrg# 10362a1ed278cSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 10363a1ed278cSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 103643e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 10365a1ed278cSmrgAC_ARG_WITH(asciidoc, 10366a1ed278cSmrg AS_HELP_STRING([--with-asciidoc], 103673e72ca8cSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 103683e72ca8cSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 103693e72ca8cSmrgm4_undefine([_defopt]) 10370ee3138f1Smrg 10371a1ed278cSmrgif test "x$use_asciidoc" = x"auto"; then 10372a1ed278cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10373a1ed278cSmrg if test "x$ASCIIDOC" = "x"; then 10374a1ed278cSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10375a1ed278cSmrg have_asciidoc=no 10376a1ed278cSmrg else 10377a1ed278cSmrg have_asciidoc=yes 10378a1ed278cSmrg fi 10379a1ed278cSmrgelif test "x$use_asciidoc" = x"yes" ; then 10380a1ed278cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10381a1ed278cSmrg if test "x$ASCIIDOC" = "x"; then 10382a1ed278cSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10383a1ed278cSmrg fi 10384a1ed278cSmrg have_asciidoc=yes 10385a1ed278cSmrgelif test "x$use_asciidoc" = x"no" ; then 10386a1ed278cSmrg if test "x$ASCIIDOC" != "x"; then 10387a1ed278cSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10388a1ed278cSmrg fi 10389a1ed278cSmrg have_asciidoc=no 10390a1ed278cSmrgelse 10391a1ed278cSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10392a1ed278cSmrgfi 10393a1ed278cSmrgm4_ifval([$1], 10394a1ed278cSmrg[if test "$have_asciidoc" = yes; then 10395a1ed278cSmrg # scrape the asciidoc version 10396a1ed278cSmrg AC_MSG_CHECKING([the asciidoc version]) 10397a1ed278cSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10398a1ed278cSmrg AC_MSG_RESULT([$asciidoc_version]) 10399a1ed278cSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 10400a1ed278cSmrg [if test "x$use_asciidoc" = xauto; then 10401a1ed278cSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10402a1ed278cSmrg have_asciidoc=no 10403a1ed278cSmrg else 10404a1ed278cSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10405a1ed278cSmrg fi]) 10406a1ed278cSmrgfi]) 10407a1ed278cSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10408a1ed278cSmrg]) # XORG_WITH_ASCIIDOC 10409ee3138f1Smrg 104103e72ca8cSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10411a1ed278cSmrg# -------------------------------- 10412a1ed278cSmrg# Minimum version: 1.5.0 104133e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10414a1ed278cSmrg# 10415a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10416a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10417a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10418a1ed278cSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 104193e72ca8cSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 104203e72ca8cSmrg# --with-doxygen assumes 'auto'. 10421a1ed278cSmrg# 10422a1ed278cSmrg# Interface to module: 10423a1ed278cSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10424a1ed278cSmrg# DOXYGEN: returns the path of the doxygen program found 10425a1ed278cSmrg# returns the path set by the user in the environment 10426a1ed278cSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 10427a1ed278cSmrg# 'no' user instructs the module not to use doxygen 10428a1ed278cSmrg# 10429a1ed278cSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10430a1ed278cSmrg# 10431a1ed278cSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10432a1ed278cSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 104333e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 10434a1ed278cSmrgAC_ARG_WITH(doxygen, 10435a1ed278cSmrg AS_HELP_STRING([--with-doxygen], 104363e72ca8cSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 104373e72ca8cSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 104383e72ca8cSmrgm4_undefine([_defopt]) 10439a1ed278cSmrg 10440a1ed278cSmrgif test "x$use_doxygen" = x"auto"; then 10441a1ed278cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10442a1ed278cSmrg if test "x$DOXYGEN" = "x"; then 10443a1ed278cSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10444a1ed278cSmrg have_doxygen=no 10445a1ed278cSmrg else 10446a1ed278cSmrg have_doxygen=yes 10447a1ed278cSmrg fi 10448a1ed278cSmrgelif test "x$use_doxygen" = x"yes" ; then 10449a1ed278cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10450a1ed278cSmrg if test "x$DOXYGEN" = "x"; then 10451a1ed278cSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10452a1ed278cSmrg fi 10453a1ed278cSmrg have_doxygen=yes 10454a1ed278cSmrgelif test "x$use_doxygen" = x"no" ; then 10455a1ed278cSmrg if test "x$DOXYGEN" != "x"; then 10456a1ed278cSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10457a1ed278cSmrg fi 10458a1ed278cSmrg have_doxygen=no 10459a1ed278cSmrgelse 10460a1ed278cSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10461a1ed278cSmrgfi 10462a1ed278cSmrgm4_ifval([$1], 10463a1ed278cSmrg[if test "$have_doxygen" = yes; then 10464a1ed278cSmrg # scrape the doxygen version 10465a1ed278cSmrg AC_MSG_CHECKING([the doxygen version]) 10466a1ed278cSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10467a1ed278cSmrg AC_MSG_RESULT([$doxygen_version]) 10468a1ed278cSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10469a1ed278cSmrg [if test "x$use_doxygen" = xauto; then 10470a1ed278cSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10471a1ed278cSmrg have_doxygen=no 10472a1ed278cSmrg else 10473a1ed278cSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10474a1ed278cSmrg fi]) 10475a1ed278cSmrgfi]) 10476a1ed278cSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10477a1ed278cSmrg]) # XORG_WITH_DOXYGEN 10478ee3138f1Smrg 104793e72ca8cSmrg# XORG_WITH_GROFF([DEFAULT]) 10480a1ed278cSmrg# ---------------- 10481a1ed278cSmrg# Minimum version: 1.6.0 104823e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10483b425557eSmrg# 10484a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10485a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10486a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10487a1ed278cSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 104883e72ca8cSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 104893e72ca8cSmrg# --with-groff assumes 'auto'. 10490b425557eSmrg# 10491a1ed278cSmrg# Interface to module: 10492a1ed278cSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10493a1ed278cSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10494a1ed278cSmrg# HAVE_GROFF_MS: the -ms macros package 10495a1ed278cSmrg# GROFF: returns the path of the groff program found 10496a1ed278cSmrg# returns the path set by the user in the environment 10497a1ed278cSmrg# --with-groff: 'yes' user instructs the module to use groff 10498a1ed278cSmrg# 'no' user instructs the module not to use groff 10499a1ed278cSmrg# 10500a1ed278cSmrg# Added in version 1.9.0: 10501a1ed278cSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10502a1ed278cSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10503a1ed278cSmrg# psselect from the psutils package. 10504a1ed278cSmrg# the ghostcript package. Refer to the grohtml man pages 10505a1ed278cSmrg# 10506a1ed278cSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10507a1ed278cSmrg# 10508a1ed278cSmrg# OS and distros often splits groff in a basic and full package, the former 10509a1ed278cSmrg# having the groff program and the later having devices, fonts and macros 10510a1ed278cSmrg# Checking for the groff executable is not enough. 10511a1ed278cSmrg# 10512a1ed278cSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 10513a1ed278cSmrg# unset HAVE_GROFF or GROFF env variables. 10514a1ed278cSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10515a1ed278cSmrg# 10516a1ed278cSmrgAC_DEFUN([XORG_WITH_GROFF],[ 10517a1ed278cSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 105183e72ca8cSmrgm4_define([_defopt], m4_default([$1], [auto])) 10519a1ed278cSmrgAC_ARG_WITH(groff, 10520a1ed278cSmrg AS_HELP_STRING([--with-groff], 105213e72ca8cSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 105223e72ca8cSmrg [use_groff=$withval], [use_groff=]_defopt) 105233e72ca8cSmrgm4_undefine([_defopt]) 10524ee3138f1Smrg 10525a1ed278cSmrgif test "x$use_groff" = x"auto"; then 10526a1ed278cSmrg AC_PATH_PROG([GROFF], [groff]) 10527a1ed278cSmrg if test "x$GROFF" = "x"; then 10528a1ed278cSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10529a1ed278cSmrg have_groff=no 10530a1ed278cSmrg else 10531a1ed278cSmrg have_groff=yes 10532a1ed278cSmrg fi 10533a1ed278cSmrgelif test "x$use_groff" = x"yes" ; then 10534a1ed278cSmrg AC_PATH_PROG([GROFF], [groff]) 10535a1ed278cSmrg if test "x$GROFF" = "x"; then 10536a1ed278cSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10537a1ed278cSmrg fi 10538a1ed278cSmrg have_groff=yes 10539a1ed278cSmrgelif test "x$use_groff" = x"no" ; then 10540a1ed278cSmrg if test "x$GROFF" != "x"; then 10541a1ed278cSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10542a1ed278cSmrg fi 10543a1ed278cSmrg have_groff=no 10544a1ed278cSmrgelse 10545a1ed278cSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10546a1ed278cSmrgfi 10547ee3138f1Smrg 10548a1ed278cSmrg# We have groff, test for the presence of the macro packages 10549a1ed278cSmrgif test "x$have_groff" = x"yes"; then 10550a1ed278cSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10551a1ed278cSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10552a1ed278cSmrg groff_ms_works=yes 10553a1ed278cSmrg else 10554a1ed278cSmrg groff_ms_works=no 10555a1ed278cSmrg fi 10556a1ed278cSmrg AC_MSG_RESULT([$groff_ms_works]) 10557a1ed278cSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10558a1ed278cSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10559a1ed278cSmrg groff_mm_works=yes 10560a1ed278cSmrg else 10561a1ed278cSmrg groff_mm_works=no 10562a1ed278cSmrg fi 10563a1ed278cSmrg AC_MSG_RESULT([$groff_mm_works]) 10564a1ed278cSmrgfi 10565ee3138f1Smrg 10566a1ed278cSmrg# We have groff, test for HTML dependencies, one command per package 10567a1ed278cSmrgif test "x$have_groff" = x"yes"; then 10568a1ed278cSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10569a1ed278cSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10570a1ed278cSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10571a1ed278cSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10572a1ed278cSmrg have_groff_html=yes 10573a1ed278cSmrg else 10574a1ed278cSmrg have_groff_html=no 10575a1ed278cSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10576a1ed278cSmrg fi 10577a1ed278cSmrgfi 10578ee3138f1Smrg 10579a1ed278cSmrg# Set Automake conditionals for Makefiles 10580a1ed278cSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10581a1ed278cSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10582a1ed278cSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10583a1ed278cSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10584a1ed278cSmrg]) # XORG_WITH_GROFF 10585ee3138f1Smrg 105863e72ca8cSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 105873e72ca8cSmrg# --------------------------------------- 10588a1ed278cSmrg# Minimum version: 1.6.0 105893e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 105903e72ca8cSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10591a1ed278cSmrg# 10592a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10593a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10594a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10595a1ed278cSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 105963e72ca8cSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 105973e72ca8cSmrg# --with-fop assumes 'auto'. 10598a1ed278cSmrg# 10599a1ed278cSmrg# Interface to module: 10600a1ed278cSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10601a1ed278cSmrg# FOP: returns the path of the fop program found 10602a1ed278cSmrg# returns the path set by the user in the environment 10603a1ed278cSmrg# --with-fop: 'yes' user instructs the module to use fop 10604a1ed278cSmrg# 'no' user instructs the module not to use fop 10605a1ed278cSmrg# 10606a1ed278cSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10607a1ed278cSmrg# 10608a1ed278cSmrgAC_DEFUN([XORG_WITH_FOP],[ 10609a1ed278cSmrgAC_ARG_VAR([FOP], [Path to fop command]) 106103e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 10611a1ed278cSmrgAC_ARG_WITH(fop, 10612a1ed278cSmrg AS_HELP_STRING([--with-fop], 106133e72ca8cSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 106143e72ca8cSmrg [use_fop=$withval], [use_fop=]_defopt) 106153e72ca8cSmrgm4_undefine([_defopt]) 10616ee3138f1Smrg 10617a1ed278cSmrgif test "x$use_fop" = x"auto"; then 10618a1ed278cSmrg AC_PATH_PROG([FOP], [fop]) 10619a1ed278cSmrg if test "x$FOP" = "x"; then 10620a1ed278cSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10621a1ed278cSmrg have_fop=no 10622a1ed278cSmrg else 10623a1ed278cSmrg have_fop=yes 10624a1ed278cSmrg fi 10625a1ed278cSmrgelif test "x$use_fop" = x"yes" ; then 10626a1ed278cSmrg AC_PATH_PROG([FOP], [fop]) 10627a1ed278cSmrg if test "x$FOP" = "x"; then 10628a1ed278cSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10629a1ed278cSmrg fi 10630a1ed278cSmrg have_fop=yes 10631a1ed278cSmrgelif test "x$use_fop" = x"no" ; then 10632a1ed278cSmrg if test "x$FOP" != "x"; then 10633a1ed278cSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10634a1ed278cSmrg fi 10635a1ed278cSmrg have_fop=no 10636a1ed278cSmrgelse 10637a1ed278cSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10638a1ed278cSmrgfi 106393e72ca8cSmrg 106403e72ca8cSmrg# Test for a minimum version of fop, if provided. 106413e72ca8cSmrgm4_ifval([$1], 106423e72ca8cSmrg[if test "$have_fop" = yes; then 106433e72ca8cSmrg # scrape the fop version 106443e72ca8cSmrg AC_MSG_CHECKING([for fop minimum version]) 106453e72ca8cSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 106463e72ca8cSmrg AC_MSG_RESULT([$fop_version]) 106473e72ca8cSmrg AS_VERSION_COMPARE([$fop_version], [$1], 106483e72ca8cSmrg [if test "x$use_fop" = xauto; then 106493e72ca8cSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 106503e72ca8cSmrg have_fop=no 106513e72ca8cSmrg else 106523e72ca8cSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 106533e72ca8cSmrg fi]) 106543e72ca8cSmrgfi]) 10655a1ed278cSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10656a1ed278cSmrg]) # XORG_WITH_FOP 10657a1ed278cSmrg 106583e72ca8cSmrg# XORG_WITH_PS2PDF([DEFAULT]) 10659a1ed278cSmrg# ---------------- 10660a1ed278cSmrg# Minimum version: 1.6.0 106613e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10662a1ed278cSmrg# 10663a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10664a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10665a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10666a1ed278cSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 106673e72ca8cSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 106683e72ca8cSmrg# --with-ps2pdf assumes 'auto'. 10669a1ed278cSmrg# 10670a1ed278cSmrg# Interface to module: 10671a1ed278cSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10672a1ed278cSmrg# PS2PDF: returns the path of the ps2pdf program found 10673a1ed278cSmrg# returns the path set by the user in the environment 10674a1ed278cSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10675a1ed278cSmrg# 'no' user instructs the module not to use ps2pdf 10676a1ed278cSmrg# 10677a1ed278cSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10678a1ed278cSmrg# 10679a1ed278cSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10680a1ed278cSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 106813e72ca8cSmrgm4_define([_defopt], m4_default([$1], [auto])) 10682a1ed278cSmrgAC_ARG_WITH(ps2pdf, 10683a1ed278cSmrg AS_HELP_STRING([--with-ps2pdf], 106843e72ca8cSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 106853e72ca8cSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 106863e72ca8cSmrgm4_undefine([_defopt]) 10687ee3138f1Smrg 10688a1ed278cSmrgif test "x$use_ps2pdf" = x"auto"; then 10689a1ed278cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10690a1ed278cSmrg if test "x$PS2PDF" = "x"; then 10691a1ed278cSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10692a1ed278cSmrg have_ps2pdf=no 10693a1ed278cSmrg else 10694a1ed278cSmrg have_ps2pdf=yes 10695a1ed278cSmrg fi 10696a1ed278cSmrgelif test "x$use_ps2pdf" = x"yes" ; then 10697a1ed278cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10698a1ed278cSmrg if test "x$PS2PDF" = "x"; then 10699a1ed278cSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10700a1ed278cSmrg fi 10701a1ed278cSmrg have_ps2pdf=yes 10702a1ed278cSmrgelif test "x$use_ps2pdf" = x"no" ; then 10703a1ed278cSmrg if test "x$PS2PDF" != "x"; then 10704a1ed278cSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10705a1ed278cSmrg fi 10706a1ed278cSmrg have_ps2pdf=no 10707a1ed278cSmrgelse 10708a1ed278cSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10709a1ed278cSmrgfi 10710a1ed278cSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10711a1ed278cSmrg]) # XORG_WITH_PS2PDF 10712ee3138f1Smrg 10713a1ed278cSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 10714a1ed278cSmrg# ---------------- 10715a1ed278cSmrg# Minimum version: 1.6.0 10716a1ed278cSmrg# 10717a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10718a1ed278cSmrg# not at the appropriate level. This macro enables a builder to skip all 10719a1ed278cSmrg# documentation targets except traditional man pages. 10720a1ed278cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10721a1ed278cSmrg# maximum flexibilty in controlling documentation building. 10722a1ed278cSmrg# Refer to: 10723a1ed278cSmrg# XORG_WITH_XMLTO --with-xmlto 10724a1ed278cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10725a1ed278cSmrg# XORG_WITH_DOXYGEN --with-doxygen 10726a1ed278cSmrg# XORG_WITH_FOP --with-fop 10727a1ed278cSmrg# XORG_WITH_GROFF --with-groff 10728a1ed278cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10729a1ed278cSmrg# 10730a1ed278cSmrg# Interface to module: 10731a1ed278cSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10732a1ed278cSmrg# --enable-docs: 'yes' user instructs the module to generate docs 10733a1ed278cSmrg# 'no' user instructs the module not to generate docs 10734a1ed278cSmrg# parm1: specify the default value, yes or no. 10735b425557eSmrg# 10736a1ed278cSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 107373e72ca8cSmrgm4_define([docs_default], m4_default([$1], [yes])) 10738a1ed278cSmrgAC_ARG_ENABLE(docs, 10739a1ed278cSmrg AS_HELP_STRING([--enable-docs], 107403e72ca8cSmrg [Enable building the documentation (default: ]docs_default[)]), 107413e72ca8cSmrg [build_docs=$enableval], [build_docs=]docs_default) 107423e72ca8cSmrgm4_undefine([docs_default]) 10743a1ed278cSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10744a1ed278cSmrgAC_MSG_CHECKING([whether to build documentation]) 10745a1ed278cSmrgAC_MSG_RESULT([$build_docs]) 10746a1ed278cSmrg]) # XORG_ENABLE_DOCS 10747ee3138f1Smrg 10748a1ed278cSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10749a1ed278cSmrg# ---------------- 10750a1ed278cSmrg# Minimum version: 1.6.0 10751a1ed278cSmrg# 10752a1ed278cSmrg# This macro enables a builder to skip all developer documentation. 10753a1ed278cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10754a1ed278cSmrg# maximum flexibilty in controlling documentation building. 10755a1ed278cSmrg# Refer to: 10756a1ed278cSmrg# XORG_WITH_XMLTO --with-xmlto 10757a1ed278cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10758a1ed278cSmrg# XORG_WITH_DOXYGEN --with-doxygen 10759a1ed278cSmrg# XORG_WITH_FOP --with-fop 10760a1ed278cSmrg# XORG_WITH_GROFF --with-groff 10761a1ed278cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10762a1ed278cSmrg# 10763a1ed278cSmrg# Interface to module: 10764a1ed278cSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10765a1ed278cSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10766a1ed278cSmrg# 'no' user instructs the module not to generate developer docs 10767a1ed278cSmrg# parm1: specify the default value, yes or no. 10768a1ed278cSmrg# 10769a1ed278cSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 107703e72ca8cSmrgm4_define([devel_default], m4_default([$1], [yes])) 10771a1ed278cSmrgAC_ARG_ENABLE(devel-docs, 10772a1ed278cSmrg AS_HELP_STRING([--enable-devel-docs], 107733e72ca8cSmrg [Enable building the developer documentation (default: ]devel_default[)]), 107743e72ca8cSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 107753e72ca8cSmrgm4_undefine([devel_default]) 10776a1ed278cSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10777a1ed278cSmrgAC_MSG_CHECKING([whether to build developer documentation]) 10778a1ed278cSmrgAC_MSG_RESULT([$build_devel_docs]) 10779a1ed278cSmrg]) # XORG_ENABLE_DEVEL_DOCS 10780ee3138f1Smrg 10781a1ed278cSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 10782a1ed278cSmrg# ---------------- 10783a1ed278cSmrg# Minimum version: 1.6.0 10784a1ed278cSmrg# 10785a1ed278cSmrg# This macro enables a builder to skip all functional specification targets. 10786a1ed278cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10787a1ed278cSmrg# maximum flexibilty in controlling documentation building. 10788a1ed278cSmrg# Refer to: 10789a1ed278cSmrg# XORG_WITH_XMLTO --with-xmlto 10790a1ed278cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10791a1ed278cSmrg# XORG_WITH_DOXYGEN --with-doxygen 10792a1ed278cSmrg# XORG_WITH_FOP --with-fop 10793a1ed278cSmrg# XORG_WITH_GROFF --with-groff 10794a1ed278cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10795a1ed278cSmrg# 10796a1ed278cSmrg# Interface to module: 10797a1ed278cSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10798a1ed278cSmrg# --enable-specs: 'yes' user instructs the module to generate specs 10799a1ed278cSmrg# 'no' user instructs the module not to generate specs 10800a1ed278cSmrg# parm1: specify the default value, yes or no. 10801a1ed278cSmrg# 10802a1ed278cSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 108033e72ca8cSmrgm4_define([spec_default], m4_default([$1], [yes])) 10804a1ed278cSmrgAC_ARG_ENABLE(specs, 10805a1ed278cSmrg AS_HELP_STRING([--enable-specs], 108063e72ca8cSmrg [Enable building the specs (default: ]spec_default[)]), 108073e72ca8cSmrg [build_specs=$enableval], [build_specs=]spec_default) 108083e72ca8cSmrgm4_undefine([spec_default]) 10809a1ed278cSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10810a1ed278cSmrgAC_MSG_CHECKING([whether to build functional specifications]) 10811a1ed278cSmrgAC_MSG_RESULT([$build_specs]) 10812a1ed278cSmrg]) # XORG_ENABLE_SPECS 10813ee3138f1Smrg 108143e72ca8cSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 108153e72ca8cSmrg# ---------------------------------------------- 108163e72ca8cSmrg# Minimum version: 1.13.0 108173e72ca8cSmrg# 108183e72ca8cSmrg# This macro enables a builder to enable/disable unit testing 108193e72ca8cSmrg# It makes no assumption about the test cases implementation 108203e72ca8cSmrg# Test cases may or may not use Automake "Support for test suites" 108213e72ca8cSmrg# They may or may not use the software utility library GLib 108223e72ca8cSmrg# 108233e72ca8cSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 108243e72ca8cSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 108253e72ca8cSmrg# The variable enable_unit_tests is used by other macros in this file. 108263e72ca8cSmrg# 108273e72ca8cSmrg# Interface to module: 108283e72ca8cSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 108293e72ca8cSmrg# enable_unit_tests: used in configure.ac for additional configuration 108303e72ca8cSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 108313e72ca8cSmrg# 'no' user instructs the module not to build tests 108323e72ca8cSmrg# parm1: specify the default value, yes or no. 108333e72ca8cSmrg# 108343e72ca8cSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 108353e72ca8cSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 108363e72ca8cSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 108373e72ca8cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 108383e72ca8cSmrgm4_define([_defopt], m4_default([$1], [auto])) 108393e72ca8cSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 108403e72ca8cSmrg [Enable building unit test cases (default: ]_defopt[)]), 108413e72ca8cSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 108423e72ca8cSmrgm4_undefine([_defopt]) 108433e72ca8cSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 108443e72ca8cSmrgAC_MSG_CHECKING([whether to build unit test cases]) 108453e72ca8cSmrgAC_MSG_RESULT([$enable_unit_tests]) 108463e72ca8cSmrg]) # XORG_ENABLE_UNIT_TESTS 108473e72ca8cSmrg 108483e72ca8cSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 108493e72ca8cSmrg# ------------------------------------------------------ 108503e72ca8cSmrg# Minimum version: 1.17.0 108513e72ca8cSmrg# 108523e72ca8cSmrg# This macro enables a builder to enable/disable integration testing 108533e72ca8cSmrg# It makes no assumption about the test cases' implementation 108543e72ca8cSmrg# Test cases may or may not use Automake "Support for test suites" 108553e72ca8cSmrg# 108563e72ca8cSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 108573e72ca8cSmrg# usually requires less dependencies and may be built and run under less 108583e72ca8cSmrg# stringent environments than integration tests. 108593e72ca8cSmrg# 108603e72ca8cSmrg# Interface to module: 108613e72ca8cSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 108623e72ca8cSmrg# enable_integration_tests: used in configure.ac for additional configuration 108633e72ca8cSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 108643e72ca8cSmrg# 'no' user instructs the module not to build tests 108653e72ca8cSmrg# parm1: specify the default value, yes or no. 108663e72ca8cSmrg# 108673e72ca8cSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 108683e72ca8cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 108693e72ca8cSmrgm4_define([_defopt], m4_default([$1], [auto])) 108703e72ca8cSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 108713e72ca8cSmrg [Enable building integration test cases (default: ]_defopt[)]), 108723e72ca8cSmrg [enable_integration_tests=$enableval], 108733e72ca8cSmrg [enable_integration_tests=]_defopt) 108743e72ca8cSmrgm4_undefine([_defopt]) 108753e72ca8cSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 108763e72ca8cSmrg [test "x$enable_integration_tests" != xno]) 108773e72ca8cSmrgAC_MSG_CHECKING([whether to build unit test cases]) 108783e72ca8cSmrgAC_MSG_RESULT([$enable_integration_tests]) 108793e72ca8cSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 108803e72ca8cSmrg 108813e72ca8cSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 108823e72ca8cSmrg# ---------------------------------------- 108833e72ca8cSmrg# Minimum version: 1.13.0 108843e72ca8cSmrg# 108853e72ca8cSmrg# GLib is a library which provides advanced data structures and functions. 108863e72ca8cSmrg# This macro enables a module to test for the presence of Glib. 108873e72ca8cSmrg# 108883e72ca8cSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 108893e72ca8cSmrg# Otherwise the value of $enable_unit_tests is blank. 108903e72ca8cSmrg# 108913e72ca8cSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 108923e72ca8cSmrg# test support usually requires less dependencies and may be built and run under 108933e72ca8cSmrg# less stringent environments than integration tests. 108943e72ca8cSmrg# 108953e72ca8cSmrg# Interface to module: 108963e72ca8cSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 108973e72ca8cSmrg# with_glib: used in configure.ac to know if GLib has been found 108983e72ca8cSmrg# --with-glib: 'yes' user instructs the module to use glib 108993e72ca8cSmrg# 'no' user instructs the module not to use glib 109003e72ca8cSmrg# 109013e72ca8cSmrgAC_DEFUN([XORG_WITH_GLIB],[ 109023e72ca8cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 109033e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 109043e72ca8cSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 109053e72ca8cSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 109063e72ca8cSmrg [with_glib=$withval], [with_glib=]_defopt) 109073e72ca8cSmrgm4_undefine([_defopt]) 109083e72ca8cSmrg 109093e72ca8cSmrghave_glib=no 109103e72ca8cSmrg# Do not probe GLib if user explicitly disabled unit testing 109113e72ca8cSmrgif test "x$enable_unit_tests" != x"no"; then 109123e72ca8cSmrg # Do not probe GLib if user explicitly disabled it 109133e72ca8cSmrg if test "x$with_glib" != x"no"; then 109143e72ca8cSmrg m4_ifval( 109153e72ca8cSmrg [$1], 109163e72ca8cSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 109173e72ca8cSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 109183e72ca8cSmrg ) 109193e72ca8cSmrg fi 109203e72ca8cSmrgfi 109213e72ca8cSmrg 109223e72ca8cSmrg# Not having GLib when unit testing has been explicitly requested is an error 109233e72ca8cSmrgif test "x$enable_unit_tests" = x"yes"; then 109243e72ca8cSmrg if test "x$have_glib" = x"no"; then 109253e72ca8cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 109263e72ca8cSmrg fi 109273e72ca8cSmrgfi 109283e72ca8cSmrg 109293e72ca8cSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 109303e72ca8cSmrgif test "x$enable_unit_tests" = x"no"; then 109313e72ca8cSmrg if test "x$with_glib" = x"yes"; then 109323e72ca8cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 109333e72ca8cSmrg fi 109343e72ca8cSmrgfi 109353e72ca8cSmrg 109363e72ca8cSmrg# Not having GLib when it has been explicitly requested is an error 109373e72ca8cSmrgif test "x$with_glib" = x"yes"; then 109383e72ca8cSmrg if test "x$have_glib" = x"no"; then 109393e72ca8cSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 109403e72ca8cSmrg fi 109413e72ca8cSmrgfi 109423e72ca8cSmrg 109433e72ca8cSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 109443e72ca8cSmrg]) # XORG_WITH_GLIB 109453e72ca8cSmrg 109463e72ca8cSmrg# XORG_LD_WRAP([required|optional]) 109473e72ca8cSmrg# --------------------------------- 109483e72ca8cSmrg# Minimum version: 1.13.0 109493e72ca8cSmrg# 109503e72ca8cSmrg# Check if linker supports -wrap, passed via compiler flags 109513e72ca8cSmrg# 109523e72ca8cSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 109533e72ca8cSmrg# Otherwise the value of $enable_unit_tests is blank. 109543e72ca8cSmrg# 109553e72ca8cSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 109563e72ca8cSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 109573e72ca8cSmrg# available, an argument of "optional" allows use when some unit tests require 109583e72ca8cSmrg# ld -wrap and others do not. 109593e72ca8cSmrg# 109603e72ca8cSmrgAC_DEFUN([XORG_LD_WRAP],[ 109613e72ca8cSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 109623e72ca8cSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 109633e72ca8cSmrg void __wrap_exit(int status) { return; }], 109643e72ca8cSmrg [exit(0);])]) 109653e72ca8cSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 109663e72ca8cSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 109673e72ca8cSmrg if test "x$have_ld_wrap" = x"no"; then 109683e72ca8cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 109693e72ca8cSmrg fi 109703e72ca8cSmrgfi 109713e72ca8cSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 109723e72ca8cSmrg# 109733e72ca8cSmrg]) # XORG_LD_WRAP 109743e72ca8cSmrg 109753e72ca8cSmrg# XORG_CHECK_LINKER_FLAGS 109763e72ca8cSmrg# ----------------------- 109773e72ca8cSmrg# SYNOPSIS 109783e72ca8cSmrg# 109793e72ca8cSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 109803e72ca8cSmrg# 109813e72ca8cSmrg# DESCRIPTION 109823e72ca8cSmrg# 109833e72ca8cSmrg# Check whether the given linker FLAGS work with the current language's 109843e72ca8cSmrg# linker, or whether they give an error. 109853e72ca8cSmrg# 109863e72ca8cSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 109873e72ca8cSmrg# success/failure. 109883e72ca8cSmrg# 109893e72ca8cSmrg# PROGRAM-SOURCE is the program source to link with, if needed 109903e72ca8cSmrg# 109913e72ca8cSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 109923e72ca8cSmrg# 109933e72ca8cSmrg# LICENSE 109943e72ca8cSmrg# 109953e72ca8cSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 109963e72ca8cSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 109973e72ca8cSmrg# Copyright (c) 2009 Matteo Frigo 109983e72ca8cSmrg# 109993e72ca8cSmrg# This program is free software: you can redistribute it and/or modify it 110003e72ca8cSmrg# under the terms of the GNU General Public License as published by the 110013e72ca8cSmrg# Free Software Foundation, either version 3 of the License, or (at your 110023e72ca8cSmrg# option) any later version. 110033e72ca8cSmrg# 110043e72ca8cSmrg# This program is distributed in the hope that it will be useful, but 110053e72ca8cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 110063e72ca8cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 110073e72ca8cSmrg# Public License for more details. 110083e72ca8cSmrg# 110093e72ca8cSmrg# You should have received a copy of the GNU General Public License along 110103e72ca8cSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 110113e72ca8cSmrg# 110123e72ca8cSmrg# As a special exception, the respective Autoconf Macro's copyright owner 110133e72ca8cSmrg# gives unlimited permission to copy, distribute and modify the configure 110143e72ca8cSmrg# scripts that are the output of Autoconf when processing the Macro. You 110153e72ca8cSmrg# need not follow the terms of the GNU General Public License when using 110163e72ca8cSmrg# or distributing such scripts, even though portions of the text of the 110173e72ca8cSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 110183e72ca8cSmrg# all other use of the material that constitutes the Autoconf Macro. 110193e72ca8cSmrg# 110203e72ca8cSmrg# This special exception to the GPL applies to versions of the Autoconf 110213e72ca8cSmrg# Macro released by the Autoconf Archive. When you make and distribute a 110223e72ca8cSmrg# modified version of the Autoconf Macro, you may extend this special 110233e72ca8cSmrg# exception to the GPL to apply to your modified version as well.# 110243e72ca8cSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 110253e72ca8cSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 110263e72ca8cSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 110273e72ca8cSmrgAS_LITERAL_IF([$1], 110283e72ca8cSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 110293e72ca8cSmrg ax_save_FLAGS=$LDFLAGS 110303e72ca8cSmrg LDFLAGS="$1" 110313e72ca8cSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 110323e72ca8cSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 110333e72ca8cSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 110343e72ca8cSmrg LDFLAGS=$ax_save_FLAGS])], 110353e72ca8cSmrg [ax_save_FLAGS=$LDFLAGS 110363e72ca8cSmrg LDFLAGS="$1" 110373e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 110383e72ca8cSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 110393e72ca8cSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 110403e72ca8cSmrg LDFLAGS=$ax_save_FLAGS]) 110413e72ca8cSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 110423e72ca8cSmrgAC_MSG_RESULT($xorg_check_linker_flags) 110433e72ca8cSmrgif test "x$xorg_check_linker_flags" = xyes; then 110443e72ca8cSmrg m4_default([$2], :) 110453e72ca8cSmrgelse 110463e72ca8cSmrg m4_default([$3], :) 110473e72ca8cSmrgfi 110483e72ca8cSmrg]) # XORG_CHECK_LINKER_FLAGS 110493e72ca8cSmrg 110503e72ca8cSmrg# XORG_MEMORY_CHECK_FLAGS 110513e72ca8cSmrg# ----------------------- 110523e72ca8cSmrg# Minimum version: 1.16.0 110533e72ca8cSmrg# 110543e72ca8cSmrg# This macro attempts to find appropriate memory checking functionality 110553e72ca8cSmrg# for various platforms which unit testing code may use to catch various 110563e72ca8cSmrg# forms of memory allocation and access errors in testing. 110573e72ca8cSmrg# 110583e72ca8cSmrg# Interface to module: 110593e72ca8cSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 110603e72ca8cSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 110613e72ca8cSmrg# 110623e72ca8cSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 110633e72ca8cSmrg# 110643e72ca8cSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 110653e72ca8cSmrg 110663e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 110673e72ca8cSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 110683e72ca8cSmrg [Environment variables to enable memory checking in tests]) 110693e72ca8cSmrg 110703e72ca8cSmrg# Check for different types of support on different platforms 110713e72ca8cSmrgcase $host_os in 110723e72ca8cSmrg solaris*) 110733e72ca8cSmrg AC_CHECK_LIB([umem], [umem_alloc], 110743e72ca8cSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 110753e72ca8cSmrg ;; 110763e72ca8cSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 110773e72ca8cSmrg # both directly and inverted, so should not be 0 or 255. 110783e72ca8cSmrg malloc_debug_env='MALLOC_PERTURB_=15' 110793e72ca8cSmrg ;; 110803e72ca8cSmrg darwin*) 110813e72ca8cSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 110823e72ca8cSmrg ;; 110833e72ca8cSmrg *bsd*) 110843e72ca8cSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 110853e72ca8cSmrg ;; 110863e72ca8cSmrgesac 110873e72ca8cSmrg 110883e72ca8cSmrg# User supplied flags override default flags 110893e72ca8cSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 110903e72ca8cSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 110913e72ca8cSmrgfi 110923e72ca8cSmrg 110933e72ca8cSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 110943e72ca8cSmrg]) # XORG_WITH_LINT 110953e72ca8cSmrg 11096a1ed278cSmrg# XORG_CHECK_MALLOC_ZERO 11097a1ed278cSmrg# ---------------------- 11098a1ed278cSmrg# Minimum version: 1.0.0 11099a1ed278cSmrg# 11100a1ed278cSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11101a1ed278cSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 11102a1ed278cSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11103a1ed278cSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11104a1ed278cSmrgAC_ARG_ENABLE(malloc0returnsnull, 11105a1ed278cSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 11106a1ed278cSmrg [malloc(0) returns NULL (default: auto)]), 11107a1ed278cSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 11108a1ed278cSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11109ee3138f1Smrg 11110a1ed278cSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 11111a1ed278cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 111123e72ca8cSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 111133e72ca8cSmrg#include <stdlib.h> 111143e72ca8cSmrg],[ 11115a1ed278cSmrg char *m0, *r0, *c0, *p; 11116a1ed278cSmrg m0 = malloc(0); 11117a1ed278cSmrg p = malloc(10); 11118a1ed278cSmrg r0 = realloc(p,0); 111193e72ca8cSmrg c0 = calloc(0,10); 111203e72ca8cSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 111213e72ca8cSmrg])], 11122a1ed278cSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 11123a1ed278cSmrg [MALLOC_ZERO_RETURNS_NULL=no], 11124a1ed278cSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 11125a1ed278cSmrgfi 11126a1ed278cSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11127ee3138f1Smrg 11128a1ed278cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11129a1ed278cSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11130a1ed278cSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11131a1ed278cSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11132a1ed278cSmrgelse 11133a1ed278cSmrg MALLOC_ZERO_CFLAGS="" 11134a1ed278cSmrg XMALLOC_ZERO_CFLAGS="" 11135a1ed278cSmrg XTMALLOC_ZERO_CFLAGS="" 11136a1ed278cSmrgfi 11137ee3138f1Smrg 11138a1ed278cSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 11139a1ed278cSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 11140a1ed278cSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11141a1ed278cSmrg]) # XORG_CHECK_MALLOC_ZERO 11142ee3138f1Smrg 11143a1ed278cSmrg# XORG_WITH_LINT() 11144a1ed278cSmrg# ---------------- 11145a1ed278cSmrg# Minimum version: 1.1.0 11146a1ed278cSmrg# 11147a1ed278cSmrg# This macro enables the use of a tool that flags some suspicious and 11148a1ed278cSmrg# non-portable constructs (likely to be bugs) in C language source code. 11149a1ed278cSmrg# It will attempt to locate the tool and use appropriate options. 11150a1ed278cSmrg# There are various lint type tools on different platforms. 11151a1ed278cSmrg# 11152a1ed278cSmrg# Interface to module: 11153a1ed278cSmrg# LINT: returns the path to the tool found on the platform 11154a1ed278cSmrg# or the value set to LINT on the configure cmd line 11155a1ed278cSmrg# also an Automake conditional 11156a1ed278cSmrg# LINT_FLAGS: an Automake variable with appropriate flags 11157a1ed278cSmrg# 11158a1ed278cSmrg# --with-lint: 'yes' user instructs the module to use lint 11159a1ed278cSmrg# 'no' user instructs the module not to use lint (default) 11160a1ed278cSmrg# 11161a1ed278cSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11162a1ed278cSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 11163a1ed278cSmrg# 11164a1ed278cSmrgAC_DEFUN([XORG_WITH_LINT],[ 11165ee3138f1Smrg 11166a1ed278cSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 11167a1ed278cSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11168a1ed278cSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11169a1ed278cSmrg [Use a lint-style source code checker (default: disabled)])], 11170a1ed278cSmrg [use_lint=$withval], [use_lint=no]) 11171ee3138f1Smrg 11172a1ed278cSmrg# Obtain platform specific info like program name and options 11173a1ed278cSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11174a1ed278cSmrgcase $host_os in 11175a1ed278cSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11176a1ed278cSmrg lint_name=splint 11177a1ed278cSmrg lint_options="-badflag" 11178a1ed278cSmrg ;; 11179a1ed278cSmrg *freebsd* | *netbsd*) 11180a1ed278cSmrg lint_name=lint 11181a1ed278cSmrg lint_options="-u -b" 11182a1ed278cSmrg ;; 11183a1ed278cSmrg *solaris*) 11184a1ed278cSmrg lint_name=lint 11185a1ed278cSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11186a1ed278cSmrg ;; 11187a1ed278cSmrgesac 11188ee3138f1Smrg 11189a1ed278cSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 11190a1ed278cSmrgif test "x$use_lint" = x"yes" ; then 11191a1ed278cSmrg AC_PATH_PROG([LINT], [$lint_name]) 11192a1ed278cSmrg if test "x$LINT" = "x"; then 11193a1ed278cSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11194a1ed278cSmrg fi 11195a1ed278cSmrgelif test "x$use_lint" = x"no" ; then 11196a1ed278cSmrg if test "x$LINT" != "x"; then 11197a1ed278cSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11198a1ed278cSmrg fi 11199a1ed278cSmrgelse 11200a1ed278cSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11201a1ed278cSmrgfi 11202ee3138f1Smrg 11203a1ed278cSmrg# User supplied flags override default flags 11204a1ed278cSmrgif test "x$LINT_FLAGS" != "x"; then 11205a1ed278cSmrg lint_options=$LINT_FLAGS 11206a1ed278cSmrgfi 11207ee3138f1Smrg 11208a1ed278cSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 11209a1ed278cSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11210ee3138f1Smrg 11211a1ed278cSmrg]) # XORG_WITH_LINT 11212ee3138f1Smrg 11213a1ed278cSmrg# XORG_LINT_LIBRARY(LIBNAME) 11214a1ed278cSmrg# -------------------------- 11215a1ed278cSmrg# Minimum version: 1.1.0 1121634977a2fSmrg# 11217a1ed278cSmrg# Sets up flags for building lint libraries for checking programs that call 11218a1ed278cSmrg# functions in the library. 1121934977a2fSmrg# 11220a1ed278cSmrg# Interface to module: 11221a1ed278cSmrg# LINTLIB - Automake variable with the name of lint library file to make 11222a1ed278cSmrg# MAKE_LINT_LIB - Automake conditional 11223a1ed278cSmrg# 11224a1ed278cSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11225a1ed278cSmrg# - 'no' user instructs the module not to create a lint library (default) 11226ee3138f1Smrg 11227a1ed278cSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 11228a1ed278cSmrgAC_REQUIRE([XORG_WITH_LINT]) 11229a1ed278cSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11230a1ed278cSmrg [Create lint library (default: disabled)])], 11231a1ed278cSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1123234977a2fSmrg 11233a1ed278cSmrgif test "x$make_lint_lib" = x"yes" ; then 11234a1ed278cSmrg LINTLIB=llib-l$1.ln 11235a1ed278cSmrg if test "x$LINT" = "x"; then 11236a1ed278cSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11237a1ed278cSmrg fi 11238a1ed278cSmrgelif test "x$make_lint_lib" != x"no" ; then 11239a1ed278cSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11240a1ed278cSmrgfi 11241ee3138f1Smrg 11242a1ed278cSmrgAC_SUBST(LINTLIB) 11243a1ed278cSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11244b425557eSmrg 11245a1ed278cSmrg]) # XORG_LINT_LIBRARY 11246b425557eSmrg 112473e72ca8cSmrg# XORG_COMPILER_BRAND 112483e72ca8cSmrg# ------------------- 112493e72ca8cSmrg# Minimum version: 1.14.0 112503e72ca8cSmrg# 112513e72ca8cSmrg# Checks for various brands of compilers and sets flags as appropriate: 112523e72ca8cSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 112533e72ca8cSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 112543e72ca8cSmrg# clang compiler - sets CLANGCC to "yes" 112553e72ca8cSmrg# Intel compiler - sets INTELCC to "yes" 112563e72ca8cSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 112573e72ca8cSmrg# 112583e72ca8cSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 112593e72ca8cSmrgAC_LANG_CASE( 112603e72ca8cSmrg [C], [ 112613e72ca8cSmrg AC_REQUIRE([AC_PROG_CC_C99]) 112623e72ca8cSmrg ], 112633e72ca8cSmrg [C++], [ 112643e72ca8cSmrg AC_REQUIRE([AC_PROG_CXX]) 112653e72ca8cSmrg ] 112663e72ca8cSmrg) 112673e72ca8cSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 112683e72ca8cSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 112693e72ca8cSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 112703e72ca8cSmrg]) # XORG_COMPILER_BRAND 112713e72ca8cSmrg 112723e72ca8cSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 112733e72ca8cSmrg# --------------- 112743e72ca8cSmrg# Minimum version: 1.16.0 112753e72ca8cSmrg# 112763e72ca8cSmrg# Test if the compiler works when passed the given flag as a command line argument. 112773e72ca8cSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 112783e72ca8cSmrg# next flag in the list until there are no more options. 112793e72ca8cSmrg# 112803e72ca8cSmrg# Note that this does not guarantee that the compiler supports the flag as some 112813e72ca8cSmrg# compilers will simply ignore arguments that they do not understand, but we do 112823e72ca8cSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 112833e72ca8cSmrg# -Werror=unused-command-line-argument 112843e72ca8cSmrg# 112853e72ca8cSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 112863e72ca8cSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 112873e72ca8cSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 112883e72ca8cSmrg 112893e72ca8cSmrgAC_LANG_COMPILER_REQUIRE 112903e72ca8cSmrg 112913e72ca8cSmrgAC_LANG_CASE( 112923e72ca8cSmrg [C], [ 112933e72ca8cSmrg AC_REQUIRE([AC_PROG_CC_C99]) 112943e72ca8cSmrg define([PREFIX], [C]) 112953e72ca8cSmrg define([CACHE_PREFIX], [cc]) 112963e72ca8cSmrg define([COMPILER], [$CC]) 112973e72ca8cSmrg ], 112983e72ca8cSmrg [C++], [ 112993e72ca8cSmrg define([PREFIX], [CXX]) 113003e72ca8cSmrg define([CACHE_PREFIX], [cxx]) 113013e72ca8cSmrg define([COMPILER], [$CXX]) 113023e72ca8cSmrg ] 113033e72ca8cSmrg) 113043e72ca8cSmrg 113053e72ca8cSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 113063e72ca8cSmrg 113073e72ca8cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 113083e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113093e72ca8cSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 113103e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 113113e72ca8cSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 113123e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 113133e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 113143e72ca8cSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 113153e72ca8cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113163e72ca8cSmrgfi 113173e72ca8cSmrg 113183e72ca8cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 113193e72ca8cSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 113203e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113213e72ca8cSmrg fi 113223e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 113233e72ca8cSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 113243e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 113253e72ca8cSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 113263e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 113273e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 113283e72ca8cSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 113293e72ca8cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113303e72ca8cSmrgfi 113313e72ca8cSmrg 113323e72ca8cSmrgfound="no" 113333e72ca8cSmrgm4_foreach([flag], m4_cdr($@), [ 113343e72ca8cSmrg if test $found = "no" ; then 113353e72ca8cSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 113363e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113373e72ca8cSmrg fi 113383e72ca8cSmrg 113393e72ca8cSmrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 113403e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 113413e72ca8cSmrg fi 113423e72ca8cSmrg 113433e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 113443e72ca8cSmrg 113453e72ca8cSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 113463e72ca8cSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 113473e72ca8cSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 113483e72ca8cSmrg AC_CACHE_VAL($cacheid, 113493e72ca8cSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 113503e72ca8cSmrg [eval $cacheid=yes], 113513e72ca8cSmrg [eval $cacheid=no])]) 113523e72ca8cSmrg 113533e72ca8cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113543e72ca8cSmrg 113553e72ca8cSmrg eval supported=\$$cacheid 113563e72ca8cSmrg AC_MSG_RESULT([$supported]) 113573e72ca8cSmrg if test "$supported" = "yes" ; then 113583e72ca8cSmrg $1="$$1 ]flag[" 113593e72ca8cSmrg found="yes" 113603e72ca8cSmrg fi 113613e72ca8cSmrg fi 113623e72ca8cSmrg]) 113633e72ca8cSmrg]) # XORG_TESTSET_CFLAG 113643e72ca8cSmrg 113653e72ca8cSmrg# XORG_COMPILER_FLAGS 113663e72ca8cSmrg# --------------- 113673e72ca8cSmrg# Minimum version: 1.16.0 113683e72ca8cSmrg# 113693e72ca8cSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 113703e72ca8cSmrg# arguments supported by the selected compiler which do NOT alter the generated 113713e72ca8cSmrg# code. These arguments will cause the compiler to print various warnings 113723e72ca8cSmrg# during compilation AND turn a conservative set of warnings into errors. 113733e72ca8cSmrg# 113743e72ca8cSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 113753e72ca8cSmrg# future versions of util-macros as options are added to new compilers. 113763e72ca8cSmrg# 113773e72ca8cSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 113783e72ca8cSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 113793e72ca8cSmrg 113803e72ca8cSmrgAC_ARG_ENABLE(selective-werror, 113813e72ca8cSmrg AS_HELP_STRING([--disable-selective-werror], 113823e72ca8cSmrg [Turn off selective compiler errors. (default: enabled)]), 113833e72ca8cSmrg [SELECTIVE_WERROR=$enableval], 113843e72ca8cSmrg [SELECTIVE_WERROR=yes]) 113853e72ca8cSmrg 113863e72ca8cSmrgAC_LANG_CASE( 113873e72ca8cSmrg [C], [ 113883e72ca8cSmrg define([PREFIX], [C]) 113893e72ca8cSmrg ], 113903e72ca8cSmrg [C++], [ 113913e72ca8cSmrg define([PREFIX], [CXX]) 113923e72ca8cSmrg ] 113933e72ca8cSmrg) 113943e72ca8cSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 113953e72ca8cSmrgif test "x$SUNCC" = "xyes"; then 113963e72ca8cSmrg [BASE_]PREFIX[FLAGS]="-v" 113973e72ca8cSmrgelse 113983e72ca8cSmrg [BASE_]PREFIX[FLAGS]="" 113993e72ca8cSmrgfi 114003e72ca8cSmrg 114013e72ca8cSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 114023e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 114033e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 114043e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 114053e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 114063e72ca8cSmrg 114073e72ca8cSmrgAC_LANG_CASE( 114083e72ca8cSmrg [C], [ 114093e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 114103e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 114113e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 114123e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 114133e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 114143e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 114153e72ca8cSmrg ] 114163e72ca8cSmrg) 114173e72ca8cSmrg 114183e72ca8cSmrg# This chunk adds additional warnings that could catch undesired effects. 114193e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 114203e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 114213e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 114223e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 114233e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 114243e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 114253e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 114263e72ca8cSmrg 114273e72ca8cSmrg# These are currently disabled because they are noisy. They will be enabled 114283e72ca8cSmrg# in the future once the codebase is sufficiently modernized to silence 114293e72ca8cSmrg# them. For now, I don't want them to drown out the other warnings. 114303e72ca8cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 114313e72ca8cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 114323e72ca8cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 114333e72ca8cSmrg 114343e72ca8cSmrg# Turn some warnings into errors, so we don't accidently get successful builds 114353e72ca8cSmrg# when there are problems that should be fixed. 114363e72ca8cSmrg 114373e72ca8cSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 114383e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 114393e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 114403e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 114413e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 114423e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 114433e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 114443e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 114453e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 114463e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 114473e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 114483e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 114493e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 114503e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 114513e72ca8cSmrgelse 114523e72ca8cSmrgAC_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]) 114533e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 114543e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 114553e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 114563e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 114573e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 114583e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 114593e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 114603e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 114613e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 114623e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 114633e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 114643e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 114653e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 114663e72ca8cSmrgfi 114673e72ca8cSmrg 114683e72ca8cSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 114693e72ca8cSmrg]) # XORG_COMPILER_FLAGS 114703e72ca8cSmrg 11471a1ed278cSmrg# XORG_CWARNFLAGS 11472a1ed278cSmrg# --------------- 11473a1ed278cSmrg# Minimum version: 1.2.0 114743e72ca8cSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11475ee3138f1Smrg# 11476a1ed278cSmrg# Defines CWARNFLAGS to enable C compiler warnings. 11477ee3138f1Smrg# 114783e72ca8cSmrg# This function is deprecated because it defines -fno-strict-aliasing 114793e72ca8cSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 114803e72ca8cSmrg# is needed, then it should be added explicitly in the module when 114813e72ca8cSmrg# it is updated to use BASE_CFLAGS. 114823e72ca8cSmrg# 11483a1ed278cSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 114843e72ca8cSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 114853e72ca8cSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 114863e72ca8cSmrgAC_LANG_CASE( 114873e72ca8cSmrg [C], [ 114883e72ca8cSmrg CWARNFLAGS="$BASE_CFLAGS" 114893e72ca8cSmrg if test "x$GCC" = xyes ; then 114903e72ca8cSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 114913e72ca8cSmrg fi 114923e72ca8cSmrg AC_SUBST(CWARNFLAGS) 114933e72ca8cSmrg ] 114943e72ca8cSmrg) 11495a1ed278cSmrg]) # XORG_CWARNFLAGS 11496ee3138f1Smrg 11497a1ed278cSmrg# XORG_STRICT_OPTION 11498a1ed278cSmrg# ----------------------- 11499a1ed278cSmrg# Minimum version: 1.3.0 11500a1ed278cSmrg# 115013e72ca8cSmrg# Add configure option to enable strict compilation flags, such as treating 115023e72ca8cSmrg# warnings as fatal errors. 115033e72ca8cSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 115043e72ca8cSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 115053e72ca8cSmrg# 115063e72ca8cSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 115073e72ca8cSmrg# when strict compilation is unconditionally desired. 11508a1ed278cSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11509a1ed278cSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 115103e72ca8cSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1151134977a2fSmrg 11512a1ed278cSmrgAC_ARG_ENABLE(strict-compilation, 11513a1ed278cSmrg AS_HELP_STRING([--enable-strict-compilation], 11514a1ed278cSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11515a1ed278cSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 115163e72ca8cSmrg 115173e72ca8cSmrgAC_LANG_CASE( 115183e72ca8cSmrg [C], [ 115193e72ca8cSmrg define([PREFIX], [C]) 115203e72ca8cSmrg ], 115213e72ca8cSmrg [C++], [ 115223e72ca8cSmrg define([PREFIX], [CXX]) 115233e72ca8cSmrg ] 115243e72ca8cSmrg) 115253e72ca8cSmrg 115263e72ca8cSmrg[STRICT_]PREFIX[FLAGS]="" 115273e72ca8cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 115283e72ca8cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 115293e72ca8cSmrg 115303e72ca8cSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 115313e72ca8cSmrg# activate it with -Werror, so we add it here explicitly. 115323e72ca8cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 115333e72ca8cSmrg 11534a1ed278cSmrgif test "x$STRICT_COMPILE" = "xyes"; then 115353e72ca8cSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 115363e72ca8cSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11537a1ed278cSmrgfi 115383e72ca8cSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 115393e72ca8cSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 115403e72ca8cSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11541a1ed278cSmrg]) # XORG_STRICT_OPTION 11542a1ed278cSmrg 11543a1ed278cSmrg# XORG_DEFAULT_OPTIONS 11544a1ed278cSmrg# -------------------- 11545a1ed278cSmrg# Minimum version: 1.3.0 11546ee3138f1Smrg# 11547a1ed278cSmrg# Defines default options for X.Org modules. 11548ee3138f1Smrg# 11549a1ed278cSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11550a1ed278cSmrgAC_REQUIRE([AC_PROG_INSTALL]) 115513e72ca8cSmrgXORG_COMPILER_FLAGS 11552a1ed278cSmrgXORG_CWARNFLAGS 11553a1ed278cSmrgXORG_STRICT_OPTION 11554a1ed278cSmrgXORG_RELEASE_VERSION 11555a1ed278cSmrgXORG_CHANGELOG 11556a1ed278cSmrgXORG_INSTALL 11557a1ed278cSmrgXORG_MANPAGE_SECTIONS 11558a1ed278cSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11559a1ed278cSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11560a1ed278cSmrg]) # XORG_DEFAULT_OPTIONS 11561a1ed278cSmrg 11562a1ed278cSmrg# XORG_INSTALL() 11563a1ed278cSmrg# ---------------- 11564a1ed278cSmrg# Minimum version: 1.4.0 1156534977a2fSmrg# 11566a1ed278cSmrg# Defines the variable INSTALL_CMD as the command to copy 11567a1ed278cSmrg# INSTALL from $prefix/share/util-macros. 11568b425557eSmrg# 11569a1ed278cSmrgAC_DEFUN([XORG_INSTALL], [ 11570a1ed278cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11571a1ed278cSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11572a1ed278cSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11573a1ed278cSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11574a1ed278cSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11575a1ed278cSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11576a1ed278cSmrgAC_SUBST([INSTALL_CMD]) 11577a1ed278cSmrg]) # XORG_INSTALL 11578a1ed278cSmrgdnl Copyright 2005 Red Hat, Inc 11579a1ed278cSmrgdnl 11580a1ed278cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11581a1ed278cSmrgdnl documentation for any purpose is hereby granted without fee, provided that 11582a1ed278cSmrgdnl the above copyright notice appear in all copies and that both that 11583a1ed278cSmrgdnl copyright notice and this permission notice appear in supporting 11584a1ed278cSmrgdnl documentation. 11585a1ed278cSmrgdnl 11586a1ed278cSmrgdnl The above copyright notice and this permission notice shall be included 11587a1ed278cSmrgdnl in all copies or substantial portions of the Software. 11588a1ed278cSmrgdnl 11589a1ed278cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11590a1ed278cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11591a1ed278cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11592a1ed278cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11593a1ed278cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11594a1ed278cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11595a1ed278cSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 11596a1ed278cSmrgdnl 11597a1ed278cSmrgdnl Except as contained in this notice, the name of the copyright holders shall 11598a1ed278cSmrgdnl not be used in advertising or otherwise to promote the sale, use or 11599a1ed278cSmrgdnl other dealings in this Software without prior written authorization 11600a1ed278cSmrgdnl from the copyright holders. 11601a1ed278cSmrgdnl 11602ee3138f1Smrg 11603a1ed278cSmrg# XORG_RELEASE_VERSION 11604a1ed278cSmrg# -------------------- 11605a1ed278cSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11606a1ed278cSmrg 11607a1ed278cSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11608a1ed278cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11609a1ed278cSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11610a1ed278cSmrg [Major version of this package]) 11611a1ed278cSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11612a1ed278cSmrg if test "x$PVM" = "x"; then 11613a1ed278cSmrg PVM="0" 11614a1ed278cSmrg fi 11615a1ed278cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11616a1ed278cSmrg [$PVM], 11617a1ed278cSmrg [Minor version of this package]) 11618a1ed278cSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11619a1ed278cSmrg if test "x$PVP" = "x"; then 11620a1ed278cSmrg PVP="0" 11621a1ed278cSmrg fi 11622a1ed278cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11623a1ed278cSmrg [$PVP], 11624a1ed278cSmrg [Patch version of this package]) 11625a1ed278cSmrg]) 11626ee3138f1Smrg 11627a1ed278cSmrg# XORG_CHANGELOG() 11628a1ed278cSmrg# ---------------- 11629a1ed278cSmrg# Minimum version: 1.2.0 11630a1ed278cSmrg# 11631a1ed278cSmrg# Defines the variable CHANGELOG_CMD as the command to generate 11632a1ed278cSmrg# ChangeLog from git. 11633a1ed278cSmrg# 11634a1ed278cSmrg# 11635a1ed278cSmrgAC_DEFUN([XORG_CHANGELOG], [ 11636a1ed278cSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11637a1ed278cSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11638a1ed278cSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11639a1ed278cSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11640a1ed278cSmrgAC_SUBST([CHANGELOG_CMD]) 11641a1ed278cSmrg]) # XORG_CHANGELOG 11642ee3138f1Smrg 11643